Project

General

Profile

« Previous | Next » 

Revision aaa8e454

Added by LĂ©lio Brun 7 months ago

it works

View differences:

src/spec_common.ml
1
open Lustre_types
2 1
open Spec_types
3 2

  
4 3
(* a small reduction engine *)
......
85 84
(* let mk_clocked_on id =
86 85
 *   mk_pred_call (Clocked_on id) *)
87 86

  
88
let mk_transition ?i ?inst id inputs locals outputs =
89
  mk_pred_call
90
    (Transition (id, inst, i, vals inputs, vals locals, vals outputs))
87
let mk_transition ?(mems=Utils.ISet.empty) ?r ?i ?inst id inputs locals outputs =
88
  let tr =
89
    mk_pred_call
90
      (Transition (id, inst, i, vals inputs, vals locals, vals outputs,
91
                  (match r with Some _ -> true | None -> false), mems)) in
92
    (match r, inst with
93
     | Some r, Some inst ->
94
       ExistsMem (id, mk_pred_call (Reset (id, inst, r)), tr)
95
     | _ ->
96
       tr)
91 97

  
92 98
let mk_memory_pack ?i ?inst id =
93 99
  mk_pred_call (MemoryPack (id, inst, i))

Also available in: Unified diff