moduleprologiso-prolog

What are the (perceived) shortcomings of the ISO standard for Prolog modules (ISO/IEC 13211-2)?


The ISO standard for Prolog modules is not widely adopted. The only system I found that seems to implement them is Amzi! Prolog. What is the reason that most systems haven't adopted the ISO standard for modules? I can find statements that this is due to shortcomings of the specification, but I haven't been able to find evidence to back up these statements. What problems do other module systems solve that aren't solved by the ISO standard for Prolog modules? Wouldn't it be helpful for the Prolog community if systems at least offered ISO Prolog modules as a common denominator?

There are already a few questions on StackOverflow on the ISO standard for Prolog modules, but they do not answer the above questions. As StackOverflow is not the place to discuss opinions, I am more interested in:

What are the technical merits and shortcomings of the ISO standard for Prolog modules compared with other implemented module systems?


Solution

  • The module standard ISO/IEC 13211-2:2000 permits several realizations. The document itself gives two instances in 6.4.4.1 and 6.4.4.2. This is one of the bigger problems for its adoption. In fact, even the Quintus/SICStus based module system could be seen as a further instance.

    Another (minor) problem is the poor support of higher-order predicates having only one kind of meta-arguments regardless of their precise meaning. But, to be fair, this was not yet well understood in 2000 by many. While this mechanism was provided by Quintus since at least 1986-04, many key features were very well hidden in the manual like call/N which was never listed in the predicate index. See this answer for more.

    As to the system you are referring to, I cursorily checked the source which self declares compliance. On the other hand, it does not seem to be based fully on Part 1 (13211-1). E.g., there is a built-in sub_atom/4 but the standard has sub_atom/5. And the throwing of errors does not seem to be conforming. So I am somewhat hesitant to investigate this any further as I cannot compile the system. Many systems claimed compliance/conformance but a closer investigation often shows unsatisfactory results.