[SCL] two comments

Tanel Tammet tammet at staff.ttu.ee
Wed Nov 5 12:32:15 CST 2003


pat hayes wrote:

> Guys, I was using the term 'abstract syntax' in a precise sense. It is a 
> technical term introduced by John McCarthy; its not just a handy English 
> phrase. See http://www-formal.stanford.edu/jmc/towards/node12.html
> for a succinct introduction.  This approach was later formalized and 
> systematized in the specification literature as 'term algebras', I 
> believe, but we don't really need to get that formal.
> 
> The key motivational point is stated economically there:
> 
> " The predicates and functions whose existence and relations define the 
> syntax, are precisely those needed to translate from the language, or to 
> define the semantics. That is why we need not care whether sums are 
> represented by a+b, or + ab, or (PLUS A B), or even by Gödel numbers 7a11b."
> 
> which is exactly the utility for us, since we want to allow things like 
> CG diagrams to count as logical syntax. In Murray's terminology, the AS 
> is the highest meta-level anyone needs to go to in order to define a 
> syntax and a model theory.  (Splicing together documents, now, is 
> another matter....)

Thanks for the pointer.

The first sentence of the article summarised it nicely. Citation:

"The Backus normal form that is used in the ALGOL report, describes the 
morphology of ALGOL programs in a synthetic manner. Namely, it describes 
how the various kinds of program are built up from their parts. This 
would be better for translating into ALGOL than it is for the more usual 
problem of translating from ALGOL. The form of syntax we shall now 
describe differs from the Backus normal form in two ways. First, it is 
analytic rather than synthetic; it tells how to take a program apart, 
rather than how to put it together. Second, it is abstract in that it is 
independent of the notation used to represent, say sums, but only 
affirms that they can be recognized and taken apart."

The suggestions I read from the article:

- We can define a language either by synthetic or analytic means.
- The "synthetic" means are better for constructing language sentences.
- The "analytic" means are better for describing parsers.

This still does not make it very clear what we should mean by
"abstract" syntax. There is nothing in the article which says that
the synthetic Backus way is not abstract.

For the SCL purposes I'd probably prefer to start with the synthetic 
approach: it is simpler. My temporary abstract syntax chapter
does use synthetic means.

When we define translations to concrete syntaxes, then
it might be useful to use an analytic description, BUT these
are IMHO harder to read.

Alternatively we can present the translation in pseudo-code,
easily understood by people (if presented carefully).
This would allow us to use synthetic means only (two different,
formal ways to express a language may be a bit hard for readers
to digest). Or, we could define analytic presentation at
the beginning of the concrete syntaxes chapter (I doubt
that this will enhance readability by people).

To summarise:

- It seems that "abstractness" of the syntax does not mean
   anything really concrete, but is still (unless somebody
   comes with a real definition, which I doubt) rather a
   methodology, which is fine.

- We could use synthetic or analytic means or both in abstract
   syntax.

- Personally I prefer synthetic means in the SCL spec, since
   this makes the spec easier to write and easier to read:
   there is no need for us to describe parsers of SCL abstract
   syntax, hence analytic means seem to be an overkill
   for the spec.


Regards,
        Tanel Tammet








More information about the SCL mailing list