Re: Programming language specification languages

wclodius@aol.com (Wclodius)
6 Oct 2001 15:56:11 -0400

          From comp.compilers

Related articles
Programming language specification languages nmm1@cus.cam.ac.uk (2001-09-20)
Re: Programming language specification languages cfc@world.std.com (Chris F Clark) (2001-09-21)
Re: Programming language specification languages asloane@ics.mq.edu.au (Anthony M. Sloane) (2001-09-25)
Re: Programming language specification languages rkrayhawk@aol.com (2001-09-25)
Re: Programming language specification languages idbaxter@semdesigns.com (Ira D. Baxter) (2001-09-26)
Re: Programming language specification languages vbdis@aol.com (2001-09-26)
Re: Programming language specification languages wclodius@aol.com (2001-10-06)
Re: Programming language specification languages joachim_d@gmx.de (Joachim Durchholz) (2001-10-06)
Re: Programming language specification languages joachim_d@gmx.de (Joachim Durchholz) (2001-10-06)
Re: Programming language specification languages neelk@alum.mit.edu (2001-10-10)
Re: Programming language specification languages wclodius@aol.com (2001-10-20)
Re: Programming language specification languages nmm1@cus.cam.ac.uk (2001-10-21)
| List of all articles for this month |

From: wclodius@aol.com (Wclodius)
Newsgroups: comp.compilers
Date: 6 Oct 2001 15:56:11 -0400
Organization: AOL http://www.aol.com
References: 01-09-087
Keywords: design
Posted-Date: 06 Oct 2001 15:56:11 EDT

> I have spent far too much of my life in the areas of interrupt
> handling, ill-defined parallelism and the C standard. In my absence
> of spare time, I am thinking of putting some of my ideas together
> for a debuggable programming language with parallelism, efficiency
> and robust handling of (system-generated) interrupts.


You have set yourself a difficult task. I can think of a number of
languages (Modula-3, Ada, Sather, and the functional language from
Lawrence Livermore) that have all attempted to address that task. Only
Ada gained some popularity, and only with a lot of initial
governmental support. But even if popular or commercial success is
unlikely the intellectual challenge can be rewarding.


> Now, let us ignore the fact that it would have to be implemented in
> C, a language with none of those properties, and consider its
> specification.


Given your postings in other forums I suspect that you can get started
quicker with a C based tool, but there are comparable tools in C++,
Java, SML, Haskel, Prolog, Common LISP, Ada, Modula 2, and
Oberon. Some tools suport multiple languages, ANTLR (Java, C++, and
Sather) and Coco (Java, C, Oberon, Modula 2).


Be aware that in such tools you are in principle talking about five
different langauges


1. the language you want to define and translate. A C style syntax is
probably most popular nowadays.


2. the language(s) in which is written the tool you use to define your
language. You should not care about this.


3. the language that is the immediate target for the code produced by
your language definition tool. This is probably where C is most useful
for your purposes.


4. the language recognized by your tool, usually a mixture of EBNF
(perhaps extended with an attribute grammar or other semantic
analysis) and language 3 above.


5. the language(s) of the (abstract) machine into which you will
translate your language using the code in language 3 generated from
the specification in language 4. You may also want to make your
abstract machine C, but gcc's intermediate representation, c-- if it
ever settles down, Fortran, or even Ada could provide high portability
with efficiency.


>I would want to specify it at least as precisely as Algol 68, which
>isn't hard as far as the syntax goes. But the real problems arise in
>the non-syntactic aspects. I am getting old (53) and can no longer
>learn new languages at the speed I could, and so am reluctant to waste
>effort on the more bizarre program proving notations and so on. I
>want something that enables me to say what I want to say, but
>precisely.


>Readers of this group can easily understand that 15 years of being
>inflicted with C and POSIX leads to such a desire ....
>
>Also, because this is a DESIGN process, I am keen not to have to use a
>notation that forces me to use a markup language, on the grounds that
>semi-automatic searching and editing of plain text is so much easier.
>All good 1960s and 1970s software engineering principles, though
>that's not what we called it then. What I want is something enough
>beyond BNF that I can define type-consistency, scoping, aliasing and
>value-constraint rules. The really fancy stuff can be said in
>English.
>
>It is easy enough to invent my own notation, but that is a stupid
>idea on several grounds. The question is whether needs must, or
>whether there is an appropriate specification language. Has anyone
>considered or tackled this task, and with what conclusion, if any?


Unfortunately there are a number of specification languages, and those
that go significantly beyond simple syntax analysis have the steepest
learning curves. The non-commercial tools that I have read about that
would do the best job on the specification part of the process, the
CENTAUR system (from INRIA in France), come across as more prototyping
tools and generate something other than C for their output. There are
other toold available for VDM and Z, but after the Modula 2
standardisation fiasco VDM, at least, developed a bad reputation.


The closest I have found to what you want is Eli, but I found it very
daunting. It in effect has several different languages for specifying
literate programming, syntax, attributes, tree walking, and a large
library for thes tasks. The associated documentation is large, I
believe well over a thousand pages, and not as well unified as I would
have liked. I also tried doing something in my part time with it, but
found that if I weren't working with it several times a week I would
be spending much of my time just getting back up to speed. <snip>




William B. Clodius


Post a followup to this message

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