From: David W. <wa...@cs...> - 2006-02-23 14:36:24
|
Bart Demoen writes: > > > var/1 does not succeed on attributed variables > ... > > Does anyone know what other Prologs do? > > SICStus: > | ?- put_atts(X,a(10)), var(X). > true ? > yes > > Yap: > ?- put_atts(X,a(10)), var(X). > > true ? > yes > > SWI - hProlog: > ?- put_attr(X,asd,qwe), var(X). > > X = _G187{asd = ...} > > Yes > ?- > > SWI and hProlog have a new predicate attvar/1 which succeeds for > attributed variables, but not for ordinary ones. > > Usually, existing code does not break by making var/1 succeed on > attributed vars. Yeah, in XSB var always used to succeed on attributed variables, too. When I changed the compiler to speed up some conditions, I broke it for those cases. So now XSB is inconsistent: if the var is in the test condition of an if-then(-else), it fails for attributed variables; in other contexts it succeeds. Mea culpa. I'll fix it immediately. Thanks Barry and Bart and Terry for doing the debugging I should have done.... Thanks, -David |