-
-
Notifications
You must be signed in to change notification settings - Fork 390
Tactics plugin returns wrong result for program #539
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
Comments
I can repro this; debug dump:
We're finding the right solution, but for whatever reason, |
A low impact solution here might be to penalize unused top-level position binds immediately after penalizing holes. EDIT: But we don't have access to the position binds if they were introduced via @TOTBWF any clever ideas? |
The score for the winning solution is ( Penalize Int -- number of holes
, Reward Bool -- all bindings used
, Penalize Int -- number of introduced bindings
, Reward Int -- number used bindings
, Penalize Int -- size of extract
) |
What about |
another one to consider is |
This PR tweaks the scoring metric to heavily penalize not using top-level function arguments when defining functions. Presumably if they were added to the type sig, someone had intention behind it. Note that this doesn't prevent us from deriving const, since we have no better alternatives in that case. Furthermore, this fixes a bug where recursive calls were added to the jLocalHypothesis rather than jAmbientHypothesis. The former is for locally introduced variables, for which usage is rewarded. The result was that we were accidentally rewarding recursive calls! Instead we'd like to penalize them, so this PR adds a field which counts recursive calls and penalizes them. Fixes #539
Given
We expect a program equivalent to the following to be synthesized (i.e. respects naturality condition)
And indeed, this is one of the candidate programs as shown in the stderr output below. However the tactics engine produces
stderr output
Subject of the issue
Describe your issue here.
Your environment
haskell-language-server --probe-tools
orhaskell-language-server-wrapper --probe-tools
>= 0.4.0.0
Steps to reproduce
As above.
The text was updated successfully, but these errors were encountered: