1,652 research outputs found
Continuation-Passing C: compiling threads to events through continuations
In this paper, we introduce Continuation Passing C (CPC), a programming
language for concurrent systems in which native and cooperative threads are
unified and presented to the programmer as a single abstraction. The CPC
compiler uses a compilation technique, based on the CPS transform, that yields
efficient code and an extremely lightweight representation for contexts. We
provide a proof of the correctness of our compilation scheme. We show in
particular that lambda-lifting, a common compilation technique for functional
languages, is also correct in an imperative language like C, under some
conditions enforced by the CPC compiler. The current CPC compiler is mature
enough to write substantial programs such as Hekate, a highly concurrent
BitTorrent seeder. Our benchmark results show that CPC is as efficient, while
using significantly less space, as the most efficient thread libraries
available.Comment: Higher-Order and Symbolic Computation (2012). arXiv admin note:
substantial text overlap with arXiv:1202.324
A Formal, Resource Consumption-Preserving Translation of Actors to Haskell
We present a formal translation of an actor-based language with cooperative
scheduling to the functional language Haskell. The translation is proven
correct with respect to a formal semantics of the source language and a
high-level operational semantics of the target, i.e. a subset of Haskell. The
main correctness theorem is expressed in terms of a simulation relation between
the operational semantics of actor programs and their translation. This allows
us to then prove that the resource consumption is preserved over this
translation, as we establish an equivalence of the cost of the original and
Haskell-translated execution traces.Comment: Pre-proceedings paper presented at the 26th International Symposium
on Logic-Based Program Synthesis and Transformation (LOPSTR 2016), Edinburgh,
Scotland UK, 6-8 September 2016 (arXiv:1608.02534
On Fault Diagnosis of random Free-choice Petri Nets
This paper presents an on-line diagnosis algorithm for Petri nets where a priori probabilistic knowledge about the plant operation is available. We follow the method developed by Benveniste, Fabre, and Haar to assign probabilities to configurations in a net unfolding thus avoiding the need for randomizing all concurrent interleavings of transitions. We consider different settings of the diagnosis problem, including estimating the likelihood that a fault may have happened prior to the most recent observed event, the likelihood that a fault will have happened prior to the next observed event. A novel problem formulation treated in this paper considers deterministic diagnosis of faults that occurred prior to the most recent observed event, and simultaneous calculation of the likelihood that a fault will occur prior to the next observed event
Automatic Verification of Erlang-Style Concurrency
This paper presents an approach to verify safety properties of Erlang-style,
higher-order concurrent programs automatically. Inspired by Core Erlang, we
introduce Lambda-Actor, a prototypical functional language with
pattern-matching algebraic data types, augmented with process creation and
asynchronous message-passing primitives. We formalise an abstract model of
Lambda-Actor programs called Actor Communicating System (ACS) which has a
natural interpretation as a vector addition system, for which some verification
problems are decidable. We give a parametric abstract interpretation framework
for Lambda-Actor and use it to build a polytime computable, flow-based,
abstract semantics of Lambda-Actor programs, which we then use to bootstrap the
ACS construction, thus deriving a more accurate abstract model of the input
program. We have constructed Soter, a tool implementation of the verification
method, thereby obtaining the first fully-automatic, infinite-state model
checker for a core fragment of Erlang. We find that in practice our abstraction
technique is accurate enough to verify an interesting range of safety
properties. Though the ACS coverability problem is Expspace-complete, Soter can
analyse these verification problems surprisingly efficiently.Comment: 12 pages plus appendix, 4 figures, 1 table. The tool is available at
http://mjolnir.cs.ox.ac.uk/soter
Actors that Unify Threads and Events
There is an impedance mismatch between message-passing concurrency and virtual machines, such as the JVM. VMs usually map their threads to heavyweight OS processes. Without a lightweight process abstraction, users are often forced to write parts of concurrent applications in an event-driven style which obscures control flow, and increases the burden on the programmer. In this paper we show how thread-based and event-based programming can be unified under a single actor abstraction. Using advanced abstraction mechanisms of the Scala programming language, we implemented our approach on unmodified JVMs. Our programming model integrates well with the threading model of the underlying VM
- …