From 6660c8c3edbf25d7ded6696a38b8afed1a4d7846 Mon Sep 17 00:00:00 2001 From: Joshua Moerman Date: Mon, 21 Mar 2022 13:07:46 +0100 Subject: [PATCH] Wrong installation notes --- README.md | 2 +- satuio/uio-incr.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e4fa34b..3444618 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ This project uses Python3. It uses the following packages which can be installed with `pip` as follows: ```bash -pip3 install pysat tqdm rich +pip3 install python-sat tqdm rich ``` * [`pysat`](https://github.com/pysathq/pysat) diff --git a/satuio/uio-incr.py b/satuio/uio-incr.py index 59ed51e..8b40410 100644 --- a/satuio/uio-incr.py +++ b/satuio/uio-incr.py @@ -43,6 +43,7 @@ parser.add_argument('--bound', help='Upper bound (incl.) for the UIO solving', t parser.add_argument('--time', help='Upper bound on search time (ms)', type=int) parser.add_argument('--solver', help='Which solver to use (default g3)', default='g3') parser.add_argument('--bases', help='For which states to compute an UIO (leave empty for all states)', nargs='*') +parser.add_argument('--log', help='Enable the additional log file', action='store_true') args = parser.parse_args() # reading the automaton @@ -393,5 +394,9 @@ console.print('') # Report some final stats measure_total_time('\nDone') -console.print(f'uios found: {100*len(uios)/len(states):.0f}') +console.print(f'uios found: {100*len(uios)/len(states):.0f}%') console.print(f'avg length: {sum([len(uio) for uio in uios.values()])/len(uios):.3}') + +if args.log: + with open('uio.log', 'a') as logfile: + logfile.write(f'{args.filename},{len(states)},{len(uios)},{sum([len(uio) for uio in uios.values()])}\n')