ACM Home Page
Please provide us with feedback. Feedback
Digital Library logoTake a look at the new version of this page: [ beta version ]. Tell us what you think.
COMFY—comfortable set of control primitives for machine language programming
Full text PdfPdf (489 KB)
Source ACM SIGPLAN Notices archive
Volume 32 ,  Issue 6  (June 1997) table of contents
Pages: 23 - 27  
Year of Publication: 1997
ISSN:0362-1340
Author
Henry G. Baker  Laboratory for Computer Science, Massachusetts Institute of Technology, Technology Square, Cambridge, MA
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 0,   Downloads (12 Months): 5,   Citation Count: 0
Additional Information:

abstract   index terms   collaborative colleagues  

Tools and Actions: Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/261353.261356
What is a DOI?

ABSTRACT

Structured programming advocates the elimination of the GOTO from the set of primitives for a computer language. Yet at the machine language level, almost all machines offer only the conditional or unconditional branch as the basic control primitive. Vaughan Pratt has suggested using instead pseudo-non-deterministic programming (as well as the COMFY name). We present a new set of machine language control primitives based on Pratt's suggestion which are simpler to implement than if-then-else and do-while and are more flexible at the same time. The machine language implementation of these primitives requires nothing more complicated than a stack; the size of the stack needed (exclusive of programmer-defined subroutine control points) is O(d), where d is the operator depth of the program. This is much less space and machine complexity than would be required for a true backtracking control structure. The user can emulate if-then-else, do-while, repeat-until, etc., with macros using these primitives if he so desires.