7 research outputs found
Incremental and Modular Context-sensitive Analysis
Context-sensitive global analysis of large code bases can be expensive, which
can make its use impractical during software development. However, there are
many situations in which modifications are small and isolated within a few
components, and it is desirable to reuse as much as possible previous analysis
results. This has been achieved to date through incremental global analysis
fixpoint algorithms that achieve cost reductions at fine levels of granularity,
such as changes in program lines. However, these fine-grained techniques are
not directly applicable to modular programs, nor are they designed to take
advantage of modular structures. This paper describes, implements, and
evaluates an algorithm that performs efficient context-sensitive analysis
incrementally on modular partitions of programs. The experimental results show
that the proposed modular algorithm shows significant improvements, in both
time and memory consumption, when compared to existing non-modular, fine-grain
incremental analysis techniques. Furthermore, thanks to the proposed
inter-modular propagation of analysis information, our algorithm also
outperforms traditional modular analysis even when analyzing from scratch.Comment: 56 pages, 27 figures. To be published in Theory and Practice of Logic
Programming. v3 corresponds to the extended version of the ICLP2018 Technical
Communication. v4 is the revised version submitted to Theory and Practice of
Logic Programming. v5 (this one) is the final author version to be published
in TPL
Multiparty Languages: The Choreographic and Multitier Cases (Pearl)
Choreographic languages aim to express multiparty communication protocols, by providing primitives that make interaction manifest. Multitier languages enable programming computation that spans across several tiers of a distributed system, by supporting primitives that allow computation to change the location of execution. Rooted into different theoretical underpinnings - respectively process calculi and lambda calculus - the two paradigms have been investigated independently by different research communities with little or no contact. As a result, the link between the two paradigms has remained hidden for long.
In this paper, we show that choreographic languages and multitier languages are surprisingly similar. We substantiate our claim by isolating the core abstractions that differentiate the two approaches and by providing algorithms that translate one into the other in a straightforward way. We believe that this work paves the way for joint research and cross-fertilisation among the two communities
Functional Choreographic Programming
Choreographic programming is an emerging programming paradigm for concurrent
and distributed systems, whereby developers write the communications that
should be enacted and then a distributed implementation is automatically
obtained by means of a compiler. Theories of choreographic programming
typically come with strong theoretical guarantees about the compilation
process, most notably: the generated implementations operationally correspond
to their source choreographies and are deadlock-free.
Currently, the most advanced incarnation of the paradigm is Choral, an
object-oriented choreographic programming language that targets Java. Choral
deviated significantly from known theories of choreographies, and introduced
the possibility of expressing higher-order choreographies (choreographies
parameterised over choreographies) that are fully distributed. As a
consequence, it is unclear if the usual guarantees of choreographies can still
hold in the more general setting of higher-order ones.
We introduce Chor{\lambda}, the first functional choreographic programming
language: it introduces a new formulation of the standard communication
primitive found in choreographies as a function, and it is based upon the
{\lambda}-calculus. Chor{\lambda} is the first theory that explains the core
ideas of higher-order choreographic programming (as in Choral). Bridging the
gap between practice and theory requires developing a new evaluation strategy
and typing discipline for {\lambda} terms that accounts for the distributed
nature of computation in choreographies. We illustrate the expressivity of
Chor{\lambda} with a series of examples, which include reconstructions of the
key examples from the original presentation of Choral. Our theory supports the
expected properties of choreographic programming and bridges the gap between
the communities of functional and choreographic programming
Choral: Object-Oriented Choreographic Programming
We present Choral, the first choreographic programming language based on
mainstream abstractions. The key idea in Choral is a new notion of data type,
which allows for expressing that data is distributed over different roles. We
use this idea to reconstruct the paradigm of choreographic programming through
object-oriented abstractions. Choreographies are classes, and instances of
choreographies are objects with states and behaviours implemented
collaboratively by roles.
Choral comes with a compiler that, given a choreography, generates an
implementation for each of its roles. These implementations are libraries in
pure Java, whose types are under the control of the Choral programmer.
Developers can then modularly compose these libraries in their own programs, in
order to participate correctly in choreographies. Choral is the first
incarnation of choreographic programming offering such modularity, which
finally connects more than a decade of research on the paradigm to practical
software development.
The integration of choreographic and object-oriented programming yields other
powerful advantages, where the features of one paradigm benefit the other in
ways that go beyond the sum of the parts. The high-level abstractions and
static checks from the world of choreographies can be used to write concurrent
and distributed object-oriented software more concisely and correctly. We
obtain a much more expressive choreographic language from object-oriented
abstractions than in previous work. For example, object passing makes Choral
the first higher-order choreographic programming language, whereby
choreographies can be parameterised over other choreographies without any need
for central coordination. Together with subtyping and generics, this allows
Choral to elegantly support user-defined communication mechanisms and
middleware
Multiparty Languages: The Choreographic and Multitier Cases
International audienceChoreographic languages aim to express multiparty communication protocols, by providing primitives that make interaction manifest. Multitier languages enable programming computation that spans across several tiers of a distributed system, by supporting primitives that allow computation to change the location of execution. Rooted into different theoretical underpinnings-respectively process calculi and lambda calculus-the two paradigms have been investigated independently by different research communities with little or no contact. As a result, the link between the two paradigms has remained hidden for long. In this paper, we show that choreographic languages and multitier languages are surprisingly similar. We substantiate our claim by isolating the core abstractions that differentiate the two approaches and by providing algorithms that translate one into the other in a straightforward way. We believe that this work paves the way for joint research and cross-fertilisation among the two communities
Bounded Quantifier Instantiation for Checking Inductive Invariants
We consider the problem of checking whether a proposed invariant
expressed in first-order logic with quantifier alternation is inductive, i.e.
preserved by a piece of code. While the problem is undecidable, modern SMT
solvers can sometimes solve it automatically. However, they employ powerful
quantifier instantiation methods that may diverge, especially when is
not preserved. A notable difficulty arises due to counterexamples of infinite
size.
This paper studies Bounded-Horizon instantiation, a natural method for
guaranteeing the termination of SMT solvers. The method bounds the depth of
terms used in the quantifier instantiation process. We show that this method is
surprisingly powerful for checking quantified invariants in uninterpreted
domains. Furthermore, by producing partial models it can help the user diagnose
the case when is not inductive, especially when the underlying reason
is the existence of infinite counterexamples.
Our main technical result is that Bounded-Horizon is at least as powerful as
instrumentation, which is a manual method to guarantee convergence of the
solver by modifying the program so that it admits a purely universal invariant.
We show that with a bound of 1 we can simulate a natural class of
instrumentations, without the need to modify the code and in a fully automatic
way. We also report on a prototype implementation on top of Z3, which we used
to verify several examples by Bounded-Horizon of bound 1