3 research outputs found

    Recognising the design decisions in Prolog programs as a prelude to critiquing

    Get PDF
    This thesis presents an approach by which an automated teaching system can analyse the design of novices' Prolog programs for tutorial critiquing. Existing methodologies for tutorial analysis of programs focus on the kind of small pro¬ gramming examples that are used only in the early stages of teaching. If an automated teaching system is to be widely useful, it must cover a substantial amount of the teaching syllabus, and a critiquing system must be able to analyse and critique programs written during the later stages of the syllabus.The work is motivated by a study of students' Prolog programs which were written as assessed exercises towards the end of their course. These programs all work (in some sense), yet they reveal a wide range of design (laws (bodges) for which some form of tutoring would be useful. They present problems for any automated analysis in terms of the size of the programs, the number of individual decisions that must be made to create each program and the range of correct and incorrect decisions that may be made in each case.This study identifies two areas in the analysis of students' program in which further work is needed. Existing work has focussed only on the design and implementation decisions that relate closely to the programming language. That is not sufficient for these slightly more advanced programs, for which decisions in the problem domain must also be recognised. Existing work has focussed on the different ways to implement code, but in these programs the students also make decisions about which data structures are to be used. These decisions must also be part of an analysis.The thesis provides an approach which represents both decisions in the domain of the problem being solved and decisions about how to implement them in Prolog. Decisions in the problem domain are represented by tasks (for code) and by domain objects (for data structures). Decisions that are specific to the Prolog implementation are represented by prototypes which encapsulate standard programming techniques (for code) and by a polymorphic data type language (for data structures). Issues in devising these representations are discussed.An analysis-by synthesis approach is used for code recognition. This is aug¬ mented by a procedure called "clausal split" which isolates novel or poorly de¬ signed parts of an implementation. Following an incomplete analysis of the program by synthesis, the results of this analysis provide the basis for making inferences about the parts of the program that have not been understood. For analysing data structures, a type inference mechanism is combined with inference about the parts of domain objects. Inferred data type information is also used to limit search, both for synthesis and analysis.An architecture using this approach has been implemented. The success of the architecture is assessed on student's programs. From this assessment it is clear that much further work remains to be done, but the results are hopeful
    corecore