def walk_symbol(self, formula, **kwargs): symbol_type = formula.symbol_type() var_type = self._type_to_yices(symbol_type) term = libyices.yices_new_uninterpreted_term(var_type) libyices.yices_set_term_name(term, String(formula.symbol_name())) self._check_term_result(term) return term
def declare_variable(self, var): if not var.is_symbol(): raise TypeError if var.symbol_name() not in self.symbol_to_decl: tp = self._type_to_yices(var.symbol_type()) decl = libyices.yices_new_uninterpreted_term(tp) libyices.yices_set_term_name(decl, String(var.symbol_name())) self.symbol_to_decl[var] = decl self.decl_to_symbol[decl] = var