Algebraic laws for object oriented programming with references

Detalhes bibliográficos
Autor(a) principal: PALMA, Giovanny Fernando Lucero
Data de Publicação: 2015
Tipo de documento: Tese
Idioma: eng
Título da fonte: Repositório Institucional da UFPE
Texto Completo: https://repositorio.ufpe.br/handle/123456789/14930
Resumo: There are several approaches to defining a formal semantics of a programming language. The main established ones are operational, denotational and axiomatic semantics. The first two rely on defining an explicit model, whereas the latter one is based on postulating relevant properties of the language in terms of axioms. Particularly, in a purely algebraic approach the axioms take the form of conditional equations (typically denoted as programming laws) that relate the language constructs. Without requiring an explicit model, the advantage of the algebraic approach is incrementality: the language can be extended and the laws tend to remain valid, provided the new constructs do not interfere with the behaviour of the original ones. Algebraic laws have been proposed to uncover interesting properties of several programming paradigms: imperative, logic, functional, concurrent and object oriented, among others. As for the other paradigms, there is a comprehensive set of laws for object oriented constructs, but these are restricted to a language with copy semantics; some laws to deal with references have also been proposed, but these are tailored to specific applications, and are far from being comprehensive. In general, formal reasoning with references has been a persistent challenge and algebraic approaches usually have avoided including them in programming languages. We propose a set of algebraic laws for reasoning about object oriented programs with a reference semantics. First we focus on sequential imperative programs that use object references like in Java. The theory is based on previous work by adding laws to cope with object references. The incrementality of the algebraic method is fundamental; with a few exceptions, existing laws for copy semantics are entirely reused, as they are not affected by the reference semantics. As an evidence of relative completeness, we show that any program can be transformed, through the use of our laws, to a normal form which simulates it using an explicit heap with copy semantics. Soundness is addressed by illustrating how some of the laws can be proved in a relational semantics for a subset of the language. We extend the theory of imperative programs for an object oriented language with the usual constructs: additional imperative commands with references, classes with inheritance and subtyping, visibility control, dynamic binding, type tests and downcasts. Algebraic laws are proposed for these new constructs. In order to illustrate the expressiveness of the laws for the object oriented language, we characterize and prove a set of refactorings from Fowler’s catalog. These are contrasted with previous work that formalized refactorings in the context of copy semantics.
id UFPE_dfdad511ab1f862a32c27e80519ddf3c
oai_identifier_str oai:repositorio.ufpe.br:123456789/14930
network_acronym_str UFPE
network_name_str Repositório Institucional da UFPE
repository_id_str 2221
spelling PALMA, Giovanny Fernando Lucerohttp://lattes.cnpq.br/3074373409452517http://lattes.cnpq.br/3977760354511853SAMPAIO, Augusto Cezar AlvesNAUMANN, David2016-01-19T17:04:34Z2016-01-19T17:04:34Z2015-03-16https://repositorio.ufpe.br/handle/123456789/14930There are several approaches to defining a formal semantics of a programming language. The main established ones are operational, denotational and axiomatic semantics. The first two rely on defining an explicit model, whereas the latter one is based on postulating relevant properties of the language in terms of axioms. Particularly, in a purely algebraic approach the axioms take the form of conditional equations (typically denoted as programming laws) that relate the language constructs. Without requiring an explicit model, the advantage of the algebraic approach is incrementality: the language can be extended and the laws tend to remain valid, provided the new constructs do not interfere with the behaviour of the original ones. Algebraic laws have been proposed to uncover interesting properties of several programming paradigms: imperative, logic, functional, concurrent and object oriented, among others. As for the other paradigms, there is a comprehensive set of laws for object oriented constructs, but these are restricted to a language with copy semantics; some laws to deal with references have also been proposed, but these are tailored to specific applications, and are far from being comprehensive. In general, formal reasoning with references has been a persistent challenge and algebraic approaches usually have avoided including them in programming languages. We propose a set of algebraic laws for reasoning about object oriented programs with a reference semantics. First we focus on sequential imperative programs that use object references like in Java. The theory is based on previous work by adding laws to cope with object references. The incrementality of the algebraic method is fundamental; with a few exceptions, existing laws for copy semantics are entirely reused, as they are not affected by the reference semantics. As an evidence of relative completeness, we show that any program can be transformed, through the use of our laws, to a normal form which simulates it using an explicit heap with copy semantics. Soundness is addressed by illustrating how some of the laws can be proved in a relational semantics for a subset of the language. We extend the theory of imperative programs for an object oriented language with the usual constructs: additional imperative commands with references, classes with inheritance and subtyping, visibility control, dynamic binding, type tests and downcasts. Algebraic laws are proposed for these new constructs. In order to illustrate the expressiveness of the laws for the object oriented language, we characterize and prove a set of refactorings from Fowler’s catalog. These are contrasted with previous work that formalized refactorings in the context of copy semantics.CAPESCNPqExistem várias abordagens para descrever formalmente a semântica de linguagens de programação. As principais são semântica operacional, denotacional e axiomática. As duas primeiras definem modelos semânticos explícitos enquanto a última postula axiomas que descrevem propriedades relevantes da linguagem. Em uma abordagem puramente algébrica, os axiomas são equações (tipicamente denominadas leis de programação) que relacionam os diversos construtores da linguagem. A vantagem da álgebra é a facilidade de extensão: quando uma linguagem é estendida, a tendencia é que as leis já estabelecidas continuem sendo válidas, desde que os novos contrutores não interfiram com o comportamento dos construtores originais da linguagem Leis algébricas tem sido propostas para estudar propriedades interessantes de vários paradigmas de programação: imperativo, lógico, funcional, concorrente e orientado a objetos, entre outros. Em geral, para todos estes paradigmas existe um conjunto representativo de leis. Porém, para programação orientada a objetos, os trabalhos tem se restringido a linguagens com semântica de cópia ou as leis relacionadas com referências tem sido direcionadas somente para aplicações específicas e estão distantes de serem representativas. Em geral, raciocínio formal com referências tem sido um desafio persistente e os trabalhos algébricos usualmente tem evitado a inclusão de referências nas linguagens de programação. Propomos um conjunto de leis algébricas que permitem raciocinar com programas orientados a objetos com uma semântica de referências. Primeiro, focamos em uma linguagem imperativa sequencial que usa referências a objetos como em Java. A teoria é baseada em trabalhos anteriores adicionando leis que lidam com referências. A facilidade de extensão do método algébrico é fundamental; com poucas exeções, as leis anteriores para semântica de cópia são reusadas, pois elas não são afetadas pela semântica de referência. Como uma evidência de completude relativa, mostramos que qualquer programa pode ser transformado, usado as leis, em uma forma normal que simula o programa original usando um heap explícito com semântica de cópia. A consistência (soundness) das leis é abordada ilustrando como algumas das leis podem ser provadas em uma semântica relacional para um subconjunto da linguagem. Estendemos a teoria de programas imperativos para uma linguagem orientada a objetos com os habituais construtores: comandos imperativos adicionais com referências, classes com herança e subtipos, controle de visibilidade, amarração dinâmica, e testes e casts de tipos. Leis são propostas para estes novos construtores. Para ilustrar a expressividade das leis para a linguagem orientada a objetos, caracterizamos e provamos um conjunto de refatorações do catalógo clássico de Fowler. Comparamos nossa apresentação com trabalhos anteriores que formalizaram refatorações em um contexto de semântica de cópia.engUniversidade Federal de PernambucoPrograma de Pos Graduacao em Ciencia da ComputacaoUFPEBrasilAttribution-NonCommercial-NoDerivs 3.0 Brazilhttp://creativecommons.org/licenses/by-nc-nd/3.0/br/info:eu-repo/semantics/openAccessEngenharia de softwareLinguagem de programação (Computadores) SemânticaAlgebraic laws for object oriented programming with referencesinfo:eu-repo/semantics/publishedVersioninfo:eu-repo/semantics/doctoralThesisdoutoradoreponame:Repositório Institucional da UFPEinstname:Universidade Federal de Pernambuco (UFPE)instacron:UFPETHUMBNAILGIovannyTesis.pdf.jpgGIovannyTesis.pdf.jpgGenerated Thumbnailimage/jpeg1276https://repositorio.ufpe.br/bitstream/123456789/14930/5/GIovannyTesis.pdf.jpg003bb91a4a9e7498ae6c6553c74c9979MD55ORIGINALGIovannyTesis.pdfGIovannyTesis.pdfapplication/pdf1126817https://repositorio.ufpe.br/bitstream/123456789/14930/1/GIovannyTesis.pdf54a975f083d8ea416057bffa468c281cMD51CC-LICENSElicense_rdflicense_rdfapplication/rdf+xml; charset=utf-81232https://repositorio.ufpe.br/bitstream/123456789/14930/2/license_rdf66e71c371cc565284e70f40736c94386MD52LICENSElicense.txtlicense.txttext/plain; charset=utf-82311https://repositorio.ufpe.br/bitstream/123456789/14930/3/license.txt4b8a02c7f2818eaf00dcf2260dd5eb08MD53TEXTGIovannyTesis.pdf.txtGIovannyTesis.pdf.txtExtracted texttext/plain353528https://repositorio.ufpe.br/bitstream/123456789/14930/4/GIovannyTesis.pdf.txt979d87959e26be8b14883d704bd048e3MD54123456789/149302019-10-25 21:24:15.961oai:repositorio.ufpe.br:123456789/14930TGljZW7Dp2EgZGUgRGlzdHJpYnVpw6fDo28gTsOjbyBFeGNsdXNpdmEKClRvZG8gZGVwb3NpdGFudGUgZGUgbWF0ZXJpYWwgbm8gUmVwb3NpdMOzcmlvIEluc3RpdHVjaW9uYWwgKFJJKSBkZXZlIGNvbmNlZGVyLCDDoCBVbml2ZXJzaWRhZGUgRmVkZXJhbCBkZSBQZXJuYW1idWNvIChVRlBFKSwgdW1hIExpY2Vuw6dhIGRlIERpc3RyaWJ1acOnw6NvIE7Do28gRXhjbHVzaXZhIHBhcmEgb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aWFsIGN1am9zIGRpcmVpdG9zIHPDo28gZGUgdGVyY2Vpcm9zIGVzdMOhIGNsYXJhbWVudGUgaWRlbnRpZmljYWRvIGUgcmVjb25oZWNpZG8gbm8gdGV4dG8gb3UgY29udGXDumRvIGRvIGRvY3VtZW50byBlbnRyZWd1ZTsKZykgU2UgbyBkb2N1bWVudG8gZW50cmVndWUgw6kgYmFzZWFkbyBlbSB0cmFiYWxobyBmaW5hbmNpYWRvIG91IGFwb2lhZG8gcG9yIG91dHJhIGluc3RpdHVpw6fDo28gcXVlIG7Do28gYSBVRlBFLMKgZGVjbGFyYSBxdWUgY3VtcHJpdSBxdWFpc3F1ZXIgb2JyaWdhw6fDtWVzIGV4aWdpZGFzIHBlbG8gcmVzcGVjdGl2byBjb250cmF0byBvdSBhY29yZG8uCgpBIFVGUEUgaWRlbnRpZmljYXLDoSBjbGFyYW1lbnRlIG8ocykgbm9tZShzKSBkbyhzKSBhdXRvciAoZXMpIGRvcyBkaXJlaXRvcyBkbyBkb2N1bWVudG8gZW50cmVndWUgZSBuw6NvIGZhcsOhIHF1YWxxdWVyIGFsdGVyYcOnw6NvLCBwYXJhIGFsw6ltIGRvIHByZXZpc3RvIG5hIGFsw61uZWEgYykuCg==Repositório InstitucionalPUBhttps://repositorio.ufpe.br/oai/requestattena@ufpe.bropendoar:22212019-10-26T00:24:15Repositório Institucional da UFPE - Universidade Federal de Pernambuco (UFPE)false
dc.title.pt_BR.fl_str_mv Algebraic laws for object oriented programming with references
title Algebraic laws for object oriented programming with references
spellingShingle Algebraic laws for object oriented programming with references
PALMA, Giovanny Fernando Lucero
Engenharia de software
Linguagem de programação (Computadores) Semântica
title_short Algebraic laws for object oriented programming with references
title_full Algebraic laws for object oriented programming with references
title_fullStr Algebraic laws for object oriented programming with references
title_full_unstemmed Algebraic laws for object oriented programming with references
title_sort Algebraic laws for object oriented programming with references
author PALMA, Giovanny Fernando Lucero
author_facet PALMA, Giovanny Fernando Lucero
author_role author
dc.contributor.authorLattes.pt_BR.fl_str_mv http://lattes.cnpq.br/3074373409452517
dc.contributor.advisorLattes.pt_BR.fl_str_mv http://lattes.cnpq.br/3977760354511853
dc.contributor.author.fl_str_mv PALMA, Giovanny Fernando Lucero
dc.contributor.advisor1.fl_str_mv SAMPAIO, Augusto Cezar Alves
dc.contributor.advisor-co1.fl_str_mv NAUMANN, David
contributor_str_mv SAMPAIO, Augusto Cezar Alves
NAUMANN, David
dc.subject.por.fl_str_mv Engenharia de software
Linguagem de programação (Computadores) Semântica
topic Engenharia de software
Linguagem de programação (Computadores) Semântica
description There are several approaches to defining a formal semantics of a programming language. The main established ones are operational, denotational and axiomatic semantics. The first two rely on defining an explicit model, whereas the latter one is based on postulating relevant properties of the language in terms of axioms. Particularly, in a purely algebraic approach the axioms take the form of conditional equations (typically denoted as programming laws) that relate the language constructs. Without requiring an explicit model, the advantage of the algebraic approach is incrementality: the language can be extended and the laws tend to remain valid, provided the new constructs do not interfere with the behaviour of the original ones. Algebraic laws have been proposed to uncover interesting properties of several programming paradigms: imperative, logic, functional, concurrent and object oriented, among others. As for the other paradigms, there is a comprehensive set of laws for object oriented constructs, but these are restricted to a language with copy semantics; some laws to deal with references have also been proposed, but these are tailored to specific applications, and are far from being comprehensive. In general, formal reasoning with references has been a persistent challenge and algebraic approaches usually have avoided including them in programming languages. We propose a set of algebraic laws for reasoning about object oriented programs with a reference semantics. First we focus on sequential imperative programs that use object references like in Java. The theory is based on previous work by adding laws to cope with object references. The incrementality of the algebraic method is fundamental; with a few exceptions, existing laws for copy semantics are entirely reused, as they are not affected by the reference semantics. As an evidence of relative completeness, we show that any program can be transformed, through the use of our laws, to a normal form which simulates it using an explicit heap with copy semantics. Soundness is addressed by illustrating how some of the laws can be proved in a relational semantics for a subset of the language. We extend the theory of imperative programs for an object oriented language with the usual constructs: additional imperative commands with references, classes with inheritance and subtyping, visibility control, dynamic binding, type tests and downcasts. Algebraic laws are proposed for these new constructs. In order to illustrate the expressiveness of the laws for the object oriented language, we characterize and prove a set of refactorings from Fowler’s catalog. These are contrasted with previous work that formalized refactorings in the context of copy semantics.
publishDate 2015
dc.date.issued.fl_str_mv 2015-03-16
dc.date.accessioned.fl_str_mv 2016-01-19T17:04:34Z
dc.date.available.fl_str_mv 2016-01-19T17:04:34Z
dc.type.status.fl_str_mv info:eu-repo/semantics/publishedVersion
dc.type.driver.fl_str_mv info:eu-repo/semantics/doctoralThesis
format doctoralThesis
status_str publishedVersion
dc.identifier.uri.fl_str_mv https://repositorio.ufpe.br/handle/123456789/14930
url https://repositorio.ufpe.br/handle/123456789/14930
dc.language.iso.fl_str_mv eng
language eng
dc.rights.driver.fl_str_mv Attribution-NonCommercial-NoDerivs 3.0 Brazil
http://creativecommons.org/licenses/by-nc-nd/3.0/br/
info:eu-repo/semantics/openAccess
rights_invalid_str_mv Attribution-NonCommercial-NoDerivs 3.0 Brazil
http://creativecommons.org/licenses/by-nc-nd/3.0/br/
eu_rights_str_mv openAccess
dc.publisher.none.fl_str_mv Universidade Federal de Pernambuco
dc.publisher.program.fl_str_mv Programa de Pos Graduacao em Ciencia da Computacao
dc.publisher.initials.fl_str_mv UFPE
dc.publisher.country.fl_str_mv Brasil
publisher.none.fl_str_mv Universidade Federal de Pernambuco
dc.source.none.fl_str_mv reponame:Repositório Institucional da UFPE
instname:Universidade Federal de Pernambuco (UFPE)
instacron:UFPE
instname_str Universidade Federal de Pernambuco (UFPE)
instacron_str UFPE
institution UFPE
reponame_str Repositório Institucional da UFPE
collection Repositório Institucional da UFPE
bitstream.url.fl_str_mv https://repositorio.ufpe.br/bitstream/123456789/14930/5/GIovannyTesis.pdf.jpg
https://repositorio.ufpe.br/bitstream/123456789/14930/1/GIovannyTesis.pdf
https://repositorio.ufpe.br/bitstream/123456789/14930/2/license_rdf
https://repositorio.ufpe.br/bitstream/123456789/14930/3/license.txt
https://repositorio.ufpe.br/bitstream/123456789/14930/4/GIovannyTesis.pdf.txt
bitstream.checksum.fl_str_mv 003bb91a4a9e7498ae6c6553c74c9979
54a975f083d8ea416057bffa468c281c
66e71c371cc565284e70f40736c94386
4b8a02c7f2818eaf00dcf2260dd5eb08
979d87959e26be8b14883d704bd048e3
bitstream.checksumAlgorithm.fl_str_mv MD5
MD5
MD5
MD5
MD5
repository.name.fl_str_mv Repositório Institucional da UFPE - Universidade Federal de Pernambuco (UFPE)
repository.mail.fl_str_mv attena@ufpe.br
_version_ 1802310611029196800