Stephen J. Turnbull <stephen <at> xemacs.org> writes: > > Ben Franksen writes: > > > The problem is that "observationally equivalent" is easy to judge for a > > machine but less so for a human. > > I don't think it's easy for either machines or humans, though for > different reasons. In the particular case of file copies and moves, > though, if the git method of checking for the fraction of unchanged > content doesn't capture the concept of copy/move, I don't know what > does. >
On reflection, there's another possibility: the test for observational equivalence could be richer. Take these scenarios: - branch A has <addfile F, hunk change F, move/rename F to G> (I assume git could detect this as a move because the content is the same.) - branches B and C each start by pulling the addfile from A. - then branch B pulls the move F to G. - but C removes F, adds G -- note both are empty files - each of B and C then pull the hunk change Here's the observational non-equivalence: - in B I expect the hunk change applies to G, no difficulty - in C I suspect the hunk change will fail with a dependency on F (or will want to pull addfile F again) Possibly we could expose the non-equivalence to the programmer even before pulling the hunk change, by the VCS linking B's file G to F to branch A, but not linking C's file G. > > > That's exactly how it's defined, as the same effect. However, effect > > > is difficult to define explicitly, it's like the judge's definition of > > > pornography: "I know it when I see it." > > > > I am dissatisfied with this kind of statement. There *must* be a precise > > meaning of "effect", > > Sure. The problem is that there are lots of them depending on your > primitives, whether you count context as part of the precondition, and > so on. For a simple example, consider that assuming a particular > version, the effects of a token replace can be perfectly accomplished > by the appropriate combination of hunk patches. However, if you allow > the version to vary, it cannot. > I think the meaning of "same effect" must be about an equivalence in all contexts (that meet pre-conditions). (I appreciate this doesn't help much without a precise definition of what's significant about contexts or what pre- conditions look like.) AntC _______________________________________________ darcs-users mailing list [email protected] http://lists.osuosl.org/mailman/listinfo/darcs-users
