-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheval.sh
executable file
·39 lines (32 loc) · 1.25 KB
/
eval.sh
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
#!/bin/bash
echo -e "\n------ RUNNING EVALUATION ------\n"
MVN_OUTPUT=$(mvn clean package 2>&1)
if [ $? -ne 0 ]; then
echo "$MVN_OUTPUT"
echo "Compilation failed."
exit 1 # Exit the script with an error code
fi
# Set library path for Linux or MacOS
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./lib
elif [[ "$OSTYPE" == "darwin"* ]]; then
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:./lib
else
echo "Unsupported OS: $OSTYPE"
exit 1
fi
BENCHMARK_FOLDER="./benchmarks"
for file in "$BENCHMARK_FOLDER"/*.txt; do
if [[ -f "$file" ]]; then
echo "---------------------------------"
echo "Examples in $file:"
echo "$(<$file)"
echo -e "\nSynthesizing a program using the top-down enumerative search approach..."
java -cp lib:target/synth-1.0.jar synth.Main $file
echo -e "\nSynthesizing a program using the constraint-based enumeration approach..."
java -cp lib/*:target/synth-1.0.jar synth.Main $file constraint-based
echo -e "\nSynthesizing a program using the divide-and-conquer enumeration approach..."
java -cp lib:target/synth-1.0.jar synth.Main $file divide-conquer
echo "---------------------------------"
fi
done