8.2 Using Constraint Handling Rules
Here are the steps to be taken from writing to using CHRs:
You can compile your
Write a CHR program in a file
- In ECLiPSe, load the chr library with the query
lib(chr). It contains both the compiler and runtime system for
CHRs. Now ECLiPSe is in coroutining mode.
- Compile your
chr file into a
pl file with the query
- In any ECLiPSe session, you can load a compiled constraint handler
].). The CHR library is automatically loaded
to provide the necessary runtime environment. ECLiPSe is in coroutining mode.
chr file and load the resulting
at once using the query