aboutsummaryrefslogtreecommitdiff
path: root/tests/expressions/buildExpression.ml
blob: e8a32c6db4b608bdd3d3e93573f032edb1fde44d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
let u = UTF8.from_utf8string

module M(E:Sym_expr.SYM_EXPR) = struct

  let string =
    let v = E.value (E.T.str @@ u "This is a test string") in
    E.observe v

  let date0 =
    let zero = E.value (E.T.date @@ DataType.Num.zero) in
    E.observe zero

  let true0 =
    let v = E.call0 (u "true") in
    E.observe v

  let f3 =
    let zero = E.value (E.T.num @@ DataType.Num.zero) in
    let v = E.call3 (u "register3") zero zero zero in
    E.observe v

  let calln =
    let zero = E.value (E.T.num @@ DataType.Num.zero) in
    let one = E.value (E.T.num @@ DataType.Num.one) in
    E.observe (E.callN (u "calln") [zero; one])

end