From 4dfd9056695e7a22c3e486e7be00ce1b408910fc Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Tue, 5 Jul 2016 10:58:49 +0200 Subject: Prolog: remove inference limit for several DCG problems It is reasonable to use CLP(FD) for the paren/3, number/2, number/3 and number_proper/2 problems; the inference limit prevented some tests from succeeding. --- prolog/problems/dcg/number_2/common.py | 2 +- prolog/problems/dcg/number_3/common.py | 2 +- prolog/problems/dcg/number_proper_2/common.py | 2 +- prolog/problems/dcg/paren_3/common.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'prolog') diff --git a/prolog/problems/dcg/number_2/common.py b/prolog/problems/dcg/number_2/common.py index 9560d23..b5b6311 100644 --- a/prolog/problems/dcg/number_2/common.py +++ b/prolog/problems/dcg/number_2/common.py @@ -40,7 +40,7 @@ def test(code, aux_code): if engine_id is not None and 'error' not in map(itemgetter(0), output): # Engine successfully created, and no syntax error in program. for query, answers in test_cases: - if prolog.engine.check_answers(engine_id, query=query, answers=answers, timeout=1.0): + if prolog.engine.check_answers(engine_id, query=query, answers=answers, timeout=1.0, inference_limit=None): n_correct += 1 except socket.timeout: pass diff --git a/prolog/problems/dcg/number_3/common.py b/prolog/problems/dcg/number_3/common.py index 82981d5..1768b3b 100644 --- a/prolog/problems/dcg/number_3/common.py +++ b/prolog/problems/dcg/number_3/common.py @@ -56,7 +56,7 @@ def test(code, aux_code): if engine_id is not None and 'error' not in map(itemgetter(0), output): # Engine successfully created, and no syntax error in program. for query, answers in test_cases: - if prolog.engine.check_answers(engine_id, query=query, answers=answers, timeout=1.0): + if prolog.engine.check_answers(engine_id, query=query, answers=answers, timeout=1.0, inference_limit=None): n_correct += 1 except socket.timeout: pass diff --git a/prolog/problems/dcg/number_proper_2/common.py b/prolog/problems/dcg/number_proper_2/common.py index 6e1c376..2d47846 100644 --- a/prolog/problems/dcg/number_proper_2/common.py +++ b/prolog/problems/dcg/number_proper_2/common.py @@ -42,7 +42,7 @@ def test(code, aux_code): if engine_id is not None and 'error' not in map(itemgetter(0), output): # Engine successfully created, and no syntax error in program. for query, answers in test_cases: - if prolog.engine.check_answers(engine_id, query=query, answers=answers, timeout=1.0): + if prolog.engine.check_answers(engine_id, query=query, answers=answers, timeout=1.0, inference_limit=None): n_correct += 1 except socket.timeout: pass diff --git a/prolog/problems/dcg/paren_3/common.py b/prolog/problems/dcg/paren_3/common.py index 3d7131f..28ccf83 100644 --- a/prolog/problems/dcg/paren_3/common.py +++ b/prolog/problems/dcg/paren_3/common.py @@ -42,7 +42,7 @@ def test(code, aux_code): if engine_id is not None and 'error' not in map(itemgetter(0), output): # Engine successfully created, and no syntax error in program. for query, answers in test_cases: - if prolog.engine.check_answers(engine_id, query=query, answers=answers, timeout=1.0): + if prolog.engine.check_answers(engine_id, query=query, answers=answers, timeout=1.0, inference_limit=None): n_correct += 1 except socket.timeout: pass -- cgit v1.2.1