From 815063053ef46e3baad68564585c306fc559eaad Mon Sep 17 00:00:00 2001 From: Aleksander Sadikov Date: Mon, 29 Feb 2016 17:07:37 +0100 Subject: Some minor corrections in accompanying texts. --- prolog/problems/family_relations/cousin_2/common.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'prolog/problems/family_relations/cousin_2/common.py') diff --git a/prolog/problems/family_relations/cousin_2/common.py b/prolog/problems/family_relations/cousin_2/common.py index c6d07c7..86ef5cc 100644 --- a/prolog/problems/family_relations/cousin_2/common.py +++ b/prolog/problems/family_relations/cousin_2/common.py @@ -40,6 +40,7 @@ hint_type = { 'cousin_vs_sibling': Hint('cousin_vs_sibling'), 'cousin_to_oneself': Hint('cousin_to_oneself'), 'cousin_need_not_be_parent': Hint('cousin_need_not_be_parent'), + 'predicate_always_false': Hint('predicate_always_false'), } test_cases = [ @@ -84,6 +85,10 @@ def hint(code, aux_code): return [{'id': 'gender_is_irrelevant_markup', 'start': m[0], 'end': m[1]} for m in marks] + \ [{'id': 'gender_is_irrelevant'}] + # target predicate seems to always be false + if not prolog.engine.ask_truth(engine_id, 'cousin(_, _)'): + return [{'id': 'predicate_always_false'}] + # precedence fail (AND block vs OR block) # case in point: parent(PX, X), parent(PY, Y), brother(PX, PY) ; sister(PX, PY) # or this case: parent(PX, X), parent(PY, Y), sister(PX, PY) ; brother(PX, PY) -- cgit v1.2.1