forked from UTD-FAST-Lab/ECSTATIC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
WALARunner.py
48 lines (37 loc) · 1.88 KB
/
WALARunner.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
# ECSTATIC: Extensible, Customizable STatic Analysis Tester Informed by Configuration
#
# Copyright (c) 2022.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
from typing import List
from src.ecstatic.runners.CommandLineToolRunner import CommandLineToolRunner
from src.ecstatic.util.UtilClasses import BenchmarkRecord
class WALARunner(CommandLineToolRunner):
def get_timeout_option(self) -> List[str]:
return f"--timeout {self.timeout*60*1000}".split(" ")
def get_whole_program(self) -> List[str]:
# WALA does not need a whole-program mode.
return []
def get_input_option(self, benchmark_record: BenchmarkRecord) -> List[str]:
return f"--jars {benchmark_record.name}" \
f"{(':'+':'.join(benchmark_record.depends_on)) if len(benchmark_record.depends_on) > 0 else ''}".split(" ")
def get_output_option(self, output_file: str) -> List[str]:
return f"-o {output_file}".split(" ")
def get_task_option(self, task: str) -> str:
if task == 'cg':
pass
else:
raise NotImplementedError(f'WALA does not support task {task}.')
def get_base_command(self) -> List[str]:
return "java -jar /WALAInterface/target/WALAInterface-1.0-jar-with-dependencies.jar".split(" ")