I'm running the following query in a directory having an empty file empty:
?- member(EOF_action,[error,eof_code,reset]), open(empty,read,S,[eof_action(EOF_action)]), stream_property(S,end_of_stream(EOS)), close(S).
Here's what I get from different Prolog systems:
| Prolog system | eof_action(error) | eof_action(eof_code) | eof_action(reset) |
|---|---|---|---|
| SICStus Prolog | not | not | not |
| GNU Prolog | at | at | not |
| Scryer Prolog | at | at | at |
| Traella Prolog | at | at | not |
| SWI-Prolog | not | not | not |
It appears that above systems behave quite differently in this particular corner case.
Does the ISO-Prolog standard specify which behaviour is right for conforming processors?