-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathIsabelle2024-CyPhyAssure.diff
180 lines (161 loc) · 12.7 KB
/
Isabelle2024-CyPhyAssure.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
diff -ur Isabelle2024/contrib/jedit-20240425/etc/settings Isabelle2024-CyPhyAssure/contrib/jedit-20240425/etc/settings
--- Isabelle2024/contrib/jedit-20240425/etc/settings 2024-04-25 12:25:43
+++ Isabelle2024-CyPhyAssure/contrib/jedit-20240425/etc/settings 2025-01-03 12:06:32
@@ -4,6 +4,8 @@
JEDIT_JARS="$JEDIT_HOME/jars/Code2HTML.jar:$JEDIT_HOME/jars/CommonControls.jar:$JEDIT_HOME/jars/Console.jar:$JEDIT_HOME/jars/ErrorList.jar:$JEDIT_HOME/jars/Highlight.jar:$JEDIT_HOME/jars/Navigator.jar:$JEDIT_HOME/jars/QuickNotepad.jar:$JEDIT_HOME/jars/SideKick.jar:$JEDIT_HOME/jars/jsr305-3.0.2.jar:$JEDIT_HOME/jars/kappalayout.jar"
JEDIT_JAR="$JEDIT_HOME/jedit.jar"
classpath "$JEDIT_JAR"
+classpath "$JEDIT_HOME/jars/Console.jar"
+classpath "$JEDIT_HOME/jars/ErrorList.jar"
JEDIT_SETTINGS="$ISABELLE_HOME_USER/jedit"
JEDIT_OPTIONS="-reuseview -nobackground -nosplash -log=9"
diff -ur Isabelle2024/contrib/jedit-20240425/jedit5.6.0-patched/properties/jEdit.props Isabelle2024-CyPhyAssure/contrib/jedit-20240425/jedit5.6.0-patched/properties/jEdit.props
--- Isabelle2024/contrib/jedit-20240425/jedit5.6.0-patched/properties/jEdit.props 2024-05-23 12:00:02
+++ Isabelle2024-CyPhyAssure/contrib/jedit-20240425/jedit5.6.0-patched/properties/jEdit.props 2025-01-03 12:07:31
@@ -11,7 +11,7 @@
buffer.undoCount=1000
close-docking-area.shortcut2=C+e C+CIRCUMFLEX
complete-word.shortcut=
-console.dock-position=floating
+console.dock-position=bottom
console.encoding=UTF-8
console.font=Isabelle DejaVu Sans Mono
console.fontsize=14
diff -ur Isabelle2024/etc/build.props Isabelle2024-CyPhyAssure/etc/build.props
--- Isabelle2024/etc/build.props 2024-05-20 14:43:51
+++ Isabelle2024-CyPhyAssure/etc/build.props 2025-01-03 12:08:52
@@ -1,6 +1,8 @@
title = Isabelle/Scala
module = $ISABELLE_HOME/lib/classes/isabelle.jar
main = isabelle.jedit.JEdit_Main
+requirements = \
+ env:JEDIT_JARS
resources = \
lib/services/java.nio.charset.spi.CharsetProvider:META-INF/services/ \
lib/logo/isabelle_transparent-32.gif:isabelle/ \
diff -ur Isabelle2024/lib/scripts/Isabelle_app Isabelle2024-CyPhyAssure/lib/scripts/Isabelle_app
--- Isabelle2024/lib/scripts/Isabelle_app 2024-05-23 12:00:02
+++ Isabelle2024-CyPhyAssure/lib/scripts/Isabelle_app 2025-01-03 12:11:57
@@ -28,7 +28,7 @@
exec "$ISABELLE_JDK_HOME/bin/java" \
"-Disabelle.root=$ISABELLE_HOME" "${JAVA_OPTIONS[@]}" \
- -classpath "$ISABELLE_HOME/contrib/flatlaf-2.6/lib/flatlaf-2.6.jar:$ISABELLE_HOME/contrib/isabelle_setup-20240327/lib/isabelle_setup.jar:$ISABELLE_HOME/contrib/javamail-20240109/lib/jakarta.mail-api-2.1.2.jar:$ISABELLE_HOME/contrib/javamail-20240109/lib/jakarta.activation-api-2.1.2.jar:$ISABELLE_HOME/contrib/javamail-20240109/lib/angus-mail-2.0.2.jar:$ISABELLE_HOME/contrib/javamail-20240109/lib/angus-activation-2.0.1.jar:$ISABELLE_HOME/contrib/jedit-20240425/jedit5.6.0-patched/jedit.jar:$ISABELLE_HOME/contrib/jfreechart-1.5.3/lib/iText-2.1.5.jar:$ISABELLE_HOME/contrib/jfreechart-1.5.3/lib/jfreechart-1.5.3.jar:$ISABELLE_HOME/contrib/jortho-1.0-2/jortho.jar:$ISABELLE_HOME/contrib/jsoup-1.17.2/lib/jsoup-1.17.2.jar:$ISABELLE_HOME/contrib/kodkodi-1.5.7/jar/antlr-runtime-3.1.1.jar:$ISABELLE_HOME/contrib/kodkodi-1.5.7/jar/kodkod-1.5.jar:$ISABELLE_HOME/contrib/kodkodi-1.5.7/jar/kodkodi-1.5.7.jar:$ISABELLE_HOME/contrib/kodkodi-1.5.7/jar/sat4j-2.3.jar:$ISABELLE_HOME/contrib/postgresql-42.7.3/lib/postgresql-42.7.3.jar:$ISABELLE_HOME/contrib/scala-3.3.3/lib/scala-library-2.13.12.jar:$ISABELLE_HOME/contrib/scala-3.3.3/lib/scala3-library_3-3.3.3.jar:$ISABELLE_HOME/contrib/scala-3.3.3/lib/scala-asm-9.5.0-scala-1.jar:$ISABELLE_HOME/contrib/scala-3.3.3/lib/compiler-interface-1.9.3.jar:$ISABELLE_HOME/contrib/scala-3.3.3/lib/scala3-interfaces-3.3.3.jar:$ISABELLE_HOME/contrib/scala-3.3.3/lib/scala3-compiler_3-3.3.3.jar:$ISABELLE_HOME/contrib/scala-3.3.3/lib/tasty-core_3-3.3.3.jar:$ISABELLE_HOME/contrib/scala-3.3.3/lib/scala3-staging_3-3.3.3.jar:$ISABELLE_HOME/contrib/scala-3.3.3/lib/scala3-tasty-inspector_3-3.3.3.jar:$ISABELLE_HOME/contrib/scala-3.3.3/lib/jline-reader-3.19.0.jar:$ISABELLE_HOME/contrib/scala-3.3.3/lib/jline-terminal-3.19.0.jar:$ISABELLE_HOME/contrib/scala-3.3.3/lib/jline-terminal-jna-3.19.0.jar:$ISABELLE_HOME/contrib/scala-3.3.3/lib/jna-5.3.1.jar:$ISABELLE_HOME/contrib/scala-3.3.3/lib/scala-parallel-collections_3-1.0.4.jar:$ISABELLE_HOME/contrib/scala-3.3.3/lib/scala-parser-combinators_3-2.3.0.jar:$ISABELLE_HOME/contrib/scala-3.3.3/lib/scala-swing_3-3.0.0.jar:$ISABELLE_HOME/contrib/scala-3.3.3/lib/scala-xml_3-2.2.0.jar:$ISABELLE_HOME/contrib/sqlite-3.45.2.0/lib/sqlite-jdbc-3.45.2.0.jar:$ISABELLE_HOME/contrib/sqlite-3.45.2.0/lib/slf4j-api-1.7.36.jar:$ISABELLE_HOME/contrib/sqlite-3.45.2.0/lib/slf4j-nop-1.7.36.jar:$ISABELLE_HOME/contrib/xz-java-1.9/lib/xz-1.9.jar:$ISABELLE_HOME/contrib/zstd-jni-1.5.5-4/zstd-jni-1.5.5-4.jar:$ISABELLE_HOME/contrib/naproche-20240519/Isabelle/naproche.jar:$ISABELLE_HOME/lib/classes/isabelle.jar:$ISABELLE_HOME/src/Tools/Demo/lib/demo.jar:$ISABELLE_HOME/lib/classes/isabelle_graphbrowser.jar" \
+ -classpath "$ISABELLE_HOME/contrib/flatlaf-2.6/lib/flatlaf-2.6.jar:$ISABELLE_HOME/contrib/isabelle_setup-20240327/lib/isabelle_setup.jar:$ISABELLE_HOME/contrib/javamail-20240109/lib/jakarta.mail-api-2.1.2.jar:$ISABELLE_HOME/contrib/javamail-20240109/lib/jakarta.activation-api-2.1.2.jar:$ISABELLE_HOME/contrib/javamail-20240109/lib/angus-mail-2.0.2.jar:$ISABELLE_HOME/contrib/javamail-20240109/lib/angus-activation-2.0.1.jar:$ISABELLE_HOME/contrib/jedit-20240425/jedit5.6.0-patched/jedit.jar:$ISABELLE_HOME/contrib/jedit-20240425/jedit5.6.0-patched/jars/Console.jar::$ISABELLE_HOME/contrib/jedit-20240425/jedit5.6.0-patched/jars/ErrorList.jar:$ISABELLE_HOME/contrib/jfreechart-1.5.3/lib/iText-2.1.5.jar:$ISABELLE_HOME/contrib/jfreechart-1.5.3/lib/jfreechart-1.5.3.jar:$ISABELLE_HOME/contrib/jortho-1.0-2/jortho.jar:$ISABELLE_HOME/contrib/jsoup-1.17.2/lib/jsoup-1.17.2.jar:$ISABELLE_HOME/contrib/kodkodi-1.5.7/jar/antlr-runtime-3.1.1.jar:$ISABELLE_HOME/contrib/kodkodi-1.5.7/jar/kodkod-1.5.jar:$ISABELLE_HOME/contrib/kodkodi-1.5.7/jar/kodkodi-1.5.7.jar:$ISABELLE_HOME/contrib/kodkodi-1.5.7/jar/sat4j-2.3.jar:$ISABELLE_HOME/contrib/postgresql-42.7.3/lib/postgresql-42.7.3.jar:$ISABELLE_HOME/contrib/scala-3.3.3/lib/scala-library-2.13.12.jar:$ISABELLE_HOME/contrib/scala-3.3.3/lib/scala3-library_3-3.3.3.jar:$ISABELLE_HOME/contrib/scala-3.3.3/lib/scala-asm-9.5.0-scala-1.jar:$ISABELLE_HOME/contrib/scala-3.3.3/lib/compiler-interface-1.9.3.jar:$ISABELLE_HOME/contrib/scala-3.3.3/lib/scala3-interfaces-3.3.3.jar:$ISABELLE_HOME/contrib/scala-3.3.3/lib/scala3-compiler_3-3.3.3.jar:$ISABELLE_HOME/contrib/scala-3.3.3/lib/tasty-core_3-3.3.3.jar:$ISABELLE_HOME/contrib/scala-3.3.3/lib/scala3-staging_3-3.3.3.jar:$ISABELLE_HOME/contrib/scala-3.3.3/lib/scala3-tasty-inspector_3-3.3.3.jar:$ISABELLE_HOME/contrib/scala-3.3.3/lib/jline-reader-3.19.0.jar:$ISABELLE_HOME/contrib/scala-3.3.3/lib/jline-terminal-3.19.0.jar:$ISABELLE_HOME/contrib/scala-3.3.3/lib/jline-terminal-jna-3.19.0.jar:$ISABELLE_HOME/contrib/scala-3.3.3/lib/jna-5.3.1.jar:$ISABELLE_HOME/contrib/scala-3.3.3/lib/scala-parallel-collections_3-1.0.4.jar:$ISABELLE_HOME/contrib/scala-3.3.3/lib/scala-parser-combinators_3-2.3.0.jar:$ISABELLE_HOME/contrib/scala-3.3.3/lib/scala-swing_3-3.0.0.jar:$ISABELLE_HOME/contrib/scala-3.3.3/lib/scala-xml_3-2.2.0.jar:$ISABELLE_HOME/contrib/sqlite-3.45.2.0/lib/sqlite-jdbc-3.45.2.0.jar:$ISABELLE_HOME/contrib/sqlite-3.45.2.0/lib/slf4j-api-1.7.36.jar:$ISABELLE_HOME/contrib/sqlite-3.45.2.0/lib/slf4j-nop-1.7.36.jar:$ISABELLE_HOME/contrib/xz-java-1.9/lib/xz-1.9.jar:$ISABELLE_HOME/contrib/zstd-jni-1.5.5-4/zstd-jni-1.5.5-4.jar:$ISABELLE_HOME/contrib/naproche-20240519/Isabelle/naproche.jar:$ISABELLE_HOME/lib/classes/isabelle.jar:$ISABELLE_HOME/src/Tools/Demo/lib/demo.jar:$ISABELLE_HOME/lib/classes/isabelle_graphbrowser.jar" \
"-splash:$ISABELLE_HOME/lib/logo/isabelle.gif" \
"-Xdock:icon=$ISABELLE_HOME/lib/logo/isabelle_transparent-128.png" \
isabelle.jedit.JEdit_Main "$@"
Only in Isabelle2024-CyPhyAssure/lib/scripts: Isabelle_app~
diff -ur Isabelle2024/src/Pure/PIDE/active.ML Isabelle2024-CyPhyAssure/src/Pure/PIDE/active.ML
--- Isabelle2024/src/Pure/PIDE/active.ML 2024-05-20 14:43:51
+++ Isabelle2024-CyPhyAssure/src/Pure/PIDE/active.ML 2025-01-03 12:15:16
@@ -14,6 +14,8 @@
val dialog: unit -> (string -> Markup.T) * string future
val dialog_text: unit -> (string -> string) * string future
val dialog_result: serial -> string -> unit
+ val run_shell_command: string -> string option -> string -> string -> string
+ val run_system_shell_command: string option -> string -> string -> string
end;
structure Active: ACTIVE =
@@ -62,6 +64,16 @@
Synchronized.change_result dialogs
(fn tab => (Inttab.lookup tab i, Inttab.delete_safe i tab))
|> (fn NONE => () | SOME promise => Future.fulfill promise result);
+
+fun run_shell_command shell dir cmd =
+ let val dirprop = (case dir of NONE => [] | SOME d => [(Markup.shell_directoryN, d)])
+ in Markup.markup
+ (make_markup Markup.run_shell_commandN
+ {implicit = false
+ ,properties = [(Markup.shell_typeN, shell), (Markup.shell_commandN, cmd)] @ dirprop})
+ end
+
+val run_system_shell_command = run_shell_command "System";
end;
diff -ur Isabelle2024/src/Pure/PIDE/markup.ML Isabelle2024-CyPhyAssure/src/Pure/PIDE/markup.ML
--- Isabelle2024/src/Pure/PIDE/markup.ML 2024-05-20 14:43:51
+++ Isabelle2024-CyPhyAssure/src/Pure/PIDE/markup.ML 2025-01-03 12:16:53
@@ -243,6 +243,10 @@
val padding_command: Properties.entry
val dialogN: string val dialog: serial -> string -> T
val jedit_actionN: string
+ val run_shell_commandN: string
+ val shell_commandN: string
+ val shell_typeN: string
+ val shell_directoryN: string
val function: string -> Properties.entry
val ML_statistics: {pid: int, stats_dir: string} -> Properties.T
val commands_accepted: Properties.T
@@ -763,6 +767,13 @@
val jedit_actionN = "jedit_action";
+val run_shell_commandN = "run_shell_command"
+
+val shell_commandN = "shell_command"
+
+val shell_typeN = "shell_type"
+
+val shell_directoryN = "shell_directory"
(* protocol message functions *)
diff -ur Isabelle2024/src/Pure/PIDE/markup.scala Isabelle2024-CyPhyAssure/src/Pure/PIDE/markup.scala
--- Isabelle2024/src/Pure/PIDE/markup.scala 2024-05-20 14:43:51
+++ Isabelle2024-CyPhyAssure/src/Pure/PIDE/markup.scala 2025-01-03 12:17:27
@@ -643,6 +643,10 @@
val JEDIT_ACTION = "jedit_action"
+ val SHELL_COMMAND = "shell_command"
+ val SHELL_TYPE = "shell_type"
+ val SHELL_DIRECTORY = "shell_directory"
+ val RUN_SHELL_COMMAND = "run_shell_command"
/* protocol message functions */
diff -ur Isabelle2024/src/Pure/PIDE/rendering.scala Isabelle2024-CyPhyAssure/src/Pure/PIDE/rendering.scala
--- Isabelle2024/src/Pure/PIDE/rendering.scala 2024-05-20 14:43:51
+++ Isabelle2024-CyPhyAssure/src/Pure/PIDE/rendering.scala 2025-01-03 12:18:24
@@ -208,7 +208,7 @@
val active_elements =
Markup.Elements(Markup.DIALOG, Markup.BROWSER, Markup.GRAPHVIEW, Markup.THEORY_EXPORTS,
- Markup.SENDBACK, Markup.JEDIT_ACTION, Markup.SIMP_TRACE_PANEL)
+ Markup.SENDBACK, Markup.JEDIT_ACTION, Markup.SIMP_TRACE_PANEL, Markup.RUN_SHELL_COMMAND)
val background_elements =
Document_Status.Command_Status.proper_elements + Markup.WRITELN_MESSAGE +
diff -ur Isabelle2024/src/Tools/jEdit/src/active.scala Isabelle2024-CyPhyAssure/src/Tools/jEdit/src/active.scala
--- Isabelle2024/src/Tools/jEdit/src/active.scala 2024-05-20 14:43:51
+++ Isabelle2024-CyPhyAssure/src/Tools/jEdit/src/active.scala 2025-01-03 12:20:27
@@ -9,6 +9,7 @@
import isabelle._
import org.gjt.sp.jedit.{ServiceManager, View}
+import console.{Console, Shell}
object Active {
@@ -98,6 +99,36 @@
case Protocol.Dialog(id, serial, result) =>
model.session.dialog_result(id, serial, result)
true
+
+ case XML.Elem(Markup(Markup.RUN_SHELL_COMMAND, props), _) =>
+ val shell_name = Properties.get(props, Markup.SHELL_TYPE).getOrElse("System")
+ Properties.get (props, Markup.SHELL_COMMAND) match {
+ case None => false
+ case Some(cmd) =>
+ view.getDockableWindowManager().addDockableWindow("console")
+
+ // Obtain the console instance
+ val console = view.getDockableWindowManager().getDockable("console").asInstanceOf[Console]
+
+ // Set the shell to use
+ val shell = Shell.getShell(shell_name)
+
+ shell.stop(console)
+ while (!shell.waitFor(console)) { }
+
+ // Change directory if requested
+ Properties.get(props, Markup.SHELL_DIRECTORY) match {
+ case Some(dir) => shell.chDir(console, dir);
+ case None => {}
+ }
+ while (!shell.waitFor(console)) { }
+
+ // Run the given command
+ console.run(shell, cmd)
+
+ true
+ }
+
case _ => false
}