Skip to content

Commit

Permalink
Merge branch 'development_rework' into fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasHaas committed Jul 15, 2023
2 parents a07e1c8 + a201493 commit cdf266a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ You can also run Dartagnan from the console:
```
java -jar dartagnan/target/dartagnan-3.1.1.jar <CAT file> [--target=<arch>] <program file> [options]
```
For programs written in `.c` and `.bpl`, value `<arch>` specifies the programming language or architectures to which the program will be compiled. Program written in `.litmus` format do not require such option. `<arch>` must be one of the following:
For programs written in `.c` and `.bpl`, value `<arch>` specifies the programming language or architectures to which the program will be compiled. For programs written in `.litmus` format, if the `--target` option is not given, Dartagnan will automatically extract the `<arch>` from the litmus test header. `<arch>` must be one of the following:
- c11
- lkmm
- imm
Expand Down
14 changes: 11 additions & 3 deletions dartagnan/src/main/java/com/dat3m/dartagnan/Dartagnan.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import com.dat3m.dartagnan.utils.Result;
import com.dat3m.dartagnan.utils.options.BaseOptions;
import com.dat3m.dartagnan.verification.VerificationTask;
import com.dat3m.dartagnan.verification.VerificationTask.VerificationTaskBuilder;
import com.dat3m.dartagnan.verification.model.ExecutionModel;
import com.dat3m.dartagnan.verification.solving.*;
import com.dat3m.dartagnan.witness.WitnessBuilder;
Expand Down Expand Up @@ -46,6 +47,7 @@
import static com.dat3m.dartagnan.GlobalSettings.LogGlobalSettings;
import static com.dat3m.dartagnan.configuration.OptionInfo.collectOptions;
import static com.dat3m.dartagnan.configuration.OptionNames.PHANTOM_REFERENCES;
import static com.dat3m.dartagnan.configuration.OptionNames.TARGET;;
import static com.dat3m.dartagnan.configuration.Property.*;
import static com.dat3m.dartagnan.program.analysis.SyntacticContextAnalysis.*;
import static com.dat3m.dartagnan.utils.GitInfo.CreateGitInfo;
Expand Down Expand Up @@ -109,10 +111,16 @@ public static void main(String[] args) throws Exception {
witness = new ParserWitness().parse(new File(o.getWitnessPath()));
}

VerificationTask task = VerificationTask.builder()
VerificationTaskBuilder builder = VerificationTask.builder()
.withConfig(config)
.withWitness(witness)
.build(p, mcm, properties);
.withWitness(witness);
// If the arch has been set during parsing (this only happens for litmus tests)
// and the user did not explicitly add the target option, we use the one
// obtained during parsing.
if (p.getArch() != null && !config.hasProperty(TARGET)) {
builder = builder.withTarget(p.getArch());
}
VerificationTask task = builder.build(p, mcm, properties);

ShutdownManager sdm = ShutdownManager.create();
Thread t = new Thread(() -> {
Expand Down

0 comments on commit cdf266a

Please sign in to comment.