src/HOL/Tools/SMT/lib/scripts/remote_smt
author hoelzl
Thu, 17 Jan 2013 13:20:17 +0100
changeset 50941 3690724028b1
parent 46241 1a0b8f529b96
permissions -rwxr-xr-x
add countable compacteness; replace finite_range_imp_infinite_repeats by pigeonhole_infinite

#!/usr/bin/env perl
#
# Author: Sascha Boehme, TU Muenchen
#
# Invoke remote SMT solvers.

use strict;
use warnings;
use LWP;


# arguments

my $solver = $ARGV[0];
my @options = @ARGV[1 .. ($#ARGV - 1)];
my $problem_file = $ARGV[-1];


# call solver

my $agent = LWP::UserAgent->new;
$agent->env_proxy;
$agent->agent("SMT-Request");
$agent->timeout(180);
my $response = $agent->post($ENV{"ISABELLE_SMT_REMOTE_URL"}, [
  "Solver" => $solver,
  "Options" => join(" ", @options),
  "Problem" => [$problem_file] ],
  "Content_Type" => "form-data");
if (not $response->is_success) { die "HTTP error: " . $response->message; }
else { print $response->content; }