[请益] 有关ITE~~

楼主: dream1203 (小叮当)   2012-04-25 22:30:01
板上各位先进们晚安XD
小弟想请问一下ite的recursive code
(请看黄色部份)
ite(F, G, H){
Standardize parameters (F, G, H);
if(terminal case)
return result;
if(ite(F, G, H) in computed table)
return result;
let v be the top variable;
T = ite(Fv, Gv, Hv);
E = ite(Fv', Gv', Hv');
Process complement edge info for T & E
if(T == E)
return T;
if((v, T, E) in the unique table)
return result;
let R = BddNode(v, T, E);
insert R into unique table;
return R;
}
我想问什么情况下 会在computed table里面找不到
但是unique table里面却有存呢?
我的理解是
因为computed table是存{ite(F, G, H), result}的cache
result就是一个ite(F, G, H)对应到的BddNode
unique table是Hash一个(v, T, E)到一个unique BddNode
所以computed table,毕竟是个cache 会被洗掉…
而unique table不会
所以其实unique table里存的BddNode其实都“曾经”被放在computed table过…
然而随着时代的巨轮不停地转动 computed table里的BddNode有些被
"不同的ite,却cache到相同bucket的ite"
给挤下台了
所以有时候computed table找不到 但unique table却找到同一个BddNode…?
不知道这样讲有没有bug... XD
请板大多指教QQ 谢谢!!

Links booklink

Contact Us: admin [ a t ] ucptt.com