5 research outputs found
Macros That Work
9 pagesThis paper describes a modified form of Kohlbecker's algorithm
for reliably hygienic (capture-free) macro expansion
in block-structured languages, where macros are source-tos-ource
transformations specified using a high-level pattern
language. Unlike previous algorithms, the modified algorithm
runs in linear instead of quadratic time, copies few
constants, does not assume that syntactic keywords ( e.g. if)
are reserved words, and allows local (scoped) macros to refer
to lexical variables in a referentially transparent manner.
Syntactic closures have been advanced as an alternative
to hygienic macro expansion. The problem with syntactic
closures is that they are inherently low-level and therefore
difficult to use correctly, especially when syntactic keywords
are not reserved. It is impossible to construct a pattern-based,
automatically hygienic macro system on top of syntactic
closures because the pattern interpreter must be able
to determine the syntactic role of an identifier (in order to
close it in the correct syntactic environment) before macro
expansion has made that role apparent.
may be viewed as a book-keeping
technique for deferring such decisions until macro expansion
is locally complete. Building on that insight, this paper unifies
and extends the competing paradigms of hygienic macro
expansion and syntactic closures to obtain an algorithm that
combines the benefits of both .
Several prototypes of a complete macro system for
Scheme have been based on the algorithm presented here
Recent Developments and Future Directions in Lisp-Stat
1 online resource (PDF, 16 pages
DRAFT : Task System and Item Architecture (TSIA)
During its execution, a task is independent of all other tasks. For an
application which executes in terms of tasks, the application definition can be
free of the details of the execution. Many projects have demonstrated that a
task system (TS) can provide such an application with a parallel, distributed,
heterogeneous, adaptive, dynamic, real-time, interactive, reliable, secure or
other execution. A task consists of items and thus the application is defined
in terms of items. An item architecture (IA) can support arrays, routines and
other structures of items, thus allowing for a structured application
definition. Taking properties from many projects, the support can extend
through to currying, application defined types, conditional items, streams and
other definition elements. A task system and item architecture (TSIA) thus
promises unprecedented levels of support for application execution and
definition.Comment: vii+244 pages, including 126 figures of diagrams and code examples.
Submitted to Springer Verlag. For further information see http://www.tsia.or
A Module System for Scheme
This paper presents a module system designed for largescale programming in Scheme. The module system separates specifications of objects from their implementations, permitting the separate development, compilation, and testing of modules. The module system also includes a robust macro facility