-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
crucible-llvm-syntax: Syntax for all LLVM expressions
- Loading branch information
1 parent
2c6c89c
commit d19dd07
Showing
5 changed files
with
59 additions
and
24 deletions.
There are no files selected for viewing
This file contains 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 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 |
---|---|---|
|
@@ -91,7 +91,6 @@ library | |
|
||
build-depends: | ||
base >= 4.13, | ||
bv-sized, | ||
crucible >= 0.1, | ||
crucible-llvm, | ||
crucible-syntax, | ||
|
This file contains 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 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 |
---|---|---|
@@ -1,4 +1,10 @@ | ||
(defun @test-ptr () (Ptr 64) | ||
(start start: | ||
(let n (null)) | ||
(return n))) | ||
(let blk0 (fresh Nat)) | ||
(let off0 (bv 64 0)) | ||
(let p (ptr blk0 off0)) | ||
(let blk (ptr-blk p)) | ||
(let off (ptr-off p)) | ||
(assert! (equal? blk0 blk) "block numbers equal") | ||
(assert! (equal? off0 off) "offsets equal") | ||
(return p))) |
This file contains 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 |
---|---|---|
@@ -1,14 +1,12 @@ | ||
(defun @test-ptr () (Ptr 64) | ||
(start start: (let n (null)) (return n))) | ||
(start start: | ||
(let blk0 (fresh Nat)) | ||
(let off0 (bv 64 0)) | ||
(let p (ptr blk0 off0)) | ||
(let blk (ptr-blk p)) | ||
(let off (ptr-off p)) | ||
(assert! (equal? blk0 blk) "block numbers equal") | ||
(assert! (equal? off0 off) "offsets equal") | ||
(return p))) | ||
|
||
test-ptr | ||
%0 | ||
% 3:12 | ||
$0 = natLit(0) | ||
% 3:12 | ||
$1 = bVLit(64, BV 0) | ||
% 3:12 | ||
$2 = extensionApp(pointerExpr $0 $1) | ||
% 4:5 | ||
return $2 | ||
% no postdom | ||
At test-data/ptr.cbl:5:17, expected natural literal but got blk0 |