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

Fix #6434: new option --no-infer-absurd-clauses #6435

Merged
merged 3 commits into from
Jan 15, 2023

Conversation

andreasabel
Copy link
Member

@andreasabel andreasabel commented Jan 13, 2023

Fix #6434: new option --no-infer-absurd-clauses.

This option switches off automatic filtering of absurd clauses in coverage checking (#1086) and case splitting (#3526). Such might make sense to speed up coverage checking.

This option switches off automatic filtering of absurd clauses in
coverage checking (#1086) and case splitting (#3526).
Such might make sense to speed up coverage checking.
@andreasabel andreasabel added performance Slow type checking, interaction, compilation or execution of Agda programs coverage Pattern-matching coverage checker ux: case splitting Issues relating to the case split ("C-c C-c") command ux: options Issues relating to Agda's command line options absurd clauses Absurd patterns, absurd extended lambdas, absurd clauses in definitions labels Jan 13, 2023
@andreasabel andreasabel added this to the 2.6.4 milestone Jan 13, 2023
@nad
Copy link
Contributor

nad commented Jan 13, 2023

The flag should be included in the following list:

Agda records the options used when generating an interface file. If
any of the following options differ when trying to load the interface
again, the source file is re-typechecked instead:

@andreasabel
Copy link
Member Author

andreasabel commented Jan 14, 2023

Is everyone happy with the name --performance:absurd-clauses? (UPDATE: This was the original suggestion for the option name.) This implicitly opens a --performance family of options.
Alternative would be --keep-absurd-clauses without dedication to performance.

@jespercockx
Copy link
Member

I'd prefer something like --no-infer-absurd-clauses (and also have its counterpart --infer-absurd-clauses)

@andreasabel
Copy link
Member Author

I'd prefer something like --no-infer-absurd-clauses (and also have its counterpart --infer-absurd-clauses)

Fine with me. @nad @plt-amy ?

@nad
Copy link
Contributor

nad commented Jan 14, 2023

I prefer --no-noun (like --no-termination-check) to --no-verb… (like --no-save-metas). I can see why we don't use --do-not-save-metas, so I think we should try to come up with an option with a noun.

@plt-amy
Copy link
Member

plt-amy commented Jan 14, 2023

I think I prefer a noun (phrase), too. How about --no-implicit-absurd-clauses?

@jespercockx
Copy link
Member

Or --no-absurd-clause-inference

@andreasabel
Copy link
Member Author

I think I prefer a noun (phrase), too. How about --no-implicit-absurd-clauses?

To me, "implicit" is scourged earth. It is way to overloaded, I am trying to avoid it entirely, e.g., only speak either about "hidden" or "instance" arguments (which are both implicit).

Or --no-absurd-clause-inference

Models for --no-infer-absurd-clauses are --no-save-metas, --no-print-pattern-synonyms and --no-import-sorts.
I think I prefer --no-infer-absurd-clauses over --no-absurd-clause-inference since it is more succinct and does not involve the detour of first turning a verb (infer) into a noun (inference).

@andreasabel andreasabel added the pr: squash-me This PR needs squashing label Jan 15, 2023
@andreasabel andreasabel changed the title Fix #6434: new option --performance:absurd-clauses Fix #6434: new option --no-infer-absurd-clauses Jan 15, 2023
@andreasabel andreasabel merged commit a37b3b4 into master Jan 15, 2023
@andreasabel andreasabel deleted the issue-6434-performance-absurd-clauses branch January 15, 2023 18:25
@andreasabel andreasabel self-assigned this Jan 15, 2023
@nad
Copy link
Contributor

nad commented Jan 16, 2023

Models for --no-infer-absurd-clauses are --no-save-metas, --no-print-pattern-synonyms and --no-import-sorts.

Do you think that any of these sound good? (I implemented --no-save-metas.)

Perhaps we could replace all noun options with verbs, and use --dont- instead: --check-termination, --dont-check-termination. Another alternative is to have options like --infer-absurd-clauses=yes, --termination-check=no.

@jespercockx
Copy link
Member

Perhaps we could replace all noun options with verbs, and use --dont- instead: --check-termination, --dont-check-termination. Another alternative is to have options like --infer-absurd-clauses=yes, --termination-check=no.

I like this, because then we could also have other options for distinguishing between applying an option to the current module and applying it to all modules that depend on it (see #4908)

@andreasabel
Copy link
Member Author

Models for --no-infer-absurd-clauses are --no-save-metas, --no-print-pattern-synonyms and --no-import-sorts.

Do you think that any of these sound good? (I implemented --no-save-metas.)

I think they have meme potential because they sound awkward. All of your bases are belong to us!

JobPetrovcic pushed a commit to JobPetrovcic/agda that referenced this pull request Apr 10, 2024
This option switches off automatic filtering of absurd clauses in coverage checking (agda#1086) and case splitting (agda#3526). Such might make sense to speed up coverage checking.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
absurd clauses Absurd patterns, absurd extended lambdas, absurd clauses in definitions coverage Pattern-matching coverage checker performance Slow type checking, interaction, compilation or execution of Agda programs pr: squash-me This PR needs squashing ux: case splitting Issues relating to the case split ("C-c C-c") command ux: options Issues relating to Agda's command line options
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Option to increase performance: do not filter out absurd clauses automatically
5 participants