The design, implementation, and use of DSTutor: a tutoring system for denotational semantics

A tutoring system typically contains a domain expert, a student model, a pedagogical expert and the user interface. We will discuss the design and implementation of DSTutor, a tutoring system for denotational semantics, with particular emphasis on the development of the user interface and the domain expert. The X Window System provides powerful tools for the development of a user interface with a familiar look and feel. Prolog provides a flexible and relatively easy way to implement a domain expert. Language parsing is handled by a definite clause grammar in Prolog. DSTutor currently works with one miniIanguage, a simple imperative language, and is being adapted to a second mini-language that supports program blocks, procedures with parameters, and recursion. It has been used successfully with students in a graduate class on formal semantics for programming languages. 1. Denotational Semantics and Graduate Computer Science Education Denotational semantics is an important approach to the formal specification of programming language semantics that should be studied by every graduate student in computer science. This can be accomplished by having an entire course devoted to denotational semantics or a course on the formal specification of programming languages with denotational semantics Permissionto copy without fee all or part of this material is grantedprovidedthat the copies are not madeor distributed for direct commercialadvantage,the ACM copyright notica and the title of the publication and its date appear, and notice is given that copying is by permission of the Association for Computing Machinery. To copy otherwise, or to republish, requires a fee and/or specific permission. a ~991 ACM 0.89791-377-9/91/0002.01 69...$1.50 as a major topic. New Mexico State University follows the latter approach with a course on formal methods for programming language specification that is required for all Ph.D. students and highly recommended for Master’s level students. It follows a senior level programming language structure course. It is distinct from the compiler course and a prerequisite for more advanced courses in programming languages. Major topics in the course are a review of BNF, attribute grammars, two level grammars, denotational semantics and axiomatic semantics. The text currently used IS Formal Specification of Programming Languages: A Panoramic Primer by Frank G. Pagan[l 981]. The material on the Vienna Definition Language (VDL) is not covered while the material on denotational semantics and axiomatic semantics is supplemented from more extensive treatments, such as that given by David Schmidt [1986] for denotational semantics and by Raymond Gumb [1989] for axiomatic semantics. Only one fourth of the course is devoted to denotational semantics, so the treatment cannot be extensive. DSTutor is designed to supporl this effort and uses Pam, a mini-language used throughout Pagan’s text, to test a student’s understanding of denotational semantics. The programming languages Pam and Eva Pam is a very simple programming language that contains no declarations, no blocks, and only variables of type integer. Seven types of statements are contained in the language: read, write, if-then, if-thenelse, the iterative to-loop, a while-loop and the assignment statement. A full description of the language can b,e found in Pagan [1981]. Eva is a much richer language and includes block