Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
db3479b
Added rudimentary pointer expressions
Sep 9, 2025
b0d6bef
fixed expr processing
Sep 15, 2025
ef403bf
ptr correction
Sep 15, 2025
2924849
fixed ptr to int wrong length
Sep 15, 2025
8515feb
more fixes related to arch and ptr
Sep 19, 2025
64d1750
more fixes and added PtrLiteral
Sep 19, 2025
b79736b
visitor changes
Sep 23, 2025
692b893
removed intLiteral
Oct 20, 2025
2321bd8
removed PtrLiteral
Oct 20, 2025
3b628fb
Merge remote-tracking branch 'origin/pointerExpressions' into pointer…
Oct 20, 2025
ba04014
fixed litmus c
Oct 20, 2025
2dc11e5
more fixes
Oct 20, 2025
b893196
Pointer size and visitor fixes
Oct 27, 2025
9d48cb7
Vulkan modification, tests pass
Oct 27, 2025
24ac314
Vulkan modification, all Vulkan tests pass
Oct 27, 2025
da9ee17
opencl modification
Oct 27, 2025
487d891
Merge remote-tracking branch 'Dat3M/development' into pointerExpressions
Nov 5, 2025
ddca72f
Merge remote-tracking branch 'Dat3M/development' into pointerExpressions
Nov 5, 2025
9515dad
dev merge
Nov 5, 2025
9b08830
Litmus lkmm changes
Nov 6, 2025
2fdfd3b
Litmus c11 fix
Nov 6, 2025
2825d0e
Added pointer concat and extract
Nov 6, 2025
63a4678
Added pointer recognition to ops VisitorOpsConstant
Nov 10, 2025
a2a11d6
--
Nov 10, 2025
8773284
added encoding and printing of pointer tearing
Nov 11, 2025
2e56140
fixed test change
Nov 12, 2025
7dcac06
fixed more pointer compatibility problems
Nov 16, 2025
eef1112
added pointer simplification
Nov 18, 2025
35005fc
pthread tests pass in 2.timeout
Nov 19, 2025
4139da8
fixed some asm problems and ptrCmp refactoring
Nov 19, 2025
02be40e
improved pointer casts
Nov 22, 2025
8d5c766
added pointer addition simplification
Nov 23, 2025
0a0f051
restructuring of ptr <-> int encoding
Nov 23, 2025
3f1d54a
- improved type recognition in c11 litmus
Nov 26, 2025
2c5a8f0
fixed litmus type mismatch
Nov 26, 2025
05a2d18
refactoring
Nov 28, 2025
defcaba
Merge branch 'development' into pointerExpressions
Nov 28, 2025
10bac52
non-termination tests pass
Nov 29, 2025
d40ac56
fixed the litmus wrong ptr default reg type
Nov 30, 2025
b3f0997
fixed some litmus compilation problems
Dec 2, 2025
b895b04
renaming of some scoped pointer type variables (confusion between poi…
Dec 5, 2025
9931b07
added comments
Dec 7, 2025
e55b6f4
fixed inline asm unsupported operation
Dec 7, 2025
3e9f80a
fixed litmus c bitvector problem
Dec 8, 2025
7428666
improvement to casts
Dec 9, 2025
05bec86
added ptr add to InclusionBasedPointerAnalysis
Dec 9, 2025
ea1af71
fixes
Dec 10, 2025
5f279b8
added encoding of ptrAdd in FieldSensitiveAndersen
Dec 11, 2025
d600b26
Temp fix for tearing not working correctly. Rll mixed tests pass (sti…
Dec 11, 2025
c70b098
more clarity
Dec 12, 2025
a22b3b6
fixed null ptr store
Dec 13, 2025
252790d
fixed null ptr store
Dec 13, 2025
fc753dd
small changes
Dec 14, 2025
30ec75c
merged detached branch
Dec 17, 2025
7a552cc
mem to reg gep fix to accept ptr add
Dec 18, 2025
59d263b
fixed int encoding llvm tests failing
Dec 19, 2025
239141e
fixed one of spirv assertions tests
Dec 20, 2025
d95646f
Initial commit for MemoryType support
ThomasHaas Dec 23, 2025
a151d99
Basic encoding of assignments over memory (WIP)
ThomasHaas Dec 23, 2025
f6707a7
- Added assignEqual methods to model assignments with possible conver…
ThomasHaas Dec 28, 2025
139f5e5
Fix memory cast to types whose size is not a multiple of 8.
ThomasHaas Dec 28, 2025
959cca7
Minor refactor
ThomasHaas Dec 28, 2025
c1543de
Add back integer encoding for MemoryExtract
ThomasHaas Dec 28, 2025
131a484
Minor refactor
ThomasHaas Dec 29, 2025
39d4c17
Fix buggy initialization of cyclic static dependencies.
ThomasHaas Dec 29, 2025
e7b5964
Cleanup
ThomasHaas Jan 4, 2026
b63ef32
All non broken Litmus tests pass.
Jan 24, 2026
86bcf08
Fixed memory + 0 and constant ptr mocking
Jan 24, 2026
6f91cb0
Corrected asm riscv ptr type and extended llvm misc test by 4 sec
Jan 25, 2026
fb3fd15
Merge branch 'development' into pointerExpressions
Jan 25, 2026
6c5795e
.
Jan 25, 2026
b38e1aa
tearing only int inits fix
Jan 25, 2026
1796217
fixed nullptr forced 64 bit encoding
Jan 26, 2026
22c6ba5
fixed llvm pthread test
Jan 26, 2026
0e38f0b
improved pointer casting
Jan 26, 2026
6f7f1b5
fixed llvm timeout and mixed tests
Jan 27, 2026
35e13b8
forced litmus riscv ptrs' handling as ints
Jan 27, 2026
ebfec4c
asm bug workaround
Jan 27, 2026
c1cf84b
asm execution status workaround
Jan 28, 2026
a02baf2
fixed armv8 (armv7 still broken)
Jan 28, 2026
2af16da
fixed armv7 asm and null pointer handling problem
Jan 29, 2026
a2aeba2
fixed armv7 asm
Jan 29, 2026
3b06e49
Merge remote-tracking branch 'origin/pointerExpressions' into pointer…
Jan 29, 2026
3489a03
fixed non constrained variable
Jan 31, 2026
18f0160
asm arm pointer casts only when needed
Jan 31, 2026
54b2f59
fixed some of "others" tests
Jan 31, 2026
cb48b5a
others fixes.
Feb 1, 2026
1d89e6c
fixed more others tests
Feb 2, 2026
2cb4f64
fixed spirv others
Feb 3, 2026
856d152
removed necessary code
Feb 3, 2026
7d77fd3
fixed full alias analysis recursion bug
Feb 3, 2026
d28e36a
andersen changes
Feb 3, 2026
b1f95b5
Andersen alias fix
Feb 4, 2026
c21cdd2
General improvements
Feb 5, 2026
aee993c
Merge branch 'development' into pointerExpressions
Feb 5, 2026
9faef04
General improvements
Feb 5, 2026
db1ad9c
General improvements
Feb 5, 2026
353eae9
General improvements
Feb 5, 2026
34108ae
Merge remote-tracking branch 'Dat3M/memoryType' into pointerExpressions
Feb 5, 2026
90cad8d
Added MemoryExtend expression
ThomasHaas Feb 6, 2026
b23d2e1
Add actual conversions between memX and bvN for N < X
ThomasHaas Feb 6, 2026
a39a4e9
added fixed pointer tearing
Feb 6, 2026
07dc38b
Merge branch 'memoryType' into pointerExpressions
Feb 6, 2026
f0796cc
fixed trackability
Feb 6, 2026
f4a84b2
Merge branch 'development' into pointerExpressions
MorMahd Feb 6, 2026
ec21d9e
removed redundant code
Feb 9, 2026
d4d82f4
removed forced int ops from riscv
Feb 9, 2026
3c3cb5d
removed forced int ops from tso and c11
Feb 9, 2026
1243809
removed forced int binary op
Feb 9, 2026
8669fb2
removed redundant functions and casts
Feb 9, 2026
876996b
Reformat of modified files
Feb 9, 2026
7797f28
Fixed some litmus c tests
Feb 10, 2026
7d69fa4
Removed forced cast in intcmp
Feb 10, 2026
4cb213b
fix
Feb 10, 2026
0b9d9eb
fix
Feb 10, 2026
4dbea5c
clarity and removed unused imports
Feb 10, 2026
ee961a3
added comments
Feb 12, 2026
e5c6b67
Merge remote-tracking branch 'Dat3M/development' into pointerExpressions
Feb 12, 2026
382cf81
added import
Feb 12, 2026
059c6ec
type fixes
Feb 12, 2026
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
48 changes: 24 additions & 24 deletions dartagnan/src/main/java/com/dat3m/dartagnan/Dartagnan.java
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public static void main(String[] args) throws Exception {
final Program p = new ProgramParser().parse(f);
if (o.overrideEntryFunction()) {
p.setEntrypoint(new Entrypoint.Simple(p.getFunctionByName(o.getEntryFunction()).orElseThrow(
() -> new MalformedProgramException(String.format("Program has no function named %s. Select a different entry point.", o.getEntryFunction())))));
() -> new MalformedProgramException(String.format("Program has no function named %s. Select a different entry point.", o.getEntryFunction())))));
}
final Wmm mcm = new ParserCat(Path.of(o.getCatIncludePath())).parse(fileModel);
final VerificationTaskBuilder builder = VerificationTask.builder()
Expand Down Expand Up @@ -204,19 +204,19 @@ public static void main(String[] args) throws Exception {
private static List<File> getProgramFilesFromArgs(String[] args) {
final List<File> files = new ArrayList<>();
Stream.of(args)
.map(File::new)
.forEach(file -> {
if (file.exists()) {
final String path = file.getAbsolutePath();
if (file.isDirectory()) {
logger.info("Programs path: {}", path);
files.addAll(getProgramFiles(path));
} else if (file.isFile() && supportedFormats.stream().anyMatch(file.getName()::endsWith)) {
logger.info("Program path: {}", path);
files.add(file);
.map(File::new)
.forEach(file -> {
if (file.exists()) {
final String path = file.getAbsolutePath();
if (file.isDirectory()) {
logger.info("Programs path: {}", path);
files.addAll(getProgramFiles(path));
} else if (file.isFile() && supportedFormats.stream().anyMatch(file.getName()::endsWith)) {
logger.info("Program path: {}", path);
files.add(file);
}
}
}
});
});
if (files.isEmpty()) {
throw new IllegalArgumentException("Path to input program(s) not given or format not recognized");
}
Expand All @@ -227,10 +227,10 @@ private static List<File> getProgramFiles(String dirPath) {
List<File> files = new ArrayList<File>();
try (Stream<Path> stream = Files.walk(Paths.get(dirPath))) {
files = stream.filter(Files::isRegularFile)
.filter(p -> supportedFormats.stream().anyMatch(p.toString()::endsWith))
.map(Path::toFile)
.sorted(Comparator.comparing(File::toString))
.toList();
.filter(p -> supportedFormats.stream().anyMatch(p.toString()::endsWith))
.map(Path::toFile)
.sorted(Comparator.comparing(File::toString))
.toList();
} catch (IOException e) {
logger.error("There was an I/O error when accessing path {}", dirPath);
System.exit(UNKNOWN_ERROR.asInt());
Expand All @@ -246,7 +246,7 @@ public static File generateExecutionGraphFile(VerificationTask task, ModelChecke
final String progName = task.getProgram().getName();
final int fileSuffixIndex = progName.lastIndexOf('.');
final String name = progName.isEmpty() ? "unnamed_program" :
(fileSuffixIndex == - 1) ? progName : progName.substring(0, fileSuffixIndex);
(fileSuffixIndex == -1) ? progName : progName.substring(0, fileSuffixIndex);
final ExecutionModelNext model = modelChecker.getExecutionGraph();
// RF edges give both ordering and data flow information, thus even when the pair is in PO
// we get some data flow information by observing the edge
Expand All @@ -258,7 +258,7 @@ public static File generateExecutionGraphFile(VerificationTask task, ModelChecke
}

private static void generateWitnessIfAble(VerificationTask task,
ModelChecker modelChecker, String details) throws SolverException {
ModelChecker modelChecker, String details) throws SolverException {
// ------------------ Generate Witness, if possible ------------------
final EnumSet<Property> properties = task.getProperty();
if (task.getProgram().getFormat().equals(SourceLanguage.LLVM) && modelChecker.hasModel()
Expand Down Expand Up @@ -304,8 +304,8 @@ private static ResultSummary summaryFromResult(VerificationTask task, ModelCheck
reason = ResultSummary.PROGRAM_SPEC_REASON;
condition = getSpecificationString(p);
List<Assert> violations = p.getThreadEvents(Assert.class)
.stream().filter(model::assertionViolated)
.toList();
.stream().filter(model::assertionViolated)
.toList();
for (Assert ass : violations) {
appendTo(details, ass, synContext);
}
Expand Down Expand Up @@ -400,7 +400,7 @@ private static void appendTo(StringBuilder details, Event event, SyntacticContex
}

private static void increaseBoundAndDump(List<Event> boundEvents, Configuration config) throws IOException {
if(!config.hasProperty(BOUNDS_SAVE_PATH)) {
if (!config.hasProperty(BOUNDS_SAVE_PATH)) {
return;
}
final File boundsFile = new File(config.getProperty(BOUNDS_SAVE_PATH));
Expand Down Expand Up @@ -440,8 +440,8 @@ private static void increaseBoundAndDump(List<Event> boundEvents, Configuration
private static void printWarningIfThreadStartFailed(Program p, IREvaluator model) {
p.getThreads().stream().filter(t ->
t.getEntry().isSpawned()
&& model.isExecuted(t.getEntry().getCreator())
&& !model.threadHasStarted(t)
&& model.isExecuted(t.getEntry().getCreator())
&& !model.threadHasStarted(t)
).forEach(t -> System.out.printf(
"[WARNING] The call to pthread_create of thread %s failed. To force thread creation to succeed use --%s=true%n",
t, OptionNames.THREAD_CREATE_ALWAYS_SUCCEEDS
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package com.dat3m.dartagnan.encoding;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.dat3m.dartagnan.expression.ExpressionFactory;
import com.dat3m.dartagnan.expression.type.IntegerType;
import com.dat3m.dartagnan.expression.type.TypeFactory;
Expand Down Expand Up @@ -41,6 +44,7 @@
import java.util.Map;

import static com.dat3m.dartagnan.configuration.OptionNames.*;
import static com.dat3m.dartagnan.encoding.ExpressionEncoder.ConversionMode.MEMORY_ROUND_TRIP_RELAXED;
import static com.dat3m.dartagnan.program.event.Tag.INIT;
import static com.dat3m.dartagnan.program.event.Tag.WRITE;
import static com.google.common.base.Preconditions.checkArgument;
Expand All @@ -65,7 +69,7 @@ public final class EncodingContext {
private final ExpressionFactory exprs = ExpressionFactory.getInstance();

@Option(
name=IDL_TO_SAT,
name = IDL_TO_SAT,
description = "Use SAT-based encoding for totality and acyclicity.",
secure = true)
boolean useSATEncoding = false;
Expand Down Expand Up @@ -219,19 +223,21 @@ public BooleanFormula sameResult(RegWriter first, RegWriter second) {
return exprEncoder.equal(result(first), result(second));
}

public BooleanFormula sameValue(MemoryCoreEvent first, MemoryCoreEvent second, ExpressionEncoder.ConversionMode cmode) {
return exprEncoder.equal(value(first), value(second), cmode);
public BooleanFormula sameValue(MemoryCoreEvent first, MemoryCoreEvent second) {
return exprEncoder.equal(value(first), value(second));
}

public BooleanFormula sameValue(MemoryCoreEvent first, MemoryCoreEvent second) {
return sameValue(first, second, ExpressionEncoder.ConversionMode.NO);
public BooleanFormula assignValue(MemoryCoreEvent left, MemoryCoreEvent right) {
return exprEncoder.assignEqual(value(left), value(right), MEMORY_ROUND_TRIP_RELAXED);
}

public TypedFormula<?, ?> address(MemoryCoreEvent event) {
return addresses.get(event);
}

public TypedFormula<?, ?> address(MemoryObject memoryObject) { return objAddress.get(memoryObject); }
public TypedFormula<?, ?> address(MemoryObject memoryObject) {
return objAddress.get(memoryObject);
}

// NOTE: This formula represents the size of successfully allocated memory objects.
// For non-allocated memory objects, the size may be any non-negative value.
Expand Down
Loading