The format of constraint files Three constraints are allowed in the constraint file: 1. requires 2. excludes 3. raw "requires" means certain event needs other events to be done before that. "excludes" means certain events cannot occur in some patterns. "raw" means a specific combination of events at specific positions. A type of constraint starts its name on a single line, that is "requires", "excludes" and "raw". Next follows the constraints. The "requires" and "excludes" constraints cannot specify the positions, while they give some patterns. The three types of constraints do not need to be ordered. All the constraints are sequences of events (perhaps together with their positions). The events in a sequence are separated by comma (","). "..." in the sequence means 0 or more events. The texts of the constraints are space insensitive. The constraint file can contain line comments starting with "//". ----------------------------------------------------------------------------- requires: This type of constraints is represented by sequences of events. The last event of the sequence is the target event, and all the preceding events are requirements of the last one. For example, "0, 2, 3" means event 3 requires events 0 and 2, and these three events should be consecutive. For another example, "0, ..., 2, 3" means event 3 requires events 0 and 2, and 2 and 3 should be consecutive while events 0 and 2 do not necessarily need to be consecutive (although they can). Example: requires 0, 2 1, 2, ..., 4 3, 2, 5 2,...,3,6 ----------------------------------------------------------------------------- excludes: This type of constraints is represented by sequences of events, which entail the combinations these events are not allowed to appear together. For example, "0, 1, 2" means events 0, 1 and 2 cannot appear together consecutively. For another example, "0, ..., 1, ..., 2" means events 0, 1 and 2 cannot appear together (not necessarily consecutively). If the constraint contains only one event, it means the event is infeasible. Example: excludes 2 0, ..., 1 4, 5, 6 ----------------------------------------------------------------------------- raw: A constraint of this type is represented by some positions and the events on these positions. The positions and the events are separated by "|". For example, "0,1,2|3,5,4" means events 3, 5 and 4 cannot appear at the same time at positions 0, 1 and 2 respectively. Example: raw 0,1,2|3,5,4 0,2|3,6 ----------------------------------------------------------------------------- An example with all kinds of constraints: requires 0, 2, 4 5,3,...,2 excludes 6,5,1 raw 0,1,2|3,5,4 0,2|3, 6 excludes 2 0, ..., 1 4, 5, 6 requires 0, ..., 1, 3