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

命令式语言中的局部模

Local Modules in Imperative Languages

Keehang Kwon, Daeseong Kang

摘要:

我们提出了一个概念的局部模块的命令式语言。具体地说,我们引入了一个形式为$D \supset G$的新的蕴涵语句,其中$D$是一个模块(即,一组过程声明),而$G$是一条语句。此语句告诉计算机在执行$G$的过程中将$D$添加到程序中。因此,$D$充当本地模块,并将在执行$G$后被丢弃。因此,它提供了有效的模块管理。我们通过C^{mod}来说明我们的想法,C ^{mod}是核心C的扩展,具有新语句。此外,我们描述了一种新的建设性模块语言,以提高代码重用。最后,我们描述了一个计划,大大提高了堆管理在传统的语言。

英文摘要:

We propose a notion of local modules for imperative langauges. To be specific, we introduce a new implication statement of the form $D \supset G$ where $D$ is a module (i.e., a set of procedure declarations) and $G$ is a statement. This statement tells the machine to add $D$ to the program in the course of executing $G$. Thus, $D$ acts as a local module and will be discarded after executing $G$. It therefore provides efficient module management. We illustrate our idea via C^{mod}, an extension of the core C with the new statement. In addition, we describe a new constructive module language to improve code reuse. Finally, we describe a scheme which considerably improves the heap management in traditional languages.

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

↑