-
Notifications
You must be signed in to change notification settings - Fork 34
Pointer expressions #927
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
Draft
LightOneM
wants to merge
36
commits into
hernanponcedeleon:development
Choose a base branch
from
LightOneM:pointerExpressions
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Pointer expressions #927
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
db3479b
Added rudimentary pointer expressions
b0d6bef
fixed expr processing
ef403bf
ptr correction
2924849
fixed ptr to int wrong length
8515feb
more fixes related to arch and ptr
64d1750
more fixes and added PtrLiteral
b79736b
visitor changes
692b893
removed intLiteral
2321bd8
removed PtrLiteral
3b628fb
Merge remote-tracking branch 'origin/pointerExpressions' into pointer…
ba04014
fixed litmus c
2dc11e5
more fixes
b893196
Pointer size and visitor fixes
9d48cb7
Vulkan modification, tests pass
24ac314
Vulkan modification, all Vulkan tests pass
da9ee17
opencl modification
487d891
Merge remote-tracking branch 'Dat3M/development' into pointerExpressions
ddca72f
Merge remote-tracking branch 'Dat3M/development' into pointerExpressions
9515dad
dev merge
9b08830
Litmus lkmm changes
2fdfd3b
Litmus c11 fix
2825d0e
Added pointer concat and extract
63a4678
Added pointer recognition to ops VisitorOpsConstant
a2a11d6
--
8773284
added encoding and printing of pointer tearing
2e56140
fixed test change
7dcac06
fixed more pointer compatibility problems
eef1112
added pointer simplification
35005fc
pthread tests pass in 2.timeout
4139da8
fixed some asm problems and ptrCmp refactoring
02be40e
improved pointer casts
8d5c766
added pointer addition simplification
0a0f051
restructuring of ptr <-> int encoding
3f1d54a
- improved type recognition in c11 litmus
2c5a8f0
fixed litmus type mismatch
05a2d18
refactoring
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
dartagnan/src/main/java/com/dat3m/dartagnan/expression/pointer/PointerLiteral.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| package com.dat3m.dartagnan.expression.pointer; | ||
|
|
||
| import com.dat3m.dartagnan.expression.ExpressionVisitor; | ||
| import com.dat3m.dartagnan.expression.base.LiteralExpressionBase; | ||
| import com.dat3m.dartagnan.expression.type.IntegerType; | ||
| import com.dat3m.dartagnan.expression.type.PointerType; | ||
| import com.google.common.base.Preconditions; | ||
|
|
||
| import java.math.BigInteger; | ||
|
|
||
| public final class PointerLiteral extends LiteralExpressionBase<PointerType> { | ||
|
|
||
| private final BigInteger value; | ||
|
|
||
| public PointerLiteral(PointerType type, BigInteger value) { | ||
| super(type); | ||
| this.value = value; | ||
| } | ||
|
|
||
| public BigInteger getValue() { | ||
| return value; | ||
| } | ||
|
|
||
| @Override | ||
| public <T> T accept(ExpressionVisitor<T> visitor) { | ||
| return visitor.visitPtrLiteral(this); | ||
| } | ||
|
|
||
|
|
||
| @Override | ||
| public boolean equals(Object o) { | ||
| return this == o || o instanceof PointerLiteral val && getType().equals(val.getType()) && value.equals(val.value); | ||
| } | ||
|
|
||
| @Override | ||
| public String toString() { | ||
| return String.format("%s(%s)", getType(), value); | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.