Rule-based programming and constraints Krzysztof R. Apt Abstract: At various levels of abstraction constraint programming (CP) can be viewed as an instance of rule-based programming. At each level this view sheds light on the essence of CP. In particular, at the highest level it allows us to bring CP closer to the computation as deduction paradigm. At the middle level we can explain various constraint propagation algorithms. Finally, at the lowest level we can address the issue of automatic generation and optimization of the constraint propagation algorithms.