A panel dedicated to the teaching of Logic and Constraint Logic Programming took place on December 13th, 2003, during the 19th International Conference on Logic Programming in Mumbai, India.
The panel was organized to discuss and investigate methodologies and approaches to teach Logic and Constraint Logic Programming to Computer Science students. There is a clear understanding within the community of the power and potential of the Logic and Constraint Logic Programming paradigm, and well-designed educational programs can contribute to a more effective dissemination of this technology. The objective of the panel was to discuss current practices in the teaching of Logic Programming and to identify motivation, content, and organization of a curriculum that provides adequate access to logic programming technology.
The panel has been divided into two parts. The first part (one hour long) was dedicated to presentantions by the six invited panelists. Each panelist introduced her/his current experience in teaching Logic Programming and their personal view of the best practices to introduce Logic Programming to undergraduate Computer Science students. The second part (one hour long) provided an open forum of discussion, where members of the audience intervened with one-slide of comments, remarks, and suggestions--leading to a very well attended and lively discussion.
The messages provided by the six panelists can be summarized as follows:
Mireille's Ideal LP Curriculum relies on a better balance between theory and practice, with emphasis on large projects in (C)LP and in using (C)LP in traditional CS courses. CLP is not a simple paradigm and it does require significant effort on the part of the student--thus, the curriculum should allow for sufficient space and time to teach it. An additional aspect that may help is the development of a simpler flavor of Logic Programming than Prolog, with fewer ``hidden'' constructs (e.g., cut).
For Gopal, the Ideal Curriculum should introduce LP as part of a general programming language course and the develop it through a dedicate LP course, which starts with the use of LP as a purely relational language (e.g., Datalog) and later develops it into full-blown Prolog (i.e., backtracking, reversability, etc.). Gopal concluded his presentation with some important remarks. LP is widely perceived (especially in the US) as a ``failed language'' and there is a strong lack of awareness of its power. Students can be led to appreciate the power of LP through well-directed courses, especially using the motivation of cool and successful applications. He also encouraged to focus educational programs on the foundations of LP first, delaying more advanced concepts (e.g., CLP) until the basic concepts are properly mastered by the students.
In his ideal curriculum, Manuel stressed the importance to push LP as a useful tool in other courses (e.g., compilers, artificial intelligence). The focus in teaching logic programming should be initially on the pure aspects of the language (preferably taught using a tabling or a system that allows breadth-first search) and only in a second stage standard Prolog can be introduces (and depth-first used as a way to achieve efficiency). Manuel's final remarks stressed the importance of bringing to the attention of the students the success stories of LP and its practical applications, with lots of emphasis on practical uses, programming projects. The final message is that LP is a powerful and difficult tool to be used by smart people for difficult problems.
Ulf's proposal for an improved curriculum for teaching CLP relies on establishing more solid ties between CLP and key application domains; in particular CLP in the context of software engineering (e.g., CLP for modeling--in connection with UML, and for specification and verification) and knowledge representation (e.g., semantic web reasoning, reasoning in presence of incomplete and inconsistent knowledge). Ulf's final remarks addressed the fact that, in Sweden, LP courses are stil very well received and they did not witness a drop of interest. The approach adopted relies on starting not with the teaching of LP but with the teaching of mathematical logic. Two important aspects have been underlined: the need for proved real-life applications (e.g., modeling and verifiaction) and the need for stable and cheap logic programming system (there are good Prolog systems but the situation is not as good for CLP). Ulf's also stressed the need for the establishment of an on-line repository of educational material on LP and CLP.
The ideal curriculum proposed by Peter focuses more on the teaching and understanding of logic than LP itself, thus viewing LP as an executable version of a subset of first-order logic; an ideal curriculum should follow steps such as (i) Propositional logic and predicate calculus, (ii) Horn clause logic (explored through tools such as CHR and Prolog), (iii) full Prolog programming (e.g., DCGs, if-then-else, negation), (iv) full resolution (explored through tools such as Otter), and (v) Constraint logic programming. Peter's final remarks stressed that perhaps teaching Constraint Programming could be more effective than teaching Constraint Logic Programming--especially considering that most problem requires simple conjunctions of primitive constraints and Prolog's data structures are often too complex for novices. On the other hand, the adoption of alternative Constraint Programming languages could lead to difficulties in teaching search (which is harder to describe outside of CLP).
Kazunori's Ideal Curriculum introduces LP in the broader sense, by presenting it as a tool within other areas of CS, such as model checking, SAT, XSLT and Web processing, and databases. Kazunori also stressed the need to provide more space for LP-style programming within traditional programming languages courses; the focus should not be necessarily on Prolog, but more broadly on rule-based programming (e.g., using CHR) and non-determinism. Kazunori's final remarks focused on the the duality between the glassbox structure offered by certain systems (e.g., CHR) and the blackbox approach offered by others (e.g., CLP(X)). Traditionally, blackbox approaches are harder to teach--this can be seen in the case of Prolog's implicit search, harder to understand due to its ties to the operational semantics of the languages. Prolog's fixed depth-first search strategy is a potential source of confusion for students--perhaps the first approach to LP should rely on the use of a breadh-first meta-interpreter, tabling, or iterative-deepening.
The consensus arising from the discussion is the importance of providing students with enough time and opportunities to acquire familiarity and practice with LP; in particular, it is evident the need to present LP as a programming paradigm, applicable to traditional areas of Computer Science and capable of interacting with other, more commonly used, paradigms. Success stories of use of LP in real-life applications represent excellent motivational tools to gain the interest of students.
Krzysztof Apt raised the problem that Prolog is frequently taught as part of programming languages courses, but instructors in such courses are often ill-prepared to properly teach LP. An avenue to address the problem could be to provide a well-organized and publicly accessible repository of educational material, covering the different aspects of LP and organized according to different target audiences.
Mireille proceded in posing the question of whether it is a good idea to present LP and Prolog as a tool for rapid software prototyping. Peter Stuckey shared some concerns about this--undergraduate students do not have commonly the experience required to actually use Prolog for rapid prototyping (their prototyping might not be rapid), which might further create skepticism. Veronica objected to Peter's comments--she has been capable of training non-experience programmers in the use of LP for natural language processing and in building non-straightforward applications. Peter stressed that one of the issues can be that Veronica's students are not CS major, and they are free from the bias that CS students often have towards traditional languages. Manuel Hermenegilod emphasized Peter's comments; teaching Prolog is not easy and it is unlikely that someone without an appropriate background can really appreciate its power and use. LP provides a powerful tool for complex problems. The minimum aim is to provide students with the appreciation of this power and with the knowledge of when such power is required.
The discussion closed with concerns raised by various participants regarding the reduced role of LP in particular, and of programming languages in general in the current ACM curriculum--a situation that further restricts the possibility of accomplishing the goal of improving training and dissemination of LP.
The translation was initiated by Enrico Pontelli on 2004-02-09