Skip to content

Commit

Permalink
first round of debug statements
Browse files Browse the repository at this point in the history
  • Loading branch information
garfieldnate committed Jan 14, 2025
1 parent c507406 commit af8098e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
4 changes: 3 additions & 1 deletion Core/SoarKernel/src/decision_process/rete.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5861,11 +5861,13 @@ void p_node_left_addition(agent* thisAgent, rete_node* node, token* tok, wme* w)
{
if (node->b.p.prod->already_fired)
{
thisAgent->outputManager->printa_sf(thisAgent, "BUG_139: Justification %y already fired, not firing again.\n", node->b.p.prod->name);
return;
}
else
{
node->b.p.prod->already_fired = 1;
thisAgent->outputManager->printa_sf(thisAgent, "BUG_139: Marking justification %y as fired.\n", node->b.p.prod->name);
}
}
#endif
Expand Down Expand Up @@ -6126,7 +6128,7 @@ void p_node_left_addition(agent* thisAgent, rete_node* node, token* tok, wme* w)
i need to talk to him about it. */

} /* end if (operator_proposal == false) */

thisAgent->outputManager->printa_sf(thisAgent, "rete: Production %y is %s-supported\n", node->b.p.prod->name, prod_type);
} /* end UNDECLARED_SUPPORT */

if (prod_type == PE_PRODS)
Expand Down
1 change: 1 addition & 0 deletions Core/SoarKernel/src/soar_representation/instantiation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,7 @@ void calculate_support_for_instantiation_preferences(agent* thisAgent, instantia
}
}
}
thisAgent->outputManager->printa_sf(thisAgent, "instantiation: Production %y is %s-supported\n", inst->prod_name, o_support ? "o" : "i");
}

if (o_support == true)
Expand Down
16 changes: 2 additions & 14 deletions Core/SoarKernel/src/soar_representation/production.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -390,21 +390,9 @@ production* make_production(agent* thisAgent,
production* p;
action* a;

if (type != JUSTIFICATION_PRODUCTION_TYPE)
for (a = *rhs_top; a != NIL; a = a->next)
{
for (a = *rhs_top; a != NIL; a = a->next)
{
a->support = UNKNOWN_SUPPORT;
}
}
else
{
/* --- for justifications --- */
/* force run-time o-support (it'll only be done once) */
for (a = *rhs_top; a != NIL; a = a->next)
{
a->support = UNKNOWN_SUPPORT;
}
a->support = UNKNOWN_SUPPORT;
}

thisAgent->memoryManager->allocate_with_pool(MP_production, &p);
Expand Down

0 comments on commit af8098e

Please sign in to comment.