potassco / clasp

⚙️ A conflict-driven nogood learning answer set solver
https://potassco.org/clasp/
MIT License
116 stars 16 forks source link

confusing documentation of `--opt-heuristic` #93

Closed rkaminsk closed 1 year ago

rkaminsk commented 1 year ago

Clasp reports:

--opt-heuristic=<list>  : Use opt. in <list {sign|model}> heuristics

What about

--opt-heuristic=<list>  : Signs for literals subject to optimization
    <list>: {sign|model}
      sign : Use signs minimizing objective
      model: Use signs from literals in last model

It is also a bit unclear how to pass an empty list. It seems like the numeric 0 is possible but not the empty string.

BenKaufmann commented 1 year ago

I went with:

  --opt-heuristic=<list>  : Enable optimization heuristic
      <list>: {sign|model}
        sign : Prefer signs minimizing objective
        model: Assume literals minimizing objective after each model

Does this work for you?

It is also a bit unclear how to pass an empty list. It seems like the numeric 0 is possible but not the empty string.

You can pass all supported "off" values (0, "off", "no", "false") where a <list> is expected. I'd like to keep the empty string reserved for flag-like options.

rkaminsk commented 1 year ago

I went with:

  --opt-heuristic=<list>  : Enable optimization heuristic
      <list>: {sign|model}
        sign : Prefer signs minimizing objective
        model: Assume literals minimizing objective after each model

Does this work for you?

Sure was a small nitpick anyway. Was just pointing someone at the option and stumbled over the description.

It is also a bit unclear how to pass an empty list. It seems like the numeric 0 is possible but not the empty string.

You can pass all supported "off" values (0, "off", "no", "false") where a <list> is expected. I'd like to keep the empty string reserved for flag-like options.

Perfect, off is also a good value to disable it.

Thanks!