Lucretia — intersection type polymorphism for scripting languages
Autor: | Viviana Bono, Marcin Benke, Aleksy Schubert |
---|---|
Jazyk: | angličtina |
Rok vydání: | 2015 |
Předmět: |
FOS: Computer and information sciences
Structure (mathematical logic) Computer Science - Logic in Computer Science F.3.3 F.4.1 Computer Science - Programming Languages Programming language Computer science lcsh:Mathematics Expression (computer science) computer.software_genre Object (computer science) lcsh:QA1-939 lcsh:QA75.5-76.95 Logic in Computer Science (cs.LO) Precondition Intersection Scripting language Postcondition lcsh:Electronic computers. Computer science Aliasing (computing) computer Programming Languages (cs.PL) |
Zdroj: | Electronic Proceedings in Theoretical Computer Science, Vol 177, Iss Proc. ITRS 2014, Pp 65-78 (2015) ITRS |
ISSN: | 2075-2180 |
Popis: | Scripting code may present maintenance problems in the long run. There is, then, the call for methodologies that make it possible to control the properties of programs written in dynamic languages in an automatic fashion. We introduce Lucretia, a core language with an introspection primitive. Lucretia is equipped with a (retrofitted) static type system based on local updates of types that describe the structure of objects being used. In this way, we deal with one of the most dynamic features of scripting languages, that is, the runtime modification of object interfaces. Judgements in our systems have a Hoare-like shape, as they have a precondition and a postcondition part. Preconditions describe static approximations of the interfaces of visible objects before a certain expression has been executed and postconditions describe them after its execution. The field update operation complicates the issue of aliasing in the system. We cope with it by introducing intersection types in method signatures. Comment: In Proceedings ITRS 2014, arXiv:1503.04377 |
Databáze: | OpenAIRE |
Externí odkaz: |