Stack Computers: the new wave © Copyright 1989, Philip Koopman, All Rights Reserved.

Chapter 9. The Future of Stack Computers


9.6 THE IMPACT OF STACK MACHINES ON COMPUTING

We have seen that stack machines can be at least as fast as register-based machines in terms of raw instructions executed per second. They also display superior characteristics in real time control applications. Still, they can fall short of register-based machines in environments that use many local variables in programs with little use of nested procedure calls. The question of whether RISC, CISC, or stack machines are best is not an appropriate query. All of these design techniques have their place among different applications. Stack machines do not seem to be best suited as primary CPUs for the workstation and minicomputer markets. For this reason, they may receive less attention than they perhaps deserve. But, in those areas where they are well suited, they are here to stay.

On second thought, we may speculate that the problem in supporting some sorts of computing tasks is not with the stack machines, but rather with current programming practices. Consider the kinds of programs that stack machines are well suited for: highly modular programs with many small, deeply nested procedures; programs that pass a small number of variables between procedures, hiding the details of their operation; programs that frequently reuse these small procedures to reduce program size and complexity; programs that are easily debugged because of small procedure size; and programs which present a uniform level of interface at all levels of module abstraction, from high level subroutines to instructions. All these characteristics seem desirable. Unfortunately, they are seldom practiced today. Perhaps the use of stack machines can help improve the situation.

It may be that deep seated knowledge of the strong points of register-based machines has formed the characteristics conventional programming languages and hardware we use. Procedure calls are not used frequently because they are time consuming. Because procedures are somewhat long, language syntax has not been forced to make them extremely simple to define and use, so they require various amounts of specification code, parameter lists, typing information, and the like. Even project management styles can require separate paperwork and formal procedures each time a new subroutine is created. And, because using many small procedures has been made more difficult by small degrees, less procedures are used, fueling the cycle.

Stack machines present an opportunity to change this cycle. Procedures calls are extremely inexpensive. Languages such as Forth provide a minimum of overhead for defining new procedures, and actually provide an environment which encourages development and testing of modularized, easily tested code. What may be needed is a design of new programming languages that are well suited to high level language machines (Chen et al. 1980), and to stack machines in particular. What we may see happen are extensions and variations on traditional languages to incorporate control structures that better exploit stack machine hardware.

Register-based machines can offer performance rewards for poorly structured programs, often at the cost of harder maintenance, more difficult debugging, and increased program size. By rewarding programmers for writing well structured code, stack machines may encourage better programming practices. This in turn, may influence the evolution paths of conventional languages toward providing better means for creating, maintaining, and executing programs.


CONTENTS TOP CHAPTER PREV NEXT NEXT SECTION

HOME Phil Koopman -- koopman@cmu.edu