Synthesizing Layout Engines From Relational Specifications

We develop algorithms for expressing, verifying and implementing document layout languages. To simplify specification and enable reuse of components, we use relational specifications. Relying on relations, rather than on functions, we free the designer from having to reason about the mechanics of how the layout will be computed. We verify layout languages by proving that all documents in the language will have unambiguous layout. To ease implementation of layout languages, we synthesize a fast propagation layout engine. Our approach relies on recent work for synthesizing functions from relations. We extend the work by making the synthesizer modular, improving scalability when the relational constraint system is naturally modular. We show empirically that layout languages are modular, but our modular synthesizer may be applicable also in other domains. We validate the algorithms on three case studies.

[1]  Sanjit A. Seshia,et al.  Combinatorial sketching for finite programs , 2006, ASPLOS XII.

[2]  John H. Maloney Using constraints for user interface construction , 1992 .

[3]  L. D. Moura,et al.  The YICES SMT Solver , 2006 .

[4]  Catherine Lassez,et al.  A linear constraint technology for interactive graphic systems , 1992 .

[5]  Louis Weitzman,et al.  Relational grammars for interactive design , 1993, Proceedings 1993 IEEE Symposium on Visual Languages.

[6]  Nikolaj Bjørner,et al.  Z3: An Efficient SMT Solver , 2008, TACAS.

[7]  Michael Sannella Skyblue: a multi-way local propagation constraint solver for user interface construction , 1994, UIST '94.

[8]  David Salesin,et al.  Adaptive layout for dynamically aggregated documents , 2008, IUI '08.

[9]  Bjørn N. Freeman-Benson Converting an existing user interface to use constraints , 1993, UIST '93.

[10]  Peter J. Stuckey,et al.  The Cassowary linear arithmetic constraint solving algorithm , 2001, TCHI.

[11]  Ruzica Piskac,et al.  Complete functional synthesis , 2010, PLDI '10.

[12]  Giorgio Gallo,et al.  Directed Hypergraphs and Applications , 1993, Discret. Appl. Math..

[13]  Peter J. Stuckey,et al.  Constraint cascading style sheets for the Web , 1999, UIST '99.

[14]  Brad A. Myers,et al.  Creating user interfaces by demonstration , 1988 .

[15]  Krzysztof R. Apt,et al.  Constraint logic programming using Eclipse , 2007 .

[16]  Krzysztof R. Apt,et al.  Principles of constraint programming , 2003 .

[17]  David Salesin,et al.  Adaptive grid-based document layout , 2003, ACM Trans. Graph..

[18]  Alan Borning,et al.  Constraint-based document layout for the Web , 2000, Multimedia Systems.