We present Text2App -- a framework that allows users to create functional Android applications from natural language specifications. The conventional method of source code generation tries to generate source code directly, which is impractical for creating complex software. We overcome this limitation by transforming natural language into an abstract intermediate formal language representing an application with a substantially smaller number of tokens. The intermediate formal representation is then compiled into target source codes. This abstraction of programming details allows seq2seq networks to learn complex application structures with less overhead. In order to train sequence models, we introduce a data synthesis method grounded in a human survey. We demonstrate that Text2App generalizes well to unseen combination of app components and it is capable of handling noisy natural language instructions. We explore the possibility of creating applications from highly abstract instructions by coupling our system with GPT-3 -- a large pretrained language model. We perform an extensive human evaluation and identify the capabilities and limitations of our system. The source code, a ready-to-run demo notebook, and a demo video are publicly available at \url{https://github.com/text2app/Text2App}.
翻译:我们提出Lext2App -- -- 这个框架允许用户根据自然语言规格创建功能性Android应用程序。传统的源代码生成方法试图直接生成源代码,这对于创建复杂软件来说是不切实际的。我们克服了这一限制,将自然语言转换为抽象的中间正式语言,代表了一种使用数量少得多的象征物的应用。中间正式代表形式随后被汇编成目标源代码。这种程序细节的抽象化使得后续2当量网络能够学习复杂的应用结构,而管理管理费用较少。为了培训序列模型,我们引入了基于人类调查的数据合成方法。我们证明,Lext2App将各种应用组件的无形组合很好,能够处理吵闹的自然语言指令。我们探索了将我们的系统与GPT-3 -- -- 一个大型的预先培训语言模型 -- -- 合并为高度抽象指令产生应用的可能性。我们进行了广泛的人文评估,并确定了我们系统的能力和局限性。源代码、即运行的演示笔记本和演示视频可在\url{https://github.com/text2ap/text2ext2Text2App}。