CONTENTS Title Page Copyright Page Preface 1 Introduction 1.1 LSE 1.2 SCA 1.3 LSE/SCA Integration 1.4 VAX DEC/Code Management System Integration 1.5 Integration with Other VMS Tools Part 1 Using LSE 2 Introduction to LSE 2.1 Overview 2.1.1 LSE Features 2.2 Getting Started 2.2.1 Understanding LSE Concepts 2.2.2 Issuing Commands 2.2.3 Invoking LSE 2.2.4 Getting Help 2.3 Sample Session 2.3.1 Expanding Nonterminal Placeholders 2.3.2 Deleting Placeholders 2.3.3 Typing over List Placeholders 2.3.4 Expanding Menu Placeholders 2.3.5 Expanding Tokens 2.3.6 Expanding Terminal Placeholders 2.3.7 Entering Pseudocode 2.3.8 Moving Pseudocode to Comments 2.3.9 Ending the Sample Session 2.4 Compiling Source Code 2.5 Invoking LSE from VMS Debugger and from VAX Performance and Coverage Analyzer 2.6 LSE Command Line 2.6.1 LSE Command Line Qualifiers 2.7 Running LSE/DECwindows in a Separate Process 3 Performing Editing Tasks 3.1 Using Buffers 3.1.1 Buffer Attributes 3.2 Using Windows 3.3 Using the Search and Substitute Operations 3.3.1 Searching Through Buffers 3.3.2 Substituting Text Strings 3.4 Working with Files 3.4.1 Locating, Displaying, and Editing Source Files 3.4.2 Locating Files in Multiple Directories 3.4.3 Setting Directory Defaults 3.4.4 Getting Files Through VAX DEC/Code Management System 3.5 Recovering from a Failed Editing Session 3.6 Collapsing and Expanding Program Source 3.6.1 Sample Session 3.6.2 Editing Overviews 4 Using VAX LSE with DECwindows 4.1 Overview 4.1.1 The DECwindows LSE Application Window 4.1.2 Getting Help 4.2 LSE DECwindows Sample Session 4.2.1 Opening a File 4.2.2 Positioning the Cursor and Selecting Text 4.2.3 Searching for Text 4.2.4 Replacing Text 4.2.5 Formatting Text 4.2.6 Using Multiple Windows 4.2.7 Using a Filter to Open Files 4.2.8 Moving Through Buffers 4.2.9 Reviewing Source Code 4.3 Querying with SCA 4.3.1 Ending the Editing Session 5 Performing Language-Specific Tasks 5.1 Using Placeholders 5.2 Using Tokens 5.3 Using Pseudocode 5.3.1 Typing Pseudocode 5.3.2 Creating Comment Text from Pseudocode 5.3.3 Processing Pseudocode 5.4 Using Aliases 5.5 Packages 5.6 Using Comments Part 2 Using SCA 6 Introduction to SCA 6.1 Overview 6.1.1 SCA Features 6.1.2 Querying with SCA 6.2 SCA Analysis Data Files 6.2.1 Using the VAX Source Code Analyzer ANALYZE Command 6.3 Invoking SCA 6.4 SCA Commands 7 Performing SCA Tasks 7.1 Getting Started 7.1.1 Invoking SCA 7.1.2 Getting Help 7.1.3 Selecting a Source Library 7.1.4 Displaying Library Specifications 7.1.5 Displaying Module Information 7.1.6 Using the FIND Command 7.1.6.1 Navigating the Query Display 7.1.6.2 Moving to a Source Declaration 7.1.7 Multiple Queries 7.1.7.1 Moving to a Specified Query 7.1.7.2 Moving to the Next Query 7.1.7.3 Moving to the Previous Query 7.1.7.4 Terminating a Query 7.1.8 Exiting from the SCA Session 8 Using the SCA Query Language 8.1 Overview 8.2 Features of the SCA Query Language 8.3 Basic Concepts 8.4 SCA Query Language Tutorial 8.4.1 Simple Queries 8.4.2 Using the Expand Function to Find Related Occurrences 8.4.3 Using Logical Operators to Select Information 8.4.4 The Current Query 8.4.5 Structured Relationship Expressions 8.4.6 Nonstructured Relationship Expressions 8.4.7 Other Relationships 8.4.8 The IN Function 8.4.9 Pathnames 8.4.10 Combined Relationship Examples 9 Evaluating SCA Query Expresssions 9.1 Query Expression Syntax 9.2 Operator Precedence and Associativity 9.3 Default Parenthesizing 9.4 Semantics 9.5 Attribute Selection Expressions 9.5.1 Name Selection 9.5.2 Symbol Class Selection 9.5.3 Symbol Domain Selection 9.5.4 Occurrence Selection 9.5.5 File Specification Selection 9.6 Operator Expressions 9.6.1 Path-Name Expressions 9.6.2 Intersection Expressions 9.6.3 Union Expressions 9.6.4 Exclusive-Or Expressions 9.7 Function-Call Expressions 9.7.1 Parameter Association 9.7.2 Negation Function 9.7.3 Expansion Function 9.7.4 Indicated Function 9.7.5 Query Usage Function 9.7.5.1 The Current Query 9.7.6 Relationship Functions 9.7.6.1 Individual Relationship Functions 9.7.6.2 Relationship Parameters 9.7.7 The IN Function 9.8 Abbreviation Rules 10 Using SCA Libraries 10.1 Overview 10.1.1 Using Remote Libraries 10.2 Library Manipulation 10.2.1 Creating a Library Directory 10.2.2 Creating a Library 10.2.3 Specifying a Library 10.2.4 Removing a Library 10.2.5 Loading Library Information 10.2.6 Deleting a Library 10.2.7 Multiple Libraries 10.2.8 Library Planning 10.3 Library Maintenance 10.3.1 Displaying Library Specifications 10.3.2 Displaying Module Information 10.3.3 Deleting Module Information 10.3.4 Verifying and Recovering a Library 10.3.5 Optimizing a Library 11 Using the VAX Source Code Analyzer INSPECT Command 11.1 Overview 11.2 INSPECT Command Concepts 11.2.1 General Checking Philosophy 11.2.2 Routines and Common Blocks 11.2.3 Master Declarations and Checking 11.3 INSPECT Command Qualifiers 11.3.1 Performing Various Types of Checking 11.3.2 Severity Levels 11.3.3 Error Limits 11.4 Diagnostic Error Messages 11.4.1 Fatal-Level Error Messages 11.4.2 Error-Level Error Messages 11.4.3 Warning-Level Error Messages 11.4.4 Informational-Level Error Messages 11.5 Tailoring the INSPECT Command for Diverse Programming Styles 11.5.1 Using Severity Levels to Eliminate Unwanted Messages 11.5.2 Using Error Limits to Eliminate Excessive Messages 11.5.3 Using the /CHARACTERISTICS Qualifier to Eliminate Unwanted Checks 11.5.4 Using Other Techniques to Eliminate Unwanted Diagnostics Part 3 Designing Programs 12 Using LSE and SCA to Design Programs 12.1 Introduction 12.2 Creating Designs 12.2.1 Designing Routine Declarations 12.2.2 Refining the Design 12.2.3 Designing Data Declarations 12.3 Processing Designs 12.3.1 Loading Design Information into an SCA Library 12.4 Analyzing Designs 12.5 Expressing Design Information in Comments 12.5.1 Using Tagged Comments 12.5.2 Adding New Tags and Keyword Lists 12.5.3 Associating Tags with Objects 12.6 Generating Design Reports 12.6.1 Using Design Report Formats 12.6.2 Creating Online HELP 12.6.3 Creating LSE Package Definitions 12.6.4 Creating INTERNALS Reports 12.6.5 Creating 2167A Software Design Reports 12.6.5.1 Describing 2167A Structure in your Code 12.6.5.2 Retrieving 2167A Structure Information 12.7 Reverse-Engineering a Design 12.7.1 Sample Report matrix_multiply Part 4 Customizing Functions 13 Customizing Editing Functions 13.1 Modifying LSE 13.1.1 Defining Keys 13.1.2 Defining Commands 13.1.3 Defining Aliases 13.1.4 Defining Buffer Attributes 13.1.5 Customizing Windows 13.1.6 Redefining Language Elements 13.1.7 Using the VAX Text Processing Utility (VAXTPU) 13.2 Modifying LSE/DECwindows Attributes 13.3 Storing Modifications 13.3.1 Storing Modifications in Text Files 13.3.2 Using Initialization and Command Files 13.4 Speeding Up LSE Initialization 13.4.1 Creating Environment and Section Files 13.4.2 Using Environment and Section Files 13.4.3 Using Multiple Files 14 Customizing LSE/DECwindows Menus 14.1 Using the Extend Menu Dialog Box 14.2 Adding a New LSE Command Entry to a Menu 14.3 Saving Menu Modifications 15 Defining LSE Templates 15.1 Defining a Text Template 15.1.1 Language Definition 15.1.2 Placeholder Definitions 15.1.3 Token Definitions 15.2 Defining a Programming Language 15.2.1 Language Definition 15.2.2 Defining Language Elements 15.3 Saving Language Definitions 15.4 Indentation Control 15.5 Defining a Package 15.5.1 Routine Definitions 15.5.2 Parameter Definitions 16 Providing Diagnostic File Support 16.1 User-File Format Example 16.2 User-File Format Command Descriptions END DIAGNOSTIC END MODULE MESSAGE/FILE MESSAGE/TEXT REGION/FILE REGION/LIBRARY REGION/NESTED REGION/TEXT START DIAGNOSTIC START MODULE 17 Customizing Overviews 17.1 Introduction 17.2 Making Adjustments 17.2.1 Testing Overviews 17.2.2 Using Adjustment Qualifiers 17.2.2.1 Adjusting Single Lines 17.2.2.2 Adjusting Multiple Lines 17.2.2.3 Interactions of Definitions 17.2.2.4 Languages Without Indentation 17.2.2.5 Preventing Text Compression 17.2.2.6 Finding Appropriate Overview Text 17.2.2.7 Inheriting Indentation 17.2.2.8 Blank Lines 17.2.2.9 Prefixes 17.2.2.10 Grouping Comment Lines 17.2.2.11 Bracketed Comments 17.2.2.12 Fixed Comments 17.2.3 Basic Rules for Pattern Matching 17.2.3.1 Multiple Word Patterns 17.2.3.2 Blank Space and Adjustment Patterns 17.2.3.3 Specifying Columns 17.2.3.4 Pattern Matching Precedence 17.2.3.5 Using Precedence to Hide Patterns 17.2.3.6 Rules for Pattern Strings 17.2.3.7 Using the Pattern Parameter 17.2.4 Special Processing for FORTRAN 17.3 Tab Increments and the DEFINE ADJUSTMENT Command 17.4 Debugging 18 Customizing Reports 18.1 Introduction 18.2 How the REPORT Command Invokes VAXTPU 18.3 How Reports are Organized 18.4 Customizing 2167A Reports 18.4.1 Adding a Section to a 2167A Report 18.4.2 Using Program Code For Report Information 18.4.3 Changing the Mapping of Files EXAMPLES 13-1 Sample Initialization File 13-2 Sample Command File 15-1 Syntax Summary for the Example Language 16-1 User-File Format Diagnostic FIGURES 1-1 VAX Language-Sensitive Editor Software Development Environment 2-1 Initial String Placeholder in a New Buffer 2-2 Expanding a Nonterminal Placeholder 2-3 Typing over a Placeholder 2-4 Using a List Placeholder 2-5 Typing over a List Placeholder 2-6 Using a Menu Placeholder 2-7 Selecting a Menu Item 2-8 Using Tokens in Menu Placeholder 2-9 Selecting a Token from a Menu 2-10 Expanding a Token 2-11 Expanding a Terminal Placeholder 2-12 Typing Pseudocode 2-13 Pseudocode to Comments 2-14 Issuing the COMPILE Command 2-15 Result of Issuing the REVIEW Command 2-16 GOTO SOURCE Command 2-17 NEXT STEP Command 2-18 GOTO SOURCE Command 3-1 Screen Format 3-2 Buffer Containing Source 3-3 Overview of Source 3-4 Expanding to Lower Detail 3-5 Expanding to Lowest Detail 3-6 Collapsing Code 4-1 LSE DECwindows Title Bar and Menus 4-2 Open Dialog Box 4-3 User Buffer 4-4 Find Dialog Box 4-5 Replace Dialog Box 4-6 Indentation Dialog Box 4-7 Using Multiple Windows 4-8 Specifying a Filter 4-9 Displaying a List of Buffers 4-10 The REVIEW Buffer 4-11 Corresponding Source Code 4-12 SCA Query Buffer 4-13 Source Code Corresponding to First Occurrence 6-1 Setting Up an SCA Environment 7-1 The SHOW MODULE Display 7-2 The FIND * table * Display 7-3 The Expanded BUILD_TABLE Display 7-4 The GOTO Source Display 7-5 The GOTO DECLARATION Display 7-6 The FIND EXPAND INDICATED Display 7-7 The TRANS_TABLE Source Display 7-8 The FIND calling Display 7-9 The FIND called_by Display 7-10 The Expanded SIGNAL_DUPLICATE Display 7-11 The SHOW QUERY Display 7-12 The FIND /MODIFY Display 13-1 Extracting a Token 13-2 Executing a New Definition 14-1 Extend Menu Dialog Box 14-2 Adding a Command to a Menu 14-3 Menu Item Added 15-1 Memo Template 16-1 First Diagnostic and Corresponding Source 16-2 Second Diagnostic and Corresponding Source 16-3 Supplied Text of the Second Diagnostic and Corresponding Source TABLES 2-1 Commands for Token and Placeholder Manipulation 2-2 Manipulation Commands and Their Functions 2-3 Commands for Reviewing Compilation Errors 2-4 Review Commands and Their Functions 2-5 LSE Command Line Qualifiers 3-1 Buffer Manipulation Commands 3-2 Screen Manipulation Commands 3-3 Code Viewing Commands 9-1 Attribute Selection Expressions 9-2 Binary Operators 9-3 Nonrelationship Function Expressions 9-4 Function Names 9-5 Function Parameters 9-6 Query Expression Forms 11-1 /CHARACTERISTICS Type Options 13-1 Where LSE Stores Modifications 17-1 Named Pattern Elements 17-2 Type Keywords 18-1 VAXTPU Variables