aboutsummaryrefslogtreecommitdiffstats
path: root/src/verit/verit.ml
diff options
context:
space:
mode:
authorQGarchery <QGarchery@users.noreply.github.com>2018-12-03 08:08:56 +0100
committerckeller <ckeller@users.noreply.github.com>2018-12-03 08:08:56 +0100
commit36548d6634864a131cc83ce21491c797163de305 (patch)
tree283b642e4cdb593ee6add5c4bdeb0ccec1a9258d /src/verit/verit.ml
parent3fdc107b26f475c8fe8b7052de826405b88c14b3 (diff)
downloadsmtcoq-36548d6634864a131cc83ce21491c797163de305.tar.gz
smtcoq-36548d6634864a131cc83ce21491c797163de305.zip
verit also works when it doesn't use the conclusion (#24)
Fixes issue #20
Diffstat (limited to 'src/verit/verit.ml')
-rw-r--r--src/verit/verit.ml31
1 files changed, 3 insertions, 28 deletions
diff --git a/src/verit/verit.ml b/src/verit/verit.ml
index 8eb1b60..16968cc 100644
--- a/src/verit/verit.ml
+++ b/src/verit/verit.ml
@@ -38,31 +38,6 @@ exception Import_trace of int
let get_val = function
Some a -> a
| None -> assert false
-
-(* For debugging certif processing : <add_scertif> <select> <occur> <alloc> *)
-let print_certif c where=
- let r = ref c in
- let out_channel = open_out where in
- let fmt = Format.formatter_of_out_channel out_channel in
- let continue = ref true in
- while !continue do
- let kind = to_string (!r.kind) in
- let id = !r.id in
- let pos = match !r.pos with
- | None -> "None"
- | Some p -> string_of_int p in
- let used = !r.used in
- Format.fprintf fmt "id:%i kind:%s pos:%s used:%i value:" id kind pos used;
- begin match !r.value with
- | None -> Format.fprintf fmt "None"
- | Some l -> List.iter (fun f -> Form.to_smt Atom.to_string fmt f;
- Format.fprintf fmt " ") l end;
- Format.fprintf fmt "\n";
- match !r.next with
- | None -> continue := false
- | Some n -> r := n
- done;
- Format.fprintf fmt "@."; close_out out_channel
let import_trace ra' rf' filename first lsmt =
let chan = open_in filename in
@@ -91,13 +66,13 @@ let import_trace ra' rf' filename first lsmt =
begin match first with
| None -> ()
| Some _ ->
- let cf, lr = order_roots (VeritSyntax.init_index lsmt re_hash)
- !cfirst in
+ let init_index = VeritSyntax.init_index lsmt re_hash in
+ let cf, lr = order_roots init_index !cfirst in
cfirst := cf;
let to_add = VeritSyntax.qf_to_add (List.tl lr) in
let to_add =
(match first, !cfirst.value with
- | Some (root, l), Some [fl] when not (Form.equal l (re_hash fl)) ->
+ | Some (root, l), Some [fl] when init_index fl = 1 && not (Form.equal l (re_hash fl)) ->
let cfirst_value = !cfirst.value in
!cfirst.value <- root.value;
[Other (ImmFlatten (root, fl)), cfirst_value, !cfirst]