Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test-judgment-holds incorrectly blames sub-derivations from other judgments #204

Open
wilbowma opened this issue Oct 5, 2019 · 1 comment · May be fixed by #205
Open

test-judgment-holds incorrectly blames sub-derivations from other judgments #204

wilbowma opened this issue Oct 5, 2019 · 1 comment · May be fixed by #205
Assignees

Comments

@wilbowma
Copy link
Collaborator

wilbowma commented Oct 5, 2019

See f10a062

When a test-judgment-holds test fails for a modeless judgment, the error message
will incorrectly blame any sub-derivation that is not from the same judgment as
the top-level judgment.

@wilbowma wilbowma self-assigned this Oct 5, 2019
@wilbowma
Copy link
Collaborator Author

wilbowma commented Oct 5, 2019

In my experiments, I was using this function as a predicate for whether a (sub)derivation is valid.

(define (check-modeless-derivation d)
  (eval `(judgment-holds ,(car (derivation-term d)) ,d)))

This worked fine, but I tried to get rid of eval and instead generated a predicate like the following from inside test-judgment-holds.

... #`(lambda (d) (judgment-holds #,jf-id d))

This change didn't work, since of course, jf-id refers to a single judgment, while check-modeless-derivation can refer to many judgments.

I tried using check-modeless-derivation in Redex, but the test suite fails with a bunch of namespace errors, so I'm back to avoiding eval. Unfortunately, I'm not sure how to implement check-modeless-derivation now...

As a temporary work-around, I could make print-failing-derivations ignore sub-derivations that it can't know how to check. This would provide sound but incomplete information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant