|comparing two programs? firstname.lastname@example.org (1994-04-18)|
|Re: comparing two programs? email@example.com (Bryan O'Sullivan) (1994-04-19)|
|Re: comparing two programs? firstname.lastname@example.org (1994-04-20)|
|Re: comparing two programs? email@example.com (1994-04-20)|
|Re: comparing two programs? firstname.lastname@example.org (1994-04-26)|
|Re: comparing two programs? email@example.com (1994-04-29)|
|From:||firstname.lastname@example.org (J P Bennett)|
|Organization:||School of Mathematical Sciences, University of Bath, UK|
|Date:||Fri, 29 Apr 1994 13:42:21 GMT|
There was an article on this problem in one of the mainstream computer
journals a year or two ago. I think is was CACM, but I can't track it down
at the moment.
You certainly don't want to do pairwise comparisons. Far better to choose
an indicator (number of basic blocks for example), sort on this (n log n)
and compare programs close together in the sorted list. Ultimately you're
going to have to check by hand to decide, we only want to speed your
Shared code, doesn't always mean plagiarism. Part of computer education is
learning from your peers, and a fallacy can be easily propagated. As an
example I set students a problem this year, to add an exponentiation
operator, ^, to a compiler (written in C) for a simple language.
Most of them got the correct idea, and realised you should do constant
folding for the new operator. All but two used ^ to evaluate the constant
expression, forgetting that in C this is the exclusive-OR operator, not
exponentiation. Looking at the code showed that this was where someone
had suggested doing constant folding using ^ and others while implementing
it had not realised the error.
Good luck with your grading!
Jeremy Bennett Tel: +44 (225) 826891
School of Mathematical Sciences Telex: 449097 UOBATH G
University of Bath Fax: +44 (225) 826492 (Group 3)
Bath, BA2 7AY, England Email: J.P.Bennett@bath.ac.uk
Return to the
Search the comp.compilers archives again.