[Oberon] LOOP conversion
Pablo Cayuela
pablo.cayuela at gmail.com
Tue Jan 12 06:35:13 CET 2021
There is one publication on the subject:
The Formal Specification of Oberon
* Philipp W. Kutter* (Eidgenössische Technische Hochschule, Switzerland)
* Alfonso Pierantonio* (Università di L'Aquila, Italy)
*Abstract:* This paper presents the formal specification of the programming
language Oberon. Using Montages we give a description of syntax, static,
and dynamic semantics of all constructs of the language. The specification
is arranged in five refinement steps, each of them results in a working
sub-language of Oberon. The compactness and readability of the
specification make us believe that it can be used for a reference manual.
*Keywords:* Montages, Oberon, abstract state machines, programming
languages specifications, reference manuals
http://www.jucs.org/doi?doi=10.3217/jucs-003-05-0443
On Thu, Jan 7, 2021 at 9:47 AM Frans-Pieter Vonck <fp at vonck.nl> wrote:
> In Oberon Steps Beyond Pascal And Modula:
> "[..]we formally define the control structures by means of predicates
> and their transformation rules."{pg. 47, Chapter 5: Control Structures.
>
> "The danger of using the repeat statement lies in the fact, that the
> statement sequence is not guarded by an explicit condition.[..] In
> general it is wise to use the WHILE statement whenever REPEAT does not
> offer a clear advantage." (pg.58)
>
> Interesting is that the LOOP statement is not formally defined in this
> book, see 5.2.5.
> Probably due tot the fact that there are multiple exits.
> Also the FOR statement is not formally defined (pg. 273).
>
> It is possible I've overlooked some good explanations about this
> subject.
> What is your favorite examples of formal definitions of control
> structures in Wirth's work?
>
> Grts,
> F.P.
>
>
> Chris Burrows schreef op 2021-01-07 07:16:
> >> -----Original Message-----
> >> From: Oberon [mailto:oberon-bounces at lists.inf.ethz.ch] On Behalf Of
> >> Skulski, Wojciech
> >> Sent: Thursday, 7 January 2021 1:53 PM
> >> To: ETH Oberon and related systems
> >> Subject: Re: [Oberon] [EXT] LOOP conversion
> >>
> >> Andreas:
> >>
> >> >I have a sneaking suspicion that the participants in this discussion
> >> >have (probably?) already spent more time on this question than the
> >> time
> >> >it would take to add LOOP to the compiler ;-)
> >>
> >> I would if I could. But there are some limits to my knowledge and
> >> skills. I know how to do many things, but not this one.
> >>
> >> Other users are in a similar situation. Not every user is capable to
> >> define a language and to implement or change the compiler.
> >>
> >> We are at your mercy.
> >>
> >
> > I believe in that clichéd quote "Give a man a fish and you feed him for
> > a
> > day. Teach a man to fish and you feed him for a lifetime".
> >
> > How much of your time would you be prepared to invest to learn how to
> > add
> > LOOP and multiple EXITs to Wirth's published Project Oberon Oberon-07
> > compiler?
> >
> > If you give a reasonable answer I am prepared to give you (and anybody
> > else
> > watching this list) step by step instructions of the approach you can
> > take
> > to achieve it. As far as compiler modifications go it is relatively
> > straightforward. The completed exercise consists of approximately 20
> > additional statements in two of the compiler modules and makes use of
> > existing code generation procedures. Once you have completed those
> > steps you
> > should have learnt enough to be able to add multiple RETURNs as well
> > with
> > little or no assistance and to make similar changes to Andreas's source
> > code
> > if you want to build on that instead.
> >
> > Step 1. Prepare an environment to allow you to edit the compiler source
> > code, compile it and execute it.
> >
> > I expect that you will find it to be a very empowering exercise. The
> > only
> > fear I have is that once "the genie is out of the bottle" there will be
> > no
> > putting it back ;-)
> >
> > Regards,
> > Chris Burrows
> > https://www.astrobe.com
> >
> >
> > --
> > Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related
> > systems
> > https://lists.inf.ethz.ch/mailman/listinfo/oberon
> --
> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
> https://lists.inf.ethz.ch/mailman/listinfo/oberon
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20210112/2eda25e5/attachment.html>
More information about the Oberon
mailing list