arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1504.02001cs.SE
收藏

通过生成语言约束应用程序行为

Constraining application behaviour by generating languages

Paul van der Walt

摘要:

为强制执行操作约束的响应式应用程序编写平台是困难的,并且已经以各种方式进行了处理。在这份经验报告中,我们详细介绍了一种使用嵌入式DSL的方法,该方法可用于指定给定应用程序域中程序的结构和权限。一旦开发人员指定了应用程序将由哪些组件组成,以及每个组件需要哪些权限,规范本身将评估为一种新的、定制的语言。应用程序的最终实现然后在这个专门的环境中编写,其中与已授予的权限相关联的API调用是可用的。我们的原型平台的目标领域的移动计算,并使用Racket实现。它演示了资源访问控制(例如,照相机、地址簿等)并试图防止私人数据的泄露。Racket被证明是设计新的程序设计语言及其运行时库的一个非常有效的平台。我们证明,这种方法允许重用的组件间通信层,是方便的应用程序开发人员,因为它提供了高层次的构建块结构的应用程序,并提供了更多的控制平台所有者,防止某些类的错误由开发人员。

英文摘要:

Writing a platform for reactive applications which enforces operational constraints is difficult, and has been approached in various ways. In this experience report, we detail an approach using an embedded DSL which can be used to specify the structure and permissions of a program in a given application domain. Once the developer has specified which components an application will consist of, and which permissions each one needs, the specification itself evaluates to a new, tailored, language. The final implementation of the application is then written in this specialised environment where precisely the API calls associated with the permissions which have been granted, are made available. Our prototype platform targets the domain of mobile computing, and is implemented using Racket. It demonstrates resource access control (e.g., camera, address book, etc.) and tries to prevent leaking of private data. Racket is shown to be an extremely effective platform for designing new programming languages and their run-time libraries. We demonstrate that this approach allows reuse of an inter-component communication layer, is convenient for the application developer because it provides high-level building blocks to structure the application, and provides increased control to the platform owner, preventing certain classes of errors by the developer.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑