582 case List((FUNCTION, LOADING_THEORY), (NAME, name)) => Some(name) |
582 case List((FUNCTION, LOADING_THEORY), (NAME, name)) => Some(name) |
583 case _ => None |
583 case _ => None |
584 } |
584 } |
585 } |
585 } |
586 |
586 |
|
587 val BUILD_SESSION_FINISHED = "build_session_finished" |
|
588 val Build_Session_Finished: Properties.T = List((FUNCTION, BUILD_SESSION_FINISHED)) |
|
589 |
|
590 val PRINT_OPERATIONS = "print_operations" |
|
591 |
|
592 |
|
593 |
|
594 /* export */ |
|
595 |
587 val EXPORT = "export" |
596 val EXPORT = "export" |
|
597 |
588 object Export |
598 object Export |
589 { |
599 { |
590 sealed case class Args( |
600 sealed case class Args( |
591 id: Option[String], serial: Long, theory_name: String, name: String, compress: Boolean) |
601 id: Option[String], |
|
602 serial: Long, |
|
603 theory_name: String, |
|
604 name: String, |
|
605 executable: Boolean, |
|
606 compress: Boolean) |
592 |
607 |
593 val THEORY_NAME = "theory_name" |
608 val THEORY_NAME = "theory_name" |
|
609 val EXECUTABLE = "executable" |
594 val COMPRESS = "compress" |
610 val COMPRESS = "compress" |
595 |
611 |
596 def dest_inline(props: Properties.T): Option[(Args, Path)] = |
612 def dest_inline(props: Properties.T): Option[(Args, Path)] = |
597 props match { |
613 props match { |
598 case |
614 case |
599 List( |
615 List( |
600 (SERIAL, Value.Long(serial)), |
616 (SERIAL, Value.Long(serial)), |
601 (THEORY_NAME, theory_name), |
617 (THEORY_NAME, theory_name), |
602 (NAME, name), |
618 (NAME, name), |
|
619 (EXECUTABLE, Value.Boolean(executable)), |
603 (COMPRESS, Value.Boolean(compress)), |
620 (COMPRESS, Value.Boolean(compress)), |
604 (FILE, file)) if isabelle.Path.is_valid(file) => |
621 (FILE, file)) if isabelle.Path.is_valid(file) => |
605 Some((Args(None, serial, theory_name, name, compress), isabelle.Path.explode(file))) |
622 val args = Args(None, serial, theory_name, name, executable, compress) |
|
623 Some((args, isabelle.Path.explode(file))) |
606 case _ => None |
624 case _ => None |
607 } |
625 } |
608 |
626 |
609 def unapply(props: Properties.T): Option[Args] = |
627 def unapply(props: Properties.T): Option[Args] = |
610 props match { |
628 props match { |
612 (FUNCTION, EXPORT), |
630 (FUNCTION, EXPORT), |
613 (ID, id), |
631 (ID, id), |
614 (SERIAL, Value.Long(serial)), |
632 (SERIAL, Value.Long(serial)), |
615 (THEORY_NAME, theory_name), |
633 (THEORY_NAME, theory_name), |
616 (NAME, name), |
634 (NAME, name), |
|
635 (EXECUTABLE, Value.Boolean(executable)), |
617 (COMPRESS, Value.Boolean(compress))) => |
636 (COMPRESS, Value.Boolean(compress))) => |
618 Some(Args(proper_string(id), serial, theory_name, name, compress)) |
637 Some(Args(proper_string(id), serial, theory_name, name, executable, compress)) |
619 case _ => None |
638 case _ => None |
620 } |
639 } |
621 } |
640 } |
622 |
|
623 val BUILD_SESSION_FINISHED = "build_session_finished" |
|
624 val Build_Session_Finished: Properties.T = List((FUNCTION, BUILD_SESSION_FINISHED)) |
|
625 |
|
626 val PRINT_OPERATIONS = "print_operations" |
|
627 |
641 |
628 |
642 |
629 /* debugger output */ |
643 /* debugger output */ |
630 |
644 |
631 val DEBUGGER_STATE = "debugger_state" |
645 val DEBUGGER_STATE = "debugger_state" |