On 09/21/2014 12:31 AM, Marco van de Voort wrote:
In our previous episode, Mark Morgan Lloyd said:
Is anybody interested in a PROLOG interpreter written in Turbo Pascal,
plus a couple of typeset articles which outline how it works internally?

When I found it I was wondering whether it could be usefully used to
handle inference rules in a Delphi/FPC/Lazarus program, in the same way
that MS use Prolog for some of their network configuration stuff.
However it turns out that it is coded explicitly for Turbo Pascal with a
garbage collector on top of the normal heap, which I think implies that
porting it to FPC would need either a mark/release facility or multiple
heaps which could be "thrown away" when no longer needed.
I don't understand why interested people couldn't implement mark/release for
the base TP compatible level of FPC ?  What is so different between TP and
FPC there?
Just implemented it in the "tiny" heap manager (the heap manager used for i8086-msdos and perhaps in the future - the embedded targets). For the regular targets I'd suggest adding it as an unit that replaces the standard heap manager with the simple one, as described by Marco. You can even use the "tiny" heap manager sources (rtl/inc/tnyheaph.inc and rtl/inc/tinyheap.inc) in your unit. They might need some minor patching, but nothing too difficult.

Nikolay
_______________________________________________
fpc-other maillist  -  fpc-other@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-other

Reply via email to