675 research outputs found
A type system for components
In modern distributed systems, dynamic reconfiguration, i.e.,
changing at runtime the communication pattern of a program, is chal-
lenging. Generally, it is difficult to guarantee that such modifications will
not disrupt ongoing computations. In a previous paper, a solution to this
problem was proposed by extending the object-oriented language ABS
with a component model allowing the programmer to: i) perform up-
dates on objects by means of communication ports and their rebinding;
and ii) precisely specify when such updates can safely occur in an object
by means of critical sections. However, improper rebind operations could
still occur and lead to runtime errors. The present paper introduces a
type system for this component model that extends the ABS type system
with the notion of ports and a precise analysis that statically enforces
that no object will attempt illegal rebinding
Functional Ownership through Fractional Uniqueness
Ownership and borrowing systems, designed to enforce safe memory management
without the need for garbage collection, have been brought to the fore by the
Rust programming language. Rust also aims to bring some guarantees offered by
functional programming into the realm of performant systems code, but the type
system is largely separate from the ownership model, with type and borrow
checking happening in separate compilation phases. Recent models such as
RustBelt and Oxide aim to formalise Rust in depth, but there is less focus on
integrating the basic ideas into more traditional type systems. An approach
designed to expose an essential core for ownership and borrowing would open the
door for functional languages to borrow concepts found in Rust and other
ownership frameworks, so that more programmers can enjoy their benefits.
One strategy for managing memory in a functional setting is through
uniqueness types, but these offer a coarse-grained view: either a value has
exactly one reference, and can be mutated safely, or it cannot, since other
references may exist. Recent work demonstrates that linear and uniqueness types
can be combined in a single system to offer restrictions on program behaviour
and guarantees about memory usage. We develop this connection further, showing
that just as graded type systems like those of Granule and Idris generalise
linearity, Rust's ownership model arises as a graded generalisation of
uniqueness. We combine fractional permissions with grading to give the first
account of ownership and borrowing that smoothly integrates into a standard
type system alongside linearity and graded types, and extend Granule
accordingly with these ideas.Comment: 23 pages + references. In submissio
Structural Analysis: Shape Information via Points-To Computation
This paper introduces a new hybrid memory analysis, Structural Analysis,
which combines an expressive shape analysis style abstract domain with
efficient and simple points-to style transfer functions. Using data from
empirical studies on the runtime heap structures and the programmatic idioms
used in modern object-oriented languages we construct a heap analysis with the
following characteristics: (1) it can express a rich set of structural, shape,
and sharing properties which are not provided by a classic points-to analysis
and that are useful for optimization and error detection applications (2) it
uses efficient, weakly-updating, set-based transfer functions which enable the
analysis to be more robust and scalable than a shape analysis and (3) it can be
used as the basis for a scalable interprocedural analysis that produces precise
results in practice.
The analysis has been implemented for .Net bytecode and using this
implementation we evaluate both the runtime cost and the precision of the
results on a number of well known benchmarks and real world programs. Our
experimental evaluations show that the domain defined in this paper is capable
of precisely expressing the majority of the connectivity, shape, and sharing
properties that occur in practice and, despite the use of weak updates, the
static analysis is able to precisely approximate the ideal results. The
analysis is capable of analyzing large real-world programs (over 30K bytecodes)
in less than 65 seconds and using less than 130MB of memory. In summary this
work presents a new type of memory analysis that advances the state of the art
with respect to expressive power, precision, and scalability and represents a
new area of study on the relationships between and combination of concepts from
shape and points-to analyses
Permission-Based Separation Logic for Multithreaded Java Programs
This paper presents a program logic for reasoning about multithreaded
Java-like programs with dynamic thread creation, thread joining and reentrant
object monitors. The logic is based on concurrent separation logic. It is the
first detailed adaptation of concurrent separation logic to a multithreaded
Java-like language. The program logic associates a unique static access
permission with each heap location, ensuring exclusive write accesses and
ruling out data races. Concurrent reads are supported through fractional
permissions. Permissions can be transferred between threads upon thread
starting, thread joining, initial monitor entrancies and final monitor exits.
In order to distinguish between initial monitor entrancies and monitor
reentrancies, auxiliary variables keep track of multisets of currently held
monitors. Data abstraction and behavioral subtyping are facilitated through
abstract predicates, which are also used to represent monitor invariants,
preconditions for thread starting and postconditions for thread joining.
Value-parametrized types allow to conveniently capture common strong global
invariants, like static object ownership relations. The program logic is
presented for a model language with Java-like classes and interfaces, the
soundness of the program logic is proven, and a number of illustrative examples
are presented
Borrowable Fractional Ownership Types for Verification
Automated verification of functional correctness of imperative programs with
references (a.k.a. pointers) is challenging because of reference aliasing.
Ownership types have recently been applied to address this issue, but the
existing approaches were limited in that they are effective only for a class of
programs whose reference usage follows a certain style. To relax the
limitation, we combine the approaches of ConSORT (based on fractional
ownership) and RustHorn (based on borrowable ownership), two recent approaches
to automated program verification based on ownership types, and propose the
notion of borrowable fractional ownership types. We formalize a new type system
based on the borrowable fractional ownership types and show how we can use it
to automatically reduce the program verification problem for imperative
programs with references to that for functional programs without references. We
also show the soundness of our type system and the translation, and conduct
experiments to confirm the effectiveness of our approach.Comment: An extended version of the paper to appear in Proceedings of VMCAI
202
- …