pyeda icon indicating copy to clipboard operation
pyeda copied to clipboard

Another question about espresso_tts

Open E-Neo opened this issue 9 years ago • 2 comments

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?

E-Neo avatar Aug 07 '15 05:08 E-Neo

Seems like a bug.

cjdrake avatar Aug 07 '15 07:08 cjdrake

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

E-Neo avatar Aug 07 '15 08:08 E-Neo

danjujan, this fix looks good to me.

cjdrake avatar Aug 27 '23 01:08 cjdrake