@@ -653,6 +653,28 @@ void jbmc_parse_optionst::process_goto_function(
653
653
remove_returns (function);
654
654
655
655
replace_java_nondet (function);
656
+
657
+ // Similar removal of java nondet statements:
658
+ // TODO Should really get this from java_bytecode_language somehow, but we
659
+ // don't have an instance of that here.
660
+ object_factory_parameterst factory_params;
661
+ factory_params.max_nondet_array_length =
662
+ cmdline.isset (" java-max-input-array-length" )
663
+ ? std::stoul (cmdline.get_value (" java-max-input-array-length" ))
664
+ : MAX_NONDET_ARRAY_LENGTH_DEFAULT;
665
+ factory_params.max_nondet_string_length =
666
+ cmdline.isset (" string-max-input-length" )
667
+ ? std::stoul (cmdline.get_value (" string-max-input-length" ))
668
+ : MAX_NONDET_STRING_LENGTH;
669
+ factory_params.max_nondet_tree_depth =
670
+ cmdline.isset (" java-max-input-tree-depth" )
671
+ ? std::stoul (cmdline.get_value (" java-max-input-tree-depth" ))
672
+ : MAX_NONDET_TREE_DEPTH;
673
+
674
+ convert_nondet (
675
+ function,
676
+ get_message_handler (),
677
+ factory_params);
656
678
}
657
679
658
680
catch (const char *e)
@@ -690,28 +712,6 @@ bool jbmc_parse_optionst::process_goto_functions(
690
712
// instrument library preconditions
691
713
instrument_preconditions (goto_model);
692
714
693
- // Similar removal of java nondet statements:
694
- // TODO Should really get this from java_bytecode_language somehow, but we
695
- // don't have an instance of that here.
696
- object_factory_parameterst factory_params;
697
- factory_params.max_nondet_array_length =
698
- cmdline.isset (" java-max-input-array-length" )
699
- ? std::stoul (cmdline.get_value (" java-max-input-array-length" ))
700
- : MAX_NONDET_ARRAY_LENGTH_DEFAULT;
701
- factory_params.max_nondet_string_length =
702
- cmdline.isset (" string-max-input-length" )
703
- ? std::stoul (cmdline.get_value (" string-max-input-length" ))
704
- : MAX_NONDET_STRING_LENGTH;
705
- factory_params.max_nondet_tree_depth =
706
- cmdline.isset (" java-max-input-tree-depth" )
707
- ? std::stoul (cmdline.get_value (" java-max-input-tree-depth" ))
708
- : MAX_NONDET_TREE_DEPTH;
709
-
710
- convert_nondet (
711
- goto_model,
712
- get_message_handler (),
713
- factory_params);
714
-
715
715
// add generic checks
716
716
status () << " Generic Property Instrumentation" << eom;
717
717
goto_check (options, goto_model);
0 commit comments