Commit f1facaf5 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent b50a7eb1
......@@ -22,9 +22,14 @@ class Graph:
def setstr(s):
assert isinstance(s, (set,frozenset)), s
v = ['%s' % (_,) for _ in s]
v = ['%s' % xstr(_) for _ in s]
return '{%s}' % ','.join(v)
def xstr(obj):
if isinstance(obj, (set,frozenset)):
return setstr(obj)
return str(obj)
# generate all connected graphs with N(nodes) =< N
def genGraphs(N):
......@@ -106,7 +111,7 @@ def TLCRoute(G):
writefile("Route.cfg", cfg)
check_call("./tlc", "Route.tla")
check_call(["./tlc", "-deadlock", "Route.tla"])
......@@ -120,6 +125,7 @@ def writefile(path, data):
def main():
N = int(sys.argv[1])
for g in genGraphs(N):
print()
print(g)
TLCRoute(g)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment