Code Monkey home page Code Monkey logo

imitator-model-checker / imitator Goto Github PK

View Code? Open in Web Editor NEW
26.0 10.0 12.0 51.51 MB

IMITATOR is a parametric timed model checker taking as input extensions of parametric timed automata, and synthesizing parameter valuations for safety properties and more.

Home Page: https://www.imitator.fr/

License: GNU General Public License v3.0

Shell 0.08% Python 18.75% OCaml 71.48% Standard ML 0.11% HTML 0.17% JavaScript 9.40% Dockerfile 0.01%
model-checking model-checker real-time-systems reachability-synthesis parameter-synthesis timed-automata

imitator's Introduction

imitator

CI GitHub

IMITATOR [Andre21] is an open source software tool to perform automated parameter synthesis for concurrent timed systems.

IMITATOR takes as input a network of IMITATOR parametric timed automata (NIPTA): NIPTA are an extension of parametric timed automata [AHV93], a well-known formalism to specify and verify models of systems where timing constants can be replaced with parameters, i.e., unknown constants. The input formalism can be seen as a subclass of parametric linear hybrid automata, with constant clock rates (which includes stopwatches and multi-rate automata).

IMITATOR addresses several variants of the following problem: given a concurrent timed system, what are the values of the timing constants that guarantee that the model of the system satisfies some property? Specifically, IMITATOR implements:

  • parameter synthesis for a subset of TCTL, including safety, reachability, unavoidability…, and their timed counterpart, such as $E \phi U_[p; p+1) \psi$ [AHV93] [JLR15],
  • minimal-time and minimal-parameter reachability synthesis [ABPP19],
  • parametric deadlock-freeness checking [Andre16],
  • cycle-existence synthesis [NPP18] [AAPP21],
  • cycle-existence synthesis under the non-Zenoness assumption [ANPS17],
  • the inverse method (also known as (robust) language or trace preservation synthesis) [ACEF09] [AS11] [AM15],
  • the behavioral cartography [AF10], and
  • parametric reachability preservation (PRP and PRPC) [ALNS15].

Numerous analysis options are available.

IMITATOR is able to run in a distributed fashion on a cluster for a selected algorithm (PRPC).

IMITATOR is mainly a command-line tool, but that can output results in graphical form.

IMITATOR was able to verify numerous case studies from the literature and from the industry, such as communication protocols, hardware asynchronous circuits, schedulability problems with uncertain periods and various other systems such as coffee machines (probably the most critical systems from a researcher point of view). Numerous benchmarks are available in the official IMITATOR benchmarks library, or on GitHub.

For more info, please visit imitator.fr

Keywords

formal verification, model checking, software verification, parameter synthesis, parametric timed automata, TCTL

References

[AAPP21] Étienne André, Jaime Arias, Laure Petrucci and Jaco van de Pol. Iterative Bounded Synthesis for Efficient Cycle Detection in Parametric Timed Automata. In Jan Friso Groote and Kim G. Larsen (eds.), TACAS’21, Springer LNCS, April 2021.

[ABPP19] Étienne André, Vincent Bloemen, Laure Petrucci and Jaco van de Pol. Minimal-Time Synthesis for Parametric Timed Automata. In Tomas Vojnar and Lijun Zhang (eds.), TACAS’19, Springer LNCS, April 2019.

[ACEF09] Étienne André, Thomas Chatain, Emmanuelle Encrenaz and Laurent Fribourg. An Inverse Method for Parametric Timed Automata. International Journal of Foundations of Computer Science 20(5), pages 819–836, 2009.

[AF10] Étienne André and Laurent Fribourg. Behavioral Cartography of Timed Automata. In Antonín Kučera and Igor Potapov (eds.), RP’10, LNCS 6227, Springer, pages 76–90, September 2010.

[AHV93] Rajeev Alur, Thomas A. Henzinger and Moshe Y. Vardi. Parametric real-time reasoning. STOC’93, ACM, pages 592–601, 1993.

[ALNS15] Étienne André, Giuseppe Lipari, Nguyễn Hoàng Gia and Sun Youcheng. Reachability Preservation Based Parameter Synthesis for Timed Automata. In Klaus Havelund, Gerard Holzmann, Rajeev Joshi (eds.), NFM’15, LNCS 9058, Springer, pages 50–65, April 2015.

[AM15] Étienne André and Nicolas Markey. Language Preservation Problems in Parametric Timed Automata. In Sriram Sankaranarayanan and Enrico Vicario (eds.), FORMATS’15, Springer LNCS, September 2015.

[Andre16] Étienne André. Parametric Deadlock-Freeness Checking Timed Automata. In Augusto Cesar Alves Sampaio and Farn Wang (eds.), ICTAC’16, LNCS 9965, Springer, pages 469–478, October 2016.

[Andre21] Étienne André. IMITATOR 3: Synthesis of timing parameters beyond decidability. In Rustan Leino and Alexandra Silva (eds.), CAV’21, Springer LNCS 12759, pages 1-14, July 2021.

[ANPS17] Étienne André, Nguyễn Hoàng Gia, Laure Petrucci and Sun Jun. Parametric model checking timed automata under non-Zenoness assumption. In Clark Barrett and Temesghen Kahsai (eds.), NFM’17, Springer LNCS 10227, pages 35–51, May 2017.

[AS11] Étienne André and Romain Soulat. Synthesis of Timing Parameters Satisfying Safety Properties. RP 2011: 31-44, 2011.

[JLR15] Aleksandra Jovanovic, Didier Lime, Olivier H. Roux. Integer Parameter Synthesis for Real-Time Systems. IEEE Transactions on Software Engineering 41(5): 445–461, 2015.

[NPP18] Hoang Gia Nguyen, Laure Petrucci, Jaco van de Pol. Layered and Collecting NDFS with Subsumption for Parametric Timed Automata. ICECCS 2018: 1-9, 2018.

imitator's People

Contributors

alban-linard avatar coti avatar dylanmarinho avatar etienneandre avatar himito avatar hoangia90 avatar jacopol avatar laurepetrucci avatar lbinria avatar melentan avatar mikaelbdj avatar rossestephan avatar rsoulat avatar sami-evangelista avatar sarahhadbi avatar sebbadk avatar tomaz1502 avatar ukuehne avatar vbloemen avatar yiyayiyayoucheng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

imitator's Issues

":" in filenames under benchmarks

Several filenames in benchmark directory contain the character ":" which results in an illegal file name under Windows.
As a result, the imitator repository cannot be checked out under Windows.
Example:
error: invalid path 'benchmarks/ATM/fig1-DCLXZL18:fixed.imi'

Not_Found error when using variable in init expression if autoremove

Description

A Not_Found error is raised when we using a variable in a init expression (discrete or continuous section) that was previously removed by auto remove. This bug already exist in version 3.0.0.

Example :

int i;
(* i is not used *)

b := i > 0

Solution

Variables that are dependent of a used variable are keep.

Integration study of binary word expressions

Goal

Study of binary word expressions integration:

  • Literal form of binary word
  • Operations we can make on binary word expressions
  • Definition of functions that can act on binary word expressions

Finish

The study is validated by Etienne and collaborators.

Error on init when using constant and literal

Description

An error is raised when using a constant and a literal in the init section, because the literal is not inferred before the init expression trying to reduce.

Example :

b := i = 0 with i = 0 : int;

Solution

Just have to return inferred expression when doing the type checking on assignment. Then use this inferred expression when trying to reduce.

Allow several reachability conditions

Allow several reachability conditions… and not only one loc in one PTA
(at least several pairs PTA/location or, even better, pairs PTA/set of locations)

Move not operator to discrete_boolean_expression

Finish

  • not operator is moved in grammar, parsing structure, abstract model
  • not operator is moved on all pattern matching
  • All non regression tests pass successfully
  • Behavior of IMITATOR with not is the same as previously

Add pow function

Goal

Add a pow function that compute power of an arithmetic expression.

Finish

  • Can use pow function without parsing error
  • pow function used with a non arithmetic expression should raise a type error
  • pow function has correct behavior
  • Non regression tests are created and all passed : type checking, pow function works
  • Use manual, grammar and built-in functions section are updated

Allow urgent locations

Allow urgent locations in the input model.
No theoretical issue (and can be already be simulated using an extra clock), but having it coded in the tool would probably make the analysis faster.

Allow testing locations of automata in guards

Allowing testing locations of automata in guards:
e.g.
when x > p & i <> 1 & loc[pta1] = loc1 & loc[pta2] <> loc2 do …

Additional questions: what about invariants?
invariant x > p & i <> 1 & loc[pta1] = loc1 & loc[pta2] <> loc2
needs to control whether pta1 stays in loc1 and pta2 stays out of loc2 during the entire time when this invariant is satisfied. Not easy! Just forbid this syntax in invariants?!

Check user manual

Goal

Compare grammar of manual with grammar parser

Finish

  • Grammar manual and grammar parser are equivalent
  • Grammar manual highlight semantic use

No type control on continuous constraints init

Description

We can assign a int to a clock / parameter in continuous init. The behavior of IMITATOR is altered, so we should forbid incompatible type assignment.

Solution

We check that all constraints initialization only use rational valued variables.

Add and manage `shift_left` and `shift_right` functions on binary word expressions

Goal

We can use shift_left(b, i), shift_right(b, i), fill_left(b, i) and fill_right(b, i)` logical functions on binary word expressions.

Finish

  • No parsing error
  • We can use shift_left(b, i), shift_right(b, i), fill_left(b, i) and fill_right(b, i)` functions in inits / constant declarations / guards / invariants / updates / conditionals
  • shift_left(b, i), shift_right(b, i), fill_left(b, i) and fill_right(b, i)` functions behavior is correct
  • Type checking is make and correct
  • Non regression tests created and succeed

Parsing error on literal boolean comparison

Description

There is a parsing error when comparing variable, constant to literal boolean.
For example :
b = True should be written as b = (True) in order to work.

Solution

We have to move True and False literals from boolean_expression to discrete_boolean_expression and manage it as constants.

Add bitwise logical boolean functions on binary word expressions

Goal

We can use logand(b1, b2), logor(b1, b2), logxor(b1, b2) and lognot(b) bitwise logical functions on binary word expressions.

Finish

  • No parsing error
  • We can use functions in inits / constant declarations / guards / invariants / updates / conditionals
  • functions behavior is correct
  • Type checking is make and correct
  • Non regression tests created and succeed
  • User manual updated

Symbolic variables

Allow symbolic variables, equivalent to "clocks" stopped in any location (no elapsing, but can be compared to, and assigned to, clocks and parameters).
E.g.:

s : symbolic;

invariant x < s + p 
when x = s + p - 1 do {x := s; s := p + i} goto …

So implementation would be a simple equivalence to stopwatches.

Check boolean comparison semantic

Goal

Check that is not possible to compare two boolean with ordinal operator

Finish

  • An error is raised when comparing two boolean with any ordinal operator
  • Non regression tests created

clock used in initialisation is removed

Consider the following PTA:

var x,y: clock;
automaton P
   loc s0: invariant True when x<=1 goto s0;
end
init := loc[P]=s0 & x>=0 & x=y;

This PTA is refuted by imitator:
imitator error1.imi

Apparently, clock y is removed, despite the fact that it is used in the initial condition.
But then imitator complains that clock y has not been declared:

*** Warning: The clock `y` is declared but never used in the model; it is therefore removed from the model.
*** ERROR: The variable `y` used in a linear constraint was not declared.

Safe set is wrong using -mode EF

In the attached model (see here: Sched2.50.0.zip) the safe set is reported as

  b >= 10
 & C3_WORST >= 20
 & 50 > b + C3_WORST
 & 22 >= b

which includes the point C3_WORST=19 & b=23.

However, modifying the model to add these as initial constraints and re-running with -mode EF leads to the False predicate over the parameters (modified model included in zip).

This is also validated by translating the model to uppaal.

A possibly valid set of (negative) constraints is given in SMT-format here:
https://rise4fun.com/Z3/xhg6

Bug: Counting Unsuccessful points function is not correct

for example run FlipFlop example with command : mpiexec -n 4 ./bin/imitator ~/imitator/examples/Flipflop/flipflop.imi ~/imitator/examples/Flipflop/flipflop.v0 -mode cover -distributed sequential


END OF THE BEHAVIORAL CARTOGRAPHY ALGORITHM
[Worker 3] Total waiting time : 2.37452983857 s
[Worker 3] Total working time : 65.4569101334 s
[Worker 3] Occupancy : 96.499366902 %
Size of V0: 2000
Unsuccessful points: 3461016356684568350
139 different constraints were computed.
Average number of states : 473
Average number of transitions : 705
Global time spent : 67.8365471364 s
Time spent on IM : 189.584782363 s
Time spent to compute next point: 2.1892092228 s


[Master] Total waiting time : 64.8895375729 s


Add new algorithm AF-synthesis

Add new algorithm AF-synthesis (see, e.g., [JLR13, TACAS]).

(this is just a first test of handling features using github)

Syntactic and semantic array integration

Description

  • Add necessary grammar rules that permit declaration and use of array as variable or literal
  • Add type inference and type checking on array
  • Add possibility to declare and use nested array
  • Add possibility to compare structurally two arrays
  • Add possibility to use arrays in property

Finish

  • We can declare and use array of any discrete type
  • Literal numbers of arrays are correctly inferred
  • Array are correctly type checked
  • Comparison of two arrays has a correct behavior

Introduce binary word type

Goal

Introduce a new type: binary word. It's a type that represent an array of bits. We should be able to make any bit-wise logical operations on binary word.

Add modulo function

Goal

We can use mod(x, i) functions on arithmetic expressions.

Finish

  • No parsing error
  • We can use mod(x, i) function in inits / constant declarations / guards / invariants / updates / conditionals
  • mod(x, i) function behavior is correct
  • Type checking is make and correct
  • Non regression tests created and succeed

Create a mode "result only"

Add (or correct!) a "verbose" mode that only displays the result. Useful to compare the speed of algorithms without being slowed down by pretty printings.

Add "not equal" in the syntax

Currently, "not equal" can be simulated with 2 transitions, one using >, the other using <.
But a syntax allowing "not equal" (<> or =!=) would be more intuitive and make models more compact.

Automated variable removal does not consider constraints in the initial state definition

The following program raises an exception (The variable 'x2' used in a linear constraint was not declared.) because of the automated variable elimination.

var

(* Clocks *)
 	x1, x2
		: clock;

(************************************************************)
  automaton myPTA
(************************************************************)
synclabs: ;

loc myLoc: while True wait {}

end (* train *)


(************************************************************)
(* Initial state *)
(************************************************************)

init :=
	(*------------------------------------------------------------*)
	(* Initial location *)
	(*------------------------------------------------------------*)
	& loc[myPTA]     = myLoc

	(*------------------------------------------------------------*)
	(* Initial clock constraints *)
	(*------------------------------------------------------------*)
		&
		x1 > x2
;


(************************************************************)
(* The end *)
(************************************************************)
end

Add `cast_rational_to_int` function

Goal

Add a cast_rational_to_int function that try to convert a rational expression to an int expression.

Finish

  • Can use cast_rational_to_int function without parsing error
  • cast_rational_to_int function used with a non arithmetic expression should raise a type error
  • cast_rational_to_int function used with a int expression should raise a type error
  • cast_rational_to_int function has correct behavior
  • Non regression tests are created and all passed : type checking, cast_rational_to_int function works
  • User manual, grammar and built-in functions section are updated

int function

Goal

Create a int function for making int from literals

Array access integration

Description

  • Add necessary grammar rules that permit access to an array or nested array
  • Add type inference and type checking on array access
  • Add possibility to use array access in property

Finish

  • We can access to an element of an array
  • Element types of arrays are correctly inferred and type checked

Array implementation

Description

  • Ability to create array of any discrete type
  • Ability to access to an element of an array
  • Add some utility functions on array

Add and manage binary word expressions

Goal

We can use new binary word type through variables, constant and literal form.

Finish

  • We can declare a binary word constant or variable
  • We can initialize a binary word expressions
  • We can compare two binary word expressions
  • We can use literal binary word in guards / invariant / update / conditionals
  • Type checking on binary word is correct
  • The behavior when comparing two binary word expressions is correct
  • Non regression tests created and succeed
  • User manual updated

Permit boolean comparison

Goal

Permit boolean comparison with equal, different operator in any non linear expression : guard, invariant, update, conditional.

Finish

  • We can compare two boolean expressions without any syntax or semantic error
  • We cannot compare two boolean expression with relational operator
  • The behavior of IMITATOR reachability algorithm is correct
  • Boolean expression comparison are correctly printed (graphics, translation)
  • New and old non regression tests pass with success

Not_Found error when assign a constant in discrete init

Description

A Not_Found error is raised when assign a constant in a discrete init

var 
    x,
        : clock;
    i = 1, 
        : int;
    p
        : parameter;

init := {

    discrete = 
        i := 1
    ;
    
}

## Solution

I just had to check that variable is a constant or variable. In case of constant, it raise an `InvalidExpression` exception with an appropriate message. 

Add int_of_binary and binary_of_int function on binary word expressions

Goal

We can use int_of_binary(b), binary_of_int(i) functions on binary word expressions.

Finish

  • No parsing error
  • We can use functions in inits / constant declarations / guards / invariants / updates / conditionals
  • functions behavior is correct
  • Type checking is make and correct
  • Non regression tests created and succeed
  • User manual updated

Able to initialize a constant with another constant

Description

Being able to initialize a constant with another previously declared constant. For the moment it raise an error "Assignment of variable x is forbidden" because it doesn't found any constant in parsed_model, when reducing the parse tree at let evaluated_constants

Example :

    i = 1, j = i + 1
        : rational;

Finish

  • We are able to initialize a constant with another constant without any semantic or syntactic error
  • Behavior is correct
  • Non regression test init_state/init-constant-with-constant pass

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.