paper

Local Modules in Imperative Languages

arXiv:1701.05034

Abstract

We propose a notion of local modules for imperative langauges. To be specific, we introduce a new implication statement of the form where is a module (i.e., a set of procedure declarations) and is a statement. This statement tells the machine to add to the program in the course of executing . Thus, acts as a local module and will be discarded after executing . 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.

arXiv comment5 pages. A high-level statement for allocating and deallocating heap objects is described and a constructive module language is also described