Python and PythOz

ngkaboon at my-deja.com ngkaboon at my-deja.com
Tue Oct 26 23:50:48 EDT 1999


In article <y0j7lkanst0.fsf at vier.idi.ntnu.no>,
  mlh at idi.ntnu.no (Magnus L. Hetland) wrote:
> Henk Jansen <hj at rdr-nl.com> writes:
>
> > I wondered if there've (ever) been ideas to extend Python with
> > logic-like features such as available in the programming
language/system
> > Oz/Mozart; or alternatively, to build a system with such
functionality
> > on top of Python. Included features would be:
>
> [...]
>
> This sounds great... You're not the first one to want
> logic-programming features available in Python... Swig'ing GNU Prolog
> has been mentioned, as has a simple logic-programming framework
> implemented in python... (Which I haven't seen yet... still waiting :)
>
> I would really like something like this too... I love the logic
> programming paradigm for some very limited applications - but hate
> making big programs in Prolog... So having a logic engine available in
> Python would be wonderful... <sigh>
>

I just finished a school project on a Scripting Approach to Constraint
Programmning. I did not use Python but I used Tcl. Since
SWIG (http://www.swig.org) was used, I think I should be able to
port it to Python somehow. Currently the engine is running a wee bit
slow but the functionality is almost there. I had some help from
the Oz folks in reusing some of their propagator code.

It is a single process model (no threads), allow logic variables
and posting of propagators (read it as more like ILOG constraint
programming library than like a language). Programmable searches
like Oz. I would see the syntax as distant from Prolog. In short,
Scripting language + CP(FD) features.

Borning and colleagues also has a linear solver,Cassowary, (which
included using Python) for graphics drawing and such.
http://www.cs.washington.edu/research/constraints/cassowary/
(That's of course not the same school of Constraint Programming as
in Oz)

My project is far from release (It's ongoing work). It runs roughly 10
times slower than  Mozart.
And yes, if anyone is at least a tiny bit interested, pls look at
my project presentation slides...
http://www.comp.nus.edu.sg/~ngkaboon/figaro/present2/index.htm

If anyone is interested in doing the porting of this project
of Tcl to Python, pls contact me directly.


Sent via Deja.com http://www.deja.com/
Before you buy.




More information about the Python-list mailing list