Thorin 1.9.0
The Higher ORder INtermediate representation
Loading...
Searching...
No Matches
core.h File Reference
#include <thorin/axiom.h>
#include <thorin/world.h>
#include "thorin/plug/core/autogen.h"
Include dependency graph for core.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  thorin
 
namespace  thorin::plug
 
namespace  thorin::plug::core
 The core Plugin
 

Functions

%core.trait
Ref thorin::plug::core::op (trait o, Ref type)
 
%core.pe
Ref thorin::plug::core::op (pe o, Ref def)
 
%core.bit2
constexpr std::array< std::array< u64, 2 >, 2 > thorin::plug::core::make_truth_table (bit2 id)
 Use like this: a op b = tab[a][b]
 
extract_unsafe
Ref thorin::plug::core::extract_unsafe (Ref d, Ref i)
 
Ref thorin::plug::core::extract_unsafe (Ref d, u64 i)
 
insert_unsafe
Ref thorin::plug::core::insert_unsafe (Ref d, Ref i, Ref val)
 
Ref thorin::plug::core::insert_unsafe (Ref d, u64 i, Ref val)
 
Convert TBound to Sigma

This is WIP.

template<bool up>
const Sigmathorin::plug::core::convert (const TBound< up > *b)
 
const Sigmathorin::plug::core::convert (const Bound *b)
 
is_commutative/is_associative
constexpr bool thorin::is_commutative (plug::core::nat id)
 
constexpr bool thorin::is_commutative (plug::core::ncmp id)
 
constexpr bool thorin::is_commutative (plug::core::wrap id)
 
constexpr bool thorin::is_commutative (plug::core::icmp id)
 
constexpr bool thorin::is_commutative (plug::core::bit2 id)
 
constexpr bool thorin::is_associative (plug::core::bit2 id)
 
constexpr bool thorin::is_associative (plug::core::nat id)
 
constexpr bool thorin::is_associative (plug::core::ncmp id)
 
constexpr bool thorin::is_associative (plug::core::icmp id)
 
constexpr bool thorin::is_associative (plug::core::wrap id)
 

Mode

What should happen if Idx arithmetic overflows?

enum class  thorin::plug::core::Mode : nat_t {
  thorin::plug::core::none = 0 ,
  thorin::plug::core::nsw = 1 << 0 ,
  thorin::plug::core::nuw = 1 << 1 ,
  thorin::plug::core::nusw = nuw | nsw
}
 
using thorin::plug::core::VMode = std::variant< Mode, nat_t, Ref >
 Give Mode as thorin::plug::math::Mode, thorin::nat_t or Ref.
 
Ref thorin::plug::core::mode (World &w, VMode m)
 thorin::plug::core::VMode -> Ref.