DEC Trellis Object System Guide to Programming

*HyperReader

  CONTENTS

  Title Page

  Copyright Page

  Preface

  Caution

  1      Introduction

  1.1     Overview
    1.1.1      The Trellis Language
    1.1.2      The Trellis Programming Tools
      1.1.2.1      Browsing Tools
      1.1.2.2      Code Development Tools
      1.1.2.3      Debugging Tools
      1.1.2.4      Environment Tools

  1.2     Concepts for Application Development
    1.2.1      Objects
    1.2.2      Object Structure
    1.2.3      Typing

  2      Getting Started

  2.1     Running and Exiting Trellis
    2.1.1      Starting the Trellis Programming Environment
    2.1.2      Starting Trellis Programming Tools
    2.1.3      Exiting from the Trellis Programming Environment

  2.2     Manipulating Text

  2.3     Selecting Items for Tools

  2.4     Accessing External Files
    2.4.1      Loading Source Files
    2.4.2      Writing Text to Files

  2.5     Using the Default Workspace

  2.6     Linking Tool Windows

  3      Browsing with the Trellis Tools

  3.1     Browsing Types
    3.1.1      Listing Types in Categories
    3.1.2      Listing Definitions in a Type
    3.1.3      Looking at Definitions
    3.1.4      Looking at All Definitions in a Type Module
    3.1.5      Showing Type Hierarchies
    3.1.6      Searching Type Names
    3.1.7      Searching Definitions

  3.2     Searching Related Definitions and Redefinitions
    3.2.1      Finding Where Definitions Originate in the Library
    3.2.2      Showing Inheritance of Definitions
    3.2.3      Finding Users of Data and Operations
    3.2.4      Finding Called Definitions
    3.2.5      Finding Redefinitions

  3.3     Saving the Interface or Implementation

  3.4     Using Predefined Types

  4      Preparing for Application Development:  A Summary of Creating Applications

  4.1     Overview

  4.2 SUMMARY: Creating Applications

  4.3 SUMMARY: Writing and Compiling Types
    4.3.1 SUMMARY: Writing and Compiling Subtypes
    4.3.2 SUMMARY: Writing and Compiling Definitions
    4.3.3 SUMMARY: Coding Your Application
    4.3.4 SUMMARY: Signaling and Handling Exceptions

  4.4 SUMMARY: Debugging Your Application

  4.5 SUMMARY: Building an Application
    4.5.1 SUMMARY: Saving Compiled Source Code in Files
    4.5.2 SUMMARY: Reading Source Code from Files
    4.5.3 SUMMARY: Building an Application Workspace
    4.5.4 SUMMARY: Generating the Closure
    4.5.5 SUMMARY: Compiling the Closure Source Code

  4.6 SUMMARY: Running an Application

  4.7 SUMMARY: Customizing Application Startup

  4.8 SUMMARY: Additional Tasks

  5      Creating Types and a Type Hierarchy

  5.1     Creating New Types
    5.1.1      Preparing to Create Types
    5.1.2      Using the Type Module Template
    5.1.3      Establishing the Type Hierarchy

  5.2     Handling Common Type Specification Errors
    5.2.1      Avoiding Duplicate Type Names
    5.2.2      Recompiling Type Definitions
    5.2.3      Deleting a Type

  6      Creating Operations

  6.1     Creating Operation Definitions
    6.1.1      Preparing to Create Operation Definitions
    6.1.2      Using the Operation Template

  6.2     Guidelines for Coding the Operation Interface
    6.2.1      Specifying the Returns Attribute
    6.2.2      Specifying the Signals Attribute

  6.3     Implementing Behavior in Operations
    6.3.1      Planning the Implementation
    6.3.2      Writing the Operation's Implementation

  6.4     Ensuring Compatibility
    6.4.1      Overriding Inherited Type Operations
    6.4.2      Respecifying Type Operations
    6.4.3      Handling Behavior Inheritance
    6.4.4      The Effect of Subtypes On Visibility

  6.5     Naming Operation Identifiers
    6.5.1      Viewing Declared_Type Operations

  6.6     Saving the Definitions

  7      Creating Components and Other Definitions

  7.1     Creating Component Definitions
    7.1.1      Preparing to Create Component Definitions
    7.1.2      Using the Component Template

  7.2     Specifying the Component Interface
    7.2.1      Using Predefined and User-Defined Types
    7.2.2      Specifying a Component Header
    7.2.3      Handling Inheritance in Component Operations

  7.3     Implementing Components
    7.3.1      Implementing a Component as a Field
    7.3.2      Implementing a Component without a Field

  7.4     Saving the Component Definitions

  7.5     Creating Define, Inherit, and Exclude Definitions

  8      Implementing Exception Signaling and Handling

  8.1     Signaling an Exception
    8.1.1      Signaling a Failure Exception
    8.1.2      Overriding an Inherited Signaled Exception

  8.2     Handling Signaled Exceptions
    8.2.1      Catching an Exception
    8.2.2      Nesting an Exception

  9      Editing and Compiling Definitions

  9.1     Creating New Definitions
    9.1.1      Setting Type Context
    9.1.2      Using Definition Templates

  9.2     Editing an Existing Definition
    9.2.1      Editing a Definition
    9.2.2      Copying a Definition
    9.2.3      Listing a Full Type Module

  9.3     Compiling Definitions
    9.3.1      Compiling a Single Definition
    9.3.2      Compiling Multiple Definitions
    9.3.3      Compiling Multiple Batch Definitions
    9.3.4      Compiling the Log File

  9.4     Fixing Compiler Errors
    9.4.1      Distinguishing Compiler Messages
    9.4.2      Tracking Compiler Errors
    9.4.3      Examining Errors As They Occur
    9.4.4      Examining Old Compile Errors
    9.4.5      Fixing Compiler Errors and Recompiling
    9.4.6      Clearing Associated Errors
    9.4.7      Removing Definitions from the Grass Catcher
    9.4.8      Deleting Definitions

  9.5     Saving Source Code

  9.6     Handling Categories
    9.6.1      Creating a Category
    9.6.2      Deleting a Category
    9.6.3      Changing a Category
    9.6.4      Saving and Restoring Categories

  10     Testing and Debugging Programs

  10.1    Testing and Examining Source Code
    10.1.1     Running Code
    10.1.2     Examining the State of Objects
    10.1.3     Evaluating Components of Inspected Objects
    10.1.4     Examining Component Objects
    10.1.5     Executing Calls Using Evaluator Arguments

  10.2    Controlling Execution Flow
    10.2.1     Creating and Enabling Breakpoints
    10.2.2     Restoring Lost Breakpoints
    10.2.3     Operating on Breakpoints
    10.2.4     Creating Halt Breakpoints

  10.3    Tracing Activities
    10.3.1     Determining the Cause of Activity Interruption
    10.3.2     Looking at Stack Data
    10.3.3     Resuming Execution
    10.3.4     Testing Code
    10.3.5     Changing Arguments and Local Variables
    10.3.6     Forcing a Return
    10.3.7     Forcing an Exception to be Signaled

  11     Creating and Using Workspaces

  11.1    Using Standard Workspaces

  11.2    Using the Trellis Command Line for Workspaces

  11.3    Saving Source Code and Workspaces
    11.3.1     Saving Source Code While Running the Tools
    11.3.2     Using the Default Save_workspace Operation
    11.3.3     Requesting an Optional Save_workspace Operation
    11.3.4     Specifying a Workspace File
    11.3.5     Locating Your Saved Workspace
    11.3.6     Gauging the Workspace Size

  11.4    Compiling and Saving a Workspace
    11.4.1     Compiling the Workspace and its Source Code
    11.4.2     Using the Compiler Error List
    11.4.3     Saving a Workspace
    11.4.4     Fixing Errors in the Workspace

  11.5    Recovering Source Code From a Log File

  11.6    Running a Specified Workspace

  11.7    Maintaining Storage

  12     Building and Running Applications

  12.1    Editing the Application Code

  12.2    Generating the Closure

  12.3    Obtaining the Trellis Closure File

  12.4    Compiling the Closure Source Code

  12.5    Customizing Application Startup

  A   The Trellis Command Line

  trellis

  EXAMPLES

  6-1        Type Parent and Type Child Example

  6-2        Type Person and Type Student Example

  9-1        Example of Errors in Course\create

  FIGURES

  2-1        The Trellis Toolbox

  2-2        The Trellis Toolbox Icon

  2-3        Error Message

  3-1        Listing Type Names in Categories Example

  3-2        Listing Definitions Example

  3-3        Looking at a Definition Example

  3-4        Looking at Type Module Contents Example

  3-5        Showing Type Hierarchies Example

  3-6        Searching Type Names Example

  3-7        Searching Definitions Example

  3-8        Origin of Definitions Example

  3-9        Showing Inheritance Example

  3-10       Finding Users Example

  3-11       Finding Called Definitions Example

  3-12       Finding Redefinitions Example

  3-13       Saving Types to Files Example

  3-14       Saving the Interface Example

  3-15       Saving Definitions to Files Example

  5-1        Type Hierarchy Example

  6-1        Operation Template

  6-2        Student\create Operation Example

  6-3        Student\enroll Operation Example

  7-1        Field and Component Templates

  7-2        Component Code for Category_tool\Mytype.categories

  8-1        Student\assign_mark Operation

  8-2        Student\enroll Operation

  9-1        List of Types in the Graphics Category

  9-2        Create Category...  Dialog Box

  9-3        Edit Category...  Dialog Box

  9-4        Save Selected Categories... Dialog Box

  9-5        The Category Tool's Read From File...  Dialog Box

  10-1       The Evaluator's Include File... Dialog Box

  10-2       An Inspector

  10-3       A Sample Evaluator

  10-4       The Breakpoint Tool

  10-5       The Activity Viewer

  11-1       The Source Viewer's Write to File...  Dialog Box

  TABLES

  1-1        Browsing Tools

  1-2        Code Development Tools

  1-3        Debugging Tools

  1-4        Environment Tools

  2-1        Summary of Trellis Editing Commands

  4-1 SUMMARY: Saving Compiled Code

  4-2 SUMMARY: Reading Files into the Programming Environment

  9-1        Trellis Keywords for Updating an Existing Workspace

  9-2        Compiler Message Groupings

  11-1       Location and Names of Standard Workspaces

  11-2       Digital-Supplied Workspaces

  11-3       Source Code Compiling Choices

  11-4       Workspace Loading and Saving Choices

  11-5       Running Trellis System and Application Code Choices

  11-6       Looking at the Current Log File

  A-1        Specifying Tasks on the Command Line