30th anniversary navigate
 Navigate
RED Reference Manual left arrow
x
right arrow 1. Introduction
Red Rationale

TABLE OF CONTENTS

1.  Introduction     2.  Lexical Structure     3.  Types     4.  Expressions & Statements     5.  Procs & Funcs
6.  Capsules & Separate Translation     7.  Exception Handling & Multitasking     8.  Overloading & Generic Defs
9.  Advanced & Low-Level Facilities     10.  High-Level I/O
A.  Fixed Point Arithmetic     B.  Contract Test Problems     C.  Sample RED Programs
D.  References     E.  Site Index



1.   INTRODUCTION
1.1  Purpose of This Document
1.2  Acknowledgments
2.   LEXICAL STRUCTURE
2.1  Character Set
2.2  Choice of Token Structure
2.2.1   Integer Literals
2.2.2   Floating Point Literals
2.2.3   Identifiers
2.2.4   Enumeration Literals
2.2.5   String Literals
2.2.6   Comments
2.2.7   Operator Symbols
2.2.8   Special Symbols
2.2.9   End-of-Line
3.   TYPES
3.1  The Notions of Type and Subtype     (Part 1)
3.1.1     Basic Concepts
3.1.2     Implementation Alternatives
3.2  Type Equivalence
3.2.1     Introduction
3.2.2     Pure Name Equivalence
3.2.3     Structural Equivalence
3.2.4     Single-Instance Generators
3.2.5     Extended Name Equivalence
3.3  Type Opacity     (Part 2)
3.3.1     Introduction
3.3.2     Abbreviation Approach
3.3.3     New-Type Approach
3.3.4     Literals and Constructors
3.4  Predefined Types
3.4.1     BOOL Type
3.4.2     INT Type
3.4.3     FLOAT Type
3.4.4     Fixed Point Arithmetic
3.5  Enumeration Types
3.5.1     Introduction
3.5.2     Enumeration Elements
3.5.3     Ordered vs. Unordered Enumerations
3.5.4     Realization of Character Sets
3.6  Aggregate Types     (Part 3)
3.6.1     Array Types
3.6.2     Record Types
3.6.3     Union Types
3.6.4     String Types
3.6.5     Set Types
3.7  Indirect Types     (Part 4)
3.7.1     Basic Properties
3.7.2     Programming Example: Alphabetizer via Binary Tree
3.7.3     Justification
4.   EXPRESSIONS AND STATEMENTS
4.1  Expressions
4.1.1     Operator Precedence Levels
4.1.2     Effect of Parentheses
4.2  Operator Precedence Levels
4.3  Effect of Parentheses
5.   PROCEDURES & FUNCTIONS
5.1  Formal Parameter Binding Classes
5.1.1     Input Binding Alternatives
5.1.2     Implementation Dependencies with
                  "Don't Care" Semantics
5.1.3     Copy" Semantics
5.1.4     "Ref" Semantics
5.1.5     Conclusions Regarding Input Binding
5.1.6     Input-Output Binding
5.1.7     Output Binding
5.2  Side Effects in Functions
5.3  Aliasing
5.1.1     Sharing and Aliasing
5.1.2     Creating Aliases
5.1.3     Aliasing Detection by the Translator
5.1.4     RED Approach
6.   CAPSULES & SEPARATE TRANSLATION
6.1  Use of Capsules
6.1.1     Introduction
6.1.2     Exporting from a Capsule
6.1.3     Abstract Data Types
6.1.4     Own Data
6.1.5     Libraries and Compools
6.2  Separate Translation
6.2.1     The Translation Unit
6.2.2     Extensions of the Scope Concept
6.2.3     Environment Specifications
6.2.4     Use of Environments
6.2.5     Implementation Issues of Separate Translation
7.   EXCEPTION HANDLING & MULTITASKING
7.1  Exception Handling
7.1.1  Raising Exceptions
7.1.2  Handling Exceptions
7.1.3  Terminating Other Tasks
7.2  Multitasking
7.2.1  Introduction
7.2.2  Activations & Scheduling
7.2.3  Message Passing
7.2.4  Deadlocks
7.2.5  Distributed Computing
7.2.6  Regions
8.   OVERLOADING & GENERIC DEFINITONS
8.1  Overloading
8.1.1  Providing Overloaded Definitions
8.1.2  Legality of Overloaded Definitions
8.1.3  Selecting the Overloaded Definition
8.2  Generic Definitions
8.2.1  Major Technical Issues
8.2.2  Overloading via Generics
8.2.3  Constraint Clauses
8.2.4  Subtypes
8.2.5  Manifest Expressions
8.2.6  Implementation
9.   ADVANCED & LOW-LEVEL FACILITIES
9.1  User-Defined Assignment
9.1.1  The Need for User-Defined Assignment
9.1.2  Interactions with Other Features
9.1.3  Optimization Issues
9.2  User-Defined Initialization and Finalization
9.3  User-Defined Selection Operations
9.4  Machine-Dependent Facilities
9.4.1  Specification of Physical Representations
9.5  Low-Level Multitasking
9.6  Low-Level Input/Output
10.   HIGH-LEVEL INPUT-OUTPUT
10.1  Introduction
10.2  File Variables
10.3  OPEN & CLOSE
10.4  Generalized File Names
10.5  READ & WRITE
10.6  Device-Dependent Operations
10.7  High-Level Input-Output in the Test Translator
A.      FIXED-POINT ARITHMETIC
A.1  Approximating Real Arithmetic in Fixed Point
A.2  Automatically Scaled Approximate Fixed Point
A.3  Adapting the Floating Point Rules
A.4  Adapting the Integer Rules
A.5  Manually Scaled Approximate Fixed Point
B.      CONTRACT TEST PROBLEMS
B.1  Introduction     (Part 1)
B.2  Sample Problems
B.2.1  Polled Asynchronous Interrupt
B.2.2  Priority Interrupt System
B.2.3  A Small File-Handling Package
B.2.4  Dynamic Pictures     (Part 2)
B.2.5  A Database Protection Module
B.2.6  A Process Control Example
B.2.7  Adaptive Routing Algorithm for a Node     (Part 3)
                  within a Data Switching Network
B.2.8  General-Purpose Realtime Scheduler
B.2.9  Distributed Parallel Output
B.2.10  Unpacking and Conversion of Data
C.      SAMPLE RED PROGRAMS
C.1  Programming Example: Matrix-Vector Package
D.      REFERENCES
E.      INDEX





RED Reference Manual left arrow
x
right arrow 1. Introduction


Overview

Requirements
      Strawman
      Woodenman
      Tinman
      Ironman
      Steelman

RED Reference
RED Rationale

Types in RED
Time/Life Computer Languages
Memories

Site Index

Overview             Reference ToC             Rationale ToC             Site Index


Home   Favorites   Map

IME logo Copyright © 2009, Mary S. Van Deusen