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
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/main/scala/Config.scala
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Config(args: Seq[String]) extends SilFrontendConfig(args, "Silicon") {

private val smtlibOptionsConverter: ValueConverter[Map[String, String]] = new ValueConverter[Map[String, String]] {
def parse(s: List[(String, List[String])]): Either[String, Option[Map[String, String]]] = s match {
case (_, str :: Nil) :: Nil if str.head == '"' && str.last == '"' =>
case (_, str :: Nil) :: Nil if str.head == '{' && str.last == '}' =>
val config = toMap(
str.substring(1, str.length - 1) /* Drop leading and trailing quotation mark */
.split(' ') /* Separate individual key=value pairs */
Expand Down Expand Up @@ -374,8 +374,8 @@ class Config(args: Seq[String]) extends SilFrontendConfig(args, "Silicon") {

val z3ConfigArgs: ScallopOption[Map[String, String]] = opt[Map[String, String]]("z3ConfigArgs",
descr = ( "Configuration options which should be forwarded to Z3. "
+ "The expected format is \"<key>=<val> <key>=<val> ... <key>=<val>\", "
+ "including the quotation marks. "
+ "The expected format is {<key>=<val> <key>=<val> ... <key>=<val>}, "
+ "including the { } brackets. For example: \"{model=true model_validate=true}\""
+ "The configuration options given here will override those from Silicon's Z3 preamble."),
default = Some(Map()),
noshort = true
Expand Down