changeset 337:4ad646307bd7

flow.py: pycheck corrections of style
author Sigurd Meldgaard <stm@daimi.au.dk>
date Wed, 07 Jul 2010 11:38:40 +0200
parents ca43b16ec8e1
children 4d4028b2d6c4
files pysmcl/flow.py
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/pysmcl/flow.py	Wed Jul 07 11:35:52 2010 +0200
+++ b/pysmcl/flow.py	Wed Jul 07 11:38:40 2010 +0200
@@ -14,7 +14,7 @@
     stored in each statement-node in_values and out_values, under the
     *key*.
 
-    function (FunctionDef) The function to analyze 
+    function (FunctionDef) The function to analyze
 
     join (function) A function which takes a set of nodes to be joined
 
@@ -24,11 +24,12 @@
     key (String) A string used to index into the out_values dictionary
 
     init (Lattice point) The initial lattice point
-    
+
     distribute (function): a function telling how information is
     passed on to children of a statement
 
     """
+
     def default_distribute(x):
             for child in x.children:
                 child.in_values[key] = x.out_values[key]
@@ -40,7 +41,7 @@
 
     Flow().flow(function)
 
-    statements = [i for i in ast.walk(function) if isinstance(i,ast.stmt)]
+    statements = [i for i in ast.walk(function) if isinstance(i, ast.stmt)]
     statements.append(function)
 
     function.out_values[key]=copy(init)
@@ -81,8 +82,8 @@
                 # in_values and out_values are used for storing
                 # lattice-points in for static analyses using the monotone
                 # framework.
-                child.in_values = {"secret" : set(), "range": None}
-                child.out_values = {"secret" : set(), "range": None}
+                child.in_values = {"secret": set(), "range": None}
+                child.out_values = {"secret": set(), "range": None}
                 child.initialized = True
 
     # Todo - edges from function returns...
@@ -162,6 +163,5 @@
         graph.entry =processed[entry]
         return graph
 
-
     def to_dot_string(self, entry):
         return self.to_graph(entry).to_dot_string()