Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/smtml/expr.ml
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,8 @@ module Bool = struct
| Some true, _ | _, Some true -> true_
| _ -> binop Ty_bool Or b1 b2

let implies a b = binop Ty_bool Implies a b

let ite c r1 r2 = triop Ty_bool Ite c r1 r2
end

Expand Down
3 changes: 3 additions & 0 deletions src/smtml/expr_intf.ml
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,9 @@ module type S = sig
(** [or_ expr1 expr2] constructs a logical OR expression. *)
val or_ : t -> t -> t

(** [implies expr1 expr2] constructs a logical implication. *)
val implies : t -> t -> t

(** [ite cond then_ else_] constructs an if-then-else expression. *)
val ite : t -> t -> t -> t
end
Expand Down
2 changes: 2 additions & 0 deletions src/smtml/expr_raw.ml
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,7 @@ module Bool = struct

let or_ a b = raw_binop Ty_bool Or a b

let implies a b = raw_binop Ty_bool Implies a b

let ite a b c = raw_triop Ty_bool Ite a b c
end
2 changes: 1 addition & 1 deletion src/smtml/typed.ml
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ module Bool = struct

let[@inline] xor a b = Expr.binop Types.bool Xor a b

let[@inline] implies a b = or_ (not a) b
let[@inline] implies a b = Expr.Bool.implies a b

let[@inline] eq (a : 'a expr) (b : 'a expr) = Expr.relop Types.bool Eq a b

Expand Down