This commit is contained in:
NikolajDanger
2023-01-04 17:03:44 +01:00
parent baecaf679d
commit c215157190
8 changed files with 281 additions and 2 deletions

28
Assignment-2/main.py Normal file
View File

@@ -0,0 +1,28 @@
"""
Usage:
main.py DCR LOG
Options:
DCR The DCR graph in xml format
LOG The log in csv format
"""
import copy
from docopt import docopt
from DCR_graph import xml_to_dcr
from log import read_log
from conformance_testing import conformance_test
def main():
arguments = docopt(__doc__)
graph = xml_to_dcr(arguments["DCR"])
logs = read_log(arguments["LOG"])
tests = [conformance_test(trace[1], copy.deepcopy(graph)) for trace in logs]
print("Success: ", tests.count(True))
print("Failure: ", tests.count(False))
if __name__ == "__main__":
main()