From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 19712 invoked from network); 26 Nov 2021 17:03:50 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 26 Nov 2021 17:03:50 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id 80F5E9CEAB; Sat, 27 Nov 2021 03:03:39 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id CAFAA9CE5D; Sat, 27 Nov 2021 03:01:35 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="WlaII5fV"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id A0CB794942; Sat, 27 Nov 2021 02:59:37 +1000 (AEST) Received: from mail-ua1-f48.google.com (mail-ua1-f48.google.com [209.85.222.48]) by minnie.tuhs.org (Postfix) with ESMTPS id 2309794942 for ; Sat, 27 Nov 2021 02:59:37 +1000 (AEST) Received: by mail-ua1-f48.google.com with SMTP id l24so19872925uak.2 for ; Fri, 26 Nov 2021 08:59:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=69KA4T/hlMxAEF0k7m+loWDwxC76UiiIVmEaVxBVgFs=; b=WlaII5fVBX797z2k8trbwGaFpLjRIlNeGZdxBQ91di6NenUGKA/q1G2qbTShW3YRUx w8Cbdaec8usJbQ5ttT9G42bE0V8QqkoZYdq8GoDLAwKumR4zmPPEQPbI2BPsQzOhbXjC 6QHxK5JXz9a16vAqupMbGwG5ZJnTIyFKt/rp1PB5/EsExgb53NJAe7RJqektSAliOuGz iEYXkSfQLGfwEox9aYF7Ip9qz1/CvBVaokOENRnJc2BrIxR0kf6dkp+Sx5X76BFW2lCn 3aHpwEXPEs2z/SkeD1LNap7DhqfHG6T/Nemy4A0Q2kF8hcqFtz6MVmAoVCyAtFTvb3P/ p1Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=69KA4T/hlMxAEF0k7m+loWDwxC76UiiIVmEaVxBVgFs=; b=h6Lmdo5i3FnRWq3cKTPOlVSQExbht94RXmFhWPHS6ZBOZF7dUm6TYLHxuZ+73vMvIP j8S84qQtsLjQD2l3WgsO0Fg9nxw9osNCl7x5EjNRIewxqR4zu2UchJM5nQ2ULiql2hdJ PGBM5jPoer4qGsB3WKQMGgjYMJWsKLibVnlNXfP6IiSceW39vBAv6Bj53yE2FYvM/0dM pqd57lEG9kaaYjUaF6GsomywBL3s+VFbk5zifrI9nzobDqiG0ndLF/Hx57/mWCXg4Vos S69tBfnebcb9rB/K+NpIONmANjBNtrawbyNSmaCAVrHc7AFX3FJB6N2dstQwZSZOMT44 a4sw== X-Gm-Message-State: AOAM530HGzqCM9rlDCirMNFzjM1ygly7npmCDK/+gZNpt+1yDw+Wkq+H XK3WICGG+s8kwRnctR5Pj9hW/kRqxpaD2mi7Tj8= X-Google-Smtp-Source: ABdhPJzJXpeZO1ij4Q8iyu1DJaYEui4dRCalMMSVfRtqV/31/nxvFY4/pLKneo1ZT8btDBfbwflJz5IUOVvaPRhPtHk= X-Received: by 2002:a67:be0f:: with SMTP id x15mr18294372vsq.86.1637945976042; Fri, 26 Nov 2021 08:59:36 -0800 (PST) MIME-Version: 1.0 Received: by 2002:ab0:71d0:0:0:0:0:0 with HTTP; Fri, 26 Nov 2021 08:59:35 -0800 (PST) In-Reply-To: References: From: Paul Winalski Date: Fri, 26 Nov 2021 11:59:35 -0500 Message-ID: To: Douglas McIlroy Content-Type: text/plain; charset="UTF-8" Subject: Re: [TUHS] PL/I stuff - was: Book Recommendation X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: TUHS main list Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" Back in the pre-virtual-memory days of the System/360, IBM offered its compilers in at least three variants: F, G, and H. They differed in the amount of memory required and in features and especially the sophistication of the optimizations they performed. IBM PL/I H required the most memory and performed the highest levels of optimization. There were some source language features to aid in optimization. My shop used PL/I F on DOS/360. It had one optimization-related source feature: the RECURSIVE and REORDER keywords on the PROCEDURE statement. A procedure that may be called recursively, either directly or indirectly, must have the RECURSIVE attribute. This tells the compiler to allocate local variables and temporaries on a call stack as opposed to statically. The ABIs for modern OSes always maintain a stack for procedure calls--not so with S/360/70 OS and DOS. The REORDER attribute tells the compiler that it is permitted to execute statements or pieces of statements in an order other than that explicitly specified in the program, as long as the end result has the same semantics. This is taken as a given in modern compilers. The higher-optimizing versions of IBM S/360 PL/I also had two PROCEDURE attributes USES and SETS that allowed the programmer to warn the compiler of side effects. The USES attribute lists identifiers global to the procedure that the procedure may read from, either explicitly or implicitly. The SETS attribute similarly lists identifiers that may be modified by the procedure. If USES is specified, the compiler can assume that no other global data are accessed, ans similarly if SETS is specified the compiler can assume that no other global data will be modified. Modern compilers perform global data flow analysis for all parts of the program accessible to the current compilation. While USES and SETS even today can potentially be helpful in describing obscure side effects, they were a very error-prone feature in their day and a real maintenance nightmare. They never made it into the ANSI standard and I think they've been dropped from modern IBM PL/I compilers. -Paul W.