Closed jgraley closed 2 years ago
Stiffening for the CQ is quite hard. The problem seems to be determining at planning time what the keyer/residual pattern links should be. These need to (in principle) match the keyings that occur in run-time in the make-it-up-as-you-go-along algorithm. Did a quick analysis (08e903aa):
Defined 6 places in the code where keys are added to a CouplingKeysMap
, and then printed these out in AndRuleEngine::CompareCoupling()
:
KEY_PRODUCER_6
in AndRuleEngine::CompareLinks()
for links in plan.coupling_keyer_links
(which is non-trivial keyers)
AndRuleEngine::CompareCoupling()
sees a fair number of hits; to my_coupling_keys
KEY_PRODUCER_1
also in AndRuleEngine::CompareLinks()
via AndRuleEngine::RecordLink()
subject to conditions: not root plink, not residual, not MMAX. To external_keys
AndRuleEngine::CompareCoupling()
sees lots of hitsKEY_PRODUCER_2
in AndRuleEngine::RegenerationPassAgent()
for free abnormal links. To external_keys
AndRuleEngine::CompareLinks()
// Replace needs these keys
KEY_PRODUCER_3
in AndRuleEngine::Compare()
keying the root link if not MMAX . To external_keys
AndRuleEngine::CompareLinks()
KEY_PRODUCER_4
in AndRuleEngine::GetNextCSPSolution()
AndRuleEngine::CompareLinks()
KEY_PRODUCER_5
in SCREngine::GatherCouplings()
for when an agent has self-keyed but not found in coupling_keys
AndRuleEngine::CompareCoupling()
sees a fair number of hits and these correspond to ASSERT fails due base_plink
NULL when trying to stiffenstate
SCREngine::Plan::ConfigureAgents()
configures all the REPLACE_ONLY agentsKEY_PRODUCER_7
is any of the four Builder agents in inferno_agents.cpp in BuildReplaceImpl()
To agent localConsumers:
CONSUMER_1
CC in DC recurse from my_coupling_keys
CONSUMER_6
CC in DC recurse from master_keys
CONSUMER_7
CC in trivial problem, from master_keys
CONSUMER_3
replace: stuff node getting terminus from agent localCONSUMER_5
replace: BuildReplace
getting coupled X for replace, from agent localBetter analysis processed.txt
Strings on right are [producer trace prefix]->[consumer trace prefix]. Trace prefixes are stripped of common prefix. Run on all sctest*
Done
The keyer plink is the base. Configure the agents with keyer and residuals. Then:
XLink base_xlink = required_links->at(base_plink);
required_links
that it indexes with the configured residuals.