[mercury-users] Mercury applications, AI, backtracking

Randall Helzerman rahelzer at ichips.intel.com
Thu Sep 17 09:04:20 AEST 1998


> >     decent parser.  I see real potential for a declarative scripting
> >     language. 
> 
> Don't I misunderstand the terms? What is "scripting language"?

A scripting language doesn't _have_ to be interpreted, but it is nice for
rapid development.  

The question was raised "do mainstream programms really need backtracking"?
My point was that this was the wrong question, the right question being "Can
mainstream problems be solved with a declarative programing language?"  and
my point was that a declarative programming language with backtracking (such
as prolog or Mercury) is very good for script writing--which seems to have
been your experience as well.

> Many years ago I used Arity/Prolog *interpreter* (and SICStus for the
> short time) really as *scripting* language. For parsing/transformation
> of data, access to databases, etc.

Cool!

> But Mercury is a *compiled* language with static type checking.

Yes, but this really doesn't prevent you from doing scripting with it, no?
(Agreed, an interpreted mode would be nice for rapid prototyping.)

> Does the quoted statement mean that there should be an interpreter of
> a logic programming language, which should stand in the same position
> to Mercury as Arity-interpreter to Arity-compiler?

The Mercury team is I believe working on a byte-coded interpreter.  In my
ever-so-humble opinion, I believe that a fast Mercury
meta-circular-interpreter would give us 90% of what we would want a
byte-coded version to do, and in addition it would avoid several thorny
issues such as how to call compiled code from byte code and vice versa.

Moreover, meta-interpreters are a standard part of the logic programming
toolkit, and having an easily-extensible one for the full Mercury Language
would be A Good Thing.



More information about the users mailing list