Skip to content
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

Change double quotes to curly braces as delimeters for composite command line options #568

Closed
wants to merge 1 commit into from

Conversation

aterga
Copy link
Member

@aterga aterga commented Jul 16, 2021

This PR changes the expected format of arguments passed to --z3ConfigArgs.

We used to use double quotes, but this caused problems with escaping the " characters in case the silicon command itself had to be passed as a string. In particular, the only way I found to use this option on macOS in bash and zsh was like this:

java -cp silicon.jar viper.silicon.SiliconRunner --z3ConfigArgs "\"model.partial=true\"" example.vpr

However, I still couldn't figure out how to encode the escapements themselves s.t. they could be added to the Viper IDE configuration. It seems that avoiding double quotes in the first place would simplify things quite a bit.

Therefore, I propose the following syntax:

--z3ConfigArgs {arg1=val1 arg2=val2 ...}

I tested this on my local machine with macOS; I would appreciate it if you could try it out on Windows and Linux as well before merging this PR (not urgent).

@aterga aterga requested a review from mschwerhoff July 16, 2021 13:19
@mschwerhoff
Copy link
Contributor

I'm not too keen on changing the syntax, unless it's clear that escaping is impossible (or really gets out of hand). Maybe the syntax shown here helps: https://github.com/viperproject/silicon/wiki/Running-Silicon.

Since you already implemented a suggestion: does it work with passing options through sbt (-Dsilicon:key=value)?

@mschwerhoff
Copy link
Contributor

@aterga Any news?

@fpoli
Copy link
Member

fpoli commented Jan 19, 2022

In #587 I had to fix the script.sh because it wasn't correctly passing quoted arguments containing spaces to the JVM. I opened #588 to also remove the need of the quotation marks from Silicon.

@aterga
Copy link
Member Author

aterga commented Jan 19, 2022

It seems that @fpoli 's solution solves the issue that this PR was trying to solve, too. Feel free to close if you agree

@mschwerhoff mschwerhoff deleted the avoid-double-quotes-in-cmd-options branch January 28, 2022 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants