SWI-Prolog syntax checking