Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re^3: Equivalency of Codeby adamk (Chaplain) |
on Feb 08, 2005 at 03:05 UTC ( [id://428891]=note: print w/replies, xml ) | Need Help?? |
That's a pretty big "in the general case". One can EASILY prove that the two following pieces of code are equivalent. So while you may not be able to work out if _any_ two pieces of code are equivalent, you can work out if _some_ two pieces of code are equivalent. As for the above example, it isn't really fair for the comparison function to have to compare itself. Generally most observes are given at least the countesy of being outside the situation being examined... So to summarise, there are ways to prove _some_ sorts of code are equivalent, just not _any_ code. And if you bias that process towards false negatives you stay pretty safe. (Accept false readings of "not equal" in exchange for certain results of "is equal")
In Section
Seekers of Perl Wisdom
|
|