4,406 research outputs found
A flexible model for dynamic linking in Java and C#
Dynamic linking supports flexible code deployment, allowing partially linked code to link further code on the fly, as needed.
Thus, end-users enjoy the advantage of automatically receiving any updates, without any need for any explicit actions on their side,
such as re-compilation, or re-linking. On the down side, two executions of a program may link in different versions of code, which
in some cases causes subtle errors, and may mystify end-users.
Dynamic linking in Java and C# are similar: the same linking phases are involved, soundness is based on similar ideas, and
executions which do not throw linking errors give the same result. They are, however, not identical: the linking phases are combined
differently, and take place in different order. Consequently, linking errors may be detected at different times by Java and C# runtime
systems.
We develop a non-deterministic model, which describes the behaviour of both Java and C# program executions. The nondeterminism
allows us to describe the design space, to distill the similarities between the two languages, and to use one proof of
soundness for both. We also prove that all execution strategies are equivalent with respect to terminating executions that do not
throw link errors: they give the same results
Decision Procedure for Entailment of Symbolic Heaps with Arrays
This paper gives a decision procedure for the validity of en- tailment of
symbolic heaps in separation logic with Presburger arithmetic and arrays. The
correctness of the decision procedure is proved under the condition that sizes
of arrays in the succedent are not existentially bound. This condition is
independent of the condition proposed by the CADE-2017 paper by Brotherston et
al, namely, one of them does not imply the other. For improving efficiency of
the decision procedure, some techniques are also presented. The main idea of
the decision procedure is a novel translation of an entailment of symbolic
heaps into a formula in Presburger arithmetic, and to combine it with an
external SMT solver. This paper also gives experimental results by an
implementation, which shows that the decision procedure works efficiently
enough to use
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
COSMICAH 2005: workshop on verification of COncurrent Systems with dynaMIC Allocated Heaps (a Satellite event of ICALP 2005) - Informal Proceedings
Lisboa Portugal, 10 July 200
Featherweight VeriFast
VeriFast is a leading research prototype tool for the sound modular
verification of safety and correctness properties of single-threaded and
multithreaded C and Java programs. It has been used as a vehicle for
exploration and validation of novel program verification techniques and for
industrial case studies; it has served well at a number of program verification
competitions; and it has been used for teaching by multiple teachers
independent of the authors. However, until now, while VeriFast's operation has
been described informally in a number of publications, and specific
verification techniques have been formalized, a clear and precise exposition of
how VeriFast works has not yet appeared. In this article we present for the
first time a formal definition and soundness proof of a core subset of the
VeriFast program verification approach. The exposition aims to be both
accessible and rigorous: the text is based on lecture notes for a graduate
course on program verification, and it is backed by an executable
machine-readable definition and machine-checked soundness proof in Coq
Specifying and Verifying Concurrent Algorithms with Histories and Subjectivity
We present a lightweight approach to Hoare-style specifications for
fine-grained concurrency, based on a notion of time-stamped histories that
abstractly capture atomic changes in the program state. Our key observation is
that histories form a partial commutative monoid, a structure fundamental for
representation of concurrent resources. This insight provides us with a
unifying mechanism that allows us to treat histories just like heaps in
separation logic. For example, both are subject to the same assertion logic and
inference rules (e.g., the frame rule). Moreover, the notion of ownership
transfer, which usually applies to heaps, has an equivalent in histories. It
can be used to formally represent helping---an important design pattern for
concurrent algorithms whereby one thread can execute code on behalf of another.
Specifications in terms of histories naturally abstract granularity, in the
sense that sophisticated fine-grained algorithms can be given the same
specifications as their simplified coarse-grained counterparts, making them
equally convenient for client-side reasoning. We illustrate our approach on a
number of examples and validate all of them in Coq.Comment: 17 page
- ā¦