Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: Equivalency of Code

by adamk (Chaplain)
on Feb 08, 2005 at 03:05 UTC ( [id://428891]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Equivalency of Code
in thread Equivalency of Code

That's a pretty big "in the general case".

One can EASILY prove that the two following pieces of code are equivalent.
my $foo = 1; my $foo = 1;
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")

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://428891]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-19 02:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found