diff options
-rw-r--r-- | prolog/engine.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/prolog/engine.py b/prolog/engine.py index f94a6ab..26215f8 100644 --- a/prolog/engine.py +++ b/prolog/engine.py @@ -89,13 +89,19 @@ class PrologEngine(object): 'message_to_string/2': PL_predicate(b'message_to_string', 2, None), 'read_term_from_atom/3': PL_predicate(b'read_term_from_atom', 3, None), 'safe_goal/1': PL_predicate(b'safe_goal', 1, None), - 'set_prolog_stack/2': PL_predicate(b'set_prolog_stack', 2, None) + 'set_prolog_flag/2': PL_predicate(b'set_prolog_flag', 2, None), + 'set_prolog_stack/2': PL_predicate(b'set_prolog_stack', 2, None), + 'use_module/1': PL_predicate(b'use_module', 1, None) } self.err_flags = PL_Q_NODEBUG|PL_Q_CATCH_EXCEPTION # Load the sandbox and compatibility library. self.call('consult/1', [Term(Atom('prolog/lib.pl'))]) + # Load the time module (for call_with_time_limit) then disable autoload. + self.call('use_module/1', [Term('library(time)')]) + self.call('set_prolog_flag/2', [Term('autoload'), Term('false')]) + # Increase memory limits. self.call('set_prolog_stack/2', [Term('global'), Term('limit(2*10**9)')]) self.call('set_prolog_stack/2', [Term('local'), Term('limit(2*10**9)')]) |