val build_engine = Build.Engine(Build.engine_name(options)) val build_options = build_engine.build_options(options)
/* session directory and files */
val private_prefix = private_dir.implode + "/"
val session_name = Sessions.DRAFT val session_dir =
directory match { case Some(dir) => dir.absolute case None => val dir = Isabelle_System.make_directory(private_dir + Path.basic(session_name)) var seen = Set.empty[JFile] for (path0 <- files) { val path = path0.canonical val file = path.file if (!seen(file)) {
seen += file val target = dir + path.base if (target.is_file) {
error("Duplicate session source file " + path.base + " --- from " + path)
}
Isabelle_System.copy_file(path, target)
}
}
dir
}
/* session theories */
val more_theories = for (path <- files; name <- Thy_Header.get_thy_name(path.implode)) yield name
val session_theories = theories ::: more_theories
/* session imports */
val sessions_structure = Sessions.load_structure(build_options, dirs = dirs)
val session_imports =
Set.from( for {
name <- session_theories.iterator
session = sessions_structure.theory_qualifier(name) if session.nonEmpty
} yield session).toList
val isabelle_tool = Isabelle_Tool("process_theories", "process theories within an adhoc session context",
Scala_Project.here,
{ args => var directory: Option[Path] = None val export_files = new mutable.ListBuffer[(String, Int, List[String])] val message_head = new mutable.ListBuffer[Regex] val message_body = new mutable.ListBuffer[Regex] var output_messages = false var unicode_symbols = false val dirs = new mutable.ListBuffer[Path] val files = new mutable.ListBuffer[Path] var logic = Isabelle_System.default_logic() var margin = Pretty.default_margin var options = Options.init() var verbose = false
val getopts = Getopts("""
Usage: isabelle process_theories [OPTIONS] [THEORIES...]
Options are:
-D DIR explicit session directory (default: private)
-E EXPORTS write session export artifacts to file-system
-F FILE include additional session files, listed in FILE
-H REGEX filter messages by matching against head
-M REGEX filter messages by matching against body
-O output messages
-U output Unicode symbols
-d DIR include session directory
-f FILE include additional session file
-l NAME logic session name (default ISABELLE_LOGIC=""" + quote(logic) + """)
-m MARGIN margin for pretty printing (default: """ + margin + """)
-o OPTION override Isabelle system OPTION (via NAME=VAL or NAME)
-v verbose
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.