Skip to content

Commit

Permalink
Ocamlformat the whole repo
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinepouille committed Sep 25, 2024
1 parent 5ef613f commit 3613cdc
Show file tree
Hide file tree
Showing 94 changed files with 1,208 additions and 799 deletions.
9 changes: 6 additions & 3 deletions core/KaSa_rep/abstract_domains/mvbdu/boolean_mvbdu.ml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ type unary_memoized_fun =
variables_list_dic,
Exception.exceptions_caught_and_uncaught ->
bool ->
Exception.exceptions_caught_and_uncaught * (bool Mvbdu_sig.mvbdu, bool) Mvbdu_sig.premvbdu,
Exception.exceptions_caught_and_uncaught
* (bool Mvbdu_sig.mvbdu, bool) Mvbdu_sig.premvbdu,
memo_tables,
memo_tables,
int )
Expand Down Expand Up @@ -1392,7 +1393,8 @@ let rec extensional_description_of_mvbdu parameters handler error mvbdu =
},
output ) )

let print_boolean_mvbdu parameters (error : Exception.exceptions_caught_and_uncaught) =
let print_boolean_mvbdu parameters
(error : Exception.exceptions_caught_and_uncaught) =
Mvbdu_core.print_mvbdu error
(fun error parameters a ->
let _ =
Expand Down Expand Up @@ -1518,7 +1520,8 @@ let print_gen log parameters error (title, print_hash, l) =
print_hash (Remanent_parameters.update_prefix parameters pref) error x)
error l

let print_memo (error : Exception.exceptions_caught_and_uncaught) handler parameters =
let print_memo (error : Exception.exceptions_caught_and_uncaught) handler
parameters =
let error, l1, l2, l3, l4, l5, l6, l7, l8, l9 = split_memo error handler in
let () =
Loggers.fprintf
Expand Down
6 changes: 4 additions & 2 deletions core/KaSa_rep/abstract_domains/mvbdu/boolean_mvbdu.mli
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ val extensional_description_of_mvbdu :
handler ->
Exception_without_parameter.exceptions_caught_and_uncaught ->
bool Mvbdu_sig.mvbdu ->
Exception_without_parameter.exceptions_caught_and_uncaught * (handler * (int * int) list list)
Exception_without_parameter.exceptions_caught_and_uncaught
* (handler * (int * int) list list)

val extensional_description_of_range_list :
'g ->
Expand All @@ -140,7 +141,8 @@ val extensional_description_of_variables_list :
Remanent_parameters_sig.parameters ->
handler ->
'h List_sig.list ->
Exception_without_parameter.exceptions_caught_and_uncaught * (handler * int list option)
Exception_without_parameter.exceptions_caught_and_uncaught
* (handler * int list option)

val overwrite_association_lists :
Remanent_parameters_sig.parameters ->
Expand Down
27 changes: 18 additions & 9 deletions core/KaSa_rep/abstract_domains/mvbdu/list_algebra.mli
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ val overwrite :
Exception_without_parameter.exceptions_caught_and_uncaught ->
'c ->
'b List_sig.list * 'b List_sig.list ->
Exception_without_parameter.exceptions_caught_and_uncaught * ('c * 'b List_sig.list option)) ->
Exception_without_parameter.exceptions_caught_and_uncaught
* ('c * 'b List_sig.list option)) ->
(Remanent_parameters_sig.parameters ->
Exception_without_parameter.exceptions_caught_and_uncaught ->
'c ->
Expand All @@ -23,7 +24,8 @@ val overwrite :
'c ->
'b List_sig.list ->
'b List_sig.list ->
Exception_without_parameter.exceptions_caught_and_uncaught * ('c * 'b List_sig.list option)
Exception_without_parameter.exceptions_caught_and_uncaught
* ('c * 'b List_sig.list option)

val length :
'a ->
Expand All @@ -40,7 +42,8 @@ val extensional_without_asso :
Exception_without_parameter.exceptions_caught_and_uncaught ->
'a ->
'b List_sig.list ->
Exception_without_parameter.exceptions_caught_and_uncaught * ('a * int list option)) ->
Exception_without_parameter.exceptions_caught_and_uncaught
* ('a * int list option)) ->
(Remanent_parameters_sig.parameters ->
Exception_without_parameter.exceptions_caught_and_uncaught ->
'a ->
Expand All @@ -51,14 +54,16 @@ val extensional_without_asso :
Remanent_parameters_sig.parameters ->
'a ->
'b List_sig.list ->
Exception_without_parameter.exceptions_caught_and_uncaught * ('a * int list option)
Exception_without_parameter.exceptions_caught_and_uncaught
* ('a * int list option)

val extensional_with_asso :
(Remanent_parameters_sig.parameters ->
Exception_without_parameter.exceptions_caught_and_uncaught ->
'a ->
'b List_sig.list ->
Exception_without_parameter.exceptions_caught_and_uncaught * ('a * (int * 'b) list option)) ->
Exception_without_parameter.exceptions_caught_and_uncaught
* ('a * (int * 'b) list option)) ->
(Remanent_parameters_sig.parameters ->
Exception_without_parameter.exceptions_caught_and_uncaught ->
'a ->
Expand All @@ -69,7 +74,8 @@ val extensional_with_asso :
Remanent_parameters_sig.parameters ->
'a ->
'b List_sig.list ->
Exception_without_parameter.exceptions_caught_and_uncaught * ('a * (int * 'b) list option)
Exception_without_parameter.exceptions_caught_and_uncaught
* ('a * (int * 'b) list option)

val build_reversed_sorted_list :
(Exception_without_parameter.exceptions_caught_and_uncaught ->
Expand All @@ -84,7 +90,8 @@ val build_reversed_sorted_list :
Exception_without_parameter.exceptions_caught_and_uncaught ->
'c ->
(int * 'b) list ->
Exception_without_parameter.exceptions_caught_and_uncaught * ('c * 'b List_sig.list)
Exception_without_parameter.exceptions_caught_and_uncaught
* ('c * 'b List_sig.list)

val build_sorted_list :
(Exception_without_parameter.exceptions_caught_and_uncaught ->
Expand All @@ -99,7 +106,8 @@ val build_sorted_list :
Exception_without_parameter.exceptions_caught_and_uncaught ->
'c ->
(int * 'b) list ->
Exception_without_parameter.exceptions_caught_and_uncaught * ('c * 'b List_sig.list)
Exception_without_parameter.exceptions_caught_and_uncaught
* ('c * 'b List_sig.list)

val build_list :
(Exception_without_parameter.exceptions_caught_and_uncaught ->
Expand All @@ -114,7 +122,8 @@ val build_list :
Remanent_parameters_sig.parameters ->
'c ->
(int * 'b) list ->
Exception_without_parameter.exceptions_caught_and_uncaught * ('c * 'b List_sig.list)
Exception_without_parameter.exceptions_caught_and_uncaught
* ('c * 'b List_sig.list)

val print_variables_list :
Remanent_parameters_sig.parameters -> 'a List_sig.list -> unit
Expand Down
23 changes: 16 additions & 7 deletions core/KaSa_rep/abstract_domains/mvbdu/memo_sig.ml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,18 @@
* under the terms of the GNU Library General Public License *)

type ('a, 'b, 'blist, 'rlist, 'vlist, 'c, 'd, 'f, 'g) memoized_fun = {
f: Remanent_parameters_sig.parameters -> Exception.exceptions_caught_and_uncaught -> 'c;
f:
Remanent_parameters_sig.parameters ->
Exception.exceptions_caught_and_uncaught ->
'c;
store:
Remanent_parameters_sig.parameters ->
Exception.exceptions_caught_and_uncaught ->
('f, 'b, 'blist, 'rlist, 'vlist, 'a, 'g) handler ->
'd ->
'a Mvbdu_sig.mvbdu ->
Exception.exceptions_caught_and_uncaught * ('f, 'b, 'blist, 'rlist, 'vlist, 'a, 'g) handler;
Exception.exceptions_caught_and_uncaught
* ('f, 'b, 'blist, 'rlist, 'vlist, 'a, 'g) handler;
get:
Remanent_parameters_sig.parameters ->
Exception.exceptions_caught_and_uncaught ->
Expand Down Expand Up @@ -53,7 +57,8 @@ type ('a, 'b, 'blist, 'rlist, 'vlist, 'c, 'd, 'e) unary_memoized_fun =
'vlist,
'a ->
Exception.exceptions_caught_and_uncaught
* (Exception.exceptions_caught_and_uncaught -> Exception.exceptions_caught_and_uncaught * 'c),
* (Exception.exceptions_caught_and_uncaught ->
Exception.exceptions_caught_and_uncaught * 'c),
'a Mvbdu_sig.mvbdu,
'd,
'e )
Expand Down Expand Up @@ -82,7 +87,8 @@ type ('a, 'b, 'blist, 'rlist, 'vlist, 'c, 'd, 'e) unary_other_memoized_fun =
'vlist,
'a ->
Exception.exceptions_caught_and_uncaught
* (Exception.exceptions_caught_and_uncaught -> Exception.exceptions_caught_and_uncaught * 'a Mvbdu_sig.cell),
* (Exception.exceptions_caught_and_uncaught ->
Exception.exceptions_caught_and_uncaught * 'a Mvbdu_sig.cell),
'd * 'a Mvbdu_sig.mvbdu,
'c,
'e )
Expand All @@ -101,20 +107,23 @@ type ('a, 'b, 'blist, 'rlist, 'vlist, 'c, 'd, 'e) reset = {
leaf:
'a ->
Exception.exceptions_caught_and_uncaught
* (Exception.exceptions_caught_and_uncaught -> Exception.exceptions_caught_and_uncaught * 'a Mvbdu_sig.cell);
* (Exception.exceptions_caught_and_uncaught ->
Exception.exceptions_caught_and_uncaught * 'a Mvbdu_sig.cell);
clean_head:
Exception.exceptions_caught_and_uncaught
* ('a, 'b, 'blist, 'rlist, 'vlist, 'c, 'd, 'e) unary_memoized_fun;
build_false:
int ->
int ->
Exception.exceptions_caught_and_uncaught
* (Exception.exceptions_caught_and_uncaught -> Exception.exceptions_caught_and_uncaught * 'a Mvbdu_sig.cell);
* (Exception.exceptions_caught_and_uncaught ->
Exception.exceptions_caught_and_uncaught * 'a Mvbdu_sig.cell);
build_true:
int ->
int ->
'a Mvbdu_sig.mvbdu ->
'a Mvbdu_sig.mvbdu ->
Exception.exceptions_caught_and_uncaught
* (Exception.exceptions_caught_and_uncaught -> Exception.exceptions_caught_and_uncaught * 'a Mvbdu_sig.cell);
* (Exception.exceptions_caught_and_uncaught ->
Exception.exceptions_caught_and_uncaught * 'a Mvbdu_sig.cell);
}
23 changes: 16 additions & 7 deletions core/KaSa_rep/abstract_domains/mvbdu/memo_sig.mli
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
type ('a, 'b, 'blist, 'rlist, 'vlist, 'c, 'd, 'f, 'g) memoized_fun = {
f: Remanent_parameters_sig.parameters -> Exception.exceptions_caught_and_uncaught -> 'c;
f:
Remanent_parameters_sig.parameters ->
Exception.exceptions_caught_and_uncaught ->
'c;
store:
Remanent_parameters_sig.parameters ->
Exception.exceptions_caught_and_uncaught ->
('f, 'b, 'blist, 'rlist, 'vlist, 'a, 'g) handler ->
'd ->
'a Mvbdu_sig.mvbdu ->
Exception.exceptions_caught_and_uncaught * ('f, 'b, 'blist, 'rlist, 'vlist, 'a, 'g) handler;
Exception.exceptions_caught_and_uncaught
* ('f, 'b, 'blist, 'rlist, 'vlist, 'a, 'g) handler;
get:
Remanent_parameters_sig.parameters ->
Exception.exceptions_caught_and_uncaught ->
Expand Down Expand Up @@ -39,7 +43,8 @@ type ('a, 'b, 'blist, 'rlist, 'vlist, 'c, 'd, 'e) unary_memoized_fun =
'vlist,
'a ->
Exception.exceptions_caught_and_uncaught
* (Exception.exceptions_caught_and_uncaught -> Exception.exceptions_caught_and_uncaught * 'c),
* (Exception.exceptions_caught_and_uncaught ->
Exception.exceptions_caught_and_uncaught * 'c),
'a Mvbdu_sig.mvbdu,
'd,
'e )
Expand Down Expand Up @@ -68,7 +73,8 @@ type ('a, 'b, 'blist, 'rlist, 'vlist, 'c, 'd, 'e) unary_other_memoized_fun =
'vlist,
'a ->
Exception.exceptions_caught_and_uncaught
* (Exception.exceptions_caught_and_uncaught -> Exception.exceptions_caught_and_uncaught * 'a Mvbdu_sig.cell),
* (Exception.exceptions_caught_and_uncaught ->
Exception.exceptions_caught_and_uncaught * 'a Mvbdu_sig.cell),
'd * 'a Mvbdu_sig.mvbdu,
'c,
'e )
Expand All @@ -87,20 +93,23 @@ type ('a, 'b, 'blist, 'rlist, 'vlist, 'c, 'd, 'e) reset = {
leaf:
'a ->
Exception.exceptions_caught_and_uncaught
* (Exception.exceptions_caught_and_uncaught -> Exception.exceptions_caught_and_uncaught * 'a Mvbdu_sig.cell);
* (Exception.exceptions_caught_and_uncaught ->
Exception.exceptions_caught_and_uncaught * 'a Mvbdu_sig.cell);
clean_head:
Exception.exceptions_caught_and_uncaught
* ('a, 'b, 'blist, 'rlist, 'vlist, 'c, 'd, 'e) unary_memoized_fun;
build_false:
int ->
int ->
Exception.exceptions_caught_and_uncaught
* (Exception.exceptions_caught_and_uncaught -> Exception.exceptions_caught_and_uncaught * 'a Mvbdu_sig.cell);
* (Exception.exceptions_caught_and_uncaught ->
Exception.exceptions_caught_and_uncaught * 'a Mvbdu_sig.cell);
build_true:
int ->
int ->
'a Mvbdu_sig.mvbdu ->
'a Mvbdu_sig.mvbdu ->
Exception.exceptions_caught_and_uncaught
* (Exception.exceptions_caught_and_uncaught -> Exception.exceptions_caught_and_uncaught * 'a Mvbdu_sig.cell);
* (Exception.exceptions_caught_and_uncaught ->
Exception.exceptions_caught_and_uncaught * 'a Mvbdu_sig.cell);
}
4 changes: 3 additions & 1 deletion core/KaSa_rep/abstract_domains/mvbdu/mvbdu_algebra.ml
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,9 @@ let not_recursive_memoize_unary f g (get_handler : 'a -> 'b)
let a =
(not_recursive_memoize_unary
: (Exception.exceptions_caught_and_uncaught -> 'handler -> 'g) ->
(Remanent_parameters_sig.parameters -> Exception.exceptions_caught_and_uncaught -> 'e) ->
(Remanent_parameters_sig.parameters ->
Exception.exceptions_caught_and_uncaught ->
'e) ->
('handler -> 'dic) ->
('dic -> 'handler -> 'handler) ->
(Exception.exceptions_caught_and_uncaught ->
Expand Down
6 changes: 4 additions & 2 deletions core/KaSa_rep/abstract_domains/mvbdu/mvbdu_algebra.mli
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ val generic_zeroary :
'd Mvbdu_sig.cell ->
(int -> 'd Mvbdu_sig.mvbdu) ->
'e ->
Exception_without_parameter.exceptions_caught_and_uncaught * ('f * 'g * 'h * 'e) option) ->
Exception_without_parameter.exceptions_caught_and_uncaught
* ('f * 'g * 'h * 'e) option) ->
'e ->
('i ->
'a * (('d Mvbdu_sig.mvbdu, 'd) Mvbdu_sig.precell, 'd) Mvbdu_sig.premvbdu) ->
Expand Down Expand Up @@ -505,7 +506,8 @@ val a :
'h Mvbdu_sig.mvbdu ->
Exception_without_parameter.exceptions_caught_and_uncaught
* ('a, 'b, 'd, 'f, 'g, 'h, 'i) Memo_sig.handler) ->
Exception_without_parameter.exceptions_caught_and_uncaught * 'h Mvbdu_sig.mvbdu option) ->
Exception_without_parameter.exceptions_caught_and_uncaught
* 'h Mvbdu_sig.mvbdu option) ->
(Exception_without_parameter.exceptions_caught_and_uncaught ->
'c ->
'h Mvbdu_sig.mvbdu ->
Expand Down
3 changes: 2 additions & 1 deletion core/KaSa_rep/abstract_domains/mvbdu/mvbdu_wrapper.ml
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,8 @@ module type Internalized_mvbdu = sig
val import_handler : handler -> unit

val export_handler :
Exception.exceptions_caught_and_uncaught -> Exception.exceptions_caught_and_uncaught * handler option
Exception.exceptions_caught_and_uncaught ->
Exception.exceptions_caught_and_uncaught * handler option

val is_init : unit -> bool
val equal : mvbdu -> mvbdu -> bool
Expand Down
3 changes: 2 additions & 1 deletion core/KaSa_rep/abstract_domains/mvbdu/mvbdu_wrapper.mli
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,8 @@ module type Internalized_mvbdu = sig
val import_handler : handler -> unit

val export_handler :
Exception.exceptions_caught_and_uncaught -> Exception.exceptions_caught_and_uncaught * handler option
Exception.exceptions_caught_and_uncaught ->
Exception.exceptions_caught_and_uncaught * handler option

val is_init : unit -> bool
val equal : mvbdu -> mvbdu -> bool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ module type Mat_inter = sig
Exception.exceptions_caught_and_uncaught ->
prod ->
var ->
Exception.exceptions_caught_and_uncaught * (Fraction.ffraction * Fraction.ffraction) option
Exception.exceptions_caught_and_uncaught
* (Fraction.ffraction * Fraction.ffraction) option

val is_infinite : prod -> var -> bool

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ module type Mat_inter = sig
Exception.exceptions_caught_and_uncaught ->
prod ->
var ->
Exception.exceptions_caught_and_uncaught * (Fraction.ffraction * Fraction.ffraction) option
Exception.exceptions_caught_and_uncaught
* (Fraction.ffraction * Fraction.ffraction) option

val is_infinite : prod -> var -> bool

Expand Down
9 changes: 6 additions & 3 deletions core/KaSa_rep/abstract_domains/numerical_domains/matrices.ml
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,8 @@ module Matrice = struct
| [] -> failwith "compteur_pivot_3"
)

let normalise parameters (error : Exception.exceptions_caught_and_uncaught) m =
let normalise parameters (error : Exception.exceptions_caught_and_uncaught) m
=
let rec aux (error : Exception.exceptions_caught_and_uncaught) k =
if k > !(m.nligne) then (
del_last_ligne m;
Expand Down Expand Up @@ -615,7 +616,8 @@ module Matrice = struct
in
aux error 1

let rec push parameters (error : Exception.exceptions_caught_and_uncaught) m j k =
let rec push parameters (error : Exception.exceptions_caught_and_uncaught) m j
k =
if Working_list_imperative.member j (get_all_entry m) then (
let rec aux error i =
if i > !(m.nligne) then
Expand Down Expand Up @@ -888,7 +890,8 @@ module Matrice = struct
in
union parameters error nm m

let pushbool parameters (error : Exception.exceptions_caught_and_uncaught) m a =
let pushbool parameters (error : Exception.exceptions_caught_and_uncaught) m a
=
let error, m2 = copy parameters error m in
let error =
new_copy_ligne parameters error m2
Expand Down
Loading

0 comments on commit 3613cdc

Please sign in to comment.