Forth and Prolog

From: Andreas Kochenburger (kochenburger_at_gmx.de)
Date: 05/10/04


Date: Mon, 10 May 2004 10:45:14 +0200

The posting below may perhaps interest someone here too. However the
compiler was old Turbo Prolog.

BTW I read that Borland graciously put all their old DOS-based Turbo
compilers into public domain. Is this also true for Turbo Prolog?
AFAIK it had been a predecessor of PDC and Visual Prolog but found
nothing in this respect on PDC's website. If policies and license
legalities allow, it would be nice from PDC if they could provide a
download of this archaic but still fascinating small and efficient
compiler.

fox@ultratechnology.com (Jeff Fox) wrote in message
news:<4fbeeb5a.0405021646.6601bcdf@posting.google.com>...
> Now I know that TCOM when targeting for DOS produces a .COM
> of ~300 bytes. I wonder if any other optimizing target
> compiles produce smaller code, closer to the <30 bytes
> required for a .COM using DOS function call. Does anyone
> have numbers smaller than 300?

That question spurned my "sportive ambition" and I dug out an
old Prolog-based Forth compiler experiment of mine. It compiles the
Forth
code : MAIN ." Hello World" ; to a COM-file of just 62 bytes.

For those who might like to play with it here is the link:
http://home.arcor.de/a.s.kochenburger/downloads/AFC.ZIP
FYI I put a small readme.txt into the zip package. Enjoy!

Anyhow I am interested to hear about any other cobinations
of Forth with Prolog.

Andreas



Relevant Pages

  • Re: Interpreter/Compiler texts
    ... But Susan Stepney, ... 1993), shows the implementation, in Prolog, of a compiler ... interpreters) in Richard O'Keefe, The Craft of Prolog ... 19 Logic Grammars, 24 A Compiler). ...
    (comp.lang.prolog)
  • Re: Interpreter/Compiler texts
    ... But Susan Stepney, ... 1993), shows the implementation, in Prolog, of a compiler ... 19 Logic Grammars, 24 A Compiler). ... There's also a section on compiler construction in ...
    (comp.lang.prolog)
  • Re: Interpreter/Compiler texts
    ... , shows the implementation, in Prolog, of a compiler intended to be provably correct against a semantics specified in Z. Available now from her Web site at ... 19 Logic Grammars, 24 A Compiler). ... There's also a section on compiler construction in ... Harvey Abramson and Veronica Dahl, Logic Grammars, Symbolic ...
    (comp.lang.prolog)
  • Re: Prolog compiler correctness
    ... which in turn has an assembler that executes the ... WAM code. ... I'm only concerned about Prolog correctness, ... And for people who worked on popular open source Prolog compiler ...
    (comp.lang.prolog)
  • Re: How can I do this without cuts?
    ... > an apology, ... this ended as we both agreed that compiler ... for Prolog at least reached a plateau in the early 90s and that the ... generate Java code, or at least a class hierarchy. ...
    (comp.lang.prolog)