@@ -520,6 +520,85 @@ jsont variable_sensitivity_dependence_domaint::output_json(
520
520
return graph;
521
521
}
522
522
523
+ jsont variable_sensitivity_dependence_domaint::output_json_additional (
524
+ const namespacet &ns,
525
+ const variable_sensitivity_dependence_domaint &base_state) const
526
+ {
527
+ json_arrayt graph;
528
+
529
+ for (const auto &cd : control_deps)
530
+ {
531
+ const goto_programt::const_targett target=cd.first ;
532
+ const tvt branch=cd.second ;
533
+
534
+ json_objectt &link =graph.push_back ().make_object ();
535
+
536
+ link [" locationNumber" ]=
537
+ json_numbert (std::to_string (target->location_number ));
538
+ link [" sourceLocation" ]=json (target->source_location );
539
+ link [" type" ]=json_stringt (" control" );
540
+ link [" branch" ]=json_stringt (branch.to_string ());
541
+ }
542
+
543
+ for (const auto &target : control_dep_calls)
544
+ {
545
+ json_objectt &link =graph.push_back ().make_object ();
546
+ link [" locationNumber" ]=
547
+ json_numbert (std::to_string (target->location_number ));
548
+ link [" sourceLocation" ]=json (target->source_location );
549
+ link [" type" ]=json_stringt (" control" );
550
+ link [" branch" ]=json_stringt (" UNCONDITIONAL" );
551
+ }
552
+
553
+ for (const auto &dep : base_state.domain_data_deps )
554
+ {
555
+ json_objectt &link =graph.push_back ().make_object ();
556
+ link [" locationNumber" ]=
557
+ json_numbert (std::to_string (dep.first ->location_number ));
558
+ link [" sourceLocation" ]=json (dep.first ->source_location );
559
+ json_stringt (dep.first ->source_location .as_string ());
560
+ link [" type" ]=json_stringt (" data" );
561
+ link [" task" ]=json_stringt (" first" );
562
+
563
+ const std::set<exprt> &expr_set=dep.second ;
564
+ json_arrayt &expressions=link [" expressions" ].make_array ();
565
+
566
+ for (const exprt &e : expr_set)
567
+ {
568
+ json_objectt &object=expressions.push_back ().make_object ();
569
+ object[" expression" ]=json_stringt (from_expr (ns, " " , e));
570
+ object[" certainty" ]=json_stringt (" maybe" );
571
+ }
572
+ }
573
+
574
+ for (const auto &dep : domain_data_deps)
575
+ {
576
+ if (base_state.domain_data_deps .find (dep.first ) !=
577
+ base_state.domain_data_deps .end ())
578
+ continue ;
579
+
580
+ json_objectt &link =graph.push_back ().make_object ();
581
+ link [" locationNumber" ]=
582
+ json_numbert (std::to_string (dep.first ->location_number ));
583
+ link [" sourceLocation" ]=json (dep.first ->source_location );
584
+ json_stringt (dep.first ->source_location .as_string ());
585
+ link [" type" ]=json_stringt (" data" );
586
+ link [" task" ]=json_stringt (" later" );
587
+
588
+ const std::set<exprt> &expr_set=dep.second ;
589
+ json_arrayt &expressions=link [" expressions" ].make_array ();
590
+
591
+ for (const exprt &e : expr_set)
592
+ {
593
+ json_objectt &object=expressions.push_back ().make_object ();
594
+ object[" expression" ]=json_stringt (from_expr (ns, " " , e));
595
+ object[" certainty" ]=json_stringt (" maybe" );
596
+ }
597
+ }
598
+
599
+ return graph;
600
+ }
601
+
523
602
void variable_sensitivity_dependence_domaint::populate_dep_graph (
524
603
variable_sensitivity_dependence_grapht &dep_graph,
525
604
goto_programt::const_targett this_loc) const
0 commit comments