Skip to content
Snippets Groups Projects
Commit 3083de2d authored by Michele Alberti's avatar Michele Alberti
Browse files

Some more rework.

parent 8a5fa8ed
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@
open Base
(* -- Register neural network format. *)
(* -- Support for the NNet neural network format. *)
let nnet_parser env _ filename _ =
let open Why3 in
......@@ -32,11 +32,11 @@ let nnet_parser env _ filename _ =
in
let th_uc =
Pmodule.add_pdecl ~vc:false th_uc
(Pdecl.create_pure_decl @@ Decl.create_param_decl ls_nnet_apply)
(Pdecl.create_pure_decl (Decl.create_param_decl ls_nnet_apply))
in
Wstdlib.Mstr.singleton "AsTuple" (Pmodule.close_module th_uc)
let register () =
let register_nnet_support () =
Why3.(
Env.register_format ~desc:"NNet format (ReLU only)" Pmodule.mlw_language
"NNet" [ "nnet" ] nnet_parser)
......@@ -8,7 +8,7 @@ open Base
module Format = Caml.Format
module Filename = Caml.Filename
let () = Language.register ()
let () = Language.register_nnet_support ()
let create_env loadpath =
let config = Autodetection.autodetect ~debug:true () in
......
Test autodetect
$ mkdir bin
$ cat - > bin/pyrat.py << EOF
> #!/bin/sh
> echo "PyRAT 1.0"
> EOF
$ cat - > bin/Marabou << EOF
> #!/bin/sh
> echo "1.0.+"
> EOF
$ chmod u+x bin/pyrat.py bin/Marabou
$ bin/pyrat.py
PyRAT 1.0
$ bin/Marabou
1.0.+
$ PATH=$(pwd)/bin:$PATH
$ caisar config -d
[caisar] Alt-Ergo 2.4.0
Marabou 1.0.+
PyRAT 1.0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment