runtimeverification / runtimeverification/kontrol

Lemmas imported in one module are applied in others

Open
#442 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

investigation question
Dominant language
Python
Stars
122
Forks
16
PR merge metrics
No merged PRs in 30d

Description

For further investigation.

While working on https://github.com/runtimeverification/kontrol/pull/369, @PetarMax and I noticed that Optimism-specific lemmas that are imported in the PortalTest contract via

kontrol build --require lemmas.k --module-import PortalTest:PAUSABILITY-LEMMAS

are only being imported into PortalTest-VERIFICATION module:

module S2KtestZModPortalTest-VERIFICATION
    imports public S2KtestZModPortalTest-CONTRACT
    imports public PAUSABILITY-LEMMAS
endmodule

but it looks like they’re being used across all tests in Kontrol test suite. For example, AssumeTest.test_assume_false(uint256,uint256) is affected, with

<k>
   ( #addr [ ISZERO ]
   ~> #exec [ ISZERO ]
   ~> #pc [ ISZERO ] => CALL 0 645326474426547203313410069153905908525362434349 0 388 100 388 0
   ~> #pc [ CALL ] )
   ~> #execute
   ~> _CONTINUATION
</k>

getting rewritten to

<k>
   ( .K => CALL 0 645326474426547203313410069153905908525362434349 0 388 100 388 0
   ~> #pc [ CALL ] )
   ~> #execute
   ~> _CONTINUATION
</k>

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with kontrol build --require lemmas.k --module-import PortalTest:PAUSABILITY-LEMMAS and inspect the generated S2KtestZModPortalTest-VERIFICATION module. Compare lemma application in PortalTest with AssumeTest.test_assume_false(uint256,uint256), then determine why the imported rules rewrite unrelated tests and define a testable isolation boundary.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.