2 research outputs found
Tracing sharing in an imperative pure calculus (Extended Version)
We introduce a type and effect system, for an imperative object calculus,
which infers "sharing" possibly introduced by the evaluation of an expression,
represented as an equivalence relation among its free variables. This direct
representation of sharing effects at the syntactic level allows us to express
in a natural way, and to generalize, widely-used notions in literature, notably
"uniqueness" and "borrowing". Moreover, the calculus is "pure" in the sense
that reduction is defined on language terms only, since they directly encode
store. The advantage of this non-standard execution model with respect to a
behaviourally equivalent standard model using a global auxiliary structure is
that reachability relations among references are partly encoded by scoping
Flexible recovery of uniqueness and immutability (Extended Version)
We present an imperative object calculus where types are annotated with
qualifiers for aliasing and mutation control. There are two key novelties with
respect to similar proposals. First, the type system is very expressive.
Notably, it adopts the "recovery" approach, that is, using the type context to
justify strengthening types, greatly improving its power by permitting to
recover uniqueness and immutability properties even in presence of other
references. This is achieved by rules which restrict the use of such other
references in the portion of code which is recovered. Second, execution is
modeled by a non standard operational model, where properties of qualifiers 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, when
evaluated, play the role of store