tag:blogger.com,1999:blog-8288194986820249216.post4537092382279576045..comments2024-03-22T05:09:17.789-07:00Comments on Abstract Heresies: Joe Marshallhttp://www.blogger.com/profile/03233353484280456977noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-8288194986820249216.post-61190799379424637822010-05-06T20:36:05.976-07:002010-05-06T20:36:05.976-07:00Where do you draw the line between "the same&...Where do you draw the line between "the same" and "equivalent"?<br /><br />Given two programs / subroutines / routines / functions / procedures / method calls, P1 and P2, input X and output Y.<br /><br />1) Given X, P1 and P2 both output Y, but possibly different types of Y (say, 5 vs 5.0)<br /><br />2) Given X, P1 and P2 both output Y, each with the same type.<br /><br />Up to this point, nothing is said about the implementation of P1 and P2. Now, given that condition 2 is satisfied:<br /><br />3) P1 and P2 use different algorithms and data structures.<br /><br />4) P1 and P2 use the same algorithms, but different data structures.<br /><br />5) P1 and P2 use the same algorithms and the same data structures.<br /><br />Given condition 5 holds:<br /><br />6) AST of P1 and P2 differ.<br /><br />7) AST of P1 and P2 are the same, but variable names and types differ.<br /><br />8) AST of P1 and P2 are the same, variable names differ, types are the same.<br /><br />9) AST of P1 and P2 match.<br /><br />Given 9 holds:<br /><br />10) P1 and P2 are compiled to different architures.<br /><br />11) P1 and P2 are compiled for the same architecture, but different optimization options.<br /><br />12) P1 and P2 are compiled for the same architecture, and are compiled with the same options.<br /><br />Given 12:<br /><br />13) P1 and P2 are compiled on different machines.<br /><br />14) P1 and P2 are compiled on the same machine.<br /><br />15) P1 is copied and renamed P2.<br /><br />I think that's it.Unknownhttps://www.blogger.com/profile/00069098364359675127noreply@blogger.comtag:blogger.com,1999:blog-8288194986820249216.post-84632412494014844952010-05-06T18:59:56.043-07:002010-05-06T18:59:56.043-07:00As I understand the terms intensional and extensio...As I understand the terms intensional and extensional, the effect of abstracting functionality into a procedure is to convert a somewhat extensional description of a program into a more intensional one. When you call a procedure, you're specifying the caller's behavior in an intensional way; if the procedure changes internally, the caller's behavior may change, even though the caller didn't change. That's the whole point of procedures; it's how they save us effort both in writing and reasoning about programs.<br /><br />Determining equivalence seems to me like it's really at the root of how we work with large systems. I am making a change to code which someone or something uses; is the behavior here "observationally equivalent" to the old behavior in ways which are important to external entities?mquanderhttps://www.blogger.com/profile/04628649386002008189noreply@blogger.com