diff options
Diffstat (limited to 'frontend/typing.ml')
-rw-r--r-- | frontend/typing.ml | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/frontend/typing.ml b/frontend/typing.ml index 883e8e0..83374ed 100644 --- a/frontend/typing.ml +++ b/frontend/typing.ml @@ -136,7 +136,12 @@ let clock_vars rp (node, prefix, _) = then (false, node^"/"^prefix^"init", bool_type)::v else v in - v + let v = + (* root scope is always active *) + if node = "" && prefix = "" + then v + else (false, node^"/"^prefix^"act", bool_type)::v + in v (* extract_all_vars : rooted_prog -> scope -> var list @@ -231,7 +236,9 @@ let root_prog p root no_time_scope init_scope = const_vars; all_vars = [] } in - let root_vars = vars_in_node "" (decls_of_node root_node) in + let root_vars = + (false, "/must_reset", bool_type):: + (vars_in_node "" (decls_of_node root_node)) in let root_clock_vars = clock_vars rp root_scope in { rp with all_vars = root_clock_vars @ |