mirror of
https://github.com/Z3Prover/z3
synced 2025-05-05 06:45:45 +00:00
reduce mem allocation in tactic API
This commit is contained in:
parent
fc8193828d
commit
8791f61aa7
7 changed files with 24 additions and 51 deletions
|
@ -19,30 +19,28 @@ Notes:
|
|||
#define TACTIC_CMDS_H_
|
||||
|
||||
#include "ast/ast.h"
|
||||
#include "util/params.h"
|
||||
#include "util/cmd_context_types.h"
|
||||
#include "util/ref.h"
|
||||
|
||||
class tactic;
|
||||
class probe;
|
||||
class tactic_factory;
|
||||
|
||||
typedef tactic* (*tactic_factory)(ast_manager&, const params_ref&);
|
||||
|
||||
class tactic_cmd {
|
||||
symbol m_name;
|
||||
char const * m_descr;
|
||||
tactic_factory * m_factory;
|
||||
symbol m_name;
|
||||
char const * m_descr;
|
||||
tactic_factory m_factory;
|
||||
public:
|
||||
tactic_cmd(symbol const & n, char const * d, tactic_factory * f):
|
||||
m_name(n), m_descr(d), m_factory(f) {
|
||||
SASSERT(m_factory);
|
||||
}
|
||||
|
||||
~tactic_cmd();
|
||||
tactic_cmd(symbol const & n, char const * d, tactic_factory f):
|
||||
m_name(n), m_descr(d), m_factory(f) {}
|
||||
|
||||
symbol get_name() const { return m_name; }
|
||||
|
||||
char const * get_descr() const { return m_descr; }
|
||||
|
||||
tactic * mk(ast_manager & m);
|
||||
tactic * mk(ast_manager & m) { return m_factory(m, params_ref()); }
|
||||
};
|
||||
|
||||
void install_core_tactic_cmds(cmd_context & ctx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue