Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec / src / clock_predef.ml @ b38ffff3

History | View | Annotate | Download (1.57 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_unary_univ =
26
  let univ = new_univar () in
27
  new_ck (Carrow (univ, univ)) true
28

    
29
let ck_bool_to_clock =
30
  let univ = new_univar () in
31
  let cuniv = new_carrier Carry_var false in
32
  new_ck (Carrow (univ, new_ck (Ccarrying (cuniv, univ)) false))
33

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

    
39
(* Local Variables: *)
40
(* compile-command:"make -C .." *)
41
(* End: *)