Skip to content
Snippets Groups Projects
Commit a4d308e4 authored by Virgile Prevosto's avatar Virgile Prevosto
Browse files

Merge branch 'fix/markdown-report/eva-domains' into 'master'

[mdr] Uses the -eva-domains option instead of multiple options -eva-*-domain.

See merge request frama-c/frama-c!2579
parents 8c27efa9 db99b4b5
No related branches found
No related tags found
No related merge requests found
...@@ -39,28 +39,6 @@ let sanitize_anchor s = ...@@ -39,28 +39,6 @@ let sanitize_anchor s =
else if s.[0] = '_' then "a" ^ s else if s.[0] = '_' then "a" ^ s
else s else s
let all_eva_domains =
[ "-eva-apron-box", "box domain of the Apron library";
"-eva-apron-oct", "octagon domain of the Apron library";
"-eva-bitwise-domain", "domain for bitwise computations";
"-eva-equality-domain",
"domain for storing equalities between memory locations";
"-eva-gauges-domain",
"gauges domain for relations between memory locations and loop counter";
"-eva-inout-domain",
"domain for input and output memory locations";
"-eva-polka-equalities",
"linear equalities domain of the Apron library";
"-eva-polka-loose",
"loose polyhedra domain of the Apron library";
"-eva-polka-strict",
"strict polyhedra domain of the Apron library";
"-eva-sign-domain", "sign domain (useful only for demos)";
"-eva-symbolic-locations-domain",
"domain computing ranges of variation for symbolic locations \
(e.g. `a[i]` when `i` is not precisely known by `Cvalue`)"
]
let insert_marks env anchor = let insert_marks env anchor =
Comment "BEGIN_REMARK" Comment "BEGIN_REMARK"
:: insert_remark env anchor :: insert_remark env anchor
...@@ -72,10 +50,10 @@ let plural l s = ...@@ -72,10 +50,10 @@ let plural l s =
| _::_::_ -> s ^ "s" | _::_::_ -> s ^ "s"
let get_eva_domains () = let get_eva_domains () =
Extlib.filter_map let eva_domains = Eva.Value_parameters.enabled_domains () in
(fun (x,_) -> Dynamic.Parameter.Bool.get x ()) let domains = List.filter (fun (name, _) -> name <> "cvalue") eva_domains in
(fun (x,y) -> (plain "option" @ bold x), plain y) let aux (name, descr) = (plain "domain" @ bold name), plain descr in
all_eva_domains List.map aux domains
let section_domains env = let section_domains env =
let anchor = "domains" in let anchor = "domains" in
...@@ -92,12 +70,12 @@ let section_domains env = ...@@ -92,12 +70,12 @@ let section_domains env =
| [] -> | [] ->
[Text [Text
(plain (plain
"Only the base domain (`Cvalue`) \ "Only the base domain (`cvalue`) \
has been used for the analysis")] has been used for the analysis")]
| _ -> | _ ->
[Text [Text
(plain (plain
"In addition to the base domain (`Cvalue`), additional \ "In addition to the base domain (`cvalue`), additional \
domains have been used by EVA"); domains have been used by EVA");
DL l] DL l]
) )
......
...@@ -28,7 +28,7 @@ that have been considered during the analysis are the following: ...@@ -28,7 +28,7 @@ that have been considered during the analysis are the following:
### EVA Domains {#domains} ### EVA Domains {#domains}
Only the base domain (`Cvalue`) has been used for the analysis Only the base domain (`cvalue`) has been used for the analysis
### Stubbed Functions {#stubs} ### Stubbed Functions {#stubs}
......
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
(** Analysis for values and pointers *) (** Analysis for values and pointers *)
(** No function is directly exported: they are registered in {!Db.Value}. *)
module Value_results: sig module Value_results: sig
type results type results
...@@ -33,3 +31,8 @@ module Value_results: sig ...@@ -33,3 +31,8 @@ module Value_results: sig
val change_callstacks: val change_callstacks:
(Value_types.callstack -> Value_types.callstack) -> results -> results (Value_types.callstack -> Value_types.callstack) -> results -> results
end end
module Value_parameters: sig
(** Returns the list (name, descr) of currently enabled abstract domains. *)
val enabled_domains: unit -> (string * string) list
end
...@@ -193,6 +193,12 @@ let register_domain ~name ~descr = ...@@ -193,6 +193,12 @@ let register_domain ~name ~descr =
Cmdline.replace_option_help Cmdline.replace_option_help
Domains.option_name "eva" domains (domains_help ()) Domains.option_name "eva" domains (domains_help ())
let enabled_domains () =
let domains = Domains.get () in
List.filter
(fun (name, _) -> Datatype.String.Set.mem name domains)
!domains_ref
(* Checks that a domain has been registered. *) (* Checks that a domain has been registered. *)
let check_domain domain = let check_domain domain =
if domain = "help" || domain = "list" if domain = "help" || domain = "list"
......
...@@ -230,6 +230,9 @@ val dkey_widening : category ...@@ -230,6 +230,9 @@ val dkey_widening : category
(** Registers available domain names for the -eva-domains option. *) (** Registers available domain names for the -eva-domains option. *)
val register_domain: name:string -> descr:string -> unit val register_domain: name:string -> descr:string -> unit
(** Returns the list (name, descr) of currently enabled domains. *)
val enabled_domains: unit -> (string * string) list
(* (*
Local Variables: Local Variables:
compile-command: "make -C ../../.." compile-command: "make -C ../../.."
......
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