def visitMethodCall(self, ctx: BSParser.MethodCallContext): # First see if this method exists. method_name = ctx.IDENTIFIER().__str__() if method_name not in self.symbol_table.functions.keys(): raise UndefinedFunction( "No function {} defined.".format(method_name)) args = list() if ctx.expressionList(): args = self.visitExpressionList(ctx.expressionList()) return method_name, args
def visitMethodCall(self, ctx: BSParser.MethodCallContext) -> str: func = self.symbol_table.functions[ctx.IDENTIFIER().__str__()] smt = "; building asserts for method call {} in {}{}".format( self.output.name.upper(), self.scope_stack[-1].upper(), self.nl) for t in func.types: smt += "(assert (= {} true)){}".format( self.get_smt_name(self.output, t), self.nl) return smt
def visitMethodCall(self, ctx: BSParser.MethodCallContext): method_name = ctx.IDENTIFIER().__str__() args = list() if ctx.expressionList(): args = self.visitExpressionList(ctx.expressionList()) return method_name, args
def visitMethodCall(self, ctx: BSParser.MethodCallContext): function = self.symbol_table.functions[ctx.IDENTIFIER().__str__()] return {'name': function.name, 'types': function.types, 'method': True}