@@ -114,6 +114,11 @@ void MainSolver::insertFormula(PTRef fla) {
114114 throw ApiException (" Top-level assertion sort must be Bool, got " + logic.sortToString (logic.getSortRef (fla)));
115115 }
116116
117+ if (preprocessItesWhenAsserting ()) {
118+ assert (not trackPartitions ());
119+ fla = preprocessFormulaItes (fla, {.perPartition = false }, {.useCache = false });
120+ }
121+
117122 if (trackPartitions ()) {
118123 // MB: Important for HiFrog! partition index is the index of the formula in an virtual array of inserted
119124 // formulas,
@@ -202,6 +207,7 @@ vec<PTRef> MainSolver::preprocessFormulasPerPartition(vec<PTRef> const & frameFo
202207 for (std::size_t i = context.preprocessedFrameAssertionsCount ; i < frameFormulasCount; ++i) {
203208 PTRef fla = frameFormulas[i];
204209 PTRef processed = fla;
210+ assert (not preprocessItesWhenAsserting ());
205211 // Do not use the cache, it is processed for the first time
206212 processed = preprocessFormulaItes (processed, context, {.useCache = false });
207213 processed = preprocessFormulaBeforeFinalTheoryPreprocessing (processed, context);
@@ -257,7 +263,7 @@ PTRef MainSolver::preprocessFormulaItesImpl(PTRef fla, PreprocessingContext cons
257263PTRef MainSolver::preprocessFormula (PTRef fla, PreprocessingContext const & context,
258264 PreprocessFormulaItesConfig const & iteConfig) {
259265 PTRef processed = fla;
260- processed = preprocessFormulaItes (processed, context, iteConfig);
266+ if ( not preprocessItesWhenAsserting ()) { processed = preprocessFormulaItes (processed, context, iteConfig); }
261267 processed = preprocessFormulaBeforeFinalTheoryPreprocessing (processed, context);
262268 preprocessFormulaDoFinalTheoryPreprocessing (context);
263269 processed = preprocessFormulaAfterFinalTheoryPreprocessing (processed, context);
0 commit comments