<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi!<div><br></div><div>I have just started to study Racket and Racklog, so this probably is a very elementary problem, but I haven't been able to find a satisfactory solution on my own, and I would be grateful for getting some pointers into the right direction.</div><div><br></div><div>I'm trying to employ Racklog for mixed forward and backward chaining inference and have conducted some experimentation with it. I use a blackboard-like repository for facts implemented as a Racklog predicate. However I have not been able to figure out how I could automatically ask the user for missing pieces of data. When the inference engine tries unsuccessfully to unify a goal with the blackboard, I would like to present the user with a dialog asking her to input the data, which could then be added to the blackboard. Embedding this into Racklog predicates has turned out to be harder than I could imagine - probably I've just overlooked or misunderstood some critical piece of data in the Racklog manual. Any help will be appreciated.</div><div><br></div><div>Best regards,</div><div><br><div apple-content-edited="true">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div>Mikko Tiihonen</div><div><br></div><div>P.S.</div><div><br></div><div>This succeeds, when tried directly:</div><div><br></div><div><div>(define %pred</div><div> (%rel ()</div><div> (() (%== #t (equal? (read-line) "t")))))</div></div><div><br></div><div>but when chained backwards from another predicate, no dialog is presented.</div></span></div></div></body></html>