2015-09-21 23:17:11 +00:00
|
|
|
/*
|
|
|
|
Copyright (c) 2015 Microsoft Corporation. All rights reserved.
|
|
|
|
Released under Apache 2.0 license as described in the file LICENSE.
|
|
|
|
|
|
|
|
Author: Leonardo de Moura
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "kernel/expr.h"
|
|
|
|
#include "kernel/declaration.h"
|
|
|
|
|
|
|
|
namespace lean {
|
|
|
|
namespace blast {
|
2015-10-02 22:48:01 +00:00
|
|
|
level mk_uref(unsigned idx);
|
|
|
|
|
|
|
|
bool is_uref(level const & l);
|
|
|
|
unsigned uref_index(level const & l);
|
2015-09-21 23:17:11 +00:00
|
|
|
|
2015-09-29 19:13:20 +00:00
|
|
|
// mk_href and mk_mref are helper functions for creating hypotheses and meta-variables used in the blast tactic.
|
2015-09-28 20:02:15 +00:00
|
|
|
// Remark: the local constants and metavariables manipulated by the blast tactic do **not** store their types.
|
2015-09-29 19:13:20 +00:00
|
|
|
expr mk_href(unsigned idx);
|
2015-09-21 23:17:11 +00:00
|
|
|
expr mk_mref(unsigned idx);
|
|
|
|
|
2015-09-29 19:13:20 +00:00
|
|
|
bool is_href(expr const & e);
|
|
|
|
unsigned href_index(expr const & e);
|
2015-09-28 20:02:15 +00:00
|
|
|
bool is_mref(expr const & e);
|
|
|
|
unsigned mref_index(expr const & e);
|
2015-09-29 19:13:20 +00:00
|
|
|
/** \brief Return true iff \c e contain href's */
|
|
|
|
bool has_href(expr const & e);
|
2015-09-28 23:40:19 +00:00
|
|
|
/** \brief Return true iff \c e contain mref's */
|
|
|
|
bool has_mref(expr const & e);
|
2015-09-21 23:17:11 +00:00
|
|
|
|
2015-11-09 20:27:33 +00:00
|
|
|
inline bool is_local_non_href(expr const & e) { return is_local(e) && !is_href(e); }
|
2015-09-21 23:17:11 +00:00
|
|
|
|
2015-09-28 20:02:15 +00:00
|
|
|
void initialize_expr();
|
|
|
|
void finalize_expr();
|
2015-09-21 23:17:11 +00:00
|
|
|
}
|
|
|
|
}
|