lib/scripts/feeder.pl
author blanchet
Sun, 27 Jul 2014 21:20:11 +0200
changeset 57823 d1e9022c0175
parent 47868 32c03d45fffe
child 61187 ff00ad5dc03a
permissions -rw-r--r--
do not embed 'nat' into 'int's in 'smt2' method -- this is highly inefficient and decreases the Sledgehammer success rate significantly

#
# Author: Markus Wenzel, TU Muenchen
#
# feeder.pl - feed isabelle session
#

# args

($head, $emitpid, $quit, $tail) = @ARGV;


# setup signal handlers

$SIG{'INT'} = "IGNORE";


# main

#buffer lines
$| = 1;


$emitpid && (print $$, "\n");

if ($head) {
  utf8::upgrade($head);
  $head =~ s/([\x80-\xff])/\\${\(ord($1))}/g;
  print $head, "\n";
}

if (!$quit) {
  while (<STDIN>) {
    print;
  }
}

$tail && (print "$tail", "\n");


# wait forever

close STDOUT;
sleep;