Skip to main content
Log in

Fourier Elimination for Compiling Constraint Hierarchies

  • Published:
Constraints Aims and scope Submit manuscript

Abstract

Linear equality and inequality constraints arise naturally in specifying many aspects of user interfaces, such as requiring that one window be to the left of another, requiring that a pane occupy the leftmost 1/3 of a window, or preferring that an object be contained within a rectangle if possible. For interactive use, we need to solve similar constraint satisfaction problems repeatedly for each screen refresh, with each successive problem differing from the previous one only in the position of an input device and the previous state of the system. We present an algorithm for solving such systems of constraints using projection. The solution is compiled into very efficient, constraint-free code, which is parameterized by the new inputs. Producing straight-line, constraint-free code of this sort is important in a number of applications: for example, to provide predictable performance in real-time systems, to allow companies to ship products without including a runtime constraint solver, to compile Java applets that can be downloaded and run remotely (again without having to include a runtime solver), or for applications where runtime efficiency is particularly important. Even for less time-critical user interface applications, the smooth performance of the resulting code is more pleasing than that of code produced using other current techniques.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Borning, A. (1981). The programming language aspects of ThingLab, a constraint-oriented simulation laboratory. ACM Transactions on Programming Languages and Systems, 3(4): 353–387.

    Google Scholar 

  2. Borning, A., Anderson, R., & Freeman-Benson, B. (1996). Indigo: A local propagation algorithm for inequality constraints. In Proceedings of the 1996 ACM Symposium on User Interface Software and Technology, pages 129–136. Seattle.

  3. Borning, A., & Freeman-Benson, B. (1995). The OTI constraint solver: A constraint library for constructing interactive graphical user interfaces. In Proceedings of the First International Conference on Principles and Practice of Constraint Programming, pages 624–628. Cassis, France.

  4. Borning, A., & Freeman-Benson, B. (1998). Ultraviolet: A constraint satisfaction algorithm for interactive graphics. Constraints: An International Journal, 3(1): 9–32.

    Google Scholar 

  5. Borning, A., Freeman-Benson, B., & Wilson, M. (1992). Constraint hierarchies. Lisp and Symbolic Computation, 5(3): 223–270.

    Google Scholar 

  6. Borning, A., Lin, R., & Marriott, K. (1997). Constraints for the web. In Proceedings of Fifth ACM International Multi-Media Conference, pages 173–182.

  7. Borning, A., Marriott, K., Stuckey, P., & Xiao, Y. (1997). Solving linear arithmetic constraints for user interface applications. In Proceedings of the 1997 ACM Symposium on User Interface Software and Technology, pages 87–96.

  8. Freeman-Benson, B. Object Technology International, Personal communication.

  9. Greene, D. H., & Yao, F. F. (1986). Finite-resolution computational geometry. In Proceedings of the 27th Annual Symposium on the Foundations of Computer Science, pages 143–152. IEEE Computer Society Press.

  10. Harvey, W., Stuckey, P. J., & Borning, A. (1997). Compiling constraint solving using projection. In G. Smolka (ed.), Proceedings of the Third International Conference on Principles and Practices of Constraint Programming, LNCS, pages 491–505. Springer-Verlag.

  11. Jaffar, J., Maher, M. J., Stuckey, P. J., & Yao, R. H. C. (1994). Beyond finite domains. In Proceedings of the International Workshop on Principle and Practices of Constraint Programming, number 874 in LNCS, pages 86–93. Orcas Island, Washington, Springer-Verlag.

    Google Scholar 

  12. Nelson, C.G. (1978). An nlog n algorithm for the two-variable-per-constraint linear programming satisfiability problem. Technical Report STAN-CS-78-689. Stanford University.

  13. Sabin, D., & Freuder, E. C. (1997). Understanding and improving the MAC algorithm. In G. Smolka (ed.), Proceedings of the Third International Conference on Principles and Practices of Constraint Programming, LNCS, pages 167–181. Springer-Verlag.

  14. Somogyi, Z., Henderson, F., & Conway, T. (1996). The execution algorithm of Mercury: An efficient purely declarative logic programming language. Journal of Logic Programming, 29(1–3): 17–64.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

About this article

Cite this article

Harvey, W., Stuckey, P.J. & Borning, A. Fourier Elimination for Compiling Constraint Hierarchies. Constraints 7, 199–219 (2002). https://doi.org/10.1023/A:1015161716072

Download citation

  • Issue Date:

  • DOI: https://doi.org/10.1023/A:1015161716072

Navigation