47 research outputs found
Answer Refinement Modification: Refinement Type System for Algebraic Effects and Handlers
Algebraic effects and handlers are a mechanism to structure programs with
computational effects in a modular way. They are recently gaining popularity
and being adopted in practical languages, such as OCaml. Meanwhile, there has
been substantial progress in program verification via refinement type systems.
However, thus far, there has not been a satisfactory refinement type system for
algebraic effects and handlers. In this paper, we fill the void by proposing a
novel refinement type system for algebraic effects and handlers. The
expressivity and usefulness of algebraic effects and handlers come from their
ability to manipulate delimited continuations, but delimited continuations also
complicate programs' control flow and make their verification harder. To
address the complexity, we introduce a novel concept that we call answer
refinement modification (ARM for short), which allows the refinement type
system to precisely track what effects occur and in what order when a program
is executed, and reflect the information as modifications to the refinements in
the types of delimited continuations. We formalize our type system that
supports ARM (as well as answer type modification) and prove its soundness.
Additionally, as a proof of concept, we have implemented a corresponding type
checking and inference algorithm for a subset of OCaml 5, and evaluated it on a
number of benchmark programs. The evaluation demonstrates that ARM is
conceptually simple and practically useful. Finally, a natural alternative to
directly reasoning about a program with delimited continuations is to apply a
continuation passing style (CPS) transformation that transforms the program to
a pure program. We investigate this alternative, and show that the approach is
indeed possible by proposing a novel CPS transformation for algebraic effects
and handlers that enjoys bidirectional (refinement-)type-preservation.Comment: 66 page
Choiceless Polynomial Time with Witnessed Symmetric Choice
We extend Choiceless Polynomial Time (CPT), the currently only remaining
promising candidate in the quest for a logic capturing PTime, so that this
extended logic has the following property: for every class of structures for
which isomorphism is definable, the logic automatically captures PTime.
For the construction of this logic we extend CPT by a witnessed symmetric
choice operator. This operator allows for choices from definable orbits. But,
to ensure polynomial time evaluation, automorphisms have to be provided to
certify that the choice set is indeed an orbit.
We argue that, in this logic, definable isomorphism implies definable
canonization. Thereby, our construction removes the non-trivial step of
extending isomorphism definability results to canonization. This step was a
part of proofs that show that CPT or other logics capture PTime on a particular
class of structures. The step typically required substantial extra effort.Comment: 65 pages. Full version of a paper to appear at LICS 22. v2: corrected
typos and small mistake
CHC-COMP 2022: Competition Report
CHC-COMP 2022 is the fifth edition of the competition of solvers for
Constrained Horn Clauses. The competition was run in March 2022; the results
were presented at the 9th Workshop on Horn Clauses for Verification and
Synthesis held in Munich, Germany, on April 3, 2022. This edition featured six
solvers, and eight tracks consisting of sets of linear and nonlinear clauses
with constraints over linear integer arithmetic, linear real arithmetic,
arrays, and algebraic data types. This report provides an overview of the
organization behind the competition runs: it includes the technical details of
the competition setup as well as presenting the results of the 2022 edition.Comment: In Proceedings HCVS/VPT 2022, arXiv:2211.10675. arXiv admin note:
text overlap with arXiv:2109.04635, arXiv:2008.02939 by other author
OptiRica: Towards an Efficient Optimizing Horn Solver
This paper describes an ongoing effort to develop an optimizing version of
the Eldarica Horn solver. The work starts from the observation that many kinds
of optimization problems, and in particular the MaxSAT/SMT problem, can be seen
as search problems on lattices. The paper presents a Scala library providing a
domain-specific language (DSL) to uniformly model optimization problems of this
kind, by defining, manipulating, and systematically exploring lattices with
associated objective functions. The framework can be instantiated to obtain an
optimizing Horn solver. As an illustration, the application of an optimizing
solver for repairing software-defined networks is described.Comment: In Proceedings HCVS/VPT 2022, arXiv:2211.1067
A Sorted Datalog Hammer for Supervisor Verification Conditions Modulo Simple Linear Arithmetic
In a previous paper, we have shown that clause sets belonging to the HornBernays-Sch\"onfinkel fragment over simple linear real arithmetic (HBS(SLR))can be translated into HBS clause sets over a finite set of first-orderconstants. The translation preserves validity and satisfiability and it isstill applicable if we extend our input with positive universally orexistentially quantified verification conditions (conjectures). We call thistranslation a Datalog hammer. The combination of its implementation inSPASS-SPL with the Datalog reasoner VLog establishes an effective way ofdeciding verification conditions in the Horn fragment. We verify supervisorcode for two examples: a lane change assistant in a car and an electroniccontrol unit of a supercharged combustion engine. In this paper, we improve ourDatalog hammer in several ways: we generalize it to mixed real-integerarithmetic and finite first-order sorts; we extend the class of acceptableinequalities beyond variable bounds and positively grounded inequalities; andwe significantly reduce the size of the hammer output by a soft typingdiscipline. We call the result the sorted Datalog hammer. It not only allows usto handle more complex supervisor code and to model already consideredsupervisor code more concisely, but it also improves our performance on realworld benchmark examples. Finally, we replace the before file-based interfacebetween SPASS-SPL and VLog by a close coupling resulting in a single executablebinary.<br
Programming Languages and Systems
This open access book constitutes the proceedings of the 29th European Symposium on Programming, ESOP 2020, which was planned to take place in Dublin, Ireland, in April 2020, as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2020. The actual ETAPS 2020 meeting was postponed due to the Corona pandemic. The papers deal with fundamental issues in the specification, design, analysis, and implementation of programming languages and systems
Formal Specification and Verification for Automated Production Systems
Complex industrial control software often drives safety- and mission-critical
systems, like automated production plants or control units embedded into devices in automotive systems. Such controllers have in common that they are reactive systems, i.e., that they periodically read sensor stimuli and cyclically execute the same program to produce actuator signals.
The correctness of software for automated production is rarely verified using
formal techniques. Although, due to the Industrial Revolution 4.0 (IR4.0), the
impact and importance of software have become an important role in industrial automation.
What is used instead in industrial practice today is testing and simulation,
where individual test cases are used to validate an automated production system.
Three reasons why formal methods are not popular are: (a) It is difficult to
adequately formulate the desired temporal properties. (b) There is a lack of
specification languages for reactive systems that are both sufficiently
expressive and comprehensible for practitioners. (c) Due to the lack of an
environment model the obtained results are imprecise. Nonetheless, formal
methods for automated production systems are well studied academically---mainly on the verification of safety properties via model checking.
In this doctoral thesis we present the concept of (1) generalized test tables
(GTTs), a new specification language for functional properties, and their
extension (2) relational test tables (RTTs) for relational properties. The
concept includes the syntactical notion, designed for the intuition of
engineers, and the semantics, which are based on game theory. We use RTTs for a novel confidential property on reactive systems, the provably forgetting of information. Moreover, for regression verification, an important relational
property, we are able to achieve performance improvements by (3) creating
a decomposing rule which splits large proofs into small sub-task. We implemented the verification procedures and evaluated them against realistic case studies, e.g., the Pick-and-Place-Unit from the Technical University of Munich.
The presented contribution follows the idea of lowering the obstacle of
verifying the dependability of reactive systems in general, and automated
production systems in particular for the engineer either by introducing a new
specification language (GTTs), by exploiting existing programs for the
specification (RTTs, regression verification), or by improving the verification
performance
A Datalog Hammer for Supervisor Verification Conditions Modulo Simple Linear Arithmetic
The Bernays-Sch\"onfinkel first-order logic fragment over simple linear real arithmetic constraints BS(SLR) is known to be decidable. We prove that BS(SLR) clause sets with both universally and existentially quantified verification conditions (conjectures) can be translated into BS(SLR) clause sets over a finite set of first-order constants. For the Horn case, we provide a Datalog hammer preserving validity and satisfiability. A toolchain from the BS(LRA) prover SPASS-SPL to the Datalog reasoner VLog establishes an effective way of deciding verification conditions in the Horn fragment. This is exemplified by the verification of supervisor code for a lane change assistant in a car and of an electronic control unit for a supercharged combustion engine