Make sure you have swipl installed then just create the venv:
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
Make sure you have swipl
installed and in your path.
I recommend the use of git bash
simply because I don't know cmd
.
If you get permission denied when running python3
try python
python3 -m venv venv
source venv/Scripts/activate
pip install -r requirements.txt
The new concurrent mode running with --concurrent INTEGER
which allows for many tests to be run at
once, vastly increasing the speed of running of tests but reducing the instant feedback.
Ensure that your .pl file is in the directory or pass it as an argument to the script
Then run the autogenerated tests with:
python test.py
These will be solved in python and then your answer will be compared to the python solution
Or a specific test file in the tests
folder using the --tests
options, or elsewhere
e.g python test.py --tests tautologies.csv
or python test.py --tests tests/tautologies.csv
will both work.
Arguments and what they do can be found with --help
Populate a CSV in the tests folder with separators of "," or elsewhere and use --tests
to run it
You can generate your own tests, such as the tautologies.csv test, by specfiying the --csvout
option which will only print the tests and the actual solution. This can be combined with --truths
to only generate tautologies. This is just printed to stdout so just pipe with >
as usual.
I cannot provide the correct answers to the coursework problems as its part of the coursework to
identify them. However, if you fill your solutions into the base.csv
file you can test them. They
can be found by subbing into a truth table generator such as
here. Where its YES iff the entire
table is yes.
Hope you like it and let me (Ollie) know what you think / if you find a test you find interesting