@@ -59,8 +59,8 @@ public void processSubtyping(Predicate expectedType, List<GhostState> list, CtEl
5959 Predicate expected ;
6060 try {
6161 List <GhostState > filtered = filterGhostStatesForVariables (list , mainVars , lrv );
62- premises = premisesBeforeChange .changeStatesToRefinements (filtered , s ). changeAliasToRefinement ( context , f );
63- expected = expectedType .changeStatesToRefinements (filtered , s ). changeAliasToRefinement ( context , f );
62+ premises = premisesBeforeChange .toSolverPredicate (filtered , s , context , f );
63+ expected = expectedType .toSolverPredicate (filtered , s , context , f );
6464 transformChainForDebug (impl , filtered , s , f );
6565 } catch (LJError e ) {
6666 // add location info to error
@@ -186,14 +186,12 @@ public SMTResult verifySMTSubtypeStates(Predicate type, Predicate expectedType,
186186 VCImplication impl = joinPredicates (expectedType , mainVars , lrv , map );
187187 Predicate premisesJoined = impl .toConjunctions ();
188188 List <GhostState > filtered = filterGhostStatesForVariables (states , mainVars , lrv );
189- Predicate premises = Predicate .createConjunction (premisesJoined , type ).changeStatesToRefinements (filtered , s )
190- .changeAliasToRefinement (context , factory );
191- Predicate expected = expectedType .changeStatesToRefinements (filtered , s ).changeAliasToRefinement (context ,
189+ Predicate premises = Predicate .createConjunction (premisesJoined , type ).toSolverPredicate (filtered , s , context ,
192190 factory );
191+ Predicate expected = expectedType .toSolverPredicate (filtered , s , context , factory );
193192 if (!silent ) {
194193 transformChainForDebug (impl , filtered , s , factory );
195- Predicate foundExtra = type .changeStatesToRefinements (filtered , s ).changeAliasToRefinement (context ,
196- factory );
194+ Predicate foundExtra = type .toSolverPredicate (filtered , s , context , factory );
197195 DebugLog .smtStart (impl , foundExtra , expected );
198196 }
199197
@@ -250,9 +248,9 @@ private List<GhostState> filterGhostStatesForVariables(List<GhostState> list, Li
250248 }
251249
252250 /**
253- * Apply the same {@code changeStatesToRefinements} / {@code changeAliasToRefinement} pipeline to each node of a
254- * {@link VCImplication} chain so the structured debug print mirrors the predicates Z3 actually sees. Mutates the
255- * chain in place; safe because {@code joinPredicates} returns a clone.
251+ * Apply the same {@code toSolverPredicate} pipeline to each node of a {@link VCImplication} chain so the structured
252+ * debug print mirrors the predicates Z3 actually sees. Mutates the chain in place; safe because
253+ * {@code joinPredicates} returns a clone.
256254 */
257255 private void transformChainForDebug (VCImplication chain , List <GhostState > filtered , String [] s , Factory f ) {
258256 if (!DebugLog .enabled ())
@@ -261,8 +259,7 @@ private void transformChainForDebug(VCImplication chain, List<GhostState> filter
261259 if (n .getRefinement () == null )
262260 continue ;
263261 try {
264- n .setRefinement (
265- n .getRefinement ().changeStatesToRefinements (filtered , s ).changeAliasToRefinement (context , f ));
262+ n .setRefinement (n .getRefinement ().toSolverPredicate (filtered , s , context , f ));
266263 } catch (LJError ignored ) {
267264 // best-effort transformation for debug; leave node as-is on failure
268265 }
0 commit comments