Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!snorkelwacker!bloom-beacon!eru!luth!sunic!dkuug!freja.diku.dk!skinfaxe.diku.dk!jensting From: jensting@skinfaxe.diku.dk (Jens Tingleff) Newsgroups: comp.lang.modula2 Subject: Re: JPI M2 2.00 - PROCEDURE FUNCTIONS & ERROR CHECKING Message-ID: <1990Jul27.102753.21385@diku.dk> Date: 27 Jul 90 10:27:53 GMT References: <1990Jul24.060519.23417@portia.Stanford.EDU> <10180@brazos.Rice.edu> <90206.084158TRL3@psuvm.psu.edu> <10218@brazos.Rice.edu> Sender: news@diku.dk (The Netnews System) Organization: Department Of Computer Science, University Of Copenhagen Lines: 32 preston@titan.rice.edu (Preston Briggs) writes: >In article <90206.084158TRL3@psuvm.psu.edu> TRL3@psuvm.psu.edu (Tim Larson) writes: >> you state the "single-entrance, single-exit" >>requirement, which Modula-2 neatly destroys with LOOP..END. Is that require- >>ment necessary for the algorithm to work? >LOOP - END is ok becase all the flow must come out of the END, regardless of >how it gets there. My particular idea needs single-entrance, single-exit, >though as another poster pointed out, we could could handle all sorts >of nasty things during optimization when a complete flow graph >is constructed anyway. [.......] Isn't this method flow-analysis ? The whole point about flow-graphs in "single-entrance / single-exit" languages is that they are *easy* to contruct. The "single.." property gives only reducable flowgraphs (I think that's Aho and Ulmanns term for it), which may be processed on the fly when parsing, which (to my understanding..) is what's done here. The ease of contruction of flowgraphs is one of the points where Modula-2 can be snotty and superior in the company of other languages ;-) ;-). Note that this ease was put to good use in optimising BLISS compilers (BLISS also has reducable flowgraphs) [Wulf et al. "the design of an optimising compiler" American Elsevier New York 1975]. Jens Jens Tingleff MSc EE, Institute of Computer Science, Copenhagen University Snail mail: DIKU Universitetsparken 1 DK2100 KBH O "It never runs around here; it just comes crashing down" apologies to Dire Straits