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

[language] Do not use type alias as type inference becomes confused.

parent 687dd42c
No related branches found
No related tags found
No related merge requests found
...@@ -25,13 +25,13 @@ open Why3 ...@@ -25,13 +25,13 @@ open Why3
open Base open Base
type classifier = type classifier =
| NNet of Language.nn_classifier | NNet of Term.lsymbol
[@printer [@printer
fun fmt nn -> fun fmt nn ->
Fmt.pf fmt "NNet: %a" Fmt.pf fmt "NNet: %a"
Fmt.(option Language.pp_nn) Fmt.(option Language.pp_nn)
(Language.lookup_nn_classifier nn)] (Language.lookup_nn_classifier nn)]
| ONNX of Language.nn_classifier | ONNX of Term.lsymbol
[@printer [@printer
fun fmt nn -> fun fmt nn ->
Fmt.pf fmt "ONNX: %a" Fmt.pf fmt "ONNX: %a"
...@@ -45,7 +45,7 @@ type dataset = DS_csv of Csv.t [@printer fun fmt _ -> Fmt.pf fmt "<csv>"] ...@@ -45,7 +45,7 @@ type dataset = DS_csv of Csv.t [@printer fun fmt _ -> Fmt.pf fmt "<csv>"]
type data = D_csv of string list [@@deriving show] type data = D_csv of string list [@@deriving show]
type vector = type vector =
(Language.vector (Term.lsymbol
[@printer [@printer
fun fmt v -> fun fmt v ->
Fmt.pf fmt "%a" Fmt.(option ~none:nop int) (Language.lookup_vector v)]) Fmt.pf fmt "%a" Fmt.(option ~none:nop int) (Language.lookup_vector v)])
......
...@@ -158,8 +158,6 @@ let register_ovo_support () = ...@@ -158,8 +158,6 @@ let register_ovo_support () =
(* -- Vector *) (* -- Vector *)
type vector = Term.lsymbol
let vectors = Term.Hls.create 10 let vectors = Term.Hls.create 10
let vector_elt_ty env = let vector_elt_ty env =
...@@ -196,8 +194,6 @@ type nn = { ...@@ -196,8 +194,6 @@ type nn = {
} }
[@@deriving show] [@@deriving show]
type nn_classifier = Term.lsymbol
let nn_classifiers = Term.Hls.create 10 let nn_classifiers = Term.Hls.create 10
let fresh_classifier_ls env name = let fresh_classifier_ls env name =
......
...@@ -65,11 +65,9 @@ val ovo_parser : Env.env -> string -> Pmodule.pmodule Wstdlib.Mstr.t ...@@ -65,11 +65,9 @@ val ovo_parser : Env.env -> string -> Pmodule.pmodule Wstdlib.Mstr.t
(** -- Vector *) (** -- Vector *)
type vector = Term.lsymbol val create_vector : Env.env -> int -> Term.lsymbol
val lookup_vector : Term.lsymbol -> int option
val create_vector : Env.env -> int -> vector val mem_vector : Term.lsymbol -> bool
val lookup_vector : vector -> int option
val mem_vector : vector -> bool
(** -- Classifier *) (** -- Classifier *)
...@@ -82,9 +80,7 @@ type nn = private { ...@@ -82,9 +80,7 @@ type nn = private {
} }
[@@deriving show] [@@deriving show]
type nn_classifier = Term.lsymbol val create_nnet_classifier : Env.env -> string -> Term.lsymbol
val create_onnx_classifier : Env.env -> string -> Term.lsymbol
val create_nnet_classifier : Env.env -> string -> nn_classifier val lookup_nn_classifier : Term.lsymbol -> nn option
val create_onnx_classifier : Env.env -> string -> nn_classifier val mem_nn_classifier : Term.lsymbol -> bool
val lookup_nn_classifier : nn_classifier -> nn option
val mem_nn_classifier : nn_classifier -> bool
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