Remix.run Logo
HexDecOctBin 9 hours ago

I often wonder what a Prolog implemented as an Objective-C like extension to C would look like. Since WAM has proper stack and heap IIRC, it might be possible to plug that in through some region-based memory management on C side. Is there some prior art like this?

NetMageSCW 29 minutes ago | parent [-]

I ported from Pascal to C a Lisp interpreter system that had an embedded Prolog in it (that used Lisp syntax) (and wrote a new memory subsystem) in my spare time in College. Later I helped a grad student a little bit with their implementation of a Warren machine (runtime for a Prolog compiler) for it. That’s the only embedded Prolog I’m aware of.