11institutetext: Saarland University
Synthesizing Skeletons for Reactive Systems††thanks: This work was partially funded by the European Research Council (ERC) Grant OSARES (No. 683300) and by the Deutsche Telekom Foundation.
Bernd Finkbeiner
Hazem Torfah
Abstract
We present an analysis technique for temporal specifications of
reactive systems that identifies, on the level of individual system
outputs over time, which parts of the implementation are determined
by the specification, and which parts are still open. This
information is represented in the form of a labeled transition
system, which we call skeleton. Each state of the skeleton is
labeled with a three-valued assignment to the output variables: each
output can be true, false, or open, where true or false means that
the value must be true or false, respectively, and open means that
either value is still possible. We present algorithms for the
verification of skeletons and for the learning-based synthesis of
skeletons from specifications in linear-time temporal logic
(LTL). The algorithm returns a skeleton that satisfies the given LTL
specification in time polynomial in the size of the minimal skeleton. Our new
analysis technique can be used to recognize and repair
specifications that underspecify critical situations. The technique
thus complements existing methods for the recognition and repair of
overspecifications via the identification of unrealizable cores.
1 Introduction
The great advantage of synthesis is that it constructs an implementation automatically from a specification – no programming required. The great disadvantage of synthesis is that the synthesized implementation is only as good as its specification, and writing good specifications is extremely difficult.
Roughly speaking, there are two fundamental errors that can happen when writing a specification. The first type of error is to overspecify the system such that actually no implementation exists anymore. This type of error can be found by a synthesis algorithm (it fails!), and synthesis tools commonly assist in the repair of such errors by identifying an unrealizable core of the specification (cf. [1, 11, 12]).
The second type of error is to underspecify the system such that not all implementations that satisfy the specification actually perform as intended. This type of error is much harder to detect. The synthesis succeeds, and even if we convince ourselves that the synthesis tool has actually chosen an implementation that performs as intended, there is no guarantee that this will again be the case when a new implementation is synthesized from the same or an extended specification.
The underlying problem is that synthesis algorithms have the freedom to resolve any underspecified behavior in the specification, and we have no way of knowing which parts of the behavior were fixed by the specification, and which parts were chosen by the synthesis algorithm.
In this paper, we introduce a new artifact that can be produced by synthesis algorithms and which provides exactly this information. We call this artifact the skeleton of the specification. We envision that synthesis algorithms would produce the skeleton along with the actual implementation, so that the user of the algorithm understands where the implementation is underspecified, and can, if so desired, strengthen the specification in critical areas.
A skeleton is a labeled transition system defined over three-valued sets of atomic propositions, where in each state of the skeleton an atomic proposition is either true, false, or open. For a given specification, the truth value of a proposition in some state of the skeleton is open if it can be replaced by true as well as by false without violating the specification. Consider for example the LTL formula \leavevmodeto7.41pt\vboxto7.41pt\pgfpicture\makeatletter\lower-1.11943ptto0.0pt\pgfsys@beginscope\pgfsys@invoke \definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke \pgfsys@color@rgb@fill000\pgfsys@invoke \pgfsys@setlinewidth0.4pt\pgfsys@invoke \nullfontto0.0pt\pgfsys@beginscope\pgfsys@invoke \pgfsys@beginscope\pgfsys@invoke \pgfsys@setlinewidth0.51666pt\pgfsys@invoke \pgfsys@moveto0.0pt2.58333pt\pgfsys@moveto3.44443pt2.58333pt\pgfsys@curveto3.44443pt4.48566pt1.90233pt6.02776pt0.0pt6.02776pt\pgfsys@curveto-1.90233pt6.02776pt-3.44443pt4.48566pt-3.44443pt2.58333pt\pgfsys@curveto-3.44443pt0.681pt-1.90233pt-0.8611pt0.0pt-0.8611pt\pgfsys@curveto1.90233pt-0.8611pt3.44443pt0.681pt3.44443pt2.58333pt\pgfsys@closepath\pgfsys@moveto0.0pt2.58333pt\pgfsys@stroke\pgfsys@invoke \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\pgfsys@discardpath\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\lxSVG@closescope\endpgfpicturep for some atomic proposition p. Any transition system that satisfies the formula has truth value true for p in the second position of every path of the transition system. On the other hand, whether p is true or false in the initial state is not determined, either truth value would work. In this case, the skeleton would not fix a particular truth value, but rather leave the value of p in the initial state open. In a sense, the skeleton implements only those parts of the transition system that are determined by the specification.
Skeletons are useful to understand the meaning of partially written specifications. Consider, for example, an arbiter over two clients that share some resource. Each client can make a request to the source (via the inputs r1 and r2) and the arbiter can, accordingly, decide to give out grants via the outputs g1 and g2. A specification for the arbiter might begin with the property of mutual exclusion, i.e., the LTL formula \leavevmodeto6.97pt\vboxto6.97pt\pgfpicture\makeatletter\lower-1.11945ptto0.0pt\pgfsys@beginscope\pgfsys@invoke \definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke \pgfsys@color@rgb@fill000\pgfsys@invoke \pgfsys@setlinewidth0.4pt\pgfsys@invoke \nullfontto0.0pt\pgfsys@beginscope\pgfsys@invoke \pgfsys@beginscope\pgfsys@invoke \pgfsys@setlinewidth0.51666pt\pgfsys@invoke \pgfsys@roundjoin\pgfsys@invoke \pgfsys@moveto0.0pt-0.86111pt\pgfsys@lineto0.0pt5.5972pt\pgfsys@lineto6.45831pt5.5972pt\pgfsys@lineto6.45831pt-0.86111pt\pgfsys@closepath\pgfsys@stroke\pgfsys@invoke \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\pgfsys@discardpath\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\lxSVG@closescope\endpgfpicture(gˉ1∨gˉ2) stating that only one of the clients should have access to the resource at a time. Figure 1 shows an implementation of this specification as a transition system and a skeleton. The transition system has a single state, and no grants are given at any time (see Figure 1). The skeleton shown in Figure 1 reveals that all outputs are open, as indicated by the question mark.
If we extend the specification with the property gˉ1∧gˉ2, then the previous transition system does not need to change, because it already satsifies the extended specification. The skeleton, on the other hand, now indicates that the output in the initial state is determined. The output in subsequent states is still open (see Figure 1(a)). Extending the specification further with the property \leavevmodeto6.97pt\vboxto6.97pt\pgfpicture\makeatletter\lower-1.11945ptto0.0pt\pgfsys@beginscope\pgfsys@invoke \definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke \pgfsys@color@rgb@fill000\pgfsys@invoke \pgfsys@setlinewidth0.4pt\pgfsys@invoke \nullfontto0.0pt\pgfsys@beginscope\pgfsys@invoke \pgfsys@beginscope\pgfsys@invoke \pgfsys@setlinewidth0.51666pt\pgfsys@invoke \pgfsys@roundjoin\pgfsys@invoke \pgfsys@moveto0.0pt-0.86111pt\pgfsys@lineto0.0pt5.5972pt\pgfsys@lineto6.45831pt5.5972pt\pgfsys@lineto6.45831pt-0.86111pt\pgfsys@closepath\pgfsys@stroke\pgfsys@invoke \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\pgfsys@discardpath\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\lxSVG@closescope\endpgfpicture(r1→\leavevmodeto7.41pt\vboxto7.41pt\pgfpicture\makeatletter\lower-1.11943ptto0.0pt\pgfsys@beginscope\pgfsys@invoke \definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke \pgfsys@color@rgb@fill000\pgfsys@invoke \pgfsys@setlinewidth0.4pt\pgfsys@invoke \nullfontto0.0pt\pgfsys@beginscope\pgfsys@invoke \pgfsys@beginscope\pgfsys@invoke \pgfsys@setlinewidth0.51666pt\pgfsys@invoke \pgfsys@moveto0.0pt2.58333pt\pgfsys@moveto3.44443pt2.58333pt\pgfsys@curveto3.44443pt4.48566pt1.90233pt6.02776pt0.0pt6.02776pt\pgfsys@curveto-1.90233pt6.02776pt-3.44443pt4.48566pt-3.44443pt2.58333pt\pgfsys@curveto-3.44443pt0.681pt-1.90233pt-0.8611pt0.0pt-0.8611pt\pgfsys@curveto1.90233pt-0.8611pt3.44443pt0.681pt3.44443pt2.58333pt\pgfsys@closepath\pgfsys@moveto0.0pt2.58333pt\pgfsys@stroke\pgfsys@invoke \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\pgfsys@discardpath\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\lxSVG@closescope\endpgfpictureg1) results in a skeleton where the responses to requests from the first client are determined, and outputs in situations where there is no request from the first client are still open (see Figure 1). An implementation for this specification could be the transition system that never gives a grant to the second client (see Figure 1).
We study the model checking and synthesis problems for skeletons. For a given LTL formula φ and a skeleton S we say that S is a model of the LTL formula φ, if each trace in S satisfies following condition: If the truth value for some proposition p in some position of the trace is open, then φ must both have a model where p is true at this position, and a model where p is false at this position. Furthermore, if the trace has truth value true or false for p at some position, then all models of φ map p to the truth value true or false, respectively, at this position.
We show that given an LTL formula φ we can build a nondeterministic automaton that accepts a sequence over the three-valued semantics if it satisfies the satisfaction relation described above. The automaton is of doubly-exponential size in the length of the formula φ. With this automaton, the model checking problem can be solved in Expspace.
To solve the synthesis problem, we could determinize the automaton and check whether there is a skeleton for the formula, along the lines of standard synthesis [16], but this construction would be very expensive. Instead,
we introduce a synthesis algorithm for skeletons based on learning. We show that for each LTL formula, a skeleton that models the formula defines a safety language that can be learned using the learning algorithm L∗. The algorithm can learn a skeleton for an LTL formula in time polynomial in the size of the minimal skeleton for the specification. The membership and equivalence queries of the L∗ algorithm are answered by the model checking algorithm introduced in this paper.
Related Work.
There is a rich body of work on the synthesis of reactive systems from logical specifications [7, 4, 10, 13, 14]. Supplemented by many works that investigated the optimization of specification for synthesis and the identification of unrealizable specification [11, 12, 1].
Multi-valued extensions of logics have been rather popular in the verification of systems, where a simple truth value is not enough to determine the quality of implementations. Chechik et. al. provide a theoretical basis for multi-valued model checking [6], where the satisfaction relation M⊨φ for a model M and a specification φ can be multi-valued. Bruns and Godefroid experiment on multi-valued logics and show that many algorithms for multi-valued logics can be reduced to ones for two-valued logics [5]. Easterbrook and Chechik introduce a framework where multiple inconsistent models are merged according to an underlying specification given in a multi-valued logic, where the different values in the specification represent the different levels of uncertainty, priority and agreement between the merged models [9]. In comparison to all these works, we are interested in multi-valued extensions of the models themselves and in the synthesis of such models, in order to determine the amount of information that resides in a specification.
The term skeleton has been also used by Emerson and Clarke which shall not be confused with the skeletons presented here. They presented a method for the synthesis of synchronization skeletons that abstract from details irrelevant to synchronization of concurrent systems [8]. In our skeletons, we stick to the structure of transition systems and leave place holders for the underspecified details, which may then be supplemented with further steps to a complete transition system.
2 Preliminaries
Alternating Automata.
We define an alternating Büchi automaton as a tuple A=(Σ,Q,q0,δ,F), where Σ denotes a
finite alphabet,
Q denotes a finite set of states, q0∈Q denotes a designated
initial state, δ:Q×Σ→B+(Q) denotes a transition function, that maps a state and an input letter to a
positive boolean combination of states, and finally the set F⊆Q of accepting states.
We define infinite words over Σ as sequence σ:N→Σ. A Σ-tree is a pair (T,r) over a set of directions D, where T is a prefix-closed subset of D∗ and r:T→Σ is a labeling function. The empty sequence ϵ is called the root. The children of a node n∈T are nodes C(n)={n⋅d∈T∣d∈D}.
A run of an automaton A=(Σ,Q,q0,δ,F) on a sequence σ:N→Σ is a Q-tree (T,r) with r(ϵ)=q0 and for all nodes n∈T, if r(n)=q then the set {r(n′)∣n′∈C(n)} satisfies δ(q,σ(∣n∣)).
A run (T,r) is accepting if for every infinite branch n0,n1,… the sequence
r(n0)r(n1)… satisfies the
Büchi condition, which requires that some state from F occures
infinitely often in the sequence r(n0)r(n1)….
The set of accepted words by the automaton A is the language of the automaton and is denoted by L(A). An automaton is empty iff its language is the empty set.
A nondeterministic automaton is a special alternating
automaton, where the image of δ consists only of such formulas
that, when rewritten in disjunctive normal form, contain exactly one
element of Q in
every disjunct.
An alternating automaton is called universal if, for all states q and input letters α, δ(q,α) is a conjunction.
A universal and nondeterministic automaton is called deterministic.
A Büchi automaton is called a safety automaton if Q=F. Safety
automata are denoted by a tuple (Σ,Q,q0,δ).
For safety automata, every run graph is accepting.
The dual of Büchi automata are co-Büchi automata. In a co-Büchi automaton the set F is a set of rejecting states and a run is accepting if it has only finitely many appearances of states in F.
Safety Languages:
A finite word w={1,…,i}→Σ over some finite alphabet Σ is called a bad-prefix for a language L⊆Σω, if every infinite word σ∈(N→Σ) with prefix w is not in the language L.
A language L⊆(N→Σ) is called a safety language, if every σ∈L has a bad-prefix.
We denote the set of bad-prefixes for a language L by BP(L).
For every safety language L we can define a finite word automaton B=(QB,QB,0,FB,δB) that accepts the language BP(L). We call B the bad-prefix automaton of L.
Linear-time Temporal Logic:
We use Linear-time Temporal Logic (LTL) [15], with the usual temporal operators Next \leavevmodeto7.41pt\vboxto7.41pt\pgfpicture\makeatletter\lower-1.11943ptto0.0pt\pgfsys@beginscope\pgfsys@invoke \definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke \pgfsys@color@rgb@fill000\pgfsys@invoke \pgfsys@setlinewidth0.4pt\pgfsys@invoke \nullfontto0.0pt\pgfsys@beginscope\pgfsys@invoke \pgfsys@beginscope\pgfsys@invoke \pgfsys@setlinewidth0.51666pt\pgfsys@invoke \pgfsys@moveto0.0pt2.58333pt\pgfsys@moveto3.44443pt2.58333pt\pgfsys@curveto3.44443pt4.48566pt1.90233pt6.02776pt0.0pt6.02776pt\pgfsys@curveto-1.90233pt6.02776pt-3.44443pt4.48566pt-3.44443pt2.58333pt\pgfsys@curveto-3.44443pt0.681pt-1.90233pt-0.8611pt0.0pt-0.8611pt\pgfsys@curveto1.90233pt-0.8611pt3.44443pt0.681pt3.44443pt2.58333pt\pgfsys@closepath\pgfsys@moveto0.0pt2.58333pt\pgfsys@stroke\pgfsys@invoke \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\pgfsys@discardpath\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\lxSVG@closescope\endpgfpicture, Until U and the derived operators Eventually \leavevmodeto8.7pt\vboxto8.7pt\pgfpicture\makeatletter\lower-1.76527ptto0.0pt\pgfsys@beginscope\pgfsys@invoke \definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke \pgfsys@color@rgb@fill000\pgfsys@invoke \pgfsys@setlinewidth0.4pt\pgfsys@invoke \nullfontto0.0pt\pgfsys@beginscope\pgfsys@invoke \pgfsys@beginscope\pgfsys@invoke \pgfsys@setlinewidth0.51666pt\pgfsys@invoke \pgfsys@roundjoin\pgfsys@invoke \pgfsys@moveto0.0pt2.58333pt\pgfsys@lineto4.09026pt6.67358pt\pgfsys@lineto8.18053pt2.58333pt\pgfsys@lineto4.09026pt-1.50694pt\pgfsys@closepath\pgfsys@stroke\pgfsys@invoke \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\pgfsys@discardpath\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\lxSVG@closescope\endpgfpicture and Globally \leavevmodeto6.97pt\vboxto6.97pt\pgfpicture\makeatletter\lower-1.11945ptto0.0pt\pgfsys@beginscope\pgfsys@invoke \definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke \pgfsys@color@rgb@fill000\pgfsys@invoke \pgfsys@setlinewidth0.4pt\pgfsys@invoke \nullfontto0.0pt\pgfsys@beginscope\pgfsys@invoke \pgfsys@beginscope\pgfsys@invoke \pgfsys@setlinewidth0.51666pt\pgfsys@invoke \pgfsys@roundjoin\pgfsys@invoke \pgfsys@moveto0.0pt-0.86111pt\pgfsys@lineto0.0pt5.5972pt\pgfsys@lineto6.45831pt5.5972pt\pgfsys@lineto6.45831pt-0.86111pt\pgfsys@closepath\pgfsys@stroke\pgfsys@invoke \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\pgfsys@discardpath\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\lxSVG@closescope\endpgfpicture.
LTL formulas are defined over a set of atomic propositions AP=I∪O, which is partitioned into a set I of input propositions and a set O of output propositions.
We denote the satisfaction of an LTL formula φ by an infinite sequence σ:N→2AP of valuations of the atomic propositions by σ⊨φ. For an LTL formula φ we define the language L(φ) by the set {σ∈(N→2AP)∣σ⊨φ}.
Implementations:
We represent implementations as labeled transition systems. For a given finite set Υ of directions and a finite set Σ of labels, a Σ-labeled Υ-transition system is a tuple T=(T,t0,τ,o), consisting of a finite set of states T, an initial state t0∈T, a transition function τ:T×Υ→T, and a labeling function o:T→Σ.
A path in T is a sequence π:N→T×Υ of states and directions that follows the transition function, i.e., for all i∈N if π(i)=(ti,ei) and π(i+1)=(ti+1,ei+1), then ti+1=τ(ti,ei). We call a path initial if it starts with the initial state: π(0)=(t0,e) for some e∈Υ. We denote the set of initial paths of T by Path(T). For a path π∈Path(T), we denote the sequence σπ:i↦o(π(i)), where o(t,e)=(o(t)∪e) by the trace of π. We call the set of traces of the paths of a transition system T the language of the T, denoted by L(T).
For a set of atomic propositions AP=O∪I, we say that a 2O-labeled 2I-transition system T satisfies an LTL formula φ, if and only if L(T)⊆L(φ), i.e., every trace of T satisfies φ. In this case we call T a model of φ.
Multi-valued Sets:
A multi-valued set over an alphabet Σ and set of values Γ is a function v∈(Σ→Γ). The simplest type of multi-valued sets is the two-valued set which define the notion of sets as we know, where Σ is a set of symbols and Γ={⊥,⊤}, i.e., for a two-valued set v over Σ and Γ, a symbol a∈Σ is in v if v(a)=⊤, and not otherwise. The set of all multi-valued sets over an alphabet Σ and a set of values Γ is denoted by ΓΣ, e.g., in the usual set notion this is the set {⊥,⊤}Σ or as we know it 2Σ for an alphabet Σ.
For a multi-valued set v∈ΓΣ and for p∈Σ and h∈Γ we define the multi-valued set v′=v[p↦h], where v′(p)=h and for all p′∈Σ∖{p}, we have v′(p′)=v(p′).
For a multi-valued set v∈ΓΣ and for a set Σ′⊆Σ the set vΣ′∈ΓΣ′ is the multi-valued set obtained by projection from Σ to Σ′.
3 Skeletons
An open set over an alphabet Σ is a three-valued set v:{⊤,⊥,?}Σ, where each element a∈Σ is either in v denoted by v(a)=⊤, not in v denoted by v(a)=⊥, or it is open whether it is in the set or not, i.e., it could be one of both, denoted by v(a)=?. In the remainder of the paper, we denote the set {⊤,⊥,?}Σ by 3Σ. For two open sets v,v′∈3Σ we define the partial order ⊑ such that v⊑v′ if and only if for all symbols a∈Σ, v(a)⪯v′(a) with respect to the lattice ⪯={(⊥,⊥),(⊤,⊤),(⊥,?),(⊤,?),(?,?)}.
We call a sequence σ an open sequence if it is a sequence over open sets, i.e., σ∈(N→3Σ). For two open sequences σ and σ′ we define the partial order ⊑ such that σ⊑σ′ if for all i∈N, σ(i)⊑σ′(i). For a sequence σ∈(N→3Σ) and Σ′⊆Σ the sequence σΣ′∈(N→3Σ′) is the sequence where for all i, σΣ′(i)=σ(i)Σ′.
We define the satisfaction relation of LTL over open sequences as follows. Given an LTL formula φ over a set of atomic propositions AP=O∪I, an open sequence σ satisfies φ, denoted by σ⊨φ, if for each sequence σ′∈L(φ) that is input equivalent to σ, i.e., σI=σI′, we have σ′⊑σ. For a fixed sequence of inputs ς∈(N→2I), there is a unique open sequence σ with σI=ς that satisfies φ and that is minimial with respect to the partial order ⊑, i.e., for all sequences σ′∈(N→3AP) with σ′⊨φ and σI′=ς, we have σ⊑σ′. We call such sequence a minimal satisfying sequence. For an LTL formula φ, we denote the set of all minimal satisfying sequences by min(φ).
Building on the definitions of open sequences and transition systems we introduce the notion of skeletons of reactive systems, which are transition systems labeled with open sets from 3O.
Definition 1 (Skeleton)
For a set AP=O∪I of atomic propositions, a skeleton over AP is a 3O-labeled-2I-transition system.
The language of a skeleton S is the set of open sequences given by the set of its traces.
Figure 2 shows four skeletons defined over the sets I={r1,r2} and O={g1,g2}. Figures 2 and 2 both define the language {σ:N→3AP∣∀i.σ(i)(g1)=σ(i)(g2)=?}, i.e., for all input sequences the values of the output propositions g1 and g2 are open in all positions. The language of the skeleton in Figure 2 is the set {σ:N→3AP∣σ(0)(g1)=σ(0)(g2)=⊥,∀i>0. σ(i)(g1)=⊤∧σ(i)(g2)=?} where the values of g1 are fixed in all positions and for g2 only in the first position of the sequence.111Note that skeletons have no open values for input propositions.
We say that a skeleton S is a model of an LTL formula φ denoted by S⊨φ, if L(S)=min(φ).
Intuitively, for an LTL formula φ, a skeleton gives an incomplete transition system where values of atomic propositions that are not deterministically fixed by φ, are left open, i.e., they are mapped to the value ? in the open set of a state.
Consider the formula φ=g1∧g2∧\leavevmodeto6.97pt\vboxto6.97pt\pgfpicture\makeatletter\lower-1.11945ptto0.0pt\pgfsys@beginscope\pgfsys@invoke \definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke \pgfsys@color@rgb@fill000\pgfsys@invoke \pgfsys@setlinewidth0.4pt\pgfsys@invoke \nullfontto0.0pt\pgfsys@beginscope\pgfsys@invoke \pgfsys@beginscope\pgfsys@invoke \pgfsys@setlinewidth0.51666pt\pgfsys@invoke \pgfsys@roundjoin\pgfsys@invoke \pgfsys@moveto0.0pt-0.86111pt\pgfsys@lineto0.0pt5.5972pt\pgfsys@lineto6.45831pt5.5972pt\pgfsys@lineto6.45831pt-0.86111pt\pgfsys@closepath\pgfsys@stroke\pgfsys@invoke \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\pgfsys@discardpath\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\lxSVG@closescope\endpgfpicture(r1→\leavevmodeto7.41pt\vboxto7.41pt\pgfpicture\makeatletter\lower-1.11943ptto0.0pt\pgfsys@beginscope\pgfsys@invoke \definecolorpgfstrokecolorrgb0,0,0\pgfsys@color@rgb@stroke000\pgfsys@invoke \pgfsys@color@rgb@fill000\pgfsys@invoke \pgfsys@setlinewidth0.4pt\pgfsys@invoke \nullfontto0.0pt\pgfsys@beginscope\pgfsys@invoke \pgfsys@beginscope\pgfsys@invoke \pgfsys@setlinewidth0.51666pt\pgfsys@invoke \pgfsys@moveto0.0pt2.58333pt\pgfsys@moveto3.44443pt2.58333pt\pgfsys@curveto3.44443pt4.48566pt1.90233pt6.02776pt0.0pt6.02776pt\pgfsys@curveto-1.90233pt6.02776pt-3.44443pt4.48566pt-3.44443pt2.58333pt\pgfsys@curveto-3.44443pt0.681pt-1.90233pt-0.8611pt0.0pt-0.8611pt\pgfsys@curveto1.90233pt-0.8611pt3.44443pt0.681pt3.44443pt2.58333pt\pgfsys@closepath\pgfsys@moveto0.0pt2.58333pt\pgfsys@stroke\pgfsys@invoke \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope \pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\pgfsys@discardpath\pgfsys@invoke\lxSVG@closescope\pgfsys@endscope\hss\lxSVG@closescope\endpgfpictureg1). We notice that all transition systems that satisfy φ must have the label g1g2 in the initial state. For the rest of the transition system, the formula forces only to label a state with g1 in case the direction(input) leading to this state contains the proposition r1, and leaves it open on how to label the states reached by other directions, or whether to label a state with g2 if it is reached by an input where r1 is true (Figure 2).
Building on the satisfaction relation between LTL and skeleton we investigate in the next sections the problems of model checking and synthesis of skeletons.
4 Model Checking Skeletons
We present an automata-based model checking algorithm for skeletons. Given an LTL formula φ we show that we can construct a nondeterministic Büchi automaton that recognizes the complement language min(φ). Using the usual product construction, in this case, the product of the automaton and the skeleton, one can check whether the resulting automaton contains a path that simulates an accepting path in the nondeterministic automaton. If this is the case, then the language of the skeleton contains a sequence in min(φ) and, thus, the skeleton is not a model for the formula φ. Using the construction of the product automaton we also show that checking whether a skeleton is a model of an LTL formula can be done in space exponential in the length of the formula.
Lemma 1
Given an LTL formula φ we can build a nondeterministic Büchi automaton N=(3AP,Q,q0,F,δ) such that L(N)=min(φ). The number of states of N is doubly-exponential in the length of φ.
Construction.
The language min(φ) contains all sequences σ:N→3AP that are not minimal satisfying open sequences for φ. These can be distinguished by two types of open sequences. The first type involves sequences σ where in some position i the truth value of a proposition p∈AP is open (mapped to ?), although, in all sequences σ′∈L(φ) with σI=σI′ the proposition p has the one same truth value (one of ⊤ or ⊥ in all sequences) at position i. The second type are sequences σ, where in some position i a proposition p has truth value ⊥(resp. ⊤), although, there exists another sequence σ′∈L(φ) with σI′=σI and σ′(i)(p)=⊤(resp. ⊥).
The latter case also subsumes the case of sequences σ∈(N→2AP) with σ∈L(φ).
We construct a Büchi automaton N=(3AP,Q,q0,F,δ) that accepts an open sequence σ if and only if σ∈min(φ). The automaton is composed of two nondeterministic Büchi automata N1=(3AP,Q1,q0,1,F1,δ1) and N2=(3AP,Q2,q0,2,F2,δ2), one for each of the sequence types mentioned above. We define the automaton as N=N1∨N2, where Q={q0}∪Q1∪Q2, F=F1∪F2 and δ={(q0,a,δ1(q0,1,a)∨δ2(q0,2,a))∣a∈3AP}∪δ1∪δ2
Automaton N1 accepts a sequence σ∈(N→3AP) if σ has a position i where an atomic proposition p∈AP is incorrectly marked as open. The automaton N1 can be constructed as follows:
Let U1=(2AP,Q1U,q0,1U,F1U,δ1U) be a universal co-Büchi automaton for the formula ¬φ. We extend the automaton U1 to another universal co-Büchi automaton U1∗ over an extended alphabet {⊤,⊥,?,∗⊤,∗⊥}AP. We make use of the values ∗⊤ and ∗⊥ to encode in the input sequence whether a mapping to ? is wrong, and whether it is wrong when replacing ? by ⊤ or by ⊥. We define U1∗=({⊤,⊥,?,∗⊤,∗⊥}AP,Q1∗,q0,1∗,F1∗,δ1∗) over two copies of the automaton U1(denoted by the numbers 1 and 2) where Q1∗=Q1U×{1,2}, q0,1∗=(q0,1U,1), F1∗=F1U×{1,2}. The transition function δ1∗ is given by the union of the following sets:
{((q,h),v,δ1U(q,v){q′∈Q1U/(q′,h)})∣h∈{1,2},∀p∈O.v(p)∈{⊤,⊥}}
where in both copies of the automaton U1, transitions over symbols v with no open values remain in the same copy and follow the structure of the transition relation δ1U of U1. The operation {q′∈Q1U/(q′,h)} substitutes every appearance of a state q′ in δ1U(q,v) by a state (q′,h) from Q1∗.
{((q,h),v,(δ1U(q,v[p↦⊤])∧δ1U(q,v[p↦⊥])){q′∈Q1U/(q′,h)})∣h∈{1,2},p∈O,v(p)=?,}
universal transitions for symbols where a proposition p has an open truth value imitating transitions for both truth values ⊤ and ⊥ for p.
{((q,1),v,δ1U(q,v[p↦⊤]){q′∈Q1U/(q′,2)})∣p∈O,v(p)=∗⊤}
when we guess at some position i that an open truth value for a proposition p is wrong, and it is wrong when replacing it by ⊤ we follow the transition ⊤ to the second copy of U1 in which ?,∗⊥ and ∗⊤ are treated equivalently. This helps to check, whether replacing ? by ⊤ results in accpeting run in U1, which means that at position i the truth value ⊤ violates the property φ, and thus it cannot be open at the that point.
{((q,1),v,δ1U(q,v[p↦⊥]){q′∈Q1U/(q′,2)})∣p∈O,v(p)=∗⊥}
which introduce transitions that involve the dual case of ∗⊤.
{((q,2),v,(δ1U(q,v[p↦⊤])∧δ1∗(q,v[p↦⊥])){q′∈Q1U/(q′,2)})∣p∈O,v(p)∈{∗⊥,∗⊤}}
these transitions make sure that when moving to copy 2 of U1, values ∗⊤ and ∗⊥ are treated equally to ?, because after guessing that a ? is wrong it must be wrong for all continuations.
In order to obtain the desired automaton N1 over the alphabet 3AP we first transform the automaton U1∗ to a nondeterministic automaton N1∗ with L(U1∗)=L(N1∗) using a subset construction. This is necessary in order to merge all transitions ∗⊥ at one level into one state. The same holds also for transitions ∗⊤. In this way, we can check whether at some position in a sequence a value ? is wrong by checking all possible branches of the automaton U1∗ at that level. The automaton N1∗ can be transformed now to the desired automaton N1 by projecting every transition label with values in {∗⊤,∗⊥} to a label v′∈3AP such that for every p∈O, if v(p)=∗⊤ or v(p)=∗⊥ then v′(p)=?.
The size of the automaton U1 is exponential in the length of φ using the transformation of LTL formulas into alternating Büchi automata [17], and then using a subset construction. The transformation to U1∗ from U1, and to N1 from N1∗ are both polynomial, and exponential from U1∗ to N1∗. Thus, the size of N1 is doubly-exponential in the length of φ.
In a similar way, we can construct the automaton N2. Automaton N2 accepts a sequence σ∈(N→3AP) if a proposition p∈AP is incorrectly mapped to ⊤ or ⊥.
Starting with the alternating Büchi automaton for the formula φ, we extend the alphabet with symbols ∗⊤ and ∗⊥ and build an automaton U2∗=({⊤,⊥,?,∗⊤,∗⊥}AP,Q2∗,q0,2∗,F2∗,δ2∗). Whenever we read a symbol v where some p∈O is mapped to ∗⊤(∗⊥), the automaton follows the transition for v(p)=⊥(⊤). After turning U2∗ to a nondeterministic automaton and projecting, a label v is replaced by a label v′ such that for every p∈O, if v(p)=∗⊤ or v(p)=∗⊥ then v′(p)=⊤ or v′(p)=⊥, respectively. The automaton N2 is doubly-exponential in the length of φ.
Proof
Let σ∈(N→3AP). We distinguish three cases:
σ∈min(φ) and for some i and some p∈O, the mapping σ(i)(p)=? is wrong. We assume, w.l.o.g., that for all σ′∈L(φ) with σI=σI′, that σ′(i)(p)=⊤, and that i is the first position for which σ(i)(p)=? is wrong. A run of the automaton N1 over σ is a sequence r∈(N→2Q1∗). Let r=X0X1... be the run of the automaton N on σ, where X0={q0,1∗}, and up to the position i the run follows for each mapping to ? the transitions in N1 that were transitions for mappings to ? in the automaton N1∗ before the projection, i.e., all sets Xj with j≤i contain only states (q,1) from Q1∗, where q∈Q1U. In the position i, where the mapping to ? is incorrect, the run follows the transition with ? in state Xi of N1 that can be mapped to a transition ∗⊥ in the automaton N1∗ which moves to a set Xi+1 with only states (q,2) from Q1∗, i.e., the transition that checks whether replacing ? at i with ⊥ always leads to rejecting states for possible instantiations of upcoming ?. As U1∗ is built from copies of the automaton U1 for the formula ¬φ, following the transition for ∗⊥ means replacing at position i the value ? with ⊥, which can only lead to rejecting runs, because the automaton U1 accepts no sequence where p is mapped to value ⊥ at position i.
σ∈min(φ) and for some i and some p∈O, σ(i)(p) is incorrectly mapped to ⊤ or to ⊥. With the same argumentation of the last case over the structure of the automaton N2 the claim can be proven.
σ∈min(φ). In this case, for each position i, for each proposition p∈O such that σ(i)(p)=?, and for each instantiation of ? for p in position i, there are instantiations for all other ? values in σ and for all propositions such that the resulting sequence σ′∈(N→2AP) is in L(φ). Let r=X0X1... be a run of N1 on σ. If r follows all transitions for a mapping to ? that correspond to a transition for the value ? in N1∗. In this case, all sets Xj for j≥0 have states (q,1) of U1∗ where q∈Q1U and the run is not accepting, because the run simulates a universal run tree in U1∗ with at least one non-accepting branch, because there is an instantiation for σ that is a model of φ.
If at any point, then run r takes a transition for some mapping to ? that corresponds to a transition ∗⊥ or ∗⊤ in the automaton N1∗, then the run cannot be accepting, otherwise there is a mapping to ? for some proposition p∈O in some position in σ for which all other ? in σ cannot be instantiated appropriately in order to get a model in σ.
In a similar way we can also prove that N2 has no accepting run for σ.
∎
To check whether a skeleton S is a model for a given LTL formula φ we compute the product P=S×N where N is nondeterministic Büchi automaton with L(N)=min(φ) constructed in Lemma 1. If P contains a path that simulates an accepting path in N, then S has a path that violates the property φ, i.e., there is a sequence in the language L(S) that is not in min(φ).
Instead of constructing the product automaton P one can also guess a run in P and check whether it is accepting222This follows the idea of the Pspace model checking algorithm for LTL over transition systems [3]. Based on this idea, the complexity of model checking skeleton is given by the following theorem.
Theorem 4.1
Checking whether a skeleton S is a model for an LTL formula φ is in Expspace.
5 Synthesis of Skeletons
For a set of atomic propositions AP=I∪O, to check whether there is 2O-labeled 2I-transition system T that satisfies a given LTL formula φ, one would construct a deterministic ω-automaton D (for example a parity automaton) with L(D)=L(φ), interpret the automaton as a tree automaton over trees with labels from 3O and directions from 2I and check its emptiness. In case, the language of the automaton is not empty the procedure returns a transition system T that models the formula φ. In the same fashion, we can construct a deterministic ω-automaton for the language min(φ) (for example by determinizing the automaton from Lemma 1) and check whether there is a skeleton that is a model for φ by performing an emptiness check over tree automaton interpretation of the deterministic automaton.
The deterministic automaton is very expensive to construct (triple exponential in the formula φ). Instead, we show that we can avoid this construction of the large deterministic automaton using learning. In comparison to transition systems, given an LTL formula, we show that it has a unique minimal skeleton that models the formula. The language of the skeleton is a safety language, and thus, can be characterized by a bad-prefix automaton, which is a finite word automaton. We use the learning algorithm L∗ to learn the deterministic bad-prefix automaton [2], which can be easily transformed to a skeleton that models the formula. The learning algorithm learns the skeleton in time polynomial in the size of the minimal skeleton.
5.1 Learning Skeletons
In the following we present an algorithm for learning skeletons of LTL formulas.
Our algorithm is based on the L∗ algorithm for learning deterministic finite automata introduced by Dana Angluin [2]. The setting of the L∗ algorithm involves two key actors, the learner and the teacher. The learner tries to learn a language known to the teacher by learning a minimal deterministic finite word automaton for the language. The interaction between the learner and the teacher is driven by two types of queries: membership queries, where the learner asks whether a particular word is in the language, and equivalence queries, to check whether a learned deterministic finite automaton indeed defines the language to be learned. Here, the teacher responds either with a “yes” or with a counterexample, which is a word in the symmetric difference of the language of the learned automaton and the actual language. A teacher is called minimally adequate, if she can answer membership and equivalence queries.
Theorem 5.1
[2]*
Given a minimally adequate Teacher for an unknown regular language L, we can construct a minimal finite word automaton that accepts L, in time polynomial in the number of states of the automaton and the length of the largest counterexample returned by the teacher.*
For an LTL formula φ we show that the language of a skeleton that satisfies φ is a safety language. This can be characterized by a language over finite words, namely the language of bad-prefixes. The L∗ algorithm can learn a finite automaton for the language of bad-prefixes, which in turn can then be transformed to a skeleton for the property φ.
Lemma 2
For an LTL formula φ, the language min(φ) is a safety language.
Proof
We show that every σ∈min(φ) has a bad-prefix. We distinguish two cases for σ:
There is a point i in σ and a proposition p such that σ(i)(p)=⊤(or ⊥) and there is a sequence σ′∈L(φ) with σI=σI′ and σ′(i)(p)=⊥(or⊤). Thus, any finite sequence v0…vi∈(3AP)∗ with (v0…vi)I=(σ(0)…σ(i))I and vi(p)=? is a bad-prefix for min(φ).
There is a point i in σ and a proposition p such that σ(i)(p)=? and for all σ′∈L(φ) with σI=σI′ we have σ′(i)(p) is solely ⊤ or solely ⊥. In this case, every finite sequence v0…vi∈(3AP)∗ with (v0…vi)I=(σ(0)…σ(i))I and vi(p)=? is a bad-prefix for min(φ).
∎
From the last lemma we deduce, that a skeleton S for an LTL formula φ can be seen as a safety automaton that accepts the language of minimal satisfying open sequences for φ. In particular, there is a bad-prefix automaton B that accepts the language of bad-prefixes of the language min(φ).
We use the L∗ algorithm to learn a deterministic bad-prefix automaton for the language min(φ).
Figure 3 shows a high level flow graph of the learning algorithm333For more details on the L∗ algorithm we refer the reader to [2].. The learner poses a series of membership questions before making a conjecture about the bad-prefix automaton. With a membership query the learner asks whether a finite word w∈(3AP)∗ is a bad-prefix for min(φ). If w is a bad-prefix then the teacher returns yes, and no otherwise. The equivalence queries allow the learner to check whether a skeleton S is correct, i.e., L(S)=min(φ). The teacher either confirms the automaton or returns a counterexample to the learner. The latter is either a bad-prefix that is not rejected by B or word w∈(3AP)∗ that is not a bad-prefix for min(φ) yet is in the language of B. The black box shown in Figure 3 between the bad-prefix automaton and a skeleton, is a check whether the safety language characterized by the bad-prefix automaton can be represented by a skeleton. We will refer to this check as the output consistency check and will explain it later in more detail.
The skeleton returned by the learning procedure is minimal and it is unique.
Lemma 3
For each LTL formula φ there is a unique (up to isomorphism) minimal skeleton S such that S⊨φ.
Proof
Let S=(S,s0,τ,o) and S′=(S′,s0′,τ′,o′) be two minimal skeletons for φ, i.e, ∣S∣=∣S′∣=c and there is no skeleton S′′=(S′′,s0′′,τ′′,o′′) for φ with ∣S′′∣<c. We show that S and S′ define the same skeleton up to isomorphism. Let β={(s,s′)∈S×S′ ∣ ∀σI∈(2I)∗. τ∗(s0,σI)=s↔τ′∗(s0′,σI)=s′}. The relation β is bijective because τ∗ and τ′∗ are both functional and complete. Thus, there is a one-to-one mapping between the states of S and those of S′, and for each (s1,i,s2)∈τ we have (β(s1),i,β(s2))∈τ′. For each (s,s′)∈β it is also the case that o(s)=o′(s′), otherwise, there is an input sequence that distinguishes a trace in S from the corresponding one in S′, which contradicts the assumption that L(S)=L(S′). This implies that S is isomorphic to S′. ∎
In the next sections we show how membership and equivalence queries can be solved algorithmically.
5.2 Membership Queries
In this section we show that using the ideas of the automaton presented in Lemma 1 we can check whether a word is a bad-prefix in space exponential in the length of φ.
Theorem 5.2
Given an LTL formula φ and a finite word w∈(3AP)∗, checking whether w is a bad-prefix for min(φ) is in Expspace.
Proof
A finite word w∈(3AP)∗ is a bad-prefix for min(φ) if w=w0…wn has a prefix and there is a sequence of input values ς and no sequence σ:N→3AP with σI=ς can extend w to a sequence in w⋅σ∈min(φ). Let U=(Σ,Q,q0,δ,F) be a universal co-Büchi automaton such that L(U)=L(¬φ). The idea is to iteratively construct a run of the automaton U and check if the run is accepting (remember that a run of U is Q-tree). Given the input word w, we first guess which position i of w contains a wrong mapping and compute the set of states of the run tree over w0…wi reached at this position. Then, we compute the set of states reached via choosing the transition for which the guessed position i is wrong. Form here on, we guess the next input and branch universally for all valuations of the output propositions, and compute the next set of reached states. This is repeated 2∣Q∣ times (At latest at position 2∣Q∣ we reach a set of states, that was seen before and enter a loop in the run). If during the procedure a valid accepting configuration of the universal automaton was guessed, then we have found a sequence of inputs ς for which no σ with σI=ς extends the prefix of w0…wi to a sequence in min(φ). Thus, w is a bad-prefix for min(φ). In each step we only need to remember the currently reached set of states of U, and whether we have seen an accepting configuration of U. Furthermore, the number of iteration can be encoded in binary and is polynomial in the size of U, which in turn is exponential in the length of φ. ∎
5.3 Equivalence Queries
We move now to equivalence queries. To check whether a skeleton is a model for a formula φ we apply the model checking algorithm presented in Section 4. The learning algorithm first constructs a bad-prefix automaton for the language min(φ). We show that this automaton can be turned into a safety automaton for min(φ) on which we can simulate a skeleton for φ. In case we cannot simulate the skeleton on top of the safety automaton, then there is no skeleton that models the formula φ.
Lemma 4
Given a deterministic bad-prefix automaton B for a safety property φ, we can construct a deterministic safety automaton S for φ in time linear in the size of B.
Construction.
Let B=(Σ,Q,q0,F,δ) be a bad-prefix automaton for some property φ and we assume it is complete. We construct a safety automaton S=(Σ,Q′,q0′,δ′) for φ by first removing all states in F and then by iteratively removing all resulting sink states in the automaton.
Remark 1
Note that if B is minimal, so is S.
Before we move on to the construction we consider following fact about skeletons and the language min(φ) for some formula φ. Let AP=O∪I be the set of atomic propositions. Let S=(S,s0,τ,o) be a skeleton that models the formula φ. Let π1=(s0,i1)(s1,i1)… and π2=(s0,i1)(s1,i2)… be paths in S where s0,s1∈S and i1,i2∈I. Then, both sequences σπ1=(o(s0)∪i1)(o(s1)∪i1)… and σπ2=(o(s0)∪i1)(o(s1)∪i2)…, must be in the set min(φ), otherwise S is not a model of φ. This means, if the language min(φ) contains sequences (o1∪i1)(o2∪i1)… and (o1∪i1)(o2′∪i2)… with o2=o2′ then there is no skeleton that models φ, because min(φ)=L(S) and both traces cannot be trace of the skeleton at the same time.
Definition 2 (Output Consistent)
For a set of atomic propositions AP=O∪I, a safety automaton A=(3AP,Q,q0,δ) is output consistent, if for each state q∈Q there is a unique mapping v∈{⊥,⊤,?}O and for all transitions (q,v′,q′)∈δ, v′(p)=v(p) for all propositions p∈O.
Lemma 5
Given an LTL formula φ, if there is an output consistent safety automaton A for the language min(φ), we can transform A to skeleton S that models φ. The size of S is equal to the size of A.
Construction.
Let φ be an LTL formula and let A=(3AP,Q,q0,δ) be an output consistent safety automaton for the language min(φ) constructed from a deterministic bad-prefix automaton as in Lemma 4.
Let Q={q0,q1…qn}. We can construct a skeleton S=(S,s0,τ,o), where S={s0,…,sn} and o(si)=X∩O for (qi,X,q′)∈δ for some q′∈Q, and (si,Y,sj)∈τ for Y⊆I when (qi,o(si)∪Y,qj)∈δ. The skeleton S models φ, because it simulates the language of A.
Lemma 6
Given a formula φ, if an output consistent safety automaton A with L(A)=min(φ) is minimal then the skeleton S extracted form A is also minimal.
Proof
This follows from the fact that we can use the reverse of the construction presented in Lemma 5 to construct the safety automaton from the skeleton. Assume S was not minimal, then there is a skeleton S′ with less number of states. This one, however, can be transformed backwards to a output consistent automaton of same size, which contradicts the assumption. ∎
Once we obtain a candidate skeleton, we check whether the skeleton is a model of the formula using the model checking algorithm presented in Section 4. If the skeleton is not a model, the algorithm returns a counterexample, which is a lasso-shaped trace in the candidate skeleton. As this trace must contain a bad-prefix, we can iteratively check all prefixes of the trace using membership queries until we reach the (shortest) bad-prefix.
Using the results presented in Theorem 4.1 (Equivalence query checking is in Expspace), Theorem 5.1 (L∗ learns a minimal bad-prefix automaton in polynomial time in the size of the minimal automaton), Theorem 5.2 (Membership checking is in Expspace), Lemma 2 (The language min(φ) can be characterized by a finite automaton), Lemma 3 (The minimal skeleton is unique), Lemma 5 (The safety automaton is a skeleton), and Lemma 6, we can conclude now with following theorem.
Theorem 5.3
Given an LTL formula φ, we can construct a skeleton S that models φ in time polynomial in the size of the minimal skeleton of φ.
6 Conclusion
We have presented an analysis technique for temporal specifications of
reactive systems that identifies, on the level of individual system
outputs over time, which parts of the implementation are determined
by the specification, and which parts are still open.
Based on the algorithms developed in this paper, a synthesis tool
can represent this information in the form of a skeleton for the
reactive system.
Skeletons are more informative than conventional transition systems in
identifying critical situations that are still underspecified.
Our automaton-based model checking algorithm for skeletons also serves as the teaching oracle in the learning-based synthesis algorithm.
The learning algorithm L∗ can be used to synthesize minimal skeletons because skeletons define safety languages, which can be characterized by a unique minimal bad-prefix automaton. Once the automaton is learned, it can directly be transformed into a skeleton for the specification. The skeleton is minimal and can be constructed in time polynomial in the number of states of the skeleton.
In the development of a reactive system, skeletons can be seen as an intermediate step between the specification of the system and its implementation.
In future work, we plan to investigate this aspect further, by exploring an incremental development process, where the refinement of the specification is guided by the identification of underspecified situations through the skeletons synthesized from the intermediate specifications.