8 #ifndef LLVMLLVMModelSymbolsH
9 #define LLVMLLVMModelSymbolsH
11 #include "SymbolForest.h"
12 #include "ASTNodeFactory.h"
13 #include "ModelDataIRBuilder.h"
14 #include <sbml/Model.h>
15 #include <sbml/SBMLVisitor.h>
27 using libsbml::SBMLVisitor::visit;
74 enum SpeciesReferenceType {
78 virtual bool visit(
const libsbml::Compartment &x);
79 virtual bool visit(
const libsbml::Species &x);
80 virtual bool visit(
const libsbml::AssignmentRule &x);
111 virtual bool visit(
const libsbml::InitialAssignment &x);
146 virtual bool visit(
const libsbml::RateRule &rule);
152 virtual bool visit(
const libsbml::Reaction &x);
162 virtual bool visit(
const libsbml::Rule &x);
167 virtual bool visit (
const libsbml::Event &event);
178 const libsbml::SBase *element,
const libsbml::ASTNode *math);
184 const libsbml::Species *element,
const libsbml::ASTNode *math);
Manages a set of ASTNodes.
Definition: ASTNodeFactory.h:28
stores the names of all the symbols in the sbml model and thier indexes in the ModelData arrays.
Definition: LLVMModelDataSymbols.h:128
Hold all the un-evaluated symbolic inforamtion in the model.
Definition: LLVMModelSymbols.h:26
void processSpecies(SymbolForest ¤tSymbols, const libsbml::Species *element, const libsbml::ASTNode *math)
specialized logic to write both amounts and concentrations here.
Definition: LLVMModelSymbols.cpp:288
void processElement(SymbolForest ¤tSymbols, const libsbml::SBase *element, const libsbml::ASTNode *math)
The only differences in how initialAssigments and assignmentRules are handled is whether they are stu...
Definition: LLVMModelSymbols.cpp:170
std::map< int, ASTNodeList > IntASTNodeListMap
we reference the reactants and products by the species index
Definition: LLVMModelSymbols.h:233
const SymbolForest & getInitialValues() const
contains the intial symbols along with the intial assignments which override the initial values.
Definition: LLVMModelSymbols.cpp:523
libsbml::ASTNode * createStoichiometryNode(int row, int col) const
create an ASTNode for the species id / reaction id std::pair.
Definition: LLVMModelSymbols.cpp:417
std::list< const libsbml::ASTNode * > ASTNodeList
a species can appear more than once in a reaction, there can be several stoichiometries for a species...
Definition: LLVMModelSymbols.h:228
std::vector< ReactionSymbols > reactions
these are indexed by reaction index.
Definition: LLVMModelSymbols.h:248
const SymbolForest & getInitialAssignmentRules() const
only valid before the model is started.
Definition: LLVMModelSymbols.cpp:533
const libsbml::ASTNode * getSpeciesReferenceStoichMath(const libsbml::SpeciesReference *reference)
get the MathML element for a SpeciesReference if it is set, otherwise, create a ASTNode from its stoi...
Definition: LLVMModelSymbols.cpp:394
ASTNodeFactory nodes
all ASTNodes we create are stored here.
Definition: LLVMModelSymbols.h:203
const SymbolForest & getAssigmentRules() const
assignment rules are always active
Definition: LLVMModelSymbols.cpp:518
Similar to a symbol table, except instead of a name / value, we have a name / tree,...
Definition: SymbolForest.h:37
hold the symbols that belong to a reactions.
Definition: LLVMModelSymbols.h:238