9.2.2 Semantics of CHR
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • CHR: Constraint Handling Rules
        • CHR Syntax and Semantics
          • Semantics of CHR
            • chr_option/2
    • Packages
:- chr_option(+Option, +Value)
It is possible to specify options that apply to all the CHR rules in the module. Options are specified with the chr_option/2 declaration:
:- chr_option(Option,Value).

and may appear in the file anywhere after the first constraints declaration.

Available options are:

check_guard_bindings
This option controls whether guards should be checked for (illegal) variable bindings or not. Possible values for this option are on to enable the checks, and off to disable the checks. If this option is on, any guard fails when it binds a variable that appears in the head of the rule. When the option is off (default), the behaviour of a binding in the guard is undefined.
optimize
This option controls the degree of optimization. Possible values are full to enable all available optimizations, and off (default) to disable all optimizations. The default is derived from the SWI-Prolog flag optimise, where true is mapped to full. Therefore the command line option -O provides full CHR optimization. If optimization is enabled, debugging must be disabled.
debug
This option enables or disables the possibility to debug the CHR code. Possible values are on (default) and off. See section 9.4 for more details on debugging. The default is derived from the Prolog flag generate_debug_info, which is true by default. See --no-debug. If debugging is enabled, optimization must be disabled.