diff options
Diffstat (limited to 'prolog/problems/family_relations')
10 files changed, 10 insertions, 30 deletions
diff --git a/prolog/problems/family_relations/ancestor_2/common.py b/prolog/problems/family_relations/ancestor_2/common.py index ec44d41..68cbc6d 100644 --- a/prolog/problems/family_relations/ancestor_2/common.py +++ b/prolog/problems/family_relations/ancestor_2/common.py @@ -52,9 +52,7 @@ def test(program, solved_problems): 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: - # Limit inferences for each solution to curb unbounded recursion. - limited = 'call_with_inference_limit(({}), 100000, _)'.format(query) - if prolog.engine.check_answers(engine_id, query=limited, answers=answers, timeout=1.0): + if prolog.engine.check_answers(engine_id, query=query, answers=answers, timeout=1.0): n_correct += 1 finally: if engine_id: diff --git a/prolog/problems/family_relations/aunt_2/common.py b/prolog/problems/family_relations/aunt_2/common.py index d2051b0..b0a18bf 100644 --- a/prolog/problems/family_relations/aunt_2/common.py +++ b/prolog/problems/family_relations/aunt_2/common.py @@ -56,9 +56,7 @@ def test(program, solved_problems): 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: - # Limit inferences for each solution to curb unbounded recursion. - limited = 'call_with_inference_limit(({}), 100000, _)'.format(query) - if prolog.engine.check_answers(engine_id, query=limited, answers=answers, timeout=1.0): + if prolog.engine.check_answers(engine_id, query=query, answers=answers, timeout=1.0): n_correct += 1 finally: if engine_id: diff --git a/prolog/problems/family_relations/brother_2/common.py b/prolog/problems/family_relations/brother_2/common.py index 2b45b53..4d01c0b 100644 --- a/prolog/problems/family_relations/brother_2/common.py +++ b/prolog/problems/family_relations/brother_2/common.py @@ -50,9 +50,7 @@ def test(program, solved_problems): 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: - # Limit inferences for each solution to curb unbounded recursion. - limited = 'call_with_inference_limit(({}), 100000, _)'.format(query) - if prolog.engine.check_answers(engine_id, query=limited, answers=answers, timeout=1.0): + if prolog.engine.check_answers(engine_id, query=query, answers=answers, timeout=1.0): n_correct += 1 finally: if engine_id: diff --git a/prolog/problems/family_relations/connected_3/common.py b/prolog/problems/family_relations/connected_3/common.py index 8b462f5..2555fe9 100644 --- a/prolog/problems/family_relations/connected_3/common.py +++ b/prolog/problems/family_relations/connected_3/common.py @@ -41,9 +41,7 @@ def test(program, solved_problems): 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: - # Limit inferences for each solution to curb unbounded recursion. - limited = 'call_with_inference_limit(({}), 100000, _)'.format(query) - if prolog.engine.check_answers(engine_id, query=limited, answers=answers, timeout=1.0): + if prolog.engine.check_answers(engine_id, query=query, answers=answers, timeout=1.0): n_correct += 1 finally: if engine_id: diff --git a/prolog/problems/family_relations/cousin_2/common.py b/prolog/problems/family_relations/cousin_2/common.py index 68c4b34..382c7a0 100644 --- a/prolog/problems/family_relations/cousin_2/common.py +++ b/prolog/problems/family_relations/cousin_2/common.py @@ -63,9 +63,7 @@ def test(program, solved_problems): 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: - # Limit inferences for each solution to curb unbounded recursion. - limited = 'call_with_inference_limit(({}), 100000, _)'.format(query) - if prolog.engine.check_answers(engine_id, query=limited, answers=answers, timeout=1.0): + if prolog.engine.check_answers(engine_id, query=query, answers=answers, timeout=1.0): n_correct += 1 finally: if engine_id: diff --git a/prolog/problems/family_relations/descendant_2/common.py b/prolog/problems/family_relations/descendant_2/common.py index 0963994..e979b0f 100644 --- a/prolog/problems/family_relations/descendant_2/common.py +++ b/prolog/problems/family_relations/descendant_2/common.py @@ -52,9 +52,7 @@ def test(program, solved_problems): 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: - # Limit inferences for each solution to curb unbounded recursion. - limited = 'call_with_inference_limit(({}), 100000, _)'.format(query) - if prolog.engine.check_answers(engine_id, query=limited, answers=answers, timeout=1.0): + if prolog.engine.check_answers(engine_id, query=query, answers=answers, timeout=1.0): n_correct += 1 finally: if engine_id: diff --git a/prolog/problems/family_relations/father_2/common.py b/prolog/problems/family_relations/father_2/common.py index 802193d..45b9255 100644 --- a/prolog/problems/family_relations/father_2/common.py +++ b/prolog/problems/family_relations/father_2/common.py @@ -53,9 +53,7 @@ def test(program, solved_problems): 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: - # Limit inferences for each solution to curb unbounded recursion. - limited = 'call_with_inference_limit(({}), 100000, _)'.format(query) - if prolog.engine.check_answers(engine_id, query=limited, answers=answers, timeout=1.0): + if prolog.engine.check_answers(engine_id, query=query, answers=answers, timeout=1.0): n_correct += 1 finally: if engine_id: diff --git a/prolog/problems/family_relations/grandparent_2/common.py b/prolog/problems/family_relations/grandparent_2/common.py index ff94f31..0c902da 100644 --- a/prolog/problems/family_relations/grandparent_2/common.py +++ b/prolog/problems/family_relations/grandparent_2/common.py @@ -54,9 +54,7 @@ def test(program, solved_problems): 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: - # Limit inferences for each solution to curb unbounded recursion. - limited = 'call_with_inference_limit(({}), 100000, _)'.format(query) - if prolog.engine.check_answers(engine_id, query=limited, answers=answers, timeout=1.0): + if prolog.engine.check_answers(engine_id, query=query, answers=answers, timeout=1.0): n_correct += 1 finally: if engine_id: diff --git a/prolog/problems/family_relations/mother_2/common.py b/prolog/problems/family_relations/mother_2/common.py index 2fb2722..535e7ed 100644 --- a/prolog/problems/family_relations/mother_2/common.py +++ b/prolog/problems/family_relations/mother_2/common.py @@ -54,9 +54,7 @@ def test(program, solved_problems): 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: - # Limit inferences for each solution to curb unbounded recursion. - limited = 'call_with_inference_limit(({}), 100000, _)'.format(query) - if prolog.engine.check_answers(engine_id, query=limited, answers=answers, timeout=1.0): + if prolog.engine.check_answers(engine_id, query=query, answers=answers, timeout=1.0): n_correct += 1 finally: if engine_id: diff --git a/prolog/problems/family_relations/sister_2/common.py b/prolog/problems/family_relations/sister_2/common.py index 6a1a745..1eb4a6a 100644 --- a/prolog/problems/family_relations/sister_2/common.py +++ b/prolog/problems/family_relations/sister_2/common.py @@ -51,9 +51,7 @@ def test(program, solved_problems): 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: - # Limit inferences for each solution to curb unbounded recursion. - limited = 'call_with_inference_limit(({}), 100000, _)'.format(query) - if prolog.engine.check_answers(engine_id, query=limited, answers=answers, timeout=1.0): + if prolog.engine.check_answers(engine_id, query=query, answers=answers, timeout=1.0): n_correct += 1 finally: if engine_id: |