feat(kernel/abstract): add new abstract_local procedure

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2014-12-20 11:28:54 -08:00
parent 2070ac849c
commit 7a75325416
2 changed files with 7 additions and 0 deletions

View file

@ -48,6 +48,12 @@ expr abstract_locals(expr const & e, unsigned n, expr const * subst) {
});
}
expr abstract_local(expr const & e, name const & l) {
expr dummy = mk_Prop();
expr local = mk_local(l, dummy);
return abstract_locals(e, 1, &local);
}
/**
\brief Auxiliary datastructure for caching the types of locals constants after abstraction.
It is very common to invoke mk_bindings(num, locals, b) with the same set of locals but

View file

@ -25,6 +25,7 @@ expr abstract(expr const & e, expr const & s, unsigned i);
/** \brief Similar to abstract, but all values in s are local constants. */
expr abstract_locals(expr const & e, unsigned n, expr const * s);
inline expr abstract_local(expr const & e, expr const & s) { return abstract_locals(e, 1, &s); }
expr abstract_local(expr const & e, name const & l);
/**
\brief Create a lambda expression (lambda (x : t) b), the term b is abstracted using abstract(b, constant(x)).