amalgame/commit

IMPROVED: steps reporting in ancestor/descendant matchers

authorJacco van Ossenbruggen
Mon Mar 2 15:14:48 2020 +0100
committerJacco van Ossenbruggen
Mon Mar 2 15:14:48 2020 +0100
commitd655ef2bad47acc5809791426f7452130528e28c
tree6062a58e1b3a1652a7c10bf06b4b1eda4f8c7851
parentd5198306c6f5cfcdb1c21e488b3bdd24d596cf2c
Diff style: patch stat
diff --git a/components/amalgame/correspondence.pl b/components/amalgame/correspondence.pl
index 82cd988..3aa44ad 100644
--- a/components/amalgame/correspondence.pl
+++ b/components/amalgame/correspondence.pl
@@ -172,12 +172,16 @@ html_evidences([E|Es],Source,Target) -->
 	  (   option(comment(Comment), E)
 	  ->  Cm = span([class(comment)], [' with comment: ', Comment])
 	  ;   Cm = ''
+	  ),
+	  (   option(steps((StepsS, StepsT)), E)
+	  ->  St = span([class(steps)], [' source/target hier. steps: ', StepsS, '/', StepsT])
+	  ;   St = ''
 	  )
 	},
 	html(div(class(evidence),
 		 [ div(class(method),
 		       ['match: ',
-			Method, By, Gr, Re, At, Mt, Src, Trg, Ss, Ts, Scs, Cm]),
+			Method, By, Gr, Re, At, Mt, Src, Trg, Ss, Ts, Scs, Cm, St]),
 		   div(class('graph yui3-g'),
 		       [ div(class('source yui3-u-1-2'),
 			     \html_evidence_graph(Graph, Source, 'LR')),
diff --git a/lib/ag_modules/ancestor_match.pl b/lib/ag_modules/ancestor_match.pl
index 1f9d3a6..887ba16 100644
--- a/lib/ag_modules/ancestor_match.pl
+++ b/lib/ag_modules/ancestor_match.pl
@@ -9,14 +9,14 @@
 ancestor_match(align(S, T, Prov0), BackgroundMatches,
 	       align(S, T, [Prov|Prov0]), Options) :-
 	option(steps(MaxSteps), Options),
-	ancestor(S, MaxSteps, AncS, R1, Steps1),
-	ancestor(T, MaxSteps, AncT, R2, Steps2),
+	ancestor(S, MaxSteps, AncS, RS, StepsS),
+	ancestor(T, MaxSteps, AncT, RT, StepsT),
 	get_assoc(AncS-AncT, BackgroundMatches, _),
 	Prov = [method(ancestor_match),
 		source(AncS),
 		target(AncT),
-		steps(Steps1/Steps2),
-		graph([R1,R2])
+		steps((StepsS, StepsT)),
+		graph([RS,RT])
 	       ].
 
 ancestor(R, MaxSteps, Parent, rdf(R, Prop, Parent), Steps) :-
diff --git a/lib/ag_modules/descendent_match.pl b/lib/ag_modules/descendent_match.pl
index 9f0e37d..7d2effb 100644
--- a/lib/ag_modules/descendent_match.pl
+++ b/lib/ag_modules/descendent_match.pl
@@ -8,14 +8,14 @@
 
 descendent_match(align(S, T, Prov0), BackgroundMatches, align(S, T, [Prov|Prov0]), Options) :-
 	option(steps(MaxSteps), Options),
-	descendent(S, MaxSteps, DesS, R1, Steps1),
-	descendent(T, MaxSteps, DesT, R2, Steps2),
+	descendent(S, MaxSteps, DesS, RS, StepsS),
+	descendent(T, MaxSteps, DesT, RT, StepsT),
 	get_assoc(DesS-DesT, BackgroundMatches, _),
 	Prov = [method(descendent_match),
 		source(DesS),
 		target(DesT),
-		steps(Steps1/Steps2),
-		graph([R1,R2])
+		steps((StepsS, StepsT)),
+		graph([RS,RT])
 	       ].
 
 descendent(R, MaxSteps, Descendent, rdf(R, Prop, Descendent), Steps) :-