/
concuss.py
executable file
·61 lines (50 loc) · 2.31 KB
/
concuss.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/env python2.7
#
# This file is part of CONCUSS, https://github.com/theoryinpractice/concuss/,
# and is Copyright (C) North Carolina State University, 2015. It is licensed
# under the three-clause BSD license; see LICENSE.
#
import argparse
import sys
from lib.run_pipeline import runPipeline
def main():
"""
Parse all the flags and arguments the user provides for running the
pipeline and run the pipeline.
"""
parser = argparse.ArgumentParser()
# Add arguments to the argument parser
parser.add_argument("graph", help="filename of the large graph",
type=str)
parser.add_argument("pattern", help="filename of the pattern graph",
type=str)
parser.add_argument("config",
help="filename of the configuration settings",
nargs='?', type=str, default='config/default.cfg')
parser.add_argument("-o", "--output", help="filename of the result",
type=str, nargs='?', default=None)
parser.add_argument("-v", "--verbose", help="verbose output",
action="store_true")
parser.add_argument("-p", "--profile", help="profile function calls",
action="store_true")
parser.add_argument("-c", "--coloring",
help="filename of existing p-centered coloring",
type=str, nargs='?', default=None)
parser.add_argument("-C", "--coloring-no-verify",
help="do not verify correctness of existing coloring",
action="store_true")
parser.add_argument("-m", "--multi_pat_file", help="File with multiple patterns",
nargs=1, type=str)
parser.add_argument("-e", "--execution-data",
help="Output BEAVr execution data in ZIP format to "
"EXECUTION_DATA",
type=str)
# Parse the arguments provided by the user to pass them to the
# runPipeline method
args = parser.parse_args()
# Run the pipeline
runPipeline(args.graph, args.pattern, args.config, args.coloring,
args.coloring_no_verify, args.output, args.verbose,
args.profile, args.multi_pat_file, args.execution_data)
if __name__ == "__main__":
main()