Preparing Testing by Proving Critical Systems
Preparing Testing by Proving Critical Systems
Abstract
1 Introduction
Let us consider some proof assistants based on higher order logic, such as
Coq[8], HOL[13], or various "logics object"of Isabelle([9, 10]). Their
main feature is a great expressive power, which includes a wide range of
mathematics. As a result, there is no problem to use them in order to
define formally various classes of transitions systems (including Büchi
Automata, Petri nets, Turing machines, ... ), their semantics, and
specification of their behavior (including various kinds of temporal
logic,-calculus, ...). It is therefore possible to compute within the same
framework, two implementations of the same specification e.g. one with
Büchi Automata, the other by Petrinets.
Moreover, such systems are often provided with rewriting facilities,
making possible to mix proof and computations. For instance, we can
simulate a transition system by computing some of its executions or even
looking for some executions having a given property.
Reading the explanation above, one can believe that proof assistant are
enough to do all the verification/test activities. This would not take into
account the need for efficiency and automation.
When the property we want to prove deals with a finite system (given by
enumeration), it is often better to call an automatic process which may be a
function in the meta-language of the assistant or an external tool like
MEC. In the last case, we must have enough confidence in the correctness
of tool to accept its "oracles" as axioms for our proof assistant.
The main advantages of the approach we describe are following :
In the last case, a constructive proof compute the execution x ; it's shows
that simulation/test is highly compatible with proof activity.
We present in the next session the tools CClair, a prototype which
implements the most of the features of this approach.
3.1 Isabelle
Isabelle is a generic proof assistant that supports a collection of logics
among them First Order Logic, Zermelo-Fränkel set theory. For our work,
we only use the High Order Logic (HOL in short) distributed within
Isabelle too. The core of the system consists of a small and clear set of
rules from which all proofs are derived. The consequent confidence in the
soundness of the tool makes Isabelle a reliable proof checker.
The interpreter ML in which Isabelle is written allows facilities to write
functions in order to resolve some kinds of statement like classical
reasoning and linear arithmetic inequalities. In addition, Isabelle provides
a powerful rewriting mechanism and several tools to automate proof.
:
Since temporal logics have proven to be suitable to express a great variety
of properties, we provide a collection of usual temporal operators such as
"Always"( ), "Eventually" (), "next"(), "infinitely often" ( ), ... With
the help of these operators, we can express the most of formal statements
about desired system properties and verify them.
On the top of TS, it is possible to formalize some more complex models of
automata : actually, the distribution of CClair contains two examples of
such models (the theory SmallTS only distincts some kind of transition
systems) :
In the same way,the unknowns allow us to build objects like traces and
executions using the technique of prolog-like answer extraction and then
to synthesize some test cases.
(1)
statement :
Applying the introduction rule of splits our statement into two new
subgoals.
If we now look at the proven lemma, we can see that the variable ?x has
been instanciated with an execution the trace of which
(keyC,keyA,keyB,keyA) satisfies the desired test purpose. Therefore, this
execution provides a case test. Notice that backtracking allows us to obtain
possibly several other test cases.
In this example, we have dealt with a small enumerated system for which a
dedicated tool is provided to compute execution but it is not always the
case in more complicated models such as p-automata. If so, the simplest
way to generate an execution is to simulate the model. To achieve this
task, the user have to specify, with the help of adequate tactics, the list of
actions the system must perform. Each step is done under control of
CClair. Indeed, simulation tactics involve rewriting mechanisms which
simplify constraints on transition like guards, and invariants in order to
detect tautologies and redundancy hypothesis. In these cases, the unsolved
assumptions are delivered to the user's judgment. This allows the user to
build a so-called symbolic execution i.e. an execution of the underlying
control graph together with a set of constraints (mostly on abstract data)
from which a solver can generate several test cases with a given degree of
exhaustiveness.
5 Conclusion
The main thesis of this paper is that current proof assistants like Isabelle,
Coq, HOL can be used as an entry point for the veri"cation of critical
systems. To substantiate this claim, we have developed the tool CClair. Its
overall architecture is based upon a natural formalization of the transitions
systems model from which more complex models may be implemented.
Moreover, we have demonstrated that it is possible to accommodate
complex scheme of proof, computations by rewriting or call to external
process, and tests generation in the same tools.
CClair has been used to formally specify and prove correctness for
the Available Bit Rate (ABR) conformance protocol used in ATM
networks and our experiments with transitions systems show that is
possible to generate test cases for this protocol, using our proof-basis
approach. Another planned goal is to connect CClair with external
decision procedures in order to provide a possible guide for developping
future tools in the context of the RNRT project Calife.
References
https://www.ndt.net/article/wcndt00/papers/idn355/idn355.htm