class_docstr: This analyse extract positive subscripts from code.
  
  It is flow sensitive and aliasing is not taken into account as integer
  doesn't create aliasing in Python.
  
  >>> import gast as ast
  >>> from pythran import passmanager, backend
  >>> node = ast.parse('''
  ... def foo(a):
  ...     for i in builtins.range(1, 10):
  ...         c = i // 2''')
  >>> pm = passmanager.PassManager("test")
  >>> res = pm.gather(RangeValuesSimple, node)
  >>> res['c'], res['i']
  (Interval(low=0, high=5), Interval(low=1, high=10))
class_docstr_tok: ["This","analyse","extract","positive","subscripts","from","code",".","It","is","flow","sensitive","and","aliasing","is","not","taken","into","account","as","integer","does","n't","create","aliasing","in","Python",".",">",">",">","import","gast","as","ast",">",">",">","from","pythran","import","passmanager",",","backend",">",">",">","node","=","ast.parse","(","``","'","...","def","foo","(","a",")",":","...","for","i","in","builtins.range","(","1",",","10",")",":","...","c","=","i","\/\/","2","''","'",")",">",">",">","pm","=","passmanager.PassManager","(","``","test","''",")",">",">",">","res","=","pm.gather","(","RangeValuesSimple",",","node",")",">",">",">","res","[","'","c","'","]",",","res","[","'","i","'","]","(","Interval","(","low=0",",","high=5",")",",","Interval","(","low=1",",","high=10",")",")"]
docstr: Handle incremented variables in loop body.
  
  >>> import gast as ast
  >>> from pythran import passmanager, backend
  >>> node = ast.parse('''
  ... def foo():
  ...     a = b = c = 2
  ...     while a > 0:
  ...         a -= 1
  ...         b += 1''')
  >>> pm = passmanager.PassManager("test")
  >>> res = pm.gather(RangeValuesSimple, node)
  >>> res['a']
  Interval(low=0, high=2)
  >>> res['b']
  Interval(low=2, high=inf)
  >>> res['c']
  Interval(low=2, high=2)
docstr_tok: ["Handle","incremented","variables","in","loop","body",".",">",">",">","import","gast","as","ast",">",">",">","from","pythran","import","passmanager",",","backend",">",">",">","node","=","ast.parse","(","``","'","...","def","foo","(",")",":","...","a","=","b","=","c","=","2","...","while","a",">","0",":","...","a","-=","1","...","b","+=","1","''","'",")",">",">",">","pm","=","passmanager.PassManager","(","``","test","''",")",">",">",">","res","=","pm.gather","(","RangeValuesSimple",",","node",")",">",">",">","res","[","'","a","'","]","Interval","(","low=0",",","high=2",")",">",">",">","res","[","'","b","'","]","Interval","(","low=2",",","high=inf",")",">",">",">","res","[","'","c","'","]","Interval","(","low=2",",","high=2",")"]
code: def visit_loop(self, node, cond=None):
      """Handle incremented variables in loop body.
  
      >>> import gast as ast
      >>> from pythran import passmanager, backend
      >>> node = ast.parse('''
      ... def foo():
      ...     a = b = c = 2
      ...     while a > 0:
      ...         a -= 1
      ...         b += 1''')
      >>> pm = passmanager.PassManager("test")
      >>> res = pm.gather(RangeValuesSimple, node)
      >>> res['a']
      Interval(low=0, high=2)
      >>> res['b']
      Interval(low=2, high=inf)
      >>> res['c']
      Interval(low=2, high=2)
      """
  
      if cond is not None:
          init_range = self.result
          self.result = self.result.copy()
          bound_range(self.result, self.aliases, cond)
  
      # visit once to gather newly declared vars
      for stmt in node.body:
          self.visit(stmt)
  
      # freeze current state
      old_range = self.result.copy()
  
      # extra round
      for stmt in node.body:
          self.visit(stmt)
  
      # widen any change
      for expr, range_ in old_range.items():
          self.result[expr] = self.result[expr].widen(range_)
  
      # propagate the new informations again
      if cond is not None:
          bound_range(self.result, self.aliases, cond)
          for stmt in node.body:
              self.visit(stmt)
          self.unionify(init_range)
          self.visit(cond)
  
      for stmt in node.orelse:
          self.visit(stmt)
  
imports: import gast
  from collections import defaultdict
  from functools import reduce
  from pythran.analyses import Aliases, CFG
  from pythran.intrinsic import Intrinsic
  from pythran.passmanager import ModuleAnalysis
  from pythran.interval import Interval, IntervalTuple, UNKNOWN_RANGE
  from pythran.tables import MODULES, attributes
label_desc: Use image node_id 11 for calling the RangeValuesSimple obj's underlying member method code with example usage: obj.visit_loop(node, cond) without return types