152
Arealpalimpsestisadocumentwhosecarefulexaminationmayrevealanewwindowon
thepast,showingittobedifferentfromwhatwethoughtittobe.APalimpsestdatabaseis
arepresentationofadocumentthatallowstheexplorationandmanipulationofthealter-
natepaststhatmighthavebeen,ifonlydifferentdecisionshadbeenmade.
AppendixA :Prologimplementationofthedefinitions
%Exampledocument1.
operation(1,insert(address([],0),[a,b,c,d,e])).
operation(2,move(address([1],1),address([1],3),address([1],4))).
operation(3,move(address([1],0),address([2,1],2),address([1],
5))).
operation(4,insert(address([1],2),[x,y,z])).
operation(5,delete(address([1],0),address([4,1],2))).
operation(6,insert(address([4],2),[ho,ho,ho])).
F F F F iii ig g g gu u u ur r r re e e e AAAA....1111:::: SSSSaaaammmmpppplllleeee cccchhhhaaaannnnggggeeee sssseeeetttt 1111
well_defined_for([1,2,3]).
yes
proper_addresses([1,2,3],ALL),mergesort(ALL,A).
ALL=
[address([3,2,1],1),address([3,2,1],2),address([2,1],1),address([2,1],2
),address([2,1],3),address([3,1],0),address([3,1],1),address([3,1],2),a
ddress([3,1],3),address([3,1],4),address([1],0),address([1],1),address(
[1],2),address([1],3),address([1],4),address([1],5),address([],0)]
A=
[address([],0),address([1],0),address([1],1),address([1],2),address([1]
,3),address([1],4),address([2,1],1),address([2,1],2),address([2,1],3),a
ddress([1],5),address([3,1],0),address([3,1],1),address([3,1],2),addres
s([3,1],3),address([3,1],4),address([3,2,1],1),address([3,2,1],2)]
F F F F iii ig g g gu u u ur r r re e e e AAAA....2222:::: TTTTeeeessssttttiiiinnnngggg aaaa ssssuuuubbbbsssseeeetttt ooooffff ssssaaaammmmpppplllleeee sssseeeetttt 1111
well_defined_for([1,4,5]).
yes
proper_addresses([1,4,5],ALL),mergesort(ALL,A).
ALL=
[address([1],0),address([1],1),address([1],2),address([1],3),address([1
],4),address([1],5),address([4],0),address([4],1),address([4],2),addres
s([4],3),address([],0)]
A=
[address([],0),address([1],0),address([1],1),address([1],2),address([4]
,0),address([4],1),address([4],2),address([4],3),address([1],3),address
([1],4),address([1],5)]
yes
F F F F iii ig g g gu u u ur r r re e e e AAAA....3333:::: TTTTeeeessssttttiiiinnnngggg aaaannnnooootttthhhheeeerrrr ssssuuuubbbbsssseeeetttt ooooffff ssssaaaammmmpppplllleeee sssseeeetttt 1111
Previous Page Next Page