From fb329ed397f6f1a7c1ba50870f77b142e0d23446 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 6 Feb 2014 01:19:31 +0000 Subject: [PATCH] graphviz: annotate dropped weakest Schwartz set edges --- compute | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/compute b/compute index 58b3587..72e5259 100755 --- a/compute +++ b/compute @@ -339,12 +339,12 @@ foreach my $ix (0..$#ch) { our $schwartz; -for (;;) { +for (my $dropiter = 1; ; $dropiter++) { # loop from A6(5) print "defeats graph: $defeats\n"; - print "\nTransitive closure A.6(5)\n"; + print "\nTransitive closure A.6(5) (iteration $dropiter)\n"; my $tdefeats = $defeats->transitive_closure(); @@ -400,6 +400,11 @@ for (;;) { my ($ca,$cb) = @$weakest; print "a weakest defeat is $ca > $cb\n"; $defeats->delete_edge($ca,$cb); + my $label = $showg->get_edge_attribute($ca,$cb,'label'); + $label .= "\ndropped - weakest in iter.$dropiter"; + $showg->set_edge_attribute($ca,$cb,'label',$label); + $showg->set_edge_attribute($ca,$cb,'style','dotted'); + $showg->set_edge_attribute($ca,$cb,'graphviz',{constraint=>0}); } print "\nDefeats within the Schwartz set, go round again\n"; -- 2.30.2