MCPcopy Create free account
hub / github.com/SoarGroup/Soar / find_ground

Function find_ground

Core/SoarKernel/src/explain.cpp:302–322  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

300 **************************************************************************/
301
302condition* find_ground(agent* thisAgent, explain_chunk_str* chunk, int number)
303{
304
305 condition* ground, *cond;
306
307 ground = NIL; /* unnecessary, but gcc -Wall warns without it */
308 for (cond = chunk->all_grounds; cond != NIL; cond = cond->next)
309 {
310 number--;
311 if (number == 0)
312 {
313 ground = cond;
314 }
315 }
316 if (number > 0)
317 {
318 print(thisAgent, "Could not find this condition.\n");
319 return (NIL);
320 }
321 return (ground);
322}
323
324/***************************************************************************
325 * Function : explain_trace_chunk

Callers 2

ExplainChunksFunction · 0.85
explain_chunkFunction · 0.85

Calls 1

printFunction · 0.85

Tested by

no test coverage detected