[Date Prev][Date Next][Thread Prev][Thread Next][Author Index][Date Index][Thread Index]

Version Compare/Merge: The Program



Here's some sample output from the program. The program 
itself is not user friendly; if you want to operate it 
yourself, please see me. In the meantime, if you have a 
particular transformation you are curious about, send me 
the original and final documents, and I can generate the 
results for you.

Each phrase here is a Scheme atom. The phrases are 
collected into primitive runs before starting. Insertion 
runs are denoted angle brackets: >insert<. Deletion runs 
are set off by straight brackets: [deletion]. Primitive 
moves are set off by braces: {move}. Movement runs are set 
off by parens; composite runs are set off by a second set 
of parens.

Because the smallest object is a Scheme atom, and 
because there are no duplicates allowed here (no vcopies), 
certain operations will not be seen: in one example, there 
is a word "bravely" in the original and the word "brave" in 
the final. They are considered to be deleted and inserted. 
For similar reasons, in one case the word "the" appears 
twice; in one of the two instances it appears as "the2".

The overall algorithm calls for breaking up reverses 
using the anchor method. I do not break it down here beyond 
stating that they were reversed.

You may be surprised that, in the final transformation, 
the deleted objects are still listed. Remember, the output 
of this program is not a transformed document: we already 
know what the final document looks like. The output is the 
list of transformations. How the working document appears 
at the end is not material (how it appears at the beginning 
IS material, for another reason: that is what the document 
should look like in our compare/merge window).

I am uncertain whether it is wise to look at the 
original and final documents, and figure out how YOU would 
transform them, before looking at the program's output. On 
the one hand, this will give you a better grasp of the 
problem the program faces. On the other hand, it will 
create an astonishingly large bias in favor of one 
particular transformation as being "correct". I personally 
found that transformations which looked  counterintuitive 
to me after making the transformation myself looked 
perfectly fine an hour later, after shedding my bias. On 
different days, on different topics, I have noticed that 
different Xanadians have either vastly less trouble than 
normal humans in shedding such biases, or vastly more. 

Which way do you feel today? :-)

First are some super simple samples, movements and 
insertions of characters, building to some "reasonable" 
examples, ending with some weird butcherings of sentences. 
The very last 2 examples are examples of the algorithm 
failing, in a way discussed in the final message in this 
series.

Next Original Document?
(a b c d)

Next Final Document?
(a d b)

Primitive Runs Analyzed: Version Compare Display 
Sequence:
{a }{b }[c ]{d }

Move Runs Analyzed:
({a })({b })([c ]{d })

Reversed Sequence:

{b }
[c ]{d }

({a })([c ]{d })({b })

Done!


Next Original Document?
((a b c d e)

Next Final Document?
((e b c a d)

Primitive Runs Analyzed: Version Compare Display 
Sequence:
{a }{b c }{d }{e }

Move Runs Analyzed:
({a })({b c })({d })({e })

Reversed Sequence:

{a }
{b c }

({b c })({a })({d })({e })

Reversed Sequence:

({b c })({a })({d })
{e }

({e })(({b c })({a })({d }))

Done!

Next Original Document?
((I ran very hard)

Next Final Document?
((I ran hard)

Primitive Runs Analyzed: Version Compare Display 
Sequence:
{i ran }[very ]{hard }

Move Runs Analyzed:
({i ran }[very ]{hard })

Done!

Next Original Document?
((I rec i e ve d the rosan with joy)

Next Final Document?
((I with joy did the rosan rec e i ve)

Primitive Runs Analyzed: Version Compare Display 
Sequence:
{i }{rec }{i }{e }{ve }[d ]>did <{the rosan }{with 
joy }

Move Runs Analyzed:
({i })({rec })({i })({e })({ve })(>did <[d ]{the 
rosan })({with joy })

Reversed Sequence:

{i }
{e }

({i })({rec })({e })({i })({ve })(>did <[d ]{the 
rosan })({with joy })

Reversed Sequence:
({rec })({e })({i })({ve })
>did <[d ]{the rosan }
{with joy }

({i })({with joy })(>did <[d ]{the rosan })(({rec 
})({e })({i })({ve }))

Done!

Next Original Document?
((I ran and then I2 walked)

Next Final Document?
((I walked and then I2 ran)

Primitive Runs Analyzed: Version Compare Display 
Sequence:
{i }{ran }{and then i2 }{walked }

Move Runs Analyzed:
({i })({ran })({and then i2 })({walked })

Reversed Sequence:

{ran }
{and then i2 }
{walked }

({i })({walked })({and then i2 })({ran })

Done!

Next Original Document?
((I ran and then I2 walked)

Next Final Document?
((I2 walked and then I ran)

Primitive Runs Analyzed: Version Compare Display 
Sequence:
{i ran }{and then }{i2 walked }

Move Runs Analyzed:
({i ran })({and then })({i2 walked })

Reversed Sequence:

{i ran }
{and then }
{i2 walked }

({i2 walked })({and then })({i ran })

Done!

Next Original Document?
((I the su x l r y bonds not earth ha e v slipped)

Next Final Document?
((I ha v e slipped the su r l y bonds of earth)

Primitive Runs Analyzed: Version Compare Display 
Sequence:
{i }{the su }[x ]{l }{r }{y bonds }>of <[not ]{earth 
}{ha }{e }{v }{slipped }

Move Runs Analyzed:
({i })({the su }[x ])({l })({r })({y bonds }>of 
<[not ]{earth })({ha })({e })({v })({slipped })

Reversed Sequence:

{l }
{r }

({i })({the su }[x ])({r })({l })({y bonds }>of 
<[not ]{earth })({ha })({e })({v })({slipped })

Reversed Sequence:

{e }
{v }

({i })(({the su }[x ])({r })({l })({y bonds }>of 
<[not ]{earth }))({ha })({v })({e })({slipped })

Reversed Sequence:

({the su }[x ])({r })({l })({y bonds }>of <[not 
]{earth })
({ha })({v })({e })({slipped })

({i })(({ha })({v })({e })({slipped }))(({the su }[x 
])({r })({l })({y bonds }>of <[not ]{earth }))

Done!

Next Original Document?
((w h o man is how bravely he faces the infini e t)

Next Final Document?
((how mighty is man and how2 brave in the face of 
the2 infini t e)

Primitive Runs Analyzed: Version Compare Display 
Sequence:
[w h o ]{man }{is }{how }>mighty <[bravely he faces 
]>and how2 brave in <{the }>face of the2 <{infini }{e 
}{t }

Move Runs Analyzed:
([w h o ]{man }>and how2 brave in <)({is })({how 
}>mighty <[bravely he faces ])({the }>face of the2 
<{infini })({e })({t })

Reversed Sequence:

[w h o ]{man }>and how2 brave in <
{is }
{how }>mighty <[bravely he faces ]

({how }>mighty <[bravely he faces ])({is })([w h o 
]{man }>and how2 brave in <)({the }>face of the2 
<{infini })({e })({t })

Reversed Sequence:

{e }
{t }

(({how }>mighty <[bravely he faces ])({is })([w h o 
]{man }>and how2 brave in <)({the }>face of the2 
<{infini }))({t })({e })

Done!

Next Original Document?
((a b c d e)

Next Final Document?
((b e c a d)

Primitive Runs Analyzed: Version Compare Display 
Sequence:
{a }{b }{c }{d }{e }

Move Runs Analyzed:
({a })({b })({c })({d })({e })

Moved:
{d }
After:
{a }

({a })({d })({b })({c })({e })

Reversed Sequence:

{c }
{e }

(({a })({d }))({b })({e })({c })

Reversed Sequence:

({a })({d })
({b })({e })({c })

(({b })({e })({c }))(({a })({d }))

Done!

--marcs