diff options
author | Abdalrhman Mohamed <32971963+abdoo8080@users.noreply.github.com> | 2020-12-08 14:10:10 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-08 14:10:10 -0600 |
commit | 3255e4335f25f35318a41f174ec15a28b0f0520d (patch) | |
tree | cc79f2a3f325167d3210a1d89e2114e369cf6282 /test/regress/regress0/sygus | |
parent | 0ab8a3a7af5b80aa7bcaa028276cdc396aa7a4cb (diff) |
Fix a bug with synth-fun printer (#5512)
This PR fixes #5448. SynthFunCommand::toStream used to call d_grammar->resolve even when d_grammar is a nullptr. This PR fixes the issue and modifies the signature of Printer::toStreamCmdSynthFun to make it clear that grammar is an optional argument.
Diffstat (limited to 'test/regress/regress0/sygus')
-rw-r--r-- | test/regress/regress0/sygus/issue5512-vvv.sy | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/regress/regress0/sygus/issue5512-vvv.sy b/test/regress/regress0/sygus/issue5512-vvv.sy new file mode 100644 index 000000000..9d37032ac --- /dev/null +++ b/test/regress/regress0/sygus/issue5512-vvv.sy @@ -0,0 +1,17 @@ +; COMMAND-LINE: -vvv --sygus-out=status --check-synth-sol --check-abducts +; SCRUBBER: sed -e 's/.*//g' +; EXIT: 0 + +; This regression ensures that printing Sygus commands with option -vvv does not +; crash CVC4 + +(set-logic UF) +(declare-var x Bool) +(synth-fun f ((x Bool)) Bool ((Start Bool)) ((Start Bool (true)))) +(synth-inv inv-f ((x Bool))) +(define-fun pre-f ((x Bool)) Bool true) +(define-fun trans-f ((x Bool) (x! Bool)) Bool true) +(define-fun post-f ((x Bool)) Bool true) +(inv-constraint inv-f pre-f trans-f post-f) +(constraint true) +(check-synth) |