

def optimization_patterns():
    'Returns the patterns relevant for optimizations'
    global CACHE_PATTERNS
    if CACHE_PATTERNS:
        return CACHE_PATTERNS
    p1 = SimplePattern('types:LogicalOperator AND op:and', 'types:Constant AND value:False')
    p1.replacement = ast.Constant(False)
    p2 = SimplePattern('types:LogicalOperator AND op:and', None, 'types:Constant AND value:False')
    p2.replacement = ast.Constant(False)
    p3 = SimplePattern('types:LogicalOperator AND op:or', 'types:Constant AND value:True')
    p3.replacement = ast.Constant(True)
    p4 = SimplePattern('types:LogicalOperator AND op:or', None, 'types:Constant AND value:True')
    p4.replacement = ast.Constant(True)
    p5 = SimplePattern('types:NegateOperator', 'types:Constant AND value:True')
    p5.replacement = ast.Constant(False)
    p6 = SimplePattern('types:NegateOperator', 'types:Constant AND value:False')
    p6.replacement = ast.Constant(True)
    p7 = SimplePattern('types:PushResult', 'types:Constant AND value:False')
    p7.replacement = ast.Constant(False)
    p8 = SimplePattern('types:Both', 'types:Constant AND value:False', 'types:Constant AND value:False')
    p8.replacement = ast.Constant(False)
    p9 = ExtraBothPattern()
    p10 = ShortCircuitLogicalPattern()
    p11 = DeadBranchPattern()
    p12 = SimplePattern('types:LiteralSet AND value:frozenset([])')
    p12.replacement = ast.Empty()
    p13 = SimplePattern('types:ContainsOperator', 'types:Empty,Undefined')
    p13.replacement = ast.Constant(False)
    p14 = SimplePattern('types:LiteralSet AND value:frozenset()')
    p14.replacement = ast.Empty()
    CACHE_PATTERNS = [p1, p2, p3, p4, p12, p6, p7, p8, p9, p10, p11, p12, p13, p14]
    return CACHE_PATTERNS

dataset/ETHPy150Open armon/pypred/pypred/optimizer.py optimization_patterns/VarMisuse@272/531 `p5`->`p12`