From 86287e6a4fa07d03aa906965a182425320e445ce Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Thu, 27 Aug 2015 15:52:04 +0200 Subject: Replace prolog.engine.run with ask_all Creating and destroying the pengine should be handled somewhere else. This commit also removes query functionality from prolog.engine.create. --- monkey/monkey.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'monkey') diff --git a/monkey/monkey.py b/monkey/monkey.py index 02048de..0939448 100755 --- a/monkey/monkey.py +++ b/monkey/monkey.py @@ -10,12 +10,14 @@ from .util import damerau_levenshtein, PQueue # Check whether all tests for problem [name] succeed. def test(name, code): - try: - reply, output = prolog.engine.create( - code=code, query='run_tests({})'.format(name)) - return reply.get('event') == 'success' - except Exception as ex: - return False + return False + # XXX currently broken + #try: + # reply, output = prolog.engine.create( + # code=code, query='run_tests({})'.format(name)) + # return reply.get('event') == 'success' + #except Exception as ex: + # return False # Starting from [code], find a sequence of edits that transforms it into a # correct predicate for [name]. Append [aux_code] when testing (available facts -- cgit v1.2.1