Title
Synthesis of layout engines from relational constraints
Abstract
We present an algorithm for synthesizing efficient document layout engines from compact relational specifications. These specifications are compact in that a single specification can produce multiple engines, each for a distinct layout situation, i.e., a different combination of known vs. unknown attributes. Technically, our specifications are relational attribute grammars, while our engines are functional attribute grammars. By synthesizing functions from relational constraints, we obviate the need for constraint solving at runtime, because functional attribute grammars can be easily evaluated according to a fixed schedule, sidestepping the backtracking search performed by constraint solvers. Our experiments show that we can generate layout engines for non-trivial data visualizations, and that our synthesized engines are between 39- and 200-times faster than general-purpose constraint solvers. Relational specifications of layout give rise to synthesis problems that have previously proved intractable. Our algorithm exploits the hierarchical, grammar-based structure of the specification, decomposing the specification into smaller subproblems, which can be tackled with off-the-shelf synthesis procedures. The new synthesis problem then becomes the composition of the functions thus generated into a correct attribute grammar, which might be recursive. We show how to solve this problem by efficient reduction to an SMT problem.
Year
DOI
Venue
2015
10.1145/2814270.2814291
Conference on Object-Oriented Programming Systems, Languages, and Applications
Keywords
Field
DocType
Attribute Grammars,Layout,Program Synthesis
Rule-based machine translation,Attribute grammar,Data visualization,Programming language,L-attributed grammar,Program synthesis,Computer science,Theoretical computer science,Grammar,Backtracking,Recursion
Conference
Volume
Issue
ISSN
50
10
0362-1340
Citations 
PageRank 
References 
3
0.42
21
Authors
2
Name
Order
Citations
PageRank
Thibaud Hottelier11419.16
Rastislav Bodík21625101.21