Builds a nesting tree for all mutables/binders. More...
#include <mim/nest.h>
Classes | |
| class | Node |
Public Member Functions | |
Constructors | |
| Nest (Def *root) | |
| Nest (fe::View< Def * > muts) | |
Constructs a virtual root with muts as children. | |
| Nest (World &) | |
| Virtual root with all World::externals as children. | |
| Nest (const Nest &)=delete | |
| Nest (Nest &&)=delete | |
| Nest & | operator= (Nest)=delete |
Getters | |
| World & | world () const |
| const Node * | root () const |
| Vars | vars () const |
| All Vars occurring in this Nest. | |
| bool | contains (const Def *def) const |
| bool | is_recursive () const |
Nodes | |
| size_t | num_nodes () const |
| auto | muts () const |
| auto | nodes () const |
| const Node * | operator[] (Def *mut) const |
Iterators | |
| auto | begin () const |
| auto | end () const |
dot | |
GraphViz output. | |
| void | dot (std::ostream &os) const |
| void | dot (const char *file=nullptr) const |
| void | dot (std::string s) const |
Static Public Member Functions | |
| template<bool bootstrapping = false> | |
| static const Node * | lca (const Node *n, const Node *m) |
Least common ancestor of n and m. | |
Builds a nesting tree for all mutables/binders.
| mim::Nest::Nest | ( | Def * | root | ) |
Definition at line 9 of file nest.cpp.
References world().
Referenced by mim::plug::clos::phase::ClosConvPrep::analyze(), mim::World::dump(), mim::World::for_each(), Nest(), Nest(), and operator=().
| mim::Nest::Nest | ( | fe::View< Def * > | muts | ) |
| mim::Nest::Nest | ( | World & | world | ) |
Virtual root with all World::externals as children.
Definition at line 23 of file nest.cpp.
References mim::World::for_each(), and world().
|
delete |
References Nest().
|
delete |
References Nest().
|
inline |
Definition at line 226 of file nest.h.
References mim::Def::has_free_vars_in(), and vars().
Referenced by mim::Scheduler::Scheduler().
| void mim::Nest::dot | ( | const char * | file = nullptr | ) | const |
| void mim::Nest::dot | ( | std::ostream & | os | ) | const |
|
inline |
|
inline |
Definition at line 227 of file nest.h.
Referenced by mim::LamSpec::rewrite_imm_App().
|
static |
Least common ancestor of n and m.
Definition at line 107 of file nest.cpp.
References mim::Nest::Node::inest().
Referenced by mim::Scheduler::late().
|
inline |
Definition at line 234 of file nest.h.
Referenced by Nest(), and mim::Scheduler::Scheduler().
|
inline |
Definition at line 224 of file nest.h.
Referenced by dot(), mim::Scheduler::early(), mim::sexpr::Emitter::finalize(), mim::Scheduler::late(), and mim::Scheduler::schedule().
|
inline |
|
inline |