 
 
 
8.2  Using Constraint Handling Rules
Here are the steps to be taken from writing to using CHRs:
- 
 Write a CHR program in a file 
File.chr.
 
 
- 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 chrfile into aplfile with the querychr2pl(File).
 
 
- In any ECLiPSe session, you can load a compiled constraint handler
([File].). The CHR library is automatically loaded
to provide the necessary runtime environment. ECLiPSe is in coroutining mode.
You can compile yourchr file and load the resulting pl file
at once using the query chr(File).
 
 
