(self)
Doing this globally at module init time is a pain ...
Doing this globally at module init time is a pain ...
Doing this globally at module init time is a pain ...
def __init__(self):
        """ Doing this globally at module init time is a pain ... """
        self.symbolic_formulae = {}
        self.concrete_formulae = {}
        self.formulae = []

        add_formulae(self.formulae)

        # Now process the formulae into a helpful form.
        # These dicts are indexed by (p, q).

        for f in self.formulae:
            sizes = f.func.sizes
            if len(f.symbols) > 0:
                self.symbolic_formulae.setdefault(sizes, []).append(f)
            else:
                inv = f.func.build_invariants()
                self.concrete_formulae.setdefault(sizes, {})[inv] = f
def __init__ ( self ) : self . symbolic_formulae = { } self . concrete_formulae = { } self . formulae = [ ] add_formulae ( self . formulae ) # Now process the formulae into a helpful form. # These dicts are indexed by (p, q). for f in self . formulae : sizes = f . func . sizes if len ( f . symbols ) > 0 : self . symbolic_formulae . setdefault ( sizes , [ ] ) . append ( f ) else : inv = f . func . build_invariants ( ) self . concrete_formulae . setdefault ( sizes , { } ) [ inv ] = f