CONTENTS Title Page Copyright Page Preface 1 VAX OPS5 Architecture 1.1 Compiler 1.2 Run-Time System 1.2.1 Recognize-Act Cycle 1.2.2 Command Interpreter 1.2.3 Run-Time System Compiler 2 Introduction to Program Development on VMS 2.1 Commands for Program Development 2.2 Using the Help Facility 2.3 Specifying Files 3 Compiling and Linking VAX OPS5 Programs 3.1 VAX OPS5 Compiler Size Restrictions 3.2 The OPS5 Command 3.3 Using the %INCLUDE Compiler Directive 3.4 Using VAX OPS5 Qualifiers to Control the Compiler and Linker 3.4.1 Creating an Index File for Modular Compilation (/[NO]CREATE) 3.4.2 Producing a Program Entry Point (/[NO]ENTRY) 3.4.3 Generating and Naming an Executable Image (/[NO]EXECUTABLE) 3.4.4 Defining an Index File (/[NO]INDEX_FILE) 3.4.5 Producing a Listing File (/[NO]LIST) 3.4.6 Including Machine Code in the Listing File (/[NO]MACHINE_CODE) 3.4.7 Naming Object Files (/[NO]OBJECT[=file-spec]) 3.5 Linking VAX OPS5 Programs 3.6 Compiling, Linking, Executing, and Debugging External Routines 3.7 Performing a Modular Compilation 3.8 Creating Shareable VAX OPS5 Programs 3.8.1 Creating a Shareable Image 3.8.2 Installing a Shareable Image 3.8.3 Calling a Shareable Image 4 Executing VAX OPS5 Programs 4.1 Running Programs 4.2 Using the VAX OPS5 Command Interpreter 4.2.1 Entering VAX OPS5 Commands 4.2.2 Exiting the Command Interpreter 4.2.3 Setting Up Initial Conditions 4.2.3.1 Disabling and Enabling Run-Time Messages 4.2.3.2 Choosing a Conflict-Resolution Strategy 4.2.3.3 Initializing Working Memory 4.2.4 Using VAX OPS5 Command Files 4.3 Executing Recognize-Act Cycles 4.4 Interrupting Recognize-Act Cycles 4.4.1 Ctrl/C 4.4.2 Breakpoints 4.4.3 HALT Actions 4.5 Restarting Programs 4.6 Adding Statements, Productions, and Catchers to Executable Images 5 Debugging VAX OPS5 Programs 5.1 Using VAX OPS5 Debugging Commands 5.1.1 Using Breakpoints 5.1.1.1 Setting and Deleting Breakpoints 5.1.1.2 Listing Breakpoints 5.1.2 Displaying Working-Memory Elements 5.1.2.1 Displaying the Contents of Working Memory 5.1.2.2 Displaying Specific Working-Memory Elements 5.1.2.3 Displaying the Working-Memory Elements of a Class 5.1.2.4 Displaying Working-Memory Elements that Match Element Patterns 5.1.3 Modifying Working Memory 5.1.3.1 Creating Working-Memory Elements 5.1.3.2 Deleting Elements from Working Memory 5.1.3.3 Changing the Atoms in Working-Memory Elements 5.1.4 Displaying Conflict Set Information 5.1.4.1 Displaying the Contents of the Conflict Set 5.1.4.2 Displaying the Instantiation of the Next Production To Be Executed 5.1.5 Saving and Restoring the State of Working Memory and the Conflict Set 5.1.5.1 Using SAVESTATE 5.1.5.2 Using ADDSTATE 5.1.5.3 Using RESTORESTATE 5.1.6 Displaying Trace Information 5.1.6.1 Setting the Trace Level 5.1.6.2 Displaying the Current Trace Level 5.1.6.3 Trace Level 1-RULE 5.1.6.4 Trace Level 2-RULE and WM 5.1.6.5 Trace Level 3-RULE, WM and CS 5.1.6.6 Trace Level 4-RULE, WM, CS and PM 5.1.7 Displaying Match Information 5.1.8 Backing Up over Recognize-Act Cycles 5.1.9 Disabling Productions 5.1.10 Using the Performance Measurement and Evaluation Package 5.2 VMS Debugger 6 Controlling Input and Output 6.1 Opening Files 6.2 Setting the Default Input Source and Output Destination 6.3 Closing Files A Diagnostic Messages A.1 Message Order A.2 Message Format A.3 Controlling Message Display A.4 List of VAX OPS5 Messages ; *** "AAAAAA" inserted before symbol *** . . . %OPSCOMP-E-SYNTAX_ERROR, One of the following symbols was expected: AAAAAA. %OPSCOMP-E-UNRECOVERABLE, Unrecoverable syntax error . . . %OPSCOMP-F-PUNTOPERANDS, Internal inconsistency-operand stack ove %OPSCOMP-F-PUNTOPERATORS, Internal inconsistency-operator stack overflow . . . %OPSCOMP-W-ARGCOUNT, Number of arguments usen %OPSCOMP-W-BADINDEX, Index file DEV:FILNAM.TYP corrupted . . . %OPSCOMP-W-DUPDECRULE, Duplicate production name, AAAAAA-prod %OPSCOMP-W-DUPRULEHERE, Duplicate production name or catcher name AAAAAA in this module-production ignored . . . %OPSCOMP-Wd %OPSCOMP-W-INVTEST, Invalid test on symbol . . . %OPSCOMP-W-TOOMANYCES, Too many positive condition elements on left-hand si %OPSCOMP-W-TWOSTARTS, More than one STARTUP statement found . . . %OPSRT-F-FREEMEM, Code inconsistency attempting to free vi %OPSRT-F-GETMEM, Code inconsistency attempting to get virtual memory . . . %OPSRT-I-PAUSED, Pause %OPSRT-I-PBREAK, PBREAK encountered . . . %OPSRT-W-BADARGNUM, Wrong number of arguments %OPSRT-W-BADCOMPUTE, COMPUTE-symbol used in arithmetic expression: AAAAAA . . . %OPSRT-W-CYCLEOFLOW, Cycle count overflow.c %OPSRT-W-DEFAULTARGS, DEFAULT-wrong number of arguments . . . %OPSRT-W-ILLCMD, Invalid command: AAAAAA %OPSRT-W-ILLSTRATEGY, STRATEGY-argument value not LEX or MEA: AAAAAA . . . %OPSRT-W-NOTABVAL, No value after attribute oper( %OPSRT-W-NOTACATCH, AFTER-argument value not a catcher: AAAAAA . . . %OPSRT-W-PARAMARG, OPS$PARAMETER-invalid argument: n %OPSRT-W-PMEDISABLED, REPORT-timing was never enabled . . . %OPSRT-W-SAVEDWMES, RESTORESTATE-too many working-memory elemens %OPSRT-W-SAVEFILE, SAVESTATE-error in file processing . . . %OPSRT-W-TOOMANYPBREAKS, PBREAK-maximum number of breakpoints ex %OPSRT-W-TYPEBAD, Atom is not of the required type . . . ; *** Symbol replaced by "AAAAAA" *** A.4.1 Product License Messages %LICENSE-F-NOAUTH, DEC OPS5, use is not authorized on this node . . . -LICENSE-I-SYSMGR, please see your system manager FIGURES 2-1 Commands for VAX OPS5 Program Development 3-1 Modular Compilation TABLES 2-1 File Specification System Defaults 3-1 VAX OPS5 Compiler Qualifiers 5-1 Debugging Commands 5-2 Trace Levels 5-3 Trace Keywords A-1 Message Severity Levels