On 03.02.25 01:11, Ganesh Sittampalam wrote:
> I need to think this through more, but I think I've always viewed
> consistency and permutivity as quite closely related.
Well, they are closely related. However, if you express (3-)consistency
formally it becomes clear that it actually talks about /dependency/:
If pqr <-> q'r'p' then (qr <-> fail <=> q'r' <-> fail)
In other words, it says that r depends on q iff r' depends on q'. Thus
general consistency is about dependency being invariant under commutation.
The proof that 3-consistency implies general consistency (i.e. in
sequences of length n; this is Lemma 9.1 in Ian's camp paper) makes no
reference to permutivity either.
Also, the proof that general permutivity follows from 2- and
3-permutivity as it stands seems to require general consistency.
However, I think what we actually need is weaker. Namely, the
requirement is that
IF we have a sequence
s_0 = ...p...q...r...
and after some number of commutations arrive at
s_(k-1) = ...q'r'p'...
and then q'r' <-> r''q'', giving us
s_(k) = ...r''q''p'...
and then q''p' <-> p''q''' giving us
s_(k+1) = ...r''p''q'''...
THEN
r''(p''q''') <-> success
This is a weaker form of consistency where p can depend on either q or r
but must do so consistently in the sense that at least one of {q,r} must
remain to the left of p. Let's call this weak consistency. I believe we
can show that general weak consistency follows from weak 3-consistency,
though I haven't done it yet. In fact, I came up with this definition
just now ;-)
> Are you saying that V1 or V2 patches do have permutivity but not
> consistency of commutes, or just thinking about how to simplify our
> requirements in general?
I am not claiming that V1 and V2 have permutivity. (I believe that V1
could be fixed to have permutivity, but only theoretically, since it
would become so slow as to make it unusable in practice. The V2 code is
so inscrutable that I don't feel I can make any claims about it with
confidence.)
However, I made an experiment with V3: I changed the non-conflicting
commute and merge by removing the side-conditions that the LHS must not
conflict with nor depend on any of the v that conflict with the RHS (and
vice versa). These side-conditions are motivated in Ian's paper with
counter-examples showing how without them consistency breaks down. As
expected, this version of V3 fails the consistency tests, but it does
/not/ fail (3-)permutivity (tested with -q=100000). This does not yet
allow us to conclude that general permutivity holds, see above. (To test
this I changed the properties in the test suite to separately test
consistency and permutivity but didn't (yet) add one for weak consistency.)
Interestingly, this experimental change to V3 invalidates one of the
invariants I used in the proofs. Specifically, we can now have negative
prims in the contexts of Contexted prims. This makes the notions of
positive dependency and conflict useless and invalidates some (but not
all) of the V3 proofs.
Cheers
Ben
_______________________________________________
darcs-devel mailing list
[email protected]
https://lists.darcs.net/mailman/listinfo/darcs-devel