mirror of
https://github.com/c-cube/sidekick.git
synced 2025-12-07 11:45:41 -05:00
Fixed bug in smtlib translation
This commit is contained in:
parent
384bcb7270
commit
c6dd201014
2 changed files with 5 additions and 4 deletions
|
|
@ -52,7 +52,7 @@ module Fsmt = struct
|
|||
let add_label _ _ = ()
|
||||
|
||||
let print fmt = function
|
||||
| Prop i -> Format.fprintf fmt "%s%s%d" (if i < 0 then "¬ " else "") (if i mod 2 = 0 then "v" else "f") (abs i)
|
||||
| Prop i -> Format.fprintf fmt "%s%s%d" (if i < 0 then "¬ " else "") (if i mod 2 = 0 then "v" else "f") ((abs i) / 2)
|
||||
| Equal (a, b) -> Format.fprintf fmt "%s = %s" a b
|
||||
| Distinct (a, b) -> Format.fprintf fmt "%s ≠ %s" a b
|
||||
|
||||
|
|
|
|||
|
|
@ -46,9 +46,10 @@ let left_assoc s f = function
|
|||
| x :: r -> List.fold_left f x r
|
||||
| _ -> raise (Bad_arity s)
|
||||
|
||||
let right_assoc s f = function
|
||||
| x :: r -> List.fold_right f r x
|
||||
| _ -> raise (Bad_arity s)
|
||||
let rec right_assoc s f = function
|
||||
| [] -> raise (Bad_arity s)
|
||||
| [x] -> x
|
||||
| x :: r -> f x (right_assoc s f r)
|
||||
|
||||
let translate_atom = function
|
||||
| TermSpecConst(_, const) -> translate_const const
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue