Skip to content

Commit b0d6df9

Browse files
committed
Remove the iterate SMT option
The `iterate` option, when enabled, made `EcSmt.select` retry the SMT call several times, growing the relevance-selected lemma set on each attempt. Compile and llm modes hard-coded it to true at startup, which silently overrode user-specified bounds: a `smt()` call (max=0) would still ship dozens or hundreds of axioms after one or two retries, and proofs that should fail were closed by lemmas the user never asked for. Interactive mode left iteration off, so the same script behaved differently between batch and REPL. Drop the option entirely: the parsetree field, the parser keyword, the CLI flag, the scope/checkmode/prover_infos plumbing, and the iteration branch in `EcSmt.select`. SMT now always runs a single attempt with the lemma set the user requested.
1 parent cc2baa4 commit b0d6df9

12 files changed

Lines changed: 6 additions & 71 deletions

src/ec.ml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -269,11 +269,6 @@ let main () =
269269
["-profile"]
270270
else [] in
271271

272-
let iterate =
273-
if input.runo_provers.prvo_iterate then
274-
["-iterate"]
275-
else [] in
276-
277272
let why3srv =
278273
input.runo_provers.prvo_why3server
279274
|> omap (fun server -> ["-server"; server])
@@ -311,7 +306,7 @@ let main () =
311306
List.flatten [
312307
maxjobs; timeout; cpufactor; ppwidth;
313308
provers; quorum ; pragmas ; checkall;
314-
profile; iterate; why3srv ; why3 ;
309+
profile; why3srv ; why3 ;
315310
reloc ; noevict; boot ; idirs ;
316311
]
317312
in
@@ -527,7 +522,7 @@ let main () =
527522
Some [State.{ position = 0; goals = None; messages = [] }]
528523
else None in
529524

530-
{ prvopts = {cmpopts.cmpo_provers with prvo_iterate = true}
525+
{ prvopts = cmpopts.cmpo_provers
531526
; input = Some name
532527
; terminal = terminal
533528
; interactive = false
@@ -556,7 +551,7 @@ let main () =
556551
lazy (T.from_channel ~name ~progress:`Silent ~lastgoals (open_in name))
557552
in
558553

559-
{ prvopts = {llmopts.llmo_provers with prvo_iterate = true}
554+
{ prvopts = llmopts.llmo_provers
560555
; input = Some name
561556
; terminal = terminal
562557
; interactive = false
@@ -594,7 +589,6 @@ let main () =
594589
prvo_ppwidth = None;
595590
prvo_checkall = false;
596591
prvo_profile = false;
597-
prvo_iterate = false;
598592
prvo_why3server = None; }
599593
in
600594

@@ -742,7 +736,6 @@ let main () =
742736
EcCommands.cm_provers = state.prvopts.prvo_provers;
743737
EcCommands.cm_quorum = state.prvopts.prvo_quorum;
744738
EcCommands.cm_profile = state.prvopts.prvo_profile;
745-
EcCommands.cm_iterate = state.prvopts.prvo_iterate;
746739
} in
747740

748741
let checkproof = not state.docgen in

src/ecCommands.ml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,6 @@ type checkmode = {
846846
cm_provers : string list option;
847847
cm_quorum : int option;
848848
cm_profile : bool;
849-
cm_iterate : bool;
850849
}
851850

852851
let initial ~checkmode ~boot ~checkproof =
@@ -858,7 +857,6 @@ let initial ~checkmode ~boot ~checkproof =
858857
EcScope.Prover.po_nprovers = Some checkmode.cm_nprovers;
859858
EcScope.Prover.po_provers = (checkmode.cm_provers, []);
860859
EcScope.Prover.po_quorum = checkmode.cm_quorum;
861-
EcScope.Prover.pl_iterate = Some (checkmode.cm_iterate);
862860
} in
863861

864862
let perv = (None, (mk_loc _dummy EcCoreLib.i_Pervasive, None), Some `Export) in

src/ecCommands.mli

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ type checkmode = {
2222
cm_provers : string list option;
2323
cm_quorum : int option;
2424
cm_profile : bool;
25-
cm_iterate : bool;
2625
}
2726

2827
val initial : checkmode:checkmode -> boot:bool -> checkproof:bool -> EcScope.scope

src/ecOptions.ml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ and prv_options = {
6565
prvo_ppwidth : int option;
6666
prvo_checkall : bool;
6767
prvo_profile : bool;
68-
prvo_iterate : bool;
6968
prvo_why3server : string option;
7069
}
7170

@@ -410,7 +409,6 @@ let specs = {
410409
`Spec ("pragmas" , `String, "Comma-separated list of pragmas");
411410
`Spec ("pp-width" , `Int , "pretty-printing width");
412411
`Spec ("profile" , `Flag , "Collect some profiling informations");
413-
`Spec ("iterate" , `Flag , "Force to iterate smt call");
414412
`Spec ("server" , `String, "Connect to an external Why3 server");
415413
]);
416414

@@ -535,7 +533,6 @@ let prv_options_of_values ini values =
535533
end;
536534
prvo_checkall = get_flag "check-all" values;
537535
prvo_profile = get_flag "profile" values;
538-
prvo_iterate = get_flag "iterate" values;
539536
prvo_why3server = get_string "why3server" values;
540537
}
541538

src/ecOptions.mli

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ and prv_options = {
6161
prvo_ppwidth : int option;
6262
prvo_checkall : bool;
6363
prvo_profile : bool;
64-
prvo_iterate : bool;
6564
prvo_why3server : string option;
6665
}
6766

src/ecParser.mly

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@
152152

153153
type smt = [
154154
| `ALL
155-
| `ITERATE
156155
| `QUORUM of int
157156
| `MAXLEMMAS of int option
158157
| `MAXPROVERS of int
@@ -198,7 +197,6 @@
198197
"verbose" ;
199198
"lazy" ;
200199
"full" ;
201-
"iterate" ;
202200
"dumpin" ;
203201
"selected" ;
204202
"debug" ]
@@ -258,7 +256,6 @@
258256
| "lazy" -> `VERSION (get_as_none s o; `Lazy)
259257
| "full" -> `VERSION (get_as_none s o; `Full)
260258
| "all" -> get_as_none s o; (`ALL)
261-
| "iterate" -> get_as_none s o; (`ITERATE)
262259
| "selected" -> get_as_none s o; (`SELECTED)
263260
| "debug" -> get_as_none s o; (`DEBUG)
264261
| _ -> assert false
@@ -274,7 +271,6 @@
274271
let unwanted = ref None in
275272
let verbose = ref None in
276273
let version = ref None in
277-
let iterate = ref None in
278274
let dumpin = ref None in
279275
let selected = ref None in
280276
let debug = ref None in
@@ -318,7 +314,6 @@
318314
| `UNWANTEDLEMMAS d -> unwanted := Some d
319315
| `VERBOSE v -> verbose := Some v
320316
| `VERSION v -> version := Some v
321-
| `ITERATE -> iterate := Some true
322317
| `PROVER p -> List.iter add_prover p
323318
| `DUMPIN f -> dumpin := Some f
324319
| `SELECTED -> selected := Some true
@@ -340,7 +335,6 @@
340335
pprov_version = !version;
341336
plem_all = !all;
342337
plem_max = !mlemmas;
343-
plem_iterate = !iterate;
344338
plem_wanted = !wanted;
345339
plem_unwanted = !unwanted;
346340
plem_dumpin = !dumpin;

src/ecParsetree.ml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,6 @@ type pprover_infos = {
890890
pprov_version : [`Lazy | `Full] option;
891891
plem_all : bool option;
892892
plem_max : int option option;
893-
plem_iterate : bool option;
894893
plem_wanted : pdbhint option;
895894
plem_unwanted : pdbhint option;
896895
plem_dumpin : string located option;
@@ -908,7 +907,6 @@ let empty_pprover = {
908907
pprov_version = None;
909908
plem_all = None;
910909
plem_max = None;
911-
plem_iterate = None;
912910
plem_wanted = None;
913911
plem_unwanted = None;
914912
plem_dumpin = None;

src/ecProvers.ml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,6 @@ type prover_infos = {
401401
pr_verbose : int;
402402
pr_all : bool;
403403
pr_max : int;
404-
pr_iterate : bool;
405404
pr_wanted : hints;
406405
pr_unwanted : hints;
407406
pr_dumpin : string EcLocation.located option;
@@ -418,7 +417,6 @@ let dft_prover_infos = {
418417
pr_quorum = 1;
419418
pr_verbose = 0;
420419
pr_all = false;
421-
pr_iterate = false;
422420
pr_max = 50;
423421
pr_wanted = Hints.empty;
424422
pr_unwanted = Hints.empty;

src/ecProvers.mli

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ type prover_infos = {
4949
pr_verbose : int;
5050
pr_all : bool;
5151
pr_max : int;
52-
pr_iterate : bool;
5352
pr_wanted : hints;
5453
pr_unwanted : hints;
5554
pr_dumpin : string EcLocation.located option;

src/ecScope.ml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,6 @@ module Prover = struct
641641
po_verbose : int option;
642642
pl_all : bool option;
643643
pl_max : int option;
644-
pl_iterate : bool option;
645644
pl_wanted : EcProvers.hints option;
646645
pl_unwanted : EcProvers.hints option;
647646
pl_dumpin : string located option;
@@ -659,7 +658,6 @@ module Prover = struct
659658
po_verbose = None;
660659
pl_all = None;
661660
pl_max = None;
662-
pl_iterate = None;
663661
pl_wanted = None;
664662
pl_unwanted = None;
665663
pl_dumpin = None;
@@ -700,7 +698,6 @@ module Prover = struct
700698
| None , None -> None
701699
| None , Some _ -> Some 0
702700
end;
703-
pl_iterate = ppr.plem_iterate;
704701
pl_wanted = omap (process_dbhint env) ppr.plem_wanted;
705702
pl_unwanted = omap (process_dbhint env) ppr.plem_unwanted;
706703
pl_dumpin = ppr.plem_dumpin;
@@ -720,7 +717,6 @@ module Prover = struct
720717
let pr_verbose = max 0 (odfl dft.pr_verbose options.po_verbose) in
721718
let pr_all = odfl dft.pr_all options.pl_all in
722719
let pr_max = odfl dft.pr_max options.pl_max in
723-
let pr_iterate = odfl dft.pr_iterate options.pl_iterate in
724720
let pr_wanted = odfl dft.pr_wanted options.pl_wanted in
725721
let pr_unwanted = odfl dft.pr_unwanted options.pl_unwanted in
726722
let pr_selected = odfl dft.pr_selected options.pl_selected in
@@ -735,7 +731,7 @@ module Prover = struct
735731
in List.fold_left do_ar l (snd options.po_provers) in
736732

737733
{ pr_maxprocs; pr_provers ; pr_timelimit; pr_cpufactor;
738-
pr_verbose ; pr_all ; pr_max ; pr_iterate ;
734+
pr_verbose ; pr_all ; pr_max ;
739735
pr_wanted ; pr_unwanted; pr_selected ; pr_quorum ;
740736
pr_dumpin ;
741737
gn_debug ; }

0 commit comments

Comments
 (0)