InterProlog, adusted for SWI-Prolog