Open arademaker opened 4 years ago
Investigating this error, I found a new problem. The function that looks for predicate variables is considering that the two axioms below contain predicate variables:
(=>
(and
(instance ?Bond CallableBond)
(currentAccountBalance (AccountFn ?Bond) ?Date ?Amount)
(callDate ?Bond ?Date))
(amountDue (AccountFn ?Bond) ?Amount ?Date))
(=>
(albumRelease ?A ?T)
(and
(exists (?R1 ?DS1)
(releaseForSale (AlbumCopiesFn ?A ?DS1) ?R1 ?T))
(not
(exists (?B ?R2 A?DS2)
(and
(before ?B ?T)
(releaseForSale
(AlbumCopiesFn ?A ?DS2) ?R2 ?B))))))
The problem is in the way the fuction map-fold
and find-vars
operate. They should maintain a context during the parsing of the axiom.
Once this is solved, we must take care to not substitute different predicate variables in the same axiom by the same predicate symbol.