Summary: Make the html output available to checkers when -g is used on the command-line. A checker needs to call a function to start and finish the processing of each node, and add prints during the processing. This diff illustrates the case for Eradicate, by adding printing of the pre-state and post-states. Reviewed By: sblackshear Differential Revision: D4421379 fbshipit-source-id: 67501bamaster
parent
6050ff2b99
commit
1eaaf84a90
@ -0,0 +1,43 @@
|
||||
(*
|
||||
* Copyright (c) 2013 - present Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*)
|
||||
|
||||
open! IStd
|
||||
|
||||
|
||||
module L = Logging
|
||||
module F = Format
|
||||
|
||||
(** Simplified html node printer for checkers *)
|
||||
|
||||
(** Mark the node visited and return the new session number *)
|
||||
let new_session node =
|
||||
let pname = Procdesc.Node.get_proc_name node in
|
||||
let node_id = (Procdesc.Node.get_id node :> int) in
|
||||
match Specs.get_summary pname with
|
||||
| None ->
|
||||
0
|
||||
| Some summary ->
|
||||
summary.stats.nodes_visited_fp <- IntSet.add node_id summary.stats.nodes_visited_fp;
|
||||
incr summary.Specs.sessions;
|
||||
!(summary.Specs.sessions)
|
||||
|
||||
let start_session node =
|
||||
if Config.write_html then
|
||||
begin
|
||||
let session = new_session node in
|
||||
let source = (Procdesc.Node.get_loc node).file in
|
||||
Printer.node_start_session node session source
|
||||
end
|
||||
|
||||
let finish_session node =
|
||||
if Config.write_html then
|
||||
begin
|
||||
let source = (Procdesc.Node.get_loc node).file in
|
||||
Printer.node_finish_session node source
|
||||
end
|
@ -0,0 +1,18 @@
|
||||
(*
|
||||
* Copyright (c) 2013 - present Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*)
|
||||
|
||||
open! IStd
|
||||
|
||||
(** Simplified html node printer for checkers *)
|
||||
|
||||
(** To be called before analyzing a node *)
|
||||
val start_session : Procdesc.Node.t -> unit
|
||||
|
||||
(** To be called after analyzing a node *)
|
||||
val finish_session : Procdesc.Node.t -> unit
|
Loading…
Reference in new issue