ultimate icon indicating copy to clipboard operation
ultimate copied to clipboard

Improve automatic conversion from setting labels to command line options

Open schaetzc opened this issue 5 years ago • 1 comments

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.

schaetzc avatar Sep 25 '19 10:09 schaetzc

I guess there is some confusion here. The labels are already the mandatory field that specifies the name of the command line option. The optional description field is for more information.

The issue might be that the debug GUI displays the labels and gives the description only in the tooltip.

Hence, I would propose to:

  • change the display in the debug GUI s.t. converted label name and description is always shown
  • use your proposal 2. : change the conversion s.t. all whitespaces are replaced.

@Heizmann Do you concur?

danieldietsch avatar Sep 25 '19 11:09 danieldietsch