@@ -643,9 +643,11 @@ int jbmc_parse_optionst::get_goto_program(
643
643
644
644
void jbmc_parse_optionst::process_goto_function (
645
645
goto_model_functiont &function,
646
- const can_produce_functiont &available_functions)
646
+ const can_produce_functiont &available_functions,
647
+ const optionst &options)
647
648
{
648
649
symbol_tablet &symbol_table = function.get_symbol_table ();
650
+ namespacet ns (symbol_table);
649
651
goto_functionst::goto_functiont &goto_function = function.get_goto_function ();
650
652
try
651
653
{
@@ -664,6 +666,36 @@ void jbmc_parse_optionst::process_goto_function(
664
666
};
665
667
666
668
remove_returns (function, function_is_stub);
669
+
670
+ replace_java_nondet (function);
671
+
672
+ // Similar removal of java nondet statements:
673
+ // TODO Should really get this from java_bytecode_language somehow, but we
674
+ // don't have an instance of that here.
675
+ object_factory_parameterst factory_params;
676
+ factory_params.max_nondet_array_length =
677
+ cmdline.isset (" java-max-input-array-length" )
678
+ ? std::stoul (cmdline.get_value (" java-max-input-array-length" ))
679
+ : MAX_NONDET_ARRAY_LENGTH_DEFAULT;
680
+ factory_params.max_nondet_string_length =
681
+ cmdline.isset (" string-max-input-length" )
682
+ ? std::stoul (cmdline.get_value (" string-max-input-length" ))
683
+ : MAX_NONDET_STRING_LENGTH;
684
+ factory_params.max_nondet_tree_depth =
685
+ cmdline.isset (" java-max-input-tree-depth" )
686
+ ? std::stoul (cmdline.get_value (" java-max-input-tree-depth" ))
687
+ : MAX_NONDET_TREE_DEPTH;
688
+
689
+ convert_nondet (
690
+ function,
691
+ get_message_handler (),
692
+ factory_params);
693
+
694
+ // add generic checks
695
+ goto_check (ns, options, ID_java, function.get_goto_function ());
696
+
697
+ // checks don't know about adjusted float expressions
698
+ adjust_float_expressions (goto_function, ns);
667
699
}
668
700
669
701
catch (const char *e)
@@ -701,37 +733,6 @@ bool jbmc_parse_optionst::process_goto_functions(
701
733
// instrument library preconditions
702
734
instrument_preconditions (goto_model);
703
735
704
- // Similar removal of java nondet statements:
705
- // TODO Should really get this from java_bytecode_language somehow, but we
706
- // don't have an instance of that here.
707
- object_factory_parameterst factory_params;
708
- factory_params.max_nondet_array_length =
709
- cmdline.isset (" java-max-input-array-length" )
710
- ? std::stoul (cmdline.get_value (" java-max-input-array-length" ))
711
- : MAX_NONDET_ARRAY_LENGTH_DEFAULT;
712
- factory_params.max_nondet_string_length =
713
- cmdline.isset (" string-max-input-length" )
714
- ? std::stoul (cmdline.get_value (" string-max-input-length" ))
715
- : MAX_NONDET_STRING_LENGTH;
716
- factory_params.max_nondet_tree_depth =
717
- cmdline.isset (" java-max-input-tree-depth" )
718
- ? std::stoul (cmdline.get_value (" java-max-input-tree-depth" ))
719
- : MAX_NONDET_TREE_DEPTH;
720
-
721
- replace_java_nondet (goto_model);
722
-
723
- convert_nondet (
724
- goto_model,
725
- get_message_handler (),
726
- factory_params);
727
-
728
- // add generic checks
729
- status () << " Generic Property Instrumentation" << eom;
730
- goto_check (options, goto_model);
731
-
732
- // checks don't know about adjusted float expressions
733
- adjust_float_expressions (goto_model);
734
-
735
736
// ignore default/user-specified initialization
736
737
// of variables with static lifetime
737
738
if (cmdline.isset (" nondet-static" ))
0 commit comments