|
33010
|
1 |
#
|
|
|
2 |
# Author: Sascha Boehme, TU Muenchen
|
|
|
3 |
#
|
|
|
4 |
# Fake SMT solver: check that input matches previously computed input and
|
|
|
5 |
# and return previously computed output.
|
|
|
6 |
#
|
|
|
7 |
|
|
|
8 |
use strict;
|
|
|
9 |
use File::Compare;
|
|
|
10 |
|
|
|
11 |
|
|
|
12 |
# arguments
|
|
|
13 |
|
|
|
14 |
my $cert_path = $ARGV[0];
|
|
|
15 |
my $new_problem = $ARGV[1];
|
|
|
16 |
|
|
|
17 |
|
|
|
18 |
# check content of new problem file against old problem file
|
|
|
19 |
|
|
|
20 |
my $old_problem = $cert_path;
|
|
|
21 |
my $old_proof = $cert_path . ".proof";
|
|
|
22 |
|
|
|
23 |
if (-e $old_problem and compare($old_problem, $new_problem) == 0) {
|
|
|
24 |
if (-e $old_proof) {
|
|
|
25 |
open FILE, "<$old_proof";
|
|
|
26 |
foreach (<FILE>) {
|
|
|
27 |
print $_;
|
|
|
28 |
}
|
|
|
29 |
close FILE;
|
|
|
30 |
}
|
|
|
31 |
else { print "ERROR: unable to open proof file\n"; }
|
|
|
32 |
}
|
|
|
33 |
else { print "ERROR: bad problem\n"; }
|