- Pascal to Component Pascal translators

From: CFB Software <"CFB>
Date: Wed, 26 Oct 2005 11:08:58 +0930

----boundary-LibPST-iamunique-1860379350_-_-
Content-type: text/plain

Hi Bob,

There's a warning in Dijkstra's 1968 paper "Go To Statement Considered
Harmful" related to the paper that you referenced:

"In [2] Guiseppe Jacopini seems to have proved the (logical)
superfluousness of the go to statement. The exercise to translate an
arbitrary flow diagram more or less mechanically into a jump-less one,
however, is not to be recommended. Then the resulting flow diagram
cannot be expected to be more transparent than the original one."

It is a relatively simple and mechanical exercise to translate
structured IF-THEN-ELSE. WHILE, REPEAT, FOR statements into a form which
only uses GOTOs. The converse is not.


On a lighter note, there was an amusing article proposing a 'COME FROM'
statement as a solution to the problem of GOTOs:

http://www.fortran.com/fortran/come_from.html

In a similar vein, I also like the 'IF THEN MAYBE' and 'GO SOMEWHERE'
proposals of MAYBEBOL:

http://buffy.sighup.org.uk/hfiles/aafn.html
 

Regards,
Chris

Chris Burrows
CFB Software
http://www.cfbsoftware.com/gpcp

> -----Original Message-----
> From: blackbox{([at]})nowhere.xy
> Behalf Of Bob Walkden
> Sent: Wednesday, 26 October 2005 6:02 AM
> To: BlackBox Mailing List
> Subject: [BlackBox] - Pascal to Component Pascal translators
>
>
> Many, many years ago, in the early 1980s, I worked on a
> project converting a payroll system from one form of Cobol to
> another. As part of this task I rewrote a number of the
> programs without GOTOs. Although I found some fairly simple
> rules-of-thumb for doing it, I never really found a foolproof
> algorithm. I realised that one must exist because Jacopini
> and Boehm had proved that there is an equivalent no GOTO
> program for every GOTO program, so I read their paper:
>
> C. Boehm and G. Jacopini, "Flow diagrams, Turing machines,
> and languages with only two formation rules," Communications
> of the ACM, May 1966.
>
> Unfortunately, I did not understand it.
>
> --
> Regards,
> Bob
>

--- BlackBox
--- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy



----boundary-LibPST-iamunique-1860379350_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"

e1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INCj4gYW5kIGxhbmd1YWdlcyB3aXRoIG9ubHkgdHdvIGZvcm1hdGlvbiBy
dWxlcywiIENvbW11bmljYXRpb25zIFxwYXINCj4gb2YgdGhlIEFDTSwgTWF5IDE5NjYuXHBhcg0K
PiBccGFyDQo+IFVuZm9ydHVuYXRlbHksIEkgZGlkIG5vdCB1bmRlcnN0YW5kIGl0LlxwYXINCj4g
XHBhcg0KPiAtLVxwYXINCj4gUmVnYXJkcyxccGFyDQo+ICBCb2IgXHBhcg0KPiBccGFyDQpccGFy
DQotLS0gQmxhY2tCb3hccGFyDQotLS0gc2VuZCBzdWJqZWN0IEhFTFAgb3IgVU5TVUJTQ1JJQkUg
dG8gYmxhY2tib3hAb2Jlcm9uLmNofX0AdHVzOiBObywgaA==


----boundary-LibPST-iamunique-1860379350_-_---
Received on Wed Oct 26 2005 - 03:38:58 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:28:07 UTC