Team Name: Svv Juniors
Team Member Names:
- Janna Lin (jnl77)
- Bokai Liu (bl752)
- Rachel Yan (sy625)
- Project Introduction
- Linear Temporal Logic (LTL) Primer
- Büchi automaton Primer
- Construction of Büchi automaton from LTL
- Reference
In a world where systems are getting a tad complex, having a way to check if they behave as expected is kinda handy. Amidst this, having a neat tool that can translate everyday language into something a machine understands is pretty cool. That's where our little project, the Linear Temporal Language (LTL) to Büchi Automata converter, comes into play.
We aim to build a Flat LTL to Buchi Automata converter in this project. This converter takes in strictly-formatted human language, parses and synthesizes it into a simplified Linear Temporal Logic expression, and converts it into a reliable Büchi automaton that is visualized and verifiable. With the automaton being generated, the user is able to verify if their subsequent tentative actions is executable.
Not specific to this project, a pragmatic implementation can be in autonomous vehicle development. Our converter could translate human-readable safety specifications into Büchi automata, enabling developers to verify whether proposed driving algorithms adhere to critical safety norms before real-world deployment. To ensure that the dependencies are installed to support our project, please refer to the installation guide for further guidance.
Linear Temporal Logic (LTL) is a modal logic that allows reasoning about the ordering of events over time. In computer science, LTL is often used for specifying and verifying properties of hardware and software systems.
Let AP
be a set of atomic propositions where any element p
AP
is a Boolean variable.
LTL formulas are constructed from atomic propositions and the following logical and temporal operators:
Where:
¬
represents negation (logical operator).∨
represents disjunction (logical operator).∧
represents conjunction (logical operator).=>
represents implies (logical operator).<=>
represents equivalent (logical operator).G
or□
represents always (temporal operator).F
or◇
represents eventually (temporal operator).X
represents next (temporal operator).U
represents until (temporal operator).W
represents weak until (temporal operator).R
represents release (temporal operator).
Given a model M
and a path π
in M
, the satisfaction of an LTL formula over a path is defined as follows:
π |= p
ifp
is true at the first position ofπ
.π |= ¬ϕ
ifπ
does not satisfyϕ
.π |= ϕ1 ∨ ϕ2
ifπ
satisfiesϕ1
orϕ2
.π |= ϕ1 ∧ ϕ2
ifπ
satisfiesϕ1
andϕ2
.π |= ϕ1 → ϕ2
if eitherπ
does not satisfyϕ1
orπ
satisfiesϕ2
.π |= ϕ1 ↔ ϕ2
ifπ
satisfiesϕ1
if and only ifπ
satisfiesϕ2
.π |= ϕ1 □ ϕ2
if for all positionsi
inπ
, ifπ[i]
satisfiesϕ1
thenπ[i+1]
satisfiesϕ2
.π |= ϕ1 ◇ ϕ2
if there exists a positioni
inπ
such thatπ[i]
satisfiesϕ1
andπ[i+1]
satisfiesϕ2
.π |= X ϕ
if the next state inπ
satisfiesϕ
.π |= ϕ1 U ϕ2
if there exists a positioni
inπ
such thatπ[i]
satisfiesϕ2
and for allj < i
,π[j]
satisfiesϕ1
.π |= ϕ1 W ϕ2
if eitherπ
satisfiesϕ1 U ϕ2
or for all positions inπ
,π[i]
satisfiesϕ1
.π |= ϕ1 R ϕ2
if for every positioni
inπ
, ifπ[i]
satisfiesϕ1
then there exists aj ≥ i
such thatπ[j]
satisfiesϕ2
.
Flat LTL is a subset of normal LTL. This fragment can be translated into Büchi automaton in linear size. The set of Flat LTL formula L
is given in the following manner:
ϕ := θ | θ U ϕ | ϕ R θ | ¬Δ | ϕ1 ∨ ϕ2 | ϕ1 ∧ ϕ2
, where θ
is a propositional formula defined by: θ := true | p | θ1 ∧ θ2 | ¬θ
, and where Δ
is a temporal formula where Δ := Δ U θ | θ R Δ | ¬Δ
.
We can convert a flat LTL to the form Flat Positive Normal form (FPNF), with the fact that "negations only occur adjacent to atomic propositions."
A Büchi automaton is a type of ω-automaton (omega-automaton) used to recognize infinite words. It's often employed in formal verification, specifically in the area of model checking for linear temporal logic (LTL) properties.
A Büchi automaton is similar to a nondeterministic finite automaton (NFA) but operates on infinite words. It is defined as a tuple B = (Q, Σ, δ, q0, F)
:
Where:
Q
is a finite set of states.Σ
is the input alphabet (finite set of symbols).δ
is a transition relationδ ⊆ Q × Σ × Q
.q0
is the initial state.F
is a set of accepting states.
A run of a Büchi automaton on an infinite word is accepting if it visits one of the accepting states infinitely often. In other words, a Büchi automaton accepts an infinite word if there exists a run of the automaton on that word which enters some state from F
an infinite number of times.
The Büchi automaton plays a significant role in LTL model checking. Given an LTL formula, one can construct a Büchi automaton that recognizes all models of the formula. With this automaton, one can then check if a system satisfies the given LTL property by analyzing the intersection of the system's behavior with the Büchi automaton.
The main logic we follows in our project is by the algorithm proposed in Kanso and Kansou's paper. Since we omit the transition of "Next" in our implementation, we mainly focus on two situations:
- If the input is a propositional formula, the corresponding automaton only includes two states (
s0, s1
) and two transition (tr1, tr2
).s0
refers to the initial state, ands1
refers to the final state. The condition recorded intr1
is just the input propositional formula, andtr2
is a self-transition ats1
that accepts any input. - If the input is not a propositional formula, we may convert any other temporal operator in our Flat LTL to one that is represented by
U
, and follows the algorithm denoted by the paper to convert.
Kanso, B., & Kansou, A. (2019). Converting a Subset of LTL Formula to Buchi Automata. International Journal of Software Engineering & Applications, 10(2), [Page Range]. https://doi.org/10.5121/ijsea.2019.10204