00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00038 #ifndef __NUSMV_CORE_SEXP_SEXP_INLINER_H__
00039 #define __NUSMV_CORE_SEXP_SEXP_INLINER_H__
00040
00041 #include "nusmv/core/wff/ExprMgr.h"
00042 #include "nusmv/core/compile/symb_table/SymbTable.h"
00043 #include "nusmv/core/set/set.h"
00044 #include "nusmv/core/utils/utils.h"
00045
00052 typedef struct SexpInliner_TAG* SexpInliner_ptr;
00053
00059 #define SEXP_INLINER(x) \
00060 ((SexpInliner_ptr) x)
00061
00067 #define SEXP_INLINER_CHECK_INSTANCE(x) \
00068 (nusmv_assert(SEXP_INLINER(x) != SEXP_INLINER(NULL)))
00069
00076 typedef struct InlineRes_TAG* InlineRes_ptr;
00077
00083 #define INLINE_RES(x) \
00084 ((InlineRes_ptr) x)
00085
00091 #define INLINE_RES_CHECK_INSTANCE(x) \
00092 (nusmv_assert(INLINE_RES(x) != INLINE_RES(NULL)))
00093
00094
00095
00096
00097
00098
00099
00100
00101
00111 SexpInliner_ptr SexpInliner_create(SymbTable_ptr st,
00112 const size_t fixpoint_limit);
00113
00120 SexpInliner_ptr SexpInliner_copy(const SexpInliner_ptr self);
00121
00128 void SexpInliner_destroy(SexpInliner_ptr self);
00129
00137 SymbTable_ptr
00138 SexpInliner_get_symb_table(const SexpInliner_ptr self);
00139
00152 boolean
00153 SexpInliner_force_equivalence(SexpInliner_ptr self,
00154 node_ptr var, Expr_ptr expr);
00155
00170 boolean
00171 SexpInliner_force_equivalences(SexpInliner_ptr self, Set_t equivs);
00172
00189 boolean
00190 SexpInliner_force_invariant(SexpInliner_ptr self,
00191 node_ptr var, Expr_ptr expr);
00192
00207 boolean
00208 SexpInliner_force_invariants(SexpInliner_ptr self, Set_t invars);
00209
00217 void
00218 SexpInliner_blacklist_name(SexpInliner_ptr self, node_ptr var);
00219
00226 void
00227 SexpInliner_clear_equivalences(SexpInliner_ptr self);
00228
00235 void
00236 SexpInliner_clear_invariants(SexpInliner_ptr self);
00237
00244 void
00245 SexpInliner_clear_blacklist(SexpInliner_ptr self);
00246
00268 InlineRes_ptr
00269 SexpInliner_inline(SexpInliner_ptr self, Expr_ptr expr,
00270 boolean* changed);
00271
00294 Expr_ptr
00295 SexpInliner_inline_no_learning(SexpInliner_ptr self, Expr_ptr expr,
00296 boolean* changed);
00297
00305 hash_ptr
00306 SexpInliner_get_var2expr_hash(SexpInliner_ptr self);
00307
00315 hash_ptr
00316 SexpInliner_get_var2invar_hash(SexpInliner_ptr self);
00317
00318
00319
00326 void InlineRes_destroy(InlineRes_ptr self);
00327
00334 Expr_ptr
00335 InlineRes_get_original_expr(const InlineRes_ptr self);
00336
00344 Expr_ptr
00345 InlineRes_get_result(const InlineRes_ptr self);
00346
00355 Expr_ptr
00356 InlineRes_get_result_unique(const InlineRes_ptr self);
00357
00365 Expr_ptr
00366 InlineRes_get_inlined_expr(const InlineRes_ptr self);
00367
00375 Expr_ptr
00376 InlineRes_get_equivalences_expr(const InlineRes_ptr self);
00377
00384 Set_t
00385 InlineRes_get_equivalences(const InlineRes_ptr self);
00386
00393 Expr_ptr
00394 InlineRes_get_invariant_expr(const InlineRes_ptr self);
00395
00402 Set_t
00403 InlineRes_get_invariants(const InlineRes_ptr self);
00404
00405 #endif