Re: At what point is a language so abstract that it simply cannot be compiled?

gah4@u.washington.edu
Thu, 27 Feb 2020 18:27:04 -0800 (PST)

          From comp.compilers

Related articles
| List of all articles for this month |
From: gah4@u.washington.edu
Newsgroups: comp.compilers
Date: Thu, 27 Feb 2020 18:27:04 -0800 (PST)
Organization: Compilers Central
References: 19-05-083
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="46931"; mail-complaints-to="abuse@iecc.com"
Keywords: design, question
Posted-Date: 27 Feb 2020 22:03:56 EST
In-Reply-To: 19-05-083

On Monday, May 13, 2019 at 8:17:54 AM UTC-7, Costello, Roger L. wrote:


(snip)


> This makes me wonder: Is a theoretical limit to the level of abstraction that
> can be turned into machine instructions? Are there languages (abstractions)
> that are so high level, so abstract, that they simply cannot be mapped to the
> required set of addition, subtraction, comparison, branching instructions? Or
> is there no limit to the languages/abstractions that can be compiled?


For most languages, there is some back and forth between language
design and compiler design, to be sure that the language is parsable.


Though there is the complication that when new features are added
to an existing language, for a new release of the standard, to be sure
that existing programs are still valid and have the same meaning.


It is possible, for example, to (mis)design a language such that
the parsing is ambiguous. Having two different mappings to the
underlying hardware is just about as bad as zero.


Of the languages that I know about, PL/I is one of the few where pretty
much the whole language was designed and specified before compiler(s)
were written. Some parts might have turned out harder to compile than
might have been expected.


But note that if a compiler can't figure it out, likely it is even
harder for a human to understand. Some of the early languages might
have been designed to be easy to compile, but for many years now,
compilability is second to the ability of humans to understand and
reliably write programs in a language. Then some legal language
constructs are recommended against, as they can confuse readers later,
though likely not compilers.


Post a followup to this message

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