# Path: soap/logger.py
# class levels():
# def set_context(**kwargs):
# def get_context():
# def header(s, l=levels.info):
# def format(*args):
# def log(*args, **kwargs):
# def line(*args, **kwargs):
# def rewrite(*args, **kwargs):
# def persistent(name, *args, **kwargs):
# def unpersistent(*args):
# def local_context(**kwargs):
# def log_level(l):
#     def wrapper(f):
#         def wrapped(*args, **kwargs):
# def log_enable(l):
#     def wrapper(f):
#         def wrapped(*args, **kwargs):
# def log_context(l):
#     def wrapper():
# def _init_level():
# 
# Path: soap/flopoco/common.py
# def cd(d):
# def flopoco_key(fop, we=-1, wf=-1, wi=-1):
# def flopoco(key, file_name=None, dir_name=None):
# def get_luts(file_name):
# def xilinx(file_name, dir_name=None):
# def _datatype_exponent(op, label):
# _FILTER_OPERATORS = operators.TRADITIONAL_OPERATORS + [
#     operators.TERNARY_SELECT_OP
# ]


import itertools
import pickle
import shutil
import tempfile
    import sh
    import sh
from soap import logger
from soap.flopoco.common import cd, template_file, flopoco, xilinx
        from soap.expression import Expr
        from akpytemp import Template
    from multiprocessing import Pool
    from matplotlib import rc
        from matplotlib import pyplot, pylab
        from matplotlib import pyplot
    from soap.transformer.utils import greedy_trace
    from soap.flopoco.common import wf_range



class _RTLGenerator(object):

    def __init__(self, expr, var_env, prec, file_name=None, dir=None):
        self.expr = Expr(expr)
        self.var_env = var_env
        self.wf = prec
        self.we = self.expr.exponent_width(var_env, prec)
        self.dir = dir or tempfile.mktemp(suffix='/')
        with cd(self.dir):
            self.f = file_name or tempfile.mktemp(suffix='.vhdl', dir=dir)

    def generate(self):

        ops = set()
        in_ports = set()

# Path: soap/logger.py
# class levels():
# def set_context(**kwargs):
# def get_context():
# def header(s, l=levels.info):
# def format(*args):
# def log(*args, **kwargs):
# def line(*args, **kwargs):
# def rewrite(*args, **kwargs):
# def persistent(name, *args, **kwargs):
# def unpersistent(*args):
# def local_context(**kwargs):
# def log_level(l):
#     def wrapper(f):
#         def wrapped(*args, **kwargs):
# def log_enable(l):
#     def wrapper(f):
#         def wrapped(*args, **kwargs):
# def log_context(l):
#     def wrapper():
# def _init_level():
# 
# Path: soap/flopoco/common.py
# def cd(d):
# def flopoco_key(fop, we=-1, wf=-1, wi=-1):
# def flopoco(key, file_name=None, dir_name=None):
# def get_luts(file_name):
# def xilinx(file_name, dir_name=None):
# def _datatype_exponent(op, label):
# _FILTER_OPERATORS = operators.TRADITIONAL_OPERATORS + [
#     operators.TERNARY_SELECT_OP
# ]


# Path: soap/flopoco/actual.py
import itertools
import pickle
import shutil
import tempfile
    import sh
    import sh
from soap import logger
from soap.flopoco.common import cd, template_file, flopoco, xilinx
        from soap.expression import Expr
        from akpytemp import Template
    from multiprocessing import Pool
    from matplotlib import rc
        from matplotlib import pyplot, pylab
        from matplotlib import pyplot
    from soap.transformer.utils import greedy_trace
    from soap.flopoco.common import wf_range




class _RTLGenerator(object):

    def __init__(self, expr, var_env, prec, file_name=None, dir=None):
        self.expr = Expr(expr)
        self.var_env = var_env
        self.wf = prec
        self.we = self.expr.exponent_width(var_env, prec)
        self.dir = dir or tempfile.mktemp(suffix='/')
        with cd(self.dir):
            self.f = file_name or tempfile.mktemp(suffix='.vhdl', dir=dir)

    def generate(self):

        ops = set()
        in_ports = set()

        out_port, ls = self.expr.as_labels()