-
Notifications
You must be signed in to change notification settings - Fork 20
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
functor/3 incorrectly fails &ct #90
Comments
@jfmc: are you aware of another system that fails here? At least SICStus, Scryer, Trealla, GNU, Ichiban, ECLiPSe, SWI, Tau, YAP, XSB, B, Minerva, IF, IV all produce an instantiation error. |
Indeed unfortunately we still retain here the classic pre-standard behavior. It is not so much procrastination but rather that there are a few thousand calls to |
You are suggesting that this is an ISO only feature. But many pre-ISO systems produced this instantiation error as well. Like Quintus. And to quote the User's Guide to DECsystem-10 Prolog of 1978 (same in the 1982 manual): functor(T,F,N) The principal functor of term T has name F and arity N, where F is either an atom or, provided N is 0, an integer. Initially, either T must be instantiated to a non-variable, or F and N must be instantiated to, respectively, either an atom and a non-negative integer or an integer and 0. If these conditions are not satisfied, an error message is given. In the case where T is initially instantiated to a variable, the result of the call is to instantiate T to the most general term having the principal functor indicated. So it is not clear what you refer to as "classic" behavior. The most recent version of SICStus Prolog that silently failed (that I am aware of) is 0.7#7 of 1991-11. That is 32 years ago. |
Thanks @UWN for identifying when the "classic" behavior was abandoned in SICStus, and for clarifying that it was not so widespread as we thought. |
For the record. A SICStus that already produces the instantiation error:
|
(internal note)
|
Also for the record:
In particular:
|
The text was updated successfully, but these errors were encountered: