vix.ing · top · new · best · stats · spec

Lucretia — intersection type polymorphism for scripting languages

2015/03/15 by Marcin Benke, Viviana Bono, Aleksy Schubert
Computer Science · #Computer science #Formal Methods in Verification #Intersection (aeronautics) #Logic, programming, and type systems #Programming language #Scripting language #Security and Verification in Computing #cs.LO #cs.PL

paper · pdf · doi:10.4204/eptcs.177.6

published as EPTCS 177, 2015, pp. 65-78 · In Proceedings ITRS 2014, arXiv:1503.04377

openalex publication_date 2015/03/15 · arxiv created 2015/03/17 · arxiv updated 2015/03/18 · openalex created_date 2025/10/10 · openalex updated_date 2026/08/05

Abstract

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.

Citations