runtimeverification / runtimeverification/haskell-backend
Change behavior of #if ... #then ... #else unification
Nobody has claimed this yet.
- Dominant language
- Haskell
- Stars
- 224
- Forks
- 43
- PR merge metrics
- No merged PRs in 30d
Description
Noticed by @virgil-serbanuta: #if ... #then ... #else currently has inconsistent semantics.
In the following example, during function evaluation#if B #then Bottom #else g(x) will be evaluated to Bottom (because a symbol with a Bottom argument is Bottom) while when unifying this term, say unify(stuff, #if B #then Bottom #else g(x) #fi) this will result in ((B == true) and (stuff == Bottom)) or ((B == false) and (stuff == g(x))) therefore the result will be defined (so not Bottom).
@virgil-serbanuta suggests we change this result to ((B == true) and (stuff == f(x)) and (ceil(#if ... #fi))) or ((B == false) and (stuff == g(x)) and (ceil(#if ... #fi))) and investigate any resulting failures.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start by tracing the #if/#then/#else paths used during function evaluation and unification, then compare their handling of Bottom; implement the proposed definedness condition and investigate any resulting failures.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100