Haskell-Tutor: An Intelligent Tutoring System for Haskell ... - CiteSeerX

0 downloads 0 Views 313KB Size Report
with a focus on offering students effective instructions by imitating a human tutor. It is based on guided learning and supports problem hints, correct solutions and ...
Haskell-Tutor: An Intelligent Tutoring System for Haskell Programming language L. Xu 1 and A. Sarrafzadeh 2 Institute of Information & Mathematical Sciences Massey University at Albany, Auckland, New Zealand 1 [email protected] 2 [email protected] Intelligent Tutoring Systems (ITSs) are computer programs that provide individualized instructions by maintaining a model of the student using the system. This paper presents the Haskell-Tutor, an ITS for Haskell. Haskell is a purely functional programming language and students have lots of difficulties learning it. Haskell-Tutor is designed as a guided learning environment which helps students in overcoming these difficulties. The system uses Constraint Based Modeling (CBM) to form models of students in order to adapt personal pedagogical activities.

1. Introduction The most effective kind of learning is in one-on-one situations, when a human teacher adapts the interactions to suit the knowledge, learning abilities and interest of the student. However, there are lots of difficulties in qualified teachers, time, location and cost for students to enjoy this kind of learning entirely. Research has discovered that Intelligent Tutoring Systems (ITSs) can be a lucrative alternative method of providing students with the individualized attention (Anderson & Skwarecki, 1986). There are plenty of successful examples, such as SQL-Tutor (Mitrovic, Mayo, Suraweera & Martin, 2001). An ITS achieves the goal of individualization by constructing student models. The Student Model (SM) represents the knowledge state of a student through gathering relevant information about the student. ITSs collect the information by not only diagnosing the student’s answers and knowledge, but also probably considering other factors, such as the emotional state of the student. Here we present Haskell-Tutor, a constraint based ITS for teaching the Haskell programming language. It is still being developed at present but considerable progress has been made. It has the same goal as the other ITS, with a focus on offering students effective instructions by imitating a human tutor. It is based on guided learning and supports problem hints, correct solutions and conceptual learning.

2. Difficulties with Learning Haskell

Haskell-Tutor: An Intelligent Tutoring System for Haskell

109

Haskell is a general purpose, purely functional programming language, quite different from most other programming languages, such as C and Java. It is based on lambda calculus and provides polymorphic typing, lazy evaluation, higher-order functions and various other powerful features. It gives a simple model of programming: one value, the result, is computed on the basis of others, the inputs (Thompson, 1999). Students are faced with a number of problems when learning Haskell. Some problems stem from the low quality of the error message which is caused not only by the compilers and interpreters, but also sometimes by the subtle syntax and sophisticated type system of Haskell. Other problems derive from misconceptions in the student’s understanding of the concepts of Haskell which are sometimes new to students. Some of the concepts students find distinctly difficult to apprehend are higher-order functions and tuples.

3. Constraint Based Student Modeling Constraint Based Modeling (CBM) is a student modeling approach proposed by Ohlsson (1992). Constraint based modeling focuses on correct domain knowledge. Domain knowledge is represented as sets of constraints. A constraint specifies a property of the domain that is shared by all correct solutions. Formally, a constraint is an ordered pair (Cr, Cs), where Cr is the relevance condition which determines those problem states in which the constraint is relevant, and Cs identifies the class of relevant states in which the constraint is satisfied (Mitrovic, 1998). Consequently, if a constraint is relevant in a state then it must also be satisfied in that state in order for the solution to be corrected. Student modeling, which is a component of an ITS, tracks the student solutions and stores information that reflects the system’s belief of the current knowledge level of each individual student. The pedagogical instructions of each student are individualized to the knowledge level of the student. Without the student modeling, the pedagogical module cannot customize instruction for individual students and has to treat all students alike. Since the purpose of the student modeling is to provide data for the pedagogical module of the ITS, all of the information gathered should be suitable to be used by the pedagogical module. So, it is redundant to identify misconceptions in the knowledge domain of the student, because that information cannot be coped with by the ITS (Mitrovic, Mayo, Suraweera & Martin, 2001). Though our goal is to model the knowledge state of students fully and accurately, the student model, which is created finally, may not be perfectly full and accurate, for the reason that only obvious student’s actions are visible and the ITS only can use few relatively narrow channels to interplay with the student. However, the kind of incomplete and inexact student

110

L. Xu and A. Sarrafzadeh

models should still be useful (Ohlsson, 1992), because human teachers can do appropriate and individualized pedagogical activities by using this kind of weak student models. Of course, by using weak student models, sometimes unbefitting, even wrong pedagogical instructions will be given by ITSs. But, it is in the range of our tolerance when we look at the efficiency and whole process of pedagogy.

4. Outline of Haskell-Tutor Haskell-Tutor is a constraint based ITS designed for helping novice programmers to learn the Haskell programming language. The architecture of the current system is illustrated in Figure 1. Explanations Module

Domain Module

Expert Module

Student Module

Pedagogical Module

Problems Module

Interface Module

Student Figure 1: Architecture of Haskell-Tutor Haskell-Tutor consists of an interface module, a pedagogical module, a student module, a domain module, an explanations module, a problems module and an expert module. Interface module controls interactions and exchanges information with the students. Pedagogical module provides individualized feedback to monitor the learning of the student. Student module creates the model of the knowledge status of the student through analyzing student solutions. Domain module contains the knowledge and (or) skills that the student attempts to learn and are represented by constraints. Explanations module provides detailed explanations for the reasons why the solution of the student is wrong and hints to help the student to mend errors. Problems module stores the problems which students can work on. Expert module offers the correct solutions to the problems presented to students (Pillay, 2003). At the beginning of a session of learning, a problem is selected by the student or the pedagogical module from the problems module for the student to deal

Haskell-Tutor: An Intelligent Tutoring System for Haskell

111

with. After the student submits a solution, the interface module sends it to the student module which analyzes the solution to discover which constraints the student violates and then updates the student model. The interface module also sends the solution and problem to the expert module which produces the correct solution of the problem using the constraints from the domain module and sends it to the explanation module. Based on the student model, the pedagogical module generates a suitable pedagogical action and the feedback provided by the explanations and domain module and represents them through the interface module. When the current problem is solved correctly, or the student asks a new problem, an appropriate problem is offered by Haskell-Tutor.

5. Haskell Tutor Implementation Before a student begins to be taught by Haskell-Tutor, he/she needs to pass the login interface where the name and knowledge level of a new user is recorded and the name of a veteran will be checked. There are three different knowledge levels that can be selected by users. They are novice, medium and expert level.

Figure 2: The main interface of Haskell-Tutor According to the knowledge level, the problems which the student can choose to work on will be given in the main interface as shown in Figure 2. A problem can be identified by choosing a problem type from the problem sort list and a number from the problem number list. The content of a problem is shown in the upper window. The lower part of the window is for the student to input their solution. After pressing the submit button, the solution is sent to the compiler (Helium) to be compiled. Helium is a free Haskell compiler•.



Helium compiler can be downloaded from http://www.cs.uu.nl/helium/download.html.

112

L. Xu and A. Sarrafzadeh

Students can select problems in three different ways in Haskell-Tutor. One is following the sequence order of the series of problems for each kind of problems. Another is optionally selecting any problem by using the problem sort list and the problem number list. The other is to ask Haskell-Tutor to do it automatically. In this way, the Haskell-Tutor selects a suitable problem for the student according to the student model. At any time, if students feel it is necessary, they can choose the help from the main menu of the main interface to view the information about how to use the Haskell-Tutor and the Haskell programming language. If a student requests some help information about Haskell programming language when he/she is working on a problem, it means the student does not fully master the knowledge in the information which he/she requests, no matter whether the solution of the student is right or not. The student module will record the constraints relating to the knowledge in that information. Using the messages extracted from the Helium compiler, the Haskell-Tutor generates feedback as illustrated in Figure 3.

Figure 3: The feedback interface of Haskell-Tutor In the feedback interface there are several functions shown as buttons in Figure 3 to help the student to learn Haskell which will be explained in what follows. Feedback shows whether or not the solution is right and how many errors there are in the solution. Error Flag chooses one error to display information about. Hint chooses one error to display information about and how to correct it according to the knowledge level of the student. Partial Solution shows a part of the correct solution. During the period when the student works on the problem, the more times the student presses the partial solution button, the more content of the correct solution will be shown. All Errors shows all errors in the solution. All Warning shows all warning messages about the solution. Complete Solution shows the correct solution of the problem. Through using the main and feedback interface alternately, students attempt to solve problems to learn Haskell.

Haskell-Tutor: An Intelligent Tutoring System for Haskell

113

Once the student completes correctly all problems for their knowledge level, the knowledge level of the student is enhanced. If the student breaks all constraints relating to the higher level problems, the knowledge level of the student will be lowered. So, the student can work with suitable problems and learn the knowledge of Haskell step by step. Also a history interface is supported so that the student can view his/her history of using Haskell-Tutor.

6. Conclusions Haskell-Tutor is an intelligent tutoring system that uses the constraint based student modeling approach to provide individualized instructions. Students can learn the Haskell programming language through using this ITS. CBM can identify those concepts which the student misunderstands by analyzing the constraints which the student has violated. The student can understand and master these concepts by pertinent pedagogical activities such as giving more error information and hints to correct the errors with the help of the pedagogical module. The interactive problem-solving method helps students to strengthen the knowledge in the domain module and improve the programming ability. We believe Haskell-Tutor will be another successful example of constraint based ITSs and has good prospects for future use when it is ready to be used in practice.

7. Future Work In the next step, the main things we will do are to create the constraints which represent the knowledge and (or) skills in the domain module and implement the functions and the modules which are relevant to the constraints. Another important problem which we need to resolve in the future is how to deal with the case when the solution of the student is a correct Haskell program but not a correct solution of the problem which the student is solving. To enhance students’ interests during the learning, we will add a new function in the pedagogical module. So the pedagogical module can offer a visual and vivid multimedia teaching method. We will also add a function to allow students to redo the problems which they have solved correctly so that students can review and strengthen their knowledge when they want.

References Anderson, J. R. and Skwarecki, E. (1986). The automated tutoring of introductory computer programming. Communications of the ACM, 29, 842-849. Mitrovic, A. (1998). A Knowledge-Based Teaching System for SQL, Proc. ED-MEDIA/ED-TELECOM’ 98, Freiburg, 1027-1032.

114

L. Xu and A. Sarrafzadeh

Mitrovic, A., Mayo, M., Suraweera, P. & Martin, B. (2001). Constraint-Based Tutors: a Success Story. Proc. 14th Int. Conference on Industrial and Engineering Applications of Artificial Intelligence and Expert Systems IEA/AIE-2001, Budapest. Ohlsson, S. (1992). Constraint-Based Student Modeling. Journal of Artificial Intelligence in Education, 3, 429-447. Pillay, N. (2003). Developing Intelligent Programming Tutors for Novice Programmers. ACM SIGCSE Bulletin, 2, 78-82. Thompson, S. (1999). Haskell: the craft of functional programming. (2nd edition). England: Person Education Limited.