CDEF*INE --

This is the command to define a constraint for the program’s use.
'Con?' ' asks for each constraint you wish to define individually. The various constraints allowed are shown below.

Note; If the constraint is going to take more than one line to define, then at the end of the line you are entering type a '&'. This will tell the program that you wish to continue the present definition on a new line. In this case the program will prompt 'Nxt?' for the next line of the definition. A definition can be up to seven lines long.

(i) One Dimensional Constraints

con-name : par / div (x1, x2)
con-name : par
con-name - The name of the constraint, terminated by the : symbol
par - The parameter number that the constraint will be checking
div - The division factor (has to be a power of 2) for the parameter specified (div will be set to 1 if not specified)
x1, x2 - The coordinate points of the constraint.

A one dimensional constraint is composed of a series of line segments. If the constraint is to be satisfied, the specified parameter must have a value (after the division) that will fall between one of the line segments. If the parameter is not present, or if the parameter does not fall into one of the line segments, then the constraint is not satisfied.

Note: () and , can be absent.

(ii) Two Dimensional Constraints

con—name : x-par / x-div, y-par / y—div (x1, y1) (x2, y2)... . con-name : x-par / x-div, y-par / y-div \band-one\ \band-two\
con-name - The name of the constraint, terminated by the : symbol
x-par - The parameter in the x direction that the constraint will check
x-div - The x parameter's division factor
y-par — The parameter in the y direction that the constraint will check
y-div - The y parameter's division factor
band-one- The first band name to use the points of x1, y1
band-two- The second band name to use the points of x1, y1, etc.- The (x,y) co-ordinate of the constraint

A two dimensional constraint uses its point list to draw a polygonal shape. The shape can be of any complexity as long as no lines intersect. SMAUG is presently limited to process up to sixty coordinates.  SMAUG will check the coordinates formed by the appropriate parameters (after division if necessary). If the coordinates formed by these two values fall within the polygonal shape drawn earlier, then the constraint will have a value of TRUE, otherwise it will have a value of FALSE. If neither parameter is present the constraint will have a value of FALSE.

One will notice that the second format shown has the 'variables' of band-one and band—two. These are the names of some bands from which the points are to be taken instead of reading them directly. The program will take the point list of the two bands, match which ends are the closest to each other and then write this point list back into the definition. This is one of the few cases where the program will automatically alter the user’s input definition.

Special note; To avoid double counting in boundary shared by two different constraints (mainly those formed by bands), the following convention is adopted. The points lying on the line formed by the lower values of y-coordinates are excluded from the constraints evaluation while the points lying on the line formed by the upper values of y-coordinates are included. Points lying on the left and right boundaries formed by the high and low values of x-coordinates are included.

(iii) Bitmask Constraints

con-name : par op mask
con—name— The name of the constraint, terminated by the : symbol
par- The parameter that the constraint will be checking, normally this parameter should be a bit mask.
op- Operator which can be AND (A) or OR (0)
mask— The mask (I*2 in hex) that the constraint will use for checking

A bit mask constraint will take the parameter specified and do an AND or OR operation with the mask provided.