The presence of a function, foo, prevents another function, bar, from running properly, apparently because one of the arguments of bar unifies with the definition of foo.
How to reproduce it?
Run the following metta file (via metta.py)
;; Define foo
(= (foo $x) $x) ; prevents bar from running properly
;; Define bar
(: bar (-> Atom Atom Atom))
(= (bar $query $rule)
(let* (((: $ructor (-> $premise $conclusion)) $rule)
((: ($ructor $proof) $conclusion) $query)
((: $proof $premise) (: a A)))
$query))
;; Test bar
!(bar (: ($f a) B) (: f (-> A B)))
What should normally be expected?
[(: (f a) B)]
What is output instead?
[]
Remark
If the definition of foo is removed then the output is the expected one.
What is the problem?
The presence of a function,
foo
, prevents another function,bar
, from running properly, apparently because one of the arguments ofbar
unifies with the definition offoo
.How to reproduce it?
Run the following metta file (via
metta.py
)What should normally be expected?
What is output instead?
Remark
If the definition of
foo
is removed then the output is the expected one.