summaryrefslogtreecommitdiff
path: root/prolog/problems/lists
diff options
context:
space:
mode:
Diffstat (limited to 'prolog/problems/lists')
-rw-r--r--prolog/problems/lists/memb_2/common.py10
-rw-r--r--prolog/problems/lists/memb_2/sl.py2
2 files changed, 6 insertions, 6 deletions
diff --git a/prolog/problems/lists/memb_2/common.py b/prolog/problems/lists/memb_2/common.py
index 4f2a251..45e070a 100644
--- a/prolog/problems/lists/memb_2/common.py
+++ b/prolog/problems/lists/memb_2/common.py
@@ -72,14 +72,14 @@ def hint(code, aux_code):
# recursion is getting bigger and bigger
- # target predicate seems to always be false
- if not prolog.engine.ask_truth(engine_id, 'memb(_, _)'):
- return [{'id': 'predicate_always_false'}]
-
# missing/failed base case
- if not prolog.engine.ask_truthTO(engine_id, 'memb(qq, [qq|_])'):
+ if not prolog.engine.ask_truthTO(engine_id, 'memb(qq, [qq,_,_,_])'):
return [{'id': 'base_case'}]
+ # target predicate seems to always be false
+ if not prolog.engine.ask_truth(engine_id, 'memb(_, [_,_,_,_,_,_])'):
+ return [{'id': 'predicate_always_false'}]
+
# TODO: Tim, can we include 'fail'-used as a general hint?
except socket.timeout as ex:
diff --git a/prolog/problems/lists/memb_2/sl.py b/prolog/problems/lists/memb_2/sl.py
index 5b44521..f2d0ce2 100644
--- a/prolog/problems/lists/memb_2/sl.py
+++ b/prolog/problems/lists/memb_2/sl.py
@@ -30,7 +30,7 @@ hint = {
'eq_instead_of_equ': '''\
<p>Operator <code>==</code> je strožji od operatorja <code>=</code> v smislu, da je za slednjega dovolj,
da elementa lahko naredi enaka (unifikacija). Morda z uporabo <code>=</code> narediš predikat
-<code>member/2</code> delujoč tudi v kakšni drugi smeri.</p>
+<code>memb/2</code> delujoč tudi v kakšni drugi smeri.</p>
''',
'eq_instead_of_equ_markup': '''\