Skip to content

Add generatedCounter implicitly to claims#3459

Merged
rv-jenkins merged 10 commits intodevelopfrom
add-generated-counter
Jun 16, 2023
Merged

Add generatedCounter implicitly to claims#3459
rv-jenkins merged 10 commits intodevelopfrom
add-generated-counter

Conversation

@Baltoli
Copy link
Copy Markdown
Contributor

@Baltoli Baltoli commented Jun 9, 2023

This PR adds an additional pass to the spec-module compilation pipeline; this pass adds a claimed _ => ?_ rewrite to the generatedCounter cell if the claim does not already mention that cell. Doing so fixes the issue identified in #3450, where the prover fails to assert that this cell does not change in a claim containing fresh variables.

The code triggering the original bug has been added as a test case, as well as a derived test that explicitly states the effect of the rule on the counter cell.

There is one place that this PR requires a test change; in the PL tests there is a spec that relies on a circularity implicitly containing <generatedCounter> _ </generatedCounter> rather than _ => ?_. This can be addressed by either removing the explicit "counter goes up by precisely 2" part of the spec, or by asserting that the counter doesn't change in the circularity. This PR chooses the latter, but either will work.

Fixes #3450

@rv-jenkins rv-jenkins changed the base branch from master to develop June 9, 2023 14:12
@Baltoli Baltoli marked this pull request as ready for review June 13, 2023 08:31
Comment thread kernel/src/main/java/org/kframework/compile/AddImplicitCounterCell.java Outdated
@Baltoli Baltoli requested a review from radumereuta June 13, 2023 12:59
Copy link
Copy Markdown
Contributor

@dwightguth dwightguth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but one minor comment.

Comment thread kernel/src/main/java/org/kframework/compile/IncompleteCellUtils.java Outdated
@rv-jenkins rv-jenkins merged commit 876f245 into develop Jun 16, 2023
@rv-jenkins rv-jenkins deleted the add-generated-counter branch June 16, 2023 17:25
@Baltoli Baltoli mentioned this pull request Dec 12, 2023
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.

4 participants