Next: , Previous: , Up: prolog   [Index]

16.3 Known deviations from iso prolog specification.

The known deviations are

16.3.1 function/arity

In prolog the module + function/arity combination identifies the actual predicate. Scheme does not have such a distinction and in order to keep a tight interface between scheme functions and prolog functions a function is identified with its module + name only. This can create problems for certain prolog programs.

16.3.2 "string" is not atoms.

The logic is currently, that to specifiy an atom with general characters we use as in is prolog 'atom-+-'. But some functions returns a string and they will not be translated to atoms unless there is a module cast or at the final application of an string as an goal, where it will be translated to the current module. The reason for this complexity is to have non module objects or to allow for creation of module objects through construction of strings. We choose a composable method of ideoms that control the namespaces of prolog objects (se the modules chapter) and strings. Strings can be specified directly via "string". Also a unification of an atom with a string will unify on the name of the string. This means that character handling in guile prolog becomes a smooth experience if one learn the ideoms.

16.3.3 unified namespace

Don’t expect guile-log to separate names in evaluation expressions and goals, they are the same, so by defining a predicate log you will overwrite the normal log function. Also if you have a variable X in scope and use an atom ’X’, then they will mean the same thing.

16.3.4 closed files

Closed files cannot be gotten through a general seek of streams.

16.3.5 seek

seek in binary files is not supported (yet).

16.3.6 modules

there is some effort to standardize modules but its unclear how to choose, we therefore do not explicitly add module functionality to prolog, users are advised to write scheme wrappers or inlined scheme code in the prolog file/string. there are extentions to the parser to enable module aware unifications and module atoms.

Next: , Previous: , Up: prolog   [Index]