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

Separate pre- and post-compilation checks #4138

Merged
merged 2 commits into from
Mar 27, 2024
Merged

Conversation

Baltoli
Copy link
Contributor

@Baltoli Baltoli commented Mar 27, 2024

When working on #4045, I noticed that a pair of productions like:

syntax KItem ::= disambiguate(KItem, KItem) [overload(disambiguate)]
               | disambiguate(List,  Set)   [overload(disambiguate)]

were both being incorrectly flagged as singleton overloads, despite meeting the criteria for being an overload set.

Some investigation reveals that this is due to the overload lattice checks being applied before the compiler inserts subsorting productions into KItem for every sort; we therefore don't know that List <: KItem when constructing the overload lattice.

The solution is to move the overload checks later in the compilation process, after the compilation pipeline has been run. This PR makes that change, along with some associated documentation and renaming for clarity. It also includes a regression test with the example above; I have verified that the test breaks before this PR.

@Baltoli Baltoli requested review from tothtamas28 and gtrepta March 27, 2024 11:16
@rv-jenkins rv-jenkins merged commit afb3105 into develop Mar 27, 2024
8 checks passed
@rv-jenkins rv-jenkins deleted the separate-checks branch March 27, 2024 14:25
rv-jenkins added a commit to runtimeverification/pyk that referenced this pull request Mar 27, 2024
Related:
* runtimeverification/k#4138

---------

Co-authored-by: devops <[email protected]>
Co-authored-by: Tamás Tóth <[email protected]>
Baltoli pushed a commit that referenced this pull request Apr 9, 2024
Related:
* #4138

---------

Co-authored-by: devops <[email protected]>
Co-authored-by: Tamás Tóth <[email protected]>
Baltoli pushed a commit that referenced this pull request Apr 9, 2024
Related:
* #4138

---------

Co-authored-by: devops <[email protected]>
Co-authored-by: Tamás Tóth <[email protected]>
Baltoli pushed a commit that referenced this pull request Apr 9, 2024
Related:
* #4138

---------

Co-authored-by: devops <[email protected]>
Co-authored-by: Tamás Tóth <[email protected]>
Baltoli pushed a commit that referenced this pull request Apr 10, 2024
Related:
* #4138

---------

Co-authored-by: devops <[email protected]>
Co-authored-by: Tamás Tóth <[email protected]>
Baltoli pushed a commit that referenced this pull request Apr 10, 2024
Related:
* #4138

---------

Co-authored-by: devops <[email protected]>
Co-authored-by: Tamás Tóth <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants