Skip to content

Commit

Permalink
fix json output and add some integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jérôme FERET authored and antoinepouille committed Mar 28, 2024
1 parent d7494e2 commit 1ecf69b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions core/siteGraphs/signature.ml
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ let one_to_json =
:: acc)
links []))
signature.links );
( "counter_info",
( "counters_info",
JsonUtil.of_option
(fun c -> `Assoc [ "min", JsonUtil.of_option (fun x -> `Int x) c.counter_info_min; "max", JsonUtil.of_option (fun x -> `Int x) c.counter_info_max; "default", `Int c.counter_default_value;])
signature.counters_info );
])

let one_of_json : Yojson.Basic.t -> bool array array site_sig NamedDecls.t =
NamedDecls.of_json (function
| `Assoc [ ("internal_state", a); ("links", b); ("counter_info", c) ] ->
| `Assoc [ ("internal_state", a); ("links", b); ("counters_info", c) ] ->
{
internal_state =
NamedDecls.of_json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
%def: "outputFileName" "data.csv"


%agent: A(c{=0/+=7} c__inverted{=0/+=7})
%agent: A(c{=0/+=7} c__inverted{-=0/=7/+=7})
%agent: B()

%var:/*0*/ 'B' |B()|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ _____(1)
A(c{>=8})
Environment:

%agent: A(c{=0/+=7} c__inverted{=0/+=7})
%agent: A(c{=0/+=7} c__inverted{-=0/=7/+=7})

%plot: [T]
A(c{=0} c__inverted{=7})+ @ 1
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/compiler/site_mismatch/output/LOG.ref
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ every agent may occur in the model
------------------------------------------------------------

Some exceptions have been raised
error: file_name: core/KaSa_rep/frontend/prepreprocess.ml; message: line 719, File "crash.ka", line 4, characters 5-69:: missaligned rule: the rule is ignored; exception:Exit
error: file_name: core/KaSa_rep/frontend/prepreprocess.ml; message: line 752, File "crash.ka", line 4, characters 5-69:: missaligned rule: the rule is ignored; exception:Exit
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
%def: "outputFileName" "data.svg"


%agent: A(c{=0/+=10} c__inverted{=0/+=10})
%agent: A(c{=0/+=10} c__inverted{-=0/=10/+=10})
%agent: B()

%var:/*0*/ 'B' |B()|
Expand Down

0 comments on commit 1ecf69b

Please sign in to comment.