From beb5b00f4f35859f48f12a6e0dd9e86d65609822 Mon Sep 17 00:00:00 2001 From: Cyril Cohen Date: Tue, 2 Apr 2019 17:02:43 +0200 Subject: speedup in hierarchy_test.py --- etc/utils/hierarchy_test.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/etc/utils/hierarchy_test.py b/etc/utils/hierarchy_test.py index bc90c55..30de3e6 100644 --- a/etc/utils/hierarchy_test.py +++ b/etc/utils/hierarchy_test.py @@ -17,7 +17,7 @@ def common_children(G): result = set() for x in G.nodes(): for y in G.nodes(): - if children(G,x).intersection(children(G,y)) != set(): + if x < y and children(G,x).intersection(children(G,y)) != set(): result.add((x,y)) return result @@ -31,8 +31,7 @@ def print_common_children_coq_check(G): print ("Local Notation \"" + x + ".type\" := (" + x + ".type _).") print ("") for (x, y) in common_children(G): - if x < y: - print ("Check erefl : (_ : " + x + ".type) = (_ : " + y + ".type) :> Type.") + print ("Check erefl : (_ : " + x + ".type) = (_ : " + y + ".type) :> Type.") def main(): parser = argparse.ArgumentParser(description='Generate a check .v file \ -- cgit v1.2.3