[PL] Programming Languages
The Programming Language Knowledge Area Focus Group was formed less than two weeks before this report was due, so the report presented here is preliminary. We have had extensive discussion of the topics included here, but wish to present our ideas to a larger group of programming languages experts to get feedback on our ideas. We began with the knowledge units of CC '91, but made extensive changes to update the material and change the balance of material.
Contributing members of this knowledge area focus group are Kim Bruce (Williams College), Benjamin Goldberg (NYU), Chris Haynes (Indiana U.), Gary Leavens (Iowa State U.), and John Mitchell (Stanford U.).
The main changes of this report from CC '91 are
Shifting logic programming from core to an intermediate or advanced topic (we have not yet included a KU for this, however, as we have only focussed on those topics having core material).
Significantly cutting back the material on automata, regular expressions, and context-free grammars to the material most needed for programming languages. We anticipate that some of the material omitted here will be picked up in the algorithms [AL] or foundations [FO] KU's.
Increasing the attention to modules and information hiding.
Including more detail in most knowledge units, esp. those involving object-oriented languages.
Rearranging and reordering KU's to increase their coherence.
The changes we have made resulted in a decrease of roughly 11 hours from the KU's specified in CC '91.
We have included mainly core and intermediate level topics in the KU's. A few advanced topics occur, but we made no attempt to be complete in these (for instance we do not yet have the intermediate / advanced KU's necessary to support a compiler course). We did label the sections of each KU that belong in each category. The following is a short listing of the KU topics:
PL1: History and Overview of Programming Languages (1.5/.5)
PL2: Virtual Machines (1)
PL3: Formal Languages and Language Analysis (1.5/.5)
PL4: Language Translation Systems (1.5/1/1)
PL5: Types (5/0/1)
PL6: Control of execution (3/1)
PL7: Declarations and Modules (5)
PL8: Run-time Storage Management (3)
PL9: Programming Language Semantics (2/0/3)
PL10: Functional Programming Paradigms (5)
PL11: Object-Oriented Programming Paradigm (4/0/1)
PL12: Distributed and Parallel Programming Constructs (3/2/2)
The numbers after each KU titles are the number of hours devoted to the KU. If there is only a single number then all topics are at the core level. If there are multiple numbers then the first represents core hours, the second represents intermediate, and the last (if present) represents advanced hours. We were inconsistent in listing intermediate and advanced topics (and in fact weeded out most advanced topics). Most remaining are there because they were felt by at least one member of the committee to be a candidate for moving to a stronger requirement.
We included justification for most of the KU's, but because of a lack of time, were not able to include them for all KU's. We will add these later. We also hope to have the benefit of comments from a wider group by the time we prepare the next version of this report.
The three processes of theory, abstraction, and design are well represented here. PL3 (formal languages) and PL9 (formal semantics) provide the strongest representation of theory in the curriculum, though aspects of theory also show up in discussions of type checking in PL5. Abstraction is very well represented in these KU's as programming languages provide abstractions for controlling computations and the representation of information. PL2 (Virtual machines), PL5 (types), PL6 (Control of Execution), PL7 (Declarations and Modules), as well as sections of PL10 (Functional Paradigm), PL11 (Object-oriented Paradigm) all present a heavy dose of abstraction. Design shows up in examination of trade-offs in choosing language constructs as well as PL4 (Language Translation Systems), PL8 (Run-time Storage Management), and PL12 (Distributed and Parallel Programming Constructs). Design also shows up in discussions of various programming language paradigms.
The knowledge units presented here do not have any explicit requirements for mathematics and physical sciences, though we expect that discrete mathematics will be important for the prerequisites of many topics. We have not yet prepared model courses with these KU's. We have not yet completely fixed the lists of prerequisites and requisites, so many will be revised later.
As a last thought before presenting the programming language knowledge units: We note that examination of the use of programming languages over the last 30 to 40 years has made it absolutely clear that trends in programming language usage change dramatically over time. Mainstream languages have moved from FORTRAN and COBOL in the 60's to PL/I, Pascal and C in the '70's (and beyond for the last two) to Smalltalk and C++ in the '80's (and beyond) to Java in the '90's - and that is ignoring large programming subcultures using languages like LISP/Scheme, APL, PROLOG, ML, Visual Basic, Perl, etc. Clearly no programmer can expect to use the same language or even the same language family/paradigm during her career. An understanding of the core concepts of programming languages and different programming language paradigms will better enable programmers to keep up with language changes that will occur over their careers.
PL1: History and Overview of Programming Languages (1.5/.5)
A brief historical survey of major early developments in programming languages, beginning with the evolution of procedural high-level languages. An overview of contemporary programming paradigms and their related languages, including procedural, object-oriented, functional, logic, and parallel programming. Language families and trends.
Recurring Concepts: evolution, conceptual and formal models, complexity of large problems, efficiency, tradeoffs and consequences, levels of abstraction, security
Core Lecture Topics: (One and a half hours minimum)
Intermediate Lecture Topics (half hour minimum)
Justification for core sections
The core sections of this KU present the student with an historical perspective on the evolution of the important modern programming languages in the commercial and academic arenas. Of particular importance is the emphasis on identifying families of programming languages and their relationships. This facilitates the student being able to identify substantial similarities among languages in a family, aiding in the student's learning of new languages in a given paradigm (e.g. C++ and Java).
Prerequisites: PF
PL2: Virtual Machines (1)
Actual vs. virtual computers. The understanding of programming languages in terms of the corresponding virtual machines (regardless of the actual architecture on which they run). Language translation understood conceptually as an implementation on a virtual machine, followed by a sequence of translations to simpler core languages through a hierarchy of virtual computers.
Recurring Concepts: binding, conceptual and formal models, levels of abstraction.
Core Lecture Topics: (one hour minimum)
Justification for core sections
This unit is important because emphasizes to the student the architectural independence of good programming language design. Using a virtual machine, or a hierarchy of virtual machines, language features - even the implementation of these features - can be compared and evaluated using a machine model that is substantially simpler than actual processors. This greatly facilitates the understanding of the dynamic behavior of a program and proving properties about such behavior. In certain cases, the use of a virtual machine, such as the Java Virtual Machine, facilitates implementations across a wide range of physical machines.
Prerequisites:
PL3: Formal Languages and Language Analysis (1.5/.5)
Application of regular expressions and context free languages as formal descriptions of language syntax and their use in programming language analysis.
Recurring Concepts: conceptual and formal models, levels of abstraction
Core Lecture Topics: (one and a half hour minimum)
Intermediate Lecture Topics: (one half hour minimum)
Justification for core sections
The student should be made aware of how the syntax of a programming language is formally specified, thus enabling the programming language designer to communicate the language syntax to the users and language implementers. Being able to comprehend regular expressions and grammars, such as the Backus-Naur Form (BNF), is crucial for any programmer attempting to learn a new language. Furthermore, the students should understand that there exists a direct relationship between the formal specification of syntax and the structures created by the compiler during parsing. This provides the foundation for automatic generation of lexers and parsers in modern compilers.
Prerequisites: AL5
PL4: Language Translation Systems (1.5/1/1)
An overview of the language translation process, encompassing the range from compilers to interpreters. The focus is on the architecture of compilers.
Recurring Concepts: binding, conceptual and formal models, consistency and completeness, levels of abstraction, ordering in space, ordering in time, efficiency, tradeoffs and consequences
Core Lecture Topics: (one and a half hour minimum)
Intermediate Lecture Topics (one hour minimum)
Advanced Lecture Topics (one hour minimum)
Justification for core sections
The core components of this unit present an overview of how languages are implemented. Although the precise algorithms used in compilers and interpreters can be considered more advanced topics, it is critical that the student understand how the various aspects of a language, such the syntax, type system, etc., correspond to components of the implementation, such as the parser, type checker, etc. Without this view, the student will be unable to understand the extent to which decisions made by the language designer have an effect on the implementation of the language.
Suggested Laboratories:
Prerequisites: AL6, AR3, PL2, PL3
PL5: Types (5/0/1)
Models and descriptions of data. Elementary and structured data types. Type checking and type inference. Polymorphism. User-defined and abstract data types.
Recurring Concepts: binding, security, efficiency, tradeoffs and consequences, reuse, conceptual and formal models, levels of abstraction, ordering in space.
Core Lecture Topics: (five hours minimum)
Advanced Lecture Topics (one hour minimum)
Justification for core sections
Progress in type systems is at the core of many advances in programming languages. Types are an important source of abstraction in helping the programmer think about problems in a higher-level way. Advances in type-checking have made the use of stricter type systems a greater help without the cost in expressiveness of older systems. Topics of structural vs. name equivalence of types, parametric polymorphism, and subtype polymorphism are issues that programmers need to understand in working with modern programming languages.
Suggested Laboratories:
Prerequisites: PF2, PF3, PF5, PL2
PL6: Control of execution (3/1)
Flow of control associated with evaluating expressions and executing statements. User-defined expressions and statements.
Recurring Concepts: levels of abstraction, ordering in time, security, efficiency, tradeoffs and consequences.
Core Lecture Topics: (three hours minimum)
Intermediate Lecture Topics: (1 hour minimum)
Justification for core sections
This KU covers basic components of programming languages, emphasizing subtle or difficult issues that may cause problems for programmers. For example, issues of underspecified evaluation order in expressions with side effects have caused serious difficulties in programs. Most of the standard expressions and statements will be covered only in passing, emphasis will be on the use of programmer created abstractions (functions, procedures, and iterators) and especially newer or more unfamiliar constructs like iterators and exception handlers that are important parts of common modern languages.
Prerequisites: PL2
PL7: Declarations and Modules (5)
Methods of sharing and restricting access to information in programming languages.
Recurring Concepts: binding, complexity of large problems, levels of abstraction, ordering in space, security, reuse, and evolution.
Core Lecture Topics: (five hours minimum)
Justification for core sections
Declaration and scoping issues and problems need to be understood by programmer in order to understand when names are visible and objects they refer to are accessible. Understanding parameter passing modes is essential in order to understand the difference between, for example, parameter passing in Java, Pascal/Ada, and C or C++. Languages like C and Java offer only one parameter passing mode, but other languages offer different or multiple modes. Programmers need to understand the differences between these to avoid confusion. Finally, with the increasing importance of libraries and the general concept of code reuse, a deeper understanding of the purpose of modules and current manifestations of them in programming languages is essential. In particular, information hiding as a way of forming abstraction barriers is key to enabling reuse.
Suggested Laboratories:
Prerequisites: PL2, PL5
PL8: Run-time Storage Management (3)
Allocation, recovery, and reuse of storage during program execution.
Recurring Concepts: binding, levels of abstraction, ordering in space, reuse, security.
Core Lecture Topics: (three hours minimum)
Justification for core sections
These sections are critical for having the student understand the effect of language design on implementation, as well as the effect of programming techniques on efficiency and memory usage. With the advent of the first truly popular garbage collected language, Java, it is increasingly important for the student to understand the implementation issues and program correctness issues (explicit vs. automatic allocation/deallocation) involved in choosing a language based on a particular memory allocation/deallocation model.
Prerequisites: PF4, PF5, PL2
PL9: Programming Language Semantics (2/0/3)
Use of formal and informal models to describe programming language semantics.
Recurring concepts: conceptual and formal models, levels of abstraction.
Core Lecture Topics: (2 hours minimum)
Advanced Lecture Topics: (3 hours minimum)
Justification for core sections
Students need to know how languages are defined so that they can read language reference manuals, and so that they can more quickly learn new languages. Students are also likely to design something resembling a programming language eventually (such as a class library or user interface extension mechanism), and thus should know how they can do this carefully. Operational semantics is the easiest formalism to teach in this area, and also applies most easily to concurrent programming.
Suggested Laboratories:
Prerequisites: PL2, PL3, PL6
PL10: Functional Programming Paradigms (5)
The functional programming paradigm. Advantages and disadvantages. Recursion over recursive data structures. Functions as data. Amortized complexity.
Recurring Concepts: conceptual and formal models, levels of abstraction, trade-offs and consequences, efficiency, reuse, security
Core Lecture Topics: (5 hours minimum)
Justification for core sections
Functional programming is the main competing alternative to imperative programming. It is important both as a technique that is useful for doing certain kinds of work (e.g., prototyping language designs), and as a connection to other parts of computing. For example, functional programming techniques are used in program specification, theorem proving, and are directly related to mathematics. Moreover, functional programming is important because it teaches students new ways to think about programming, and gives them ideas on how to combine and abstract program parts that are very difficult to see in other paradigms. Recursion is a fundamental technique for functional programming, since it corresponds to recursively described data. The pragmatic features are important for students to understand how to write programs in a functional style (which is important for learning how to specify programs, for example). Knowing something about efficiency in a functional setting prevents students from using these techniques inappropriately, ties the subject to data structure and algorithm analysis, and helps students see the fundamental tradeoffs. The use of higher-order functions is the definition of this style, and important for abstraction and reuse.
Suggested Laboratories:
Prerequisites: PF4, PF5, PL2
PL11: Object-Oriented Programming Paradigm (4/0/1)
The Object-Oriented (OO) paradigm. Advantages and disadvantages. Types, classes and objects; subtyping and inheritance. Type checking.
Recurring Concepts: conceptual and formal models, levels of abstraction, trade-offs and consequences, reuse, security
Core Lecture Topics: (4 hours minimum)
Advanced Lecture Topics: (1 hour minimum)
Justification for core sections
Object-oriented programming and object-oriented languages represent the main stream of programming, and programming language design. They also raise many interesting and confusing issues, which need to be discussed in relation to programming languages. Understanding of the basic terms and semantics of such languages is thus fundamental for practical programming, maintenance, and for further language design. Methods and inheritance, which define the object-oriented paradigm, are the key aspects of this understanding.
Suggested Laboratories:
Prerequisites: PF6, PL2, PL5.
PL12: Distributed and Parallel Programming Constructs (3/2/2)
Description of alternative realizations of parallel and distributed programming constructs.
Recurring Concepts: conceptual and formal models, consistency and completeness, efficiency, levels of abstraction.
Core Lecture Topics: (3 hours minimum)
Intermediate Lecture Topics: (2 hours minimum)
Advanced Lecture Topics: (two hours minimum)
Justification for core sections
Parallel and distributed programming are becoming quite common; for example, Java includes a locks and constructs that allow one to program monitors, and the Java Jini and RPC mechanisms allow one to do RPC. Most programming for window systems involves threads. Even businesses are using distributed programming extensively in CORBA and client-server contexts. Thus it is crucial that students see and understand the basic mechanisms found in such contexts: remote procedure calls (RPC) and monitors.
Suggested Laboratories:
Prerequisites: PF7, PL6