Skip to content

Interpolation-based Transition Invariants for Termination#159

Open
BritikovKI wants to merge 90 commits into
masterfrom
safe-nonterm-exp
Open

Interpolation-based Transition Invariants for Termination#159
BritikovKI wants to merge 90 commits into
masterfrom
safe-nonterm-exp

Conversation

@BritikovKI
Copy link
Copy Markdown
Member

Extension of the safety-based nontermination detection with the parallel construction of transition invariants for transition relation reusing detected terminating traces by the safety-based nontermination.

These transition invariants are used to attempt proving termination during the nontermination detection procedure.

@BritikovKI
Copy link
Copy Markdown
Member Author

The implementation of interpolation-based generation of well-founded transition invariants for Termination proofs.

The changes to SingleLoopTransformations are made to make initial states meaningful. Instead of being a negation of all locations, it is now the locations which can be initial + corresponding variable values.

@BritikovKI BritikovKI force-pushed the safe-nonterm-exp branch 4 times, most recently from d75d58e to 8d885de Compare March 2, 2026 10:07
@BritikovKI BritikovKI marked this pull request as ready for review March 3, 2026 11:03
@BritikovKI BritikovKI force-pushed the safe-nonterm-exp branch 4 times, most recently from c8d751a to 2eca1f7 Compare March 3, 2026 15:14
Copy link
Copy Markdown
Member

@blishko blishko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few comments from first glance.
I'll take a proper look at the algorithm later.

Comment thread src/termination/ReachabilityNonterm.cc Outdated
Comment thread src/termination/ReachabilityNonterm.cc Outdated
Comment on lines +89 to +93
auto it = logic.getPterm(atom).begin();
while (it != logic.getPterm(atom).end()) {
unrollAtom(logic, coefs, *it, reverse);
it++;
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is safe, since you are potentially creating new terms in unrollAtom.
You have to use index access to subterms.

Comment thread src/termination/ReachabilityNonterm.cc Outdated
}

// This function is needed to extract specific atoms from the arithmetic formula
void unrollAtom(ArithLogic & logic, std::vector<PTRef> & coefs, PTRef atom, bool reverse) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand the purpose of this function.

}

// Function to turn everything in <= formulas
void lequalize(PTRef conjunct, vec<PTRef> & leqs, vec<PTRef> & bools, ArithLogic & logic) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't Logic already do this for you?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I need to check
From what I get at least equalities remain in the formulas
We also introduce some >= during preprocessing
Otherwise you might be right...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I just wanted to double check.

Comment thread src/termination/ReachabilityNonterm.cc Outdated
Comment thread src/termination/ReachabilityNonterm.cc Outdated
Comment thread src/termination/ReachabilityNonterm.cc Outdated
@BritikovKI BritikovKI force-pushed the safe-nonterm-exp branch 2 times, most recently from e68c993 to 4850548 Compare March 23, 2026 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants