-
Notifications
You must be signed in to change notification settings - Fork 307
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SMT] Add Z3 lowering for set_logic op (#7930)
- Loading branch information
Showing
4 changed files
with
115 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// RUN: circt-opt %s --lower-smt-to-z3-llvm --split-input-file --verify-diagnostics | ||
|
||
func.func @multiple_set_logics() { | ||
// expected-error @below {{multiple set-logic operations found in one solver operation - Z3 only supports setting the logic once}} | ||
smt.solver () : () -> () { | ||
smt.set_logic "HORN" | ||
smt.set_logic "AUFLIA" | ||
smt.yield | ||
} | ||
func.return | ||
} | ||
|
||
// ----- | ||
|
||
func.func @multiple_set_logics() { | ||
// expected-error @below {{set-logic operation must be the first non-constant operation in a solver operation}} | ||
smt.solver () : () -> () { | ||
smt.check sat {} unknown {} unsat {} | ||
smt.set_logic "HORN" | ||
smt.yield | ||
} | ||
func.return | ||
} |
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