Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
TDS decompose bug 111
1. Debugging TDS
decompose bug 111
Fixed v99
By Daniel Gomez-Prado
09/16/2009
Disclaimer: This is not a tutorial.
This is a debugging session
for anyone working on TDS
http://www.dgomezpr.com/
2. Bug 111 at rev 88,…,99 on 09/09/16
b2
Trigger cmd: decompose
a2
Tds 01> poly (a+b)*(c+d+e*(a+b))
Tds 02> bottom b
Tds 03> bottom a
Tds 04> linearize
Tds 05> top a2
Tds 06> top b2
Tds 02> show -db
Tds 03> decompose e
e e
chains to extract:
e*b1, a2*e, b2*e*b1
PT1 PT2 PT3
problem!! b1 b1
Tds 04> show -db
// see next page for graph of the error
Fixed on ver 99
3. Steps b2
e Problem
b1
Solution must
come at this point
extractProductTerm before passing to
-> removeTermFromContainer another extraction
-> oneProductTerm
4. Problem
While extracting PT3:
------------------------------------------
extractProductTerm
-> removeTermFromContainer
-> oneProductTerm
------------------------------------------
The chain b2*e*b1 is deleted
because its top node b2 is not
marked, then the whole chain is
re-inserted again.
Problem: sub-chain e*b1 was
already extracted, and re-inserted
as PT1. But now e*b1 is gone.
5. Solution:
1. Right after finish extracting PT1
1. Check if its top node has parents
1. Normal case: (has no parents it’s a PO)
As we have just added this node to the container, and
we have not run the get parent, there should be no
parents for this node
2. Case Solution: (has parents in the container)
• Even though we removed these nodes, it turns out, that
the extracted form already existed in the container.
• Update the parents so they don’t point to the top of the
extraction, but to a single node with the same variable of
the extracted variable.
• Future chainOp (ie if we are in PT1, chains
corresponding to PT2 … PTn) need to be updated as
they still hold in their chains the nodes being replaced
by the extracted variable
• Solution taken.