pyeda
pyeda copied to clipboard
Another question about espresso_tts
Excuse me, I have another question about Espresso
A, B, C = map(exprvar, 'ABC') f_tt = truthtable((C, B, A), '10110101') f_ex = truthtable2expr(f_tt) g_ex = espresso_tts(f_tt)[0] f_ex.equivalent(g_ex)
I think it should return True?
Seems like a bug.
It seems like espresso converts the permutation of the variables.
f_tt = truthtable((D, C, B, A), '1011010110010100') g_tt = expr2truthtable(espresso_tts(f_tt)[0]) f_tt A B C D 0 0 0 0 : 1 0 0 0 1 : 0 0 0 1 0 : 1 0 0 1 1 : 1 0 1 0 0 : 0 0 1 0 1 : 1 0 1 1 0 : 0 0 1 1 1 : 1 1 0 0 0 : 1 1 0 0 1 : 0 1 0 1 0 : 0 1 0 1 1 : 1 1 1 0 0 : 0 1 1 0 1 : 1 1 1 1 0 : 0 1 1 1 1 : 0 g_tt D C B A 0 0 0 0 : 1 0 0 0 1 : 0 0 0 1 0 : 1 0 0 1 1 : 1 0 1 0 0 : 0 0 1 0 1 : 1 0 1 1 0 : 0 0 1 1 1 : 1 1 0 0 0 : 1 1 0 0 1 : 0 1 0 1 0 : 0 1 0 1 1 : 1 1 1 0 0 : 0 1 1 0 1 : 1 1 1 1 0 : 0 1 1 1 1 : 0
danjujan, this fix looks good to me.