forked from OCamlPro/alt-ergo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(BV, Opt): Support bit-vector optimization
Since we track intervals for bit-vector variables, adding support for optimization in the bit-vector theory is fairly inconsequential. Fixes OCamlPro#884
- Loading branch information
1 parent
4ce7376
commit c10d426
Showing
17 changed files
with
289 additions
and
21 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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
unknown | ||
( | ||
(define-fun x () (_ BitVec 32) #xffffffff) | ||
) | ||
(objectives | ||
(x #xffffffff) | ||
) |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
; Test basic functionality | ||
(set-logic ALL) | ||
(set-option :produce-models true) | ||
(declare-const x (_ BitVec 32)) | ||
(maximize x) | ||
(check-sat) | ||
(get-model) | ||
(get-objectives) |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
unknown | ||
( | ||
(define-fun x () (_ BitVec 32) #xffffffff) | ||
) | ||
(objectives | ||
((bvnot x) #x00000000) | ||
) |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
; Test primitive optimization | ||
(set-logic ALL) | ||
(set-option :produce-models true) | ||
(declare-const x (_ BitVec 32)) | ||
(minimize (bvnot x)) | ||
(check-sat) | ||
(get-model) | ||
(get-objectives) |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
unknown | ||
( | ||
(define-fun x () (_ BitVec 32) #xfffffffe) | ||
) | ||
(objectives | ||
(x #xfffffffe) | ||
) |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
; Test constrained optimization | ||
(set-logic ALL) | ||
(set-option :produce-models true) | ||
(declare-const x (_ BitVec 32)) | ||
(maximize x) | ||
(assert (bvslt x ((_ int2bv 32) (- 1)))) | ||
(check-sat) | ||
(get-model) | ||
(get-objectives) |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
unknown | ||
( | ||
(define-fun x () (_ BitVec 32) #xffffffff) | ||
(define-fun P ((_arg_0 (_ BitVec 33))) Bool true) | ||
) | ||
(objectives | ||
((bvabs32 x) #b011111111111111111111111111111111) | ||
) |
Oops, something went wrong.