[Lustre -> intermediate] fix for the [pre] construct
This commit is contained in:
parent
77c865e360
commit
aa7f7514d3
@ -19,6 +19,9 @@ let ast_to_intermediate_ast (nodes: t_nodelist) (h: node_states): i_nodelist =
|
||||
| None -> IEVar (CVInput (name_of_var v))
|
||||
| Some (s, i) -> IEVar (CVStored (s, i))
|
||||
end
|
||||
| EMonOp (_, MOp_pre, EVar (_, v)) ->
|
||||
let s, i = Hashtbl.find hloc (Utils.name_of_var v, true) in
|
||||
IEVar (CVStored (s, i))
|
||||
| EMonOp (_, op, e) -> IEMonOp (op, ast_to_intermediate_ast_expr hloc e)
|
||||
| EBinOp (_, op, e, e') ->
|
||||
IEBinOp (op, ast_to_intermediate_ast_expr hloc e, ast_to_intermediate_ast_expr hloc e')
|
||||
|
@ -1,9 +1,6 @@
|
||||
node n (i: int) returns (o: int);
|
||||
var v, t: int; a, b: bool;
|
||||
var v: int;
|
||||
let
|
||||
a = true -> false;
|
||||
b = a and not (pre a);
|
||||
o = 1;
|
||||
v = pre o;
|
||||
t = o + pre i;
|
||||
tel
|
||||
|
Loading…
Reference in New Issue
Block a user