Skip to content

Complete rt-inconsistency check#784

Open
hauff wants to merge 1 commit into
devfrom
wip/mf/rtiPreCheck
Open

Complete rt-inconsistency check#784
hauff wants to merge 1 commit into
devfrom
wip/mf/rtiPreCheck

Conversation

@hauff

@hauff hauff commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

This PR extends the existing rt-inconsistency analysis such that it uses a pre-computed candidate set.

@danieldietsch

Copy link
Copy Markdown
Member

Could you rebase this PR, then I can take a look.

- Implemented complete rt-Inconsistency pre-check
@hauff hauff force-pushed the wip/mf/rtiPreCheck branch from e839dfe to 1829bd8 Compare June 12, 2026 10:09
@hauff

hauff commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

Could you rebase this PR, then I can take a look.

@danieldietsch done.

ARCH="linux"
ARCHPATH="products/CLI-E4/linux/gtk/x86_64"
ADDS+=("adds/z3" "adds/cvc4nyu" "adds/cvc4" "adds/mathsat")
ADDS+=("adds/z3" "adds/cvc4nyu" "adds/cvc4" "adds/mathsat" "adds/mus_enumerator")

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.

Does mus_enumerator have a licence? You also need to add some info to our READMEs.

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.

Is the name still meaningful?

import de.uni_freiburg.informatik.ultimate.smtinterpol.muses.Translator;
import de.uni_freiburg.informatik.ultimate.smtinterpol.smtlib2.SMTInterpol;

public class CompleteRtInconsistencyCheck {

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.

This class would benefit from comments... E.g., I cannot tell what most of the fields of the CritPhase record are supposed to be.

private final IUltimateServiceProvider mServices;
private final ILogger mLogger;
private final CompleteRtInconsistencyCheckMode mMode;
final Map<String, AnnotatedReq> mAnnotatedReqs;

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.

Why no visibility here?

}

public List<Entry<PatternType<?>, PhaseEventAutomata>[]> check() {
// TODO: Add option to filter groups and muses with size 1

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.

Why, what would that do? Are you planning on doing that todo for this PR, or is this for the future?

private final IIdentifierTranslator[] mIdentifierTranslators;
private final IReqSymbolTable mReqSymboltable;
private final Boogie2SMT mBoogieToSmt;
protected final Boogie2SMT mBoogieToSmt;

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.

No

final List<Statement> stmtList = new ArrayList<>();
final List<Entry<PatternType<?>, PhaseEventAutomata>[]> subsets = CrossProducts.subArrays(
consideredAutomata.toArray(new Entry[count]), actualCombinationNum, new Entry[actualCombinationNum]);
List<Entry<PatternType<?>, PhaseEventAutomata>[]> subsets = new ArrayList<>();

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.

Dont initialize if you override

if (mCompleteRtInconsistencyCheck) {
subsets = mRtInconcistencyConditionGenerator.doRtiPreCheck(mReqPeas, mCompleteRtInconsistencyCheckMode);
if (mCompleteRtInconsistencyCheckCandidateExtraction) {
return new ArrayList<>();

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.

Use ArrayList.empty

private static final boolean DEF_COMPLETE_RT_INCONSISTENCY_CHECK = true;
private static final String DESC_COMPLETE_RT_INCONSISTENCY_CHECK = """
This check allows for a fast and complete analysis for rt-inconsistency by reducing the number of \
requirement combinations that need to be checked.""";

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.

You could point to some paper in the description.

return results;
}

public static class SubsetSolver {

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.

Its weird to have that as public static class -- are you sure you need to expose both solvers and cannot hide them completely?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants