X-Git-Url: https://scm.cri.minesparis.psl.eu/git/linpy.git/blobdiff_plain/5578ef7493bf0ac9c44a6632108975d26583217c..a8257bb17a1098f69625387a467170cac4b9f483:/examples/nsad2010.py?ds=sidebyside

diff --git a/examples/nsad2010.py b/examples/nsad2010.py
index 9359315..4b73eef 100755
--- a/examples/nsad2010.py
+++ b/examples/nsad2010.py
@@ -1,5 +1,13 @@
 #!/usr/bin/env python3
 
+# This is an implementation of the algorithm described in
+#
+# [ACI10] C. Ancourt, F. Coelho and F. Irigoin, A modular static analysis
+# approach to affine loop invariants detection (2010), pp. 3 - 16, NSAD 2010.
+#
+# to compute the transitive closure of an affine transformer. A refined version
+# of this algorithm is implemented in PIPS.
+
 from linpy import *
 
 
@@ -39,8 +47,8 @@ class Transformer:
 
 
 if __name__ == '__main__':
-    i, iprime, j, jprime = symbols("i i' j j'")
-    transformer = Transformer(Eq(iprime, i + 2) & Eq(jprime, j + 1),
-        [i, j], [iprime, jprime])
+    i0, i, j0, j = symbols('i0 i j0 j')
+    transformer = Transformer(Eq(i, i0 + 2) & Eq(j, j0 + 1),
+        [i0, j0], [i, j])
     print('T  =', transformer.polyhedron)
     print('T* =', transformer.star().polyhedron)