Closed collosi closed 10 years ago
Thanks @laslowh. I added a test case and a little documentation before merging.
Looks great. Thanks. Hey, maybe you can answer this question for me. Can foreign predicates have side effects? Is it ok for a foreign predicate to return something different given the same arguments? Thanks.
graham
On Tue, Aug 19, 2014 at 4:12 PM, Michael Hendricks <notifications@github.com
wrote:
Thanks @laslowh https://github.com/laslowh. I added a test case and a little documentation before merging.
— Reply to this email directly or view it on GitHub https://github.com/mndrix/golog/pull/15#issuecomment-52691555.
Can foreign predicates have side effects? Is it ok for a foreign predicate to return something different given the same arguments?
The answer to both questions is yes. Foreign predicates are welcome to use the full power of Go. If you create any foreign predicates that you think would be generally useful, feel free to submit pull requests. All the builtins (builtin.go) are implemented using the foreign predicate interface.
CanProve currently attempts to prove all, but then checks to see if there's at least one solution. This seems wasteful