Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec / src / clock_predef.ml @ e8250987

History | View | Annotate | Download (1.76 KB)

1 a2d97a3e ploc
(********************************************************************)
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 22fe1c93 ploc
14
(** Predefined operator clocks *)
15
open Clocks
16
17 70df2f87 xthirioux
let ck_tuple cl = new_ck (Ctuple cl) true
18
19 22fe1c93 ploc
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 ef34b4ae xthirioux
let ck_nullary_univ =
28
  let univ = new_univar () in
29
  univ
30
31 22fe1c93 ploc
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 ec433d69 xthirioux
let ck_carrier id ck =
46
 new_ck (Ccarrying (new_carrier (Carry_const id) true, ck)) true
47 22fe1c93 ploc
(* Local Variables: *)
48
(* compile-command:"make -C .." *)
49
(* End: *)