Beispiel #1
0
def ghost_function(viper_ast: ViperAST,
                   function,
                   address,
                   struct,
                   args,
                   return_type,
                   pos=None,
                   info=None):
    ghost_func = mangled.ghost_function_name(function.interface, function.name)
    return viper_ast.FuncApp(ghost_func, [address, struct, *args], pos, info,
                             return_type)
Beispiel #2
0
def trust_no_one(viper_ast: ViperAST, trusted, who, where, pos=None):
    return viper_ast.FuncApp(mangled.TRUST_NO_ONE, [trusted, who, where],
                             pos,
                             type=viper_ast.Bool)
Beispiel #3
0
def no_offers(viper_ast: ViperAST, offered, resource, address, pos=None):
    return viper_ast.FuncApp(mangled.NO_OFFERS, [offered, resource, address],
                             pos,
                             type=viper_ast.Bool)