MimIR 0.1
MimIR is my Intermediate Representation
|
#include <optional>
#include <fe/assert.h>
#include <fe/cast.h>
#include <fe/enum.h>
#include "mim/config.h"
#include "mim/util/dbg.h"
#include "mim/util/hash.h"
#include "mim/util/pool.h"
#include "mim/util/util.h"
#include "mim/util/vector.h"
Go to the source code of this file.
Classes | |
class | mim::Ref |
Helper class to retrieve Infer::arg if present. More... | |
class | mim::Use |
References a user. More... | |
struct | mim::UseHash |
struct | mim::UseEq |
class | mim::Setters< P, D > |
CRTP-based Mixin to declare setters for Def::loc & Def::name using a covariant return type. More... | |
class | mim::Def |
Base class for all Defs. More... | |
struct | mim::DefDefHash |
struct | mim::DefDefEq |
class | mim::Var |
class | mim::Univ |
class | mim::UMax |
class | mim::UInc |
class | mim::Type |
class | mim::Lit |
class | mim::Nat |
class | mim::Idx |
A built-in constant of type Nat -> * . More... | |
class | mim::Proxy |
class | mim::Global |
Namespaces | |
namespace | mim |
namespace | mim::Node |
Macros | |
#define | MIM_NODE(m) |
#define | CODE(node, name) |
#define | CODE(node, name) |
#define | MIM_PROJ(NAME, CONST) |
Use as mixin to wrap all kind of Def::proj and Def::projs variants. | |
Typedefs | |
using | mim::NormalizeFn = Ref (*)(Ref, Ref, Ref) |
using | mim::Uses = absl::flat_hash_set<Use, UseHash, UseEq> |
Def | |
GIDSet / GIDMap keyed by Def::gid of | |
template<class To > | |
using | mim::DefMap = GIDMap<const Def*, To> |
using | mim::DefSet = GIDSet<const Def*> |
using | mim::Def2Def = DefMap<const Def*> |
using | mim::Defs = View<const Def*> |
using | mim::DefVec = Vector<const Def*> |
Def (Mutable) | |
GIDSet / GIDMap keyed by Def::gid of | |
template<class To > | |
using | mim::MutMap = GIDMap<Def*, To> |
using | mim::MutSet = GIDSet<Def*> |
using | mim::Mut2Mut = MutMap<Def*> |
using | mim::Muts = PooledSet<Def*> |
Var | |
GIDSet / GIDMap keyed by Var::gid of | |
template<class To > | |
using | mim::VarMap = GIDMap<const Var*, To> |
using | mim::VarSet = GIDSet<const Var*> |
using | mim::Var2Var = VarMap<const Var*> |
using | mim::Vars = PooledSet<const Var*> |
DefDef | |
using | mim::DefDef = std::tuple<const Def*, const Def*> |
template<class To > | |
using | mim::DefDefMap = absl::flat_hash_map<DefDef, To, DefDefHash, DefDefEq> |
using | mim::DefDefSet = absl::flat_hash_set<DefDef, DefDefHash, DefDefEq> |
Enumerations | |
enum | : node_t { mim::Node::Type , mim::Node::Univ , mim::Node::UMax , mim::Node::UInc , mim::Node::Pi , mim::Node::Lam , mim::Node::App , mim::Node::Sigma , mim::Node::Tuple , mim::Node::Extract , mim::Node::Insert , mim::Node::Arr , mim::Node::Pack , mim::Node::Join , mim::Node::Vel , mim::Node::Test , mim::Node::Top , mim::Node::Meet , mim::Node::Ac , mim::Node::Pick , mim::Node::Bot , mim::Node::Proxy , mim::Node::Axiom , mim::Node::Lit , mim::Node::Nat , mim::Node::Idx , mim::Node::Var , mim::Node::Infer , mim::Node::Global , mim::Node::Singleton } |
enum class | mim::Sort { mim::Term , mim::Type , mim::Kind , mim::Space , mim::Univ , mim::Level } |
Dep | |
enum class | mim::Dep : unsigned { mim::None = 0 , mim::Axiom = 1 << 0 , mim::Infer = 1 << 1 , mim::Mut = 1 << 2 , mim::Proxy = 1 << 3 , mim::Var = 1 << 4 } |
Functions | |
std::ostream operator | |
std::ostream & | mim::operator<< (std::ostream &os, const Def *def) |
This will stream def as an operand. | |
std::ostream & | mim::operator<< (std::ostream &, Ref) |
Variables | |
constexpr auto | mim::Node::Num_Nodes = size_t(0) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) +size_t(1) |
#define MIM_NODE | ( | m | ) |
Definition at line 18 of file def.h.
Referenced by mim::Def::node_name().
#define MIM_PROJ | ( | NAME, | |
CONST ) |
Use as mixin to wrap all kind of Def::proj and Def::projs variants.