# Local Modules in Imperative Languages

**Authors:** Keehang Kwon, Daeseong Kang

arXiv: 1701.05034 · 2017-10-20

## TL;DR

This paper introduces local modules for imperative languages, allowing temporary module inclusion during execution, which enhances code reuse and heap management, demonstrated through an extension of C called C^{mod}.

## Contribution

It proposes a novel local module mechanism with a new implication statement, enabling efficient, temporary module management in imperative languages.

## Key findings

- Introduced a new implication statement for local modules.
- Extended C with local modules called C^{mod}.
- Improved heap management scheme for traditional languages.

## Abstract

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.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1701.05034/full.md

## References

7 references — full list in the complete paper: https://tomesphere.com/paper/1701.05034/full.md

---
Source: https://tomesphere.com/paper/1701.05034