Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec / src / clock_predef.ml @ e9350b02

History | View | Annotate | Download (1.67 KB)

1 b38ffff3 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 0cbf0839 ploc
14
(** Predefined operator clocks *)
15
open Clocks
16
17 cfdb4fe9 xthirioux
let ck_tuple cl = new_ck (Ctuple cl) true
18
19 0cbf0839 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 70e1006b xthirioux
let ck_nullary_univ =
28
  let univ = new_univar () in
29
  univ
30
31 0cbf0839 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
(* Local Variables: *)
46
(* compile-command:"make -C .." *)
47
(* End: *)