This should be fairly easy to implement. Documentation: <http://www.swi-prolog.org/pldoc/man?CAPI=PL_initialise>