Commit cb7689f5 authored by Benoit Barbot's avatar Benoit Barbot
Browse files

add test

parent 2357d026
Pipeline #2091 passed with stages
in 2 minutes and 10 seconds
......@@ -55,23 +55,6 @@ let string_of_style = function
open Format
module Monitor = struct
type t = int * float
let trajectory = ref (0, 0.0)
let new_traj () = trajectory := (0, 0.0)
let print_traj outfile =
fprintf outfile "%i\t%g" (fst !trajectory) (snd !trajectory)
let up_trans s time _ _ =
let t2 = int_of_float time in
s :=
let ap, tt = !s in
((2 * ap) + t2, tt +. time)
end
module Make
(W : Polynomial.WeightStructure)
(Bt : ZoneGraphInput.BoundType)
......@@ -168,6 +151,7 @@ struct
Some (List.hd l)
with
| Exit -> raise Exit
| End_of_file -> exit 1
| _ -> aux ()
in
aux ()
......
......@@ -343,6 +343,42 @@ Test with s<>0
Computing Distribution[floating point; ExpPoly; s=1 inlined; clocks:{x4; x3; x2; x1; x; }; vars:{t; z; s; }] -> 3: [|||]
Sampling: []
$ echo "s\nhelp\nreset\ns\ns" | wordgen twoears.prism --seed 42 --output-format interactive
Precomputation file found ! [0.00]
Reading Distribution[floating point; Poly; no s; clocks:{y; x; }; vars:{t; z; s; }] -> 3
"m.UID x=0" y:0.000000 x:0.000000
[a]-[0;1]--(9.66666666667)->9.66667->"m.UID y=0"
[a]-[1;2]--(5.66666666667)->5.66667->"m.UID y=0"
[b]-[0;2]--(16.3333333333)->16.3333->"m.UID x=0"
>((-10.6666666667+13.5t-3t²+0.166666666667t³)/(5.66666666667))->1.233478[a]
"m.UID y=0" y:0.000000 x:1.233478
[a]-[0;0.766522]--(6-5x+x²)->1.35408->"m.UID y=0"
[b]-[0;1.76652]--(7.5-x-½x²)->5.50579->"m.UID x=0"
>available command : help, step, reset, exit, "t[a]" with t a time and a an action
>
"m.UID x=0" y:0.000000 x:0.000000
[a]-[0;1]--(9.66666666667)->9.66667->"m.UID y=0"
[a]-[1;2]--(5.66666666667)->5.66667->"m.UID y=0"
[b]-[0;2]--(16.3333333333)->16.3333->"m.UID x=0"
>((11.5t-2t²+0.166666666667t³)/(16.3333333333))->0.879989[b]
"m.UID x=0" y:0.879989 x:0.000000
[a]-[0;1]--(3.5)->3.5->"m.UID y=0"
[a]-[1;2]--(2)->2->"m.UID y=0"
[b]-[0;1.12001]--(6-4y+½y²)->2.86724->"m.UID x=0"
>((4t-½t²)/(3.5))->0.537763[a]
"m.UID y=0" y:0.000000 x:0.537763
[a]-[0;0.462237]--(1-x)->0.462237->"m.UID y=0"
[a]-[0.462237;1.46224]--(1)->1->"m.UID y=0"
[b]-[0;2]--(2)->2->"m.UID x=0"
>
[1]
$ wordgen nfm19.prism --seed 42 --frequency 1.0 --exact-rational --output-format state_list | sed 's/[[][0-9]*[.][0-9]*s[]]//g'
Precomputation file found but file have change discard !
Reading Prism automaton file.
......@@ -1053,3 +1089,4 @@ Test expected size
ccaa
aaccaa
aaaaacbccbc
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment