114 research outputs found
Embedding ASMs into state transition diagrams
This report relates Abstract State Machines (ASMs)
with a particular diagram type of UML, the
Sate Transition Diagrams (STDs).
The principles of translating ASMs
into STDs are discussed and demonstrated in four case studies
Verification of a Prolog compiler - first steps with KIV
This paper describes the first steps of the formal verification of
a Prolog compiler with the KIV system. We build upon the mathematical
definitions given by Boerger and Rosenzweig in [BR95]. There an
operational semantics of Prolog is defined using the formalism of
Evolving Algebras, and then transformed in several systematic steps
to the Warren Abstract Machine (WAM). To verify these transformation
steps formally in KIV, a translation of deterministic Evolving
Algebras to Dynamic Logic is defined, which may also be of general
interest. With this translation, correctness of transformation steps
becomes a problem of program equivalence in Dynamic Logic. We define
a proof technique for verifying such problems, which corresponds to
the use of proof maps in Evolving Algebras. Although the transfor-
mation steps are small enough for a mathematical analysis, this is not
sufficient for a successful formal correctness proof. Such a proof
requires to explicitly state a lot of facts, which were only impli-
citly assumed in the analysis.
We will argue that these assumptions cannot be guessed in a first
proof attempt, but have to be filled in incrementally. We report on
our experience with this `evolutionary\u27 verification process for the
first transformation step, and the support KIV offers to do such
incremental correctness proofs
Reasoning About Loops Using Vampire in KeY
We describe symbol elimination and consequence finding in the first-order theorem prover Vampire for automatic generation of quantified invariants, possibly with quantifier alternations, of loops with arrays. Unlike the previous implementation of symbol elimination in Vampire, our work is not limited to a specific programming language but provides a generic framework by relying on a simple guarded command representation of the input loop. We also improve the loop analysis part in Vampire by generating loop properties more easily handled by the saturation engine of Vampire. Our experiments show that, with our changes, the number of generated invariants is decreased, in some cases, by a factor of 20. We also provide a framework to use our approach to invariant generation in conjunction with pre- and post-conditions of program loops. We use the program specification to find relevant invariants as well as to verify the partial correctness of the loop. As a case study, we demonstrate how symbol elimination in Vampire can be used as an interface for realistic imperative languages, by integrating our tool in
the KeY verification system, thus allowing reasoning about loops in Java programs in a fully automated way, without any user guidance
Modeling and Security Verification of State-Based Smart Contracts
Smart contracts are programs that are stored on a blockchain ledger with code immutable after deployment. Thus, verifying the correct behavior of smart contracts before deployment is vital. This paper demonstrates how a security vulnerability verification in a casino smart contract can be transformed to non-blocking verification. To this end, the contract is first modeled as interacting extended finite state machines (EFSM), with one EFSM for each function. Modeling the security vulnerability as a condition in the EFSM system, non-blocking verification reveals the system to be blocking. Investigating the counterexample produced by the verification shows that a transfer that is refused by its receiver may block the casino so that all remaining funds are forever locked into the contract, thus revealing a severe vulnerability. It is then demonstrated how the same technique can show the absence of this vulnerability, by verifying that the EFSM model of an improved casino contract is indeed non-blocking. Copyright (C) 2022 The Authors
Who is to Blame? Runtime Verification of Distributed Objects with Active Monitors
In Proceedings VORTEX 2018, arXiv:1908.09302International audienceSince distributed software systems are ubiquitous, their correct functioning is crucially important. Static verification is possible in principle, but requires high expertise and effort which is not feasible in many eco-systems. Runtime verification can serve as a lean alternative, where monitoring mechanisms are automatically generated from property specifications, to check compliance at runtime. This paper contributes a practical solution for powerful and flexible runtime verification of distributed, object-oriented applications, via a combination of the runtime verification tool Larva and the active object framework ProActive. Even if Larva supports in itself only the generation of local, sequential monitors, we empower Larva for distributed monitoring by connecting monitors with active objects, turning them into active, communicating monitors. We discuss how this allows for a variety of monitoring architectures. Further, we show how property specifications, and thereby the generated monitors, provide a model that splits the blame between the local object and its environment. While Larva itself focuses on monitoring of control-oriented properties, we use the Larva front-end StaRVOOrS to also capture data-oriented (pre/post) properties in the distributed monitoring. We demonstrate this approach to distributed runtime verification with a case study, a distributed key/value store
Formal specification with JML
This text is a general, self contained, and tool independent introduction into the Java Modeling Language, JML. It is a preview of a chapter planned to appear in a book about the KeY approach and tool to the verification of Java software. JML is the dominating starting point of KeY style Java verification. However, this paper does not in any way depend on any tool nor verification methodology. Other chapters in this book talk about the usage of JML in KeY style verification. Here, we only refer to KeY in very few places, without relying on it. This introduction is written for all readers with an interest in formal specification of software in general, and anyone who wants to learn about the JML approach to specification in particular. The authors appreciate any comments or questions that help to improve the text
Verifying data- and control-oriented properties combining static and runtime verification : theory and tools
Static verification techniques are used to analyse and prove properties about programs before they are executed. Many of these techniques work directly on the source code
and are used to verify data-oriented properties over all possible executions. The analysis is
necessarily an over-approximation as the real executions of the program are not available
at analysis time. In contrast, runtime verification techniques have been extensively used for
control-oriented properties, analysing the current execution path of the program in a fully
automatic manner. In this article, we present a novel approach in which data-oriented and
control-oriented properties may be stated in a single formalism amenable to both static and
dynamic verification techniques. The specification language we present to achieve this that
of ppDATEs, which enhances the control-oriented property language of DATEs, with data-
oriented pre/postconditions. For runtime verification of ppDATE specifications, the language
is translated into a DATE. We give a formal semantics to ppDATEs, which we use to prove
the correctness of our translation from ppDATEs to DATEs. We show how ppDATE specifi-
cations can be analysed using a combination of the deductive theorem prover KeY and the
runtime verification tool LARVA. Verification is performed in two steps: KeY first partially
proves the data-oriented part of the specification, simplifying the specification which is then
passed on to LARVA to check at runtime for the remaining parts of the specification including
the control-oriented aspects. We show the applicability of our approach on two case studies.peer-reviewe
Combining rule- and SMT-based reasoning for verifying floating-point Java programs in KeY
Deductive verification has been successful in verifying interesting properties of real-world programs. One notable gap is the limited support for floating-point reasoning. This is unfortunate, as floating-point arithmetic is particularly unintuitive to reason about due to rounding as well as the presence of the special values infinity and ‘Not a Number’ (NaN). In this article, we present the first floating-point support in a deductive verification tool for the Java programming language. Our support in the KeY verifier handles floating-point arithmetics, transcendental functions, and potentially rounding-type casts. We achieve this with a combination of delegation to external SMT solvers on the one hand, and KeY-internal, rule-based reasoning on the other hand, exploiting the complementary strengths of both worlds. We evaluate this integration on new benchmarks and show that this approach is powerful enough to prove the absence of floating-point special values—often a prerequisite for correct programs—as well as functional properties, for realistic benchmarks
- …