author | wenzelm |
Tue, 18 Sep 2018 11:05:14 +0200 | |
changeset 69012 | c91d14ab065f |
parent 69010 | b6aad6338488 |
child 69013 | bb4e4c253ebe |
permissions | -rw-r--r-- |
68308
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
1 |
/* Title: Pure/Tools/dump.scala |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
2 |
Author: Makarius |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
3 |
|
68348 | 4 |
Dump cumulative PIDE session database. |
68308
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
5 |
*/ |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
6 |
|
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
7 |
package isabelle |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
8 |
|
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
9 |
|
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
10 |
object Dump |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
11 |
{ |
68316 | 12 |
/* aspects */ |
13 |
||
14 |
sealed case class Aspect_Args( |
|
68355 | 15 |
options: Options, |
16 |
progress: Progress, |
|
68365 | 17 |
deps: Sessions.Deps, |
68355 | 18 |
output_dir: Path, |
68929 | 19 |
snapshot: Document.Snapshot, |
20 |
node_status: Document_Status.Node_Status) |
|
68319 | 21 |
{ |
68365 | 22 |
def write(file_name: Path, bytes: Bytes) |
68319 | 23 |
{ |
68929 | 24 |
val path = output_dir + Path.basic(snapshot.node_name.theory) + file_name |
68319 | 25 |
Isabelle_System.mkdirs(path.dir) |
26 |
Bytes.write(path, bytes) |
|
27 |
} |
|
28 |
||
68365 | 29 |
def write(file_name: Path, text: String): Unit = |
30 |
write(file_name, Bytes(text)) |
|
68332 | 31 |
|
68365 | 32 |
def write(file_name: Path, body: XML.Body): Unit = |
33 |
write(file_name, Symbol.encode(YXML.string_of_body(body))) |
|
68319 | 34 |
} |
68316 | 35 |
|
68347 | 36 |
sealed case class Aspect(name: String, description: String, operation: Aspect_Args => Unit, |
37 |
options: List[String] = Nil) |
|
68345 | 38 |
{ |
39 |
override def toString: String = name |
|
40 |
} |
|
68316 | 41 |
|
68347 | 42 |
val known_aspects = |
68316 | 43 |
List( |
68365 | 44 |
Aspect("markup", "PIDE markup (YXML format)", |
45 |
{ case args => |
|
46 |
args.write(Path.explode("markup.yxml"), |
|
47 |
args.snapshot.markup_to_XML(Text.Range.full, Markup.Elements.full)) |
|
48 |
}), |
|
68319 | 49 |
Aspect("messages", "output messages (YXML format)", |
50 |
{ case args => |
|
68365 | 51 |
args.write(Path.explode("messages.yxml"), |
52 |
args.snapshot.messages.iterator.map(_._1).toList) |
|
68347 | 53 |
}), |
54 |
Aspect("latex", "generated LaTeX source", |
|
55 |
{ case args => |
|
68365 | 56 |
for (entry <- args.snapshot.exports if entry.name == "document.tex") |
57 |
args.write(Path.explode(entry.name), entry.uncompressed()) |
|
68491
f0f83ce0badd
disable export_document by default (presently unused and for demo/testing purposes): avoid spurious IO exception in highly parallel environment;
wenzelm
parents:
68416
diff
changeset
|
58 |
}, options = List("editor_presentation", "export_document")), |
68347 | 59 |
Aspect("theory", "foundational theory content", |
60 |
{ case args => |
|
61 |
for { |
|
68365 | 62 |
entry <- args.snapshot.exports |
68347 | 63 |
if entry.name.startsWith(Export_Theory.export_prefix) |
68365 | 64 |
} args.write(Path.explode(entry.name), entry.uncompressed()) |
68347 | 65 |
}, options = List("editor_presentation", "export_theory")) |
68345 | 66 |
).sortBy(_.name) |
68316 | 67 |
|
68 |
def show_aspects: String = |
|
68345 | 69 |
cat_lines(known_aspects.map(aspect => aspect.name + " - " + aspect.description)) |
68316 | 70 |
|
71 |
def the_aspect(name: String): Aspect = |
|
72 |
known_aspects.find(aspect => aspect.name == name) getOrElse |
|
73 |
error("Unknown aspect " + quote(name)) |
|
74 |
||
75 |
||
76 |
/* dump */ |
|
77 |
||
68945 | 78 |
val default_output_dir: Path = Path.explode("dump") |
68316 | 79 |
|
68416 | 80 |
def make_options(options: Options, aspects: List[Aspect]): Options = |
68895 | 81 |
{ |
68954
8be4030394b8
implicit use of NUMA policy, absorbing potential errors;
wenzelm
parents:
68951
diff
changeset
|
82 |
val options0 = if (NUMA.enabled) NUMA.policy_options(options) else options |
8be4030394b8
implicit use of NUMA policy, absorbing potential errors;
wenzelm
parents:
68951
diff
changeset
|
83 |
val options1 = options0 + "completion_limit=0" + "ML_statistics=false" + "parallel_proofs=0" |
68895 | 84 |
(options1 /: aspects)({ case (opts, aspect) => (opts /: aspect.options)(_ + _) }) |
85 |
} |
|
68416 | 86 |
|
68308
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
87 |
def dump(options: Options, logic: String, |
68316 | 88 |
aspects: List[Aspect] = Nil, |
68308
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
89 |
progress: Progress = No_Progress, |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
90 |
log: Logger = No_Logger, |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
91 |
dirs: List[Path] = Nil, |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
92 |
select_dirs: List[Path] = Nil, |
68316 | 93 |
output_dir: Path = default_output_dir, |
68308
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
94 |
verbose: Boolean = false, |
69012 | 95 |
commit_cleanup_delay: Time = Headless.default_commit_cleanup_delay, |
96 |
watchdog_timeout: Time = Headless.default_watchdog_timeout, |
|
68308
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
97 |
system_mode: Boolean = false, |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
98 |
selection: Sessions.Selection = Sessions.Selection.empty): Process_Result = |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
99 |
{ |
68537 | 100 |
if (Build.build_logic(options, logic, build_heap = true, progress = progress, |
68743 | 101 |
dirs = dirs ::: select_dirs, system_mode = system_mode) != 0) error(logic + " FAILED") |
68308
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
102 |
|
68416 | 103 |
val dump_options = make_options(options, aspects) |
68308
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
104 |
|
68318 | 105 |
|
106 |
/* dependencies */ |
|
107 |
||
68308
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
108 |
val deps = |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
109 |
Sessions.load_structure(dump_options, dirs = dirs, select_dirs = select_dirs). |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
110 |
selection_deps(selection) |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
111 |
|
68318 | 112 |
val include_sessions = |
113 |
deps.sessions_structure.imports_topological_order |
|
114 |
||
69010 | 115 |
val use_theories = deps.used_theories_conditions(progress.echo_warning) |
68318 | 116 |
|
117 |
||
68926 | 118 |
/* dump aspects asynchronously */ |
119 |
||
120 |
object Consumer |
|
121 |
{ |
|
68930 | 122 |
private val consumer_ok = Synchronized(true) |
68926 | 123 |
|
124 |
private val consumer = |
|
125 |
Consumer_Thread.fork(name = "dump")( |
|
126 |
consume = (args: (Document.Snapshot, Document_Status.Node_Status)) => |
|
127 |
{ |
|
128 |
val (snapshot, node_status) = args |
|
129 |
if (node_status.ok) { |
|
130 |
val aspect_args = |
|
68929 | 131 |
Aspect_Args(dump_options, progress, deps, output_dir, snapshot, node_status) |
68926 | 132 |
aspects.foreach(_.operation(aspect_args)) |
133 |
} |
|
68930 | 134 |
else { |
135 |
consumer_ok.change(_ => false) |
|
136 |
for ((tree, pos) <- snapshot.messages if Protocol.is_error(tree)) { |
|
137 |
val msg = XML.content(Pretty.formatted(List(tree))) |
|
138 |
progress.echo_error_message("Error" + Position.here(pos) + ":\n" + msg) |
|
139 |
} |
|
68926 | 140 |
} |
141 |
true |
|
142 |
}) |
|
143 |
||
144 |
def apply(snapshot: Document.Snapshot, node_status: Document_Status.Node_Status): Unit = |
|
145 |
consumer.send((snapshot, node_status)) |
|
146 |
||
68930 | 147 |
def shutdown(): Boolean = |
68926 | 148 |
{ |
149 |
consumer.shutdown() |
|
68930 | 150 |
consumer_ok.value |
68926 | 151 |
} |
152 |
} |
|
153 |
||
154 |
||
68318 | 155 |
/* session */ |
156 |
||
68308
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
157 |
val session = |
69012 | 158 |
Headless.start_session(dump_options, logic, session_dirs = dirs ::: select_dirs, |
68318 | 159 |
include_sessions = include_sessions, progress = progress, log = log) |
68308
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
160 |
|
68926 | 161 |
val theories_result = |
68936
90c08c7bab9c
continuously clean frontier of already committed theories: much less resource requirements;
wenzelm
parents:
68930
diff
changeset
|
162 |
session.use_theories(use_theories, |
90c08c7bab9c
continuously clean frontier of already committed theories: much less resource requirements;
wenzelm
parents:
68930
diff
changeset
|
163 |
progress = progress, |
90c08c7bab9c
continuously clean frontier of already committed theories: much less resource requirements;
wenzelm
parents:
68930
diff
changeset
|
164 |
commit = Some(Consumer.apply _), |
68981 | 165 |
commit_cleanup_delay = commit_cleanup_delay, |
68945 | 166 |
watchdog_timeout = watchdog_timeout) |
68926 | 167 |
|
68320
1d33697199c1
shutdown ML process before output: Theories_Result is timeless/stateless;
wenzelm
parents:
68319
diff
changeset
|
168 |
val session_result = session.stop() |
1d33697199c1
shutdown ML process before output: Theories_Result is timeless/stateless;
wenzelm
parents:
68319
diff
changeset
|
169 |
|
68930 | 170 |
val consumer_ok = Consumer.shutdown() |
68320
1d33697199c1
shutdown ML process before output: Theories_Result is timeless/stateless;
wenzelm
parents:
68319
diff
changeset
|
171 |
|
68930 | 172 |
if (theories_result.ok && consumer_ok) session_result |
173 |
else session_result.error_rc |
|
68308
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
174 |
} |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
175 |
|
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
176 |
|
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
177 |
/* Isabelle tool wrapper */ |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
178 |
|
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
179 |
val isabelle_tool = |
68348 | 180 |
Isabelle_Tool("dump", "dump cumulative PIDE session database", args => |
68308
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
181 |
{ |
68345 | 182 |
var aspects: List[Aspect] = known_aspects |
68308
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
183 |
var base_sessions: List[String] = Nil |
69012 | 184 |
var commit_cleanup_delay = Headless.default_commit_cleanup_delay |
68308
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
185 |
var select_dirs: List[Path] = Nil |
68316 | 186 |
var output_dir = default_output_dir |
68308
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
187 |
var requirements = false |
69012 | 188 |
var watchdog_timeout = Headless.default_watchdog_timeout |
68308
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
189 |
var exclude_session_groups: List[String] = Nil |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
190 |
var all_sessions = false |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
191 |
var dirs: List[Path] = Nil |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
192 |
var session_groups: List[String] = Nil |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
193 |
var logic = Isabelle_System.getenv("ISABELLE_LOGIC") |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
194 |
var options = Options.init() |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
195 |
var system_mode = false |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
196 |
var verbose = false |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
197 |
var exclude_sessions: List[String] = Nil |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
198 |
|
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
199 |
val getopts = Getopts(""" |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
200 |
Usage: isabelle dump [OPTIONS] [SESSIONS ...] |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
201 |
|
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
202 |
Options are: |
68345 | 203 |
-A NAMES dump named aspects (default: """ + known_aspects.mkString("\"", ",", "\"") + """) |
68308
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
204 |
-B NAME include session NAME and all descendants |
68947 | 205 |
-C SECONDS delay for cleaning of already dumped theories (0 = disabled, default: """ + |
69012 | 206 |
Value.Seconds(Headless.default_commit_cleanup_delay) + """) |
68308
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
207 |
-D DIR include session directory and select its sessions |
68316 | 208 |
-O DIR output directory for dumped files (default: """ + default_output_dir + """) |
68308
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
209 |
-R operate on requirements of selected sessions |
68948 | 210 |
-W SECONDS watchdog timeout for PIDE processing (0 = disabled, default: """ + |
69012 | 211 |
Value.Seconds(Headless.default_watchdog_timeout) + """) |
68308
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
212 |
-X NAME exclude sessions from group NAME and all descendants |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
213 |
-a select all sessions |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
214 |
-d DIR include session directory |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
215 |
-g NAME select session group NAME |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
216 |
-l NAME logic session name (default ISABELLE_LOGIC=""" + quote(logic) + """) |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
217 |
-o OPTION override Isabelle system OPTION (via NAME=VAL or NAME) |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
218 |
-s system build mode for logic image |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
219 |
-v verbose |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
220 |
-x NAME exclude session NAME and all descendants |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
221 |
|
68348 | 222 |
Dump cumulative PIDE session database, with the following aspects: |
68316 | 223 |
|
224 |
""" + Library.prefix_lines(" ", show_aspects) + "\n", |
|
225 |
"A:" -> (arg => aspects = Library.distinct(space_explode(',', arg)).map(the_aspect(_))), |
|
68308
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
226 |
"B:" -> (arg => base_sessions = base_sessions ::: List(arg)), |
68981 | 227 |
"C:" -> (arg => commit_cleanup_delay = Value.Seconds.parse(arg)), |
68308
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
228 |
"D:" -> (arg => select_dirs = select_dirs ::: List(Path.explode(arg))), |
68316 | 229 |
"O:" -> (arg => output_dir = Path.explode(arg)), |
68308
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
230 |
"R" -> (_ => requirements = true), |
68945 | 231 |
"W:" -> (arg => watchdog_timeout = Value.Seconds.parse(arg)), |
68308
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
232 |
"X:" -> (arg => exclude_session_groups = exclude_session_groups ::: List(arg)), |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
233 |
"a" -> (_ => all_sessions = true), |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
234 |
"d:" -> (arg => dirs = dirs ::: List(Path.explode(arg))), |
68741 | 235 |
"g:" -> (arg => session_groups = session_groups ::: List(arg)), |
68308
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
236 |
"l:" -> (arg => logic = arg), |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
237 |
"o:" -> (arg => options = options + arg), |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
238 |
"s" -> (_ => system_mode = true), |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
239 |
"v" -> (_ => verbose = true), |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
240 |
"x:" -> (arg => exclude_sessions = exclude_sessions ::: List(arg))) |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
241 |
|
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
242 |
val sessions = getopts(args) |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
243 |
|
68951
a7b1fe2d30ad
more uniform Progress, with theory() for batch-build and theory_percentage() for PIDE session;
wenzelm
parents:
68948
diff
changeset
|
244 |
val progress = new Console_Progress(verbose = verbose) |
68308
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
245 |
|
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
246 |
val result = |
68331 | 247 |
progress.interrupt_handler { |
248 |
dump(options, logic, |
|
249 |
aspects = aspects, |
|
250 |
progress = progress, |
|
251 |
dirs = dirs, |
|
252 |
select_dirs = select_dirs, |
|
253 |
output_dir = output_dir, |
|
68981 | 254 |
commit_cleanup_delay = commit_cleanup_delay, |
68945 | 255 |
watchdog_timeout = watchdog_timeout, |
68331 | 256 |
verbose = verbose, |
257 |
selection = Sessions.Selection( |
|
258 |
requirements = requirements, |
|
259 |
all_sessions = all_sessions, |
|
260 |
base_sessions = base_sessions, |
|
261 |
exclude_session_groups = exclude_session_groups, |
|
262 |
exclude_sessions = exclude_sessions, |
|
263 |
session_groups = session_groups, |
|
264 |
sessions = sessions)) |
|
265 |
} |
|
68308
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
266 |
|
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
267 |
progress.echo(result.timing.message_resources) |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
268 |
|
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
269 |
sys.exit(result.rc) |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
270 |
}) |
119fc05f6b00
support to dump build database produced by PIDE session;
wenzelm
parents:
diff
changeset
|
271 |
} |