From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8f8cea8602e61aba X-Google-Attributes: gid103376,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: The Red Language Date: 1997/09/19 Message-ID: #1/1 X-Deja-AN: 273852503 References: <340E2DC5.25D7@worldnet.att.net> Organization: New York University Newsgroups: comp.lang.ada Date: 1997-09-19T00:00:00+00:00 List-Id: <> Whether you call things one pass or two pass is to some extent just an excercise in semantics. But when I say that two passes is fundamental, what I mean is that before assigning the proper type to a given node, it is necessary to visit nodes both above you and below you in the tree. That means there is no canonical traversal scheme which allows you to visit nodes just once. OK, of course you can visit nodes just once and then build a list of results which are accessed separately, but by one pass scheme I would mean a scheme that operates as follows. There is a canonical traversal of the operator tree which visits nodes one by one and assigns types to each node at the time they are visited. Any other definition of one pass is unuseful. For example, the more flexible definition would lead one to consider all compilers one pass because they only look at the source once, and from then on they are dealing with auxiliary data structures -- not a useful definition. Note that in Algol-68, which uses operand type overloading only, there is indeed a one pass algorithm in the sense I define it above.