[antlr-interest] Re: High level semantic analysis

Tiller, Michael (M.M.) mtiller at ford.com
Mon May 19 11:57:49 PDT 2003


> -----Original Message-----
> From: lgcraymer [mailto:lgc at mail1.jpl.nasa.gov]
> Subject: [antlr-interest] Re: High level semantic analysis
> 
> 
> My take on this paper is that they are basically translating a 
> domain-specific logic language to a procedural one, and that there is 
> nothing special here.  At least they used ANTLR (in its PCCTS 
> incarnation) for the implementation even if they mention lex and yacc 
> in figure 2.

I was confused by this assessment for a moment.  When I first read this, I thought you were talking about RML.  I'm assuming that here you are talking about Modelica (i.e. the language that is being parsed in that paper).  As an aside, I would point out that Modelica is not a "logic language" really.  It is a declarative language (like PROLOG) but it doesn't describe logical relationships (at least exclusively).  It is primarily used to describe differential-algebraic equations...but that is somewhat off the topic.

Modelica wasn't the reason I pointed out the paper.  I was more interested in highlighting the rule based semantic analysis facilitated by the RML language discussed in the later parts of the paper.

(BTW, the group that wrote that paper is now using ANTLR 2.7.x)

> As far as the theorem-proving part of this goes, most of 
> these use the "resolution" approach found in any good computer logic text (an intro 
> to Prolog would probably discuss this).

Maybe I'm not very enlightened about all this, but this seems like a pretty useful feature to incorporate into a compiler tool.  I agree that this is just applying rules and this is not novel.  But, just because it isn't novel doesn't mean it isn't useful.  It strikes me a bit like saying "ANTLR...that's just a recursive descent parser like you'd find described in any intro text on parsing".  Sure, the concept isn't "new" but that doesn't mean the implementation is trivial.

> As far as better tree rewrite support goes, that is planned for ANTLR 3.

My point was not to bring up the topic of tree rewriting (useful as it is), but to bring up this topic of being able to incorporate semantic details with the same high-level approach that we handle lexing, parsing and tree walking.

> --Loring

--
Mike


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 




More information about the antlr-interest mailing list