The idea for this predicate was raised by Vitor Santos Costa in a discussion to reach as a portability framework between SWI-Prolog and YAP.
This library defines :- expects_dialect/1, telling the system for which Prolog dialect was written, as well as useful tests in conditional compilation:
:- if(exists_source(library(error))). :- use_module_library(error). :- endif.