Abstract
A constraint system consists of variables and a set of constraints on those variables. To solve a constraint system is to find a valuation that satisfies all constraints; or the "best" subset of constraints if not all can simultaneously be satisfied. In a multi-way dataflow constraint system, solving requires selecting a set of user-defined functions which, when executed, will enforce the constraints. The task of selecting these functions is called planning. The planner has two kinds of input: the specification of the constraints and an order of priority for those constraints. The former typically changes seldom, while the latter frequently, making constraint planning a potential application for program specialization. This paper shows how to generate specialized planners for hierarchical multi-way dataflow constraint systems when the constraints are known in advance. The specialized planners are DFAs; they can be an order of magnitude or more faster than a general purpose planner for the same system. Our applications for constraint systems are in user interface programming, where constraint systems determine how a GUI should react to user interaction---specialized planners can help to ensure that GUIs' responses to user interaction are instantaneous.
- J. A. Bondy and U. S. R. Murty. Graph Theory. Springer, 2008. Google Scholar
Digital Library
- A. Borning. The programming language aspects of ThingLab, a constraint-oriented simulation laboratory. ACM Trans. Program. Lang. Syst., 3(4):353–387, Oct. 1981. URL http://doi.acm.org/10. 1145/357146.357147. Google Scholar
Digital Library
- A. Borning, R. Duisberg, B. Freeman-Benson, A. Kramer, and M. Woolf. Constraint hierarchies. SIGPLAN Not., 22(12):48–60, Dec. 1987. ISSN 0362-1340. URL http://doi.acm.org/10.1145/38807. 38812. Google Scholar
Digital Library
- A. Borning, R. Lin, and K. Marriott. Constraints for the web. In Proceedings of the Fifth ACM International Conference on Multimedia, MULTIMEDIA ’97, pages 173–182, New York, NY, USA, 1997. ACM. URL http://doi.acm.org/10.1145/266180.266361. Google Scholar
Digital Library
- J. Freeman, J. Järvi, W. Kim, M. Marcus, and S. Parent. Helping programmers help users. In GPCE’11: Proceedings of the 10th ACM international conference on Generative programming and component engineering, pages 177–184, New York, NY, USA, 2011. ACM. Google Scholar
Digital Library
- J. Freeman, J. Järvi, and G. Foust. HotDrink: a library for web user interfaces. In Proceedings of the 11th International Conference on Generative Programming and Component Engineering, GPCE ’12, pages 80–83, New York, NY, USA, 2012. ACM. URL http://doi.acm. org/10.1145/2371401.2371413. Google Scholar
Digital Library
- B. N. Freeman-Benson, J. Maloney, and A. Borning. An incremental constraint solver. Commun. ACM, 33(1):54–63, 1990. Google Scholar
Digital Library
- W. Harvey, P. J. Stuckey, and A. Borning. Fourier elimination for compiling constraint hierarchies. Constraints, 7(2):199–219, 2002. ISSN 1383-7133. URL http://dx.doi.org/10.1023/A%3A1015161716072. Google Scholar
Digital Library
- J. Järvi, M. Marcus, S. Parent, J. Freeman, and J. N. Smith. Property models: from incidental algorithms to reusable components. In GPCE’08: Proceedings of the 7th international conference on Generative programming and component engineering, pages 89–98, New York, NY, USA, 2008. Google Scholar
Digital Library
- J. Järvi, M. Marcus, S. Parent, J. Freeman, and J. N. Smith. Algorithms for user interfaces. In GPCE’09: Proceedings of the 8th international conference on Generative programming and component engineering, pages 147–156, New York, NY, USA, 2009. ACM. Google Scholar
Digital Library
- J. Järvi, M. Haveraaen, J. Freeman, and M. Marcus. Expressing multiway data-flow constraint systems as a commutative monoid makes many of their properties obvious. In Proceedings of the 8th ACM SIGPLAN workshop on Generic programming, WGP ’12, pages 25– 32, New York, NY, USA, 2012. ACM. URL http://doi.acm.org/10. 1145/2364394.2364399. Google Scholar
Digital Library
- B. A. Myers. Separating application code from toolkits: eliminating the spaghetti of call-backs. In Proceedings of the 4th annual ACM symposium on User interface software and technology, UIST ’91, pages 211–220, New York, NY, USA, 1991. ACM. URL http://doi. acm.org/10.1145/120782.120805. Google Scholar
Digital Library
- J. Nielsen. Usability engineering. Elsevier, 1994.Google Scholar
- M. Sannella. Skyblue: A multi-way local propagation constraint solver for user interface construction. In UIST ’94: Proceedings of the 7th annual ACM symposium on User interface software and technology, pages 137–146, New York, NY, USA, 1994. ACM. Google Scholar
Digital Library
- M. Sannella, J. Maloney, B. N. Freeman-Benson, and A. Borning. Multi-way versus one-way constraints in user interfaces: Experience with the deltablue algorithm. Softw., Pract. Exper., 23(5):529–566, 1993. Google Scholar
Digital Library
- I. E. Sutherland. Sketchpad: A Man-Machine Graphical Communication System. PhD thesis, Massachusetts Institute of Technology, Lincoln Lab, 1963. Also published as technical report UCAM-CLTR-574 of the University of Cambridge, UK, Computer Laboratory.Google Scholar
- B. Vander Zanden. An incremental algorithm for satisfying hierarchies of multiway dataflow constraints. ACM TOPLAS, 18(1):30–72, Jan. 1996. URL http://doi.acm.org/10.1145/225540.225543. Google Scholar
Digital Library
Index Terms
Specializing planners for hierarchical multi-way dataflow constraint systems
Recommendations
Generating reactive programs for graphical user interfaces from multi-way dataflow constraint systems
GPCE 2015: Proceedings of the 2015 ACM SIGPLAN International Conference on Generative Programming: Concepts and ExperiencesFor a GUI to remain responsive, it must be able to schedule lengthy tasks to be executed asynchronously. In the traditional approach to GUI implementation--writing functions to handle individual user events--asynchronous programming easily leads to ...
Generating reactive programs for graphical user interfaces from multi-way dataflow constraint systems
GPCE '15For a GUI to remain responsive, it must be able to schedule lengthy tasks to be executed asynchronously. In the traditional approach to GUI implementation--writing functions to handle individual user events--asynchronous programming easily leads to ...
Expressing multi-way data-flow constraint systems as a commutative monoid makes many of their properties obvious
WGP '12: Proceedings of the 8th ACM SIGPLAN workshop on Generic programmingHere multi-way data-flow constraints systems are viewed as commutative monoids. A multi-way data-flow constraints system consists of a collection of constraints, each constraint being represented as a set of directed graphs. The monoid's binary ...






Comments