mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
checkpoint
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
6fd63cd05a
commit
80b2df3621
29 changed files with 8 additions and 1329 deletions
46
src/dead/value_compiler_extension.h
Normal file
46
src/dead/value_compiler_extension.h
Normal file
|
@ -0,0 +1,46 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
value_compiler_extension.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Compiler extension for creating values (i.e., "interpreted" constants that
|
||||
are different any other constant).
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2006-10-31.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#ifndef _VALUE_COMPILER_EXTENSION_H_
|
||||
#define _VALUE_COMPILER_EXTENSION_H_
|
||||
|
||||
#include"ast_compiler.h"
|
||||
|
||||
class value_compiler_extension : public ast_compiler_plugin {
|
||||
context & m_context;
|
||||
public:
|
||||
value_compiler_extension(ast_manager & m, context & ctx):
|
||||
ast_compiler_plugin(m.get_family_id(symbol("interpreted_value"))),
|
||||
m_context(ctx) {
|
||||
ctx.register_plugin(this);
|
||||
}
|
||||
|
||||
virtual ~value_compiler_extension() {
|
||||
}
|
||||
|
||||
virtual bool compile_term(ast_compiler & c, const_ast * a, enode * & r) {
|
||||
SASSERT(a->get_decl()->get_family_id() == m_fid);
|
||||
const_decl_ast * d = a->get_decl();
|
||||
r = m_context.mk_interpreted_const(d);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* _VALUE_COMPILER_EXTENSION_H_ */
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue