summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWei Tang <i@null.tl>2015-09-09 15:08:24 +0800
committerWei Tang <i@null.tl>2015-09-09 15:08:24 +0800
commita72b5f8a7fdd661655d9ba88b161a20a57966922 (patch)
tree146665d25f9d6b3cf747628ab37a3daa4fa59bf5
parent107eb12a399fda9b448f16d8cfb1281bcca19bd0 (diff)
downloadmm-a72b5f8a7fdd661655d9ba88b161a20a57966922.tar.gz
mm-a72b5f8a7fdd661655d9ba88b161a20a57966922.tar.bz2
fix predicatify: it will now terminate
-rw-r--r--mm.rkt6
1 files changed, 3 insertions, 3 deletions
diff --git a/mm.rkt b/mm.rkt
index d9bd725..95fd3e9 100644
--- a/mm.rkt
+++ b/mm.rkt
@@ -325,13 +325,13 @@
(define predicatifyo
(lambda (s pattern-assoc parent fresh-next fresh-next-out substitution)
(fresh (tmp predicate)
- (predicateo predicate pattern-assoc)
(conde
((varo s)
(unifyo predicate s tmp substitution))
((not-varo s)
(== predicate s)
(== tmp substitution)))
+ (predicateo predicate pattern-assoc)
(runo* predicate pattern-assoc parent
fresh-next fresh-next-out tmp))))
@@ -361,9 +361,9 @@
((fresh (s1 s2 o1 o2 fresh-next-tmp tmp)
(== `(conj ,s1 ,s2) predicate)
(predicatifyo s1 pattern-assoc parent fresh-next
- fresh-next-tmp tmp o1)
+ fresh-next-tmp tmp)
(predicatifyo s2 pattern-assoc tmp fresh-next-tmp
- fresh-next-out out o2)))
+ fresh-next-out out)))
((fresh (selbri rest fresh-next-tmp applied)
(== `(,selbri . ,rest) predicate)
(=/= '== selbri)