✨
This commit is contained in:
28
Assignment-2/main.py
Normal file
28
Assignment-2/main.py
Normal 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()
|
||||
Reference in New Issue
Block a user