Open Access
Assessing program code through static structural similarity
Kevin A. Naudé
- 01 Jan 2007
4
TL;DR: A novel graph similarity measure, the Weighted Assignment Similarity measure, which is related to SimRank, but derives propagation scores from only the locally optimal mapping between child vertices, and a method for incorporating these local attribute similarities into the larger similarity propagation method.
read more
Abstract: Learning to write software requires much practice and frequent assessment. Consequently, the use of computers to assist in the assessment of computer programs has been important in supporting large classes at universities. The main approaches to the problem are dynamic analysis (testing student programs for expected output) and static analysis (direct analysis of the program code). The former is very sensitive to all kinds of errors in student programs, while the latter has traditionally only been used to assess quality, and not correctness. This research focusses on the application of static analysis, particularly structural similarity, to marking student programs. Existing traditional measures of similarity are limiting in that they are usually only effective on tree structures. In this regard they do not easily support dependencies in program code. Contemporary measures of structural similarity, such as similarity flooding, usually rely on an internal normalisation of scores. The effect is that the scores only have relative meaning, and cannot be interpreted in isolation, ie. they are not meaningful for assessment. The SimRank measure is shown to have the same problem, but not because of normalisation. The problem with the SimRank measure arises from the fact that its scores depend on all possible mappings between the children of vertices being compared. The main contribution of this research is a novel graph similarity measure, the Weighted Assignment Similarity measure. It is related to SimRank, but derives propagation scores from only the locally optimal mapping between child vertices. The resulting similarity scores may be regarded as the percentage of mutual coverage between graphs. The measure is proven to converge for all directed acyclic graphs, and an efficient implementation is outlined for this case. Attributes on graph vertices and edges are often used to capture domain specific information which is not structural in nature. It has been suggested that these should influence the similarity propagation, but no clear method for doing this has been reported. The second important contribution of this research is a general method for incorporating these local attribute similarities into the larger similarity propagation method. An example of attributes in program graphs are identifier names. The choice of identifiers in programs is arbitrary as they are purely symbolic. A problem facing any comparison between programs is that they are unlikely to use the same set of identifiers. This problem indicates that a mapping between the identifier sets is required. The third contribution of this research is a method for applying the structural similarity measure in a two step process to find an optimal identifier mapping. This approach is both novel and valuable as it cleverly reuses the similarity measure as an existing resource. In general, programming assignments allow a large variety of solutions. Assessing student programs through structural similarity is only feasible if the diversity in the solution space can…
read more
Chat with Paper
AI Agents for this Paper
Find similar papers on Google Scholar, PubMed and Arxiv
Write a critical review of this paper
Analyze citations of this paper to find unaddressed research gaps
Citations
A Review of Static Analysis Approaches for Programming Exercises
Michael Striewe,Michael Goedicke +1 more
- 30 Jun 2014
TL;DR: Different principal approaches and different tools for static analysis are presented, evaluated and compared regarding their usefulness in learning scenarios and the goal is to draw a connection between the technical outcomes of source code analysis and the didactical benefits that can be gained from it for programming education and feedback generation.
37
Marking student programs using graph similarity
TL;DR: A novel approach to the automated marking of student programming assignments is presented through an efficient novel graph similarity measure (AssignSim) that quantifies the structural similarity between unmarked student submissions and marked solutions.
Can computers compare student code solutions as well as teachers
Matheus Gaudencio,Ayla Dantas,Dalton Guerrero +2 more
- 05 Mar 2014
TL;DR: This work presents an experiment in which teachers are requested to compare different code solutions to the same problem and detects that comparison of students' codes has significant potential to be automated to help teachers in their work.
References
•Book
Computers and Intractability: A Guide to the Theory of NP-Completeness
Michael Randolph Garey,David S. Johnson +1 more
- 01 Jan 1979
TL;DR: The second edition of a quarterly column as discussed by the authors provides a continuing update to the list of problems (NP-complete and harder) presented by M. R. Garey and myself in our book "Computers and Intractability: A Guide to the Theory of NP-Completeness,” W. H. Freeman & Co., San Francisco, 1979.
A Complexity Measure
TL;DR: Several properties of the graph-theoretic complexity are proved which show, for example, that complexity is independent of physical size and complexity depends only on the decision structure of a program.
6K
•Book
A complexity measure
Thomas J. McCabe
- 04 Oct 1993
TL;DR: In this paper, a graph-theoretic complexity measure for managing and controlling program complexity is presented. But the complexity is independent of physical size, and complexity depends only on the decision structure of a program.
5.1K
Algorithms for the Assignment and Transportation Problems
TL;DR: In this paper, algorithms for the solution of the general assignment and transportation problems are presen, and the algorithm is generalized to one for the transportation problem.
Related Papers (5)
Hui Wang,Werner Dubitzky +1 more
- 30 Jul 2005
Richard V. Smith
- 01 Jan 1964
Katy Börner,Eberhard Pippig,Elisabeth-Ch. Tammer,Carl-Helmut Coulon +3 more
- 14 Nov 1996