lppl  v2.0.0
translate.hpp File Reference
#include <algorithm>
#include <cctype>
#include <chrono>
#include <ctime>
#include <fstream>
#include <optional>
#include <string>
#include <type_traits>
#include <variant>
#include <distributions.hpp>
#include <graph.hpp>
#include <translate/default_translations.hpp>

Classes

struct  glppl_algos::likelihood_weighting
 
struct  program_info
 
struct  program_rep
 

Macros

#define GLPPL_VERSION   "v0.3.0"
 

Functions

void construct_likelihood_weighting_declaration (program_info &info, std::string &h_file)
 
void construct_likelihood_weighting_definition (program_info &info, std::string &c_file)
 
template<typename... Ts>
program_rep construct_program (gr_pair< Ts... > &gr, program_info &info, std::optional< std::string > file_=std::nullopt)
 Translates a graph_ir into a sample-based graphical model library built on ccyan primitives. More...
 
template<typename... Ts>
void construct_program_body (gr_pair< Ts... > &gr, program_info &info, std::string &c_file)
 
template<typename... Ts>
void construct_program_c_file (gr_pair< Ts... > &gr, program_info &info, std::string &c_file, std::time_t timestamp)
 
void construct_program_c_includes (program_info &info, std::string &c_file)
 
void construct_program_cmake_lib (program_info &info, std::string &program)
 
void construct_program_cmake_top (program_info &info, std::string &program)
 
void construct_program_declarations (program_info &info, std::string &h_file)
 
void construct_program_empty_main (program_info &info, std::string &program, std::time_t timestamp)
 
void construct_program_frontmatter (program_info &info, std::string &program, std::time_t timestamp, bool is_header)
 
template<typename... Ts>
void construct_program_h_file (gr_pair< Ts... > &gr, program_info &info, std::string &h_file, std::time_t timestamp)
 
void construct_program_h_includes (program_info &info, std::string &h_file)
 
template<typename... Ts>
void construct_program_structs (gr_pair< Ts... > &gr, program_info &info, std::string &h_file)
 
template<typename D >
std::string observe_statement (graph_node< D > &gn, std::string program_name, bool observed=true)
 Translates an observed node into corresponding ccyan observe semantics. More...
 
template<typename V >
std::string observe_statement (graph_node< Value< V >> &gn, std::string program_name, bool _)
 
template<>
std::string observe_statement< Categorical > (graph_node< Categorical > &gn, std::string program_name, bool observed)
 
template<typename D >
std::string sample_statement (graph_node< D > &gn, std::string program_name, bool observed=false)
 Translate an unobserved node into corresponding ccyan sample semantics. More...
 
template<typename V >
std::string sample_statement (graph_node< Value< V >> &gn, std::string program_name, bool)
 Translates a tracked value into corresponding ccyan statements. More...
 
template<>
std::string sample_statement< Categorical > (graph_node< Categorical > &gn, std::string program_name, bool observed)
 

Detailed Description

Author
David Rushing Dewhurst (drd@d.nosp@m.avid.nosp@m.rushi.nosp@m.ngde.nosp@m.whurs.nosp@m.t.co.nosp@m.m)
Version
0.2.0
Date
2023-01-18