Skip to content

Improve automatic conversion from setting labels to command line options #447

Open
@schaetzc

Description

@schaetzc

In ….ultimate.cli.options.OptionBuilder.convertLabelToLongName(…) we convert the labels from the setting dialog to command line options.

The automatic conversion could be improved for complicated labels. As an example we can discuss the label SifaPreferences.LABEL_SIZELIMITFLUID_MAX_DAGSIZE:

"Abstract when formula's dag size exceeds\n"
+ "(negative numbers disable this limit)"

This label is converted to --sifa.abstract.when.formulas.dag.size.exceeds.negative.numbers.disable.this.limit.

I see three issues here:

  1. Option contains a line break
  2. Option ends with a period
  3. Converting both spaces and parenthesis to periods can lead to confusion. Without the line break I would be confused because I would read size exceeds negative numbers.

What should we do about this?

  1. Require labels that work with the current conversion.
  2. Change the conversion, maybe using one of the following approaches.
    2.1 Replace all whitespace by . and other symbols like : and ( by :.
    2.2 For a given preference item don't use the label but the identifier of the enum constant. As far as I know all settings are defined using enums anyway. As the identifiers of enum constants must be named according to java's rules and are rather short they are predestined to be used as command line options.
    2.3 Add a mandatory field to UltimatePreferenceItem that specifies the item's name in epf files and on the command line.

When we implement any of this we also should document it in our wiki. I had to dig through the code to find out the correct command line switch for a given setting.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions