1
Fork 0
mirror of https://git.cs.ou.nl/joshua.moerman/mealy-decompose.git synced 2025-04-30 02:07:44 +02:00

better output

This commit is contained in:
Joshua Moerman 2024-05-22 11:29:07 +02:00
parent 68a800829c
commit 45bbc2df85

View file

@ -87,6 +87,8 @@ with open(args.filename) as file:
if args.verbose:
print(machine)
print(f'Initial size: {len(machine.states)}')
###################################
# Utility function
@ -223,6 +225,7 @@ with Solver(bootstrap_with=cnf) as solver:
print('- actual solve')
sat = solver.solve()
print('===============')
if not sat:
print('unsat :-(')
exit()
@ -259,7 +262,7 @@ with Solver(bootstrap_with=cnf) as solver:
print(f'- representative state {s}')
# count moet gelijk zijn aan cost (of kleiner)
print(f'total size = {count}')
print(f'Reduced size = {count}')
projections = {}
for rid in rids:
@ -285,6 +288,6 @@ with Solver(bootstrap_with=cnf) as solver:
count += 1
print('===============')
print('Output mapping:')
print_table(lambda o, rid: projections[rid][o], machine.outputs, rids)
print('===============')
print('Output mapping:')
print_table(lambda o, rid: projections[rid][o], machine.outputs, rids)