Kenny Tilton writes:
BTW, have you considered simply leaving Cells out of the logical computation? Just have a classic proplog-in-lisp work things out and produce an aggregation of values from which Cells simply look up the value decided for them?
Well, I started with the idea of using Cells and Allegro Prolog. I tried a couple fake-ups but it felt awkward. Part of it is that you really need to interleave the two systems, because you don't want to generate lists of possibilities when you only need One That Works. So I was going to write a higher-level constraints system that would internally use Cells for data propagation, and Allegro Prolog for the LP part of constraints-solving. But ...
OTOH, I can see how, if you are using Cells, you would just as soon go on using them and then add a little logic, rather than end up with some of the system specified in Cells and some of it specified in some alternative scheme -- especially since the rules in the alternative scheme would tend to have dependencies on Cells.
... exactly, what I want to be able to have is a variable that magically takes on the right, constrained value. Having cells that depend on Prolog, whose predicates depend on cells ... this was looking ugly. My bet is that by adding Generators and backtracking, a lot of the Prolog work can be done in Lisp, and it will make interfacing between Lisp and Prolog nicer for those times when Prolog is a better solution.
I am talking myself into your approach, but I just wanted to make sure there is not a better way than Cells.
Actually, this could be seen as trying to build up what I need for a CL+Cells<->Prolog FFI :-)