Up: Compiling for Computational Origami Previous: Example

Error Messages

All errors cause the compiler to immediately abort; no error recovery is attempted. The file name and line number on which the error was detected are given along with a backtrace of function calls within the program. The following error messages may be generated during the compilation of a program. Other warnings may be given at different times, but will not be enumerated here.

Reference to undeclared variable name

Variable name was referenced but never declared.

Multiply defined variable name

Variable name was declared twice in the same scope.

Out of bounds reference: var<num>

An attempt was made to reference a bit which was not within range for the given variable. A common mistake is to declare a variable as a<5> and then attempt to reference the bit position a<5>.

Reference to uninitialized bit var<num>

An attempt was made to read a value from a bit which had never been initialized.

Illegal number of bits in assignment: expecting num, got num

The number of bits on the left hand side and right hand side of an assignment statement do not agree.

INPUT may only be specified in the main body

An INPUT declaration may only appear in the main body of the program, not in a function declaration.

OUTPUT may only be specified in the main body

An OUTPUT declaration may only appear in the main body of the program, not in a function declaration.

Number of bits declared does not agree with positions specified

The number of bits specified in an INPUT or OUTPUT declaration does not agree with the number of explicit positions provided.

Can't read value from an OUTPUT

An attempt was made to use a variable declared as an OUTPUT on the right hand side of an assignment.

Call to undeclared function name

Function name was not declared in the main program and could not be found in any of the specified libraries.

Multiply defined function name

Function name has been declared more than once in the main program.

Function name called with num bits, expecting num

The function was called with a different number of bits than its arguments needed. This could also be caused by improper use of a library routine.

Too many nested functions

Too many nested function calls were made. A maximum of 100 nested function calls are allowed. Check for a recursive function call.

More function arguments than maximum allowed

More bits were specified as arguments than the maximum allowed. Currently, a function may only take 500 bits worth of arguments.

No main body specified - nothing to compile

No code was specified after any function declarations, and thus there is no starting point for the compilation.

Main function specified return values

The main function cannot return values, since it is never called.

In addition, a number of fatal errors can be generated if there are unfixed bugs in the compiler. These are preceeded by the string ``INTERNAL FATAL error.''



Up: Compiling for Computational Origami Previous: Example


Robert French