-
Notifications
You must be signed in to change notification settings - Fork 59
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
Unifying a structure of variables with a structured function name is not disabled #642
Comments
Any progress on that? It is somewhat of a blocker. |
I raised #668 with the fix which prevents from evaluation any expression which has a variable on the first position of the nested expression on the first position. Despite the PR fixes this specific scenario I would say the overall semantics of the evaluation is not clear. @ngeiswei could you please point to the specific code in trueagi-io/hyperon-pln#44 which is blocked by this issue? I would like to understand which semantics do you need. |
The combinatory logic reduction rules combined with the function that converts combinatory logic to lambda calculus In particular, the test case of that issue comes from the reduction rule for combinator W. |
@ngeiswei does the following type definition suits your needs and fixes the example?
|
I've tried the following
|
Type signature in this case should be different I believe. Three options below work, but they mean that second argument is evaluated before calculating lambda and this prevents constructing lambda in
|
We can write a version of Adding |
Also it is discussed in #242 |
I don't know but the initial test
passes for me, so as far I am concerned it can be closed. |
What is your problem?
Unifying a structure of variables with a structured function name is not disabled by the absence of
variable_operation
.How to reproduce your problem?
Run the following code
What would you normally expect?
It should end with the output
What do you get instead?
It gets trapped in an infinite recursion.
What else do you have to say?
My assumption is that the absence of
variable_operation
should cover that case. If not then I need another solution, maybe involving Minimal MeTTa or inference control. To give more context I'm trying to emulate combinatory logic,W
is an actual combinator.The problems occurs in both old and Minimal MeTTa.
The text was updated successfully, but these errors were encountered: