×
Code Generation based on Controlled Natural Language Input

Authors

Howard Dittmer and Xiaoping Jia, DePaul University, USA

Abstract

Over time the level of abstraction embodied in programming languages has continued to grow. However, most programming languages still require programmers to conform to rigid constructs. These constructs have been implemented in the name of efficiency for the computer. The continual increase in computing power allows us to consider techniques not so limited. To this end, we have created CABERNET, a Controlled Natural Language (CNL) based approach to program creation. CABERNET allows programmers to use an outline-based syntax. Using heuristics and inference to analyze and determine the programmer's intent, this tool chain can create mobile applications. Using templates, a CABERNET application can be processed to run on multiple run-time environments. Since processing a CABERNET program file results in a native application, performance is maintained. In this paper, we compared sample applications created in Swift, SwiftUI, and CABERNET. The CABERNET implementations were consistently shorter than those produced in the other two languages. In addition, users surveyed consistently found CABERNET easier to understand.

Keywords

Controlled Natural Language, Literate Programming, Programming Language, Computer-aided Software.