amalgame/commit

fix errors on prov handling

authorJacco van Ossenbruggen
Tue May 10 13:25:22 2011 +0200
committerJacco van Ossenbruggen
Tue May 10 13:25:22 2011 +0200
commit32ef20c06bdc4f4f9f3ec36284d6b80e8ed9f4b9
tree0d5fe1da0c7fc719b4474fe1c124cc523b9b57dd
parentfa77e5121bd36310726d464f05ef50992ca79e95
Diff style: patch stat
diff --git a/lib/ag_modules/descendent_match.pl b/lib/ag_modules/descendent_match.pl
index f5df769..723c0df 100644
--- a/lib/ag_modules/descendent_match.pl
+++ b/lib/ag_modules/descendent_match.pl
@@ -55,14 +55,12 @@ match(align(S, T, Prov0), align(S, T, [Prov|Prov0]), Options) :-
 	;   Graph = _
 	),
 	option(steps(MaxSteps), Options),
-	descendent(S, MaxSteps, DescS, R1, Steps),
-	descendent(T, MaxSteps, DescT, R2, Steps),
+	descendent(S, MaxSteps, DescS, R1, _Steps1),
+	descendent(T, MaxSteps, DescT, R2, _Steps2),
 	has_map([DescS, DescT],_, O, Graph),
 	memberchk(relation(R), O),
-	memberchk(provenance(P), O),
-	rdf_equal(PM, amalgame:descendent_match),
 	Prov = [method(descendent_match),
-		graph([R1,R2,rdf(P,PM,R),rdf(P,amalgame:steps, literal(Steps))])
+		graph([R1,R2,rdf(DescS, R, DescT)])
 	       ].
 
 descendent(R, MaxSteps, Child, rdf_reachable(R, Prop, Child), Steps) :-
diff --git a/lib/ag_modules/related_match.pl b/lib/ag_modules/related_match.pl
index e712a02..6508fb5 100644
--- a/lib/ag_modules/related_match.pl
+++ b/lib/ag_modules/related_match.pl
@@ -57,14 +57,12 @@ match(align(S, T, Prov0), align(S, T, [Prov|Prov0]), Options) :-
 	),
 	option(steps(MaxSteps), Options),
 
-	related(S, MaxSteps, AncS, R1, Steps),
-	related(T, MaxSteps, AncT, R2, Steps),
+	related(S, MaxSteps, AncS, R1, _Steps1),
+	related(T, MaxSteps, AncT, R2, _Steps2),
 	has_map([AncS, AncT],_, O, Graph),
 	memberchk(relation(R), O),
-	memberchk(provenance(P), O),
-	rdf_equal(PM, amalgame:related_match),
 	Prov = [method(related_match),
-		graph([R1,R2,rdf(P,PM,R), rdf(P,amalgame:steps, literal(Steps))])
+		graph([R1,R2,rdf(AncS,R,AncT)])
 	       ].
 
 related(R, MaxSteps, Parent, rdf_reachable(R, Prop, Parent), Steps) :-