[ ECLiPSe Constraint Handling Rules library (chr) built-in.|Group Index| Full Index]

chr_opium

Activates the Opium debugger and shows constraint handling.

Description

In order to use the Opium debugger, the debug_compile flag must have been on (default) during compilation (chr to pl) and loading of the produced ECLiPSe code. The query chr_opium. opens an Opium window in which the ECLiPSe code will be traced. The library chr_opium will be automatically loaded. Note that the Opium debugger for constraint handling rules works with X graphic interface. The OPIUM_WINDOW environment variable must thus be set. An Opium execution can be aborted using the a. command in Opium.

Both debuggers display user-defined constraints and application of constraint handling rules. In the Opium debugger, this information corresponds to additional ports of the debugger. The additional ports are:

* add: A new constraint is added to the constraint store.

* already_in: A constraint to be added was already present.

The ports related to application of rules are:

* try_rule: A rule is tried.

* delay_rule: The last tried rule cannot fire because the guard did not succeed.

* fire_rule: The last tried rule fires.

The ports related to labeling are: * try_label: A label_with declaration is checked.

* delay_label: The last label_with declaration delays because the guard did not succeed.

* fire_label: The last tried label_with declaration succeeds, so the clauses of the associated constraint will be used for built-in labeling.

When displayed, each constraint is labeled with a unique integer identifier. Each rule is labeled with its name as given in the chr source using the @ operator. If a rule does not have a name, it is displayed together with a unique integer identifier.

See the extension manual chapter on constraint handling rules for more information on the Opium scenario used for debugging.

Fail Conditions

None.

Resatisfiable

No.

Exceptions

Examples


See Also

chr_trace / 0, chr_notrace / 0