This manual describes how to compile and run Paradigm/SP programs.
1. Program Compilation 2. Program Execution 3. File Errors 4. Compilation Errors 5. Run-time Errors 6. Software Limits 7. Credit to Others 8. References 9. Related Links
You can create and compile a Paradigm/SP source file in the TP IDE. In order to execute the Compiler perform the following steps:
From the Compile menu, execute the Primary File command and select pComp.pas as a primary file; | |
From the Run menu, execute the Run command. |
appears in the user output screen, type the name of the module to be compiled (without the extension pas) followed by a return.
If the compiler finds errors in a module, the errors are reported both on the screen and in the textile errors and no object file is output. If the compiler does not find errors, it creates an object file in the Implementation directory. The object file has the same name as the module itself and an extension obj.
You can execute a Paradigm/SP module by running the Interpreter in the TP IDE. In order to execute the Interpreter perform the following steps:
From the Compile menu, execute the Primary File command and select pInter.pas as a primary file; | |
From the Run menu, execute the Run command. |
appears in the user screen, type the name of the module to be executed (without the extension obj) followed by a return.
If a run-time error occur during module execution, the error is reported on the user output screen and the execution is canceled.
Module name error: At compile time, the name of a compiled module is different from its source file name. At run time, the name of a module being loaded is different from its code file name. | |
File error: At compile time, the source file is not found. At compile time, the symbol file for an imported or an extended module is not found or is found corrupted. At run time, the object file for an imported or an extended module is not found. | |
Module version error: A module is not up-to-date and must be recompiled. At compile time, this can be a module that is being imported, or module that is being extended. At run time, this can be any module that is being loaded. |
Ambiguous case constant: Two case constants denote the same value. | |
Ambiguous identifier: A declaration introduces a second entity with the same identifier. | |
Forall statement error: In a restricted forall statement, (1) the element statement uses a target variable or (2) the element statement invokes an unrestricted method. | |
Function body error: A procedure statement occurs in the statement part of a function body. | |
Function parameter error: A function uses an explicit or implicit variable parameter. | |
Identifier kind error: A named entity of the wrong kind is used in some context. Constants, types, fields, variables, function and procedure methods are different kinds of named entities. | |
Import error: In an extended module, the same base module appears twice (directly or indirectly, through a chain of module extensions). | |
Incomplete comment: The closing delimiter } of a comment is missing. | |
Index range error: The index range of an array type has a lower bound that exceeds the upper bound. | |
Number error: A constant denotes a number outside the range of integers or reals. | |
Parallel statement error: In a restricted parallel statement, (1) a target variable of one process statement is also a target or an expression variable of another process statement or (2) a process statement invokes an unrestricted method. | |
Procedure statement error: In a restricted procedure statement, an entire variable is used more than once as a restricted actual parameter. | |
Recursion error: A recursive function or procedure method uses an implicit parameter. | |
Syntax error: The program syntax is incorrect. | |
Type error: The type of an operand is incompatible with its use. | |
Restricted method error: A restricted method uses an implicit variable parameter. | |
Undefined identifier: An identifier is used without being defined. |
Channel contention: Two processes both attempt to send or receive through the same channel. | |
Deadlock: Every process is delayed by a send or receive operation, but none of these operations match. | |
False assumption: An assume statement denotes a false assumption. | |
Message type error: Two processes attempt to communicate through the same channel, but the output expression and the input variable are of different message types. | |
Range error: The value of an index expression or a chr, pred, or succ function designator is out of range. | |
Undefined case constant: A case expression does not denote a case constant. | |
Undefined channel reference: A channel expression does not denote a channel. |
Block limit exceeded: The total number of dynamic blocks needed for the program execution exceeds the limit maxblock. At run time, blocks are allocated for dynamic variables and for the execution of methods, forall statements, and process statements. | |
Branch limit exceeded: The total number of branches denoted by all statements in the program exceeds the limit maxlabel. | |
Buffer limit exceeded: The size of the compiled code exceeds the limit maxbuf. | |
Case limit exceeded: The number of case constants exceeds the limit maxcase. | |
Channel limit exceeded: The number of channels opened exceeds the limit maxchan. | |
Dynamic fields limit exceeded: The number of dynamic fields in a class declaration exceeds the limit maxfields. | |
Export limit exceeded: The number of (explicitly or implicitly) exported type structures exceeds the limit maxstruct. | |
Import limit exceeded: The nesting level of (explicitly or implicitly) imported (1) class fields or (2) message types exceeds the limit maxnest. | |
Memory limit exceeded: The program execution exceeds the limit maxaddr. | |
Nesting limit exceeded: The level of nesting of the compiled module and its method declarations, parallel statements, and forall statements exceeds the limit maxlevel. | |
String limit exceeded: The number of characters in a character string exceeds the limit maxstring. |
maxaddr | = | 10000 | maxchan | = | 1000 |
maxblock | = | 200 | maxlabel | = | 1000 |
maxbuf | = | 10000 | maxlevel | = | 10 |
maxcase | = | 128 | maxstring | = | 81 |
maxfields | = | 10 | maximps | = | 32 |
maxphrase | = | 30 | maxident | = | 16 |
maxstruct | = | 80 | maxnest | = | 6 |
The following data limits have been hard-coded in the implementation
and, therefore, cannot be changed by the user:
minint | = | -32768 | maxint | = | 32767 |
minreal | = | 1.5e-45 | maxreal | = | 3.4e38 |
Radenski, A. (1998) The Paradigm/SP Implementation Notes. Computer Science Department, Winston-Salem State University, Winston-Salem, NC.
Last updated: October 1999.