Skip to content

Commit

Permalink
Add logics from free constant types and constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-larraz committed Aug 23, 2024
1 parent 688b7a3 commit 66e2acc
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/transSys.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1809,6 +1809,13 @@ let mk_trans_sys
(* Logic of transition relation *)
TermLib.logic_of_term fun_symbols trans ::

(* Logic of global constraints *)
List.map
(fun t -> TermLib.logic_of_term fun_symbols t)
global_constraints

@

(* Logics of subsystems *)
List.map
(fun (t, _) -> match t.logic with
Expand All @@ -1831,6 +1838,13 @@ let mk_trans_sys
StateVar.type_of_state_var sv
|> TermLib.logic_of_sort
) state_vars)

(* Add logics from types of global constants *)
|> List.rev_append
(List.rev_map (fun v ->
Var.type_of_var v
|> TermLib.logic_of_sort
) global_consts)

(* Join logics to the logic required for this system *)
|> TermLib.sup_logics)
Expand Down
13 changes: 13 additions & 0 deletions tests/regression/success/issue_1043.lus
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
type T = enum { A };

const config_const_array: T ^ 1;

node rising_edge(
i: bool;
) returns (
b: bool;
)
let
b = i and (false -> pre (not i));
--%PROPERTY not b -> true;
tel

0 comments on commit 66e2acc

Please sign in to comment.