Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements for SVCOMP 2025 #765

Merged
merged 2 commits into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Dartagnan-SVCOMP.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ else
export DAT3M_HOME=$(pwd)
export DAT3M_OUTPUT=$DAT3M_HOME/output

export OPTFLAGS="-mem2reg -sroa -early-cse -indvars -loop-unroll -fix-irreducible -loop-simplify -simplifycfg -gvn"

skip_assertions_of_type="--program.processing.skipAssertionsOfType=USER"
if [[ $propertypath == *"no-overflow.prp"* ]]; then
export CFLAGS="-fgnu89-inline -fsanitize=signed-integer-overflow"
Expand Down
6 changes: 5 additions & 1 deletion dartagnan/src/main/java/com/dat3m/dartagnan/Dartagnan.java
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ private static void generateWitnessIfAble(VerificationTask task, ProverEnvironme
// ------------------ Generate Witness, if possible ------------------
final EnumSet<Property> properties = task.getProperty();
if (task.getProgram().getFormat().equals(SourceLanguage.LLVM) && modelChecker.hasModel()
&& properties.contains(PROGRAM_SPEC) && properties.size() == 1
&& (properties.contains(PROGRAM_SPEC) || properties.contains(DATARACEFREEDOM)) && properties.size() == 1
&& modelChecker.getResult() != UNKNOWN) {
try {
WitnessBuilder w = WitnessBuilder.of(modelChecker.getEncodingContext(), prover,
Expand Down Expand Up @@ -319,6 +319,10 @@ public static String generateResultSummary(VerificationTask task, ProverEnvironm
}
summary.append("=================================================\n");
}
if (props.contains(DATARACEFREEDOM) && FALSE.equals(model.evaluate(DATARACEFREEDOM.getSMTVariable(encCtx)))) {
summary.append("============= SVCOMP data race found ============\n");
summary.append("=================================================\n");
}
final List<Axiom> violatedCATSpecs = task.getMemoryModel().getAxioms().stream()
.filter(Axiom::isFlagged)
.filter(ax -> props.contains(CAT_SPEC)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -664,9 +664,9 @@ private List<Event> inlinePthreadMutexUnlock(FunctionCall call) {
final Expression lockAddress = call.getArguments().get(0);
final Expression locked = expressions.makeOne(type);
final Expression unlocked = expressions.makeZero(type);
return List.of(
return EventFactory.eventSequence(
EventFactory.Llvm.newLoad(oldValueRegister, lockAddress, Tag.C11.MO_RELAXED),
EventFactory.newAssert(expressions.makeEQ(oldValueRegister, locked), "Unlocking an already unlocked mutex"),
notToInline.contains(AssertionType.USER) ? null : EventFactory.newAssert(expressions.makeEQ(oldValueRegister, locked), "Unlocking an already unlocked mutex"),
EventFactory.Llvm.newStore(lockAddress, unlocked, Tag.C11.MO_RELEASE),
assignSuccess(errorRegister)
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ private static String getLtlPropertyFromSummary(String summary) {
if (summary.contains("user assertion")) {
return "CHECK( init(main()), LTL(G ! call(reach_error())))";
}
if (summary.contains("SVCOMP data race found")) {
return "CHECK( init(main()), LTL(G ! data-race) )";
}
throw new UnsupportedOperationException("Violation found for unsupported property");
}

Expand Down
1 change: 1 addition & 0 deletions svcomp.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ method=eager
encoding.integers=true
svcomp.step=5
svcomp.umax=27
witness=graphml
1 change: 0 additions & 1 deletion svcomp/src/main/java/com/dat3m/svcomp/SVCOMPRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ public static void main(String[] args) throws Exception {
cmd.add("svcomp.properties");
cmd.add(String.format("--%s=%s", PROPERTY, r.property.asStringOption()));
cmd.add(String.format("--%s=%s", BOUND, bound));
cmd.add(String.format("--%s=%s", WITNESS, GRAPHML.asStringOption()));
cmd.add(String.format("--%s=%s", WITNESS_ORIGINAL_PROGRAM_PATH, programPath));
cmd.addAll(filterOptions(config));

Expand Down
Loading