Project

General

Profile

« Previous | Next » 

Revision 333e3a25

Added by Pierre-Loïc Garoche over 5 years ago

[general] Refactor get_node_eqs to produce (eqs, auts) with automatons

View differences:

src/stateless.ml
36 36
  | Expr_appl (i, e', i') ->
37 37
    check_expr e' &&
38 38
      (Basic_library.is_stateless_fun i || check_node (node_from_name i))
39
and compute_node nd =
40
 List.for_all (fun eq -> check_expr eq.eq_rhs) (get_node_eqs nd)
39
and compute_node nd = (* returns true iff the node is stateless.*)
40
  let eqs, aut = get_node_eqs nd in
41
  aut = [] && (* A node containinig an automaton will be stateful *)
42
      List.for_all (fun eq -> check_expr eq.eq_rhs) eqs
41 43
and check_node td =
42 44
  match td.top_decl_desc with 
43 45
  | Node nd         -> (

Also available in: Unified diff