diff options
author | Chantal Keller <Chantal.Keller@lri.fr> | 2022-02-17 10:47:36 +0100 |
---|---|---|
committer | Chantal Keller <Chantal.Keller@lri.fr> | 2022-02-17 10:47:36 +0100 |
commit | bf51e8a18116d3f2f340d3be0444c7e15b2c21cb (patch) | |
tree | 00ae64550607aa8e522b079a4b57ec146f7dd560 /src/trace/smtForm.ml | |
parent | 761a4af555c228a9fdd34ae33f9c842931a592cf (diff) | |
parent | a9e7740b79326a5eeca4bead2c6ad0b5e8010d35 (diff) | |
download | smtcoq-bf51e8a18116d3f2f340d3be0444c7e15b2c21cb.tar.gz smtcoq-bf51e8a18116d3f2f340d3be0444c7e15b2c21cb.zip |
Merge remote-tracking branch 'origin/coq-8.10' into coq-8.11
Diffstat (limited to 'src/trace/smtForm.ml')
-rw-r--r-- | src/trace/smtForm.ml | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/trace/smtForm.ml b/src/trace/smtForm.ml index 0a5f693..2d68252 100644 --- a/src/trace/smtForm.ml +++ b/src/trace/smtForm.ml @@ -1,7 +1,7 @@ (**************************************************************************) (* *) (* SMTCoq *) -(* Copyright (C) 2011 - 2021 *) +(* Copyright (C) 2011 - 2022 *) (* *) (* See file "AUTHORS" for the list of authors *) (* *) @@ -25,7 +25,7 @@ module type ATOM = val is_bool_type : t -> bool val is_bv_type : t -> bool - val to_smt : Format.formatter -> t -> unit + val to_smt : ?debug:bool -> Format.formatter -> t -> unit val logic : t -> logic end @@ -173,12 +173,12 @@ module Make (Atom:ATOM) = to_smt_pform fmt hp.hval; Format.fprintf fmt ")" - and to_smt_pform fmt = function - | Fatom a -> Atom.to_smt fmt a + and to_smt_pform ?(debug=false) fmt = function + | Fatom a -> Atom.to_smt ~debug:debug fmt a | Fapp (op,args) -> to_smt_op fmt op args (* This is an intermediate object of proofs, it correspond to nothing in SMT *) | FbbT (a, l) -> - Format.fprintf fmt "(bbT %a [" Atom.to_smt a; + Format.fprintf fmt "(bbT %a [" (Atom.to_smt ~debug:debug) a; let fi = ref true in List.iter (fun f -> Format.fprintf fmt "%s%a" (if !fi then "" else "; ") @@ -296,34 +296,34 @@ module Make (Atom:ATOM) = let check pf = match pf with | Fatom ha -> if not (Atom.is_bool_type ha) then - raise (Format.eprintf "nwt: %a" to_smt_pform pf; + raise (Format.eprintf "nwt: %a" (to_smt_pform ~debug:true) pf; NotWellTyped pf) | Fapp (op, args) -> (match op with | Ftrue | Ffalse -> if Array.length args <> 0 then - raise (Format.eprintf "nwt: %a" to_smt_pform pf; + raise (Format.eprintf "nwt: %a" (to_smt_pform ~debug:true) pf; NotWellTyped pf) | Fnot2 _ -> if Array.length args <> 1 then - raise (Format.eprintf "nwt: %a" to_smt_pform pf; + raise (Format.eprintf "nwt: %a" (to_smt_pform ~debug:true) pf; NotWellTyped pf) | Fand | For -> () | Fxor | Fimp | Fiff -> if Array.length args <> 2 then - raise (Format.eprintf "nwt: %a" to_smt_pform pf; + raise (Format.eprintf "nwt: %a" (to_smt_pform ~debug:true) pf; NotWellTyped pf) | Fite -> if Array.length args <> 3 then - raise (Format.eprintf "nwt: %a" to_smt_pform pf; + raise (Format.eprintf "nwt: %a" (to_smt_pform ~debug:true) pf; NotWellTyped pf) | Fforall l -> () ) | FbbT (ha, l) -> if not (Atom.is_bv_type ha) then - raise (Format.eprintf "nwt: %a" to_smt_pform pf; + raise (Format.eprintf "nwt: %a" (to_smt_pform ~debug:true) pf; NotWellTyped pf) let declare reify pf = |