59 std::vector<std::shared_ptr<symtab::Symbol>>
states;
69 std::shared_ptr<ast::Expression> kf);
73 std::shared_ptr<ast::Expression> lhs,
74 std::shared_ptr<ast::Expression>
rhs,
75 std::shared_ptr<ast::Expression> kf,
76 std::shared_ptr<ast::Expression> kb);
Concrete visitor for all AST classes.
Represents top level AST node for whole NMODL input.
Represents block encapsulating list of statements.
Concrete visitor for all AST classes.
Visitor used for generating the necessary AST nodes for matexp solver.
void visit_program(ast::Program &node) override
visit node of type ast::Program
std::vector< ast::SolveBlock * > solve_blocks
blocks to be solved
std::shared_ptr< ast::MatexpBlock > get_solve_block(const ast::SolveBlock &node, bool steadystate)
return the MatexpBlock solution for the given solve-block statement
std::vector< std::shared_ptr< ast::Statement > > transform_reaction_statement(std::shared_ptr< ast::Expression > lhs, std::shared_ptr< ast::Expression > rhs, std::shared_ptr< ast::Expression > kf, std::shared_ptr< ast::Expression > kb)
convert a reaction statement "<->" into equivalent assignments to the Jacobian matrix
std::vector< ast::SolveBlock * > steadystate_blocks
blocks to be solved
void visit_statement_block(ast::StatementBlock &node) override
visit node of type ast::StatementBlock
void visit_reaction_statement(ast::ReactionStatement &node) override
visit node of type ast::ReactionStatement
std::vector< std::shared_ptr< symtab::Symbol > > states
ordered list of state variables
std::shared_ptr< ast::Statement > transform_decay_statement(std::shared_ptr< ast::Expression > lhs, std::shared_ptr< ast::Expression > kf)
convert a decay reaction statement "->" into equivalent assignments to the Jacobian matrix
std::vector< ast::KineticBlock * > kinetic_blocks
all kinetic blocks in the program
std::vector< std::string > keep_blocks
blocks to be solved by a different solver method
std::shared_ptr< ast::MatexpBlock > solve_kinetic_block(const ast::KineticBlock &node, bool steadystate)
convert a KineticBlock into a MatexpBlock
ast::KineticBlock * find_kinetic_block(const std::string &block_name)
search the "kinetic_blocks" vector for the given block
void replace_solve_block(const ast::SolveBlock &node, bool steadystate)
replace the given solve-block statement with a MatexpBlock
int get_state_index(const std::string &state_name)
returns an index into the "states" vector
bool in_jacobian_block
currently visiting kinetic block that is being solved
void visit_solve_block(ast::SolveBlock &node) override
Populate the lists of solve-block statements in the program.
void visit_kinetic_block(ast::KineticBlock &node) override
Populate the list of kinetic blocks in the program.
encapsulates code generation backend implementations
static Node * node(Object *)
Implement class to represent a symbol in Symbol Table.