# Path: javadecompiler/Krakatau/ssa/objtypes.py
# def isSubtype(env, x, y):
# def commonSupertype(env, tts):
# def verifierToSynthetic_seq(vtypes):
# def verifierToSynthetic(vtype):
# def declTypeToActual(env, decltype):


import collections
import operator
from functools import partial
from ..ssa import objtypes
from .. import graph_util
from ..namegen import NameGen
from ..verifier.descriptors import parseMethodDescriptor
from . import ast, ast2, boolize
from . import graphproxy, structuring, astgen, mergevariables
        ast_root, varinfo = astgen.createAST(method, graph, setree, namegen)

        argsources = [varinfo.var(entryNode, var) for var in entryNode.invars]
        disp_args = argsources if method.static else argsources[1:]
        for expr, tt in zip(disp_args, tts):
            expr.dtype = tt

        decls = [ast.VariableDeclarator(ast.TypeName(expr.dtype), expr) for expr in disp_args]
        ################################################################################################
        ast_root.bases = (ast_root,) #needed for our setScopeParents later

        assert(_generateJumps(ast_root, dryRun=True) is None)
        _preorder(ast_root, _fixObjectCreations)
        boolize.boolizeVars(ast_root, argsources)
        _simplifyBlocks(ast_root)
        assert(_generateJumps(ast_root, dryRun=True) is None)

        _mergeVariables(ast_root, argsources, method.static)

        _preorder(ast_root, _createTernaries)
        _inlineVariables(ast_root)
        _simplifyBlocks(ast_root)
        _preorder(ast_root, _createTernaries)
        _inlineVariables(ast_root)
        _simplifyBlocks(ast_root)

        _createDeclarations(ast_root, argsources)
        _preorder(ast_root, partial(_fixExprStatements, namegen=namegen))
        _preorder(ast_root, partial(_addCastsAndParens, env=env))
        _generateJumps(ast_root)

# Path: javadecompiler/Krakatau/ssa/objtypes.py
# def isSubtype(env, x, y):
# def commonSupertype(env, tts):
# def verifierToSynthetic_seq(vtypes):
# def verifierToSynthetic(vtype):
# def declTypeToActual(env, decltype):


# Path: javadecompiler/Krakatau/java/javamethod.py
import collections
import operator
from functools import partial
from ..ssa import objtypes
from .. import graph_util
from ..namegen import NameGen
from ..verifier.descriptors import parseMethodDescriptor
from . import ast, ast2, boolize
from . import graphproxy, structuring, astgen, mergevariables

        ast_root, varinfo = astgen.createAST(method, graph, setree, namegen)

        argsources = [varinfo.var(entryNode, var) for var in entryNode.invars]
        disp_args = argsources if method.static else argsources[1:]
        for expr, tt in zip(disp_args, tts):
            expr.dtype = tt

        decls = [ast.VariableDeclarator(ast.TypeName(expr.dtype), expr) for expr in disp_args]
        ################################################################################################
        ast_root.bases = (ast_root,) #needed for our setScopeParents later

        assert(_generateJumps(ast_root, dryRun=True) is None)
        _preorder(ast_root, _fixObjectCreations)
        boolize.boolizeVars(ast_root, argsources)
        _simplifyBlocks(ast_root)
        assert(_generateJumps(ast_root, dryRun=True) is None)

        _mergeVariables(ast_root, argsources, method.static)

        _preorder(ast_root, _createTernaries)
        _inlineVariables(ast_root)
        _simplifyBlocks(ast_root)
        _preorder(ast_root, _createTernaries)
        _inlineVariables(ast_root)
        _simplifyBlocks(ast_root)

        _createDeclarations(ast_root, argsources)
        _preorder(ast_root, partial(_fixExprStatements, namegen=namegen))
        _preorder(ast_root, partial(_addCastsAndParens, env=env))
        _generateJumps(ast_root)

        _pruneVoidReturn(ast_root)