-
Notifications
You must be signed in to change notification settings - Fork 35
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
Remove quotes around Z3 arguments #588
Conversation
5da738b
to
58c6c71
Compare
By the way, https://www.shellcheck.net/ is great for checking bash scripts. |
Thank you! I'll try to find some time soon to test it on Windows, but not before next week. Did you also test argument forwarding via sbt test, e.g. |
Is that the exact command? It doesn't seem to work for me, not even on master. On master, the following works in the sbt shell:
With this PR, the previous doesn't work and one of the following commands must be used.
It turns out that this is the expected behavior of the scalatest runner. First, sbt splits the command line in a list of arguments. This seems to be done in a naive way, so |
I found that snippet in Silicon's wiki, I'm not surprised that the exact syntax no longer works.
I can live with that. It's probably a rather esoteric use-case anyway.
I guess everybody is involved in this syntax party: |
I just checked the command prompt on Windows 10 and pushed a fix:
|
The |
Any objection to merging this? |
Not from my side. |
Great; I'll merge. I find really odd that users have to write things like |
The quotation marks that Silicon requires around Z3 arguments are annoying but also unnecessary. Usually, the issue is that scripts don't correctly forward arguments with spaces or quotes, but if so it's the script that should be fixed.
This PR removes the requirement for quotes and fixes the
silicon.sh
script. I also attempted to fix thesilicon.bat
script (%*
should preserve spaces and quotes and%CMD%
was probably dropping all quotes), but I don't have a Windows OS to test it.For reference, I tested the following ways to run Silicon and they all work fine:
run --z3ConfigArgs "model=true model_validate=true" prog.vpr
sbt "run --z3ConfigArgs \"model=true model_validate=true\" prog.vpr"
sbt 'run --z3ConfigArgs "model=true model_validate=true" prog.vpr'
./silicon.sh --z3ConfigArgs "model=true model_validate=true" prog.vpr
./silicon.sh --z3ConfigArgs 'model=true model_validate=true' prog.vpr
This PR is an alternative to #568.
This is a (small) breaking change for clients of Silicon that use
--z3Args
or--z3ConfigArgs
.