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

命令式和面向对象程序设计中用户交互的有界选择语句

Bounded-Choice Statements for User Interaction in Imperative and Object-Oriented Programming

Keehang Kwon, Jeongyoon Seo, Daeseong Kang

摘要:

为命令式编程(C、Java和Android)添加多功能交互是一项重要任务。不幸的是,现有的语言只提供有限的用户交互结构。这些构建体通常以$unbounded$定量的形式存在。例如,现有的语言只能通过$read(x)/scan(x)$结构从用户处获取键盘输入。注意,在$x$可以具有任何值的意义上,$x$的值是无界的。因此,这种构造对于具有有界输入的应用程序没有用处。为了支持有界选择,我们提出了新的有界选择语句的用户交互。每个输入设备(键盘、鼠标、触摸、$...$)自然都需要一个新的有界选择语句。然而,为了使事情变得简单,我们专注于键盘的有界选择语句- kchoose-以允许用户更多地控制和更多地指导参与。很容易将我们的想法调整到其他输入设备。我们通过Java(BI)来说明我们的想法,这是核心Java的扩展,为键盘提供了一个新的有界选择语句。

英文摘要:

Adding versatile interactions to imperative programming -- C, Java and Android -- is an essential task. Unfortunately, existing languages provide only limited constructs for user interaction. These constructs are usually in the form of $unbounded$ quantification. For example, existing languages can take the keyboard input from the user only via the $read(x)/scan(x)$ construct. Note that the value of $x$ is unbounded in the sense that $x$ can have any value. This construct is thus not useful for applications with bounded inputs. To support bounded choices, we propose new bounded-choice statements for user interation. Each input device (the keyboard, the mouse, the touch, $...$) naturally requires a new bounded-choice statement. To make things simple, however, we focus on a bounded-choice statement for keyboard -- kchoose -- to allow for more controlled and more guided participation from the user. It is straightforward to adjust our idea to other input devices. We illustrate our idea via Java(BI), an extension of the core Java with a new bounded-choice statement for the keyboard.

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

↑