Giter VIP home page Giter VIP logo

mcltl-rs's Introduction

mcltl-rs

An experimental model checker for LTL written in Rust. That uses the theory of automata apply to linear temporal logic as a unifying paradigm for program specification, verification,and synthesis. The model checker takes in parameter a Kripke structure which represents a (reactive) program and a PLTL formula.

⚠️ This model checker is in beta version and experimental. Please don't use it for production use case! ⚠️

How it work

Translation of the original problem to a problem in automata theory:

  • Original problem: S |= P. Does property P hold for every run of program/system S?
  • Transform the Kripke model Ma in a Büchi automaton: Sa with language L(SA).
  • Transform the property PLTL ϕp in a Büchi automaton PA: B¬ϕp with language L(PA).
  • Construct the equivalent problem: A⊗ = L(Sa) ∩ L(Pa).
  • Final Problem L(A⊗) = ∅
    • Check whether the language of this automaton is empty.
    • Look for a word w accepted by this automaton.
      • If no such w exists, then S |= P.
      • If such a w = w(r) exists, then r is a counterexample, i.e. a run of S such that r ⊯ P.

This algorithm has a time and space complexity equal to: O(|M| x 2^|ϕ|). Model checking and satisfiability problem against an LTL formula is PSPACE-complete.

Inspirations

  • Vardi, Moshe. (1996). An Automata-Theoretic Approach to Linear Temporal Logic. 10.1007/3-540-60915-6_6.

  • Gerth, Rob & Dolech, Den & Peled, Doron & Vardi, Moshe & Wolper, Pierre. (1995). Simple On-the-Fly Automatic Verification of Linear Temporal Logic. Proceedings of the 6th Symposium on Logic in Computer Science. 10.1007/978-0-387-34892-6_1.

  • Courcoubetis, Costas & Vardi, Moshe & Wolper, Pierre & Yannakakis, Mihalis. (2006). Memory-Efficient Algorithms for the Verification of Temporal Properties. 10.1007/BFb0023737.

  • Wolper, Pierre. (2001). Constructing Automata from Temporal Logic Formulas: A Tutorial. LNCS. 2090. 10.1007/3-540-44667-2_7.

You can find this publications in the doc folder.

Overview

To build the code just clone the repo and execute

cargo build --bin mcltl

To run the code just run the command mcltl like this:

./mcltl -k ./tests/test-data/program3.kripke -p 'a U (b or c)'`
Loading kripke file                                                        [OK]
Parsing kripke program                                                     [OK]
Parsing LTL property                                                       [OK]
Converting LTL property in NNF                                             [OK]
Constructing the graph of the LTL property                                 [OK]
Extracting a generalized Buchi automaton                                   [OK]
converting the generalized Buchi automaton into classic Buchi automaton    [OK]
Constructing the product of program and property automata                  [OK]

Result: LTL property does not hold
Cycle containing an accepting state:

INIT → n1: a → n2: a

mcltl-rs's People

Contributors

notbad4u avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.