Generating transition table and formulas for JK trigger