3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-23 11:37:54 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2021-01-26 17:07:46 -08:00
parent 32058d9c68
commit ecba26beae
6 changed files with 33 additions and 6 deletions

View file

@ -20,7 +20,12 @@ Author:
#include "util/zstring.h"
#include "ast/char_decl_plugin.h"
char_decl_plugin::char_decl_plugin() : m_charc_sym("Char") {
char_decl_plugin::char_decl_plugin():
m_charc_sym("Char") {
}
char_decl_plugin::~char_decl_plugin() {
m_manager->dec_ref(m_char);
}
func_decl* char_decl_plugin::mk_func_decl(decl_kind k, unsigned num_parameters, parameter const* parameters,
@ -52,7 +57,8 @@ void char_decl_plugin::set_manager(ast_manager * m, family_id id) {
}
void char_decl_plugin::get_op_names(svector<builtin_name>& op_names, symbol const& logic) {
op_names.push_back(builtin_name("char.<=", OP_CHAR_LE));
// TODO: enable when character theory is turned on:
// op_names.push_back(builtin_name("char.<=", OP_CHAR_LE));
}
void char_decl_plugin::get_sort_names(svector<builtin_name>& sort_names, symbol const& logic) {

View file

@ -44,7 +44,7 @@ class char_decl_plugin : public decl_plugin {
public:
char_decl_plugin();
~char_decl_plugin() override {}
~char_decl_plugin() override;
void finalize() override {}

View file

@ -24,6 +24,7 @@ Revision History:
#include "ast/datatype_decl_plugin.h"
#include "ast/recfun_decl_plugin.h"
#include "ast/dl_decl_plugin.h"
#include "ast/char_decl_plugin.h"
#include "ast/seq_decl_plugin.h"
#include "ast/pb_decl_plugin.h"
#include "ast/fpa_decl_plugin.h"
@ -51,6 +52,9 @@ void reg_decl_plugins(ast_manager & m) {
if (!m.get_plugin(m.mk_family_id(symbol("seq")))) {
m.register_plugin(symbol("seq"), alloc(seq_decl_plugin));
}
if (!m.get_plugin(m.mk_family_id(symbol("char")))) {
m.register_plugin(symbol("char"), alloc(char_decl_plugin));
}
if (!m.get_plugin(m.mk_family_id(symbol("fpa")))) {
m.register_plugin(symbol("fpa"), alloc(fpa_decl_plugin));
}