Lifting of equality rules to ML equality

Open
#3,316 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Domain
compilers

Research direction

Review the duplicated #buf-inject-k and #buf-inject-ml rules and the linked pull request discussion first. Determine whether frontend lifting or a lift-ml-equals attribute should be supported, with completion defined by handling the ML equality case without requiring the repeated rule.

Written by the indexing model from the issue text.

Description

We end up frequently making duplicate rules that look like this: https://github.com/runtimeverification/evm-semantics/pull/1662/files#r1160873991

    rule [buf-inject-k]:
      #buf(W:Int, X:Int) ==K #buf(W:Int, Y:Int) => X ==Int Y
      requires 0 <=Int W
       andBool #rangeUInt (8 *Int W, X)
       andBool #rangeUInt (8 *Int W, Y)
      [simplification]

    rule [buf-inject-ml]:
      { #buf(W:Int, X:Int) #Equals #buf(W:Int, Y:Int) } => { X #Equals Y }
      requires 0 <=Int W
       andBool #rangeUInt (8 *Int W, X)
       andBool #rangeUInt (8 *Int W, Y)
      [simplification]

Maybe the frontend can do the second lifting for us automatically? Or via an attribute lift-ml-equals?

Dominant language
Python
Stars
591
Forks
163
PR merge metrics
No merged PRs in 30d

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.

More from runtimeverification/k

All issues in runtimeverification/k

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.