1 |
e2068500
|
Temesghen Kahsai
|
(********************************************************************)
|
2 |
|
|
(* *)
|
3 |
|
|
(* The LustreC compiler toolset / The LustreC Development Team *)
|
4 |
|
|
(* Copyright 2012 - -- ONERA - CNRS - INPT - LIFL *)
|
5 |
|
|
(* *)
|
6 |
|
|
(* LustreC is free software, distributed WITHOUT ANY WARRANTY *)
|
7 |
|
|
(* under the terms of the GNU Lesser General Public License *)
|
8 |
|
|
(* version 2.1. *)
|
9 |
|
|
(* *)
|
10 |
|
|
(* This file was originally from the Prelude compiler *)
|
11 |
|
|
(* *)
|
12 |
|
|
(********************************************************************)
|
13 |
|
|
|
14 |
|
|
(** Predefined operator clocks *)
|
15 |
|
|
open Clocks
|
16 |
|
|
|
17 |
|
|
let ck_tuple cl = new_ck (Ctuple cl) true
|
18 |
|
|
|
19 |
|
|
let ck_bin_univ =
|
20 |
|
|
let univ = new_univar () in
|
21 |
|
|
new_ck (Carrow (new_ck (Ctuple [univ;univ]) true, univ)) true
|
22 |
|
|
|
23 |
|
|
let ck_ite =
|
24 |
|
|
let univ = new_univar () in
|
25 |
|
|
new_ck (Carrow (new_ck (Ctuple [univ;univ;univ]) true, univ)) true
|
26 |
|
|
|
27 |
|
|
let ck_nullary_univ =
|
28 |
|
|
let univ = new_univar () in
|
29 |
|
|
univ
|
30 |
|
|
|
31 |
|
|
let ck_unary_univ =
|
32 |
|
|
let univ = new_univar () in
|
33 |
|
|
new_ck (Carrow (univ, univ)) true
|
34 |
|
|
|
35 |
|
|
let ck_bool_to_clock =
|
36 |
|
|
let univ = new_univar () in
|
37 |
|
|
let cuniv = new_carrier Carry_var false in
|
38 |
|
|
new_ck (Carrow (univ, new_ck (Ccarrying (cuniv, univ)) false))
|
39 |
|
|
|
40 |
|
|
let ck_clock_to_bool =
|
41 |
|
|
let univ = new_univar () in
|
42 |
|
|
let cuniv = new_carrier Carry_var false in
|
43 |
|
|
new_ck (Carrow (new_ck (Ccarrying (cuniv, univ)) false, univ))
|
44 |
|
|
|
45 |
d50b0dc0
|
Temesghen Kahsai
|
let ck_carrier id ck =
|
46 |
|
|
new_ck (Ccarrying (new_carrier (Carry_const id) true, ck)) true
|
47 |
e2068500
|
Temesghen Kahsai
|
(* Local Variables: *)
|
48 |
|
|
(* compile-command:"make -C .." *)
|
49 |
|
|
(* End: *)
|