Focal structures and information types in Prolog

Several studies have suggested that the mental structures of programmers of procedural languages have a close relationship with a model of structural knowledge related to functional information known as programming Plans. It also has been claimed that experienced programmers organize this representation in a hierarchical structure where some elements of Plans are focal or central to them. However, it is not clear that this is the case for other types of programming languages, especially for those which are significantly different from the procedural paradigm.The study reported in this paper investigates whether these claims are true for Prolog, a language which has important differences to procedural languages. Prolog does not have obvious syntactic cues to mark blocks of code (begin/end, repeat/until, etc). Also, its powerful primitives (unification and backtracking) and the extensive use of recursion might influence how programmers comprehend Prolog code in a significant way.The findings of the study suggest that Plans and functional information are important for Prolog programmers, but that there is also at least another model of structural knowledge valid for this language. This model of structural knowledge, Prolog schemas, is related to data structure information and it seems that a hierarchical organisation that highlights the relevance of some of its elements as focal is valid for Prolog. These results support the view that comprehension involves the detection of varying aspects of the code and that each of the structures related to these aspects might have their own organization and hierarchical relations.

[1]  James C. Spohrer,et al.  Empirical Studies of Programmers: Fifth Workshop , 1993 .

[2]  Simon P. Davies,et al.  The Nature and Development of Programming Plans , 1990, Int. J. Man Mach. Stud..

[3]  Susan Wiedenbeck,et al.  What do novices learn during program comprehension? , 1991, Int. J. Hum. Comput. Interact..

[4]  Scott P. Robertson,et al.  Program comprehension beyond the line , 1990, IFIP TC13 International Conference on Human-Computer Interaction.

[5]  David J. Gilmore,et al.  Are objects that important? effects of expertise and familiarity on classification of object-oriented code , 1995 .

[6]  H. Simon,et al.  The mind's eye in chess. , 1973 .

[7]  Mike Brayshaw,et al.  Towards a taxonomy of novices' misconceptions of the Prolog interpreter , 1990 .

[8]  Simon P. Davies,et al.  Knowledge restructuring and the acquisition of programming expertise , 1994, Int. J. Hum. Comput. Stud..

[9]  Maarten van Someren,et al.  What's wrong? Understanding beginners' problems with Prolog , 1990 .

[10]  Simon P. Davies,et al.  Characterizing the program design activity : neither strictly top-down nor globally opportunistic , 1991 .

[11]  John R. Anderson,et al.  Debugging: An Analysis of Bug-Location Strategies , 1987, Hum. Comput. Interact..

[12]  N. Pennington Stimulus structures and mental representations in expert comprehension of computer programs , 1987, Cognitive Psychology.

[13]  J. Fodor,et al.  The structure of a semantic theory , 1963 .

[14]  Ehud Shapiro,et al.  Algorithmic Program Debugging , 1983 .

[15]  Josie Taylor Analysing novices analysing Prolog: what stories do novices tell themselves about Prolog? , 1990 .

[16]  Richard Cox Analytical reasoning with multiple external representations , 1996 .

[17]  David J. Gilmore,et al.  Programming Plans and Programming Expertise , 1988 .

[18]  T. U. Van Le,et al.  Techniques of Prolog Programming with Implementation of Logical Negation and Quantified Goals , 1992 .

[19]  Timothy S. Gegg-Harrison Learning Prolog in a schema-based environment , 1991 .

[20]  Marc Eisenstadt,et al.  A Practical Graphical Tracer for Prolog , 1991, Int. J. Man Mach. Stud..

[21]  John R. Anderson The Architecture of Cognition , 1983 .

[22]  Mireille Ducassé,et al.  A Pragmatic Survey of Automated Debugging , 1993, AADEBUG.

[23]  Paul Brna,et al.  Programming tools for Prolog environments , 1987 .

[24]  J. Reitman,et al.  Knowledge organization and skill differences in computer programmers , 1981, Cognitive Psychology.

[25]  David J. Gilmore,et al.  Comprehension and Recall of Miniature Programs , 1984, Int. J. Man Mach. Stud..

[26]  Brad A. Myers,et al.  Evaluating program representation in a demonstrational visual shell , 1995, CHI '95.

[27]  Robert S. Rist Schema Creation in Programming , 1989, Cogn. Sci..

[28]  Marc Eisenstadt,et al.  The Transparent Prolog machine , 1991 .

[29]  Maria Vargas-Vera,et al.  Applying Prolog programming techniques , 1994, Int. J. Hum. Comput. Stud..

[30]  Susan Weidenbeck,et al.  Processes in computer program comprehension , 1986 .

[31]  IRIS VESSEY,et al.  Toward a Theory of Computer Program Bugs: An Empirical Test , 1989, Int. J. Man Mach. Stud..

[32]  Susan Wiedenbeck,et al.  The Initial Stage of Program Comprehension , 1991, Int. J. Man Mach. Stud..

[33]  David J. Gilmore,et al.  An Investigation of the Utility of Flowcharts During Computer Program Debugging , 1984, Int. J. Man Mach. Stud..

[34]  Paul Brna,et al.  Programming Languages in Education: The Search for an Easy Start , 1990 .

[35]  Elliot Soloway,et al.  Mental models and software maintenance , 1986, J. Syst. Softw..

[36]  Elliot Soloway,et al.  Empirical Studies of Programmers: Second Workshop , 1991 .

[37]  Elliot Soloway,et al.  A Goal/Plan Analysis of Buggy Pascal Programs , 1985, Hum. Comput. Interact..

[38]  Jean-Michel Hoc,et al.  Psychology of programming , 1990 .

[39]  Stanley Letovsky,et al.  Cognitive processes in program comprehension , 1986, J. Syst. Softw..

[40]  Rachel K. E. Bellamy,et al.  Parsing and Gnisrap: a model of device use , 1987 .

[41]  Tim O'Shea,et al.  The black box inside the glass box: presenting computing concepts to novices , 1999, Int. J. Hum. Comput. Stud..

[42]  Susan Wiedenbeck,et al.  A comparison of the comprehension of object-oriented and procedural programs by novice programmers , 1999, Interact. Comput..

[43]  Wietske Noordman-Vonk,et al.  Retrieval From Semantic Memory , 1977 .

[44]  Ben Shneiderman,et al.  Empirical Studies of Programmers: First Workshop , 1987 .

[45]  Johnette Hassell,et al.  Information Relationships in PROLOG Programs: How Do Programmers Comprehend Functionality? , 1991, Int. J. Man Mach. Stud..

[46]  Susan Wiedenbeck,et al.  Novice comprehension of small programs written in the procedural and object-oriented styles , 1999, Int. J. Hum. Comput. Stud..

[47]  David J. Gilmore,et al.  Expert Programming Knowledge: A Strategic Approach , 1990 .

[48]  Kate Ehrlich,et al.  Empirical Studies of Programming Knowledge , 1984, IEEE Transactions on Software Engineering.

[49]  Nancy Pennington,et al.  The Tasks of Programming , 1990 .

[50]  Nancy Pennington,et al.  Comprehension strategies in programming , 1987 .

[51]  Scott P. Robertson,et al.  Common Cognitive Representations of Program Code Across Tasks and Languages , 1990, Int. J. Man Mach. Stud..

[52]  Raquel Navarro-Prieto,et al.  Mental representation and imagery in program comprehension , 1999, PPIG.

[53]  Judith Good Programming paradigms, information types and graphical representations : empirical investigations of novice program comprehension , 1999 .

[54]  Walter Kintsch,et al.  Comprehension: A Paradigm for Cognition , 1998 .

[55]  Robert S. Rist Program Structure and Design , 1995, Cogn. Sci..

[56]  K. Gilhooly,et al.  Lines of thinking : reflections on the psychology of thought , 1990 .

[57]  Iris Vessey,et al.  On Matching Programmers' Chunks with Program Structures: An Empirical Investigation , 1987, Int. J. Man Mach. Stud..

[58]  Gary M. Olson,et al.  Comprehension differences in debugging by skilled and novice programmers , 1986 .

[59]  Paul Brna,et al.  Prolog programming techniques , 1991 .

[60]  H. Simon,et al.  Perception in chess , 1973 .

[61]  B. Adelson Problem solving and the development of abstract categories in programming languages , 1981, Memory & cognition.

[62]  Alan Bundy,et al.  What stories should we tell novice PROLOG programmers , 1987 .

[63]  Chris Taylor,et al.  Comparison of contrasting Prolog trace output formats , 1997, Int. J. Hum. Comput. Stud..

[64]  William R. Murray,et al.  Automatic program debugging for intelligent tutoring systems , 1987, Comput. Intell..

[65]  Curtis R. Cook,et al.  An analysis of the on-line debugging process , 1987 .

[66]  Françoise Détienne,et al.  Assessing the cognitive consequences of the object-oriented approach: A survey of empirical research on object-oriented , 1997, Interact. Comput..

[67]  Robert A. Kowalski,et al.  Logic for problem solving , 1982, The computer science library : Artificial intelligence series.

[68]  Alireza Ebrahimi,et al.  Novice programmer errors: language constructs and plan composition , 1994, Int. J. Hum. Comput. Stud..

[69]  Brad A. Myers,et al.  Visual Programming in a Visual Domain: A Case Study of Cognitive Dimensions , 1994, BCS HCI.

[70]  Yvonne Rogers,et al.  External cognition: how do graphical representations work? , 1996, Int. J. Hum. Comput. Stud..

[71]  Bill Curtis,et al.  The Psychology of Programming in the Large: Team and Organizational Behaviour , 1990 .

[72]  Simon P. Davies,et al.  Models and Theories of Programming Strategy , 1993, Int. J. Man Mach. Stud..

[73]  Ruven E. Brooks,et al.  Towards a Theory of the Comprehension of Computer Programs , 1983, Int. J. Man Mach. Stud..

[74]  David J. Gilmore,et al.  Models of Debugging , 1991, PPIG.

[75]  Paul Brna,et al.  Learning to Build and Comprehend Complex Information Structures: Prolog as a Case Study , 1999 .

[76]  Paul Brna,et al.  An overview of Prolog debugging tools , 1991 .

[77]  Jiajie Zhang,et al.  The Nature of External Representations in Problem Solving , 1997, Cogn. Sci..