Wolframe, 0.0.3

_Wolframe::db::vm::ProgramImage Class Reference

Program addressing only flat data structures and with symbolic information stripped out. More...

#include <programImage.hpp>

Inheritance diagram for _Wolframe::db::vm::ProgramImage:
_Wolframe::db::vm::InstructionSet

Classes

class  ErrorHint
 Hint for adding user information to the database error. More...
 

Public Types

typedef std::vector< std::string > SubroutineSignature
 
typedef std::vector< ErrorHintErrorHintList
 
- Public Types inherited from _Wolframe::db::vm::InstructionSet
enum  OpCode {
  Op_EXIT, Op_RETURN, Op_GOTO, Op_OUTPUT_CONST,
  Op_OUTPUT_PATH, Op_OUTPUT_LOOPCNT, Op_OUTPUT_SEL_IDX, Op_OUTPUT_SEL_NAM,
  Op_OUTPUT_ITR_IDX, Op_OUTPUT_ITR_NAM, Op_OUTPUT_ITR_COLUMN, Op_OUTPUT_OPEN_ARRAY,
  Op_OUTPUT_OPEN_ELEM, Op_OUTPUT_OPEN, Op_OUTPUT_CLOSE_ARRAY, Op_OUTPUT_CLOSE_ELEM,
  Op_OUTPUT_CLOSE, Op_OUTPUT_ADD_SINK, Op_KEEP_RESULT, Op_SELECT_PARAMETER,
  Op_SELECT_LAST_RESULT, Op_SELECT_KEPT_RESULT, Op_OPEN_ITER_LAST_RESULT, Op_OPEN_ITER_KEPT_RESULT,
  Op_OPEN_ITER_PATH, Op_OPEN_ITER_TUPLESET, Op_NEXT, Op_SUB_FRAME_OPEN,
  Op_SUB_ARG_CONST, Op_SUB_ARG_PATH, Op_SUB_ARG_LOOPCNT, Op_SUB_ARG_SEL_IDX,
  Op_SUB_ARG_SEL_NAM, Op_SUB_ARG_ITR_IDX, Op_SUB_ARG_ITR_NAM, Op_SUB_FRAME_CLOSE,
  Op_SCOPE_OPEN, Op_SCOPE_CLOSE, Op_DBSTM_START, Op_DBSTM_BIND_CONST,
  Op_DBSTM_BIND_PATH, Op_DBSTM_BIND_LOOPCNT, Op_DBSTM_BIND_SEL_IDX, Op_DBSTM_BIND_SEL_NAM,
  Op_DBSTM_BIND_ITR_IDX, Op_DBSTM_BIND_ITR_NAM, Op_DBSTM_HINT, Op_DBSTM_EXEC,
  Op_RESULT_SET_INIT, Op_RESULT_CONSTRAINT_UNIQUE, Op_RESULT_CONSTRAINT_NONEMPTY, Op_NOP
}
 Implemented operation codes of the VM. More...
 
enum  ArgumentType {
  At_None, At_Address, At_Path, At_Constant,
  At_ColumnName, At_TagName, At_ResultName, At_Statement,
  At_Hint, At_SubroutineSignature, At_TupleSet, At_SelectedColumnIdx,
  At_IteratorColumnIdx
}
 Enumeration of argument types. More...
 
enum  CondCode { Co_ALWAYS, Co_IF_COND, Co_NOT_IF_COND }
 Enumeration of conditional codes. More...
 
enum  { Max_OpCode =((1<<BitCnt_OpCode)-1), Max_CondCode =((1<<BitCnt_CondCode)-1), Max_ArgumentIndex =((1<<BitCnt_ArgumentIndex)-1) }
 
typedef boost::uint32_t ArgumentIndex
 Index of an argument. More...
 
typedef boost::uint32_t Address
 Address in program code. More...
 
typedef boost::uint32_t Instruction
 Instruction. More...
 

Public Member Functions

 ProgramImage ()
 Constructor. More...
 
 ProgramImage (const ProgramImage &o)
 Copy constructor. More...
 
void printInstruction (std::ostream &out, const Instruction &instr) const
 Print one instruction without symbolic information. More...
 
void print (std::ostream &out) const
 Print the whole program without symbolic information. More...
 

Public Attributes

ProgramCode code
 program code More...
 
std::vector< types::Variantconstants
 constants More...
 
std::vector< std::string > colnames
 column names More...
 
std::vector< std::string > tagnames
 tag names More...
 
std::vector< std::string > resultnames
 result name table More...
 
std::vector< std::string > statements
 database statements More...
 
std::vector< ErrorHintListerrorhints
 hints for error classes of failing database statements More...
 
std::vector< SubroutineSignaturesignatures
 subroutine signatures More...
 
std::vector< ValueTupleSetRtuplesets
 value sets from input path expressions More...
 

Additional Inherited Members

- Static Public Member Functions inherited from _Wolframe::db::vm::InstructionSet
static const char * opCodeName (OpCode i)
 
static const char * argumentTypeName (ArgumentType i)
 Get the name of an argument type. More...
 
static ArgumentType argumentType (OpCode i)
 get the argument type of an operation More...
 
static const char * condCodeName (CondCode i)
 Get the name of a conditional code. More...
 
static Instruction instruction (CondCode cond, OpCode opcode, unsigned int arg=0)
 Build an instruction from its parts. More...
 
static Instruction instruction (OpCode opcode, unsigned int arg=0)
 Build an instruction from its parts (no condition -> always executed) More...
 
static CondCode condCode (const Instruction &instr)
 Get the condition code of an instruction (defining on which condition the instruction is executed) More...
 
static OpCode opCode (const Instruction &instr)
 Get the operation code of an instruction (defining what is done on execution) More...
 
static ArgumentIndex argumentIndex (const Instruction &instr)
 Get the argument index of the instruction (addressing the argument depending on the argument type of the instruction) More...
 
static void printProgramRaw (std::ostream &out, const std::vector< Instruction > &prg)
 Print the program code without any symbolic information that is not available here. More...
 
static std::string instructionstr (const Instruction &instr)
 Get the instruction as string. More...
 

Detailed Description

Program addressing only flat data structures and with symbolic information stripped out.

Member Typedef Documentation

typedef std::vector<std::string> _Wolframe::db::vm::ProgramImage::SubroutineSignature

Constructor & Destructor Documentation

_Wolframe::db::vm::ProgramImage::ProgramImage ( )
inline

Constructor.

_Wolframe::db::vm::ProgramImage::ProgramImage ( const ProgramImage o)
inline

Copy constructor.

Member Function Documentation

void _Wolframe::db::vm::ProgramImage::print ( std::ostream &  out) const

Print the whole program without symbolic information.

void _Wolframe::db::vm::ProgramImage::printInstruction ( std::ostream &  out,
const Instruction instr 
) const

Print one instruction without symbolic information.

Member Data Documentation

ProgramCode _Wolframe::db::vm::ProgramImage::code

program code

std::vector<std::string> _Wolframe::db::vm::ProgramImage::colnames

column names

std::vector<types::Variant> _Wolframe::db::vm::ProgramImage::constants

constants

std::vector<ErrorHintList> _Wolframe::db::vm::ProgramImage::errorhints

hints for error classes of failing database statements

std::vector<std::string> _Wolframe::db::vm::ProgramImage::resultnames

result name table

std::vector<SubroutineSignature> _Wolframe::db::vm::ProgramImage::signatures

subroutine signatures

std::vector<std::string> _Wolframe::db::vm::ProgramImage::statements

database statements

std::vector<std::string> _Wolframe::db::vm::ProgramImage::tagnames

tag names

std::vector<ValueTupleSetR> _Wolframe::db::vm::ProgramImage::tuplesets

value sets from input path expressions


The documentation for this class was generated from the following file: