Skip to content

Commit 8b69662

Browse files
committed
Add Expr_raw module that only builds unsimplified expressions
1 parent c541033 commit 8b69662

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

src/smtml/Expr_raw.ml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
include Expr
2+
3+
let unop = raw_unop
4+
5+
let binop = raw_binop
6+
7+
let triop = raw_triop
8+
9+
let relop = raw_relop
10+
11+
let cvtop = raw_cvtop
12+
13+
let naryop = raw_naryop
14+
15+
let extract ~high ~low = raw_extract ~high ~low
16+
17+
let concat = raw_concat
18+
19+
let simplify = Fun.id
20+
21+
module Bool = struct
22+
let true_ = Bool.true_
23+
24+
let false_ = Bool.false_
25+
26+
let v = Bool.v
27+
28+
let not a = raw_unop Ty_bool Not a
29+
30+
let equal a b = raw_relop Ty_bool Eq a b
31+
32+
let distinct a b = raw_relop Ty_bool Ne a b
33+
34+
let and_ a b = raw_binop Ty_bool And a b
35+
36+
let or_ a b = raw_binop Ty_bool Or a b
37+
38+
let ite a b c = raw_triop Ty_bool Ite a b c
39+
end

src/smtml/dune

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
dolmenexpr_to_expr
2525
eval
2626
expr
27+
expr_raw
2728
interpret
2829
interpret_intf
2930
lexer

0 commit comments

Comments
 (0)