Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec / src / clock_predef.ml @ 70e1006b

History | View | Annotate | Download (1.63 KB)

1
(********************************************************************)
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_bin_univ =
18
  let univ = new_univar () in
19
  new_ck (Carrow (new_ck (Ctuple [univ;univ]) true, univ)) true
20

    
21
let ck_ite =
22
  let univ = new_univar () in
23
  new_ck (Carrow (new_ck (Ctuple [univ;univ;univ]) true, univ)) true
24

    
25
let ck_nullary_univ =
26
  let univ = new_univar () in
27
  univ
28

    
29
let ck_unary_univ =
30
  let univ = new_univar () in
31
  new_ck (Carrow (univ, univ)) true
32

    
33
let ck_bool_to_clock =
34
  let univ = new_univar () in
35
  let cuniv = new_carrier Carry_var false in
36
  new_ck (Carrow (univ, new_ck (Ccarrying (cuniv, univ)) false))
37

    
38
let ck_clock_to_bool =
39
  let univ = new_univar () in
40
  let cuniv = new_carrier Carry_var false in
41
  new_ck (Carrow (new_ck (Ccarrying (cuniv, univ)) false, univ))
42

    
43
(* Local Variables: *)
44
(* compile-command:"make -C .." *)
45
(* End: *)