Teaching a Hierarchical Model of Computation ... - ACM Digital Library

11 downloads 5202 Views 433KB Size Report
studies that comprise about one third of a fmt course for nonmajors in computer science at our university. (Biermarm(1990a), Biermann(1990b), Biermann(1994)) ...
Teaching

a Hierarchical Model of Computation Software in the First Course

with

Animation

Alan W. Biermann, Amr F. Fahmy*, Curry Guinn, David Pennock, Dietolf Ramm, Peter WU** Department of Computer Science Duke University Durham, N.C. 27708-0129 awtxl?cs,duke.edu

●Currently at Harvard University, Cambridge, Massachusetts ●*Currently at Microsoft Corp., Menlo Park, California ON THE IMPORTANCE COMPUTER WORKS

OF TEACHING

HOW

(Biermann(1990a)) that we have developed over the past seven years. This model is detailed enough to show the system principles of operation at the four levels of abstraction. Furthermore, the design of the four levels is done carefully enough so that they all function together to give the student a complete view of the hierarchy. We are now implementing the full model in a software system that will animate all levels for visualization in course lectures and laboratories. Our automated system is called “this is how a computer wodw” and some of its details aredescribed below.

A

In a world saturated with computers, it is that the popnlace have some understanding of what thesedevices am, how they work, what they can do, and what they cannot do. People will not intelligently live with machines if they regard them as indistinguishable from magic. In fact, many authors (Brookshear(1988), Schaffer(1988), Tucker (1992)) have called for &eased breadth in the early computer science courses specifically to better educate nonmajors who may never take another computer course and to give important

perspective to majors who are looking forward to a series of specialized courses. In the education of majors, many recent committees and writers have argued for kreased breadth in the early courses including Denning et al. (1989), the ACIWIEEE-CS Joint Curriculum Task Force (1991), and Barker et al (1992). This paper describesthe hardwaresofhvare studies that comprise about one third of a fmt course for nonmajors in computer science at our university. (Biermarm(1990a), Biermann(1990b), Biermann(1994)). ‘I%epurpose of the studies is to teach students the fundamental mechanisms across four levels of abstraction that enable machines to function. The levels are (1) the language translator, (2) the machine architecture at the assembly language level, (3) the switching circuit implementation of the architecture, and(4) the VLSI circuitry. The goal is to enable students to understand the mechanisms of computation throughout the hieramhy beginning with a higher level language (Pascal in this case) continuing through translation and execution phases down to the electrons in the semiconductor chip. The study is made possible through the use of a simple idcatized model of a computing system Permission to copy without fee all or part of this material is granted provided that the copies aro not made or distributed for direct commercial advantage, the ACM copyright notice end the title of the publication and its date appear, and notice ia givan that copying ia by permission of the Association for Computing Machinery. To copy otherwise, or to republish, requires a farr endfor specific porrnkion. SIGSCE 94- 3/94, Phoenix Ariz~USA @

1994 ACM e-S9791 .&t&&94moo3..$S.5o

295

Students who complete this approximately four week seriesof studies gain both detailed knowledge of the mechanisms at the four levels and an overview of how computation is done. The benefits are many For example, they learn why machines can process m,uny languages and why higher level languages have higher execution times than assembly language. They will also km that they can themselves invent a language and have a translator built for their language. They understand the fetch-execute cycle and its ultimate role in executing the higher level language. They will thus understand in concept the heart of all contemporary digital machines, and be able to comment, for example, on the ofterlclaimed “intelligence” of machines. They learn hc}w computational mechanisms can be assembled from electrical components and the many characteristics that machines have becauseof their construction. As nn illustration, they see the importance of making circuits smaller so that they can be fasteu but components cannot be shrunk arbitrarily which means that one is forced to consider distributed compMing models. There are endless examples of real world situations -- computer viruses, softwme calamities, computer security failures, artificial intelligence de&ion makers, and more -- where knowledge of computing principles is essential for understanding the world around us.

THE

COMPILER

LEVEL

Students in the introductory course are net able to understand all of the complexities of a compiler. However, they nead to understand what a compiler is and approximately how it works. Thus they will fmd it extremely useful and satisfying to seeits essential

mechanisms in doing a translation. In our course, we have found a method for teaching these things in two or three lectures. This section will briefly describe the method. First, our students enter this part of the course with an understanding of syntactic generation rules and their use in generating Pascal programs. This is taught in the Pascal portion of the course, the fmt several weeks, and it is used to help them understand the form of correct syntax. For example, an assignment statement is represent by