runtimeverification / runtimeverification/haskell-backend

Usimplified <non-empty-user-list> #Equals <empty-user-list>

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

Nobody has claimed this yet.

Dominant language
Haskell
Stars
224
Forks
43
PR merge metrics
No merged PRs in 30d

Description

For a user-defined list, the backend produces an unsimplified predicate that can be described as <list-element> .UserList #Equals .UserList. I think that the backend should simplify this to #Bottom.

To reproduce:

  1. Unpack the attached archive.
  2. kore-exec haskellDefinition.bin --module ELROND-WASM --pattern program.kore --output result.kore --depth 2
  3. result.kore contains this:
    /* Sfa */
    \not{SortGeneratedTopCell{}}(
        /* Spa */
        \equals{SortK{}, SortGeneratedTopCell{}}(
            /* T Fn D Sfa */
            kseq{}(
                /* T Fn D Sfa */
                /* Inj: */ inj{SortStmts{}, SortKItem{}}(
                    /* T Fn D Sfa */
                    Lbl'UndsUndsUnds'WASM-COMMON-SYNTAX'Unds'Stmts'Unds'Stmt'Unds'Stmts{}(
                        /* T Fn D Sfa Cl */
                        LblnewEmptyModule'UndsUnds'WASM-AUTO-ALLOCATE'Unds'Stmt'Unds'WasmString{}(
                            /* T Fn D Sfa Cli */
                            /* Inj: */ inj{SortWasmStringToken{}, SortWasmString{}}(
                                /* T Fn D Sfa Cl */
                                \dv{SortWasmStringToken{}}(/* T Fn D Sfa Cl */
                                "\"env\"")
                            )
                        ),
                        /* T Fn D Sfa Cli */
                        /* Inj: */ inj{SortEmptyStmts{}, SortStmts{}}(
                            /* T Fn D Sfa Cl */
                            Lbl'Stop'List'LBraQuot'listStmt'QuotRBraUnds'EmptyStmts{}()
                        )
                    )
                ),
                /* T Fn D Sfa Cl */ dotk{}()
            ),
            /* T Fn D Sfa Cl */
            kseq{}(
                /* T Fn D Sfa Cli */
                /* Inj: */ inj{SortEmptyStmts{}, SortKItem{}}(
                    /* T Fn D Sfa Cl */
                    Lbl'Stop'List'LBraQuot'listStmt'QuotRBraUnds'EmptyStmts{}()
                ),
                /* T Fn D Sfa Cl */ dotk{}()
            )
        )
    )

unsimplified.zip

Contributor guide

No contributing guide indexed for this repository

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

Start by unpacking unsimplified.zip and running the kore-exec command with haskellDefinition.bin, the ELROND-WASM module, and program.kore pattern. Inspect result.kore for the user-list equality predicate; done means the unsimplified predicate is reduced to #Bottom.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.