logtalk3
logtalk3 copied to clipboard
B-Prolog 8.1 sub_atom/5 bug
The B-Prolog 8.1 implementation of the standard sub_atom/5 predicate can return an integer instead a (sub-)atom. For example:
| ?- sub_atom('foo#0', 4, _, 0, Atom).
Atom = 0
yes
| ?- sub_atom('foo#0', 4, _, 0, Atom), atom(Atom).
no
This bug is exposed by Logtalk in some of the unit tests for the built-in logtalk object and in errors when converting internal entity prefixes back to entity names.