equal
deleted
inserted
replaced
273 |
273 |
274 val vc_offsets = Scan.optional (Args.bracks (Parse.list1 |
274 val vc_offsets = Scan.optional (Args.bracks (Parse.list1 |
275 (Parse.string --| Args.colon -- Parse.nat))) [] |
275 (Parse.string --| Args.colon -- Parse.nat))) [] |
276 |
276 |
277 val _ = |
277 val _ = |
278 Outer_Syntax.command "boogie_open" |
278 Outer_Syntax.command @{command_spec "boogie_open"} |
279 "open a new Boogie environment and load a Boogie-generated .b2i file" |
279 "open a new Boogie environment and load a Boogie-generated .b2i file" |
280 Keyword.thy_decl |
|
281 (scan_opt "quiet" -- Parse.name -- vc_offsets >> |
280 (scan_opt "quiet" -- Parse.name -- vc_offsets >> |
282 (Toplevel.theory o boogie_open)) |
281 (Toplevel.theory o boogie_open)) |
283 |
282 |
284 |
283 |
285 val vc_name = Parse.name |
284 val vc_name = Parse.name |
301 scan_val "only" vc_labels >> VC_Only || |
300 scan_val "only" vc_labels >> VC_Only || |
302 scan_val "without" vc_labels >> VC_Without) || |
301 scan_val "without" vc_labels >> VC_Without) || |
303 Scan.succeed VC_Complete |
302 Scan.succeed VC_Complete |
304 |
303 |
305 val _ = |
304 val _ = |
306 Outer_Syntax.command "boogie_vc" |
305 Outer_Syntax.command @{command_spec "boogie_vc"} |
307 "enter into proof mode for a specific verification condition" |
306 "enter into proof mode for a specific verification condition" |
308 Keyword.thy_goal |
|
309 (vc_name -- vc_opts >> (fn args => |
307 (vc_name -- vc_opts >> (fn args => |
310 (Toplevel.print o Toplevel.theory_to_proof (boogie_vc args)))) |
308 (Toplevel.print o Toplevel.theory_to_proof (boogie_vc args)))) |
311 |
309 |
312 |
310 |
313 val quick_timeout = 5 |
311 val quick_timeout = 5 |
334 |
332 |
335 fun status_cmd f = Toplevel.no_timing o Toplevel.keep (fn state => |
333 fun status_cmd f = Toplevel.no_timing o Toplevel.keep (fn state => |
336 f (Toplevel.theory_of state)) |
334 f (Toplevel.theory_of state)) |
337 |
335 |
338 val _ = |
336 val _ = |
339 Outer_Syntax.improper_command "boogie_status" |
337 Outer_Syntax.improper_command @{command_spec "boogie_status"} |
340 "show the name and state of all loaded verification conditions" |
338 "show the name and state of all loaded verification conditions" |
341 Keyword.diag |
|
342 (status_test >> status_cmd || |
339 (status_test >> status_cmd || |
343 status_vc >> status_cmd || |
340 status_vc >> status_cmd || |
344 Scan.succeed (status_cmd boogie_status)) |
341 Scan.succeed (status_cmd boogie_status)) |
345 |
342 |
346 |
343 |
347 val _ = |
344 val _ = |
348 Outer_Syntax.command "boogie_end" |
345 Outer_Syntax.command @{command_spec "boogie_end"} |
349 "close the current Boogie environment" |
346 "close the current Boogie environment" |
350 Keyword.thy_decl |
|
351 (Scan.succeed (Toplevel.theory boogie_end)) |
347 (Scan.succeed (Toplevel.theory boogie_end)) |
352 |
348 |
353 |
349 |
354 val setup = Theory.at_end (fn thy => |
350 val setup = Theory.at_end (fn thy => |
355 let |
351 let |