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

subsumes_term/2 incorrect #84

Open
UWN opened this issue Jun 9, 2023 · 2 comments
Open

subsumes_term/2 incorrect #84

UWN opened this issue Jun 9, 2023 · 2 comments
Labels

Comments

@UWN
Copy link

UWN commented Jun 9, 2023

(using Playground)

?- subsumes_term(X, f(X)).
{ERROR: No handle found for thrown exception error(existence_error(procedure,'user:subsumes_term'/2),'user:subsumes_term'/2)}
% unexpected

aborted
?- use_module(library(terms_check),[subsumes_term/2]).
Note: module terms_check already in executable, just made visible
yes % should not be necessary 
?- subsumes_term(f(X,Y), f(Z,Z)).

yes
?- subsumes_term(f(Z,Z), f(X,Y)).

no
?- subsumes_term(g(X), g(f(X))).

yes, unexpected.
?- subsumes_term(X, f(X)).

yes, unexpected.

Note that the definition of subsumes_term/2 has two conditions a and b. Cor.2 since 2012-02-15, reported as #32 2016-10-26.

@jfmc jfmc added the bug label Jun 29, 2023
@UWN
Copy link
Author

UWN commented Dec 2, 2024

Also note that the documentation incorrectly states that Ciao checks for an instance. However,

?- subsumes_term(f(X,X),f(Y,X)).

yes, unexpected. % this is not even an instance
?- subsumes_term(f(Y,X),f(X,X)).

yes % ok, this is an instance

@UWN
Copy link
Author

UWN commented Dec 8, 2024

Currently, the following twelve implementations implement this correctly: B, ECLiPSe, GNU, Ichiban, SICStus, SWI, Scryer, Tau, Trealla, X, XSB, YAP.

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

No branches or pull requests

2 participants