Practical assignment for Advances in Model Checking. Performs LTL based model checking using the SPOT platform. Explores the tools in the Spot library to perform various model checking task:
- Building Kripke Structures
- Reading LTL formulas
- Building Buchi automata
- Computing cross products of Kripke and Buchi
Also provides an abstraction layer for defining Kripke structures and Buchi automata, making it more approachable and requiring less foreknowledge of C++ and Spot.
Contains an example implementation of Peterson's algorithm for N processes using the abstractions and some properties to check.
inc/model_abstract/state.h
: Contains theAbstractState
class, which implements thehash()
andcompare()
functions fromspot::state
for a generic set of state variables.inc/model_abstract/iterator.h
: Contains theAbstractIterator
class, which implements therecycle
function fromspot::kripke_succ_iter
for a generic set of state variables.inc/model_abstract/kripke.h
: Contains theAbstractKripke
class, which implements thesucc_iter()
function fromspot::kripke
.
Contains classes inheriting our inc/model_abstract
classes. Implementations of their virtual functions are left empty, with some instructions.
inc/model_example
provides an example implementation of Peterson's algorithm for N processes. Made by implementing the functions from inc/model_empty
.
inc/cross_product.h
: Contains theCrossProduct
class which provides a generic (otherwise empty) function that can move through successors of pairs of states and implements a DFS search for an accepting run of the cross-product of a Kripke structure and Büchi automaton.inc/checker.h
: Contains functions for explicitely creating Kripke structures and Büchi automata using SPOT, computing accepting runs between a Kripke and Büchi (using both SPOT and theCrossProduct
class.main/main.cc
: Constructs our example and performs some model checking on them.