@@ -666,6 +666,28 @@ void jbmc_parse_optionst::process_goto_function(
666
666
remove_returns (function, function_is_stub);
667
667
668
668
replace_java_nondet (function);
669
+
670
+ // Similar removal of java nondet statements:
671
+ // TODO Should really get this from java_bytecode_language somehow, but we
672
+ // don't have an instance of that here.
673
+ object_factory_parameterst factory_params;
674
+ factory_params.max_nondet_array_length =
675
+ cmdline.isset (" java-max-input-array-length" )
676
+ ? std::stoul (cmdline.get_value (" java-max-input-array-length" ))
677
+ : MAX_NONDET_ARRAY_LENGTH_DEFAULT;
678
+ factory_params.max_nondet_string_length =
679
+ cmdline.isset (" string-max-input-length" )
680
+ ? std::stoul (cmdline.get_value (" string-max-input-length" ))
681
+ : MAX_NONDET_STRING_LENGTH;
682
+ factory_params.max_nondet_tree_depth =
683
+ cmdline.isset (" java-max-input-tree-depth" )
684
+ ? std::stoul (cmdline.get_value (" java-max-input-tree-depth" ))
685
+ : MAX_NONDET_TREE_DEPTH;
686
+
687
+ convert_nondet (
688
+ function,
689
+ get_message_handler (),
690
+ factory_params);
669
691
}
670
692
671
693
catch (const char *e)
@@ -703,28 +725,6 @@ bool jbmc_parse_optionst::process_goto_functions(
703
725
// instrument library preconditions
704
726
instrument_preconditions (goto_model);
705
727
706
- // Similar removal of java nondet statements:
707
- // TODO Should really get this from java_bytecode_language somehow, but we
708
- // don't have an instance of that here.
709
- object_factory_parameterst factory_params;
710
- factory_params.max_nondet_array_length =
711
- cmdline.isset (" java-max-input-array-length" )
712
- ? std::stoul (cmdline.get_value (" java-max-input-array-length" ))
713
- : MAX_NONDET_ARRAY_LENGTH_DEFAULT;
714
- factory_params.max_nondet_string_length =
715
- cmdline.isset (" string-max-input-length" )
716
- ? std::stoul (cmdline.get_value (" string-max-input-length" ))
717
- : MAX_NONDET_STRING_LENGTH;
718
- factory_params.max_nondet_tree_depth =
719
- cmdline.isset (" java-max-input-tree-depth" )
720
- ? std::stoul (cmdline.get_value (" java-max-input-tree-depth" ))
721
- : MAX_NONDET_TREE_DEPTH;
722
-
723
- convert_nondet (
724
- goto_model,
725
- get_message_handler (),
726
- factory_params);
727
-
728
728
// add generic checks
729
729
status () << " Generic Property Instrumentation" << eom;
730
730
goto_check (options, goto_model);
0 commit comments