expression_ptr function_symbol_table::create_function(const std::string& fn, const std::vector<expression_ptr>& args) const { const std::map<std::string, formula_function>::const_iterator i = custom_formulas_.find(fn); if(i != custom_formulas_.end()) { return i->second.generate_function_expression(args); } return expression_ptr(); }
expression_ptr function_symbol_table::create_function(const std::string& fn, const std::vector<expression_ptr>& args, const formula_callable_definition* callable_def) const { const std::map<std::string, formula_function>::const_iterator i = custom_formulas_.find(fn); if(i != custom_formulas_.end()) { return i->second.generate_function_expression(args); } if(backup_) { return backup_->create_function(fn, args, callable_def); } return expression_ptr(); }
expression_ptr recursive_function_symbol_table::create_function( const std::string& fn, const std::vector<expression_ptr>& args, const formula_callable_definition* callable_def) const { if(fn == name_) { formula_function_expression_ptr expr = stub_.generate_function_expression(args); expr_.push_back(expr); return expr; } else if(backup_) { return backup_->create_function(fn, args, callable_def); } return expression_ptr(); }
expression_ptr cpp_from_cloog::process( clast_equation* eq ) { auto binop = new bin_op_expression; binop->lhs = process(eq->LHS); binop->rhs = process(eq->RHS); if (eq->sign < 0) binop->op = op::lesser_or_equal; else if (eq->sign > 0) binop->op = op::greater_or_equal; else binop->op = op::equal; return expression_ptr(binop); }