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

Refactor option configurations #2999

Open
konnov opened this issue Sep 24, 2024 · 0 comments
Open

Refactor option configurations #2999

konnov opened this issue Sep 24, 2024 · 0 comments
Assignees
Labels

Comments

@konnov
Copy link
Collaborator

konnov commented Sep 24, 2024

The current version relies on pureconfig. As a result, when passing parameters from quint verify, we have a configuration file like this:

{
    "common": {
      "write-intermediate": true,
      "debug": true
    },
    "checker": {
        "discard-disabled": false,
        "no-deadlocks": true,
        "algo": "incremental",
        "tuning": {
            "search.invariant.mode": "after",
            "search.invariantFilter": "(1->.*)"
        }
    }
}

On the other hand, the option processing code is processing options like this:

for {
algo <- checker.algo.toTry("checker.algo")
discardDisabled <- checker.discardDisabled.toTry("checker.discardDisabled")
length <- checker.length.toTry("checker.length")
noDeadlocks <- checker.noDeadlocks.toTry("checker.noDeadlocks")
smtEncoding <- checker.smtEncoding.toTry("checker.smtEncoding")
tuning <- checker.tuning.toTry("checker.tuning")
maxError <- checker.maxError.toTry("checker.maxError").flatMap(validateMaxError)
timeoutSmtSec <- checker.timeoutSmtSec.toTry("checker.timeoutSmtSec")
} yield Checker(

What is worse, if I pass discardDisabled: true instead of discard-disabled: true in the configuration file, the configuration parser does not complain.

We have to streamline configuration parsing and get rid of unnecessary complexity. Currently, it is very hard to understand what parameters have to be passed, even by reading the code.

@konnov konnov added the feature A new feature or functionality label Sep 24, 2024
@konnov konnov self-assigned this Sep 24, 2024
@konnov konnov added refactoring usability UX improvements and removed feature A new feature or functionality labels Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant