Re: refining the Synopsis APIs

Vladimir Prus <[email protected]>
Newsgroups gmane.comp.documentation.synopsis
Message-ID <[email protected]>
On Thursday 28 October 2004 17:26, Stefan Seefeld wrote:

> >I think that "Abstract" and  "Semantic" words are all very confusing.
> >Basically, you description of ASG says it's just a set of interlinked C++
> >objects. Semantic could mean anything, including operational semantic (how
> >i+1 is prorcessed and so on). I'd suggest to name this module just
>
> "Objects",
>
> >or "Entities", to avoid further confusion.
>
> I hoped the term would be in common use in the compiler / parser community,
> and some search on google and citeseer seems to confirm this.

You know, in my PhD research, "abstract semantic" means something completely 
different. For example integer addition operator in C++ has some concrete 
semantic. If you simplify it a bit, you can abstract semantic (for example, 
negative value + negative value = negative value).


> >If PTree is just a grouping of input tokens into blocks (class
> > definitions,
> >
> >functions), and "Entities" is high-level classes and functions (no trace
> > of
> >
> >syntax), then there's very little place left for any other layer.
>
> A parse tree represents a concrete syntax, while an AST removes some of
> the (now redundant) data.

Yea, just like Entities layer. We can build several layers this way, so I'd 
suggest that we forget about AST until it's really needed.

> >In fact, now that you've sketched the diagram and explained they layers, I
> >think we need to agree what PTree does. For example:
> >
> >PTree -- just grouping of tokens, as little semantic information as
>
> possible.
>
> >Entities -- reach semantic information, including logic for instantiating
> >templates, template argument deduction and so on.
> >
> >Given that, it's not all clear that Entiries are constructed after
> > parsing.
> >
> >Given an appropriate design of "Processor", the steps can be interleaved.
>
> yes indeed. That's something we will find out in the process :-)
>
> FWIW, I very good summary of the process is :
>
> http://www-adele.imag.fr/~jmfavre/ENSEIGNEMENT/TRANSPARENTS/IntroductionToS
>o ftwareAnalysis/IntroductionToSoftwareAnalysis-1.pdf
>
> That's what helped me understand the terms as I used them in my other mail.
> Can we agree on this usage ?

Looking at the diagram, I don't think we require "denotional semantic". It 
looks like semantic graph there is AST + extra edges. I don't think this 
distinction between semantic graph and AST is useful. I'd suggest that we 
have syntax tree layer (let's drop "A" to avoid confusion), which is about 
grouping tokenes, and semantic layer, which is amount smart things (and 
includes edge to definitions, and whatnot).

- Volodya
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.