123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135openCmdlinermodulePlugin:sigvalcmd:unitCmd.tend=structmoduleQcheck_stm:sigvalcmd:unitCmd.tend=structletinfo=Cmd.info"qcheck-stm"~doc:"Generate Dune rules for the qcheck-stm plugin."letinterface_file=Arg.(required&pos0(somestring)None&info[]~doc:"Interface file containing Gospel specifications."~docv:"INTERFACE")letconfig_file=Arg.(value&opt(somestring)None&info["c";"config"]~doc:"Configuration file for Ortac/QCheck-STM. Useful for generating \
multiple test files per module under test."~absent:"concatenation of INTERFACE without the extension and \
\"_config.ml\""~docv:"CONFIG")letocaml_output=Arg.(value&opt(somestring)None&info["o";"output"]~doc:"Filename for the generated tests. Useful for generating \
multiple test files per module under test."~absent:"concatenation of INTERFACE without the file extension and \
\"_tests.ml\""~docv:"OCAML_OUTPUT")letlibrary=Arg.(value&opt(somestring)None&info["l";"library"]~doc:"Name of the library the module under test belongs to."~absent:"INTERFACE without the file extension"~docv:"LIBRARY")letpackage_name=Arg.(value&opt(somestring)None&info["p";"package"]~doc:"Package name."~docv:"PACKAGE")letwith_stdout_to=Arg.(value&opt(somestring)None&info["w";"with-stdout-to"]~doc:"Filename for the generated dune rules. For use on the command \
line."~docv:"DUNE_OUTPUT")letmodule_prefix=Arg.(value&opt(somestring)None&info["m";"module-prefix"]~doc:"Prefix for opening the module corresponding to FILE when it is \
part of a library that has MODULE_PREFIX as name."~docv:"MODULE_PREFIX")letsubmodule=Arg.(value&opt(somestring)None&info["s";"submodule"]~doc:"Build the qcheck-stm tests for SUBMODULE inside FILE"~docv:"SUBMODULE")letfork_timeout=Arg.(value&opt(someint)None&info["t";"timeout"]~doc:"Timeout for each test."~docv:"TIMEOUT")letmaininterface_fileconfig_fileocaml_outputlibrarypackage_namedune_outputmodule_prefixsubmodulefork_timeout=letopenQcheck_stminletconfig={interface_file;config_file;ocaml_output;library;package_name;dune_output;module_prefix;submodule;fork_timeout;}inletppf=Registration.get_out_formatterdune_outputinQcheck_stm.gen_dune_rulesppfconfigletterm=Term.(constmain$interface_file$config_file$ocaml_output$library$package_name$with_stdout_to$module_prefix$submodule$fork_timeout)letcmd=Cmd.vinfotermendletcmd=letinfo=Cmd.info"dune"~doc:"Generate Dune rule for ortac plugins."inCmd.groupinfo[Qcheck_stm.cmd]end(* let () = Stdlib.exit (Cmd.eval Plugin.cmd) *)let()=Registration.registerPlugin.cmd