Robust Relational Layout Synthesis from Examples for Android

被引:12
作者
Bielik, Pavol [1 ]
Fischer, Marc [1 ]
Vechev, Martin [1 ]
机构
[1] Swiss Fed Inst Technol, Dept Comp Sci, Zurich, Switzerland
来源
PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL | 2018年 / 2卷
基金
欧盟地平线“2020”;
关键词
Program synthesis; Programming by example; Relational layouts; Probabilistic models; User interface design; User interface errors;
D O I
10.1145/3276526
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We present a novel approach for synthesizing robust relational layouts from examples. Given an application design consisting of a set of views and their location on the screen, we synthesize a relational layout that when rendered, places the components at that same location. We present an end-to-end system, called INFERUI, that addresses the above challenge in the context of Android. The system is based on the following technical contributions: (i) a formalization of the latest and most efficient ConstraintLayout class, capturing a rich set of relational constraints, (ii) a set of robustness properties designed to prevent common layout generalization errors, (iii) a synthesis algorithm that produces relational layouts that generalize across multiple screen sizes and resolutions, and (iv) a probabilistic model of constraints that guides the synthesizer towards layouts preferred by developers. Our evaluation shows that INFERUI is practically effective: it successfully synthesizes real world complex layouts obtained from top 500 GitHub and top 500 Google Play Store applications, succeeds in 100% of the cases when synthesizing layouts for a single device, and correctly generalizes 92% of the views across multiple devices, all without requiring additional specifications.
引用
收藏
页数:29
相关论文
共 37 条
  • [1] Alemi AA, 2016, ADV NEUR IN, V29
  • [2] A Survey of Machine Learning for Big Code and Naturalness
    Allamanis, Miltiadis
    Barr, Earl T.
    Devanbu, Premkumar
    Sutton, Charles
    [J]. ACM COMPUTING SURVEYS, 2018, 51 (04)
  • [3] Suggesting Accurate Method and Class Names
    Allamanis, Miltiadis
    Barr, Earl T.
    Bird, Christian
    Sutton, Charles
    [J]. 2015 10TH JOINT MEETING OF THE EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND THE ACM SIGSOFT SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING (ESEC/FSE 2015) PROCEEDINGS, 2015, : 38 - 49
  • [4] Amigo, 2018, AM
  • [5] [Anonymous], 2016, ADV NEURAL INFORM PR
  • [6] Asobimasu, 2018, AS
  • [7] Balog M., 2017, INT C LEARN REPR ICL
  • [8] pix2code: Generating Code from a Graphical User Interface Screenshot
    Beltramelli, Tony
    [J]. PROCEEDINGS OF THE ACM SIGCHI SYMPOSIUM ON ENGINEERING INTERACTIVE COMPUTING SYSTEMS (EICS'18), 2018,
  • [9] Bielik P, 2016, PR MACH LEARN RES, V48
  • [10] Candid, 2018, CAND