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.shscript. I also attempted to fix thesilicon.batscript (%*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.vprsbt "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.vprThis PR is an alternative to #568.
This is a (small) breaking change for clients of Silicon that use
--z3Argsor--z3ConfigArgs.