re: Practicality of functional and logic languages?

Peter Ludemann <ludemann@quintus.com>
Wed, 13 Jan 1993 21:19:29 GMT

          From comp.compilers

Related articles
Practicality of functional and logic languages? benes@dcse.fee.vutbr.cs (Mirek Benes) (1993-01-11)
re: Practicality of functional and logic languages? ludemann@quintus.com (Peter Ludemann) (1993-01-13)
| List of all articles for this month |
Newsgroups: comp.compilers
From: Peter Ludemann <ludemann@quintus.com>
Organization: Compilers Central
Date: Wed, 13 Jan 1993 21:19:29 GMT
Keywords: prolog
References: 93-01-059

Mirek Benes <benes@dcse.fee.vutbr.cs> writes:
> I would like to know some opinions concerning functional and logic
> programming languages (Haskell, Miranda, ML / Prolog) and their practical
> usability for programming:


It's ironic you ask this question in comp.compilers because there's a very
nice article on using Prolog for compiler writing in:


"Logic Programming and Compiler Writing" by D.H.D. Warren, in Software -
Practice and Experience, Vol 10, pp 97-125 (1980)


You should also look at Chapter 9 of: "Logic Grammars" by H. Abramson and
V. Dahl, Springer 1989 which describes another method of using Prolog for
building compilers.


I know of a VHDL compiler which is about 6,000 lines of Prolog and has
more functionality than a 60,000 line program written with yacc and lex
(yes, even with yacc+lex, the C program was 10-times more code than the
Prolog program).


Right now, I'm working on a system to extract structure from "WYSIWYG"
graphic files, using Prolog to build an object-oriented relational model.
It runs faster than the database loader (written in C) which reads its
output. (If I had tried to do this in C++, I'd still be debugging memory
allocation and my data structures would be utterly cryptic.)


A partial list of significant Prolog-implemented systems was posted in
October in comp.lang.prolog by Chris Moss (cdsm@doc.ic.ac.uk). To quote
from it:
> Below is the first summary of the Prolog thousand database which now
> contains nearly four hundred entries. About half the entries also have
> statistics showing that the length of programs ranges from 9 to 200,000
> lines (totalling over 2 million lines) and took from 1 hour to 70 person-
> years to develop, with averages of around 14,000 lines and 30 person-months.
-----
Peter Ludemann Manager, Large Applications Consulting
Quintus Corporation InterNet: ludemann@quintus.com
2100 Geng Road FAX: +1-415-494-7608
Palo Alto, California 94303 Phone: +1-415-813-3819
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.