Network


Latest external collaboration on country level. Dive into details by clicking on the dots.

Hotspot


Dive into the research topics where Marco Servetto is active.

Publication


Featured researches published by Marco Servetto.


european conference on object oriented programming | 2013

The billion-dollar fix: safe modular circular initialisation

Marco Servetto; Julian Mackay; Alex Potanin; James Noble

Programmers often need to initialise circular structures of objects. Ini- tialisation should be safe (so that programs can never suffer null pointer exceptions or otherwise observe uninitialised values) and modular (so that each part of the circular structure can be written and compiled separately). Unfortunately, existing languages do not support modular circular initialisation: programmers in practical languages resort to Tony Hoares Billion Dollar Mistake: initialising variables with nulls, and then hoping to fix them up afterward. While recent research lan- guages have offered some solutions, none fully support safe modular circular initialisation. We present placeholders, a straightforward extension to object-oriented lan- guages that describes circular structures simply, directly, and modularly. In typed languages, placeholders can be described by placeholder types that ensure place- holders are used safely. We define an operational semantics for placeholders, a type system for placeholder types, and prove soundness. Incorporating placeholders into object-oriented languages should make programs simultaneously simpler to write, and easier to write correctly.


Electronic Notes in Theoretical Computer Science | 2016

An Imperative Pure Calculus

Andrea Capriccioli; Marco Servetto; Elena Zucca

We present a simple calculus where imperative features are modeled by just rewriting source code terms, rather than by modifying an auxiliary structure which mimics physical memory. Formally, this is achieved by the block construct, introducing local variable declarations, which also plays the role of store when such declarations have been evaluated. In this way, we obtain a language semantics which is more abstract, and directly represents at the syntactic level constraints on aliasing, allowing simpler reasoning about related properties. We illustrate this possibility by a simple extension of the standard type system which assigns a capsule tag to expressions that will reduce to (values representing) isolated portions of store.


asian symposium on programming languages and systems | 2015

Aliasing Control in an Imperative Pure Calculus

Marco Servetto; Elena Zucca

We present an imperative object calculus where types are annotated with two modifiers for aliasing control. The ({mathtt{lent}}) modifier prevents objects to be aliased, whereas the ({mathtt{capsule}}) modifier characterizes expressions that will reduce to isolated portions of store. There are two key novelties w.r.t. similar proposals. First, the expressivity of the type system is greatly enhanced by promotion and swapping rules. The former recognizes as ({mathtt{capsule}}) an expression which only uses external references as ({mathtt{lent}}). The latter allows a ({mathtt{lent}}) reference to be freely aliased, if all the other references are regarded as ({mathtt{lent}}). Second, execution is modeled in a pure setting, where it is simpler to understand alias control. That is, properties of modifiers can be directly expressed on source terms, rather than as invariants on an auxiliary structure which mimics physical memory. Formally, this is achieved by the block construct, introducing local variable declarations, which play the role of store when evaluated.


formal techniques for java-like programs | 2013

True small-step reduction for imperative object oriented languages

Marco Servetto; Lindsay Groves

Traditionally, formal semantic models of Java-like languages use an explicit model of the store which mimics pointers and ram. These low level models hamper understanding of the semantics, and development of proofs about ownerships and other encapsulation properties, since the real (graph) structure of the data is obscured by the encoding. Such models are also inadequate for didactic purposes since they rely on run-time structures that do not exist in the source program --- in order to understand the meaning of an expression in the middle of the execution one is required to visualize the memory structure which is hard to relate to the abstract program state.n We present a semantic model for Java-like languages where data is encoded as part of the program rather than as a separate resource. This means that execution can be modelled more simply by just rewriting source code terms, as in semantic models for functional programs. The major challenges that need to be addressed are aliasing, circular object graphs, exceptions and multiple return methods. In this initial proposal we use local variable declarations in order to tackle aliasing and circular object graphs.


symposium on applied computing | 2017

A type and effect system for sharing

Paola Giannini; Marco Servetto; Elena Zucca

We outline a type and effect system which infers sharing possibly introduced by the evaluation of an expression. In this way, expressions get very expressive types, which generalize notions enforced in literature by type modifiers. Sharing is directly represented at the syntactic level as a relation among free variables, thanks to the fact that the underlying calculus is pure. That is, imperative features are modeled by just rewriting source code terms.


formal techniques for java-like programs | 2017

Tracing sharing in an imperative pure calculus: extended abstract

Paola Giannini; Marco Servetto; Elena Zucca

We introduce a type and effect system, for an imperative object calculus, which infers sharing possibly introduced by the evaluation of an expression. Sharing is directly represented at the syntactic level as a relation among free variables, thanks to the fact that the calculus is pure. That is, imperative features are modeled by just rewriting source code terms. We consider both standard variables and affine variables, which can occur at most once in their scope. The latter are used as temporary references, to move a capsule (an isolated portion of store) to another location in the store. The sharing effects inferred by the type system are very expressive, and generalize notions introduced in literature by type modifiers.


acm symposium on applied computing | 2016

Initialize-and-catch

Paola Giannini; Marco Servetto; Elena Zucca

In this extended abstract we propose to enhance declaration of local variables with a catching mechanism. This provides a more powerful and methodologically more appropriate mechanism of catching exceptions than the usual try/catch construct. The advantages are highlighted by presenting some paradigmatic examples. The proposal is formalized as an extension of Featherweight Java (FJ) with a type system which can be proved to be sound.


partial evaluation and semantic-based program manipulation | 2013

A meta-circular language for active libraries

Marco Servetto; Elena Zucca

We present a new Java-like language design coupling disciplined meta-programming features with a composition language. That is, programmers can write meta expressions that combine class definitions, on top of a small set of composition operators, inspired by the seminal Brachas Jigsaw framework. Moreover, such operators are deep, that is, they allow manipulation (e.g., renaming or duplication) of a nested class at any level of depth.n This provides an effective language support for active libraries: namely, a (library) class can provide a method returning a customized version of a class, depending, e.g., on the execution platform. Since a class can contain nested classes, a whole library can be generated in this way. That is, deep operators allows the programmer to better exploit meta-programming capabilities, leading to a meta-programming in the large style.n We adopt a mixed typechecking technique, which provides a good compromise between meta-programming systems with extreme expressiveness and no static type checking, and those with strong type system and only limited meta-programming capability. In particular, our technique ensures an important property, called meta-level soundness, stating that typing errors never originate from already compiled (meta-)code, that is, programmers can safely use (active) libraries.


acm symposium on applied computing | 2018

A type and effect system for uniqueness and immutability

Paola Giannini; Marco Servetto; Elena Zucca

We present a type and effect system for expressing uniqueness and immutability properties in imperative languages. The distinguishing feature is that typechecking infers sharing possibly introduced by the evaluation of an expression. In this way, expressions get very expressive types: notably, uniqueness and immutability properties can be detected from the fact that no sharing is introduced with the final result of the expression. Sharing is directly represented at the syntactic level as a relation among free variables, thanks to the fact that the underlying calculus is pure. That is, imperative features are modeled by just rewriting source code terms.


formal techniques for java-like programs | 2016

Coupling catch clauses with local declarations

Paola Giannini; Marco Servetto; Elena Zucca

We propose an alternative to the usual try-catch construct, where catch clauses are coupled with the declaration of a local variable, rather than with an arbitrary expression. That is, in case initialization of the local variable fails, they provide an alternative computation which does not depend on such variable. This alternative mechanism subsumes the standard one and allows a more natural and functional programming style. We illustrate such advantages by some paradigmatic examples. The proposal is formalized as an extension of Featherweight Java (FJ) with a type system which can be proved to be sound.

Collaboration


Dive into the Marco Servetto's collaboration.

Top Co-Authors

Avatar
Top Co-Authors

Avatar
Top Co-Authors

Avatar

Alex Potanin

Victoria University of Wellington

View shared research outputs
Top Co-Authors

Avatar

James Noble

Victoria University of Wellington

View shared research outputs
Top Co-Authors

Avatar

Julian Mackay

Victoria University of Wellington

View shared research outputs
Top Co-Authors

Avatar

Lindsay Groves

Victoria University of Wellington

View shared research outputs
Top Co-Authors

Avatar

David J. Pearce

Victoria University of Wellington

View shared research outputs
Top Co-Authors

Avatar
Top Co-Authors

Avatar
Top Co-Authors

Avatar

Yanlin Wang

University of Hong Kong

View shared research outputs
Researchain Logo
Decentralizing Knowledge