Skip to content

Fix LIST.in hook for non-constructor-like list elements#4111

Merged
automergerpr-permission-manager[bot] merged 3 commits into
masterfrom
HOTFIX-list-membership-hook
Jun 16, 2025
Merged

Fix LIST.in hook for non-constructor-like list elements#4111
automergerpr-permission-manager[bot] merged 3 commits into
masterfrom
HOTFIX-list-membership-hook

Conversation

@jberthold
Copy link
Copy Markdown
Collaborator

The previous list hook implementation LIST.in was testing membership based on syntactic equality. This is incorrect if the elements of the list are not constructor-like (like variables or unevaluated function calls), False cannot be returned in those cases. When all known list elements are constructor-like, syntactic equality is sufficient. A unit test was added for this case.

The previous list hook implementation `LIST.in` was testing membership
based on _syntactic_ equality. This is incorrect if the elements of
the list are not constructor-like (like variables or unevaluated function calls),
`False` cannot be returned in those cases. When all known list elements are
constructor-like, syntactic equality is sufficient.
A unit test was added for this case.
@jberthold
Copy link
Copy Markdown
Collaborator Author

The symptom that led to discovering this bug was a kontrol end-to-end test: https://github.com/runtimeverification/kontrol/actions/runs/15538343867/job/43743019572?pr=1032#step:6:58
I verified with a local test run that this test passes on the PR branch but fails on HS backend master. \cc @palinatolmach

@jberthold jberthold marked this pull request as ready for review June 13, 2025 05:04
@automergerpr-permission-manager automergerpr-permission-manager Bot merged commit f5823a9 into master Jun 16, 2025
6 checks passed
@automergerpr-permission-manager automergerpr-permission-manager Bot deleted the HOTFIX-list-membership-hook branch June 16, 2025 07:43
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.

2 participants