𝔖 Bobbio Scriptorium
✦   LIBER   ✦

Implementing generalized operator overloading

✍ Scribed by William S. Miles; Leroy F. Johnson


Publisher
John Wiley and Sons
Year
1998
Tongue
English
Weight
234 KB
Volume
28
Category
Article
ISSN
0038-0644

No coin nor oath required. For personal study only.

✦ Synopsis


This paper presents a practical method of adding problem-specific notation to an established computer language. Our idea is to use unrestricted operator overloading as a tool to map the problem domain notation directly into an existing programming language.

Our method introduces new operator symbols and function names into a host language by overloading existing usage. We extend the host programming language syntax to an augmented language which is mapped to the host language by a programmable preprocessor. The preprocessor uses a programmer-modifiable symbolic language grammar to translate an augmented program into a standard program. This process gives a natural extension to any computer language without modifying the host language. Direct use of problem notation can improve program legibility and code comprehension within the problem domain. The preprocessor provides a useful research tool for exploring language issues without the need to write a compiler for a new language. It can also be used to provide a domain specific language for a programming group at lower cost than new language development. This paper presents several working examples which illustrate our work. We redefine many of the standard C operators to alleviate some of the more common programming errors, thus creating a 'cleaner' C. As a more esoteric example, we encode a subset of APL vector operators as an algebraic extension to the C language. A curious application of our method shows its success in an arbitrary problem domain by compiling and executing poetry. Our final example introduces standard symbolic logic notation into C for tautology verification.


πŸ“œ SIMILAR VOLUMES


A generalized OWA operator
✍ P. A. Schaefer; H. B. Mitchell πŸ“‚ Article πŸ“… 1999 πŸ› John Wiley and Sons 🌐 English βš– 162 KB

†Generally we denote arguments in the input lists using the subscripts i or j, e

cover
✍ White, James πŸ“‚ Fiction πŸ“… 2001;2013 πŸ› Tor Books;Tom Doherty Associates 🌐 English βš– 344 KB πŸ‘ 2 views

Sector General: A massive deep-space hospital station on the Galactic Rim, where human and alien medicine meet. Its 384 levels and thousands of staff members are supposedly able to meet the needs of any conceivable alien patient--though that capacity is always being strained as more (and stranger) a

cover
✍ White, James πŸ“‚ Fiction πŸ“… 2011;2013 πŸ› Tom Doherty Associates 🌐 English βš– 343 KB πŸ‘ 2 views

Sector General: A massive deep-space hospital station on the Galactic Rim, where human and alien medicine meet. Its 384 levels and thousands of staff members are supposedly able to meet the needs of any conceivable alien patient--though that capacity is always being strained as more (and stranger) a

Challenges in designing, implementing an
✍ Lisa-Henri Kirkland; Dixon Thompson πŸ“‚ Article πŸ“… 1999 πŸ› John Wiley and Sons 🌐 English βš– 274 KB

Introducing an effective environmental management system (EMS) to an organization is a complex process. This complexity is belied by current EMS models that concentrate on EMS frameworks and components, and present a relatively simple approach to the process, especially the introduction and implemen