Kednos PL/I for Openvms Systems User Manual

Total Page:16

File Type:pdf, Size:1020Kb

Kednos PL/I for Openvms Systems User Manual ) Kednos PL/I for OpenVMS Systems User Manual Order Number: AA-H951E-TM November 2003 This manual provides an overview of the PL/I programming language. It explains programming with Kednos PL/I on OpenVMS VAX Systems and OpenVMS Alpha Systems. It also describes the operation of the Kednos PL/I compilers and the features of the operating systems that are important to the PL/I programmer. Revision/Update Information: This revised manual supersedes the PL/I User’s Manual for VAX VMS, Order Number AA-H951D-TL. Operating System and Version: For Kednos PL/I for OpenVMS VAX: OpenVMS VAX Version 5.5 or higher For Kednos PL/I for OpenVMS Alpha: OpenVMS Alpha Version 6.2 or higher Software Version: Kednos PL/I Version 3.8 for OpenVMS VAX Kednos PL/I Version 4.4 for OpenVMS Alpha Published by: Kednos Corporation, Pebble Beach, CA, www.Kednos.com First Printing, August 1980 Revised, November 1983 Updated, April 1985 Revised, April 1987 Revised, January 1992 Revised, May 1992 Revised, November 1993 Revised, April 1995 Revised, October 1995 Revised, November 2003 Kednos Corporation makes no representations that the use of its products in the manner described in this publication will not infringe on existing or future patent rights, nor do the descriptions contained in this publication imply the granting of licenses to make, use, or sell equipment or software in accordance with the description. Possession, use, or copying of the software described in this publication is authorized only pursuant to a valid written license from Kednos Corporation or an anthorized sublicensor. No responsibility is assumed for the use or reliability of software on equipment that is not listed as supported in the Product Description. Copyright Kednos Corporation 1980-2003. All rights reserved. Copyright ©1980-2003 The following are trademarks of Hewlett-Packard: Alpha AXP, AXP, DEC, DEC 4000, DECchip, DECnet, DECtalk, DECUS, Digital, MicroVAX,OpenVMS, OpenVMS AXP, RMS, RMS-11, RX50, TK50, VAX, VAX Ada, VAX BASIC, VAX BLISS, VMScluster, VAX CDD/Plus, VAX COBOL, VAX DATATRIEVE, VAX DIBOL, VAX DOCUMENT, VAX FORTRAN, VAXinfo, VAX MACRO, VAX Pascal, VAX SCAN, VAXset, VAXTPU, VMS, the AXP logo, and the DIGITAL logo. The Reader’s Comments form at the end of this manual requests your critical evaluation to assist in preparing future documentation. 1 Contents PREFACE xix CHAPTER 1 OVERVIEW 1–1 CHAPTER 2 DEVELOPING PL/I PROGRAMS AT THE DCL COMMAND LEVEL 2–1 2.1 DCL COMMANDS FOR PROGRAM DEVELOPMENT 2–1 2.2 CREATING A PL/I PROGRAM 2–2 2.2.1 Using EDT 2–2 2.2.2 Using LSE 2–3 2.2.3 Using DECTPU 2–4 2.2.3.1 The EVE Interface • 2–4 2.2.3.2 The EDT Keypad Emulator Interface • 2–5 2.3 COMPILING A PL/I PROGRAM 2–5 2.3.1 PLI Command 2–5 2.3.2 PLI Command Qualifiers 2–7 2.3.3 PL/I Preprocessor 2–18 2.3.3.1 Preprocessor Compilation Control • 2–18 2.3.3.2 Preprocessor Procedures • 2–19 2.3.4 Compiler Error Messages 2–21 2.3.5 Kednos PL/I for OpenVMS VAX Compiler Listing 2–23 2.3.6 Kednos PL/I for OpenVMS Alpha Compiler Listing 2–31 2.4 LINKING A PL/I PROGRAM 2–40 2.4.1 LINK Command 2–40 2.4.2 LINK Command Qualifiers 2–41 2.4.3 Linker Input Files 2–42 2.4.4 Linker Output Files 2–43 2.4.5 Object Module Libraries 2–43 2.4.6 Linker Error Messages 2–44 2.5 RUNNING A PL/I PROGRAM 2–45 iii Contents CHAPTER 3 USING THE OPENVMS DEBUGGER 3–1 3.1 OVERVIEW 3–1 3.2 FEATURES OF THE DEBUGGER 3–2 3.3 GETTING STARTED WITH THE DEBUGGER 3–4 3.3.1 Compiling and Linking a Program to Prepare for Debugging 3–4 3.3.2 Starting and Terminating a Debugging Session 3–5 3.3.3 Issuing Debugger Commands 3–6 3.3.4 Viewing Your Source Code 3–6 3.3.4.1 Noscreen Mode • 3–7 3.3.4.2 Screen Mode • 3–8 3.3.5 Controlling and Monitoring Program Execution 3–9 3.3.5.1 Starting and Resuming Program Execution • 3–9 3.3.5.2 Determining the Current Value of the Program Counter • 3–11 3.3.5.3 Suspending Program Execution • 3–11 3.3.5.4 Tracing Program Execution • 3–13 3.3.5.5 Monitoring Changes in Variables • 3–14 3.3.6 Examining and Manipulating Data 3–16 3.3.6.1 Displaying the Values of Variables • 3–16 3.3.6.2 Changing the Values of Variables • 3–18 3.3.6.3 Evaluating Expressions • 3–18 3.3.6.4 Notes on Debugger Support for PL/I • 3–19 3.3.7 Controlling Symbol References 3–20 3.3.7.1 Module Setting • 3–20 3.3.7.2 Resolving Multiply Defined Symbols • 3–21 3.4 SAMPLE DEBUGGING SESSION 3–22 3.5 DEBUGGER COMMAND SUMMARY 3–24 3.5.1 Starting and Terminating a Debugging Session 3–24 3.5.2 Controlling and Monitoring Program Execution 3–25 3.5.3 Examining and Manipulating Data 3–25 3.5.4 Controlling Type Selection and Symbolization 3–25 3.5.5 Controlling Symbol Lookup 3–26 3.5.6 Displaying Source Code 3–26 3.5.7 Using Screen Mode 3–26 3.5.8 Editing Source Code 3–27 3.5.9 Defining Symbols 3–27 3.5.10 Using Keypad Mode 3–27 iv Contents 3.5.11 Using Command Procedures and Log Files 3–27 3.5.12 Using Control Structures 3–28 3.5.13 Additional Commands 3–28 CHAPTER 4 THE FILE SYSTEM 4–1 4.1 FILE CONTROL 4–1 4.2 USING THE OPENVMS FILE SYSTEM FOR I/O 4–2 4.2.1 PL/I Files and OpenVMS File Specifications 4–2 4.2.2 Using the TITLE Option 4–3 4.2.3 Using Logical Names 4–4 4.2.4 Using the DEFAULT_FILE_NAME Option 4–6 4.2.5 Expanding File Specifications 4–7 4.3 ERROR HANDLING 4–9 4.3.1 Values Returned by PL/I Built-In Functions for Error Handling 4–9 4.3.2 Writing an Error Handler 4–10 4.3.3 Default Error Handling for the File System 4–10 CHAPTER 5 STREAM INPUT/OUTPUT 5–1 CHAPTER 6 RECORD INPUT/OUTPUT 6–1 6.1 FILE ORGANIZATIONS 6–1 6.2 ACCESS MODES 6–3 6.2.1 Sequential Access 6–4 6.2.2 Random Access 6–4 6.2.3 Random and Sequential Access 6–5 6.2.4 Block Input/Output 6–5 6.2.5 Access by Record Identification 6–5 6.3 RECORD FORMATS 6–6 v Contents 6.3.1 Fixed-Length Records 6–6 6.3.2 Variable-Length Records 6–7 6.3.3 Variable-Length Records with a Fixed-Length Control Area 6–7 6.4 CARRIAGE CONTROL 6–8 6.5 SEQUENTIAL FILES 6–8 6.5.1 Creating a Sequential File 6–8 6.5.2 Using Magnetic Tape Files 6–9 6.5.3 Allocated and Spooled Devices 6–12 6.6 RELATIVE FILES 6–13 6.6.1 Relative File Organization 6–13 6.6.2 Creating a Relative File 6–14 6.6.3 Using Relative Files 6–17 6.6.4 Error Handling 6–19 6.7 INDEXED SEQUENTIAL FILES 6–20 6.7.1 Indexed File Organization 6–21 6.7.2 Defining and Creating an Indexed Sequential File 6–22 6.7.2.1 Using EDIT/FDL • 6–23 6.7.2.2 Using a PL/I Program • 6–26 6.7.3 Defining Keys 6–28 6.7.4 Using Indexed Sequential Files 6–32 CHAPTER 7 OPTIONS OF THE ENVIRONMENT ATTRIBUTE 7–1 7.1 SPECIFYING AND USING ENVIRONMENT OPTIONS 7–1 7.1.1 Arguments for ENVIRONMENT Options 7–1 7.1.1.1 Expressions • 7–2 7.1.1.2 Variable References • 7–2 7.1.1.3 Boolean Values • 7–2 7.1.2 Interpretation of ENVIRONMENT Options for Existing Files 7–2 7.1.3 Determining ENVIRONMENT Options 7–3 7.1.4 Device Independence of ENVIRONMENT Options 7–3 7.1.5 Conflicting and Invalid ENVIRONMENT Options 7–3 7.2 SUMMARY OF ENVIRONMENT OPTIONS 7–3 vi Contents 7.2.1 APPEND Option 7–9 7.2.2 BACKUP_DATE Option 7–9 7.2.3 BATCH Option 7–10 7.2.4 BLOCK_BOUNDARY_FORMAT Option 7–10 7.2.5 BLOCK_IO Option 7–11 7.2.6 BLOCK_SIZE Option 7–12 7.2.7 BUCKET_SIZE Option 7–12 7.2.8 CARRIAGE_RETURN_FORMAT Option 7–14 7.2.9 CONTIGUOUS Option 7–14 7.2.10 CONTIGUOUS_BEST_TRY Option 7–15 7.2.11 CREATION_DATE Option 7–15 7.2.12 CURRENT_POSITION Option 7–16 7.2.13 DEFAULT_FILE_NAME Option 7–16 7.2.14 DEFERRED_WRITE Option 7–17 7.2.15 DELETE Option 7–18 7.2.16 EXPIRATION_DATE Option 7–18 7.2.17 EXTENSION_SIZE Option 7–19 7.2.18 FILE_ID Option 7–19 7.2.19 FILE_ID_TO Option 7–20 7.2.20 FILE_SIZE Option 7–20 7.2.21 FIXED_CONTROL_SIZE Option 7–21 7.2.22 FIXED_CONTROL_SIZE_TO Option 7–22 7.2.23 FIXED_LENGTH_RECORDS Option 7–22 7.2.24 GROUP_PROTECTION Option 7–23 7.2.25 IGNORE_LINE_MARKS Option 7–24 7.2.26 INDEX_NUMBER Option 7–24 7.2.27 INDEXED Option 7–25 7.2.28 INITIAL_FILL Option 7–25 7.2.29 MAXIMUM_RECORD_NUMBER Option 7–26 7.2.30 MAXIMUM_RECORD_SIZE Option 7–26 7.2.31 MULTIBLOCK_COUNT Option 7–27 7.2.32 MULTIBUFFER_COUNT Option 7–28 7.2.33 NO_SHARE Option 7–29 7.2.34 OWNER_GROUP Option 7–30 7.2.35 OWNER_ID Option 7–31 7.2.36 OWNER_MEMBER Option 7–32 7.2.37 OWNER_PROTECTION Option 7–32 7.2.38 PRINTER_FORMAT Option 7–33 7.2.39 READ_AHEAD Option 7–36 7.2.40 READ_CHECK Option 7–37 7.2.41 RECORD_ID_ACCESS Option 7–37 7.2.42 RETRIEVAL_POINTERS Option 7–38 7.2.43 REVISION_DATE Option 7–38 vii Contents 7.2.44 REWIND_ON_CLOSE Option 7–39 7.2.45 REWIND_ON_OPEN Option 7–39 7.2.46 SCALARVARYING Option 7–40 7.2.47 SHARED_READ Option 7–41 7.2.48 SHARED_WRITE Option 7–41 7.2.49 SPOOL Option 7–42 7.2.50 SUPERSEDE Option 7–42 7.2.51 SYSTEM_PROTECTION Option 7–43 7.2.52 TEMPORARY Option 7–44 7.2.53 TRUNCATE Option 7–45 7.2.54 USER_OPEN Option 7–45 7.2.55 WORLD_PROTECTION Option 7–47 7.2.56 WRITE_BEHIND Option 7–48 7.2.57 WRITE_CHECK Option 7–48 7.3 ENVIRONMENT OPTIONS FOR FILE PROTECTION AND FILE SHARING 7–49 7.3.1 File Protection 7–49 7.3.1.1 Defining a File’s Ownership • 7–49 7.3.1.2 Defining a File’s Protection • 7–50 7.3.2 File Sharing 7–51 7.3.2.1 Specifying File Sharing • 7–51 7.3.2.2 File Locking • 7–53 7.3.2.3 Record Locking • 7–54 7.3.2.4 Examples of File Sharing • 7–55 7.4 ENVIRONMENT OPTIONS FOR I/O OPTIMIZATION 7–56 CHAPTER 8 INPUT/OUTPUT STATEMENT OPTIONS 8–1 8.1 OPTION FORMAT 8–1 8.2 SUMMARY OF INPUT/OUTPUT STATEMENT OPTIONS 8–1 8.2.1 CANCEL_CONTROL_O Option 8–3 8.2.2 FAST_DELETE Option 8–4 8.2.3 FIXED_CONTROL_FROM Option 8–4 8.2.4 FIXED_CONTROL_TO Option 8–5 8.2.5 INDEX_NUMBER Option 8–6 8.2.6 LOCK_ON_READ Option 8–6 8.2.7 LOCK_ON_WRITE Option 8–7 8.2.8 MANUAL_UNLOCKING Option 8–7 viii Contents 8.2.9 MATCH_NEXT
Recommended publications
  • PL/I List Processing • PL/I Language Lacked FaciliEs for TreaNg Linked Lists HAROLD LAWSON,JR
    The Birth of the Pointer Variable Based upon: Experiences and Reflec;ons of a Computer Pioneer Harold “Bud” Lawson FELLOW FELLOW and LIFE MEMBER IEEE COMPUTER SOCIETY CHARLES BABBAGE COMPUTER PIONEER FELLOW Overlapping Phases • Phase 1 (1959-1974) – Computer Industry • Phase 2 (1974-1996) - Computer-Based Systems • Phase 3 (1996-Present) – Complex Systems • Dedicated to all the talented colleagues that I have worked with during my career. • We have had fun and learned from each other. • InteresMng ReflecMons and Happenings are indicated in Red. Computer Industry (1959 to 1974) • Summer 1958 - US Census Bureau • 1959 Temple University (Introduc;on to IBM 650 (Drum Machine)) • 1959-61 Employed at Remington-Rand Univac • 1961-67 Employed at IBM • 1967-69 Part Time Consultant (Professor) • 1969-70 Employed at Standard Computer Corporaon • 1971-73 Consultant to Datasaab, Linköping • 1973-… Consultant .. Expert Witness.. Rear Admiral Dr. Grace Murray Hopper (December 9, 1906 – January 1, 1992) Minted the word “BUG” – During her Mme as Programmer of the MARK I Computer at Harvard Minted the word “COMPILER” with A-0 in 1951 Developed Math-MaMc and FlowmaMc and inspired the Development of COBOL Grace loved US Navy Service – The oldest acMve officer, reMrement at 80. From Grace I learned that it is important to queson the status-quo, to seek deeper meaning and explore alterna5ve ways of doing things. 1980 – Honarary Doctor The USS Linköpings Universitet Hopper Univac Compiler Technology of the 1950’s Grace Hopper’s Early Programming Languages Math-MaMc
    [Show full text]
  • Systems Programming in C++ Practical Course
    Systems Programming in C++ Practical Course Summer Term 2019 Course Goals Learn to write good C++ • Basic syntax • Common idioms and best practices Learn to implement large systems with C++ • C++ standard library and Linux ecosystem • Tools and techniques (building, debugging, etc.) Learn to write high-performance code with C++ • Multithreading and synchronization • Performance pitfalls 1 Formal Prerequisites Knowledge equivalent to the lectures • Introduction to Informatics 1 (IN0001) • Fundamentals of Programming (IN0002) • Fundamentals of Algorithms and Data Structures (IN0007) Additional formal prerequisites (B.Sc. Informatics) • Introduction to Computer Architecture (IN0004) • Basic Principles: Operating Systems and System Software (IN0009) Additional formal prerequisites (B.Sc. Games Engineering) • Operating Systems and Hardware oriented Programming for Games (IN0034) 2 Practical Prerequisites Practical prerequisites • No previous experience with C or C++ required • Familiarity with another general-purpose programming language Operating System • Working Linux operating system (e.g. Ubuntu) • Basic experience with Linux (in particular with shell) • You are free to use your favorite OS, we only support Linux 3 Lecture & Tutorial • Lecture: Tuesday, 14:00 – 16:00, MI 02.11.018 • Tutorial: Friday, 10:00 – 12:00, MI 02.11.018 • Discuss assignments and any questions • First two tutorials are additional lectures • Everything will be in English • Attendance is mandatory • Announcements on the website 4 Assignments • Brief non-coding quizzes
    [Show full text]
  • The Machine That Builds Itself: How the Strengths of Lisp Family
    Khomtchouk et al. OPINION NOTE The Machine that Builds Itself: How the Strengths of Lisp Family Languages Facilitate Building Complex and Flexible Bioinformatic Models Bohdan B. Khomtchouk1*, Edmund Weitz2 and Claes Wahlestedt1 *Correspondence: [email protected] Abstract 1Center for Therapeutic Innovation and Department of We address the need for expanding the presence of the Lisp family of Psychiatry and Behavioral programming languages in bioinformatics and computational biology research. Sciences, University of Miami Languages of this family, like Common Lisp, Scheme, or Clojure, facilitate the Miller School of Medicine, 1120 NW 14th ST, Miami, FL, USA creation of powerful and flexible software models that are required for complex 33136 and rapidly evolving domains like biology. We will point out several important key Full list of author information is features that distinguish languages of the Lisp family from other programming available at the end of the article languages and we will explain how these features can aid researchers in becoming more productive and creating better code. We will also show how these features make these languages ideal tools for artificial intelligence and machine learning applications. We will specifically stress the advantages of domain-specific languages (DSL): languages which are specialized to a particular area and thus not only facilitate easier research problem formulation, but also aid in the establishment of standards and best programming practices as applied to the specific research field at hand. DSLs are particularly easy to build in Common Lisp, the most comprehensive Lisp dialect, which is commonly referred to as the “programmable programming language.” We are convinced that Lisp grants programmers unprecedented power to build increasingly sophisticated artificial intelligence systems that may ultimately transform machine learning and AI research in bioinformatics and computational biology.
    [Show full text]
  • INTRODUCTION to PL/1 PL/I Is a Structured Language to Develop Systems and Applications Programs (Both Business and Scientific)
    INTRODUCTION TO PL/1 PL/I is a structured language to develop systems and applications programs (both business and scientific). Significant features : v Allows Free format v Regards a program as a continuous stream of data v Supports subprogram and functions v Uses defaults 1 Created by Sanjay Sinha Building blocks of PL/I : v Made up of a series of subprograms and called Procedure v Program is structured into a MAIN program and subprograms. v Subprograms include subroutine and functions. Every PL/I program consists of : v At least one Procedure v Blocks v Group 2 Created by Sanjay Sinha v There must be one and only one MAIN procedure to every program, the MAIN procedure statement consists of : v Label v The statement ‘PROCEDURE OPTIONS (MAIN)’ v A semicolon to mark the end of the statement. Coding a Program : 1. Comment line(s) begins with /* and ends with */. Although comments may be embedded within a PL/I statements , but it is recommended to keep the embedded comments minimum. 3 Created by Sanjay Sinha 2. The first PL/I statement in the program is the PROCEDURE statement : AVERAGE : PROC[EDURE] OPTIONS(MAIN); AVERAGE -- it is the name of the program(label) and compulsory and marks the beginning of a program. OPTIONS(MAIN) -- compulsory for main programs and if not specified , then the program is a subroutine. A PL/I program is compiled by PL/I compiler and converted into the binary , Object program file for link editing . 4 Created by Sanjay Sinha Advantages of PL/I are : 1. Better integration of sets of programs covering several applications.
    [Show full text]
  • A Block Design for Introductory Functional Programming in Haskell
    A Block Design for Introductory Functional Programming in Haskell Matthew Poole School of Computing University of Portsmouth, UK [email protected] Abstract—This paper describes the visual design of blocks for the learner, and to avoid syntax and type-based errors entirely editing code in the functional language Haskell. The aim of the through blocks-based program construction. proposed blocks-based environment is to support students’ initial steps in learning functional programming. Expression blocks and There exists some recent work in representing functional slots are shaped to ensure constructed code is both syntactically types within blocks-based environments. TypeBlocks [9] in- correct and preserves conventional use of whitespace. The design cludes three basic type connector shapes (for lists, tuples aims to help students learn Haskell’s sophisticated type system and functions) which can be combined in any way and to which is often regarded as challenging for novice functional any depth. The prototype blocks editor for Bootstrap [10], programmers. Types are represented using text, color and shape, [11] represents each of the five types of a simple functional and empty slots indicate valid argument types in order to ensure language using a different color, with a neutral color (gray) that constructed code is well-typed. used for polymorphic blocks; gray blocks change color once their type has been determined during program construction. I. INTRODUCTION Some functional features have also been added to Snap! [12] Blocks-based environments such as Scratch [1] and Snap! and to a modified version of App Inventor [13]. [2] offer several advantages over traditional text-based lan- This paper is structured as follows.
    [Show full text]
  • Using the Unibasic Debugger
    C:\Program Files\Adobe\FrameMaker8\UniData 7.2\7.2rebranded\DEBUGGER\BASBTITL.fm March 8, 2010 10:30 am Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta UniData Using the UniBasic Debugger UDT-720-UDEB-1 C:\Program Files\Adobe\FrameMaker8\UniData 7.2\7.2rebranded\DEBUGGER\BASBTITL.fm March 8, 2010 10:30 am Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Notices Edition Publication date: July 2008 Book number: UDT-720-UDEB-1 Product version: UniData 7.2 Copyright © Rocket Software, Inc. 1988-2008. All Rights Reserved. Trademarks The following trademarks appear in this publication: Trademark Trademark Owner Rocket Software™ Rocket Software, Inc. Dynamic Connect® Rocket Software, Inc. RedBack® Rocket Software, Inc. SystemBuilder™ Rocket Software, Inc. UniData® Rocket Software, Inc. UniVerse™ Rocket Software, Inc. U2™ Rocket Software, Inc. U2.NET™ Rocket Software, Inc. U2 Web Development Environment™ Rocket Software, Inc. wIntegrate® Rocket Software, Inc. Microsoft® .NET Microsoft Corporation Microsoft® Office Excel®, Outlook®, Word Microsoft Corporation Windows® Microsoft Corporation Windows® 7 Microsoft Corporation Windows Vista® Microsoft Corporation Java™ and all Java-based trademarks and logos Sun Microsystems, Inc. UNIX® X/Open Company Limited ii Using the UniBasic Debugger The above trademarks are property of the specified companies in the United States, other countries, or both. All other products or services mentioned in this document may be covered by the trademarks, service marks, or product names as designated by the companies who own or market them. License agreement This software and the associated documentation are proprietary and confidential to Rocket Software, Inc., are furnished under license, and may be used and copied only in accordance with the terms of such license and with the inclusion of the copyright notice.
    [Show full text]
  • Data General Extended Algol 60 Compiler
    DATA GENERAL EXTENDED ALGOL 60 COMPILER, Data General's Extended ALGOL is a powerful language tial I/O with optional formatting. These extensions comple­ which allows systems programmers to develop programs ment the basic structure of ALGOL and significantly in­ on mini computers that would otherwise require the use of crease the convenience of ALGOL programming without much larger, more expensive computers. No other mini making the language unwieldy. computer offers a language with the programming features and general applicability of Data General's Extended FEATURES OF DATA GENERAL'S EXTENDED ALGOL Character strings are implemented as an extended data ALGOL. type to allow easy manipulation of character data. The ALGOL 60 is the most widely used language for describ­ program may, for example, read in character strings, search ing programming algorithms. It has a flexible, generalized, for substrings, replace characters, and maintain character arithmetic organization and a modular, "building block" string tables efficiently. structure that provides clear, easily readable documentation. Multi-precision arithmetic allows up to 60 decimal digits The language is powerful and concise, allowing the systems of precision in integer or floating point calculations. programmer to state algorithms without resorting to "tricks" Device-independent I/O provides for reading and writ­ to bypass the language. ing in line mode, sequential mode, or random mode.' Free These characteristics of ALGOL are especially important form reading and writing is permitted for all data types, or in the development of working prototype systems. The output can be formatted according to a "picture" of the clear documentation makes it easy for the programmer to output line or lines.
    [Show full text]
  • E.W. Dijkstra Archive: on the Cruelty of Really Teaching Computing Science
    On the cruelty of really teaching computing science Edsger W. Dijkstra. (EWD1036) http://www.cs.utexas.edu/users/EWD/ewd10xx/EWD1036.PDF The second part of this talk pursues some of the scientific and educational consequences of the assumption that computers represent a radical novelty. In order to give this assumption clear contents, we have to be much more precise as to what we mean in this context by the adjective "radical". We shall do so in the first part of this talk, in which we shall furthermore supply evidence in support of our assumption. The usual way in which we plan today for tomorrow is in yesterday’s vocabulary. We do so, because we try to get away with the concepts we are familiar with and that have acquired their meanings in our past experience. Of course, the words and the concepts don’t quite fit because our future differs from our past, but then we stretch them a little bit. Linguists are quite familiar with the phenomenon that the meanings of words evolve over time, but also know that this is a slow and gradual process. It is the most common way of trying to cope with novelty: by means of metaphors and analogies we try to link the new to the old, the novel to the familiar. Under sufficiently slow and gradual change, it works reasonably well; in the case of a sharp discontinuity, however, the method breaks down: though we may glorify it with the name "common sense", our past experience is no longer relevant, the analogies become too shallow, and the metaphors become more misleading than illuminating.
    [Show full text]
  • Supplementary Materials
    Contents 2 Programming Language Syntax C 1 2.3.5 Syntax Errors C 1 2.4 Theoretical Foundations C 13 2.4.1 Finite Automata C 13 2.4.2 Push-Down Automata C 18 2.4.3 Grammar and Language Classes C 19 2.6 Exercises C 24 2.7 Explorations C 25 3 Names, Scopes, and Bindings C 26 3.4 Implementing Scope C 26 3.4.1 Symbol Tables C 26 3.4.2 Association Lists and Central Reference Tables C 31 3.8 Separate Compilation C 36 3.8.1 Separate Compilation in C C 37 3.8.2 Packages and Automatic Header Inference C 40 3.8.3 Module Hierarchies C 41 3.10 Exercises C 42 3.11 Explorations C 44 4SemanticAnalysis C 45 4.5 Space Management for Attributes C 45 4.5.1 Bottom-Up Evaluation C 45 4.5.2 Top-Down Evaluation C 50 C ii Contents 4.8 Exercises C 57 4.9 Explorations C 59 5 Target Machine Architecture C 60 5.1 The Memory Hierarchy C 61 5.2 Data Representation C 63 5.2.1 Integer Arithmetic C 65 5.2.2 Floating-Point Arithmetic C 67 5.3 Instruction Set Architecture (ISA) C 70 5.3.1 Addressing Modes C 71 5.3.2 Conditions and Branches C 72 5.4 Architecture and Implementation C 75 5.4.1 Microprogramming C 76 5.4.2 Microprocessors C 77 5.4.3 RISC C 77 5.4.4 Multithreading and Multicore C 78 5.4.5 Two Example Architectures: The x86 and ARM C 80 5.5 Compiling for Modern Processors C 88 5.5.1 Keeping the Pipeline Full C 89 5.5.2 Register Allocation C 93 5.6 Summary and Concluding Remarks C 98 5.7 Exercises C 100 5.8 Explorations C 104 5.9 Bibliographic Notes C 105 6 Control Flow C 107 6.5.4 Generators in Icon C 107 6.7 Nondeterminacy C 110 6.9 Exercises C 116 6.10 Explorations
    [Show full text]
  • CS412/CS413 Introduction to Compilers Tim Teitelbaum Lecture 12
    CS412/CS413 Introduction to Compilers Tim Teitelbaum Lecture 12: Symbol Tables February 15, 2008 CS 412/413 Spring 2008 Introduction to Compilers 1 Where We Are Source code if (b == 0) a = b; (character stream) Lexical Analysis Token if ( b == 0 ) a = b ; stream Syntax Analysis if (Parsing) == = Abstract syntax tree (AST) b0ab if Semantic Analysis boolean int Decorated == = AST int b int 0 int a int b Errors lvalue (incorrect program) CS 412/413 Spring 2008 Introduction to Compilers 2 Non-Context-Free Syntax • Programs that are correct with respect to the language’s lexical and context-free syntactic rules may still contain other syntactic errors • Lexical analysis and context-free syntax analysis are not powerful enough to ensure the correct usage of variables, objects, functions, statements, etc. • Non-context-free syntactic analysis is known as semantic analysis CS 412/413 Spring 2008 Introduction to Compilers 3 Incorrect Programs •Example 1: lexical analysis does not distinguish between different variable or function identifiers (it returns the same token for all identifiers) int a; int a; a = 1; b = 1; •Example 2: syntax analysis does not correlate the declarations with the uses of variables in the program: int a; a = 1; a = 1; •Example3: syntax analysis does not correlate the types from the declarations with the uses of variables: int a; int a; a = 1; a = 1.0; CS 412/413 Spring 2008 Introduction to Compilers 4 Goals of Semantic Analysis • Semantic analysis ensures that the program satisfies a set of additional rules regarding the
    [Show full text]
  • Object-Oriented PLC Programming
    Object-Oriented PLC Programming Eduardo Miranda Moreira da Silva Master’s Dissertation Supervisor: Prof. António José Pessoa de Magalhães Master’s Degree in Mechanical Engineering Automation Branch January 27, 2020 ii Object-Oriented PLC Programming Abstract This document aims to investigate how Object-Oriented Programming (OOP) can improve Programmable Logic Controllers (PLC) programming. To achieve this, a PLC project was built using the OOP approaches suggested by the International Electrotechnical Commission (IEC) 61131-3 Standard. This project was tested on a simple but realistic simulated scenario for evaluation purposes. The text starts by exposing the history of PLC programming, it’s recent enhancements and the rise of object-oriented programming in the industry and how it compares to regular software programming, before briefly presenting the resources that support object-oriented PLC programming. Four case studies and their controlling applications are then introduced, along with examples of OOP usage. The dissertation ends with a comparison between applications designed with and without using OOP. OOP allows the creation of a standard framework for similar groups of components, reduction of code complexity and easier and safer data management. Therefore, the result of the project was an easily customizable case scenario with “plug & play” components. In the future, the idea is to build an HMI that can take care of the changes applied in the physical system (e.g., switching a component) without accessing the code. Keywords: Industrial Software Development, PLC Programming, IEC 61131-3 Standard, Object-Oriented Programming. iii iv Resumo Este documento tem como objetivo investigar até que ponto a Programação Orientada a Objetos pode melhorar a Programação de PLCs.
    [Show full text]
  • Fortran Reference Guide
    FORTRAN REFERENCE GUIDE Version 2017 TABLE OF CONTENTS Preface............................................................................................................xiv Audience Description.........................................................................................xiv Compatibility and Conformance to Standards........................................................... xiv Organization.................................................................................................... xv Hardware and Software Constraints.......................................................................xvi Conventions.................................................................................................... xvi Related Publications.........................................................................................xvii Chapter 1. Language Overview............................................................................... 1 1.1. Elements of a Fortran Program Unit.................................................................. 1 1.1.1. Fortran Statements................................................................................. 1 1.1.2. Free and Fixed Source............................................................................. 2 1.1.3. Statement Ordering................................................................................. 2 1.2. The Fortran Character Set.............................................................................. 3 1.3. Free Form Formatting..................................................................................
    [Show full text]