export.sh revision 6df4343f46cc159371dfa671c5943354480f4e1c
224d2b804fd6f92d9d553a3d6fe54dd14a73dde2Klaus Luettich# ISABELLE_BIN_PATH (if isabelle is not located in PATH)
224d2b804fd6f92d9d553a3d6fe54dd14a73dde2Klaus Luettich cd ${1%/*} &> /dev/null && echo $(pwd -P)/${1##*/};
224d2b804fd6f92d9d553a3d6fe54dd14a73dde2Klaus Luettichif [ ! -z $3 ]; then
224d2b804fd6f92d9d553a3d6fe54dd14a73dde2Klaus Luettichif [ -z $1 ]; then
224d2b804fd6f92d9d553a3d6fe54dd14a73dde2Klaus Luettich echo "v0:Cannot read file $TRANS.thy" > $COMM_FILE
224d2b804fd6f92d9d553a3d6fe54dd14a73dde2Klaus Luettichif [ ! -z $2 ]; then
224d2b804fd6f92d9d553a3d6fe54dd14a73dde2Klaus Luettichif [ ! -z $ISABELLE_BIN_PATH ]; then
224d2b804fd6f92d9d553a3d6fe54dd14a73dde2Klaus Luettich if [ ! -e $ISABELLE ]; then
224d2b804fd6f92d9d553a3d6fe54dd14a73dde2Klaus Luettich echo "v0:Cannot find isabelle executable. Maybe you didn't specify ISABELLE_BIN_PATH correctly?" > $COMM_FILE
224d2b804fd6f92d9d553a3d6fe54dd14a73dde2Klaus Luettich echo "v0:Cannot find isabelle executable. Maybe you need to specify ISABELLE_BIN_PATH?" > $COMM_FILE
224d2b804fd6f92d9d553a3d6fe54dd14a73dde2Klaus Luettichif [ ! -x $ISABELLE ]; then
224d2b804fd6f92d9d553a3d6fe54dd14a73dde2Klaus Luettich echo "v0:$ISABELLE is not executable" > $COMM_FILE
let val s = \"v\"^(Int.toString i)^\":\"^s'
\"/dev/stdin\" => TextIO.output (TextIO.stdOut,s)
| _ => File.write (Path.explode f) s
val out = fn (i,s) => out' (\"$COMM_FILE\",i,s);
use \"$SCRIPTPATH/parser.ml\";
val thy = Parser.scan \"$TRANS.thy\" |> Parser.thy;
(File.write (Path.explode \"$OUT_FILE\")
(XML.string_of (Export.xml_of_theory thy)))
handle ex => e ((General.exnMessage ex)^\"\n\");