diff --git a/.Makefile.lint b/.Makefile.lint index 4d510d832410a3d5695edb1aa766807b28ecd71a..ba3d6165fcea41dd2aac3e8913ca5d297c6064de 100644 --- a/.Makefile.lint +++ b/.Makefile.lint @@ -146,8 +146,6 @@ ML_LINT_KO+=src/libraries/utils/wto.mli ML_LINT_KO+=src/plugins/aorai/Aorai.mli ML_LINT_KO+=src/plugins/aorai/aorai_dataflow.ml ML_LINT_KO+=src/plugins/aorai/aorai_dataflow.mli -ML_LINT_KO+=src/plugins/aorai/aorai_option.ml -ML_LINT_KO+=src/plugins/aorai/aorai_register.ml ML_LINT_KO+=src/plugins/aorai/data_for_aorai.ml ML_LINT_KO+=src/plugins/aorai/data_for_aorai.mli ML_LINT_KO+=src/plugins/aorai/logic_simplification.ml diff --git a/doc/aorai/main.tex b/doc/aorai/main.tex index dd5b5a23d78f059b1482471f9d6ea2cb1a2614ac..de6c643df76816d339a4fc43a7967a0fd4151261 100644 --- a/doc/aorai/main.tex +++ b/doc/aorai/main.tex @@ -60,11 +60,11 @@ keywordstyle=\bfseries, \aorai is a Frama-C plugin that provides a method to automatically annotate a C program according to an automaton $F$ such that, if the annotations are verified, we ensure that the program respects $F$. A classical method to -validate annotations then is to use the Jessie plugin and +validate annotations then is to use the WP plugin and the Why tool or the WP plugin. This document requires basic knowledge about -the Frama-C platform itself (See \url{http://frama-c.com} for more information), +the Frama-C platform itself (See \url{https://frama-c.com} for more information), in particular the notions of {\it plug-ins} and {\it project}. \vspace*{20pt} @@ -79,7 +79,7 @@ in particular the notions of {\it plug-ins} and {\it project}. \end{itemize} \vspace*{20pt} -\noindent \textbf{Official web site:} +\noindent \textbf{Official web site for the original version:} \begin{center} \url{http://amazones.gforge.inria.fr/aorai/index.html} @@ -140,7 +140,7 @@ This document is divided into four parts: \item The second part defines the three \aorai input languages with which it is possible to describe a given property. \item The third part explains how to prove a program annotated with \aorai -using the Jessie plug-in. +using the WP plug-in. \item Finally, the last part details \aorai 's underlying theory, and its internal architecture in order to help people who would like to contribute to the plug-in itself. @@ -152,7 +152,7 @@ the plug-in itself. \chapter{Quick overview} In this chapter we will see how to use Frama-C and the couple -Jessie-\aorai to prove that a C program has the same behavior than +WP-\aorai to prove that a C program has the same behavior than an automaton. \section{First use} @@ -163,9 +163,9 @@ an automaton. which will be described in the second part. In fact, we consider that we have already written the file which describes the automaton. - Jessie's verification\footnote{For more information about Jessie + WP verification\footnote{For more information about WP and code verification,please refer to - \url{http://frama-c.com/jessie.html}} can only be done on C + \url{http://frama-c.com/wp.html}} can only be done on C code augmented with ACSL annotations. Thus, \aorai creates a new C file where the automaton is encoded into ACSL annotations. Section~\ref{generated_annotated_file} will give more @@ -179,37 +179,33 @@ an automaton. \end{itemize} With two files (automaton's description and C file), we can create an -annotated file in order to process the validation with the Jessie plug-in. This +annotated file. This is done by the following command: -\begin{lstlisting}[language=sh] -$ frama-c example.c -aorai-automata example.ya +\begin{lstlisting} +$ frama-c example.c -aorai-automata example.ya \ + -then-last -ocode example_annot.c -print \end{lstlisting} %$ -This generates a new C file \texttt{example\_annot.c}\footnote{Or \texttt{example\_annot0.c} if \texttt{example\_annot.c} already exists}. +This generates a new C file \texttt{example\_annot.c}. In order to decide if the original program is correct with respect to the automaton, it is sufficient to establish that the generated C code and its associated ACSL annotations are valid. For instance, the following command -uses the Jessie plug-in to generate proof obligations and launches \texttt{gwhy} -\begin{lstlisting}[language=sh] -$ frama-c example_annot.c -jessie -\end{lstlisting} %$ - -Of course, any option of Jessie itself can be used. For instance, one can use -the Why3 interface instead of \texttt{gwhy}, and select a different algorithm -for the generation of proof obligations: +uses the WP plugin over the generated file: \begin{lstlisting}[language=sh] -$ frama-c example_annot.c -jessie \ - -jessie-why-opt="-fast-wp" -jessie-atp why3ide +$ frama-c example_annot.c -wp -wp-rte \end{lstlisting} %$ -Finally, since Frama-C Nitrogen, it is possible to instruct Frama-C to do a +Of course, any option of WP itself can be used, notably \texttt{-wp-rte} to +check for the absence of runtime error. +Finally, it is possible to instruct Frama-C to do a sequence of analyses over various projects, {\it via} the \texttt{-then-on} -option. Thus, we do not need to use an intermediate file and to run Frama-C -twice. Instead, we just instruct jessie to operate on the \texttt{aorai} +options and \texttt{-then-last} options. +Thus, we do not need to use an intermediate file and to run Frama-C +twice. Instead, we just instruct WP to operate on the \texttt{aorai} project that contains the code annotated by \aorai: -\begin{lstlisting}[language=sh] +\begin{lstlisting} $ frama-c example.c -aorai-automata example.ya \ - -then-on aorai -jessie -jessie-atp why3ide + -then-last -wp -wp-rte \end{lstlisting} %$ \subsection{Automata and verification} @@ -269,7 +265,7 @@ of states authorized just before (resp. after) the call. \aorai generates a new C program, including the automaton axiomatization, some coherence invariants, and annotations on operations, such that if this annotated program can be validated with -the Jessie plugin, then we ensure that it respects the given +the WP plugin, then we ensure that it respects the given properties. Sometimes, the automaton has not enough information to check the @@ -294,10 +290,7 @@ information about that, please read section \ref{collaboration}. \item[-aorai-dot] generates a dot file of the automata. Dot is a graph format used by the GraphViz tools\footnote{\url{http://www.graphviz.org}}. - \item[-aorai-output-c-file <f>] outputs the annotated code in file - \texttt{<f>} (default is to suffix the name of the first input file - with \texttt{\_annot}, and a numerical suffix if that name is already - taken). + \end{itemize} Finally, here is a concrete example of a common call: @@ -697,21 +690,19 @@ figure~\ref{LTL_first_use} % =========================================================================== % =========================================================================== \chapter{Advanced Features} -\section{Generated Annotated File} +\section{Generated Annotated Program} \label{generated_annotated_file} -The default configuration is to generate a new C file -(whose name is derived from first input file or can be set by the user; see -section~\ref{sec:help-command} for more information). The generated file is +The instrumented program is the original program (with its annotations\footnote{ ACSL language for - annotation is described at \url{http://frama-c.com/acsl.html}}) + annotation is described at \url{https://github.com/acsl-language/acsl}}) completed with the following: \begin{itemize} \item Some auxiliary C declarations representing the automaton itself and information needed to decide if a given transition should be taken or not; \item If the automaton has been marked as \texttt{deterministic}, a set of lemmas state that it is indeed the case; -\item For each original C function, two functions are given with their +\item For each original C function, two functions are defined with their specification. They take care of updating the automaton's state when entering and exiting the function respectively; \item Each original C function gets additional ACSL behaviors, expressing how @@ -872,6 +863,17 @@ or other auxiliary variables that must be updated, other \lstinline|ensures| clauses define their new value according to the transition that is activated. +It is also possible to only activate the generation of the body of the +transition functions, without their specification (e.g. to analyze the +instrumented code with the Eva plug-in, which does not need the contracts and +loop invariants). This is done through option +\lstinline|-aorai-no-generate-annotations|. In that case, it might be the case +that the automaton end up in a rejecting state (for a deterministic automaton) +or without any active state (for a non-deterministic automaton). Option +\lstinline|-aorai-smoke-tests| can thus be used to generate assertions at +the end of all update functions, stating that the automaton is still in an +appropriate state. + \subsection{Functions behaviors} Each function \texttt{f} defined in the original C code gets its specification @@ -1006,18 +1008,29 @@ int main(int c) { \label{FigGeneratedLoopInvariants} \end{figure} -\section{Interaction with Annotated Files} +\section{Analyzing Annotated Files with Eva or WP} \label{collaboration} Once the annotated file has been generated, it remains to verify that all the annotations hold. This section describes briefly how this can be done and some common issues that may arise during verification. -\aorai tries to generate ACSL annotations that stay in the fragment -supported by Value Analysis, so that this plug-in might be used over the -generated code, but there is no guarantee that it will be able to establish -the validity of all annotations. - -Another possibility is to use deductive verification plug-ins WP or Jessie. +In addition to annotations, \aorai generates an implementation for the transition +functions, so that it is possible to use the Eva plug-in of Frama-C on the +instrumented code. However, there's no guarantee that Eva will be able to +perform an analysis that stays precise enough to verify that the automaton +always ends in an accepting state. Aoraï will set up automatically a certain number +of parameters in Eva to help make the analysis more precise, but, +in the case of deterministic automata it is also possible +to use option \texttt{-aorai-instrumentation-history n} to have the instrumentation +retain the \texttt{n} previous states of the automaton (in addition to the +current state), that will be used for splitting Eva's abstract states. Furthermore, +each time Eva encounters a call to the +built-in function \texttt{Frama\_C\_show\_aorai\_state}, it will display the current +state (together with the previous ones up to \texttt{-aorai\-instrumentation-history}). +If the function is called with some arguments, their abstract value will also be +displayed. + +Another possibility is to use the deductive verification plug-in WP. Note however that the generated annotations are not guaranteed to be complete, {\it i.e.} to it might be necessary to add further annotations in order to discharge all proof obligations. In particular, in presence of loops, \aorai @@ -1029,12 +1042,6 @@ invariants of figure~\ref{FigGeneratedLoopInvariants} that gets decremented at each step, while \lstinline|aorai_counter| gets incremented), but such a relation is well beyond the scope of \aorai itself. -Finally, as a special warning, Jessie does not use the fact that globals are -initialized to 0 when entering the \lstinline|main| function of a program -(which is in fact treated like any other function). This fact must thus be -sometimes added to the \lstinline|requires| of the function, especially for -auxiliary variables. - % ======================================================================== % ======================================================================== % ======================================================================== @@ -1239,6 +1246,13 @@ The plug-in is composed of three parts: \section{Recent updates} \subsection{Frama-C+dev} \begin{itemize} +\item Documentation for options \texttt{-aorai-no-generate-annotations} +and \texttt{-aorai-smoke-tests} +\item Documentation for option \texttt{-aorai-instrumentation-history} +and built-in \texttt{Frama\_C\_show\_aorai\_state} +\item Aoraï does not generate a C file by default anymore, relying on +kernel options \texttt{-print} and \texttt{-ocode} for that, like all +plug-ins. Remove corresponding ad'hoc options. \item update syntax for YA sequence to avoid ambiguities with \texttt{+} and \texttt{*} repetition operators \end{itemize} diff --git a/headers/header_spec.txt b/headers/header_spec.txt index fd4e1e3307f1c10e1f9d928437902baed317192d..35a58061a5054dbf0bc2243e8548edb98e84c786 100644 --- a/headers/header_spec.txt +++ b/headers/header_spec.txt @@ -718,6 +718,9 @@ src/plugins/aorai/VERSIONS.txt: .ignore src/plugins/aorai/YA.README: .ignore src/plugins/aorai/aorai_dataflow.ml: AORAI_LGPL src/plugins/aorai/aorai_dataflow.mli: AORAI_LGPL +src/plugins/aorai/aorai_eva_analysis.disabled.ml: AORAI_LGPL +src/plugins/aorai/aorai_eva_analysis.enabled.ml: AORAI_LGPL +src/plugins/aorai/aorai_eva_analysis.mli: AORAI_LGPL src/plugins/aorai/aorai_graph.ml: AORAI_LGPL src/plugins/aorai/aorai_graph.mli: AORAI_LGPL src/plugins/aorai/aorai_metavariables.ml: AORAI_LGPL diff --git a/src/kernel_services/ast_data/property.ml b/src/kernel_services/ast_data/property.ml index 2be8813645a9ca63fd7b2c7403205f869ed79f77..532097186425bb770369cd7a91451ad21948a687 100644 --- a/src/kernel_services/ast_data/property.ml +++ b/src/kernel_services/ast_data/property.ml @@ -412,6 +412,141 @@ let rec has_status = function (* -------------------------------------------------------------------------- *) (* --- Datatype --- *) (* -------------------------------------------------------------------------- *) +let pp_active fmt active = + let sep = ref false in + let print_one a = + Format.fprintf fmt "%s%s" (if !sep then ", " else "") a; + sep:=true + in + Datatype.String.Set.iter print_one active + +let rec pretty_ip fmt = function + | IPPredicate {ip_kind; ip_pred} -> + Format.fprintf fmt "%a@ %a" + pretty_predicate_kind ip_kind + Cil_printer.pp_identified_predicate ip_pred + | IPExtended {ie_ext} -> Cil_printer.pp_extended fmt ie_ext + | IPAxiom {il_name} -> Format.fprintf fmt "axiom@ %s" il_name + | IPAxiomatic {iax_name} -> Format.fprintf fmt "axiomatic@ %s" iax_name + | IPLemma {il_name} -> Format.fprintf fmt "lemma@ %s" il_name + | IPTypeInvariant {iti_name; iti_type} -> + Format.fprintf fmt "invariant@ %s for type %a" iti_name + Cil_printer.pp_typ iti_type + | IPGlobalInvariant {igi_name} -> + Format.fprintf fmt "global invariant@ %s" igi_name + | IPBehavior {ib_bhv; ib_kinstr; ib_active} -> + if Cil.is_default_behavior ib_bhv then + Format.pp_print_string fmt "default behavior" + else + Format.fprintf fmt "behavior %s" ib_bhv.b_name; + (match ib_kinstr with + | Kstmt s -> Format.fprintf fmt " for statement %d" s.sid + | Kglobal -> ()); + pp_active fmt ib_active + | IPCodeAnnot {ica_ca} -> Cil_printer.pp_code_annotation fmt ica_ca + | IPComplete {ic_active; ic_bhvs} -> + Format.fprintf fmt "complete@ %a" + (Pretty_utils.pp_iter ~sep:"," + Datatype.String.Set.iter + (fun fmt s -> Format.fprintf fmt "@ %s" s)) + ic_bhvs; + pp_active fmt ic_active + | IPDisjoint {ic_active; ic_bhvs} -> + Format.fprintf fmt "disjoint@ %a" + (Pretty_utils.pp_iter ~sep:"," + Datatype.String.Set.iter + (fun fmt s -> Format.fprintf fmt "@ %s" s)) + ic_bhvs; + pp_active fmt ic_active + | IPAllocation {ial_allocs=(f,a)} -> + Cil_printer.pp_allocation fmt (FreeAlloc(f,a)) + | IPAssigns {ias_froms} -> Cil_printer.pp_assigns fmt (Writes ias_froms) + | IPFrom {if_from} -> Cil_printer.pp_from fmt if_from + | IPDecrease {id_ca=None; id_variant=v} -> Cil_printer.pp_decreases fmt v + | IPDecrease {id_variant=v} -> Cil_printer.pp_variant fmt v + | IPReachable {ir_kf=None; ir_kinstr=Kstmt _} -> assert false + | IPReachable {ir_kf=None; ir_kinstr=Kglobal} -> + Format.fprintf fmt "reachability of entry point" + | IPReachable {ir_kf=Some kf; ir_kinstr=Kglobal} -> + Format.fprintf fmt "reachability of function %a" Kf.pretty kf + | IPReachable {ir_kf=Some kf; ir_kinstr=Kstmt stmt; ir_program_point=ba} -> + Format.fprintf fmt "reachability %s stmt %a in %a" + (match ba with Before -> "of" | After -> "post") + Cil_datatype.Location.pretty_line (Cil_datatype.Stmt.loc stmt) + Kf.pretty kf + | IPPropertyInstance {ii_kf; ii_stmt; ii_ip} -> + Format.fprintf fmt "status of '%a'%t %a" + pretty_ip ii_ip + (fun fmt -> match get_kf ii_ip with + | Some kf -> Format.fprintf fmt " of %a" Kernel_function.pretty kf + | None -> ()) + pretty_instance_location (ii_kf, ii_stmt) + | IPOther {io_name} -> Format.pp_print_string fmt io_name + +let rec hash_ip = + let hash_bhv_loop = function + | Id_contract (a,b) -> (0, Hashtbl.hash (a,b.b_name)) + | Id_loop ca -> (1, ca.annot_id) + in + function + | IPPredicate {ip_pred=x} -> Hashtbl.hash (1, x.ip_id) + | IPAxiom {il_name=x} -> Hashtbl.hash (2, (x:string)) + | IPAxiomatic {iax_name=x} -> Hashtbl.hash (3, (x:string)) + | IPLemma {il_name=x} -> Hashtbl.hash (4, (x:string)) + | IPCodeAnnot {ica_ca=ca} -> Hashtbl.hash (5, ca.annot_id) + | IPComplete {ic_kf=f; ic_kinstr=ki; ic_bhvs=y; ic_active=x} -> + (* complete list is more likely to discriminate than active list. *) + Hashtbl.hash + (6, Kf.hash f, Kinstr.hash ki, + Datatype.String.Set.hash y, Datatype.String.Set.hash x) + | IPDisjoint {ic_kf=f; ic_kinstr=ki; ic_bhvs=y; ic_active=x} -> + Hashtbl.hash + (7, Kf.hash f, Kinstr.hash ki, + Datatype.String.Set.hash y, Datatype.String.Set.hash x) + | IPAssigns {ias_kf=f; ias_kinstr=ki; ias_bhv=b} -> + Hashtbl.hash (8, Kf.hash f, Kinstr.hash ki, hash_bhv_loop b) + | IPFrom {if_kf=kf; if_kinstr=ki; if_bhv=b; if_from=(t, _)} -> + Hashtbl.hash + (9, Kf.hash kf, Kinstr.hash ki, + hash_bhv_loop b, Identified_term.hash t) + | IPDecrease {id_kf=kf; id_kinstr=ki} -> + (* At most one loop variant per statement anyway, no + need to discriminate against the code annotation itself *) + Hashtbl.hash (10, Kf.hash kf, Kinstr.hash ki) + | IPBehavior {ib_kf=kf; ib_kinstr=s; ib_active=a; ib_bhv=b} -> + Hashtbl.hash + (11, Kf.hash kf, Kinstr.hash s, + (b.b_name:string), (a:Datatype.String.Set.t)) + | IPReachable {ir_kf=kf; ir_kinstr=ki; ir_program_point=ba} -> + Hashtbl.hash(12, Option.fold ~some:Kf.hash ~none:0 kf, + Kinstr.hash ki, Hashtbl.hash ba) + | IPAllocation {ial_kf=f; ial_kinstr=ki; ial_bhv=b} -> + Hashtbl.hash (13, Kf.hash f, Kinstr.hash ki, hash_bhv_loop b) + | IPPropertyInstance {ii_kf=kf_caller; ii_stmt=stmt; ii_ip=ip} -> + Hashtbl.hash (14, Kf.hash kf_caller, + Stmt.hash stmt, hash_ip ip) + | IPOther {io_name=s} -> Hashtbl.hash (15, (s:string)) + | IPTypeInvariant {iti_name=s} -> Hashtbl.hash (16, (s:string)) + | IPGlobalInvariant {igi_name=s} -> Hashtbl.hash (17, (s:string)) + | IPExtended {ie_ext={ext_id}} -> Hashtbl.hash (18, ext_id) + +let reprs = [ + IPAxiom { + il_name="";il_labels=[];il_args=[]; + il_pred=Logic_const.(toplevel_predicate ptrue); + il_attrs=[]; + il_loc=Location.unknown + }] + +let compare_behavior_or_loop b1 b2 = + match b1, b2 with + | Id_contract (a1,b1), Id_contract (a2,b2) -> + let n = Datatype.String.compare b1.b_name b2.b_name in + if n = 0 then Datatype.String.Set.compare a1 a2 else n + | Id_loop ca1, Id_loop ca2 -> + Datatype.Int.compare ca1.annot_id ca2.annot_id + | Id_contract _, Id_loop _ -> -1 + | Id_loop _, Id_contract _ -> 1 include Datatype.Make_with_collections (struct @@ -420,133 +555,14 @@ include Datatype.Make_with_collections type t = identified_property let name = "Property.t" - let reprs = [ - IPAxiom { - il_name="";il_labels=[];il_args=[]; - il_pred=Logic_const.(toplevel_predicate ptrue); - il_attrs=[]; - il_loc=Location.unknown - }] + + let reprs = reprs let mem_project = Datatype.never_any_project - let pp_active fmt active = - let sep = ref false in - let print_one a = - Format.fprintf fmt "%s%s" (if !sep then ", " else "") a; - sep:=true - in - Datatype.String.Set.iter print_one active - - let rec pretty fmt = function - | IPPredicate {ip_kind; ip_pred} -> - Format.fprintf fmt "%a@ %a" - pretty_predicate_kind ip_kind - Cil_printer.pp_identified_predicate ip_pred - | IPExtended {ie_ext} -> Cil_printer.pp_extended fmt ie_ext - | IPAxiom {il_name} -> Format.fprintf fmt "axiom@ %s" il_name - | IPAxiomatic {iax_name} -> Format.fprintf fmt "axiomatic@ %s" iax_name - | IPLemma {il_name} -> Format.fprintf fmt "lemma@ %s" il_name - | IPTypeInvariant {iti_name; iti_type} -> - Format.fprintf fmt "invariant@ %s for type %a" iti_name - Cil_printer.pp_typ iti_type - | IPGlobalInvariant {igi_name} -> - Format.fprintf fmt "global invariant@ %s" igi_name - | IPBehavior {ib_bhv; ib_kinstr; ib_active} -> - if Cil.is_default_behavior ib_bhv then - Format.pp_print_string fmt "default behavior" - else - Format.fprintf fmt "behavior %s" ib_bhv.b_name; - (match ib_kinstr with - | Kstmt s -> Format.fprintf fmt " for statement %d" s.sid - | Kglobal -> ()); - pp_active fmt ib_active - | IPCodeAnnot {ica_ca} -> Cil_printer.pp_code_annotation fmt ica_ca - | IPComplete {ic_active; ic_bhvs} -> - Format.fprintf fmt "complete@ %a" - (Pretty_utils.pp_iter ~sep:"," - Datatype.String.Set.iter - (fun fmt s -> Format.fprintf fmt "@ %s" s)) - ic_bhvs; - pp_active fmt ic_active - | IPDisjoint {ic_active; ic_bhvs} -> - Format.fprintf fmt "disjoint@ %a" - (Pretty_utils.pp_iter ~sep:"," - Datatype.String.Set.iter - (fun fmt s -> Format.fprintf fmt "@ %s" s)) - ic_bhvs; - pp_active fmt ic_active - | IPAllocation {ial_allocs=(f,a)} -> - Cil_printer.pp_allocation fmt (FreeAlloc(f,a)) - | IPAssigns {ias_froms} -> Cil_printer.pp_assigns fmt (Writes ias_froms) - | IPFrom {if_from} -> Cil_printer.pp_from fmt if_from - | IPDecrease {id_ca=None; id_variant=v} -> Cil_printer.pp_decreases fmt v - | IPDecrease {id_variant=v} -> Cil_printer.pp_variant fmt v - | IPReachable {ir_kf=None; ir_kinstr=Kstmt _} -> assert false - | IPReachable {ir_kf=None; ir_kinstr=Kglobal} -> - Format.fprintf fmt "reachability of entry point" - | IPReachable {ir_kf=Some kf; ir_kinstr=Kglobal} -> - Format.fprintf fmt "reachability of function %a" Kf.pretty kf - | IPReachable {ir_kf=Some kf; ir_kinstr=Kstmt stmt; ir_program_point=ba} -> - Format.fprintf fmt "reachability %s stmt %a in %a" - (match ba with Before -> "of" | After -> "post") - Cil_datatype.Location.pretty_line (Cil_datatype.Stmt.loc stmt) - Kf.pretty kf - | IPPropertyInstance {ii_kf; ii_stmt; ii_ip} -> - Format.fprintf fmt "status of '%a'%t %a" - pretty ii_ip - (fun fmt -> match get_kf ii_ip with - | Some kf -> Format.fprintf fmt " of %a" Kernel_function.pretty kf - | None -> ()) - pretty_instance_location (ii_kf, ii_stmt) - | IPOther {io_name} -> Format.pp_print_string fmt io_name - - let rec hash = - let hash_bhv_loop = function - | Id_contract (a,b) -> (0, Hashtbl.hash (a,b.b_name)) - | Id_loop ca -> (1, ca.annot_id) - in - function - | IPPredicate {ip_pred=x} -> Hashtbl.hash (1, x.ip_id) - | IPAxiom {il_name=x} -> Hashtbl.hash (2, (x:string)) - | IPAxiomatic {iax_name=x} -> Hashtbl.hash (3, (x:string)) - | IPLemma {il_name=x} -> Hashtbl.hash (4, (x:string)) - | IPCodeAnnot {ica_ca=ca} -> Hashtbl.hash (5, ca.annot_id) - | IPComplete {ic_kf=f; ic_kinstr=ki; ic_bhvs=y; ic_active=x} -> - (* complete list is more likely to discriminate than active list. *) - Hashtbl.hash - (6, Kf.hash f, Kinstr.hash ki, - Datatype.String.Set.hash y, Datatype.String.Set.hash x) - | IPDisjoint {ic_kf=f; ic_kinstr=ki; ic_bhvs=y; ic_active=x} -> - Hashtbl.hash - (7, Kf.hash f, Kinstr.hash ki, - Datatype.String.Set.hash y, Datatype.String.Set.hash x) - | IPAssigns {ias_kf=f; ias_kinstr=ki; ias_bhv=b} -> - Hashtbl.hash (8, Kf.hash f, Kinstr.hash ki, hash_bhv_loop b) - | IPFrom {if_kf=kf; if_kinstr=ki; if_bhv=b; if_from=(t, _)} -> - Hashtbl.hash - (9, Kf.hash kf, Kinstr.hash ki, - hash_bhv_loop b, Identified_term.hash t) - | IPDecrease {id_kf=kf; id_kinstr=ki} -> - (* At most one loop variant per statement anyway, no - need to discriminate against the code annotation itself *) - Hashtbl.hash (10, Kf.hash kf, Kinstr.hash ki) - | IPBehavior {ib_kf=kf; ib_kinstr=s; ib_active=a; ib_bhv=b} -> - Hashtbl.hash - (11, Kf.hash kf, Kinstr.hash s, - (b.b_name:string), (a:Datatype.String.Set.t)) - | IPReachable {ir_kf=kf; ir_kinstr=ki; ir_program_point=ba} -> - Hashtbl.hash(12, Option.fold ~some:Kf.hash ~none:0 kf, - Kinstr.hash ki, Hashtbl.hash ba) - | IPAllocation {ial_kf=f; ial_kinstr=ki; ial_bhv=b} -> - Hashtbl.hash (13, Kf.hash f, Kinstr.hash ki, hash_bhv_loop b) - | IPPropertyInstance {ii_kf=kf_caller; ii_stmt=stmt; ii_ip=ip} -> - Hashtbl.hash (14, Kf.hash kf_caller, - Stmt.hash stmt, hash ip) - | IPOther {io_name=s} -> Hashtbl.hash (15, (s:string)) - | IPTypeInvariant {iti_name=s} -> Hashtbl.hash (16, (s:string)) - | IPGlobalInvariant {igi_name=s} -> Hashtbl.hash (17, (s:string)) - | IPExtended {ie_ext={ext_id}} -> Hashtbl.hash (18, ext_id) + let pretty = pretty_ip + + let hash = hash_ip let rec equal p1 p2 = let eq_bhv (f1,ki1,b1) (f2,ki2,b2) = @@ -577,7 +593,8 @@ include Datatype.Make_with_collections IPComplete {ic_kf=f2;ic_kinstr=ki2;ic_active=a2;ic_bhvs=x2} | IPDisjoint {ic_kf=f1;ic_kinstr=ki1;ic_active=a1;ic_bhvs=x1}, IPDisjoint {ic_kf=f2;ic_kinstr=ki2;ic_active=a2;ic_bhvs=x2} -> - Kf.equal f1 f2 && Kinstr.equal ki1 ki2 && a1 = a2 && Datatype.String.Set.equal x1 x2 + Kf.equal f1 f2 && Kinstr.equal ki1 ki2 && a1 = a2 + && Datatype.String.Set.equal x1 x2 | IPAllocation {ial_kf=f1;ial_kinstr=ki1;ial_bhv=b1}, IPAllocation {ial_kf=f2;ial_kinstr=ki2;ial_bhv=b2} | IPAssigns {ias_kf=f1;ias_kinstr=ki1;ias_bhv=b1}, @@ -617,14 +634,7 @@ include Datatype.Make_with_collections if n = 0 then let n = Kinstr.compare ki1 ki2 in if n = 0 then - match b1, b2 with - | Id_contract (a1,b1), Id_contract (a2,b2) -> - let n = Datatype.String.compare b1.b_name b2.b_name in - if n = 0 then Datatype.String.Set.compare a1 a2 else n - | Id_loop ca1, Id_loop ca2 -> - Datatype.Int.compare ca1.annot_id ca2.annot_id - | Id_contract _, Id_loop _ -> -1 - | Id_loop _, Id_contract _ -> 1 + compare_behavior_or_loop b1 b2 else n else n in @@ -718,6 +728,129 @@ include Datatype.Make_with_collections end) +module Ordered_by_function = Datatype.Make_with_collections( + struct + include Datatype.Serializable_undefined + type t = identified_property + let name = "Property.Ordered_by_function" + let reprs = reprs + let hash = hash_ip + let pretty = pretty_ip + + (* be sure to keep cmp_same_kind synchronized with this function. *) + let cmp_kind p1 p2 = + let nb = function + | IPAxiomatic _ -> 1 + | IPAxiom _ -> 2 + | IPLemma _ -> 3 + | IPTypeInvariant _ -> 4 + | IPGlobalInvariant _ -> 5 + | IPPropertyInstance _ -> 6 + | IPBehavior _ -> 7 + | IPPredicate { ip_kind = PKRequires _ } -> 8 + | IPPredicate { ip_kind = PKAssumes _ } -> 9 + | IPPredicate { ip_kind = PKEnsures _ } -> 10 + | IPCodeAnnot { ica_ca = { annot_content = AAssert _ }} -> 11 + | IPCodeAnnot { ica_ca = { annot_content = AInvariant _ }} -> 12 + | IPCodeAnnot { ica_ca = { annot_content = APragma _ }} -> 13 + | IPAssigns _ -> 14 + | IPFrom _ -> 15 + | IPAllocation _ -> 16 + | IPPredicate { ip_kind = PKTerminates } -> 17 + | IPDecrease _ -> 18 + | IPReachable _ -> 18 + | IPComplete _ -> 19 + | IPDisjoint _ -> 20 + | IPExtended _ -> 21 + | IPOther _ -> 22 + | IPCodeAnnot ca -> + Kernel.fatal "Unexpected code annot %a in identified property" + Cil_printer.pp_code_annotation ca.ica_ca + in + Datatype.Int.compare (nb p1) (nb p2) + + let rec cmp_same_kind p1 p2 = + match (p1,p2) with + | IPAxiomatic { iax_name = n1 }, IPAxiomatic { iax_name = n2 } + | IPAxiom { il_name = n1 }, IPAxiom { il_name = n2 } + | IPLemma { il_name = n1 }, IPAxiom { il_name = n2 } + | IPTypeInvariant { iti_name = n1 }, IPTypeInvariant { iti_name = n2 } + | IPGlobalInvariant { igi_name = n1 }, + IPGlobalInvariant { igi_name = n2 } + -> + String.compare n1 n2 + | IPPropertyInstance { ii_ip = p1 }, IPPropertyInstance { ii_ip = p2 } + -> + let res = cmp_kind p1 p2 in + if res <> 0 then res else cmp_same_kind p1 p2 + | IPBehavior { ib_active = a1; ib_bhv = b1 }, + IPBehavior { ib_active = a2; ib_bhv = b2 } -> + compare_behavior_or_loop (Id_contract(a1,b1)) (Id_contract(a2,b2)) + | IPPredicate { ip_pred = i1 }, IPPredicate { ip_pred = i2 } -> + Datatype.Int.compare i1.ip_id i2.ip_id + | IPCodeAnnot { ica_ca = a1 }, IPCodeAnnot { ica_ca = a2 } -> + Datatype.Int.compare a1.annot_id a2.annot_id + | IPAssigns { ias_bhv = b1 }, IPAssigns { ias_bhv = b2 } + | IPAllocation { ial_bhv = b1 }, IPAllocation { ial_bhv = b2 } -> + compare_behavior_or_loop b1 b2 + | IPFrom { if_bhv = b1; if_from = (f1,_) }, + IPFrom { if_bhv = b2; if_from = (f2,_) } -> + let res = compare_behavior_or_loop b1 b2 in + if res <> 0 then res + else Datatype.Int.compare f1.it_id f2.it_id + (* at most one decrease per statement *) + | IPDecrease _, IPDecrease _ -> 0 + | IPReachable { ir_program_point = Before }, + IPReachable { ir_program_point = After } -> -1 + | IPReachable { ir_program_point = After }, + IPReachable { ir_program_point = Before } -> 1 + | IPReachable _, IPReachable _ -> 0 + + | IPComplete { ic_active = b1; ic_bhvs = s1 }, + IPComplete { ic_active = b2; ic_bhvs = s2 } + | IPDisjoint { ic_active = b1; ic_bhvs = s1 }, + IPDisjoint { ic_active = b2; ic_bhvs = s2 } -> + let res = Datatype.String.Set.compare b1 b2 in + if res <> 0 then res + else Datatype.String.Set.compare s1 s2 + | IPExtended { ie_ext = e1 }, IPExtended { ie_ext = e2 } -> + Datatype.Int.compare e1.ext_id e2.ext_id + | IPOther { io_name = n1; io_loc = l1 }, + IPOther { io_name = n2; io_loc = l2 } -> + let res = other_loc_compare l1 l2 in + if res <> 0 then res + else String.compare n1 n2 + | _ -> + Kernel.fatal + "Property.cmp_same_kind called with 2 arguments of different kind" + + let compare p1 p2 = + let kf1 = get_kf p1 and kf2 = get_kf p2 in + let cmp_kf kf1 kf2 = + String.compare + (Kernel_function.get_name kf1) (Kernel_function.get_name kf2) + in + let res = Option.compare cmp_kf kf1 kf2 in + if res <> 0 then res + else begin + let ki1 = get_kinstr p1 and ki2 = get_kinstr p2 in + let res = + match ki1, ki2 with + | Kglobal, Kglobal -> 0 + | Kstmt _, Kglobal -> 1 + | Kglobal, Kstmt _ -> -1 + | Kstmt s1, Kstmt s2 -> Datatype.Int.compare s1.sid s2.sid + in + if res <> 0 then res + else begin + let res = cmp_kind p1 p2 in + if res <> 0 then res + else cmp_same_kind p1 p2 + end + end + let equal = Datatype.from_compare + end) + let rec short_pretty fmt p = match p with | IPPredicate {ip_pred} -> (match (Logic_const.pred_of_id_pred ip_pred).pred_name with diff --git a/src/kernel_services/ast_data/property.mli b/src/kernel_services/ast_data/property.mli index 6ad7e28371f3d73dfba4d67ff5a61f5dd1d98164..ab15f381a1b032e7a41c83ed3ffad3891ab39261 100644 --- a/src/kernel_services/ast_data/property.mli +++ b/src/kernel_services/ast_data/property.mli @@ -214,6 +214,18 @@ and identified_property = private include Datatype.S_with_collections with type t = identified_property +(** Datatype with alternative ordering, where properties are ordered according + the following criteria: + 1. Kf name (global properties ranked first) + 2. Kinstr + 3. kind of property + 4. id of the property + + @since Frama-C+dev +*) +module Ordered_by_function: + Datatype.S_with_collections with type t = identified_property + val short_pretty: Format.formatter -> t -> unit (** output a meaningful name for the property (e.g. the name of the corresponding identified predicate when available) diff --git a/src/kernel_services/ast_data/property_status.ml b/src/kernel_services/ast_data/property_status.ml index 807c37dc47425e70d4a927d59fd701b95ae19148..82c81ac995ef87ca11337905884866583a0cfdf0 100644 --- a/src/kernel_services/ast_data/property_status.ml +++ b/src/kernel_services/ast_data/property_status.ml @@ -182,9 +182,10 @@ let fold_on_statuses f ip acc = Emitter_with_properties.Hashtbl.fold f h acc with Not_found -> acc - let iter f = Status.iter (fun p _ -> f p) let fold f = Status.fold (fun p _ -> f p) +let iter_sorted ~cmp f = Status.iter_sorted ~cmp (fun p _ -> f p) +let fold_sorted ~cmp f = Status.fold_sorted ~cmp (fun p _ -> f p) (* ok to be computed once right now since there is no parameter dependency *) let usable_kernel_emitter = Emitter.get Emitter.kernel diff --git a/src/kernel_services/ast_data/property_status.mli b/src/kernel_services/ast_data/property_status.mli index 5656c38152bc9d7009c892748ecdf561bed82fcf..94f0418c371b562131521cc205ad6fd1e862fe49 100644 --- a/src/kernel_services/ast_data/property_status.mli +++ b/src/kernel_services/ast_data/property_status.mli @@ -124,6 +124,9 @@ val get: Property.t -> status Consider using {!Property_status.Consolidation.get} if you want to know the consolidated status of the property. *) +(** Iteration on all the individual statuses emitted for the given property. + @since Aluminium-20160501 *) + val iter_on_statuses: (emitter_with_properties -> emitted_status -> unit) -> Property.t -> unit @@ -131,8 +134,6 @@ val fold_on_statuses: (emitter_with_properties -> emitted_status -> 'a -> 'a) -> Property.t -> 'a -> 'a -(** Iteration on all the individual statuses emitted for the given property. - @since Aluminium-20160501 *) (* ************************************************************************ *) (** {2 Consolidated status} *) @@ -232,12 +233,20 @@ module Consolidation_graph: sig end (* ************************************************************************* *) -(** {2 Access to the registered properties} *) +(** {2 Iteration over the registered properties} *) (* ************************************************************************* *) val iter: (Property.t -> unit) -> unit val fold: (Property.t -> 'a -> 'a) -> 'a -> 'a +(** @since Frama-C+dev *) +val iter_sorted: + cmp:(Property.t -> Property.t -> int) -> (Property.t -> unit) -> unit + +val fold_sorted: + cmp:(Property.t -> Property.t -> int) -> + (Property.t -> 'a -> 'a) -> 'a -> 'a + (* ************************************************************************* *) (** {2 API not for casual users} *) (* ************************************************************************* *) diff --git a/src/kernel_services/ast_queries/cil.ml b/src/kernel_services/ast_queries/cil.ml index b8d33a9ece30bc7a40fd4344d1b583553a2ec491..a23817a3be96cf8b08067ccda0783e2b22c8dc78 100644 --- a/src/kernel_services/ast_queries/cil.ml +++ b/src/kernel_services/ast_queries/cil.ml @@ -665,7 +665,9 @@ let update_var_type v t = v.vtype <- if v.vghost then typeAddGhost t else t; match v.vlogic_var_assoc with | None -> () - | Some lv -> lv.lv_type <- Ctype t + | Some lv -> + (* ghost attribute is irrelevant in ACSL. *) + lv.lv_type <- Ctype t (* Make a varinfo. Used mostly as a helper function below *) let makeVarinfo diff --git a/src/kernel_services/ast_queries/cil_builtins.ml b/src/kernel_services/ast_queries/cil_builtins.ml index 94d8a3a62efb9e5a14bcda569a26f697ecf8ad9d..f070c99028da28b9602d3c19c0742bad4fb22a6d 100644 --- a/src/kernel_services/ast_queries/cil_builtins.ml +++ b/src/kernel_services/ast_queries/cil_builtins.ml @@ -685,6 +685,13 @@ let init_common_builtins () = [ Cil.theMachine.typeOfSizeOf ] false +let custom_builtins = Queue.create () + +let add_custom_builtin f = Queue.add f custom_builtins + +let register_custom_builtin (name, rt, prms, isva) = + Builtin_functions.add name (rt,prms,isva) + let init_builtins () = if not (Cil.selfMachine_is_computed ()) then Kernel.fatal ~current:true "You must call initCIL before init_builtins" ; @@ -696,7 +703,8 @@ let init_builtins () = else begin initVABuiltins (); if Cil.gccMode () then initGccBuiltins (); - end + end; + Queue.iter (fun f -> register_custom_builtin (f())) custom_builtins (** This is used as the location of the prototypes of builtin functions. *) let builtinLoc: location = Location.unknown diff --git a/src/kernel_services/ast_queries/cil_builtins.mli b/src/kernel_services/ast_queries/cil_builtins.mli index adb9caf1eb57e165b9e9ba0d56d9bf8e9dce3670..90b7cfea4a7e9868c2e69821af99e32573edbae5 100644 --- a/src/kernel_services/ast_queries/cil_builtins.mli +++ b/src/kernel_services/ast_queries/cil_builtins.mli @@ -86,7 +86,8 @@ val init_builtins: unit -> unit (** A list of the built-in functions for the current compiler (GCC or * MSVC, depending on [!msvcMode]). Maps the name to the * result and argument types, and whether it is vararg. - * Initialized by {!Cil.initCIL} + * Initialized by {!Cil.initCIL}. Do not add builtins directly, use + * {! add_custom_builtin } below for that. * * This map replaces [gccBuiltins] and [msvcBuiltins] in previous * versions of CIL.*) @@ -94,5 +95,13 @@ module Builtin_functions : State_builder.Hashtbl with type key = string and type data = typ * typ list * bool +(** Register a new builtin. The function will be called after setting + the machdep and initializing machine-dependent builtins. Hence, types + such {!Cil.uint16_t} might be used if needed. + + @since Frama-C+dev +*) +val add_custom_builtin: (unit -> (string * typ * typ list * bool)) -> unit + (** This is used as the location of the prototypes of builtin functions. *) val builtinLoc: location diff --git a/src/plugins/aorai/.gitignore b/src/plugins/aorai/.gitignore index dbc3d247b6627099a25ed2b34608c057d6120bfe..6e2440c7d5053e68723ce0ec0a462d751551dda1 100644 --- a/src/plugins/aorai/.gitignore +++ b/src/plugins/aorai/.gitignore @@ -1,4 +1,5 @@ /tests/ptests_config +/aorai_eva_analysis.ml /Makefile /ltllexer.ml /ltlparser.ml diff --git a/src/plugins/aorai/Makefile.in b/src/plugins/aorai/Makefile.in index c39a616ce7e5ea1bb53d8bbd826cdc308701d539..dfb9ab78cc822aa72b8267e6de9a7933dec39972 100644 --- a/src/plugins/aorai/Makefile.in +++ b/src/plugins/aorai/Makefile.in @@ -41,6 +41,7 @@ PLUGIN_DIR ?=. PLUGIN_ENABLE:=@ENABLE_AORAI@ PLUGIN_NAME:=Aorai PLUGIN_GENERATED:= $(addprefix ${PLUGIN_DIR}/, \ + aorai_eva_analysis.ml \ promelalexer_withexps.ml promelaparser_withexps.ml \ promelaparser_withexps.mli \ promelalexer.ml promelaparser.ml promelaparser.mli \ @@ -67,13 +68,36 @@ PLUGIN_CMO:= bool3 \ promelalexer_withexps \ aorai_dataflow \ aorai_visitors \ + aorai_eva_analysis \ aorai_register PLUGIN_CMI:= ltlast promelaast PLUGIN_DISTRIBUTED:=$(PLUGIN_ENABLE) -PLUGIN_DISTRIB_EXTERNAL:= Makefile.in configure.ac configure +PLUGIN_DISTRIB_EXTERNAL:= \ + aorai_eva_analysis.enabled.ml aorai_eva_analysis.disabled.ml \ + Makefile.in configure.ac configure PLUGIN_HAS_EXT_DOC:=no # [JS 2010/07/28] was 'yes' # but prevent 'make src-distrib to work +PLUGIN_DEPENDENCIES:= + +# Dynamic dependencies + +$(PLUGIN_DIR)/aorai_eva_analysis.ml: + $(PRINT_MAKING) $@ + $(CP) $< $@ + $(CHMOD_RO) $@ + +ifneq "$(ENABLE_EVA)" "no" +PLUGIN_DEPENDENCIES+= Eva +$(PLUGIN_DIR)/aorai_eva_analysis.ml: $(PLUGIN_DIR)/aorai_eva_analysis.enabled.ml +else +$(PLUGIN_DIR)/aorai_eva_analysis.ml: $(PLUGIN_DIR)/aorai_eva_analysis.disabled.ml +endif + +$(PLUGIN_DIR)/aorai_eva_analysis.ml: $(PLUGIN_DIR)/Makefile share/Makefile.config + + +# Tests # aorai_ya can always be run PLUGIN_TESTS_DIRS:=ya diff --git a/src/plugins/aorai/aorai_dataflow.ml b/src/plugins/aorai/aorai_dataflow.ml index 13bf13719f7650a0b0c82d1e37f6f30cdcc42a27..a556a8a1cd31661414e42c6cd5acaa21f87c69b3 100644 --- a/src/plugins/aorai/aorai_dataflow.ml +++ b/src/plugins/aorai/aorai_dataflow.ml @@ -70,6 +70,7 @@ let compose_range loc b r1 r2 = -> if Cil.isLogicZero b then Data_for_aorai.absolute_range loc (min1 + min2) else Unbounded (min1 + min2) + | Unknown, _ | _, Unknown -> Unknown let fail_on_both k elt1 elt2 = match elt1, elt2 with @@ -85,8 +86,7 @@ let compose_bindings map1 loc vals map = let vals = Cil_datatype.Term.Map.fold (fun base intv vals -> let vals' = - if Cil.isLogicZero base then - Cil_datatype.Term.Map.add base intv Cil_datatype.Term.Map.empty + if Cil.isLogicZero base then Cil_datatype.Term.Map.singleton base intv else try let orig_base = Cil_datatype.Term.Map.find base map1 in @@ -96,8 +96,7 @@ let compose_bindings map1 loc vals map = Cil_datatype.Term.Map.add base intv' map ) orig_base Cil_datatype.Term.Map.empty - with Not_found -> - Cil_datatype.Term.Map.add base intv Cil_datatype.Term.Map.empty + with Not_found -> Cil_datatype.Term.Map.singleton base intv in Cil_datatype.Term.Map.merge (Extlib.merge_opt (Data_for_aorai.merge_range loc)) vals' vals @@ -273,8 +272,9 @@ let make_start_transition ?(is_main=false) kf init_states = (fun trans kf -> Aorai_utils.isCrossable trans kf Promelaast.Call) in let treat_one_state state acc = - let my_trans = Path_analysis.get_transitions_of_state state auto in - let treat_one_trans acc trans = + if Data_for_aorai.isObservableFunction kf then begin + let my_trans = Path_analysis.get_transitions_of_state state auto in + let treat_one_trans acc trans = if is_crossable trans kf then begin let bindings = actions_to_range trans.actions in let fst_set = @@ -286,13 +286,23 @@ let make_start_transition ?(is_main=false) kf init_states = add_or_merge trans.stop (fst_set, last_set, bindings) acc end else acc - in - let possible_states = - List.fold_left - treat_one_trans Data_for_aorai.Aorai_state.Map.empty my_trans - in - if Data_for_aorai.Aorai_state.Map.is_empty possible_states then acc - else Data_for_aorai.Aorai_state.Map.add state possible_states acc + in + let possible_states = + List.fold_left + treat_one_trans Data_for_aorai.Aorai_state.Map.empty my_trans + in + if Data_for_aorai.Aorai_state.Map.is_empty possible_states then acc + else Data_for_aorai.Aorai_state.Map.add state possible_states acc + end else begin + (* function is not observed by automaton: this is as if there + were a single transition letting the state unchanged. *) + Data_for_aorai.Aorai_state.( + Map.add state + (Map.singleton state + (Set.singleton state, Set.singleton state, + Cil_datatype.Term.Map.empty)) + acc) + end in let res = Data_for_aorai.Aorai_state.Set.fold @@ -304,16 +314,28 @@ let make_return_transition kf state = set_return_state s state; let auto = Data_for_aorai.getGraph () in let treat_one_state state bindings acc = - let my_trans = Path_analysis.get_transitions_of_state state auto in - let last = Data_for_aorai.Aorai_state.Set.singleton state in - let treat_one_trans acc trans = - if Aorai_utils.isCrossable trans kf Promelaast.Return then begin - let my_bindings = actions_to_range trans.actions in - let new_bindings = compose_actions bindings (last, last, my_bindings) in - add_or_merge trans.stop new_bindings acc - end else acc - in - List.fold_left treat_one_trans acc my_trans + if Data_for_aorai.isObservableFunction kf then begin + let my_trans = Path_analysis.get_transitions_of_state state auto in + let last = Data_for_aorai.Aorai_state.Set.singleton state in + let treat_one_trans acc trans = + if Aorai_utils.isCrossable trans kf Promelaast.Return then begin + let my_bindings = actions_to_range trans.actions in + let new_bindings = + compose_actions bindings (last, last, my_bindings) + in + add_or_merge trans.stop new_bindings acc + end else acc + in + List.fold_left treat_one_trans acc my_trans + end else begin + (* non-observable function: its return does not change the state + of the automaton. *) + let last = Data_for_aorai.Aorai_state.Set.singleton state in + let new_bindings = + compose_actions bindings (last,last,Cil_datatype.Term.Map.empty) + in + add_or_merge state new_bindings acc + end in let treat_one_path start_state curr_state acc = let res = @@ -430,7 +452,7 @@ module Computer(I: Init) = struct let do_call s f args (state,loops as d) = let kf = Globals.Functions.get f in - if Data_for_aorai.isIgnoredFunction (Kernel_function.get_name kf) + if Data_for_aorai.isIgnoredFunction kf then d (* we simply skip ignored functions. *) else begin set_call_state s state; @@ -455,7 +477,13 @@ module Computer(I: Init) = struct let acc = Cil_datatype.Term.Map.add lv value acc in bind acc prms args in - let args = bind Cil_datatype.Term.Map.empty prms args in + let res = Logic_const.tresult (Kernel_function.get_return_type kf) in + let z = Logic_const.tinteger 0 in + (* invalidate bindings to \result of the callee. + TODO: generate global variable to store the result if needed? + *) + let map = Cil_datatype.Term.Map.(singleton res (singleton z Unknown)) in + let args = bind map prms args in let init_states = extract_current_states state in let init_trans = make_start_transition kf init_states in let end_state = !compute_func I.stack (Kstmt s) kf init_trans in @@ -532,7 +560,7 @@ module Computer(I: Init) = struct end let compute_func_aux stack call_site kf init_state = - if Data_for_aorai.isIgnoredFunction (Kernel_function.get_name kf) then + if Data_for_aorai.isIgnoredFunction kf then Aorai_option.fatal "compute_func on function %a which is ignored by Aorai" Kernel_function.pretty kf else if List.mem_assq kf stack then begin @@ -620,7 +648,7 @@ let () = compute_func := compute_func_aux let compute_forward () = let kf = Globals.Functions.find_by_name (Kernel.MainFunction.get()) in - if Data_for_aorai.isIgnoredFunction (Kernel_function.get_name kf) then + if Data_for_aorai.isIgnoredFunction kf then Aorai_option.abort "Main function %a is ignored by Aorai" Kernel_function.pretty kf; let (states,_) = Data_for_aorai.getGraph () in @@ -757,7 +785,7 @@ struct let do_call s f state = let kf = Globals.Functions.get f in - if Data_for_aorai.isIgnoredFunction (Kernel_function.get_name kf) + if Data_for_aorai.isIgnoredFunction kf then Dataflow2.Default (* we simply skip ignored functions. *) else begin try @@ -912,7 +940,7 @@ let filter_init_state restrict initial map acc = with Not_found -> acc let backward_analysis_aux stack kf ret_state = - if (Data_for_aorai.isIgnoredFunction (Kernel_function.get_name kf)) then + if Data_for_aorai.isIgnoredFunction kf then Aorai_option.fatal "Call backward analysis on ignored function %a" Kernel_function.pretty kf else if List.memq kf stack then begin @@ -1002,7 +1030,7 @@ let () = backward_analysis := backward_analysis_aux let compute_backward () = let kf = Globals.Functions.find_by_name (Kernel.MainFunction.get()) in - if Data_for_aorai.isIgnoredFunction (Kernel_function.get_name kf) then + if Data_for_aorai.isIgnoredFunction kf then Aorai_option.abort "Main function %a is ignored by Aorai" Kernel_function.pretty kf; let final_state = Data_for_aorai.get_kf_return_state kf in diff --git a/src/plugins/aorai/aorai_eva_analysis.disabled.ml b/src/plugins/aorai/aorai_eva_analysis.disabled.ml new file mode 100644 index 0000000000000000000000000000000000000000..b17dd3dae1bb60c238aeee9060a17c1373bc52dd --- /dev/null +++ b/src/plugins/aorai/aorai_eva_analysis.disabled.ml @@ -0,0 +1,26 @@ +(**************************************************************************) +(* *) +(* This file is part of Aorai plug-in of Frama-C. *) +(* *) +(* Copyright (C) 2007-2020 *) +(* CEA (Commissariat à l'énergie atomique et aux énergies *) +(* alternatives) *) +(* INRIA (Institut National de Recherche en Informatique et en *) +(* Automatique) *) +(* INSA (Institut National des Sciences Appliquees) *) +(* *) +(* you can redistribute it and/or modify it under the terms of the GNU *) +(* Lesser General Public License as published by the Free Software *) +(* Foundation, version 2.1. *) +(* *) +(* It is distributed in the hope that it will be useful, *) +(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) +(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) +(* GNU Lesser General Public License for more details. *) +(* *) +(* See the GNU Lesser General Public License version 2.1 *) +(* for more details (enclosed in the file licenses/LGPLv2.1). *) +(* *) +(**************************************************************************) + +let setup () = () diff --git a/src/plugins/aorai/aorai_eva_analysis.enabled.ml b/src/plugins/aorai/aorai_eva_analysis.enabled.ml new file mode 100644 index 0000000000000000000000000000000000000000..6677062252912351507f77c28f5e9a6ae6e0851a --- /dev/null +++ b/src/plugins/aorai/aorai_eva_analysis.enabled.ml @@ -0,0 +1,97 @@ +(**************************************************************************) +(* *) +(* This file is part of Aorai plug-in of Frama-C. *) +(* *) +(* Copyright (C) 2007-2020 *) +(* CEA (Commissariat à l'énergie atomique et aux énergies *) +(* alternatives) *) +(* INRIA (Institut National de Recherche en Informatique et en *) +(* Automatique) *) +(* INSA (Institut National des Sciences Appliquees) *) +(* *) +(* you can redistribute it and/or modify it under the terms of the GNU *) +(* Lesser General Public License as published by the Free Software *) +(* Foundation, version 2.1. *) +(* *) +(* It is distributed in the hope that it will be useful, *) +(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) +(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) +(* GNU Lesser General Public License for more details. *) +(* *) +(* See the GNU Lesser General Public License version 2.1 *) +(* for more details (enclosed in the file licenses/LGPLv2.1). *) +(* *) +(**************************************************************************) + +let show_aorai_variable state fmt var_name = + let vi = Data_for_aorai.(get_varinfo var_name) in + let cvalue = !Db.Value.eval_expr state (Cil.evar vi) in + try + let i = Ival.project_int (Cvalue.V.project_ival cvalue) in + let state_name = Data_for_aorai.getStateName (Integer.to_int i) in + Format.fprintf fmt "%s" state_name + with Cvalue.V.Not_based_on_null | Ival.Not_Singleton_Int | + Z.Overflow | Not_found -> + Format.fprintf fmt "?" + +let show_val fmt (expr, v, _) = + Format.fprintf fmt "%a in %a" + Printer.pp_exp expr + (Cvalue.V.pretty_typ (Some (Cil.typeOf expr))) v + +let show_aorai_state = "Frama_C_show_aorai_state" + +let builtin_show_aorai_state state args = + if not (Aorai_option.Deterministic.get()) then begin + Aorai_option.warning + ~current:true "%s can only display info for deterministic automata" + show_aorai_state + end else begin + let history = Data_for_aorai.(curState :: (whole_history ())) in + Aorai_option.result ~current:true "@[<hv>%a@]" + (Pretty_utils.pp_list ~sep:" <- " (show_aorai_variable state)) history; + if args <> [] then begin + Aorai_option.result ~current:true "@[<hv>%a@]" + (Pretty_utils.pp_list ~sep:"," show_val) args + end; + end; + (* Return value : returns nothing, changes nothing *) + { + Value_types.c_values = [None, state]; + c_clobbered = Base.SetLattice.bottom; + c_from = None; + c_cacheable = Value_types.Cacheable; + } + +let () = + Cil_builtins.add_custom_builtin + (fun () -> (show_aorai_state,Cil.voidType,[],true)) + +let () = + !Db.Value.register_builtin show_aorai_state builtin_show_aorai_state + +let add_slevel_annotation vi kind = + match kind with + | Aorai_visitors.Aux_funcs.(Pre _ | Post _) -> + let kf = Globals.Functions.get vi in + let stmt = Kernel_function.find_first_stmt kf + and loc = Kernel_function.get_location kf + and emitter = Aorai_option.emitter in + Eva.Eva_annotations.(add_slevel_annot ~emitter ~loc stmt SlevelFull) + | _ -> () + +let add_slevel_annotations () = + Aorai_visitors.Aux_funcs.iter add_slevel_annotation + +let add_partitioning varname = + match Data_for_aorai.get_varinfo_option varname with + | None -> () + | Some vi -> Eva.Value_parameters.use_global_value_partitioning vi + +let add_state_variables_partitioning () = + add_partitioning Data_for_aorai.curState; + List.iter add_partitioning (Data_for_aorai.whole_history ()) + +let setup () = + add_slevel_annotations (); + add_state_variables_partitioning () diff --git a/src/plugins/aorai/aorai_eva_analysis.mli b/src/plugins/aorai/aorai_eva_analysis.mli new file mode 100644 index 0000000000000000000000000000000000000000..8f6790f45f59923cbd32dbb34e38365ccaf82bf3 --- /dev/null +++ b/src/plugins/aorai/aorai_eva_analysis.mli @@ -0,0 +1,26 @@ +(**************************************************************************) +(* *) +(* This file is part of Aorai plug-in of Frama-C. *) +(* *) +(* Copyright (C) 2007-2020 *) +(* CEA (Commissariat à l'énergie atomique et aux énergies *) +(* alternatives) *) +(* INRIA (Institut National de Recherche en Informatique et en *) +(* Automatique) *) +(* INSA (Institut National des Sciences Appliquees) *) +(* *) +(* you can redistribute it and/or modify it under the terms of the GNU *) +(* Lesser General Public License as published by the Free Software *) +(* Foundation, version 2.1. *) +(* *) +(* It is distributed in the hope that it will be useful, *) +(* but WITHOUT ANY WARRANTY; without even the implied warranty of *) +(* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) +(* GNU Lesser General Public License for more details. *) +(* *) +(* See the GNU Lesser General Public License version 2.1 *) +(* for more details (enclosed in the file licenses/LGPLv2.1). *) +(* *) +(**************************************************************************) + +val setup : unit -> unit diff --git a/src/plugins/aorai/aorai_option.ml b/src/plugins/aorai/aorai_option.ml index 1dfe1a0504a9c33546d943fe3705f79c97373bf9..90946d86242cd3b86fe8a609ed4e29258ca11606 100644 --- a/src/plugins/aorai/aorai_option.ml +++ b/src/plugins/aorai/aorai_option.ml @@ -24,141 +24,149 @@ (**************************************************************************) include Plugin.Register - (struct - let name = "aorai" - let shortname = "aorai" - let help = "verification of behavioral properties (experimental)" - end) + (struct + let name = "aorai" + let shortname = "aorai" + let help = "verification of behavioral properties (experimental)" + end) module Ltl_File = Filepath (struct - let option_name = "-aorai-ltl" - let arg_name = "" - let file_kind = "ltl" - let existence = Fc_Filepath.Must_exist - let help = "specifies file name for LTL property" - end) + let option_name = "-aorai-ltl" + let arg_name = "" + let file_kind = "ltl" + let existence = Fc_Filepath.Must_exist + let help = "specifies file name for LTL property" + end) module To_Buchi = Filepath (struct - let option_name = "-aorai-to-buchi" - let arg_name = "f" - let file_kind = "Promela" - let existence = Fc_Filepath.Indifferent - let help = - "only generates the buchi automata (in Promela language) in file <s>" - end) + let option_name = "-aorai-to-buchi" + let arg_name = "f" + let file_kind = "Promela" + let existence = Fc_Filepath.Indifferent + let help = + "only generates the buchi automata (in Promela language) in file <s>" + end) module Buchi = Filepath (struct - let option_name = "-aorai-buchi" - let arg_name = "f" - let file_kind = "Promela" - let existence = Fc_Filepath.Must_exist - let help = "considers the property described by the buchi automata \ - (in Promela language) from file <f>." - end) + let option_name = "-aorai-buchi" + let arg_name = "f" + let file_kind = "Promela" + let existence = Fc_Filepath.Must_exist + let help = "considers the property described by the buchi automata \ + (in Promela language) from file <f>." + end) module Ya = Filepath (struct - let option_name = "-aorai-automata" - let arg_name = "f" - let file_kind = "Ya" - let existence = Fc_Filepath.Must_exist - let help = "considers the property described by the ya automata \ - (in Ya language) from file <f>." - end) - - -module Output_Spec = - False(struct - let option_name = "-aorai-show-op-spec" - let help = - "displays computed pre and post-condition of each operation" - end) - -module Output_C_File = - Filepath - (struct - let option_name = "-aorai-output-c-file" - let arg_name = "" - let file_kind = "annotated C" - let existence = Fc_Filepath.Indifferent - let help = "specifies generated file name for annotated C code" - end) + let option_name = "-aorai-automata" + let arg_name = "f" + let file_kind = "Ya" + let existence = Fc_Filepath.Must_exist + let help = "considers the property described by the ya automata \ + (in Ya language) from file <f>." + end) module Dot = False(struct - let option_name = "-aorai-dot" - let help = "generates a dot file of the Buchi automata" - end) + let option_name = "-aorai-dot" + let help = "generates a dot file of the Buchi automata" + end) module DotSeparatedLabels = False(struct - let option_name = "-aorai-dot-sep-labels" - let help = "tells dot to not output guards directly over the edges" - end) + let option_name = "-aorai-dot-sep-labels" + let help = "tells dot to not output guards directly over the edges" + end) module AbstractInterpretation = False(struct - let option_name = "-aorai-simple-AI" - let help = "use simple abstract interpretation" - end) + let option_name = "-aorai-simple-AI" + let help = "use simple abstract interpretation" + end) module AbstractInterpretationOff = False(struct - let option_name = "-aorai-AI-off" - let help = "does not use abstract interpretation" - end) + let option_name = "-aorai-AI-off" + let help = "does not use abstract interpretation" + end) let () = Parameter_customize.set_negative_option_name "-aorai-spec-off" module Axiomatization = True(struct - let option_name = "-aorai-spec-on" - let help = "if set, does not axiomatize automata" - end) + let option_name = "-aorai-spec-on" + let help = "if set, does not axiomatize automata" + end) + +module GenerateAnnotations = + True + (struct + let option_name = "-aorai-generate-annotations" + let help = "generate computed ACSL annotations for the program" + end) + +module GenerateDeterministicLemmas = + True + (struct + let option_name = "-aorai-generate-deterministic-lemmas" + let help = "generate lemmas to be proven in order to prove that an \ + automaton is indeed deterministic" + end) module ConsiderAcceptance = False(struct - let option_name = "-aorai-acceptance" - let help = "if set, considers acceptation states" - end) + let option_name = "-aorai-acceptance" + let help = "if set, considers acceptation states" + end) let () = Parameter_customize.set_negative_option_name "-aorai-raw-auto" module AutomataSimplification= True (struct - let option_name = "-aorai-simplified-auto" - let help = "If set, does not simplify automata" - end) - -module Test = - Zero(struct - let option_name = "-aorai-test" - let arg_name = "" - let help = "Testing mode (0 = no test)" - end) + let option_name = "-aorai-simplified-auto" + let help = "If set, does not simplify automata" + end) module AddingOperationNameAndStatusInSpecification = False (struct let option_name = "-aorai-add-oper" let help = "Adding current operation name (and statut) in pre/post \ -conditions" - end) + conditions" + end) module Deterministic= State_builder.Ref (Datatype.Bool) (struct - let name = "Aorai_option.Deterministic" - let dependencies = [] - let default () = false - end) + let name = "Aorai_option.Deterministic" + let dependencies = [] + let default () = false + end) + +module SmokeTests= + False + (struct + let option_name = "-aorai-smoke-tests" + let help = "Add assertion in the generated functions to ensure \ + that the automaton is always in at least one state" + end) + +module InstrumentationHistory = + Int + (struct + let option_name = "-aorai-instrumentation-history" + let arg_name = "N" + let help = "the instrumentation will keep an history of the N last states" + let default = 0 + end) + let is_on () = not (Ltl_File.is_default () && To_Buchi.is_default () && @@ -170,17 +178,21 @@ let promela_file () = let advance_abstract_interpretation () = not (AbstractInterpretationOff.get ()) && not (AbstractInterpretation.get ()) -let emitter = +let emitter = Emitter.create "Aorai" - [ Emitter.Code_annot; Emitter.Funspec; Emitter.Global_annot ] + [ Emitter.Code_annot; Emitter.Funspec; Emitter.Global_annot ] ~correctness: - [ Ltl_File.parameter; To_Buchi.parameter; Buchi.parameter; - Ya.parameter; Axiomatization.parameter; ConsiderAcceptance.parameter; - AutomataSimplification.parameter ] + [ Ltl_File.parameter; To_Buchi.parameter; Buchi.parameter; + Ya.parameter; Axiomatization.parameter; + ConsiderAcceptance.parameter; + AutomataSimplification.parameter ] ~tuning: - [ AbstractInterpretation.parameter; - AddingOperationNameAndStatusInSpecification.parameter ] + [ AbstractInterpretation.parameter; + AddingOperationNameAndStatusInSpecification.parameter; + InstrumentationHistory.parameter; + GenerateAnnotations.parameter ] + (* Local Variables: diff --git a/src/plugins/aorai/aorai_option.mli b/src/plugins/aorai/aorai_option.mli index 111cf0e74ea3f7ac344cb47ffd02be462f11734c..b6b220f0fe38994dd4dbc14ae6276628741588d5 100644 --- a/src/plugins/aorai/aorai_option.mli +++ b/src/plugins/aorai/aorai_option.mli @@ -29,20 +29,28 @@ module Ltl_File: Parameter_sig.Filepath module To_Buchi: Parameter_sig.Filepath module Buchi: Parameter_sig.Filepath module Ya: Parameter_sig.Filepath -module Output_Spec: Parameter_sig.Bool -module Output_C_File: Parameter_sig.Filepath module Dot: Parameter_sig.Bool module DotSeparatedLabels: Parameter_sig.Bool module AbstractInterpretation: Parameter_sig.Bool module Axiomatization: Parameter_sig.Bool +module GenerateAnnotations: Parameter_sig.Bool +module GenerateDeterministicLemmas: Parameter_sig.Bool module ConsiderAcceptance: Parameter_sig.Bool module AutomataSimplification: Parameter_sig.Bool -module Test: Parameter_sig.Int module AddingOperationNameAndStatusInSpecification: Parameter_sig.Bool +(** if [true], adds assertion at the end of the generated function + to check that the automaton is not in the rejecting state (in + the deterministic case), or that at least one non-rejecting state + is active (in the non-deterministic state). +*) +module SmokeTests: Parameter_sig.Bool + (** [true] if the user declares that its ya automaton is deterministic. *) module Deterministic: State_builder.Ref with type data = bool +module InstrumentationHistory: Parameter_sig.Int + val is_on : unit -> bool val promela_file: unit -> Filepath.Normalized.t val advance_abstract_interpretation: unit -> bool diff --git a/src/plugins/aorai/aorai_register.ml b/src/plugins/aorai/aorai_register.ml index d60095bb840c41653edee18abf3f77432119d6c7..d609113165c890b38a0cbe071952c633733fdcde 100644 --- a/src/plugins/aorai/aorai_register.ml +++ b/src/plugins/aorai/aorai_register.ml @@ -33,7 +33,6 @@ let output_c_file = ref Filepath.Normalized.unknown let ltl_tmp_file = ref Filepath.Normalized.unknown let ltl_file = ref Filepath.Normalized.unknown let dot_file = ref Filepath.Normalized.unknown -let generatesCFile = ref true let ltl2ba_params = " -l -p -o " let ltl_to_promela = Hashtbl.create 7 @@ -45,15 +44,15 @@ let set_ltl_correspondence h = let convert_ltl_exprs t = let rec convert_cond cond = match cond with - POr(c1,c2) -> POr (convert_cond c1, convert_cond c2) - | PAnd(c1,c2) -> PAnd(convert_cond c1, convert_cond c2) - | PNot c -> PNot (convert_cond c) - | PCall _ | PReturn _ | PTrue | PFalse -> cond - | PRel(Neq,PVar x,PCst _) -> - (try - let (rel,t1,t2) = Hashtbl.find ltl_to_promela x in PRel(rel,t1,t2) - with Not_found -> cond) - | PRel _ -> cond + POr(c1,c2) -> POr (convert_cond c1, convert_cond c2) + | PAnd(c1,c2) -> PAnd(convert_cond c1, convert_cond c2) + | PNot c -> PNot (convert_cond c) + | PCall _ | PReturn _ | PTrue | PFalse -> cond + | PRel(Neq,PVar x,PCst _) -> + (try + let (rel,t1,t2) = Hashtbl.find ltl_to_promela x in PRel(rel,t1,t2) + with Not_found -> cond) + | PRel _ -> cond in let rec convert_seq_elt e = { e with @@ -62,8 +61,8 @@ let convert_ltl_exprs t = and convert_seq s = List.map convert_seq_elt s in let convert_parsed c = match c with - Seq l -> Seq (convert_seq l) - | Otherwise -> Otherwise + Seq l -> Seq (convert_seq l) + | Otherwise -> Otherwise in let convert_trans t = { t with cross = convert_parsed t.cross } in List.map convert_trans t @@ -117,7 +116,7 @@ let load_ya_file filename = let channel = check_and_open_in filename "invalid Ya file" in let lexbuf = Lexing.from_channel channel in Lexing.(lexbuf.lex_curr_p <- - { lexbuf.lex_curr_p with pos_fname = (filename :> string) }); + { lexbuf.lex_curr_p with pos_fname = (filename :> string) }); try let automata = Yaparser.main Yalexer.token lexbuf in close_in channel; @@ -136,7 +135,7 @@ let load_promela_file f = let trans = convert_ltl_exprs auto.trans in close_in c; Data_for_aorai.setAutomata { auto with trans }; - with + with | Promelalexer.Error(loc,msg) -> syntax_error loc msg let load_promela_file_withexps f = @@ -145,18 +144,16 @@ let load_promela_file_withexps f = let automata = Promelalexer_withexps.parse c in close_in c; Data_for_aorai.setAutomata automata; - with + with | Promelalexer_withexps.Error(loc,msg) -> syntax_error loc msg let display_status () = if Aorai_option.verbose_atleast 2 then begin Aorai_option.feedback "\n" ; Aorai_option.feedback "C file: '%a'\n" Filepath.Normalized.pretty !c_file ; - Aorai_option.feedback "Entry point: '%a'\n" + Aorai_option.feedback "Entry point: '%a'\n" Kernel_function.pretty (fst (Globals.entry_point())) ; Aorai_option.feedback "LTL property: '%a'\n" Filepath.Normalized.pretty !ltl_file ; - Aorai_option.feedback "Files to generate: '%a' (Annotated code)\n" - (if !generatesCFile then Filepath.Normalized.pretty else (fun fmt _ -> Format.fprintf fmt "(none)")) !output_c_file; if Aorai_option.Dot.get () then Aorai_option.feedback "Dot file: '%a'\n" Filepath.Normalized.pretty !dot_file; Aorai_option.feedback "Tmp files: '%a' (Light LTL file)\n" @@ -167,15 +164,8 @@ let display_status () = end let init_file_names () = - (* Intermediate functions for error display or fresh name of file - generation *) - let err= ref false in - let dispErr mesg f = - Aorai_option.error "Error. File '%a' %s.\n" Filepath.Normalized.pretty f mesg; - err:=true - in let freshname ?opt_suf file suf = - let name = Filepath.Normalized.to_pretty_string file in + let name = (file:Filepath.Normalized.t:>string) in let pre = Filename.remove_extension name in let pre = match opt_suf with None -> pre | Some s -> pre ^ s in let rec fn p s n = @@ -185,30 +175,14 @@ let init_file_names () = let name = if not (Sys.file_exists (pre^suf)) then pre^suf else fn pre suf 0 - in Filepath.Normalized.of_string name + in + Filepath.Normalized.of_string name in - - (* c_file name is given and has to point out a valid file. *) - c_file := - (match Kernel.Files.get () with - | [] -> Filepath.Normalized.of_string "dummy.i" - | f :: _ -> f); - if (Filepath.Normalized.is_unknown !c_file) then dispErr ": invalid C file name" !c_file; - - (* The output C file has to be a valid file name if it is used. *) - output_c_file := Aorai_option.Output_C_File.get (); - if (Filepath.Normalized.is_unknown !output_c_file) then - output_c_file := freshname ~opt_suf:"_annot" !c_file ".c"; - (* else if Sys.file_exists !output_c_file then dispErr "already exists" !output_c_file; *) - - if Aorai_option.Dot.get () then - dot_file:= freshname !c_file ".dot"; - if Filepath.Normalized.is_unknown (Aorai_option.Ya.get ()) then if Filepath.Normalized.is_unknown (Aorai_option.Buchi.get ()) then begin (* ltl_file name is given and has to point out a valid file. *) ltl_file := Aorai_option.Ltl_File.get (); - + if Aorai_option.Dot.get() then dot_file := freshname !ltl_file ".dot"; (* The LTL file is always used. *) (* The promela file can be given or not. *) if not (Filepath.Normalized.is_unknown (Aorai_option.To_Buchi.get ())) then begin @@ -232,26 +206,25 @@ let init_file_names () = if not (Filepath.Normalized.is_unknown (Aorai_option.To_Buchi.get ())) && not (Filepath.Normalized.is_unknown (Aorai_option.Ltl_File.get ())) then begin - Aorai_option.error + Aorai_option.abort "Error. '-buchi' option is incompatible with '-to-buchi' and '-ltl' \ -options."; - err:=true + options." end; (* The promela file is used only if the process does not terminate after - LTL generation. *) + LTL generation. *) promela_file := Aorai_option.promela_file (); + if Aorai_option.Dot.get() then + dot_file := freshname !promela_file ".dot"; end else begin - let ya_file = Aorai_option.Ya.get () in - if (Filepath.Normalized.is_unknown ya_file) then dispErr ": invalid Ya file name" ya_file; + let ya_file = Aorai_option.Ya.get () in + if (Filepath.Normalized.is_unknown ya_file) then + Aorai_option.abort + "invalid Ya file name %a" Filepath.Normalized.pretty ya_file; + if Aorai_option.Dot.get() then + dot_file := freshname ya_file ".dot" end; - display_status (); - !err - -let init_test () = - match Aorai_option.Test.get () with - | 1 -> generatesCFile := false; - | _ -> generatesCFile := true + display_status () let printverb s = Aorai_option.feedback ~level:2 "%s" s @@ -263,26 +236,8 @@ let output () = (!dot_file:>string); printverb "Generating dot file : done\n" end; - - (* C file *) - if (not !generatesCFile) then - printverb "C file generation : skipped\n" - else - begin - let cout = open_out (!output_c_file:>string) in - let fmt = Format.formatter_of_out_channel cout in - Kernel.Unicode.without_unicode - (fun () -> - File.pretty_ast ~fmt (); - close_out cout; - printverb "C file generation : done\n"; - ) () - end; - - printverb "Finished.\n"; (* Some test traces. *) - Data_for_aorai.debug_computed_state (); - if !generatesCFile then Kernel.Files.set [ !output_c_file ] + Data_for_aorai.debug_computed_state () let work () = let file = Ast.get () in @@ -297,15 +252,15 @@ let work () = Filepath.Normalized.pretty !ltl_tmp_file Filepath.Normalized.pretty !promela_file in if Sys.command cmd <> 0 then - Aorai_option.abort "failed to run: %s" cmd ; + Aorai_option.abort "failed to run: %s" cmd ; printverb "LTL ~> Promela (ltl2ba): done\n" end; if not (Filepath.Normalized.is_unknown (Aorai_option.To_Buchi.get ())) then printverb ("Finished.\nGenerated file: '"^(Filepath.Normalized.to_pretty_string !promela_file)^"'\n") else begin - (* Step 3 : Loading promela_file and checking the consistency between informations from C code and LTL property *) - (* Such as functions name and global variables. *) + (* Step 3 : Loading promela_file and checking the consistency between informations from C code and LTL property *) + (* Such as functions name and global variables. *) if not (Filepath.Normalized.is_unknown (Aorai_option.Buchi.get ())) then load_promela_file_withexps !promela_file @@ -314,22 +269,23 @@ let work () = else load_promela_file !promela_file; printverb "Loading promela : done\n"; - (* Computing the list of ignored functions *) - (* Aorai_visitors.compute_ignored_functions file; *) + (* Computing the list of ignored functions *) + (* Aorai_visitors.compute_ignored_functions file; *) - (* Promelaoutput.print_raw_automata (Data_for_aorai.getAutomata()); *) - (* Data_for_aorai.debug_ltl_expressions (); *) + (* Promelaoutput.print_raw_automata (Data_for_aorai.getAutomata()); *) + (* Data_for_aorai.debug_ltl_expressions (); *) (*let _ = Path_analysis.test (Data_for_aorai.getAutomata())in*) let root = fst (Globals.entry_point ()) in - if (Aorai_option.Axiomatization.get()) then + let axiomatization = Aorai_option.Axiomatization.get() in + if axiomatization then begin - (* Step 5 : incrementing pre/post - conditions with states and transitions information *) + (* Step 5 : incrementing pre/post + conditions with states and transitions information *) printverb "Refining pre/post : \n"; Aorai_dataflow.compute (); - (* Step 6 : Removing transitions never crossed *) + (* Step 6 : Removing transitions never crossed *) let automaton_has_states = if (Aorai_option.AutomataSimplification.get()) then begin @@ -350,29 +306,31 @@ let work () = if automaton_has_states then begin (* Step 7 : Labeling abstract file *) (* Finally the information is added into the Cil automata. *) - Aorai_utils.initGlobals root (Aorai_option.Axiomatization.get()); + Aorai_utils.initGlobals root axiomatization; Aorai_visitors.add_sync_with_buch file; - Aorai_visitors.add_pre_post_from_buch file - (Aorai_option.advance_abstract_interpretation ()); + if Aorai_option.GenerateAnnotations.get () then + Aorai_visitors.add_pre_post_from_buch file + (Aorai_option.advance_abstract_interpretation ()); + Aorai_eva_analysis.setup (); printverb "Annotation of Cil : done\n"; end end else begin - (* Step 4': Computing the set of possible pre-states and post-states of each function *) - (* And so for pre/post transitions *) + (* Step 4': Computing the set of possible pre-states and post-states of each function *) + (* And so for pre/post transitions *) printverb "Abstracting pre/post : skipped\n"; - (* Step 5': incrementing pre/post conditions with states and transitions information *) + (* Step 5': incrementing pre/post conditions with states and transitions information *) printverb "Refining pre/post : skipped\n"; - (* Step 6 : Removing transitions never crossed *) + (* Step 6 : Removing transitions never crossed *) printverb "Removing unused trans : skipped\n"; - (* Step 7 : Labeling abstract file *) - (* Finally the information is added into the Cil automata. *) - Aorai_utils.initGlobals root (Aorai_option.Axiomatization.get()); + (* Step 7 : Labeling abstract file *) + (* Finally the information is added into the Cil automata. *) + Aorai_utils.initGlobals root axiomatization; Aorai_visitors.add_sync_with_buch file; printverb "Annotation of Cil : partial\n" end; @@ -380,38 +338,25 @@ let work () = (* Step 8 : clearing tables whose information has been invalidated by our transformations. *) + Ast.mark_as_changed(); Cfg.clearFileCFG ~clear_id:false file; Cfg.computeFileCFG file; Ast.clear_last_decl (); if Kernel.Check.get() then Filecheck.check_ast "aorai"; - let prj = - File.create_project_from_visitor "aorai" - (fun prj -> new Visitor.frama_c_copy prj) - in - Project.copy ~selection:(Parameter_state.get_selection ()) prj; - Project.on prj output () + output () end let run () = - Aorai_option.result "Welcome to the Aorai plugin@."; - init_test (); - (* Step 1 : Capture files names *) - let error_status = init_file_names () in - (* Treatment is done only if parameters are valid *) - if error_status then - Aorai_option.error "Generation stopped." - else - - (* Step 2 : Work in our own project, initialized by a copy of the main - one. *) - let work_prj = - File.create_project_from_visitor ~last:false "aorai_tmp" - (fun prj -> new Visitor.frama_c_copy prj) - in - Project.copy ~selection:(Parameter_state.get_selection ()) work_prj; - Project.on work_prj work (); - Project.remove ~project:work_prj () + init_file_names (); + (* Step 2 : Work in our own project, initialized by a copy of the main + one. *) + let work_prj = + File.create_project_from_visitor "aorai" + (fun prj -> new Visitor.frama_c_copy prj) + in + Project.copy ~selection:(Parameter_state.get_selection ()) work_prj; + Project.on work_prj work () (* Plugin registration *) @@ -428,9 +373,9 @@ let run, _ = "Aorai" (let module O = Aorai_option in [ O.Ltl_File.self; O.To_Buchi.self; O.Buchi.self; - O.Ya.self; O.Axiomatization.self; O.ConsiderAcceptance.self; - O.AutomataSimplification.self; O.AbstractInterpretation.self; - O.AddingOperationNameAndStatusInSpecification.self ]) + O.Ya.self; O.Axiomatization.self; O.ConsiderAcceptance.self; + O.AutomataSimplification.self; O.AbstractInterpretation.self; + O.AddingOperationNameAndStatusInSpecification.self ]) run let main () = if Aorai_option.is_on () then run () diff --git a/src/plugins/aorai/aorai_utils.ml b/src/plugins/aorai/aorai_utils.ml index 341fb420f6d0e2636d66fbbcc1c8204cd21bee7b..dd533767fdd535a18e210bab631c394adf7946af 100644 --- a/src/plugins/aorai/aorai_utils.ml +++ b/src/plugins/aorai/aorai_utils.ml @@ -629,6 +629,16 @@ let crosscond_to_exp generated_kf curr_f curr_status loc cond res = (** Local copy of the file pointer *) let file = ref Cil.dummyFile +let initFunction kf = + let fname = Kernel_function.get_name kf in + List.iter + (fun vi -> set_paraminfo fname vi.vname vi) + (Kernel_function.get_formals kf); + match (Kernel_function.find_return kf).skind with + | Cil_types.Return (Some { enode = Lval (Var vi,NoOffset) },_) -> + set_returninfo fname vi (* Add the vi of return stmt *) + | exception Kernel_function.No_Statement | _ -> () (* function without returned value *) + (** Copy the file pointer locally in the class in order to ease globals management and initializes some tables. *) let initFile f = @@ -636,27 +646,7 @@ let initFile f = Data_for_aorai.setCData (); (* Adding C variables into our hashtable *) Globals.Vars.iter (fun vi _ -> set_varinfo vi.vname vi); - Globals.Functions.iter - (fun kf -> - let fname = Kernel_function.get_name kf in - List.iter - (fun vi -> set_paraminfo fname vi.vname vi) - (Kernel_function.get_formals kf); - if not (Data_for_aorai.isIgnoredFunction fname) then - begin - try - let ret = Kernel_function.find_return kf in - match ret.skind with - | Cil_types.Return (Some e,_) -> - (match e.enode with - | Lval (Var vi,NoOffset) -> - set_returninfo fname vi (* Add the vi of return stmt *) - | _ -> () (* function without returned value *)) - | _ -> () (* function without returned value *) - with Kernel_function.No_Statement -> - Aorai_option.fatal - "Don't know what to do with a function declaration" - end) + Globals.Functions.iter initFunction (** List of globals awaiting for adding into C file globals *) let globals_queue = ref [] @@ -684,46 +674,41 @@ let flush_globals () = Kernel_function.clear_sid_info (); globals_queue := [] -let mk_global glob = globals_queue := glob :: !globals_queue +let add_global glob = globals_queue := glob :: !globals_queue (* Utilities for global variables *) -let mk_global_c_initialized_vars name ty ini= - let vi = (Cil.makeGlobalVar name ty) in - vi.vghost<-true; - mk_global (GVar(vi,ini,vi.vdecl)); - Globals.Vars.add vi ini; - set_varinfo name vi - -let mk_global_var_init vi ini = - vi.vghost<-true; - mk_global (GVar(vi,ini,vi.vdecl)); - Globals.Vars.add vi ini; +let add_gvar ?init vi = + let initinfo = {Cil_types.init} in + vi.vghost <- true; + vi.vstorage <- NoStorage; + add_global (GVar(vi,initinfo,vi.vdecl)); + Globals.Vars.add vi initinfo; set_varinfo vi.vname vi -let mk_global_var vi = - let ini = - {Cil_types.init=Some(Cil.makeZeroInit ~loc:(CurrentLoc.get()) vi.vtype)} +let add_gvar_zeroinit vi = + add_gvar ~init:(Cil.makeZeroInit ~loc:(CurrentLoc.get()) vi.vtype) vi + +let mk_gvar ?init ~ty name = + (* See if the variable is already declared *) + let vi = + try + let ty' = typeAddAttributes [Attr ("ghost", [])] ty in + let vi = Globals.Vars.find_from_astinfo name VGlobal in + if not (Cil_datatype.Typ.equal vi.vtype ty') then + Aorai_option.abort "Global %s is declared with type %a instead of %a" + name Cil_printer.pp_typ vi.vtype Cil_printer.pp_typ ty'; + Globals.Vars.remove vi; + vi + with Not_found -> + Cil.makeGlobalVar name ty in - mk_global_var_init vi ini + add_gvar ?init vi -let mk_global_c_var_init name init = - let ty = Cil.typeOf init in - let vi = Cil.makeGlobalVar name ty in - vi.vghost <- true; - let ini = { Cil_types.init = Some(SingleInit init) } in - mk_global(GVar(vi,ini,vi.vdecl)); - Globals.Vars.add vi ini; - set_varinfo name vi - -let mk_int_const value = - new_exp - ~loc:(CurrentLoc.get()) - (Const( - CInt64( - Integer.of_int (value), - IInt, - Some(string_of_int(value)) - ))) +let mk_gvar_scalar ~init ?(ty = Cil.typeOf init) name = + mk_gvar ~init:(SingleInit init) ~ty name + +let mk_integer value = + Cil.integer ~loc:(CurrentLoc.get()) value (* Utilities for global enumerations *) let mk_global_c_enum_type_tagged name elements_l = @@ -740,14 +725,14 @@ let mk_global_c_enum_type_tagged name elements_l = (fun (e,i) -> { eiorig_name = e; einame = e; - eival = mk_int_const i; + eival = mk_integer i; eiloc = Location.unknown; eihost = einfo}) elements_l in einfo.eitems <- l; set_usedinfo name einfo; - mk_global (GEnumTag(einfo, Location.unknown)); + add_global (GEnumTag(einfo, Location.unknown)); einfo let mk_global_c_enum_type name elements = @@ -757,8 +742,9 @@ let mk_global_c_enum_type name elements = (* no need to rev the list, as the elements got their value already *) ignore (mk_global_c_enum_type_tagged name elements) -let mk_global_c_initialized_enum name name_enuminfo ini = - mk_global_c_initialized_vars name (TEnum(get_usedinfo name_enuminfo,[])) ini +let mk_gvar_enum ?init name name_enuminfo = + mk_gvar ?init ~ty:(TEnum(get_usedinfo name_enuminfo,[])) name + (* ************************************************************************* *) (** {b Terms management / computation} *) @@ -888,9 +874,27 @@ let is_out_of_state_exp state loc = (Cil.evar (Data_for_aorai.get_state_var state)) (mk_int_exp 0) +let assert_alive_automaton kf stmt = + let pred = + if Aorai_option.Deterministic.get() then + let reject_state = Data_for_aorai.get_reject_state() in + is_out_of_state_pred reject_state + else begin + let valid_states = + List.filter + (fun x -> not (Data_for_aorai.is_reject_state x)) + (fst (Data_for_aorai.getGraph ())) + in + let valid_preds = List.map is_state_pred valid_states in + Logic_const.pors valid_preds + end + in + let pred = { pred with pred_name = "aorai_smoke_test" :: pred.pred_name } in + Annotations.add_assert Aorai_option.emitter ~kf stmt pred + (* Utilities for other globals *) -let mk_global_comment txt = mk_global (GText (txt)) +let mk_global_comment txt = add_global (GText (txt)) (* ************************************************************************* *) (** {b Initialization management / computation} *) @@ -910,18 +914,9 @@ let mk_global_states_init root = in let init = SingleInit init in let var = Data_for_aorai.get_state_var state in - mk_global_var_init var { Cil_types.init = Some init}) + add_gvar ~init var) states -let func_to_init name = - {Cil_types.init= - Some(SingleInit( - new_exp ~loc:(CurrentLoc.get()) (Const(func_to_cenum (name)))))} - -let funcStatus_to_init st = - {Cil_types.init=Some(SingleInit(new_exp ~loc:(CurrentLoc.get()) - (Const(op_status_to_cenum (st)))))} - class visit_decl_loops_init () = object(self) inherit Visitor.frama_c_inplace @@ -1096,18 +1091,6 @@ let make_enum_states () = let state_list = List.map (fun x -> (x.Promelaast.name, x.Promelaast.nums)) state_list in - let state_list = - if not (Aorai_option.Deterministic.get ()) then state_list - else - (*[VP] Strictly speaking this is not needed, but Jessie tends - to consider that a value of enum type can only be one of the - tags, so that we must add this dummy state that is always a - possible value, even when a contract concludes that curState - is none of the others. Note that ISO C does not impose this - limitation to values of enum types. - *) - (get_fresh "aorai_reject_state", -2)::state_list - in let enum = mk_global_c_enum_type_tagged states state_list in let mapping = List.map @@ -1138,19 +1121,20 @@ let initGlobals root complete = mk_global_c_enum_type listOp (List.map - (fun e -> func_to_op_func e) - (getFunctions_from_c() @ getIgnoredFunctions())); - mk_global_c_initialized_enum curOp listOp - (func_to_init (Kernel_function.get_name root)); + (fun kf -> func_to_op_func (Kernel_function.get_name kf)) + (getObservablesFunctions() @ getIgnoredFunctions())); + mk_gvar_enum curOp listOp; mk_global_c_enum_type listStatus (callStatus::[termStatus]); - mk_global_c_initialized_enum - curOpStatus listStatus (funcStatus_to_init Promelaast.Call); + mk_gvar_enum curOpStatus listStatus; mk_global_comment "//* "; mk_global_comment "//* States and Trans Variables"; - if Aorai_option.Deterministic.get () then - mk_global_c_var_init curState (getInitialState()) - else + if Aorai_option.Deterministic.get () then begin + mk_gvar_scalar ~init:(getInitialState()) curState; + let init = getInitialState() (* TODO a distinct initial value for history *) + and history = Data_for_aorai.whole_history () in + List.iter (fun name -> mk_gvar_scalar ~init name) history + end else mk_global_states_init root; if complete then begin @@ -1163,16 +1147,17 @@ let initGlobals root complete = mk_global_comment "//****************** "; mk_global_comment "//* Auxiliary variables used in transition conditions"; mk_global_comment "//*"; - List.iter mk_global_var (Data_for_aorai.aux_variables()); + List.iter add_gvar_zeroinit (Data_for_aorai.aux_variables()); let auto = Data_for_aorai.getAutomata () in mk_global_comment "//* "; mk_global_comment "//****************** "; mk_global_comment "//* Metavariables"; mk_global_comment "//*"; - Datatype.String.Map.iter (fun _ -> mk_global_var) auto.metavariables; + Datatype.String.Map.iter (fun _ -> add_gvar_zeroinit) auto.metavariables; - if Aorai_option.Deterministic.get () then begin + if Aorai_option.Deterministic.get () && + Aorai_option.GenerateDeterministicLemmas.get () then begin (* must flush now previous globals which are used in the lemmas in order to be able to put these last ones in the right places in the AST. *) flush_globals (); @@ -2063,7 +2048,9 @@ let mk_deterministic_body generated_kf loc f st status res = List.fold_right (mk_deterministic_stmt generated_kf loc auto f st status res) states - ([], Cil_datatype.Varinfo.Set.empty, [],[]) + ([], Cil_datatype.Varinfo.Set.empty, [], + (* if all else fails, go to reject state. *) + [is_state_det_stmt (Data_for_aorai.get_reject_state()) loc]) in aux_funcs, aux_vars, aux_stmts @ trans_stmts @@ -2136,6 +2123,20 @@ let auto_func_block generated_kf loc f st status res = (Const (Data_for_aorai.func_to_cenum (Kernel_function.get_name f)))) loc ] + and stmt_history_update = + if Aorai_option.Deterministic.get () then + let history = Data_for_aorai.whole_history () + and cur_state = Data_for_aorai.(get_varinfo curState) in + let add_stmt (src,acc) dst_name = + let dst = Data_for_aorai.get_varinfo dst_name in + let stmt = equalsStmt (Cil.var dst) (Cil.evar ~loc src) loc in + dst, stmt :: acc + in + snd (List.fold_left add_stmt (cur_state,[]) history) + else if Aorai_option.InstrumentationHistory.get () > 0 then + Aorai_option.fatal "history is not implemented for non-deterministic \ + automaton" + else [] in let new_funcs, local_var, main_stmt = if Aorai_option.Deterministic.get() then @@ -2143,10 +2144,15 @@ let auto_func_block generated_kf loc f st status res = else mk_non_deterministic_body generated_kf loc f st status res in - let ret = [ Cil.mkStmt ~ghost:true (Cil_types.Return(None,loc)) ] in + let ret = + Cil.mkStmt ~ghost:true ~valid_sid:true (Cil_types.Return(None,loc)) + in + if Aorai_option.SmokeTests.get () then begin + assert_alive_automaton generated_kf ret; + end; let res_block = (Cil.mkBlock - ( stmt_begin_list @ main_stmt @ ret)) + ( stmt_begin_list @ stmt_history_update @ main_stmt @ [ret])) in res_block.blocals <- local_var; Aorai_option.debug ~dkey "Generated body is:@\n%a" @@ -2207,6 +2213,8 @@ let treat_val loc base range pred = let max = Logic_const.prel (Rle, loc, add max) in Logic_const.pand (min,max) | Unbounded min -> Logic_const.prel (Rle, add_cst min, loc) + | Unknown -> Logic_const.ptrue (* nothing is known: the loc can + take any value from then on. *) in Aorai_option.debug ~dkey:action_dkey "Action predicate: %a" Printer.pp_predicate res; diff --git a/src/plugins/aorai/aorai_visitors.ml b/src/plugins/aorai/aorai_visitors.ml index f771e84066947d6ff88d6a21fa480a390b6aa254..7011f12d5203984c63fdb67f99868eb3036a257f 100644 --- a/src/plugins/aorai/aorai_visitors.ml +++ b/src/plugins/aorai/aorai_visitors.ml @@ -61,26 +61,37 @@ let get_call_name exp = match exp.enode with not be projectified. *) -(* the various kinds of auxiliary functions. *) -type func_auto_mode = - | Not_auto_func (* original C function. *) - | Aux_func of kernel_function - (* Checks whether we are in the corresponding behavior of the function. *) - | Pre_func of kernel_function - (* Pre_func f denotes a function updating the automaton when f is called. *) - | Post_func of kernel_function - (* Post_func f denotes a function updating the automaton - when returning from f. *) - -(* table from auxiliary functions to the corresponding original one. *) -let func_orig_table = Cil_datatype.Varinfo.Hashtbl.create 17 - -let add_aux_bhv orig_kf vi = - Cil_datatype.Varinfo.Hashtbl.add func_orig_table vi (Aux_func orig_kf) - -let kind_of_func vi = - try Cil_datatype.Varinfo.Hashtbl.find func_orig_table vi - with Not_found -> Not_auto_func +module Aux_funcs = +struct + (* the various kinds of auxiliary functions. *) + type kind = + | Not_aux_func (* original C function. *) + | Aux of kernel_function + (* Checks whether we are in the corresponding behavior of the function. *) + | Pre of kernel_function + (* Pre_func f denotes a function updating the automaton when f is called. *) + | Post of kernel_function + (* Post_func f denotes a function updating the automaton + when returning from f. *) + + module Table = Cil_datatype.Varinfo.Hashtbl + + (* table from auxiliary functions to the corresponding original one. *) + let table = Table.create 17 + + let add vi kind = + Table.add table vi kind + + let add_aux kf vi = + add vi (Aux kf) + + let kind vi = + try Table.find table vi with Not_found -> Not_aux_func + + let iter f = + Table.iter f table +end + (* The following functions will be used to generate C code for pre & post functions. *) @@ -105,6 +116,43 @@ let mk_post_fct_block kf_post kf res = (Data_for_aorai.get_kf_return_state kf) res +(* update from formals of original C function to one of the auxiliary + function (f_aux or f_pre) +*) +class change_formals old_kf new_kf = + let old_formals = Kernel_function.get_formals old_kf in + let new_formals = Kernel_function.get_formals new_kf in + let formals = List.combine old_formals new_formals in + object + inherit Visitor.frama_c_inplace + method! vlogic_var_use lv = + match lv.lv_origin with + | None -> SkipChildren + | Some vi -> + try + let vi'= List.assq vi formals in + ChangeTo (Cil.cvar_to_lvar vi') + with Not_found -> SkipChildren + + method! vvrbl vi = + try + let vi' = List.assq vi formals in + ChangeTo vi' + with Not_found -> SkipChildren + end + +(* update \result to param of f_post when it exists. Must not be called if + f_post has no parameter (original f returns void). *) +class change_result new_kf = + let v = List.hd (Kernel_function.get_formals new_kf) in + object + inherit Visitor.frama_c_inplace + method! vterm_lhost lh = + match lh with + TResult _ -> ChangeTo (TVar (Cil.cvar_to_lvar v)) + | _ -> DoChildren + end + (** This visitor adds an auxiliary function for each C function which takes care of setting the automaton in a correct state before calling the @@ -118,100 +166,107 @@ class visit_adding_code_for_synchronisation = val aux_post_table = Kernel_function.Hashtbl.create 17 + method do_fundec fundec loc = + let kf = Option.get self#current_kf in + let vi = Kernel_function.get_vi kf in + let vi_pre = Cil_const.copy_with_new_vid vi in + vi_pre.vname <- Data_for_aorai.get_fresh (vi_pre.vname ^ "_pre_func"); + vi_pre.vdefined <- true; + vi_pre.vghost <- true; + Aux_funcs.(add vi_pre (Pre kf)); + (* TODO: + - what about protos that have no specified args + (NB: cannot be identified here because of implem of Kernel_function). + - what about varargs? + *) + let (rettype,args,varargs,_) = Cil.splitFunctionTypeVI vi_pre in + Cil.update_var_type vi_pre (TFun(Cil.voidType, args, varargs,[])); + vi_pre.vattr <- []; + + (* in particular get rid of __no_return if set in vi*) + + let arg = + if Cil.isVoidType rettype + then [] + else ["res",rettype,[]] + in + let vi_post = + Cil.makeGlobalVar ~ghost:true + (Data_for_aorai.get_fresh (vi.vname ^ "_post_func")) + (TFun(voidType,Some arg,false,[])) + in + Kernel_function.Hashtbl.add aux_post_table kf vi_post; + Aux_funcs.(add vi_post (Post kf)); + let fun_dec_pre = Cil.emptyFunctionFromVI vi_pre in + let fun_dec_post = Cil.emptyFunctionFromVI vi_post in + (* For a future analysis of function arguments, + we have to update the function's formals. Search + for LBLsformals. *) + Cil.setFunctionTypeMakeFormals + fun_dec_pre (TFun(Cil.voidType, args, varargs,[])); + Cil.setFunctionTypeMakeFormals + fun_dec_post (TFun(voidType,Some arg,false,[])); + (* We will now fill the function with the result + of the automaton's analysis. *) + Globals.Functions.replace_by_definition + (Cil.empty_funspec()) fun_dec_pre loc; + Globals.Functions.replace_by_definition + (Cil.empty_funspec()) fun_dec_post loc; + let kf_pre = Globals.Functions.get vi_pre in + let kf_post = Globals.Functions.get vi_post in + let aux_func_pre, pre_block,pre_locals = mk_pre_fct_block kf_pre kf in + let aux_func_post, post_block,post_locals = + mk_post_fct_block + kf_post kf (Extlib.opt_of_list fun_dec_post.sformals) + in + let vis = new change_formals kf kf_pre in (* Replace original formals *) + fun_dec_pre.slocals <- pre_locals; + fun_dec_pre.sbody <- Visitor.visitFramacBlock vis pre_block; + fun_dec_pre.svar.vdefined <- true; + fun_dec_post.slocals <- post_locals; + fun_dec_post.sbody <- post_block; + fun_dec_post.svar.vdefined <- true; + let aux_funcs = + Cil_datatype.Varinfo.Set.union aux_func_pre aux_func_post + in + let globs = + Cil_datatype.Varinfo.Set.fold + (fun x acc -> + GFunDecl(Cil.empty_funspec(),x,loc) :: acc) aux_funcs + [ GFun(fun_dec_pre,loc); GFun(fun_dec_post,loc)] + in + Cil_datatype.Varinfo.Set.iter (Aux_funcs.add_aux kf) aux_funcs; + fundec.sbody.bstmts <- + Cil.mkStmtOneInstr ~ghost:true + (Call(None,Cil.evar ~loc vi_pre, + List.map (fun x -> Cil.evar ~loc x) + (Kernel_function.get_formals kf), + loc)) + :: fundec.sbody.bstmts; + (* Finally, we update the CFG for the new fundec *) + let keepSwitch = Kernel.KeepSwitch.get() in + Cfg.prepareCFG ~keepSwitch fun_dec_pre; + Cfg.cfgFun fun_dec_pre; + Cfg.prepareCFG ~keepSwitch fun_dec_post; + Cfg.cfgFun fun_dec_post; + globs + method! vglob_aux g = match g with | GFun (fundec,loc) -> - let kf = Option.get self#current_kf in - let vi = Kernel_function.get_vi kf in - let vi_pre = Cil_const.copy_with_new_vid vi in - vi_pre.vname <- Data_for_aorai.get_fresh (vi_pre.vname ^ "_pre_func"); - vi_pre.vdefined <- true; - vi_pre.vghost <- true; - Cil_datatype.Varinfo.Hashtbl.add func_orig_table vi_pre (Pre_func kf); - (* TODO: - - what about protos that have no specified args - (NB: cannot be identified here because of implem of Kernel_function). - - what about varargs? - *) - let (rettype,args,varargs,_) = Cil.splitFunctionTypeVI vi_pre in - Cil.update_var_type vi_pre (TFun(Cil.voidType, args, varargs,[])); - vi_pre.vattr <- []; - - (* in particular get rid of __no_return if set in vi*) - - let arg = - if Cil.isVoidType rettype - then [] - else ["res",rettype,[]] - in - let vi_post = - Cil.makeGlobalVar ~ghost:true - (Data_for_aorai.get_fresh (vi.vname ^ "_post_func")) - (TFun(voidType,Some arg,false,[])) - in - Kernel_function.Hashtbl.add aux_post_table kf vi_post; - Cil_datatype.Varinfo.Hashtbl.add func_orig_table vi_post (Post_func kf); - let fun_dec_pre = Cil.emptyFunctionFromVI vi_pre in - let fun_dec_post = Cil.emptyFunctionFromVI vi_post in - (* For a future analysis of function arguments, - we have to update the function's formals. Search - for LBLsformals. *) - Cil.setFunctionTypeMakeFormals - fun_dec_pre (TFun(Cil.voidType, args, varargs,[])); - Cil.setFunctionTypeMakeFormals - fun_dec_post (TFun(voidType,Some arg,false,[])); - (* We will now fill the function with the result - of the automaton's analysis. *) - Globals.Functions.replace_by_definition - (Cil.empty_funspec()) fun_dec_pre loc; - Globals.Functions.replace_by_definition - (Cil.empty_funspec()) fun_dec_post loc; - let kf_pre = Globals.Functions.get vi_pre in - let kf_post = Globals.Functions.get vi_post in - let aux_func_pre, pre_block,pre_locals = mk_pre_fct_block kf_pre kf in - let aux_func_post, post_block,post_locals = - mk_post_fct_block - kf_post kf (Extlib.opt_of_list fun_dec_post.sformals) - in - fun_dec_pre.slocals <- pre_locals; - fun_dec_pre.sbody <- pre_block; - fun_dec_pre.svar.vdefined <- true; - fun_dec_post.slocals <- post_locals; - fun_dec_post.sbody <- post_block; - fun_dec_post.svar.vdefined <- true; - let aux_funcs = - Cil_datatype.Varinfo.Set.union aux_func_pre aux_func_post - in - let globs = - Cil_datatype.Varinfo.Set.fold - (fun x acc -> - GFunDecl(Cil.empty_funspec(),x,loc) :: acc) aux_funcs - [ GFun(fun_dec_pre,loc); GFun(fun_dec_post,loc)] - in - Cil_datatype.Varinfo.Set.iter (add_aux_bhv kf) aux_funcs; - fundec.sbody.bstmts <- - Cil.mkStmtOneInstr ~ghost:true - (Call(None,Cil.evar ~loc vi_pre, - List.map (fun x -> Cil.evar ~loc x) - (Kernel_function.get_formals kf), - loc)) - :: fundec.sbody.bstmts; - (* Finally, we update the CFG for the new fundec *) - let keepSwitch = Kernel.KeepSwitch.get() in - Cfg.prepareCFG ~keepSwitch fun_dec_pre; - Cfg.cfgFun fun_dec_pre; - Cfg.prepareCFG ~keepSwitch fun_dec_post; - Cfg.cfgFun fun_dec_post; - ChangeDoChildrenPost([g], fun x -> globs @ x) + let kf = Globals.Functions.get fundec.svar in + if Data_for_aorai.isObservableFunction kf then + let globs = self#do_fundec fundec loc in + ChangeDoChildrenPost([g], fun x -> globs @ x) + else + DoChildren | _ -> DoChildren method! vstmt_aux stmt = match stmt.skind with | Return (res,loc) -> let kf = Option.get self#current_kf in - let vi = Kernel_function.get_vi kf in - let current_function = vi.vname in - if not (Data_for_aorai.isIgnoredFunction current_function) then begin + if Data_for_aorai.isObservableFunction kf then begin let args = match res with | None -> [] | Some exp -> [Cil.copy_exp exp] @@ -236,44 +291,10 @@ class visit_adding_code_for_synchronisation = end -(*********************************************************************) -(* update from formals of original C function to one of the auxiliary - function (f_aux or f_pre) -*) -class change_formals old_kf new_kf = - let old_formals = Kernel_function.get_formals old_kf in - let new_formals = Kernel_function.get_formals new_kf in - let formals = List.combine old_formals new_formals in - object - inherit Visitor.frama_c_inplace - method! vlogic_var_use lv = - match lv.lv_origin with - | None -> SkipChildren - | Some vi -> - try - let vi'= List.assq vi formals in - ChangeTo (Cil.cvar_to_lvar vi') - with Not_found -> SkipChildren +(*********************************************************************) - method! vvrbl vi = - try - let vi' = List.assq vi formals in - ChangeTo vi' - with Not_found -> SkipChildren - end -(* update \result to param of f_post when it exists. Must not be called if - f_post has no parameter (original f returns void). *) -class change_result new_kf = - let v = List.hd (Kernel_function.get_formals new_kf) in - object - inherit Visitor.frama_c_inplace - method! vterm_lhost lh = - match lh with - TResult _ -> ChangeTo (TVar (Cil.cvar_to_lvar v)) - | _ -> DoChildren - end let post_treatment_loops = Hashtbl.create 97 @@ -911,9 +932,9 @@ class visit_adding_pre_post_from_buch treatloops = let vi = Kernel_function.get_vi my_kf in let spec = Annotations.funspec my_kf in let loc = Kernel_function.get_location my_kf in - (match kind_of_func vi with - | Pre_func _ | Post_func _ | Aux_func _ -> () - | Not_auto_func -> (* Normal C function *) + (match Aux_funcs.kind vi with + | Aux_funcs.Pre _ | Post _ | Aux _ -> () + | Not_aux_func -> (* Normal C function *) let bhvs = mk_post my_kf in let my_state = Data_for_aorai.get_kf_init_state my_kf in let requires = needs_zero_one_choice my_state in @@ -939,13 +960,13 @@ class visit_adding_pre_post_from_buch treatloops = method! vglob_aux g = match g with - | GFun(f,_) -> + | GFun _ -> let my_kf = Option.get self#current_kf in (* don't use get_spec, as we'd generate default assigns, while we'll fill the spec just below. *) let vi = Kernel_function.get_vi my_kf in - (match kind_of_func vi with - | Pre_func kf -> + (match Aux_funcs.kind vi with + | Aux_funcs.Pre kf -> (* must advance the automaton according to current call. *) let bhvs = mk_pre_fct_spec kf in let vis = new change_formals kf my_kf in @@ -953,9 +974,8 @@ class visit_adding_pre_post_from_buch treatloops = Visitor.visitFramacBehaviors vis bhvs in Annotations.add_behaviors Aorai_option.emitter my_kf bhvs; - f.sbody <- Visitor.visitFramacBlock vis f.sbody; SkipChildren - | Post_func kf -> + | Post kf -> (* must advance the automaton according to return event. *) let (rt, _, _, _) = Cil.splitFunctionTypeVI (Kernel_function.get_vi kf) @@ -975,7 +995,7 @@ class visit_adding_pre_post_from_buch treatloops = in Annotations.add_behaviors Aorai_option.emitter my_kf bhvs; SkipChildren - | Aux_func _ | Not_auto_func -> + | Aux _ | Not_aux_func -> DoChildren (* they are not considered here. *)) | _ -> DoChildren; diff --git a/src/plugins/aorai/data_for_aorai.ml b/src/plugins/aorai/data_for_aorai.ml index ec4242b8b794db748713326beae4166d7c5ea4fa..b1423f97bef4baa66534e326e85340364dd9ef14 100644 --- a/src/plugins/aorai/data_for_aorai.ml +++ b/src/plugins/aorai/data_for_aorai.ml @@ -73,6 +73,21 @@ module Aorai_typed_trans = let mem_project = Datatype.never_any_project end) +module Aorai_automaton = + Datatype.Make( + struct + include Datatype.Serializable_undefined + let name = "Aorai_automaton" + type t = Promelaast.typed_automaton + let structural_descr = Structural_descr.t_abstract + let reprs = [ { states = Aorai_state.reprs; + trans = Aorai_typed_trans.reprs; + metavariables = Datatype.String.Map.empty; + observables = Some Datatype.String.Set.empty; + }] + end + ) + module State_var = State_builder.Hashtbl (Aorai_state.Hashtbl) @@ -177,7 +192,13 @@ let loopInit = "aorai_Loop_Init" (* OK *) (* C variables *) let curState = "aorai_CurStates" (* OK *) -let curStateOld = "aorai_CurStates_old" (* OK *) +let history n = "aorai_StatesHistory_" ^ string_of_int n (* OK *) +let whole_history () = + let rec aux acc n = + if n > 0 then aux (history n :: acc) (n - 1) else acc + in + aux [] (Aorai_option.InstrumentationHistory.get ()) + let curTrans = "aorai_CurTrans" (* OK *) (*let curTransTmp = "aorai_CurTrans_tmp" (* OK *)*) let curOp = "aorai_CurOperation" (* OK *) @@ -206,21 +227,28 @@ let buch_sync = "Aorai_Sync" (* Deprecated ? *) (* ************************************************************************* *) (* Buchi automata as stored after parsing *) -let automata = ref None +module Automaton = + State_builder.Ref + (Datatype.Option(Aorai_automaton)) + (struct + let name = "Data_for_aorai.Automaton" + let dependencies = + [ Aorai_option.Ltl_File.self; Aorai_option.Buchi.self; + Aorai_option.Ya.self ] + let default () = None + end) (* Each transition with a parametrized cross condition (call param access or return value access) has its parametrized part stored in this array. *) let cond_of_parametrizedTransitions = ref (Array.make (1) [[]]) -(* List of variables name observed in the C file *) -let variables_from_c = ref [] -(* List of functions name observed in the C file *) -let functions_from_c = ref [] -(* List of functions call observed in the C file without declaration *) +(* List of functions defined in the C file *) +let defined_functions = ref [] +(* List of functions without declaration *) let ignored_functions = ref [] -(** Return the buchi automata as stored after parsing *) +(** Return the buchi automaton as stored after parsing *) let getAutomata () = - match !automata with + match Automaton.get() with | Some auto -> auto | None -> Aorai_option.fatal "The automaton has not been compiled yet" @@ -229,11 +257,11 @@ let getGraph () = let auto = getAutomata () in auto.states, auto.trans -(** Return the number of transitions of the automata *) +(** Return the number of transitions of the automaton *) let getNumberOfTransitions () = List.length (getAutomata ()).trans -(** Return the number of states of the automata *) +(** Return the number of states of the automaton *) let getNumberOfStates () = List.length (getAutomata ()).states @@ -956,7 +984,7 @@ module Reject_state = (struct let name = "Data_for_aorai.Reject_state" let dependencies = - [ Ast.self; Aorai_option.Ltl_File.self; Aorai_option.Buchi.self; + [ Aorai_option.Ltl_File.self; Aorai_option.Buchi.self; Aorai_option.Ya.self] end) @@ -964,6 +992,14 @@ let get_reject_state () = let create () = new_state "aorai_reject" in Reject_state.memo create +let is_reject_state state = + match Reject_state.get_option () with + None -> false + | Some state' -> Aorai_state.equal state state' + +let has_reject_state () = + match Reject_state.get_option () with None -> false | Some _ -> true + let add_if_needed states st = if List.for_all (fun x -> not (Aorai_state.equal x st)) states then st::states @@ -1512,10 +1548,16 @@ let type_cond_auto auto = | _ -> (i+1,{ t with cross = cond; numt = i } :: l)) (0,[]) trans in + let states = + if Aorai_option.Deterministic.get () then + add_if_needed states (get_reject_state()) + else states + in let _, states = List.fold_left (fun (i,l as acc) s -> if + is_reject_state s || List.exists (fun t -> t.start.nums = s.nums || t.stop.nums = s.nums) trans @@ -1543,16 +1585,43 @@ let checkMetavariableCompatibility auto = if has_metavariables && (not deterministic || uses_extended_guards) then Aorai_option.abort "The use of metavariables is incompatible with non-deterministic \ - automata, such as automa using extended transitions." - + automata, such as automata using extended transitions." + +let check_observables auto = + match auto.observables with + | None -> () (* No observable list set, everything is observable *) + | Some set -> + let is_relevant name = + try + let kf = Globals.Functions.find_by_name name in + if not (Kernel_function.is_definition kf) then + Aorai_option.warning + "Function %a is observable by the automaton but is not defined \ + in the C code. It will be ignored in the instrumentation" + Printer.pp_varname (Kernel_function.get_name kf) + with Not_found -> + Aorai_option.abort "Observable %s doesn't match any function" name + in + let rec check = function + | TAnd (c1,c2) | TOr (c1,c2) -> check c1; check c2 + | TNot (c) -> check c + | TRel _ | TTrue | TFalse -> () + | TCall (kf,_) | TReturn kf -> + let name = Kernel_function.get_name kf in + if not (Datatype.String.Set.mem name set) then + Aorai_option.abort "Function %s is not observable" name + in + Datatype.String.Set.iter is_relevant set; + List.iter (fun tr -> check tr.cross) auto.trans (** Stores the buchi automaton and its variables and functions as it is returned by the parsing *) let setAutomata auto = checkMetavariableCompatibility auto; let auto = type_cond_auto auto in - automata:=Some auto; - check_states "typed automata"; + Automaton.set (Some auto); + check_states "typed automaton"; + check_observables auto; if Aorai_option.debug_atleast 1 then Promelaoutput.Typed.output_dot_automata auto "aorai_debug_reduced.dot"; if (Array.length !cond_of_parametrizedTransitions) < @@ -1577,62 +1646,76 @@ let setCData () = let (f_decl,f_def) = Globals.Functions.fold (fun f (lf_decl,lf_def) -> - let name = (Kernel_function.get_name f) in match f.fundec with - | Definition _ -> (lf_decl,name::lf_def) - | Declaration _ -> (name::lf_decl,lf_def)) + | Definition _ -> (lf_decl, f :: lf_def) + | Declaration _ -> (f :: lf_decl, lf_def)) ([],[]) in - functions_from_c:=f_def; - ignored_functions:=f_decl; - variables_from_c:= - Globals.Vars.fold - (fun v _ lv -> - Format.asprintf "%a" Cil_datatype.Varinfo.pretty v :: lv) - [] + defined_functions := f_def; + ignored_functions := f_decl -(** Return the list of all function name observed in the C file, except ignored functions. *) -let getFunctions_from_c () = - (!functions_from_c) - -(** Return the list of all variables name observed in the C file. *) -let getVariables_from_c () = - (!variables_from_c) +(** Return true if and only if the given string fname denotes an ignored function. *) +let isIgnoredFunction kf = + List.exists (Kernel_function.equal kf) !ignored_functions -(** Return the list of names of all ignored functions. A function is ignored if it is used in C file and if its declaration is unavailable. *) -let getIgnoredFunctions () = - (!ignored_functions) +let isDeclaredObservable kf = + let auto = getAutomata () in + let fname = Kernel_function.get_name kf in + match auto.observables with + | None -> true + | Some set -> + Datatype.String.Set.mem fname set -(** Return the list of names of all ignored functions. A function is ignored if it is used in C file and if its declaration is unavailable. *) -let addIgnoredFunction fname = - ignored_functions:=fname::(!ignored_functions) +let isObservableFunction kf = + not (isIgnoredFunction kf) && isDeclaredObservable kf -(** Return true if and only if the given string fname denotes an ignored function. *) -let isIgnoredFunction fname = - List.exists - (fun s -> (String.compare fname s)=0) - (!ignored_functions) +(** Return the list of all function name observed in the C file, except ignored functions. *) +let getObservablesFunctions () = + List.filter isDeclaredObservable !defined_functions -let is_reject_state state = - match Reject_state.get_option () with - None -> false - | Some state' -> Aorai_state.equal state state' +(** Return the list of names of observable but ignored functions. A function is ignored if it is used in C file and if its declaration is unavailable. *) +let getIgnoredFunctions () = + List.filter isDeclaredObservable !ignored_functions (* ************************************************************************* *) (* Table giving the varinfo structure associated to a given variable name *) (* In practice it contains all variables (from promela and globals from C file) and only variables *) -let varinfos = Hashtbl.create 97 -let paraminfos = Hashtbl.create 97 + +module Aux_varinfos = + State_builder.Hashtbl(Datatype.String.Hashtbl)(Cil_datatype.Varinfo) + (struct + let name = "Data_for_aorai.Aux_varinfos" + let dependencies = + [ Ast.self; Aorai_option.Ya.self; Aorai_option.Ltl_File.self; + Aorai_option.To_Buchi.self; Aorai_option.Deterministic.self ] + let size = 13 + end) + +let () = Ast.add_linked_state Aux_varinfos.self + +module StringPair = + Datatype.Pair_with_collections + (Datatype.String)(Datatype.String) + (struct let module_name = "Data_for_aorai.StringPair" end) + +module Paraminfos = + State_builder.Hashtbl(StringPair.Hashtbl)(Cil_datatype.Varinfo) + (struct + let name = "Data_for_aorai.Paraminfos" + let dependencies = + [ Ast.self; Aorai_option.Ya.self; Aorai_option.Ltl_File.self; + Aorai_option.To_Buchi.self; Aorai_option.Deterministic.self ] + let size = 13 + end) (* Add a new variable into the association table name -> varinfo *) -let set_varinfo name vi = - Hashtbl.add varinfos name vi +let set_varinfo = Aux_varinfos.add (* Given a variable name, it returns its associated varinfo. If the variable is not found then an error message is print and an assert false is raised. *) let get_varinfo name = try - Hashtbl.find varinfos name + Aux_varinfos.find name with Not_found -> raise_error ("Variable not declared ("^name^")") let get_logic_var name = @@ -1642,20 +1725,20 @@ let get_logic_var name = Hence, if the variable is not found then None is return. *) let get_varinfo_option name = try - Some(Hashtbl.find varinfos name) + Some(Aux_varinfos.find name) with | Not_found -> None (* Add a new param into the association table (funcname,paramname) -> varinfo *) let set_paraminfo funcname paramname vi = (* Aorai_option.log "Adding %s(...,%s,...) " funcname paramname; *) - Hashtbl.add paraminfos (funcname,paramname) vi + Paraminfos.add (funcname,paramname) vi (* Given a function name and a param name, it returns the varinfo associated to the given param. If the variable is not found then an error message is print and an assert false is raised. *) let get_paraminfo funcname paramname = try - Hashtbl.find paraminfos (funcname,paramname) + Paraminfos.find (funcname,paramname) with Not_found -> raise_error ("Parameter '"^paramname^"' not declared for function '"^funcname^"'.") @@ -1663,13 +1746,13 @@ let get_paraminfo funcname paramname = (* Add a new param into the association table funcname -> varinfo *) let set_returninfo funcname vi = (* Aorai_option.log "Adding return %s(...) " funcname ; *) - Hashtbl.add paraminfos (funcname,"\\return") vi + Paraminfos.add (funcname,"\\return") vi (* Given a function name, it returns the varinfo associated to the given param. If the variable is not found then an error message is print and an assert false is raised. *) let get_returninfo funcname = try - Hashtbl.find paraminfos (funcname,"\\return") + Paraminfos.find (funcname,"\\return") with Not_found -> raise_error ("Return varinfo not declared for function '"^funcname^"'.") @@ -1681,6 +1764,7 @@ type range = *) | Unbounded of int (** only the lower bound is known, there is no upper bound *) + | Unknown (** completely unknown value. *) module Range = Datatype.Make_with_collections (struct @@ -1708,11 +1792,15 @@ module Range = Datatype.Make_with_collections | Bounded _, _ -> 1 | _, Bounded _ -> -1 | Unbounded c1, Unbounded c2 -> Datatype.Int.compare c1 c2 + | Unbounded _, _ -> 1 + | _, Unbounded _ -> -1 + | Unknown, Unknown -> 0 let hash = function | Fixed c1 -> 2 * c1 | Interval(c1,c2) -> 3 * (c1 + c2) | Bounded (c1,c2) -> 5 * (c1 + Cil_datatype.Term.hash c2) | Unbounded c1 -> 7 * c1 + | Unknown -> 11 let copy = function | Fixed c1 -> Fixed (Datatype.Int.copy c1) @@ -1721,6 +1809,7 @@ module Range = Datatype.Make_with_collections | Bounded(c1,c2) -> Bounded(Datatype.Int.copy c1, Cil_datatype.Term.copy c2) | Unbounded c1 -> Unbounded (Datatype.Int.copy c1) + | Unknown -> Unknown let internal_pretty_code _ = Datatype.from_pretty_code let pretty fmt = function | Fixed c1 -> Format.fprintf fmt "%d" c1 @@ -1730,6 +1819,7 @@ module Range = Datatype.Make_with_collections Format.fprintf fmt "@[<2>[%d..@;%a]@]" c1 Cil_datatype.Term.pretty c2 | Unbounded c1 -> Format.fprintf fmt "[%d..]" c1 + | Unknown -> Format.fprintf fmt "[..]" let varname _ = "r" let mem_project = Datatype.never_any_project end) @@ -1805,6 +1895,7 @@ let merge_range loc base r1 r2 = let min = if Datatype.Int.compare min2 min1 < 0 then min2 else min1 in Unbounded min + | Unknown, _ | _, Unknown -> Unknown let tlval lv = Logic_const.term (TLval lv) (Cil.typeOfTermLval lv) @@ -1826,6 +1917,8 @@ let included_range range1 range2 = | Bounded(l1,_), Unbounded l2 -> Datatype.Int.compare l1 l2 <= 0 | Unbounded l1, Unbounded l2 -> Datatype.Int.compare l1 l2 <= 0 | Unbounded _, (Fixed _ | Interval _ | Bounded _) -> false + | _, Unknown -> true + | Unknown, _ -> false let unchanged loc = Cil_datatype.Term.Map.add loc (Fixed 0) Cil_datatype.Term.Map.empty @@ -2086,6 +2179,12 @@ let removeUnusedTransitionsAndStates () = let reached_states = Loop_invariant_state.fold reached reached_states in if Aorai_state.Set.is_empty reached_states then raise Empty_automaton; + let reached_states = + if Aorai_option.Deterministic.get() then + (* keep the rejecting state anyways. *) + Aorai_state.Set.add (get_reject_state()) reached_states + else reached_states + in (* Step 2 : computation of translation tables *) let state_list = List.sort @@ -2118,8 +2217,8 @@ let removeUnusedTransitionsAndStates () = Reject_state.set new_reject with Not_found -> Reject_state.clear ()); (* Step 3 : rewriting stored information *) - automata := Some { auto with states =state_list; trans = trans_list }; - check_states "reduced automata"; + Automaton.set (Some { auto with states =state_list; trans = trans_list }); + check_states "reduced automaton"; let rewrite_state state = let rewrite_set set = diff --git a/src/plugins/aorai/data_for_aorai.mli b/src/plugins/aorai/data_for_aorai.mli index 8c7ed586075255f9c356a763d28debfe3859f17b..b90f1272235d81fde644a06240b92930ab5132c4 100644 --- a/src/plugins/aorai/data_for_aorai.mli +++ b/src/plugins/aorai/data_for_aorai.mli @@ -130,8 +130,9 @@ val curOpStatus : string (** Name of curState C generated variable (Table of states that can be synchronized with the program) *) val curState : string -(** Name of curStateOld C generated variable (Last value of curState) *) -val curStateOld : string +(** Name of the history variables (History of previous states) *) +val history : int -> string +val whole_history : unit -> string list (** Name of curTrans C generated variable (Last transitions that can be crossed) *) val curTrans : string @@ -218,20 +219,19 @@ val getNumberOfTransitions : unit -> int (** return the number of states of the automata *) val getNumberOfStates : unit -> int -(** Return the list of all function name observed in the C file. *) -val getFunctions_from_c : unit -> string list +(** Return the list of all function name observed in the C file, except ignored functions. *) +val getObservablesFunctions : unit -> Cil_types.kernel_function list -(** Return the list of all variables name observed in the C file. *) -val getVariables_from_c : unit -> string list - -(** Return the list of names of all ignored functions. A function is ignored if it is used in C file and if its declaration is unavailable. *) -val getIgnoredFunctions : unit -> string list - -(** Return the list of names of all ignored functions. A function is ignored if it is used in C file and if its declaration is unavailable. *) -val addIgnoredFunction : string -> unit +(** Return the list of names of observable but ignored functions. + A function is ignored if it is used in C file and if its declaration + is unavailable. *) +val getIgnoredFunctions : unit -> Cil_types.kernel_function list (** Return true if and only if the given string fname denotes an ignored function. *) -val isIgnoredFunction : string -> bool +val isIgnoredFunction : Cil_types.kernel_function -> bool + +(** Return true if and only if the given function can be observed *) +val isObservableFunction : Cil_types.kernel_function -> bool (** returns the state of given index. @since Nitrogen-20111001 @@ -244,6 +244,12 @@ val getStateName : int -> string sequences. *) val is_reject_state: state -> bool +(** [true] iff a rejecting state already exists. *) +val has_reject_state: unit -> bool + +(** return the rejecting state of the graph, creating it if needed. *) +val get_reject_state: unit -> state + (** returns the transition having the corresponding id. @raise Not_found if this is not the case. *) @@ -301,6 +307,7 @@ type range = (** range bounded by a logic term (depending on program parameter). *) | Unbounded of int (** only the lower bound is known, there is no upper bound *) + | Unknown (** completely unknown relation. *) module Range: Datatype.S_with_collections with type t = range diff --git a/src/plugins/aorai/promelaast.mli b/src/plugins/aorai/promelaast.mli index fe0bdcfe677bb92ffb947f99580bb7814134e60f..833e13eddde29c8f22eff7970b4e0ba17806d62e 100644 --- a/src/plugins/aorai/promelaast.mli +++ b/src/plugins/aorai/promelaast.mli @@ -142,6 +142,7 @@ type ('c,'a) automaton = { states: state list; trans: (('c,'a) trans) list; metavariables: Cil_types.varinfo Datatype.String.Map.t; + observables: Datatype.String.Set.t option; } type parsed_automaton = (guard, action) automaton diff --git a/src/plugins/aorai/promelaparser.mly b/src/plugins/aorai/promelaparser.mly index 4bcac643722e16f76ec9c72423f3e4f44d030119..1badbbe38a966ef35ed9cea04e2344cd7da29be0 100644 --- a/src/plugins/aorai/promelaparser.mly +++ b/src/plugins/aorai/promelaparser.mly @@ -77,7 +77,10 @@ promela st::l ) observed_states [] in - { states; trans = $3; metavariables = Datatype.String.Map.empty } + { states; trans = $3; + metavariables = Datatype.String.Map.empty; + observables = None; + } } | PROMELA_NEVER PROMELA_LBRACE states PROMELA_SEMICOLON PROMELA_RBRACE EOF { @@ -91,7 +94,11 @@ promela st::l ) observed_states [] in - { states; trans = $3; metavariables = Datatype.String.Map.empty } } + { states; trans = $3; + metavariables = Datatype.String.Map.empty; + observables = None; + } + } ; states diff --git a/src/plugins/aorai/promelaparser_withexps.mly b/src/plugins/aorai/promelaparser_withexps.mly index bf852a65f3747b7a4c976151a3b593b90fe4da18..4f8abab8a0e026c3d93198c570da28cf22b9178c 100644 --- a/src/plugins/aorai/promelaparser_withexps.mly +++ b/src/plugins/aorai/promelaparser_withexps.mly @@ -88,7 +88,10 @@ promela st::l ) observed_states [] in - { states; trans = $3; metavariables = Datatype.String.Map.empty } + { states; trans = $3; + metavariables = Datatype.String.Map.empty; + observables = None; + } } | PROMELA_NEVER PROMELA_LBRACE states PROMELA_SEMICOLON PROMELA_RBRACE EOF { @@ -102,7 +105,11 @@ promela st::l ) observed_states [] in - { states; trans = $3; metavariables = Datatype.String.Map.empty } } + { states; trans = $3; + metavariables = Datatype.String.Map.empty; + observables = None; + } + } ; states diff --git a/src/plugins/aorai/tests/Aorai_test.ml b/src/plugins/aorai/tests/Aorai_test.ml index 54d04d63939431ae669439b4b29cb5a3c8bc9f32..2e55921a891feb5ab63598f1d24a2778f5210587 100644 --- a/src/plugins/aorai/tests/Aorai_test.ml +++ b/src/plugins/aorai/tests/Aorai_test.ml @@ -92,7 +92,9 @@ let extend () = in let chan = open_out tmpfile in let fmt = Format.formatter_of_out_channel chan in - File.pretty_ast ~prj:(Project.from_unique_name "aorai") ~fmt (); + let aorai_prj = Project.from_unique_name "aorai" in + Project.on aorai_prj Kernel.PrintLibc.on (); + File.pretty_ast ~prj:aorai_prj ~fmt (); close_out chan; let selection = State_selection.of_list [ InternalWpShare.self; ProveAuxSpec.self ] diff --git a/src/plugins/aorai/tests/ltl/goto.c b/src/plugins/aorai/tests/ltl/goto.c index ccd31e28dbe2344aa5c4fee8254898945fcfa29c..8cbd56c0842494483bbbf423b8f28eeb7853a751 100644 --- a/src/plugins/aorai/tests/ltl/goto.c +++ b/src/plugins/aorai/tests/ltl/goto.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-ltl @PTEST_DIR@/@PTEST_NAME@.ltl -aorai-test 1 -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-ltl @PTEST_DIR@/@PTEST_NAME@.ltl -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ int status=0; diff --git a/src/plugins/aorai/tests/ltl/oracle/goto.res.oracle b/src/plugins/aorai/tests/ltl/oracle/goto.res.oracle index c1554953000b5e332460b05a1a5bb6c832c1829c..e8fddab9facef7d0257db700af4d9007d123051f 100644 --- a/src/plugins/aorai/tests/ltl/oracle/goto.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle/goto.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ltl/goto.c (with preprocessing) -[aorai] Welcome to the Aorai plugin [aorai] tests/ltl/goto.c:28: Warning: Call to opc does not follow automaton's specification. This path is assumed to be dead [kernel] Parsing TMPDIR/aorai_goto_0.i (no preprocessing) @@ -18,8 +17,8 @@ int status = 0; int rr = 1; /*@ global invariant inv: 0 ≤ rr ≤ 5000; */ -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ ghost int accept_S2 = 0; */ /*@ ghost int accept_S3 = 0; */ /*@ ghost int accept_S4 = 0; */ @@ -72,6 +71,7 @@ int rr = 1; int accept_S6_tmp; int accept_all_tmp; int accept_init_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_opa; accept_S2_tmp = accept_S2; @@ -145,6 +145,7 @@ int rr = 1; int accept_S6_tmp; int accept_all_tmp; int accept_init_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_opa; accept_S2_tmp = accept_S2; @@ -241,6 +242,7 @@ void opa(void) int accept_S6_tmp; int accept_all_tmp; int accept_init_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_opb; accept_S2_tmp = accept_S2; @@ -314,6 +316,7 @@ void opa(void) int accept_S6_tmp; int accept_all_tmp; int accept_init_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_opb; accept_S2_tmp = accept_S2; @@ -398,6 +401,7 @@ void opb(void) int accept_S6_tmp; int accept_all_tmp; int accept_init_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_opc; accept_S2_tmp = accept_S2; @@ -463,6 +467,7 @@ void opb(void) int accept_S6_tmp; int accept_all_tmp; int accept_init_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_opc; accept_S2_tmp = accept_S2; @@ -567,6 +572,7 @@ void opc(void) int accept_S6_tmp; int accept_all_tmp; int accept_init_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_main; accept_S2_tmp = accept_S2; @@ -640,6 +646,7 @@ void opc(void) int accept_S6_tmp; int accept_all_tmp; int accept_init_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_main; accept_S2_tmp = accept_S2; diff --git a/src/plugins/aorai/tests/ltl/oracle/test_boucle.res.oracle b/src/plugins/aorai/tests/ltl/oracle/test_boucle.res.oracle index af9bc71a2b3a1adf94c0022438693926ffc17f6f..04174d4018a865d5e854376f9bd0a5aca035c5fe 100644 --- a/src/plugins/aorai/tests/ltl/oracle/test_boucle.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle/test_boucle.res.oracle @@ -1,7 +1,6 @@ [kernel] Parsing tests/ltl/test_boucle.c (with preprocessing) [kernel:typing:implicit-function-declaration] tests/ltl/test_boucle.c:16: Warning: Calling undeclared function call_to_an_undefined_function. Old style K&R code? -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_test_boucle_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { @@ -16,8 +15,8 @@ enum aorai_OpStatusList { }; extern int call_to_an_undefined_function(void); -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ ghost int T0_S2 = 0; */ /*@ ghost int T0_init = 1; */ /*@ ghost int accept_S1 = 0; */ @@ -47,6 +46,7 @@ extern int call_to_an_undefined_function(void); int T0_S2_tmp; int T0_init_tmp; int accept_S1_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_a; T0_S2_tmp = T0_S2; @@ -90,6 +90,7 @@ extern int call_to_an_undefined_function(void); int T0_S2_tmp; int T0_init_tmp; int accept_S1_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_a; T0_S2_tmp = T0_S2; @@ -151,6 +152,7 @@ int a(void) int T0_S2_tmp; int T0_init_tmp; int accept_S1_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_b; T0_S2_tmp = T0_S2; @@ -193,6 +195,7 @@ int a(void) int T0_S2_tmp; int T0_init_tmp; int accept_S1_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_b; T0_S2_tmp = T0_S2; @@ -255,6 +258,7 @@ int b(void) int T0_S2_tmp; int T0_init_tmp; int accept_S1_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_main; T0_S2_tmp = T0_S2; @@ -297,6 +301,7 @@ int b(void) int T0_S2_tmp; int T0_init_tmp; int accept_S1_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_main; T0_S2_tmp = T0_S2; diff --git a/src/plugins/aorai/tests/ltl/oracle/test_boucle1.res.oracle b/src/plugins/aorai/tests/ltl/oracle/test_boucle1.res.oracle index 9da27b6622ebd3fbb5ae7fefb8a0e694d48175d1..aed1c6cbbf0e5f8c0333d3b2038f72c2d1e6412f 100644 --- a/src/plugins/aorai/tests/ltl/oracle/test_boucle1.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle/test_boucle1.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ltl/test_boucle1.c (with preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_test_boucle1_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { @@ -17,8 +16,8 @@ int cpt = 3; int status = 0; /*@ global invariant inv_status: 0 ≤ status ≤ 1; */ -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ ghost int accept_S1 = 0; */ /*@ ghost int accept_S2 = 0; */ /*@ ghost int accept_S3 = 0; */ @@ -60,6 +59,7 @@ int status = 0; int accept_S3_tmp; int accept_S4_tmp; int accept_init_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_commit_trans; accept_S1_tmp = accept_S1; @@ -118,6 +118,7 @@ int status = 0; int accept_S3_tmp; int accept_S4_tmp; int accept_init_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_commit_trans; accept_S1_tmp = accept_S1; @@ -199,6 +200,7 @@ int commit_trans(void) int accept_S3_tmp; int accept_S4_tmp; int accept_init_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_init_trans; accept_S1_tmp = accept_S1; @@ -263,6 +265,7 @@ int commit_trans(void) int accept_S3_tmp; int accept_S4_tmp; int accept_init_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_init_trans; accept_S1_tmp = accept_S1; @@ -349,6 +352,7 @@ int init_trans(void) int accept_S3_tmp; int accept_S4_tmp; int accept_init_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_main; accept_S1_tmp = accept_S1; @@ -417,6 +421,7 @@ int init_trans(void) int accept_S3_tmp; int accept_S4_tmp; int accept_init_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_main; accept_S1_tmp = accept_S1; diff --git a/src/plugins/aorai/tests/ltl/oracle/test_boucle2.res.oracle b/src/plugins/aorai/tests/ltl/oracle/test_boucle2.res.oracle index 3b6f510bb856cc315fcedd97a9d0796d7bbf4d9a..9ab4d87d9cc4fec37cb7161c6985fbba348376e2 100644 --- a/src/plugins/aorai/tests/ltl/oracle/test_boucle2.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle/test_boucle2.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ltl/test_boucle2.c (with preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_test_boucle2_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { @@ -15,8 +14,8 @@ int status = 0; int rr = 1; /*@ global invariant inv: 0 ≤ rr ≤ 50; */ -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ ghost int T0_S2 = 0; */ /*@ ghost int T0_init = 1; */ /*@ ghost int accept_S3 = 0; */ @@ -63,6 +62,7 @@ int rr = 1; int accept_S4_tmp; int accept_S5_tmp; int accept_all_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_opa; T0_S2_tmp = T0_S2; @@ -133,6 +133,7 @@ int rr = 1; int accept_S4_tmp; int accept_S5_tmp; int accept_all_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_opa; T0_S2_tmp = T0_S2; @@ -223,6 +224,7 @@ void opa(void) int accept_S4_tmp; int accept_S5_tmp; int accept_all_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_opb; T0_S2_tmp = T0_S2; @@ -288,6 +290,7 @@ void opa(void) int accept_S4_tmp; int accept_S5_tmp; int accept_all_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_opb; T0_S2_tmp = T0_S2; @@ -371,6 +374,7 @@ void opb(void) int accept_S4_tmp; int accept_S5_tmp; int accept_all_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_main; T0_S2_tmp = T0_S2; @@ -436,6 +440,7 @@ void opb(void) int accept_S4_tmp; int accept_S5_tmp; int accept_all_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_main; T0_S2_tmp = T0_S2; diff --git a/src/plugins/aorai/tests/ltl/oracle/test_boucle3.res.oracle b/src/plugins/aorai/tests/ltl/oracle/test_boucle3.res.oracle index 0e2861364d6f1efef4a6191a0cd4ac2a817c7b23..8b2d1dbb5f25e9a5e7ce4f93d939320ceff7e03c 100644 --- a/src/plugins/aorai/tests/ltl/oracle/test_boucle3.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle/test_boucle3.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ltl/test_boucle3.c (with preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_test_boucle3_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { @@ -15,8 +14,8 @@ int status = 0; int rr = 1; /*@ global invariant inv: 0 ≤ rr ≤ 50; */ -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ ghost int T0_S4 = 0; */ /*@ ghost int T0_init = 1; */ /*@ ghost int T1_S2 = 0; */ @@ -63,6 +62,7 @@ int rr = 1; int T1_S2_tmp; int accept_S3_tmp; int accept_all_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_opa; T0_S4_tmp = T0_S4; @@ -126,6 +126,7 @@ int rr = 1; int T1_S2_tmp; int accept_S3_tmp; int accept_all_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_opa; T0_S4_tmp = T0_S4; @@ -228,6 +229,7 @@ void opa(void) int T1_S2_tmp; int accept_S3_tmp; int accept_all_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_opb; T0_S4_tmp = T0_S4; @@ -286,6 +288,7 @@ void opa(void) int T1_S2_tmp; int accept_S3_tmp; int accept_all_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_opb; T0_S4_tmp = T0_S4; @@ -363,6 +366,7 @@ void opb(void) int T1_S2_tmp; int accept_S3_tmp; int accept_all_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_main; T0_S4_tmp = T0_S4; @@ -426,6 +430,7 @@ void opb(void) int T1_S2_tmp; int accept_S3_tmp; int accept_all_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_main; T0_S4_tmp = T0_S4; diff --git a/src/plugins/aorai/tests/ltl/oracle/test_factorial.res.oracle b/src/plugins/aorai/tests/ltl/oracle/test_factorial.res.oracle index 76309462d15d0678365eb0f899d7dc1730f6ad87..4a0a9031b26157edb32bc4646da67494a4734c6d 100644 --- a/src/plugins/aorai/tests/ltl/oracle/test_factorial.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle/test_factorial.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ltl/test_factorial.c (with preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_test_factorial_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { @@ -11,8 +10,8 @@ enum aorai_OpStatusList { aorai_Terminated = 1, aorai_Called = 0 }; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ ghost int accept_S1 = 0; */ /*@ ghost int accept_S2 = 0; */ /*@ ghost int accept_init = 1; */ @@ -42,6 +41,7 @@ enum aorai_OpStatusList { int accept_S1_tmp; int accept_S2_tmp; int accept_init_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_decode_int; accept_S1_tmp = accept_S1; @@ -89,6 +89,7 @@ enum aorai_OpStatusList { int accept_S1_tmp; int accept_S2_tmp; int accept_init_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_decode_int; accept_S1_tmp = accept_S1; @@ -211,6 +212,7 @@ int decode_int(char *s) int accept_S1_tmp; int accept_S2_tmp; int accept_init_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_factorial; accept_S1_tmp = accept_S1; @@ -259,6 +261,7 @@ int decode_int(char *s) int accept_S1_tmp; int accept_S2_tmp; int accept_init_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_factorial; accept_S1_tmp = accept_S1; @@ -330,6 +333,7 @@ int factorial(int value) int accept_S1_tmp; int accept_S2_tmp; int accept_init_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_main; accept_S1_tmp = accept_S1; @@ -377,6 +381,7 @@ int factorial(int value) int accept_S1_tmp; int accept_S2_tmp; int accept_init_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_main; accept_S1_tmp = accept_S1; diff --git a/src/plugins/aorai/tests/ltl/oracle/test_recursion1.res.oracle b/src/plugins/aorai/tests/ltl/oracle/test_recursion1.res.oracle index c3757b98233f81226e3bf18a2a4fdf0ba0e6aba9..a377f6f727cf1145d02b2f0e5277e23d68f5c293 100644 --- a/src/plugins/aorai/tests/ltl/oracle/test_recursion1.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle/test_recursion1.res.oracle @@ -5,7 +5,6 @@ parsing obsolete ACSL construct '\valid_range(addr,min,max)'. '\valid(addr+(min..max))' should be used instead. [kernel] tests/ltl/test_recursion1.c:54: Warning: parsing obsolete ACSL construct '\valid_range(addr,min,max)'. '\valid(addr+(min..max))' should be used instead. -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_test_recursion1_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { @@ -45,8 +44,8 @@ axiomatic string_len { predicate valid_string{L}(char *s) = \valid(s) ∧ \valid(s + (0 .. string_len(s))); */ -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ ghost int T0_S2 = 0; */ /*@ ghost int T0_init = 1; */ /*@ ghost int accept_S1 = 0; */ @@ -76,6 +75,7 @@ predicate valid_string{L}(char *s) = int T0_S2_tmp; int T0_init_tmp; int accept_S1_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_countOne; T0_S2_tmp = T0_S2; @@ -118,6 +118,7 @@ predicate valid_string{L}(char *s) = int T0_S2_tmp; int T0_init_tmp; int accept_S1_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_countOne; T0_S2_tmp = T0_S2; @@ -189,6 +190,7 @@ int countOne(char *argv) int T0_S2_tmp; int T0_init_tmp; int accept_S1_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_count; T0_S2_tmp = T0_S2; @@ -231,6 +233,7 @@ int countOne(char *argv) int T0_S2_tmp; int T0_init_tmp; int accept_S1_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_count; T0_S2_tmp = T0_S2; @@ -296,6 +299,7 @@ int count(int argc, char **argv) int T0_S2_tmp; int T0_init_tmp; int accept_S1_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_main; T0_S2_tmp = T0_S2; @@ -343,6 +347,7 @@ int count(int argc, char **argv) int T0_S2_tmp; int T0_init_tmp; int accept_S1_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_main; T0_S2_tmp = T0_S2; diff --git a/src/plugins/aorai/tests/ltl/oracle/test_recursion2.0.res.oracle b/src/plugins/aorai/tests/ltl/oracle/test_recursion2.0.res.oracle index fd43837e998528a1c7cfa61c0424d06e0c3d4508..6dda5c9d85b5c4ff6209a1347863c8efd0b1838b 100644 --- a/src/plugins/aorai/tests/ltl/oracle/test_recursion2.0.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle/test_recursion2.0.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ltl/test_recursion2.c (with preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_test_recursion2_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { @@ -60,8 +59,8 @@ axiomatic sum_tab { } */ int global_argc = 0; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ ghost int S1 = 0; */ /*@ ghost int T0_init = 1; */ /*@ ghost int T1 = 0; */ @@ -97,6 +96,7 @@ int global_argc = 0; int T0_init_tmp; int T1_tmp; int accept_T2_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_count; S1_tmp = S1; @@ -146,6 +146,7 @@ int global_argc = 0; int T0_init_tmp; int T1_tmp; int accept_T2_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_count; S1_tmp = S1; @@ -223,6 +224,7 @@ int count(char *argv) int T0_init_tmp; int T1_tmp; int accept_T2_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_sumOne; S1_tmp = S1; @@ -272,6 +274,7 @@ int count(char *argv) int T0_init_tmp; int T1_tmp; int accept_T2_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_sumOne; S1_tmp = S1; @@ -355,6 +358,7 @@ int sumOne(char *t, int length) int T0_init_tmp; int T1_tmp; int accept_T2_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_main; S1_tmp = S1; @@ -409,6 +413,7 @@ int sumOne(char *t, int length) int T0_init_tmp; int T1_tmp; int accept_T2_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_main; S1_tmp = S1; diff --git a/src/plugins/aorai/tests/ltl/oracle/test_recursion2.1.res.oracle b/src/plugins/aorai/tests/ltl/oracle/test_recursion2.1.res.oracle index a40a3eae30459dfa081154ccd2b0eed95761f1b8..aabed966d5a0f114ae66bb87c5b263bab35d8e27 100644 --- a/src/plugins/aorai/tests/ltl/oracle/test_recursion2.1.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle/test_recursion2.1.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ltl/test_recursion2.c (with preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_test_recursion2_1.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { @@ -60,8 +59,8 @@ axiomatic sum_tab { } */ int global_argc = 0; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ ghost int S1 = 0; */ /*@ ghost int T0_init = 1; */ /*@ ghost int T1 = 0; */ @@ -97,6 +96,7 @@ int global_argc = 0; int T0_init_tmp; int T1_tmp; int accept_T2_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_count; S1_tmp = S1; @@ -146,6 +146,7 @@ int global_argc = 0; int T0_init_tmp; int T1_tmp; int accept_T2_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_count; S1_tmp = S1; @@ -223,6 +224,7 @@ int count(char *argv) int T0_init_tmp; int T1_tmp; int accept_T2_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_sumOne; S1_tmp = S1; @@ -272,6 +274,7 @@ int count(char *argv) int T0_init_tmp; int T1_tmp; int accept_T2_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_sumOne; S1_tmp = S1; @@ -355,6 +358,7 @@ int sumOne(char *t, int length) int T0_init_tmp; int T1_tmp; int accept_T2_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_main; S1_tmp = S1; @@ -409,6 +413,7 @@ int sumOne(char *t, int length) int T0_init_tmp; int T1_tmp; int accept_T2_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_main; S1_tmp = S1; diff --git a/src/plugins/aorai/tests/ltl/oracle/test_switch2.res.oracle b/src/plugins/aorai/tests/ltl/oracle/test_switch2.res.oracle index 2ceecc16fc151c2ddca917d597dc7114a5a58dd8..88e19cf5f590edfaa350bdeef336969f7cf3149b 100644 --- a/src/plugins/aorai/tests/ltl/oracle/test_switch2.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle/test_switch2.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ltl/test_switch2.c (with preprocessing) -[aorai] Welcome to the Aorai plugin [aorai] tests/ltl/test_switch2.c:34: Warning: Call to opc not conforming to automaton (post-cond). Assuming it is on a dead path [aorai] tests/ltl/test_switch2.c:23: Warning: @@ -20,8 +19,8 @@ int status = 0; int rr = 1; /*@ global invariant inv: 0 ≤ rr ≤ 50; */ -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ ghost int accept_S2 = 0; */ /*@ ghost int accept_S3 = 0; */ /*@ ghost int accept_S4 = 0; */ @@ -74,6 +73,7 @@ int rr = 1; int accept_S6_tmp; int accept_all_tmp; int accept_init_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_opa; accept_S2_tmp = accept_S2; @@ -147,6 +147,7 @@ int rr = 1; int accept_S6_tmp; int accept_all_tmp; int accept_init_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_opa; accept_S2_tmp = accept_S2; @@ -243,6 +244,7 @@ void opa(void) int accept_S6_tmp; int accept_all_tmp; int accept_init_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_opb; accept_S2_tmp = accept_S2; @@ -316,6 +318,7 @@ void opa(void) int accept_S6_tmp; int accept_all_tmp; int accept_init_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_opb; accept_S2_tmp = accept_S2; @@ -400,6 +403,7 @@ void opb(void) int accept_S6_tmp; int accept_all_tmp; int accept_init_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_opc; accept_S2_tmp = accept_S2; @@ -465,6 +469,7 @@ void opb(void) int accept_S6_tmp; int accept_all_tmp; int accept_init_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_opc; accept_S2_tmp = accept_S2; @@ -569,6 +574,7 @@ void opc(void) int accept_S6_tmp; int accept_all_tmp; int accept_init_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_main; accept_S2_tmp = accept_S2; @@ -642,6 +648,7 @@ void opc(void) int accept_S6_tmp; int accept_all_tmp; int accept_init_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_main; accept_S2_tmp = accept_S2; diff --git a/src/plugins/aorai/tests/ltl/oracle/test_switch3.res.oracle b/src/plugins/aorai/tests/ltl/oracle/test_switch3.res.oracle index d81509eb53661bace2a79e5e2babdface3e95275..3b0822025db85b3f78f088c4147467d42c4385fc 100644 --- a/src/plugins/aorai/tests/ltl/oracle/test_switch3.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle/test_switch3.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ltl/test_switch3.c (with preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_test_switch3_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { @@ -11,8 +10,8 @@ enum aorai_OpStatusList { aorai_Terminated = 1, aorai_Called = 0 }; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ ghost int T0_S2 = 0; */ /*@ ghost int T0_init = 1; */ /*@ ghost int accept_S1 = 0; */ @@ -49,6 +48,7 @@ enum aorai_OpStatusList { int T0_init_tmp; int accept_S1_tmp; int accept_S2_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_countOne; T0_S2_tmp = T0_S2; @@ -99,6 +99,7 @@ enum aorai_OpStatusList { int T0_init_tmp; int accept_S1_tmp; int accept_S2_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_countOne; T0_S2_tmp = T0_S2; @@ -180,6 +181,7 @@ int countOne(char *argv) int T0_init_tmp; int accept_S1_tmp; int accept_S2_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_count; T0_S2_tmp = T0_S2; @@ -241,6 +243,7 @@ int countOne(char *argv) int T0_init_tmp; int accept_S1_tmp; int accept_S2_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_count; T0_S2_tmp = T0_S2; @@ -329,6 +332,7 @@ int count(int argc, char **argv) int T0_init_tmp; int accept_S1_tmp; int accept_S2_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_main; T0_S2_tmp = T0_S2; @@ -384,6 +388,7 @@ int count(int argc, char **argv) int T0_init_tmp; int accept_S1_tmp; int accept_S2_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_main; T0_S2_tmp = T0_S2; diff --git a/src/plugins/aorai/tests/ltl/oracle/test_switch3_et_recursion.res.oracle b/src/plugins/aorai/tests/ltl/oracle/test_switch3_et_recursion.res.oracle index e5154fb858165466a56370e5d91986cf92384539..94652a4ad7343682dfdb2329d514d27232c24ff6 100644 --- a/src/plugins/aorai/tests/ltl/oracle/test_switch3_et_recursion.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle/test_switch3_et_recursion.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ltl/test_switch3_et_recursion.c (with preprocessing) -[aorai] Welcome to the Aorai plugin [aorai] tests/ltl/test_switch3_et_recursion.c:26: Warning: Call to countOne does not follow automaton's specification. This path is assumed to be dead [kernel] Parsing TMPDIR/aorai_test_switch3_et_recursion_0.i (no preprocessing) @@ -13,8 +12,8 @@ enum aorai_OpStatusList { aorai_Terminated = 1, aorai_Called = 0 }; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ ghost int T0_S2 = 0; */ /*@ ghost int T0_init = 1; */ /*@ ghost int accept_S1 = 0; */ @@ -44,6 +43,7 @@ enum aorai_OpStatusList { int T0_S2_tmp; int T0_init_tmp; int accept_S1_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_countOne; T0_S2_tmp = T0_S2; @@ -81,6 +81,7 @@ enum aorai_OpStatusList { int T0_S2_tmp; int T0_init_tmp; int accept_S1_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_countOne; T0_S2_tmp = T0_S2; @@ -149,6 +150,7 @@ int countOne(char *argv) int T0_S2_tmp; int T0_init_tmp; int accept_S1_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_count; T0_S2_tmp = T0_S2; @@ -191,6 +193,7 @@ int countOne(char *argv) int T0_S2_tmp; int T0_init_tmp; int accept_S1_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_count; T0_S2_tmp = T0_S2; @@ -258,6 +261,7 @@ int count(int argc, char **argv) int T0_S2_tmp; int T0_init_tmp; int accept_S1_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_main; T0_S2_tmp = T0_S2; @@ -305,6 +309,7 @@ int count(int argc, char **argv) int T0_S2_tmp; int T0_init_tmp; int accept_S1_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_main; T0_S2_tmp = T0_S2; diff --git a/src/plugins/aorai/tests/ltl/oracle/test_switch3_if.res.oracle b/src/plugins/aorai/tests/ltl/oracle/test_switch3_if.res.oracle index 5cc019fcad43e0cfacafa6eb123b8055daf1dda4..74f48874eb313e191b4918e670f2126e8843de58 100644 --- a/src/plugins/aorai/tests/ltl/oracle/test_switch3_if.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle/test_switch3_if.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ltl/test_switch3_if.c (with preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_test_switch3_if_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { @@ -11,8 +10,8 @@ enum aorai_OpStatusList { aorai_Terminated = 1, aorai_Called = 0 }; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ ghost int T0_S2 = 0; */ /*@ ghost int T0_init = 1; */ /*@ ghost int accept_S1 = 0; */ @@ -49,6 +48,7 @@ enum aorai_OpStatusList { int T0_init_tmp; int accept_S1_tmp; int accept_S2_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_countOne; T0_S2_tmp = T0_S2; @@ -99,6 +99,7 @@ enum aorai_OpStatusList { int T0_init_tmp; int accept_S1_tmp; int accept_S2_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_countOne; T0_S2_tmp = T0_S2; @@ -178,6 +179,7 @@ int countOne(char *argv) int T0_init_tmp; int accept_S1_tmp; int accept_S2_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_count; T0_S2_tmp = T0_S2; @@ -239,6 +241,7 @@ int countOne(char *argv) int T0_init_tmp; int accept_S1_tmp; int accept_S2_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_count; T0_S2_tmp = T0_S2; @@ -327,6 +330,7 @@ int count(int argc, char **argv) int T0_init_tmp; int accept_S1_tmp; int accept_S2_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_main; T0_S2_tmp = T0_S2; @@ -382,6 +386,7 @@ int count(int argc, char **argv) int T0_init_tmp; int accept_S1_tmp; int accept_S2_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_main; T0_S2_tmp = T0_S2; diff --git a/src/plugins/aorai/tests/ltl/oracle/test_switch3_return.res.oracle b/src/plugins/aorai/tests/ltl/oracle/test_switch3_return.res.oracle index 0fb781bb7040975d8e51beef6328114ceb34a501..e4f973d66d554a0ac72c98aca30e5600442a4cc3 100644 --- a/src/plugins/aorai/tests/ltl/oracle/test_switch3_return.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle/test_switch3_return.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ltl/test_switch3_return.c (with preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_test_switch3_return_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { @@ -11,8 +10,8 @@ enum aorai_OpStatusList { aorai_Terminated = 1, aorai_Called = 0 }; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ ghost int T0_S2 = 0; */ /*@ ghost int T0_init = 1; */ /*@ ghost int accept_S1 = 0; */ @@ -49,6 +48,7 @@ enum aorai_OpStatusList { int T0_init_tmp; int accept_S1_tmp; int accept_S2_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_countOne; T0_S2_tmp = T0_S2; @@ -99,6 +99,7 @@ enum aorai_OpStatusList { int T0_init_tmp; int accept_S1_tmp; int accept_S2_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_countOne; T0_S2_tmp = T0_S2; @@ -185,6 +186,7 @@ int countOne(char *argv) int T0_init_tmp; int accept_S1_tmp; int accept_S2_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_count; T0_S2_tmp = T0_S2; @@ -246,6 +248,7 @@ int countOne(char *argv) int T0_init_tmp; int accept_S1_tmp; int accept_S2_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_count; T0_S2_tmp = T0_S2; @@ -334,6 +337,7 @@ int count(int argc, char **argv) int T0_init_tmp; int accept_S1_tmp; int accept_S2_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_main; T0_S2_tmp = T0_S2; @@ -389,6 +393,7 @@ int count(int argc, char **argv) int T0_init_tmp; int accept_S1_tmp; int accept_S2_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_main; T0_S2_tmp = T0_S2; diff --git a/src/plugins/aorai/tests/ltl/oracle_prove/goto.res.oracle b/src/plugins/aorai/tests/ltl/oracle_prove/goto.res.oracle index a0b1d8ed006dcc5ea0ee140a4ffe963e975d0e90..8e07b35953f76a889c06c6b94390006f13565928 100644 --- a/src/plugins/aorai/tests/ltl/oracle_prove/goto.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle_prove/goto.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ltl/goto.c (with preprocessing) -[aorai] Welcome to the Aorai plugin [aorai] tests/ltl/goto.c:28: Warning: Call to opc does not follow automaton's specification. This path is assumed to be dead [kernel] Parsing TMPDIR/aorai_goto_0.i (no preprocessing) diff --git a/src/plugins/aorai/tests/ltl/oracle_prove/test_boucle.res.oracle b/src/plugins/aorai/tests/ltl/oracle_prove/test_boucle.res.oracle index 0cf6aa042e89216a12267f75a00f12f7900d45ec..e3d5ec00773c630fcd03a506eaec86aa0b0777ee 100644 --- a/src/plugins/aorai/tests/ltl/oracle_prove/test_boucle.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle_prove/test_boucle.res.oracle @@ -1,8 +1,7 @@ [kernel] Parsing tests/ltl/test_boucle.c (with preprocessing) [kernel:typing:implicit-function-declaration] tests/ltl/test_boucle.c:16: Warning: Calling undeclared function call_to_an_undefined_function. Old style K&R code? -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_test_boucle_0.i (no preprocessing) [wp] Warning: Missing RTE guards -[kernel:annot:missing-spec] TMPDIR/aorai_test_boucle_0.i:85: Warning: +[kernel:annot:missing-spec] TMPDIR/aorai_test_boucle_0.i:86: Warning: Neither code nor specification for function call_to_an_undefined_function, generating default assigns from the prototype diff --git a/src/plugins/aorai/tests/ltl/oracle_prove/test_boucle1.res.oracle b/src/plugins/aorai/tests/ltl/oracle_prove/test_boucle1.res.oracle index 1569a5b398d4faf17bcd738ec5e59ba3470a7d8f..c7334dc7d0e47e4f03ab43e11ff87faab1c583af 100644 --- a/src/plugins/aorai/tests/ltl/oracle_prove/test_boucle1.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle_prove/test_boucle1.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ltl/test_boucle1.c (with preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_test_boucle1_0.i (no preprocessing) [wp] TMPDIR/aorai_test_boucle1_0.i:3: Warning: Global invariant not handled yet ('inv_cpt' ignored) diff --git a/src/plugins/aorai/tests/ltl/oracle_prove/test_boucle2.res.oracle b/src/plugins/aorai/tests/ltl/oracle_prove/test_boucle2.res.oracle index 6aff87fc8f04cb57fafbcfab6e1693e21a6112c8..1da39e22bb3f77b68bdfd9a967e3448f141d13e1 100644 --- a/src/plugins/aorai/tests/ltl/oracle_prove/test_boucle2.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle_prove/test_boucle2.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ltl/test_boucle2.c (with preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_test_boucle2_0.i (no preprocessing) [wp] TMPDIR/aorai_test_boucle2_0.i:4: Warning: Global invariant not handled yet ('inv' ignored) diff --git a/src/plugins/aorai/tests/ltl/oracle_prove/test_boucle3.res.oracle b/src/plugins/aorai/tests/ltl/oracle_prove/test_boucle3.res.oracle index d42c00524da292d300baf6eb1c8465fca0a1de88..8f6717a1e318e6976e9ba28deca3fd2c64bc2cdd 100644 --- a/src/plugins/aorai/tests/ltl/oracle_prove/test_boucle3.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle_prove/test_boucle3.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ltl/test_boucle3.c (with preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_test_boucle3_0.i (no preprocessing) [wp] TMPDIR/aorai_test_boucle3_0.i:4: Warning: Global invariant not handled yet ('inv' ignored) diff --git a/src/plugins/aorai/tests/ltl/oracle_prove/test_factorial.res.oracle b/src/plugins/aorai/tests/ltl/oracle_prove/test_factorial.res.oracle index 6e1e98b96475e950de103887600795bebb7f75c7..0a52966e046dc1fb9d3add5f07e55b9c93b13ab2 100644 --- a/src/plugins/aorai/tests/ltl/oracle_prove/test_factorial.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle_prove/test_factorial.res.oracle @@ -1,4 +1,3 @@ [kernel] Parsing tests/ltl/test_factorial.c (with preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_test_factorial_0.i (no preprocessing) [wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ltl/oracle_prove/test_recursion1.res.oracle b/src/plugins/aorai/tests/ltl/oracle_prove/test_recursion1.res.oracle index b41e5fc1a018d973abfb9b98ecb0739dc439b879..b5e9aba20ed217ff7340c60ba5f738a388ba80e9 100644 --- a/src/plugins/aorai/tests/ltl/oracle_prove/test_recursion1.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle_prove/test_recursion1.res.oracle @@ -5,7 +5,6 @@ parsing obsolete ACSL construct '\valid_range(addr,min,max)'. '\valid(addr+(min..max))' should be used instead. [kernel] tests/ltl/test_recursion1.c:54: Warning: parsing obsolete ACSL construct '\valid_range(addr,min,max)'. '\valid(addr+(min..max))' should be used instead. -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_test_recursion1_0.i (no preprocessing) [wp] Warning: No definition for 'string_len' interpreted as reads nothing [wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ltl/oracle_prove/test_recursion2.0.res.oracle b/src/plugins/aorai/tests/ltl/oracle_prove/test_recursion2.0.res.oracle index ccdb613ba7df3a6e4cf3d433a986b71f550e4501..9891c035100b93d2c7f9dfda512688613a83d126 100644 --- a/src/plugins/aorai/tests/ltl/oracle_prove/test_recursion2.0.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle_prove/test_recursion2.0.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ltl/test_recursion2.c (with preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_test_recursion2_0.i (no preprocessing) [wp] Warning: No definition for 'string_len' interpreted as reads nothing [wp] Warning: No definition for 'sum_tab' interpreted as reads nothing diff --git a/src/plugins/aorai/tests/ltl/oracle_prove/test_recursion2.1.res.oracle b/src/plugins/aorai/tests/ltl/oracle_prove/test_recursion2.1.res.oracle index 8e71caf0debca2dc610c47ca48fbce0d3983eb82..904f906300cd765dbc82900fc04a8f861e28e484 100644 --- a/src/plugins/aorai/tests/ltl/oracle_prove/test_recursion2.1.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle_prove/test_recursion2.1.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ltl/test_recursion2.c (with preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_test_recursion2_1.i (no preprocessing) [wp] Warning: No definition for 'string_len' interpreted as reads nothing [wp] Warning: No definition for 'sum_tab' interpreted as reads nothing diff --git a/src/plugins/aorai/tests/ltl/oracle_prove/test_switch2.res.oracle b/src/plugins/aorai/tests/ltl/oracle_prove/test_switch2.res.oracle index 9964a15c39c0df3664931de857618178351c0552..5e6c56778cf99c15ab7fd72ef63105540588b23c 100644 --- a/src/plugins/aorai/tests/ltl/oracle_prove/test_switch2.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle_prove/test_switch2.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ltl/test_switch2.c (with preprocessing) -[aorai] Welcome to the Aorai plugin [aorai] tests/ltl/test_switch2.c:34: Warning: Call to opc not conforming to automaton (post-cond). Assuming it is on a dead path [aorai] tests/ltl/test_switch2.c:23: Warning: diff --git a/src/plugins/aorai/tests/ltl/oracle_prove/test_switch3.res.oracle b/src/plugins/aorai/tests/ltl/oracle_prove/test_switch3.res.oracle index bfe46c01065891f3dc5d9c074dfc8a316e494409..1370ce59a991ba6eb4b392edde15f855451b98c5 100644 --- a/src/plugins/aorai/tests/ltl/oracle_prove/test_switch3.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle_prove/test_switch3.res.oracle @@ -1,4 +1,3 @@ [kernel] Parsing tests/ltl/test_switch3.c (with preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_test_switch3_0.i (no preprocessing) [wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ltl/oracle_prove/test_switch3_et_recursion.res.oracle b/src/plugins/aorai/tests/ltl/oracle_prove/test_switch3_et_recursion.res.oracle index f13072d1a65cb42361f1cb18532fbc21dba5c80a..0c3127bafe547fb808d547145daf183e709e4f3a 100644 --- a/src/plugins/aorai/tests/ltl/oracle_prove/test_switch3_et_recursion.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle_prove/test_switch3_et_recursion.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ltl/test_switch3_et_recursion.c (with preprocessing) -[aorai] Welcome to the Aorai plugin [aorai] tests/ltl/test_switch3_et_recursion.c:26: Warning: Call to countOne does not follow automaton's specification. This path is assumed to be dead [kernel] Parsing TMPDIR/aorai_test_switch3_et_recursion_0.i (no preprocessing) diff --git a/src/plugins/aorai/tests/ltl/oracle_prove/test_switch3_if.res.oracle b/src/plugins/aorai/tests/ltl/oracle_prove/test_switch3_if.res.oracle index 68de03d1b30d2be55649d7e8c0139bd9668a380e..bf53ddf15baf64391dbcc15a5a67b6dd579f9445 100644 --- a/src/plugins/aorai/tests/ltl/oracle_prove/test_switch3_if.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle_prove/test_switch3_if.res.oracle @@ -1,4 +1,3 @@ [kernel] Parsing tests/ltl/test_switch3_if.c (with preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_test_switch3_if_0.i (no preprocessing) [wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ltl/oracle_prove/test_switch3_return.res.oracle b/src/plugins/aorai/tests/ltl/oracle_prove/test_switch3_return.res.oracle index 2bfc5074656abd0609d096003396b2d396dbdce4..eb8fb8e27b51954dd4935997e25b24735c7302b3 100644 --- a/src/plugins/aorai/tests/ltl/oracle_prove/test_switch3_return.res.oracle +++ b/src/plugins/aorai/tests/ltl/oracle_prove/test_switch3_return.res.oracle @@ -1,4 +1,3 @@ [kernel] Parsing tests/ltl/test_switch3_return.c (with preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_test_switch3_return_0.i (no preprocessing) [wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ltl/test_boucle.c b/src/plugins/aorai/tests/ltl/test_boucle.c index 72cf5e78ac931fa05a5a21be18a1777112e6e8e2..db2f6bc0c3f18408ea163acbdaacffdaaeac8ac3 100644 --- a/src/plugins/aorai/tests/ltl/test_boucle.c +++ b/src/plugins/aorai/tests/ltl/test_boucle.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-ltl @PTEST_DIR@/@PTEST_NAME@.ltl -aorai-test 1 -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-ltl @PTEST_DIR@/@PTEST_NAME@.ltl -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ /*@ requires \true; diff --git a/src/plugins/aorai/tests/ltl/test_boucle1.c b/src/plugins/aorai/tests/ltl/test_boucle1.c index 0245ffedcfdfe67aad9a8d9610159c9a3313b0e8..7b091c51b7614a411c3afdb521561a4785ffcf16 100644 --- a/src/plugins/aorai/tests/ltl/test_boucle1.c +++ b/src/plugins/aorai/tests/ltl/test_boucle1.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-ltl @PTEST_DIR@/@PTEST_NAME@.ltl -aorai-test 1 -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-ltl @PTEST_DIR@/@PTEST_NAME@.ltl -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ int cpt=3; diff --git a/src/plugins/aorai/tests/ltl/test_boucle2.c b/src/plugins/aorai/tests/ltl/test_boucle2.c index 9d4cf3a9aff3c018e3739a253578cdcfb92eea5e..8aa77e6f8b0589e2f53869d76fb00adba6abd76a 100644 --- a/src/plugins/aorai/tests/ltl/test_boucle2.c +++ b/src/plugins/aorai/tests/ltl/test_boucle2.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-ltl @PTEST_DIR@/@PTEST_NAME@.ltl -aorai-test 1 -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-ltl @PTEST_DIR@/@PTEST_NAME@.ltl -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ int status=0; diff --git a/src/plugins/aorai/tests/ltl/test_boucle3.c b/src/plugins/aorai/tests/ltl/test_boucle3.c index 6c93a4202649a24dff714ef33906252a84b74704..6da17de07b287db5befa2b3bcd350672f128f03d 100644 --- a/src/plugins/aorai/tests/ltl/test_boucle3.c +++ b/src/plugins/aorai/tests/ltl/test_boucle3.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-ltl @PTEST_DIR@/@PTEST_NAME@.ltl -aorai-test 1 -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-ltl @PTEST_DIR@/@PTEST_NAME@.ltl -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ diff --git a/src/plugins/aorai/tests/ltl/test_factorial.c b/src/plugins/aorai/tests/ltl/test_factorial.c index 6a429a55e31de0a06be227ffd9ca72d1fb4770ea..0ad6476002658f8a1bedc42146f14f3229b42427 100644 --- a/src/plugins/aorai/tests/ltl/test_factorial.c +++ b/src/plugins/aorai/tests/ltl/test_factorial.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-ltl @PTEST_DIR@/@PTEST_NAME@.ltl -aorai-test 1 -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-ltl @PTEST_DIR@/@PTEST_NAME@.ltl -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ diff --git a/src/plugins/aorai/tests/ltl/test_recursion1.c b/src/plugins/aorai/tests/ltl/test_recursion1.c index ee0968101b1a776f5b232d5740d4ae4e2c568f7e..14be685a47bcdfbaf534712834e6a69acc2de9fb 100644 --- a/src/plugins/aorai/tests/ltl/test_recursion1.c +++ b/src/plugins/aorai/tests/ltl/test_recursion1.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-ltl @PTEST_DIR@/@PTEST_NAME@.ltl -aorai-test 1 -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-ltl @PTEST_DIR@/@PTEST_NAME@.ltl -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ diff --git a/src/plugins/aorai/tests/ltl/test_recursion2.c b/src/plugins/aorai/tests/ltl/test_recursion2.c index a13c39b9f887df7af32c52fa0f2a142e992478cd..7d93ab3fa3a3e28e205517b56bc795ad2b427ebf 100644 --- a/src/plugins/aorai/tests/ltl/test_recursion2.c +++ b/src/plugins/aorai/tests/ltl/test_recursion2.c @@ -1,6 +1,6 @@ /* run.config* - OPT: -aorai-buchi @PTEST_DIR@/@PTEST_NAME@.promela -aorai-test 1 -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ - OPT: -aorai-buchi @PTEST_DIR@/test_recursion3.promela -aorai-test 1 -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-buchi @PTEST_DIR@/@PTEST_NAME@.promela -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-buchi @PTEST_DIR@/test_recursion3.promela -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ /* Calcul de la longueur cumulee des chaines de caracteres prises en parametre */ diff --git a/src/plugins/aorai/tests/ltl/test_switch2.c b/src/plugins/aorai/tests/ltl/test_switch2.c index f411cec23dcd459cbfe1bdb5d3d33b05ad6e3ee2..2bb7284fbbd78e3c7d6455efbceaac54213338b6 100644 --- a/src/plugins/aorai/tests/ltl/test_switch2.c +++ b/src/plugins/aorai/tests/ltl/test_switch2.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-ltl @PTEST_DIR@/@PTEST_NAME@.ltl -aorai-test 1 -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-ltl @PTEST_DIR@/@PTEST_NAME@.ltl -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ int status=0; diff --git a/src/plugins/aorai/tests/ltl/test_switch3.c b/src/plugins/aorai/tests/ltl/test_switch3.c index 42e5fc6ba9aebb0bf7be62ec776e3a969f250d4a..5d9e8582f493e3d9d10f5343e8eeff8e4897b048 100644 --- a/src/plugins/aorai/tests/ltl/test_switch3.c +++ b/src/plugins/aorai/tests/ltl/test_switch3.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-ltl @PTEST_DIR@/@PTEST_NAME@.ltl -aorai-test 1 -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-ltl @PTEST_DIR@/@PTEST_NAME@.ltl -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ /* Calcul de la longueur cumulee des chaines de caracteres prises en parametre */ diff --git a/src/plugins/aorai/tests/ltl/test_switch3_et_recursion.c b/src/plugins/aorai/tests/ltl/test_switch3_et_recursion.c index 00caa9826bb96e63a099b54204d1e1d5e9c3aeab..352725ef98403e943292dd701851020dd9450331 100644 --- a/src/plugins/aorai/tests/ltl/test_switch3_et_recursion.c +++ b/src/plugins/aorai/tests/ltl/test_switch3_et_recursion.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-ltl @PTEST_DIR@/@PTEST_NAME@.ltl -aorai-test 1 -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-ltl @PTEST_DIR@/@PTEST_NAME@.ltl -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ /* Calcul de la longueur cumulee des chaines de caracteres prises en parametre */ diff --git a/src/plugins/aorai/tests/ltl/test_switch3_if.c b/src/plugins/aorai/tests/ltl/test_switch3_if.c index f6375d4d859a018e4349cbcbdca037d48298de40..93dd122636eb69e79de4ed04781fa4528a261027 100644 --- a/src/plugins/aorai/tests/ltl/test_switch3_if.c +++ b/src/plugins/aorai/tests/ltl/test_switch3_if.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-ltl @PTEST_DIR@/test_switch3.ltl -aorai-test 1 -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-ltl @PTEST_DIR@/test_switch3.ltl -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ /* Calcul de la longueur cumulee des chaines de caracteres prises en parametre */ diff --git a/src/plugins/aorai/tests/ltl/test_switch3_return.c b/src/plugins/aorai/tests/ltl/test_switch3_return.c index a105540b9829ff3d2cdb2a7c12b4f7b056c8ece2..8df70979968ab549179cf70011105ac4083f0001 100644 --- a/src/plugins/aorai/tests/ltl/test_switch3_return.c +++ b/src/plugins/aorai/tests/ltl/test_switch3_return.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-ltl @PTEST_DIR@/test_switch3.ltl -aorai-test 1 -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-ltl @PTEST_DIR@/test_switch3.ltl -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ /* Calcul de la longueur cumulee des chaines de caracteres prises en parametre */ diff --git a/src/plugins/aorai/tests/ya/aorai_ptr_field.i b/src/plugins/aorai/tests/ya/aorai_ptr_field.i index 9f1316be55c1e7c25305f22bdbed66a594434bb9..24c8ffc30a7231b26a8e6febc12d553b1c2a39f3 100644 --- a/src/plugins/aorai/tests/ya/aorai_ptr_field.i +++ b/src/plugins/aorai/tests/ya/aorai_ptr_field.i @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ struct S { int x; }; diff --git a/src/plugins/aorai/tests/ya/assigns.c b/src/plugins/aorai/tests/ya/assigns.c index ce6fe159678db8d14bddb1119d020f3b6362b14b..c760aa1537ec7d120bb213e1eeab4c0df7da9ef0 100644 --- a/src/plugins/aorai/tests/ya/assigns.c +++ b/src/plugins/aorai/tests/ya/assigns.c @@ -1,8 +1,8 @@ /* run.config* - OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ - OPT: -aorai-automata @PTEST_DIR@/assigns_det.ya -aorai-test 1 -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-automata @PTEST_DIR@/assigns_det.ya -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ MODULE: @PTEST_DIR@/name_projects.cmxs - OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -then -print + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -then -print */ int X; diff --git a/src/plugins/aorai/tests/ya/bts1289.i b/src/plugins/aorai/tests/ya/bts1289.i index 2c6c8f9aa59097ab9cd9f8dd9aa63d1ffcf62900..93cf50233c6de580a502d09ec0ebb9e0710a3fd4 100644 --- a/src/plugins/aorai/tests/ya/bts1289.i +++ b/src/plugins/aorai/tests/ya/bts1289.i @@ -1,6 +1,6 @@ /* run.config* - OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -load-module tests/Aorai_test.cmxs -aorai-test 1 -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ - OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@-2.ya -load-module tests/Aorai_test.cmxs -aorai-test 1 -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@-2.ya -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ void a(void) {} diff --git a/src/plugins/aorai/tests/ya/declared_function.i b/src/plugins/aorai/tests/ya/declared_function.i index 53bcdfd71ad5fdf29b39d44acc444dd4a29d5c79..12f50538eb389c40452004dcae442b80e72800c5 100644 --- a/src/plugins/aorai/tests/ya/declared_function.i +++ b/src/plugins/aorai/tests/ya/declared_function.i @@ -1,5 +1,5 @@ /* run.config* -OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ +OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ int f(void); diff --git a/src/plugins/aorai/tests/ya/deterministic.i b/src/plugins/aorai/tests/ya/deterministic.i index b92271127e264c85e2578be4fbdc86a1e7ac8a9e..d892d8913785cf908250be51ee907aea92bd59fe 100644 --- a/src/plugins/aorai/tests/ya/deterministic.i +++ b/src/plugins/aorai/tests/ya/deterministic.i @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ int X; diff --git a/src/plugins/aorai/tests/ya/formals.i b/src/plugins/aorai/tests/ya/formals.i index 4a32df49b67be992c14ceb88e3541d05c638992d..a463e4f7d372e66081bacb8a83c6c1fbc799a62e 100644 --- a/src/plugins/aorai/tests/ya/formals.i +++ b/src/plugins/aorai/tests/ya/formals.i @@ -1,5 +1,5 @@ /* run.config* -OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ +OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ int f(int x) { return x; } diff --git a/src/plugins/aorai/tests/ya/generate_assigns_bts1290.i b/src/plugins/aorai/tests/ya/generate_assigns_bts1290.i index 2e92796ec0655d2ae0977566205fc1072e275a60..d9333d415f6a9e4a266b9b4e4ee0fffb0157aeec 100644 --- a/src/plugins/aorai/tests/ya/generate_assigns_bts1290.i +++ b/src/plugins/aorai/tests/ya/generate_assigns_bts1290.i @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -load-module tests/Aorai_test.cmxs -aorai-test 1 -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ void main(void) { diff --git a/src/plugins/aorai/tests/ya/hoare_seq.i b/src/plugins/aorai/tests/ya/hoare_seq.i index cc7e148477430589b00c142325c5a4baf3a32531..b60ae6082da68af639a7419bd7b8fcc06c1dbfcc 100644 --- a/src/plugins/aorai/tests/ya/hoare_seq.i +++ b/src/plugins/aorai/tests/ya/hoare_seq.i @@ -1,5 +1,5 @@ /* run.config* -OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -aorai-acceptance -load-module tests/Aorai_test -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ +OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-acceptance -load-module tests/Aorai_test -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ void f(void) { } diff --git a/src/plugins/aorai/tests/ya/incorrect.i b/src/plugins/aorai/tests/ya/incorrect.i index fae082d3120aa4fd80c2354bcc318c71e43a689d..01f702808601302f85949d38f64b69b4f79c8ab7 100644 --- a/src/plugins/aorai/tests/ya/incorrect.i +++ b/src/plugins/aorai/tests/ya/incorrect.i @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ int f(void); diff --git a/src/plugins/aorai/tests/ya/loop_bts1050.i b/src/plugins/aorai/tests/ya/loop_bts1050.i index fdec741b7b32ef14be4756afd8847a9ac21ccb27..86fe369e9f793b991fd0e3f4510b1ea5111b1c55 100644 --- a/src/plugins/aorai/tests/ya/loop_bts1050.i +++ b/src/plugins/aorai/tests/ya/loop_bts1050.i @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -load-module tests/Aorai_test.cmxs -aorai-acceptance -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -load-module tests/Aorai_test.cmxs -aorai-acceptance -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ void f(){}; diff --git a/src/plugins/aorai/tests/ya/metavariables-incompatible.i b/src/plugins/aorai/tests/ya/metavariables-incompatible.i index 26744167705ea93e49e38818c96dcb32d17b623b..a32cefe9e95a077a549e747e0231200ad48c4a5b 100644 --- a/src/plugins/aorai/tests/ya/metavariables-incompatible.i +++ b/src/plugins/aorai/tests/ya/metavariables-incompatible.i @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ void main(void) {} diff --git a/src/plugins/aorai/tests/ya/metavariables-right.i b/src/plugins/aorai/tests/ya/metavariables-right.i index cff3994c1017f532d1d44db092abb5be27d1dcb8..9d88e67323f1579b8cb9ff96e0713ab2652fbb67 100644 --- a/src/plugins/aorai/tests/ya/metavariables-right.i +++ b/src/plugins/aorai/tests/ya/metavariables-right.i @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ void f(int x) {} diff --git a/src/plugins/aorai/tests/ya/metavariables-wrong.i b/src/plugins/aorai/tests/ya/metavariables-wrong.i index 09ea4b6c4bcfc15e83ef2c2a676be84c00ca294b..a0542d200213bae00dd447ca74e59ef7a0c15f08 100644 --- a/src/plugins/aorai/tests/ya/metavariables-wrong.i +++ b/src/plugins/aorai/tests/ya/metavariables-wrong.i @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ void f(int x) {} diff --git a/src/plugins/aorai/tests/ya/monostate.i b/src/plugins/aorai/tests/ya/monostate.i index 9dade69c092b118f482686eaa918ee2e878a692c..0d72d9a431caaf166b2bcdbf4cdbceca3e231244 100644 --- a/src/plugins/aorai/tests/ya/monostate.i +++ b/src/plugins/aorai/tests/ya/monostate.i @@ -1,5 +1,5 @@ /* run.config -OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ +OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ void f(void) {} diff --git a/src/plugins/aorai/tests/ya/not_prm.i b/src/plugins/aorai/tests/ya/not_prm.i index d96e123d6e6a367565597f0cce0df942b23a2ba5..8b5c4281608d86fbed207d2f056fcb22f6513953 100644 --- a/src/plugins/aorai/tests/ya/not_prm.i +++ b/src/plugins/aorai/tests/ya/not_prm.i @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -aorai-acceptance -load-module tests/Aorai_test -main f -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-acceptance -load-module tests/Aorai_test -main f -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ int f(int x) { diff --git a/src/plugins/aorai/tests/ya/oracle/aorai_ptr_field.res.oracle b/src/plugins/aorai/tests/ya/oracle/aorai_ptr_field.res.oracle index b9750505021bd05f5fc1a55c85159b8c653a0ff2..d8cb4fbaee53d3fb52af093090ef0d12c43002b7 100644 --- a/src/plugins/aorai/tests/ya/oracle/aorai_ptr_field.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/aorai_ptr_field.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ya/aorai_ptr_field.i (no preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_aorai_ptr_field_0.i (no preprocessing) /* Generated by Frama-C */ struct S { @@ -12,8 +11,8 @@ enum aorai_OpStatusList { aorai_Terminated = 1, aorai_Called = 0 }; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ ghost int S0 = 1; */ /*@ ghost int S1 = 0; */ /*@ ghost @@ -38,6 +37,7 @@ enum aorai_OpStatusList { { int S0_tmp; int S1_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_main; S0_tmp = S0; @@ -73,6 +73,7 @@ enum aorai_OpStatusList { { int S0_tmp; int S1_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_main; S0_tmp = S0; diff --git a/src/plugins/aorai/tests/ya/oracle/assigns.0.res.oracle b/src/plugins/aorai/tests/ya/oracle/assigns.0.res.oracle index 09b37de9a73706afe84ec0fa380d5be28c09a3a8..a0d1e8e9805cb518ef7dd64fe057fdc454603cd6 100644 --- a/src/plugins/aorai/tests/ya/oracle/assigns.0.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/assigns.0.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ya/assigns.c (with preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_assigns_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { @@ -11,8 +10,8 @@ enum aorai_OpStatusList { aorai_Called = 0 }; int X; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ ghost int S1 = 1; */ /*@ ghost int S2 = 0; */ /*@ ghost int S_in_f = 0; */ @@ -53,6 +52,7 @@ int X; int S_in_f_tmp; int Sf_tmp; int in_main_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_f; S1_tmp = S1; @@ -110,6 +110,7 @@ int X; int S_in_f_tmp; int Sf_tmp; int in_main_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_f; S1_tmp = S1; @@ -182,6 +183,7 @@ void f(void) int S_in_f_tmp; int Sf_tmp; int in_main_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_main; S1_tmp = S1; @@ -239,6 +241,7 @@ void f(void) int S_in_f_tmp; int Sf_tmp; int in_main_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_main; S1_tmp = S1; diff --git a/src/plugins/aorai/tests/ya/oracle/assigns.1.res.oracle b/src/plugins/aorai/tests/ya/oracle/assigns.1.res.oracle index fd7526444df55abd2c128af76809b32c0a411955..5b81ca1fbe6f2c2ac6b2c327455daeb0f91c696e 100644 --- a/src/plugins/aorai/tests/ya/oracle/assigns.1.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/assigns.1.res.oracle @@ -1,14 +1,13 @@ [kernel] Parsing tests/ya/assigns.c (with preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_assigns_1.i (no preprocessing) /* Generated by Frama-C */ enum aorai_States { - aorai_reject_state = -2, S1 = 0, S2 = 1, S_in_f = 2, Sf = 3, - in_main = 4 + aorai_reject = 4, + in_main = 5 }; enum aorai_ListOper { op_f = 1, @@ -20,6 +19,8 @@ enum aorai_OpStatusList { }; /*@ check lemma in_main_deterministic_trans{L}: \true; */ +/*@ check lemma aorai_reject_deterministic_trans{L}: \true; + */ /*@ check lemma Sf_deterministic_trans{L}: \true; */ /*@ check lemma S_in_f_deterministic_trans{L}: \true; @@ -29,8 +30,8 @@ enum aorai_OpStatusList { /*@ check lemma S1_deterministic_trans{L}: \true; */ int X; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ ghost int aorai_CurStates = S1; */ /*@ ghost /@ requires aorai_CurStates ≡ Sf; @@ -55,14 +56,19 @@ int X; behavior buch_state_Sf_out: ensures aorai_CurStates ≢ Sf; + behavior buch_state_aorai_reject_out: + ensures aorai_CurStates ≢ aorai_reject; + behavior buch_state_in_main_out: ensures aorai_CurStates ≢ in_main; @/ void f_pre_func(void) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_f; if (3 == aorai_CurStates) aorai_CurStates = S_in_f; + else aorai_CurStates = aorai_reject; return; } @@ -86,6 +92,9 @@ int X; behavior buch_state_Sf_out: ensures aorai_CurStates ≢ Sf; + behavior buch_state_aorai_reject_out: + ensures aorai_CurStates ≢ aorai_reject; + behavior buch_state_in_main_in: assumes aorai_CurStates ≡ S_in_f; ensures aorai_CurStates ≡ in_main; @@ -96,9 +105,11 @@ int X; @/ void f_post_func(void) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_f; if (2 == aorai_CurStates) aorai_CurStates = in_main; + else aorai_CurStates = aorai_reject; return; } @@ -140,14 +151,19 @@ void f(void) assumes aorai_CurStates ≢ S1; ensures aorai_CurStates ≢ Sf; + behavior buch_state_aorai_reject_out: + ensures aorai_CurStates ≢ aorai_reject; + behavior buch_state_in_main_out: ensures aorai_CurStates ≢ in_main; @/ void main_pre_func(void) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_main; if (0 == aorai_CurStates) aorai_CurStates = Sf; + else aorai_CurStates = aorai_reject; return; } @@ -176,14 +192,19 @@ void f(void) behavior buch_state_Sf_out: ensures aorai_CurStates ≢ Sf; + behavior buch_state_aorai_reject_out: + ensures aorai_CurStates ≢ aorai_reject; + behavior buch_state_in_main_out: ensures aorai_CurStates ≢ in_main; @/ void main_post_func(int res) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_main; - if (4 == aorai_CurStates) aorai_CurStates = S2; + if (5 == aorai_CurStates) aorai_CurStates = S2; + else aorai_CurStates = aorai_reject; return; } diff --git a/src/plugins/aorai/tests/ya/oracle/assigns.2.res.oracle b/src/plugins/aorai/tests/ya/oracle/assigns.2.res.oracle index f5a60a3aac12f9e6f74b645b97c97125445d9996..5a761e8ca86775a91718ded77e107d61a8a15aa6 100644 --- a/src/plugins/aorai/tests/ya/oracle/assigns.2.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/assigns.2.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ya/assigns.c (with preprocessing) -[aorai] Welcome to the Aorai plugin /* Generated by Frama-C */ int X; void f(void) diff --git a/src/plugins/aorai/tests/ya/oracle/bts1289.0.res.oracle b/src/plugins/aorai/tests/ya/oracle/bts1289.0.res.oracle index 74d55944211b288cd559e0c0f19e44b01dbcbbc6..15f90358d6d80d076d3bbc1d5037100798bf47c2 100644 --- a/src/plugins/aorai/tests/ya/oracle/bts1289.0.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/bts1289.0.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ya/bts1289.i (no preprocessing) -[aorai] Welcome to the Aorai plugin [aorai] Warning: Call to main does not follow automaton's specification. This path is assumed to be dead [kernel] Parsing TMPDIR/aorai_bts1289_0.i (no preprocessing) /* Generated by Frama-C */ @@ -11,8 +10,8 @@ enum aorai_OpStatusList { aorai_Terminated = 1, aorai_Called = 0 }; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ ghost int S = 0; */ /*@ ghost /@ requires \false; @@ -26,6 +25,7 @@ enum aorai_OpStatusList { void a_pre_func(void) { int S_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_a; S_tmp = S; @@ -48,6 +48,7 @@ enum aorai_OpStatusList { void a_post_func(void) { int S_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_a; S_tmp = S; @@ -81,6 +82,7 @@ void a(void) void main_pre_func(void) { int S_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_main; S_tmp = S; @@ -103,6 +105,7 @@ void a(void) void main_post_func(void) { int S_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_main; S_tmp = S; diff --git a/src/plugins/aorai/tests/ya/oracle/bts1289.1.res.oracle b/src/plugins/aorai/tests/ya/oracle/bts1289.1.res.oracle index adebb6ca55ae7558e8d58bd9d45d024806c68784..6fb3035c21ae0f523e25c9b83807cdce7675ee74 100644 --- a/src/plugins/aorai/tests/ya/oracle/bts1289.1.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/bts1289.1.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ya/bts1289.i (no preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_bts1289_1.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { @@ -10,8 +9,8 @@ enum aorai_OpStatusList { aorai_Terminated = 1, aorai_Called = 0 }; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ ghost int S = 0; */ /*@ ghost int T = 0; */ /*@ ghost int aorai_intermediate_state = 0; */ @@ -58,6 +57,7 @@ enum aorai_OpStatusList { int aorai_intermediate_state_tmp; int aorai_intermediate_state_0_tmp; int init_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_a; S_tmp = S; @@ -123,6 +123,7 @@ enum aorai_OpStatusList { int aorai_intermediate_state_tmp; int aorai_intermediate_state_0_tmp; int init_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_a; S_tmp = S; @@ -219,6 +220,7 @@ void a(void) int aorai_intermediate_state_tmp; int aorai_intermediate_state_0_tmp; int init_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_main; S_tmp = S; @@ -277,6 +279,7 @@ void a(void) int aorai_intermediate_state_tmp; int aorai_intermediate_state_0_tmp; int init_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_main; S_tmp = S; diff --git a/src/plugins/aorai/tests/ya/oracle/declared_function.res.oracle b/src/plugins/aorai/tests/ya/oracle/declared_function.res.oracle index 7141a6e19585342e2f1f9571efaa71e68c2ba704..0b0ae22a40090a44b7c3bceaba53c7d1d945881e 100644 --- a/src/plugins/aorai/tests/ya/oracle/declared_function.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/declared_function.res.oracle @@ -1,10 +1,9 @@ [kernel] Parsing tests/ya/declared_function.i (no preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_declared_function_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_States { - aorai_reject_state = -2, - I = 0 + I = 0, + aorai_reject = 1 }; enum aorai_ListOper { op_f = 1, @@ -14,10 +13,12 @@ enum aorai_OpStatusList { aorai_Terminated = 1, aorai_Called = 0 }; +/*@ check lemma aorai_reject_deterministic_trans{L}: \true; + */ int f(void); -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ check lemma I_deterministic_trans{L}: (∀ int __retres_f; @@ -58,12 +59,17 @@ check lemma I_deterministic_trans{L}: behavior buch_state_I_out: assumes aorai_CurStates ≢ I; ensures aorai_CurStates ≢ I; + + behavior buch_state_aorai_reject_out: + ensures aorai_CurStates ≢ aorai_reject; @/ void main_pre_func(void) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_main; if (0 == aorai_CurStates) aorai_CurStates = I; + else aorai_CurStates = aorai_reject; return; } @@ -82,12 +88,17 @@ check lemma I_deterministic_trans{L}: behavior buch_state_I_out: assumes aorai_CurStates ≢ I; ensures aorai_CurStates ≢ I; + + behavior buch_state_aorai_reject_out: + ensures aorai_CurStates ≢ aorai_reject; @/ void main_post_func(void) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_main; if (0 == aorai_CurStates) aorai_CurStates = I; + else aorai_CurStates = aorai_reject; return; } diff --git a/src/plugins/aorai/tests/ya/oracle/deterministic.res.oracle b/src/plugins/aorai/tests/ya/oracle/deterministic.res.oracle index 6b9c9095bc9917c070ddd1dbf2ec9d73de8d75c4..7982cfe7c164fba8bf8e9d1f82290612f4c4ac4c 100644 --- a/src/plugins/aorai/tests/ya/oracle/deterministic.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/deterministic.res.oracle @@ -1,9 +1,7 @@ [kernel] Parsing tests/ya/deterministic.i (no preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_deterministic_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_States { - aorai_reject_state = -2, S0 = 0, S1 = 1, S2 = 2, @@ -11,7 +9,8 @@ enum aorai_States { S4 = 4, S5 = 5, Sf = 6, - Si = 7 + Si = 7, + aorai_reject = 8 }; enum aorai_ListOper { op_f = 3, @@ -23,6 +22,8 @@ enum aorai_OpStatusList { aorai_Terminated = 1, aorai_Called = 0 }; +/*@ check lemma aorai_reject_deterministic_trans{L}: \true; + */ /*@ check lemma Si_deterministic_trans{L}: \true; */ /*@ check lemma Sf_deterministic_trans{L}: \true; @@ -35,8 +36,8 @@ enum aorai_OpStatusList { */ int X; int Y; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ check lemma S3_deterministic_trans{L}: ∀ int x; @@ -102,14 +103,19 @@ check lemma S0_deterministic_trans{L}: behavior buch_state_Si_out: ensures aorai_CurStates ≢ Si; + + behavior buch_state_aorai_reject_out: + ensures aorai_CurStates ≢ aorai_reject; @/ void g_pre_func(int x) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_g; if (3 == aorai_CurStates && x == 4) aorai_CurStates = S4; else if (3 == aorai_CurStates && x == 5) aorai_CurStates = S5; + else aorai_CurStates = aorai_reject; return; } @@ -154,14 +160,19 @@ check lemma S0_deterministic_trans{L}: behavior buch_state_Si_out: ensures aorai_CurStates ≢ Si; + + behavior buch_state_aorai_reject_out: + ensures aorai_CurStates ≢ aorai_reject; @/ void g_post_func(void) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_g; if (5 == aorai_CurStates) aorai_CurStates = S1; else if (4 == aorai_CurStates) aorai_CurStates = S3; + else aorai_CurStates = aorai_reject; return; } @@ -221,12 +232,17 @@ void g(int x) behavior buch_state_Si_out: ensures aorai_CurStates ≢ Si; + + behavior buch_state_aorai_reject_out: + ensures aorai_CurStates ≢ aorai_reject; @/ void f_pre_func(int x) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_f; if (1 == aorai_CurStates && x == 4) aorai_CurStates = S3; + else aorai_CurStates = aorai_reject; return; } @@ -267,12 +283,17 @@ void g(int x) behavior buch_state_Si_out: ensures aorai_CurStates ≢ Si; + + behavior buch_state_aorai_reject_out: + ensures aorai_CurStates ≢ aorai_reject; @/ void f_post_func(int res) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_f; if (1 == aorai_CurStates && (res == 0 && X == 5)) aorai_CurStates = S2; + else aorai_CurStates = aorai_reject; return; } @@ -338,14 +359,19 @@ int f(int x) behavior buch_state_Si_out: ensures aorai_CurStates ≢ Si; + + behavior buch_state_aorai_reject_out: + ensures aorai_CurStates ≢ aorai_reject; @/ void real_main_pre_func(int c) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_real_main; if (0 == aorai_CurStates && c != 0) aorai_CurStates = S1; else if (0 == aorai_CurStates && c == 0) aorai_CurStates = S2; + else aorai_CurStates = aorai_reject; return; } @@ -385,12 +411,17 @@ int f(int x) behavior buch_state_Si_out: ensures aorai_CurStates ≢ Si; + + behavior buch_state_aorai_reject_out: + ensures aorai_CurStates ≢ aorai_reject; @/ void real_main_post_func(int res) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_real_main; if (2 == aorai_CurStates) aorai_CurStates = Sf; + else aorai_CurStates = aorai_reject; return; } @@ -446,12 +477,17 @@ int real_main(int c) behavior buch_state_Si_out: ensures aorai_CurStates ≢ Si; + + behavior buch_state_aorai_reject_out: + ensures aorai_CurStates ≢ aorai_reject; @/ void main_pre_func(int c) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_main; if (7 == aorai_CurStates) aorai_CurStates = S0; + else aorai_CurStates = aorai_reject; return; } @@ -491,12 +527,17 @@ int real_main(int c) behavior buch_state_Si_out: ensures aorai_CurStates ≢ Si; + + behavior buch_state_aorai_reject_out: + ensures aorai_CurStates ≢ aorai_reject; @/ void main_post_func(int res) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_main; if (6 == aorai_CurStates) aorai_CurStates = Sf; + else aorai_CurStates = aorai_reject; return; } diff --git a/src/plugins/aorai/tests/ya/oracle/formals.res.oracle b/src/plugins/aorai/tests/ya/oracle/formals.res.oracle index 52323f131b74b603bc960c19408f6ea80930453f..2d0f4d7bd8a2b0705c729447d09852dccb1f85e3 100644 --- a/src/plugins/aorai/tests/ya/oracle/formals.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/formals.res.oracle @@ -1,9 +1,7 @@ [kernel] Parsing tests/ya/formals.i (no preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_formals_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_States { - aorai_reject_state = -2, OK = 0, aorai_intermediate_state = 1, aorai_intermediate_state_0 = 2, @@ -28,8 +26,8 @@ enum aorai_OpStatusList { */ /*@ check lemma OK_deterministic_trans{L}: \true; */ -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ check lemma main_0_deterministic_trans{L}: ∀ int x; @@ -130,6 +128,7 @@ check lemma aorai_intermediate_state_deterministic_trans{L}: @/ void f_pre_func(int x) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_f; if (7 == aorai_CurStates && x == 1) { @@ -141,6 +140,7 @@ check lemma aorai_intermediate_state_deterministic_trans{L}: aorai_CurStates = aorai_intermediate_state_2; aorai_x_0 = x; } + else aorai_CurStates = aorai_reject; return; } @@ -211,6 +211,7 @@ check lemma aorai_intermediate_state_deterministic_trans{L}: @/ void f_post_func(int res) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_f; if (4 == aorai_CurStates && aorai_x_0 == 3) aorai_CurStates = OK; @@ -220,6 +221,7 @@ check lemma aorai_intermediate_state_deterministic_trans{L}: if (4 == aorai_CurStates && aorai_x_0 != 3) aorai_CurStates = aorai_reject; else if (1 == aorai_CurStates && aorai_x != 1) aorai_CurStates = aorai_reject; + else aorai_CurStates = aorai_reject; return; } @@ -343,6 +345,7 @@ int f(int x) @/ void g_pre_func(int y) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_g; if (0 == aorai_CurStates) aorai_CurStates = OK; @@ -353,6 +356,7 @@ int f(int x) } else if (5 == aorai_CurStates) aorai_CurStates = aorai_reject; + else aorai_CurStates = aorai_reject; return; } @@ -415,6 +419,7 @@ int f(int x) @/ void g_post_func(int res) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_g; if (3 == aorai_CurStates && aorai_y == 2) aorai_CurStates = OK; @@ -424,6 +429,7 @@ int f(int x) if (5 == aorai_CurStates) aorai_CurStates = aorai_reject; else if (3 == aorai_CurStates && aorai_y != 2) aorai_CurStates = aorai_reject; + else aorai_CurStates = aorai_reject; return; } @@ -502,9 +508,11 @@ int g(int y) @/ void main_pre_func(void) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_main; if (6 == aorai_CurStates) aorai_CurStates = main_0; + else aorai_CurStates = aorai_reject; return; } @@ -552,11 +560,13 @@ int g(int y) @/ void main_post_func(int res) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_main; if (0 == aorai_CurStates) aorai_CurStates = OK; else if (5 == aorai_CurStates) aorai_CurStates = aorai_reject; + else aorai_CurStates = aorai_reject; return; } diff --git a/src/plugins/aorai/tests/ya/oracle/generate_assigns_bts1290.res.oracle b/src/plugins/aorai/tests/ya/oracle/generate_assigns_bts1290.res.oracle index 6d8dc5b0067777a8f5ab853f8611e02a22d4925e..6dba7900323402dcd732a3b81604b6ece4b4f1cb 100644 --- a/src/plugins/aorai/tests/ya/oracle/generate_assigns_bts1290.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/generate_assigns_bts1290.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ya/generate_assigns_bts1290.i (no preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_generate_assigns_bts1290_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { @@ -9,8 +8,8 @@ enum aorai_OpStatusList { aorai_Terminated = 1, aorai_Called = 0 }; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ ghost int S = 1; */ /*@ ghost /@ requires 1 ≡ S; @@ -29,6 +28,7 @@ enum aorai_OpStatusList { void main_pre_func(void) { int S_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_main; S_tmp = S; @@ -56,6 +56,7 @@ enum aorai_OpStatusList { void main_post_func(void) { int S_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_main; S_tmp = S; diff --git a/src/plugins/aorai/tests/ya/oracle/hoare_seq.res.oracle b/src/plugins/aorai/tests/ya/oracle/hoare_seq.res.oracle index ea603b7e865bbc3a1982b4512166a5ed8cf48eb7..29ffb1ff422b6b31e10952122c05b1f1ff1d650c 100644 --- a/src/plugins/aorai/tests/ya/oracle/hoare_seq.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/hoare_seq.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ya/hoare_seq.i (no preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_hoare_seq_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { @@ -10,8 +9,8 @@ enum aorai_OpStatusList { aorai_Terminated = 1, aorai_Called = 0 }; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ ghost int S0 = 1; */ /*@ ghost int Sf = 0; */ /*@ ghost int aorai_intermediate_state = 0; */ @@ -71,6 +70,7 @@ enum aorai_OpStatusList { int aorai_intermediate_state_1_tmp; int aorai_intermediate_state_2_tmp; int aorai_reject_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_f; S0_tmp = S0; @@ -153,6 +153,7 @@ enum aorai_OpStatusList { int aorai_intermediate_state_1_tmp; int aorai_intermediate_state_2_tmp; int aorai_reject_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_f; S0_tmp = S0; @@ -303,6 +304,7 @@ int main_bhv_bhv(int c); */ int aorai_intermediate_state_1_tmp; int aorai_intermediate_state_2_tmp; int aorai_reject_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_main; S0_tmp = S0; @@ -397,6 +399,7 @@ int main_bhv_bhv(int c); */ int aorai_intermediate_state_1_tmp; int aorai_intermediate_state_2_tmp; int aorai_reject_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_main; S0_tmp = S0; diff --git a/src/plugins/aorai/tests/ya/oracle/incorrect.res.oracle b/src/plugins/aorai/tests/ya/oracle/incorrect.res.oracle index ccfb249eba5eb4f3b759bba09f44a869117caa21..7c674204cb3013c0438b059705c8952bbd3c3998 100644 --- a/src/plugins/aorai/tests/ya/oracle/incorrect.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/incorrect.res.oracle @@ -1,11 +1,10 @@ [kernel] Parsing tests/ya/incorrect.i (no preprocessing) -[aorai] Welcome to the Aorai plugin [aorai] Warning: Call to main does not follow automaton's specification. This path is assumed to be dead [kernel] Parsing TMPDIR/aorai_incorrect_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_States { - aorai_reject_state = -2, - s0 = 0 + aorai_reject = 0, + s0 = 1 }; enum aorai_ListOper { op_f = 1, @@ -17,10 +16,12 @@ enum aorai_OpStatusList { }; /*@ check lemma s0_deterministic_trans{L}: \true; */ +/*@ check lemma aorai_reject_deterministic_trans{L}: \true; + */ int f(void); -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ ghost int aorai_CurStates = s0; */ /*@ ghost /@ requires \false; @@ -28,13 +29,18 @@ int f(void); ensures aorai_CurOperation ≡ op_main; assigns aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates; + behavior buch_state_aorai_reject_out: + ensures aorai_CurStates ≢ aorai_reject; + behavior buch_state_s0_out: ensures aorai_CurStates ≢ s0; @/ void main_pre_func(void) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_main; + aorai_CurStates = aorai_reject; return; } @@ -46,13 +52,18 @@ int f(void); ensures aorai_CurOperation ≡ op_main; assigns aorai_CurOpStatus, aorai_CurOperation, aorai_CurStates; + behavior buch_state_aorai_reject_out: + ensures aorai_CurStates ≢ aorai_reject; + behavior buch_state_s0_out: ensures aorai_CurStates ≢ s0; @/ void main_post_func(int res) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_main; + aorai_CurStates = aorai_reject; return; } diff --git a/src/plugins/aorai/tests/ya/oracle/loop_bts1050.res.oracle b/src/plugins/aorai/tests/ya/oracle/loop_bts1050.res.oracle index ccc98a41d83d4339cb70a182bed8396973f9d901..6569b67175a8280471a8c3cb305840c14053e5e4 100644 --- a/src/plugins/aorai/tests/ya/oracle/loop_bts1050.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/loop_bts1050.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ya/loop_bts1050.i (no preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_loop_bts1050_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { @@ -11,8 +10,8 @@ enum aorai_OpStatusList { aorai_Terminated = 1, aorai_Called = 0 }; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ ghost int S0 = 1; */ /*@ ghost int Sf = 0; */ /*@ ghost int aorai_intermediate_state = 0; */ @@ -84,6 +83,7 @@ enum aorai_OpStatusList { int aorai_intermediate_state_1_tmp; int aorai_intermediate_state_2_tmp; int aorai_intermediate_state_3_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_f; S0_tmp = S0; @@ -164,6 +164,7 @@ enum aorai_OpStatusList { int aorai_intermediate_state_1_tmp; int aorai_intermediate_state_2_tmp; int aorai_intermediate_state_3_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_f; S0_tmp = S0; @@ -274,6 +275,7 @@ void f(void) int aorai_intermediate_state_1_tmp; int aorai_intermediate_state_2_tmp; int aorai_intermediate_state_3_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_g; S0_tmp = S0; @@ -351,6 +353,7 @@ void f(void) int aorai_intermediate_state_1_tmp; int aorai_intermediate_state_2_tmp; int aorai_intermediate_state_3_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_g; S0_tmp = S0; @@ -447,6 +450,7 @@ void g(void) int aorai_intermediate_state_1_tmp; int aorai_intermediate_state_2_tmp; int aorai_intermediate_state_3_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_main; S0_tmp = S0; @@ -525,6 +529,7 @@ void g(void) int aorai_intermediate_state_1_tmp; int aorai_intermediate_state_2_tmp; int aorai_intermediate_state_3_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_main; S0_tmp = S0; diff --git a/src/plugins/aorai/tests/ya/oracle/metavariables-incompatible.res.oracle b/src/plugins/aorai/tests/ya/oracle/metavariables-incompatible.res.oracle index 57c2d7eed1ca61046277d1cbf5d005a9fde10a52..a682bee8a270311ec22d7a3b33999a452ac306bf 100644 --- a/src/plugins/aorai/tests/ya/oracle/metavariables-incompatible.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/metavariables-incompatible.res.oracle @@ -1,4 +1,3 @@ [kernel] Parsing tests/ya/metavariables-incompatible.i (no preprocessing) -[aorai] Welcome to the Aorai plugin -[aorai] User Error: The use of metavariables is incompatible with non-deterministic automata, such as automa using extended transitions. +[aorai] User Error: The use of metavariables is incompatible with non-deterministic automata, such as automata using extended transitions. [kernel] Plug-in aorai aborted: invalid user input. diff --git a/src/plugins/aorai/tests/ya/oracle/metavariables-right.res.oracle b/src/plugins/aorai/tests/ya/oracle/metavariables-right.res.oracle index 39843d1a28ef389cbcc34ab6095bff3f80d0ec8a..1ad02912fd111f3df968455278a5dfbb2ae8e8f7 100644 --- a/src/plugins/aorai/tests/ya/oracle/metavariables-right.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/metavariables-right.res.oracle @@ -1,18 +1,17 @@ [kernel] Parsing tests/ya/metavariables-right.i (no preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_metavariables-right_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_States { - aorai_reject_state = -2, a = 0, - b = 1, - c = 2, - d = 3, - e = 4, - f_0 = 5, - g_0 = 6, - h_0 = 7, - i_0 = 8 + aorai_reject = 1, + b = 2, + c = 3, + d = 4, + e = 5, + f_0 = 6, + g_0 = 7, + h_0 = 8, + i_0 = 9 }; enum aorai_ListOper { op_f = 4, @@ -37,10 +36,12 @@ enum aorai_OpStatusList { */ /*@ check lemma c_deterministic_trans{L}: \true; */ +/*@ check lemma aorai_reject_deterministic_trans{L}: \true; + */ /*@ check lemma a_deterministic_trans{L}: \true; */ -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ check lemma b_deterministic_trans{L}: ¬(\at(aorai_CurOperation,L) ≡ op_g ∧ @@ -68,6 +69,9 @@ check lemma e_deterministic_trans{L}: behavior buch_state_a_out: ensures aorai_CurStates ≢ a; + behavior buch_state_aorai_reject_out: + ensures aorai_CurStates ≢ aorai_reject; + behavior buch_state_b_out: ensures aorai_CurStates ≢ b; @@ -109,13 +113,15 @@ check lemma e_deterministic_trans{L}: @/ void f_pre_func(int x) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_f; - if (1 == aorai_CurStates) { + if (2 == aorai_CurStates) { aorai_CurStates = c; aorai_x = x; aorai_y = aorai_x; } + else aorai_CurStates = aorai_reject; return; } @@ -130,6 +136,9 @@ check lemma e_deterministic_trans{L}: behavior buch_state_a_out: ensures aorai_CurStates ≢ a; + behavior buch_state_aorai_reject_out: + ensures aorai_CurStates ≢ aorai_reject; + behavior buch_state_b_out: ensures aorai_CurStates ≢ b; @@ -161,9 +170,11 @@ check lemma e_deterministic_trans{L}: @/ void f_post_func(void) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_f; - if (2 == aorai_CurStates) aorai_CurStates = e; + if (3 == aorai_CurStates) aorai_CurStates = e; + else aorai_CurStates = aorai_reject; return; } @@ -196,6 +207,9 @@ void f(int x) behavior buch_state_a_out: ensures aorai_CurStates ≢ a; + behavior buch_state_aorai_reject_out: + ensures aorai_CurStates ≢ aorai_reject; + behavior buch_state_b_out: ensures aorai_CurStates ≢ b; @@ -227,9 +241,11 @@ void f(int x) @/ void g_pre_func(void) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_g; - if (1 == aorai_CurStates) aorai_CurStates = d; + if (2 == aorai_CurStates) aorai_CurStates = d; + else aorai_CurStates = aorai_reject; return; } @@ -244,6 +260,9 @@ void f(int x) behavior buch_state_a_out: ensures aorai_CurStates ≢ a; + behavior buch_state_aorai_reject_out: + ensures aorai_CurStates ≢ aorai_reject; + behavior buch_state_b_out: ensures aorai_CurStates ≢ b; @@ -275,9 +294,11 @@ void f(int x) @/ void g_post_func(void) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_g; - if (3 == aorai_CurStates) aorai_CurStates = g_0; + if (4 == aorai_CurStates) aorai_CurStates = g_0; + else aorai_CurStates = aorai_reject; return; } @@ -305,6 +326,9 @@ void g(void) behavior buch_state_a_out: ensures aorai_CurStates ≢ a; + behavior buch_state_aorai_reject_out: + ensures aorai_CurStates ≢ aorai_reject; + behavior buch_state_b_out: ensures aorai_CurStates ≢ b; @@ -336,9 +360,11 @@ void g(void) @/ void h_pre_func(int x) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_h; - if (4 == aorai_CurStates && aorai_x > 0) aorai_CurStates = f_0; + if (5 == aorai_CurStates && aorai_x > 0) aorai_CurStates = f_0; + else aorai_CurStates = aorai_reject; return; } @@ -353,6 +379,9 @@ void g(void) behavior buch_state_a_out: ensures aorai_CurStates ≢ a; + behavior buch_state_aorai_reject_out: + ensures aorai_CurStates ≢ aorai_reject; + behavior buch_state_b_out: ensures aorai_CurStates ≢ b; @@ -384,9 +413,11 @@ void g(void) @/ void h_post_func(void) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_h; - if (5 == aorai_CurStates) aorai_CurStates = g_0; + if (6 == aorai_CurStates) aorai_CurStates = g_0; + else aorai_CurStates = aorai_reject; return; } @@ -414,6 +445,9 @@ void h(int x) behavior buch_state_a_out: ensures aorai_CurStates ≢ a; + behavior buch_state_aorai_reject_out: + ensures aorai_CurStates ≢ aorai_reject; + behavior buch_state_b_out: ensures aorai_CurStates ≢ b; @@ -445,9 +479,11 @@ void h(int x) @/ void i_pre_func(void) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_i; - if (6 == aorai_CurStates) aorai_CurStates = h_0; + if (7 == aorai_CurStates) aorai_CurStates = h_0; + else aorai_CurStates = aorai_reject; return; } @@ -463,6 +499,9 @@ void h(int x) behavior buch_state_a_out: ensures aorai_CurStates ≢ a; + behavior buch_state_aorai_reject_out: + ensures aorai_CurStates ≢ aorai_reject; + behavior buch_state_b_out: ensures aorai_CurStates ≢ b; @@ -504,13 +543,15 @@ void h(int x) @/ void i_post_func(void) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_i; - if (7 == aorai_CurStates) { + if (8 == aorai_CurStates) { aorai_CurStates = e; aorai_y = 0; aorai_x = 1; } + else aorai_CurStates = aorai_reject; return; } @@ -543,6 +584,9 @@ void i(void) behavior buch_state_a_out: ensures aorai_CurStates ≢ a; + behavior buch_state_aorai_reject_out: + ensures aorai_CurStates ≢ aorai_reject; + behavior buch_state_b_in: assumes aorai_CurStates ≡ a; ensures aorai_CurStates ≡ b; @@ -574,9 +618,11 @@ void i(void) @/ void main_pre_func(int t) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_main; if (0 == aorai_CurStates) aorai_CurStates = b; + else aorai_CurStates = aorai_reject; return; } @@ -591,6 +637,9 @@ void i(void) behavior buch_state_a_out: ensures aorai_CurStates ≢ a; + behavior buch_state_aorai_reject_out: + ensures aorai_CurStates ≢ aorai_reject; + behavior buch_state_b_out: ensures aorai_CurStates ≢ b; @@ -622,9 +671,11 @@ void i(void) @/ void main_post_func(void) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_main; - if (4 == aorai_CurStates) aorai_CurStates = i_0; + if (5 == aorai_CurStates) aorai_CurStates = i_0; + else aorai_CurStates = aorai_reject; return; } @@ -654,6 +705,7 @@ void main(int t) /*@ ghost aorai_Loop_Init_15 = 1; */ aorai_loop_15: /*@ loop invariant Aorai: aorai_CurStates ≢ a; + loop invariant Aorai: aorai_CurStates ≢ aorai_reject; loop invariant Aorai: aorai_CurStates ≢ b; loop invariant Aorai: aorai_CurStates ≢ c; loop invariant Aorai: aorai_CurStates ≢ d; diff --git a/src/plugins/aorai/tests/ya/oracle/metavariables-wrong.res.oracle b/src/plugins/aorai/tests/ya/oracle/metavariables-wrong.res.oracle index 44c1487fcf7693e627a38f17cea95e7cd8e7b492..7aca51a51b2a805049c34693029c51f4dbd8a369 100644 --- a/src/plugins/aorai/tests/ya/oracle/metavariables-wrong.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/metavariables-wrong.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ya/metavariables-wrong.i (no preprocessing) -[aorai] Welcome to the Aorai plugin [aorai] User Error: The metavariables aorai_x may not be initialized before the transition from e to f_0: { (Call(h)) and ((aorai_x) > (0)) } [kernel] Plug-in aorai aborted: invalid user input. diff --git a/src/plugins/aorai/tests/ya/oracle/monostate.res.oracle b/src/plugins/aorai/tests/ya/oracle/monostate.res.oracle index 86ceb3e991278c964faf62706c167f6710087817..9ee345cafbfbc284e6862d953d00e7412e1773f6 100644 --- a/src/plugins/aorai/tests/ya/oracle/monostate.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/monostate.res.oracle @@ -1,12 +1,10 @@ [kernel] Parsing tests/ya/monostate.i (no preprocessing) -[aorai] Welcome to the Aorai plugin [aorai] Warning: Call to main does not follow automaton's specification. This path is assumed to be dead [aorai] tests/ya/monostate.i:8: Warning: Call to main not conforming to automaton (pre-cond). Assuming it is on a dead path [kernel] Parsing TMPDIR/aorai_monostate_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_States { - aorai_reject_state = -2, Init = 0, aorai_intermediate_state = 1, aorai_reject = 2 @@ -21,8 +19,8 @@ enum aorai_OpStatusList { }; /*@ check lemma aorai_reject_deterministic_trans{L}: \true; */ -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ check lemma aorai_intermediate_state_deterministic_trans{L}: ¬(\at(aorai_CurOperation,L) ≡ op_main ∧ @@ -64,11 +62,13 @@ check lemma Init_deterministic_trans{L}: @/ void f_pre_func(void) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_f; if (2 == aorai_CurStates) aorai_CurStates = aorai_reject; else if (1 == aorai_CurStates) aorai_CurStates = aorai_reject; + else aorai_CurStates = aorai_reject; return; } @@ -96,9 +96,11 @@ check lemma Init_deterministic_trans{L}: @/ void f_post_func(void) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_f; if (2 == aorai_CurStates) aorai_CurStates = aorai_reject; + else aorai_CurStates = aorai_reject; return; } @@ -139,8 +141,10 @@ void f(void) @/ void main_pre_func(void) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_main; + aorai_CurStates = aorai_reject; return; } @@ -163,8 +167,10 @@ void f(void) @/ void main_post_func(void) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_main; + aorai_CurStates = aorai_reject; return; } diff --git a/src/plugins/aorai/tests/ya/oracle/not_prm.res.oracle b/src/plugins/aorai/tests/ya/oracle/not_prm.res.oracle index 1d964840b06fc2869b27dc1f9ff1115c052861fc..79d8cc18058df72e85381c46d1d59f80ff09f81d 100644 --- a/src/plugins/aorai/tests/ya/oracle/not_prm.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/not_prm.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ya/not_prm.i (no preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_not_prm_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { @@ -9,8 +8,8 @@ enum aorai_OpStatusList { aorai_Terminated = 1, aorai_Called = 0 }; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_f; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ ghost int S0 = 1; */ /*@ ghost int Sf = 0; */ /*@ ghost @@ -35,6 +34,7 @@ enum aorai_OpStatusList { { int S0_tmp; int Sf_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_f; S0_tmp = S0; @@ -69,6 +69,7 @@ enum aorai_OpStatusList { { int S0_tmp; int Sf_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_f; S0_tmp = S0; diff --git a/src/plugins/aorai/tests/ya/oracle/other.res.oracle b/src/plugins/aorai/tests/ya/oracle/other.res.oracle index 8f230ecadb224c890456d0ef3ef0415fa9db4e9a..d7146144fdf2901adb66b6a09f4c2a019c0cd8fb 100644 --- a/src/plugins/aorai/tests/ya/oracle/other.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/other.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ya/other.c (with preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_other_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { @@ -12,8 +11,8 @@ enum aorai_OpStatusList { aorai_Called = 0 }; int x = 0; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ ghost int init = 1; */ /*@ ghost int last = 0; */ /*@ ghost int step1 = 0; */ @@ -60,6 +59,7 @@ int x = 0; int init_tmp; int last_tmp; int step1_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_f; init_tmp = init; @@ -123,6 +123,7 @@ int x = 0; int init_tmp; int last_tmp; int step1_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_f; init_tmp = init; @@ -250,6 +251,7 @@ void f(void) int init_tmp; int last_tmp; int step1_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_g; init_tmp = init; @@ -313,6 +315,7 @@ void f(void) int init_tmp; int last_tmp; int step1_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_g; init_tmp = init; @@ -427,6 +430,7 @@ void g(void) int init_tmp; int last_tmp; int step1_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_main; init_tmp = init; @@ -486,6 +490,7 @@ void g(void) int init_tmp; int last_tmp; int step1_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_main; init_tmp = init; diff --git a/src/plugins/aorai/tests/ya/oracle/saveload.res.0.log b/src/plugins/aorai/tests/ya/oracle/saveload.res.0.log new file mode 100644 index 0000000000000000000000000000000000000000..ecf6196e2f117c7fcb530834c3366a917c0c8109 --- /dev/null +++ b/src/plugins/aorai/tests/ya/oracle/saveload.res.0.log @@ -0,0 +1 @@ +[kernel] Parsing tests/ya/saveload.i (no preprocessing) diff --git a/src/plugins/aorai/tests/ya/oracle/saveload.res.1.log b/src/plugins/aorai/tests/ya/oracle/saveload.res.1.log new file mode 100644 index 0000000000000000000000000000000000000000..8c7beb3ffd181c92a0cebea295fe4cc7db971e47 --- /dev/null +++ b/src/plugins/aorai/tests/ya/oracle/saveload.res.1.log @@ -0,0 +1,53 @@ +[kernel:annot:missing-spec] tests/ya/saveload.i:12: Warning: + Neither code nor specification for function Frama_C_show_aorai_state, generating default assigns from the prototype +[eva] Analyzing a complete application starting at main +[eva] Computing initial state +[eva] Initial state computed +[eva:initial-state] Values of globals at initialization + aorai_CurOperation ∈ {0} + aorai_CurOpStatus ∈ {0} + aorai_CurStates ∈ {2} +[aorai] tests/ya/saveload.i:14: accept +[eva] done for function main +[eva] ====== VALUES COMPUTED ====== +[eva:final-states] Values at end of function f_post_func: + aorai_CurOperation ∈ {1} + aorai_CurOpStatus ∈ {1} + aorai_CurStates ∈ {0} +[eva:final-states] Values at end of function f_pre_func: + aorai_CurOperation ∈ {1} + aorai_CurOpStatus ∈ {0} + aorai_CurStates ∈ {0} +[eva:final-states] Values at end of function f: + aorai_CurOperation ∈ {1} + aorai_CurOpStatus ∈ {1} + aorai_CurStates ∈ {0} +[eva:final-states] Values at end of function main_post_func: + aorai_CurOperation ∈ {0} + aorai_CurOpStatus ∈ {1} + aorai_CurStates ∈ {0} +[eva:final-states] Values at end of function main_pre_func: + aorai_CurOperation ∈ {0} + aorai_CurOpStatus ∈ {0} + aorai_CurStates ∈ {0} +[eva:final-states] Values at end of function main: + __retres ∈ {0} + aorai_CurOperation ∈ {0} + aorai_CurOpStatus ∈ {1} + aorai_CurStates ∈ {0} +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 6 functions analyzed (out of 6): 100% coverage. + In these functions, 31 statements reached (out of 35): 88% coverage. + ---------------------------------------------------------------------------- + Some errors and warnings have been raised during the analysis: + by the Eva analyzer: 0 errors 0 warnings + by the Frama-C kernel: 0 errors 1 warning + ---------------------------------------------------------------------------- + 0 alarms generated by the analysis. + ---------------------------------------------------------------------------- + Evaluation of the logical properties reached by the analysis: + Assertions 0 valid 0 unknown 0 invalid 0 total + Preconditions 5 valid 0 unknown 0 invalid 5 total + 100% of the logical properties reached have been proven. + ---------------------------------------------------------------------------- diff --git a/src/plugins/aorai/tests/ya/oracle/seq.res.oracle b/src/plugins/aorai/tests/ya/oracle/seq.res.oracle index 506dca121a3f23b957ced47740eee807cff752ec..92b8136c6f9ff6db57d75f729389cec00afcbff5 100644 --- a/src/plugins/aorai/tests/ya/oracle/seq.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/seq.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ya/seq.i (no preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_seq_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { @@ -11,8 +10,8 @@ enum aorai_OpStatusList { aorai_Terminated = 1, aorai_Called = 0 }; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ ghost int S0 = 1; */ /*@ ghost int Sf = 0; */ /*@ ghost int aorai_intermediate_state = 0; */ @@ -69,6 +68,7 @@ enum aorai_OpStatusList { int aorai_intermediate_state_1_tmp; int aorai_intermediate_state_2_tmp; int aorai_intermediate_state_3_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_f; S0_tmp = S0; @@ -146,6 +146,7 @@ enum aorai_OpStatusList { int aorai_intermediate_state_1_tmp; int aorai_intermediate_state_2_tmp; int aorai_intermediate_state_3_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_f; S0_tmp = S0; @@ -269,6 +270,7 @@ void f(void) int aorai_intermediate_state_1_tmp; int aorai_intermediate_state_2_tmp; int aorai_intermediate_state_3_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_g; S0_tmp = S0; @@ -350,6 +352,7 @@ void f(void) int aorai_intermediate_state_1_tmp; int aorai_intermediate_state_2_tmp; int aorai_intermediate_state_3_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_g; S0_tmp = S0; @@ -470,6 +473,7 @@ void g(void) int aorai_intermediate_state_1_tmp; int aorai_intermediate_state_2_tmp; int aorai_intermediate_state_3_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_main; S0_tmp = S0; @@ -548,6 +552,7 @@ void g(void) int aorai_intermediate_state_1_tmp; int aorai_intermediate_state_2_tmp; int aorai_intermediate_state_3_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_main; S0_tmp = S0; diff --git a/src/plugins/aorai/tests/ya/oracle/seq_loop.res.oracle b/src/plugins/aorai/tests/ya/oracle/seq_loop.res.oracle index 91097fdf88b9aa56ad5e7d32f14521e41cb9cbd8..ea66b1d2bf754868b2a05efbd8b9c8dc413a61bc 100644 --- a/src/plugins/aorai/tests/ya/oracle/seq_loop.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/seq_loop.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ya/seq_loop.i (no preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_seq_loop_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { @@ -11,8 +10,8 @@ enum aorai_OpStatusList { aorai_Terminated = 1, aorai_Called = 0 }; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ ghost int S0 = 1; */ /*@ ghost int Sf = 0; */ /*@ ghost int aorai_intermediate_state = 0; */ @@ -84,6 +83,7 @@ enum aorai_OpStatusList { int aorai_intermediate_state_1_tmp; int aorai_intermediate_state_2_tmp; int aorai_intermediate_state_3_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_f; S0_tmp = S0; @@ -164,6 +164,7 @@ enum aorai_OpStatusList { int aorai_intermediate_state_1_tmp; int aorai_intermediate_state_2_tmp; int aorai_intermediate_state_3_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_f; S0_tmp = S0; @@ -274,6 +275,7 @@ void f(void) int aorai_intermediate_state_1_tmp; int aorai_intermediate_state_2_tmp; int aorai_intermediate_state_3_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_g; S0_tmp = S0; @@ -351,6 +353,7 @@ void f(void) int aorai_intermediate_state_1_tmp; int aorai_intermediate_state_2_tmp; int aorai_intermediate_state_3_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_g; S0_tmp = S0; @@ -447,6 +450,7 @@ void g(void) int aorai_intermediate_state_1_tmp; int aorai_intermediate_state_2_tmp; int aorai_intermediate_state_3_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_main; S0_tmp = S0; @@ -525,6 +529,7 @@ void g(void) int aorai_intermediate_state_1_tmp; int aorai_intermediate_state_2_tmp; int aorai_intermediate_state_3_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_main; S0_tmp = S0; diff --git a/src/plugins/aorai/tests/ya/oracle/serial.res.oracle b/src/plugins/aorai/tests/ya/oracle/serial.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..dbf366abac3bc1121b9765732ddf45aecf90f3e7 --- /dev/null +++ b/src/plugins/aorai/tests/ya/oracle/serial.res.oracle @@ -0,0 +1,883 @@ +[kernel] Parsing tests/ya/serial.c (with preprocessing) +[kernel:annot:missing-spec] tests/ya/serial.c:56: Warning: + Neither code nor specification for function Frama_C_show_aorai_state, generating default assigns from the prototype +[eva] Analyzing a complete application starting at main +[eva] Computing initial state +[eva] Initial state computed +[eva:initial-state] Values of globals at initialization + indefinitely ∈ [--..--] + buffer[0..4] ∈ {0} + n ∈ {0} + aorai_x1 ∈ {0} + aorai_x2 ∈ {0} + aorai_y1 ∈ {0} + aorai_y2 ∈ {0} + aorai_CurOperation ∈ {0} + aorai_CurOpStatus ∈ {0} + aorai_CurStates ∈ {19} + aorai_StatesHistory_1 ∈ {19} + aorai_StatesHistory_2 ∈ {19} +[eva] using specification for function Frama_C_interval +[eva] tests/ya/serial.c:58: starting to merge loop iterations +[eva] tests/ya/serial.c:63: Trace partitioning superposing up to 100 states +[eva] tests/ya/serial.c:63: Trace partitioning superposing up to 300 states +[eva:alarm] tests/ya/serial.c:33: Warning: + assertion 'Aorai,aorai_smoke_test' got status invalid (stopping propagation). +[aorai] tests/ya/serial.c:92: Wait1 <- Wait1 <- Complete +[aorai] tests/ya/serial.c:92: n in {5},x in [0..16383],y in [8192..16383] +[aorai] tests/ya/serial.c:92: Wait1 <- Wait1 <- Complete +[aorai] tests/ya/serial.c:92: n in {5},x in [0..16383],y in [0..8191] +[eva] tests/ya/serial.c:63: Trace partitioning superposing up to 500 states +[eva] tests/ya/serial.c:63: Trace partitioning superposing up to 700 states +[eva] tests/ya/serial.c:63: Trace partitioning superposing up to 900 states +[eva] tests/ya/serial.c:63: Trace partitioning superposing up to 1200 states +[eva] tests/ya/serial.c:63: Trace partitioning superposing up to 1400 states +[eva] tests/ya/serial.c:63: Trace partitioning superposing up to 1500 states +[eva] tests/ya/serial.c:63: Trace partitioning superposing up to 1600 states +[eva] tests/ya/serial.c:63: Trace partitioning superposing up to 1700 states +[eva] done for function main +[eva] ====== VALUES COMPUTED ====== +[eva:final-states] Values at end of function input_data_post_func: + aorai_x1 ∈ + {0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17; 18; + 19; 20; 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; + 35; 36; 37; 38; 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; + 51; 52; 53; 54; 55; 56; 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; + 67; 68; 69; 70; 71; 72; 73; 74; 75; 76; 77; 78; 79; 80; 81; 82; + 83; 84; 85; 86; 87; 88; 89; 90; 91; 92; 93; 94; 95; 96; 97; 98; + 99; 100; 101; 102; 103; 104; 105; 106; 107; 108; 109; 110; 111; + 112; 113; 114; 115; 116; 117; 118; 119; 120; 121; 122; 123; 124; + 125; 126; 127} + aorai_x2 ∈ + {0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17; 18; + 19; 20; 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; + 35; 36; 37; 38; 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; + 51; 52; 53; 54; 55; 56; 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; + 67; 68; 69; 70; 71; 72; 73; 74; 75; 76; 77; 78; 79; 80; 81; 82; + 83; 84; 85; 86; 87; 88; 89; 90; 91; 92; 93; 94; 95; 96; 97; 98; + 99; 100; 101; 102; 103; 104; 105; 106; 107; 108; 109; 110; 111; + 112; 113; 114; 115; 116; 117; 118; 119; 120; 121; 122; 123; 124; + 125; 126; 127} + aorai_y1 ∈ + {0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17; 18; + 19; 20; 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; + 35; 36; 37; 38; 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; + 51; 52; 53; 54; 55; 56; 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; + 67; 68; 69; 70; 71; 72; 73; 74; 75; 76; 77; 78; 79; 80; 81; 82; + 83; 84; 85; 86; 87; 88; 89; 90; 91; 92; 93; 94; 95; 96; 97; 98; + 99; 100; 101; 102; 103; 104; 105; 106; 107; 108; 109; 110; 111; + 112; 113; 114; 115; 116; 117; 118; 119; 120; 121; 122; 123; 124; + 125; 126; 127} + aorai_y2 ∈ [0..2147483647] + aorai_CurOperation ∈ {2} + aorai_CurOpStatus ∈ {1} + aorai_CurStates ∈ {0; 19; 20; 21; 22; 23} + aorai_StatesHistory_1 ∈ {1; 2; 3; 4; 5; 6} + aorai_StatesHistory_2 ∈ {8; 9; 10; 11; 12; 13} +[eva:final-states] Values at end of function input_data_pre_func: + aorai_CurOperation ∈ {2} + aorai_CurOpStatus ∈ {0} + aorai_CurStates ∈ {1; 2; 3; 4; 5; 6} + aorai_StatesHistory_1 ∈ {8; 9; 10; 11; 12; 13} + aorai_StatesHistory_2 ∈ {14; 15; 16; 17; 18} +[eva:final-states] Values at end of function input_data: + Frama_C_entropy_source ∈ [--..--] + aorai_x1 ∈ + {0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17; 18; + 19; 20; 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; + 35; 36; 37; 38; 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; + 51; 52; 53; 54; 55; 56; 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; + 67; 68; 69; 70; 71; 72; 73; 74; 75; 76; 77; 78; 79; 80; 81; 82; + 83; 84; 85; 86; 87; 88; 89; 90; 91; 92; 93; 94; 95; 96; 97; 98; + 99; 100; 101; 102; 103; 104; 105; 106; 107; 108; 109; 110; 111; + 112; 113; 114; 115; 116; 117; 118; 119; 120; 121; 122; 123; 124; + 125; 126; 127} + aorai_x2 ∈ + {0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17; 18; + 19; 20; 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; + 35; 36; 37; 38; 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; + 51; 52; 53; 54; 55; 56; 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; + 67; 68; 69; 70; 71; 72; 73; 74; 75; 76; 77; 78; 79; 80; 81; 82; + 83; 84; 85; 86; 87; 88; 89; 90; 91; 92; 93; 94; 95; 96; 97; 98; + 99; 100; 101; 102; 103; 104; 105; 106; 107; 108; 109; 110; 111; + 112; 113; 114; 115; 116; 117; 118; 119; 120; 121; 122; 123; 124; + 125; 126; 127} + aorai_y1 ∈ + {0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17; 18; + 19; 20; 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; + 35; 36; 37; 38; 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; + 51; 52; 53; 54; 55; 56; 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; + 67; 68; 69; 70; 71; 72; 73; 74; 75; 76; 77; 78; 79; 80; 81; 82; + 83; 84; 85; 86; 87; 88; 89; 90; 91; 92; 93; 94; 95; 96; 97; 98; + 99; 100; 101; 102; 103; 104; 105; 106; 107; 108; 109; 110; 111; + 112; 113; 114; 115; 116; 117; 118; 119; 120; 121; 122; 123; 124; + 125; 126; 127} + aorai_y2 ∈ [0..2147483647] + aorai_CurOperation ∈ {2} + aorai_CurOpStatus ∈ {1} + aorai_CurStates ∈ {0; 19; 20; 21; 22; 23} + aorai_StatesHistory_1 ∈ {1; 2; 3; 4; 5; 6} + aorai_StatesHistory_2 ∈ {8; 9; 10; 11; 12; 13} +[eva:final-states] Values at end of function input_status_post_func: + aorai_CurOperation ∈ {1} + aorai_CurOpStatus ∈ {1} + aorai_CurStates ∈ {8; 9; 10; 11; 12; 13; 19; 20; 21; 22; 23} + aorai_StatesHistory_1 ∈ {14; 15; 16; 17; 18} + aorai_StatesHistory_2 ∈ {0; 19; 20; 21; 22; 23} +[eva:final-states] Values at end of function input_status_pre_func: + aorai_CurOperation ∈ {1} + aorai_CurOpStatus ∈ {0} + aorai_CurStates ∈ {14; 15; 16; 17; 18} + aorai_StatesHistory_1 ∈ {0; 19; 20; 21; 22; 23} + aorai_StatesHistory_2 ∈ {1; 2; 3; 4; 5; 6; 14; 15; 16; 17; 18; 19} +[eva:final-states] Values at end of function input_status: + Frama_C_entropy_source ∈ [--..--] + aorai_CurOperation ∈ {1} + aorai_CurOpStatus ∈ {1} + aorai_CurStates ∈ {8; 9; 10; 11; 12; 13; 19; 20; 21; 22; 23} + aorai_StatesHistory_1 ∈ {14; 15; 16; 17; 18} + aorai_StatesHistory_2 ∈ {0; 19; 20; 21; 22; 23} +[eva:final-states] Values at end of function output_post_func: + aorai_CurOperation ∈ {0} + aorai_CurOpStatus ∈ {1} + aorai_CurStates ∈ {19; 24} + aorai_StatesHistory_1 ∈ {7; 19} + aorai_StatesHistory_2 ∈ {0} +[eva:final-states] Values at end of function output_pre_func: + aorai_CurOperation ∈ {0} + aorai_CurOpStatus ∈ {0} + aorai_CurStates ∈ {7; 19; 24} + aorai_StatesHistory_1 ∈ {0} + aorai_StatesHistory_2 ∈ {5} +[eva:final-states] Values at end of function output: + aorai_CurOperation ∈ {0} + aorai_CurOpStatus ∈ {1} + aorai_CurStates ∈ {19} + aorai_StatesHistory_1 ∈ {19} + aorai_StatesHistory_2 ∈ {0} +[eva:final-states] Values at end of function read: + Frama_C_entropy_source ∈ [--..--] + s ∈ + {0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17; 18; 19; 20; + 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; 35; 36; 37; 38; + 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; 51; 52; 53; 54; 55; 56; + 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; 67; 68; 69; 70; 71; 72; 73; 74; + 75; 76; 77; 78; 79; 80; 81; 82; 83; 84; 85; 86; 87; 88; 89; 90; 91; 92; + 93; 94; 95; 96; 97; 98; 99; 100; 101; 102; 103; 104; 105; 106; 107; 108; + 109; 110; 111; 112; 113; 114; 115; 116; 117; 118; 119; 120; 121; 122; + 123; 124; 125; 126; 127; 128; 129; 130; 131; 132; 133; 134; 135; 136; + 137; 138; 139; 140; 141; 142; 143; 144; 145; 146; 147; 148; 149; 150; + 151; 152; 153; 154; 155; 156; 157; 158; 159; 160; 161; 162; 163; 164; + 165; 166; 167; 168; 169; 170; 171; 172; 173; 174; 175; 176; 177; 178; + 179; 180; 181; 182; 183; 184; 185; 186; 187; 188; 189; 190; 191; 192; + 193; 194; 195; 196; 197; 198; 199; 200; 201; 202; 203; 204; 205; 206; + 207; 208; 209; 210; 211; 212; 213; 214; 215; 216; 217; 218; 219; 220; + 221; 222; 223; 224; 225; 226; 227; 228; 229; 230; 231; 232; 233; 234; + 235; 236; 237; 238; 239; 240; 241; 242; 243; 244; 245; 246; 247; 248; + 249; 250; 251; 252; 253; 254; 255} + status ∈ {0; 2; 4; 6; 8; 10; 12; 14} or UNINITIALIZED + __retres ∈ [-1..255] + aorai_x1 ∈ + {0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17; 18; + 19; 20; 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; + 35; 36; 37; 38; 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; + 51; 52; 53; 54; 55; 56; 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; + 67; 68; 69; 70; 71; 72; 73; 74; 75; 76; 77; 78; 79; 80; 81; 82; + 83; 84; 85; 86; 87; 88; 89; 90; 91; 92; 93; 94; 95; 96; 97; 98; + 99; 100; 101; 102; 103; 104; 105; 106; 107; 108; 109; 110; 111; + 112; 113; 114; 115; 116; 117; 118; 119; 120; 121; 122; 123; 124; + 125; 126; 127} + aorai_x2 ∈ + {0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17; 18; + 19; 20; 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; + 35; 36; 37; 38; 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; + 51; 52; 53; 54; 55; 56; 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; + 67; 68; 69; 70; 71; 72; 73; 74; 75; 76; 77; 78; 79; 80; 81; 82; + 83; 84; 85; 86; 87; 88; 89; 90; 91; 92; 93; 94; 95; 96; 97; 98; + 99; 100; 101; 102; 103; 104; 105; 106; 107; 108; 109; 110; 111; + 112; 113; 114; 115; 116; 117; 118; 119; 120; 121; 122; 123; 124; + 125; 126; 127} + aorai_y1 ∈ + {0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17; 18; + 19; 20; 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; + 35; 36; 37; 38; 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; + 51; 52; 53; 54; 55; 56; 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; + 67; 68; 69; 70; 71; 72; 73; 74; 75; 76; 77; 78; 79; 80; 81; 82; + 83; 84; 85; 86; 87; 88; 89; 90; 91; 92; 93; 94; 95; 96; 97; 98; + 99; 100; 101; 102; 103; 104; 105; 106; 107; 108; 109; 110; 111; + 112; 113; 114; 115; 116; 117; 118; 119; 120; 121; 122; 123; 124; + 125; 126; 127} + aorai_y2 ∈ [0..2147483647] + aorai_CurOperation ∈ {1; 2} + aorai_CurOpStatus ∈ {1} + aorai_CurStates ∈ {0; 19; 20; 21; 22; 23} + aorai_StatesHistory_1 ∈ {1; 2; 3; 4; 5; 6; 14; 15; 16; 17; 18} + aorai_StatesHistory_2 ∈ {0; 8; 9; 10; 11; 12; 13; 19; 20; 21; 22; 23} +[eva:final-states] Values at end of function main: + Frama_C_entropy_source ∈ [--..--] + buffer[0] ∈ + {0; 128; 129; 130; 131; 132; 133; 134; 135; 136; 137; 138; 139; 140; + 141; 142; 143; 144; 145; 146; 147; 148; 149; 150; 151; 152; 153; + 154; 155; 156; 157; 158; 159; 160; 161; 162; 163; 164; 165; 166; + 167; 168; 169; 170; 171; 172; 173; 174; 175; 176; 177; 178; 179; + 180; 181; 182; 183; 184; 185; 186; 187; 188; 189; 190; 191; 192; + 193; 194; 195; 196; 197; 198; 199; 200; 201; 202; 203; 204; 205; + 206; 207; 208; 209; 210; 211; 212; 213; 214; 215; 216; 217; 218; + 219; 220; 221; 222; 223; 224; 225; 226; 227; 228; 229; 230; 231; + 232; 233; 234; 235; 236; 237; 238; 239; 240; 241; 242; 243; 244; + 245; 246; 247; 248; 249; 250; 251; 252; 253; 254; 255} + [1..2] ∈ + {0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17; 18; + 19; 20; 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; 35; + 36; 37; 38; 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; 51; 52; + 53; 54; 55; 56; 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; 67; 68; 69; + 70; 71; 72; 73; 74; 75; 76; 77; 78; 79; 80; 81; 82; 83; 84; 85; 86; + 87; 88; 89; 90; 91; 92; 93; 94; 95; 96; 97; 98; 99; 100; 101; 102; + 103; 104; 105; 106; 107; 108; 109; 110; 111; 112; 113; 114; 115; + 116; 117; 118; 119; 120; 121; 122; 123; 124; 125; 126; 127} + [3..4] ∈ [0..2147483647] + n ∈ {0; 1; 2; 3; 4} + aorai_x1 ∈ + {0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17; 18; + 19; 20; 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; + 35; 36; 37; 38; 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; + 51; 52; 53; 54; 55; 56; 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; + 67; 68; 69; 70; 71; 72; 73; 74; 75; 76; 77; 78; 79; 80; 81; 82; + 83; 84; 85; 86; 87; 88; 89; 90; 91; 92; 93; 94; 95; 96; 97; 98; + 99; 100; 101; 102; 103; 104; 105; 106; 107; 108; 109; 110; 111; + 112; 113; 114; 115; 116; 117; 118; 119; 120; 121; 122; 123; 124; + 125; 126; 127} + aorai_x2 ∈ + {0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17; 18; + 19; 20; 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; + 35; 36; 37; 38; 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; + 51; 52; 53; 54; 55; 56; 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; + 67; 68; 69; 70; 71; 72; 73; 74; 75; 76; 77; 78; 79; 80; 81; 82; + 83; 84; 85; 86; 87; 88; 89; 90; 91; 92; 93; 94; 95; 96; 97; 98; + 99; 100; 101; 102; 103; 104; 105; 106; 107; 108; 109; 110; 111; + 112; 113; 114; 115; 116; 117; 118; 119; 120; 121; 122; 123; 124; + 125; 126; 127} + aorai_y1 ∈ + {0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17; 18; + 19; 20; 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31; 32; 33; 34; + 35; 36; 37; 38; 39; 40; 41; 42; 43; 44; 45; 46; 47; 48; 49; 50; + 51; 52; 53; 54; 55; 56; 57; 58; 59; 60; 61; 62; 63; 64; 65; 66; + 67; 68; 69; 70; 71; 72; 73; 74; 75; 76; 77; 78; 79; 80; 81; 82; + 83; 84; 85; 86; 87; 88; 89; 90; 91; 92; 93; 94; 95; 96; 97; 98; + 99; 100; 101; 102; 103; 104; 105; 106; 107; 108; 109; 110; 111; + 112; 113; 114; 115; 116; 117; 118; 119; 120; 121; 122; 123; 124; + 125; 126; 127} + aorai_y2 ∈ [0..2147483647] + aorai_CurOperation ∈ {0; 1; 2} + aorai_CurOpStatus ∈ {0; 1} + aorai_CurStates ∈ {0; 19; 20; 21; 22; 23} + aorai_StatesHistory_1 ∈ {1; 2; 3; 4; 5; 6; 14; 15; 16; 17; 18; 19} + aorai_StatesHistory_2 ∈ {0; 8; 9; 10; 11; 12; 13; 19; 20; 21; 22; 23} +[eva:summary] ====== ANALYSIS SUMMARY ====== + ---------------------------------------------------------------------------- + 11 functions analyzed (out of 11): 100% coverage. + In these functions, 206 statements reached (out of 261): 78% coverage. + ---------------------------------------------------------------------------- + Some errors and warnings have been raised during the analysis: + by the Eva analyzer: 0 errors 0 warnings + by the Frama-C kernel: 0 errors 1 warning + ---------------------------------------------------------------------------- + 0 alarms generated by the analysis. + ---------------------------------------------------------------------------- + Evaluation of the logical properties reached by the analysis: + Assertions 4 valid 2 unknown 0 invalid 6 total + Preconditions 2 valid 0 unknown 0 invalid 2 total + 75% of the logical properties reached have been proven. + ---------------------------------------------------------------------------- +[kernel] Parsing TMPDIR/aorai_serial_0.i (no preprocessing) +/* Generated by Frama-C */ +typedef unsigned long size_t; +enum aorai_States { + Complete = 0, + DataReq1 = 1, + DataReq2 = 2, + DataReq3 = 3, + DataReq4 = 4, + DataReq5 = 5, + DataReqE = 6, + Error = 7, + StatusError = 8, + StatusOk1 = 9, + StatusOk2 = 10, + StatusOk3 = 11, + StatusOk4 = 12, + StatusOk5 = 13, + StatusReq1 = 14, + StatusReq2 = 15, + StatusReq3 = 16, + StatusReq4 = 17, + StatusReq5 = 18, + Wait1 = 19, + Wait2 = 20, + Wait3 = 21, + Wait4 = 22, + Wait5 = 23, + aorai_reject = 24 +}; +enum aorai_ListOper { + op_input_data = 2, + op_input_status = 1, + op_output = 0 +}; +enum aorai_OpStatusList { + aorai_Terminated = 1, + aorai_Called = 0 +}; +/* compiler builtin: + void Frama_C_show_aorai_state(...); */ +extern int volatile Frama_C_entropy_source __attribute__((__unused__)); + +/*@ requires valid_p: \valid(p + (0 .. l - 1)); + ensures initialization: \initialized(\old(p) + (0 .. \old(l) - 1)); + assigns *(p + (0 .. l - 1)), Frama_C_entropy_source; + assigns *(p + (0 .. l - 1)) \from Frama_C_entropy_source; + assigns Frama_C_entropy_source \from Frama_C_entropy_source; + */ +extern void Frama_C_make_unknown(char *p, size_t l); + +/*@ ensures result_a_or_b: \result ≡ \old(a) ∨ \result ≡ \old(b); + assigns \result, Frama_C_entropy_source; + assigns \result \from a, b, Frama_C_entropy_source; + assigns Frama_C_entropy_source \from Frama_C_entropy_source; + */ +extern int Frama_C_nondet(int a, int b); + +/*@ ensures result_a_or_b: \result ≡ \old(a) ∨ \result ≡ \old(b); + assigns \result, Frama_C_entropy_source; + assigns \result \from a, b, Frama_C_entropy_source; + assigns Frama_C_entropy_source \from Frama_C_entropy_source; + */ +extern void *Frama_C_nondet_ptr(void *a, void *b); + +/*@ requires order: min ≤ max; + ensures result_bounded: \old(min) ≤ \result ≤ \old(max); + assigns \result, Frama_C_entropy_source; + assigns \result \from min, max, Frama_C_entropy_source; + assigns Frama_C_entropy_source \from Frama_C_entropy_source; + */ +extern int Frama_C_interval(int min, int max); + +/*@ requires order: min ≤ max; + ensures result_bounded: \old(min) ≤ \result ≤ \old(max); + assigns \result, Frama_C_entropy_source; + assigns \result \from min, max, Frama_C_entropy_source; + assigns Frama_C_entropy_source \from Frama_C_entropy_source; + */ +extern int Frama_C_interval_split(int min, int max); + +/*@ requires order: min ≤ max; + ensures result_bounded: \old(min) ≤ \result ≤ \old(max); + assigns \result, Frama_C_entropy_source; + assigns \result \from min, max, Frama_C_entropy_source; + assigns Frama_C_entropy_source \from Frama_C_entropy_source; + */ +extern unsigned char Frama_C_unsigned_char_interval(unsigned char min, + unsigned char max); + +/*@ requires order: min ≤ max; + ensures result_bounded: \old(min) ≤ \result ≤ \old(max); + assigns \result, Frama_C_entropy_source; + assigns \result \from min, max, Frama_C_entropy_source; + assigns Frama_C_entropy_source \from Frama_C_entropy_source; + */ +extern char Frama_C_char_interval(char min, char max); + +/*@ requires order: min ≤ max; + ensures result_bounded: \old(min) ≤ \result ≤ \old(max); + assigns \result, Frama_C_entropy_source; + assigns \result \from min, max, Frama_C_entropy_source; + assigns Frama_C_entropy_source \from Frama_C_entropy_source; + */ +extern unsigned short Frama_C_unsigned_short_interval(unsigned short min, + unsigned short max); + +/*@ requires order: min ≤ max; + ensures result_bounded: \old(min) ≤ \result ≤ \old(max); + assigns \result, Frama_C_entropy_source; + assigns \result \from min, max, Frama_C_entropy_source; + assigns Frama_C_entropy_source \from Frama_C_entropy_source; + */ +extern short Frama_C_short_interval(short min, short max); + +/*@ requires order: min ≤ max; + ensures result_bounded: \old(min) ≤ \result ≤ \old(max); + assigns \result, Frama_C_entropy_source; + assigns \result \from min, max, Frama_C_entropy_source; + assigns Frama_C_entropy_source \from Frama_C_entropy_source; + */ +extern unsigned int Frama_C_unsigned_int_interval(unsigned int min, + unsigned int max); + +/*@ requires order: min ≤ max; + ensures result_bounded: \old(min) ≤ \result ≤ \old(max); + assigns \result, Frama_C_entropy_source; + assigns \result \from min, max, Frama_C_entropy_source; + assigns Frama_C_entropy_source \from Frama_C_entropy_source; + */ +extern int Frama_C_int_interval(int min, int max); + +/*@ requires order: min ≤ max; + ensures result_bounded: \old(min) ≤ \result ≤ \old(max); + assigns \result, Frama_C_entropy_source; + assigns \result \from min, max, Frama_C_entropy_source; + assigns Frama_C_entropy_source \from Frama_C_entropy_source; + */ +extern unsigned long Frama_C_unsigned_long_interval(unsigned long min, + unsigned long max); + +/*@ requires order: min ≤ max; + ensures result_bounded: \old(min) ≤ \result ≤ \old(max); + assigns \result, Frama_C_entropy_source; + assigns \result \from min, max, Frama_C_entropy_source; + assigns Frama_C_entropy_source \from Frama_C_entropy_source; + */ +extern long Frama_C_long_interval(long min, long max); + +/*@ requires order: min ≤ max; + ensures result_bounded: \old(min) ≤ \result ≤ \old(max); + assigns \result, Frama_C_entropy_source; + assigns \result \from min, max, Frama_C_entropy_source; + assigns Frama_C_entropy_source \from Frama_C_entropy_source; + */ +extern unsigned long long Frama_C_unsigned_long_long_interval(unsigned long long min, + unsigned long long max); + +/*@ requires order: min ≤ max; + ensures result_bounded: \old(min) ≤ \result ≤ \old(max); + assigns \result, Frama_C_entropy_source; + assigns \result \from min, max, Frama_C_entropy_source; + assigns Frama_C_entropy_source \from Frama_C_entropy_source; + */ +extern long long Frama_C_long_long_interval(long long min, long long max); + +/*@ requires order: min ≤ max; + ensures result_bounded: \old(min) ≤ \result ≤ \old(max); + assigns \result, Frama_C_entropy_source; + assigns \result \from min, max, Frama_C_entropy_source; + assigns Frama_C_entropy_source \from Frama_C_entropy_source; + */ +extern size_t Frama_C_size_t_interval(size_t min, size_t max); + +/*@ requires finite: \is_finite(min) ∧ \is_finite(max); + requires order: min ≤ max; + ensures + result_bounded: + \is_finite(\result) ∧ \old(min) ≤ \result ≤ \old(max); + assigns \result, Frama_C_entropy_source; + assigns \result \from min, max, Frama_C_entropy_source; + assigns Frama_C_entropy_source \from Frama_C_entropy_source; + */ +extern float Frama_C_float_interval(float min, float max); + +/*@ requires finite: \is_finite(min) ∧ \is_finite(max); + requires order: min ≤ max; + ensures + result_bounded: + \is_finite(\result) ∧ \old(min) ≤ \result ≤ \old(max); + assigns \result, Frama_C_entropy_source; + assigns \result \from min, max, Frama_C_entropy_source; + assigns Frama_C_entropy_source \from Frama_C_entropy_source; + */ +extern double Frama_C_double_interval(double min, double max); + +/*@ requires finite: \is_finite(min) ∧ \is_finite(max); + requires order: min ≤ max; + ensures + result_bounded: + \is_finite(\result) ∧ \old(min) ≤ \result ≤ \old(max); + assigns \result, Frama_C_entropy_source; + assigns \result \from min, max, Frama_C_entropy_source; + assigns Frama_C_entropy_source \from Frama_C_entropy_source; + */ +extern double Frama_C_real_interval_as_double(double min, double max); + +/*@ terminates \false; + ensures never_terminates: \false; + assigns \nothing; */ +extern __attribute__((__noreturn__)) void Frama_C_abort(void); + +/*@ assigns \result; + assigns \result \from p; */ +extern size_t Frama_C_offset(void const *p); + +/*@ assigns \result; + assigns \result \from i; */ +extern long long Frama_C_abstract_cardinal(long long i); + +/*@ assigns \result; + assigns \result \from i; */ +extern long long Frama_C_abstract_max(long long i); + +/*@ assigns \result; + assigns \result \from i; */ +extern long long Frama_C_abstract_min(long long i); + +int volatile indefinitely; +int buffer[5]; +int n = 0; +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ +/*@ ghost int aorai_CurStates = Wait1; */ +/*@ ghost int aorai_StatesHistory_1 = Wait1; */ +/*@ ghost int aorai_StatesHistory_2 = Wait1; */ +/*@ ghost int aorai_x1 = 0; */ +/*@ ghost int aorai_x2 = 0; */ +/*@ ghost int aorai_y1 = 0; */ +/*@ ghost int aorai_y2 = 0; */ +/*@ ghost + void input_status_pre_func(void) + { + /@ slevel full; @/ + aorai_CurOpStatus = aorai_Called; + aorai_CurOperation = op_input_status; + aorai_StatesHistory_2 = aorai_StatesHistory_1; + aorai_StatesHistory_1 = aorai_CurStates; + if (19 == aorai_CurStates) aorai_CurStates = StatusReq1; + else + if (9 == aorai_CurStates) aorai_CurStates = StatusReq1; + else + if (8 == aorai_CurStates) aorai_CurStates = StatusReq1; + else + if (0 == aorai_CurStates) aorai_CurStates = StatusReq1; + else + if (20 == aorai_CurStates) aorai_CurStates = StatusReq2; + else + if (10 == aorai_CurStates) aorai_CurStates = StatusReq2; + else + if (21 == aorai_CurStates) aorai_CurStates = StatusReq3; + else + if (11 == aorai_CurStates) aorai_CurStates = StatusReq3; + else + if (22 == aorai_CurStates) aorai_CurStates = StatusReq4; + else + if (12 == aorai_CurStates) aorai_CurStates = StatusReq4; + else + if (23 == aorai_CurStates) aorai_CurStates = StatusReq5; + else + if (13 == aorai_CurStates) aorai_CurStates = StatusReq5; + else aorai_CurStates = aorai_reject; + /@ assert Aorai: aorai_smoke_test: aorai_CurStates ≢ aorai_reject; @/ + ; + return; + } + +*/ + +/*@ ghost + void input_status_post_func(int res) + { + /@ slevel full; @/ + aorai_CurOpStatus = aorai_Terminated; + aorai_CurOperation = op_input_status; + aorai_StatesHistory_2 = aorai_StatesHistory_1; + aorai_StatesHistory_1 = aorai_CurStates; + if (18 == aorai_CurStates && ((res & 15) != 1 && (res & 1) != 0)) + aorai_CurStates = StatusError; + else + if (17 == aorai_CurStates && ((res & 15) != 1 && (res & 1) != 0)) + aorai_CurStates = StatusError; + else + if (16 == aorai_CurStates && ((res & 15) != 1 && (res & 1) != 0)) + aorai_CurStates = StatusError; + else + if (15 == aorai_CurStates && ((res & 15) != 1 && (res & 1) != 0)) + aorai_CurStates = StatusError; + else + if (14 == aorai_CurStates && ((res & 15) != 1 && (res & 1) != 0)) + aorai_CurStates = StatusError; + else + if (14 == aorai_CurStates && (res & 15) == 1) aorai_CurStates = StatusOk1; + else + if (15 == aorai_CurStates && (res & 15) == 1) aorai_CurStates = StatusOk2; + else + if (16 == aorai_CurStates && (res & 15) == 1) aorai_CurStates = StatusOk3; + else + if (17 == aorai_CurStates && (res & 15) == 1) aorai_CurStates = StatusOk4; + else + if (18 == aorai_CurStates && (res & 15) == 1) aorai_CurStates = StatusOk5; + else + if (14 == aorai_CurStates && (res & 1) == 0) + aorai_CurStates = Wait1; + else + if (15 == aorai_CurStates && (res & 1) == 0) + aorai_CurStates = Wait2; + else + if (16 == aorai_CurStates && (res & 1) == 0) + aorai_CurStates = Wait3; + else + if (17 == aorai_CurStates && (res & 1) == 0) + aorai_CurStates = Wait4; + else + if (18 == aorai_CurStates && (res & 1) == 0) + aorai_CurStates = Wait5; + else aorai_CurStates = aorai_reject; + /@ assert Aorai: aorai_smoke_test: aorai_CurStates ≢ aorai_reject; @/ + ; + return; + } + +*/ + +/*@ ensures 0 ≤ \result < 0x100; + assigns \result, Frama_C_entropy_source; + assigns \result \from Frama_C_entropy_source; + assigns Frama_C_entropy_source \from Frama_C_entropy_source; + */ +int input_status(void) +{ + int tmp; + /*@ ghost input_status_pre_func(); */ + tmp = Frama_C_interval(0x00,0xff); + /*@ ghost input_status_post_func(tmp); */ + return tmp; +} + +/*@ ghost + void input_data_pre_func(void) + { + /@ slevel full; @/ + aorai_CurOpStatus = aorai_Called; + aorai_CurOperation = op_input_data; + aorai_StatesHistory_2 = aorai_StatesHistory_1; + aorai_StatesHistory_1 = aorai_CurStates; + if (9 == aorai_CurStates) aorai_CurStates = DataReq1; + else + if (10 == aorai_CurStates) aorai_CurStates = DataReq2; + else + if (11 == aorai_CurStates) aorai_CurStates = DataReq3; + else + if (12 == aorai_CurStates) aorai_CurStates = DataReq4; + else + if (13 == aorai_CurStates) aorai_CurStates = DataReq5; + else + if (8 == aorai_CurStates) aorai_CurStates = DataReqE; + else + if (23 == aorai_CurStates) aorai_CurStates = Error; + else + if (22 == aorai_CurStates) aorai_CurStates = Error; + else + if (21 == aorai_CurStates) aorai_CurStates = Error; + else + if (20 == aorai_CurStates) aorai_CurStates = Error; + else + if (19 == aorai_CurStates) aorai_CurStates = Error; + else aorai_CurStates = aorai_reject; + /@ assert Aorai: aorai_smoke_test: aorai_CurStates ≢ aorai_reject; @/ + ; + return; + } + +*/ + +/*@ ghost + void input_data_post_func(int res) + { + /@ slevel full; @/ + aorai_CurOpStatus = aorai_Terminated; + aorai_CurOperation = op_input_data; + aorai_StatesHistory_2 = aorai_StatesHistory_1; + aorai_StatesHistory_1 = aorai_CurStates; + if (5 == aorai_CurStates && (res & 128) == 0) { + aorai_CurStates = Complete; + aorai_y2 = res; + } + else + if (6 == aorai_CurStates) aorai_CurStates = Wait1; + else + if (5 == aorai_CurStates && (res & 192) == 192) aorai_CurStates = Wait1; + else + if (4 == aorai_CurStates && (res & 192) == 192) aorai_CurStates = Wait1; + else + if (3 == aorai_CurStates && (res & 192) == 192) aorai_CurStates = Wait1; + else + if (2 == aorai_CurStates && (res & 192) == 192) aorai_CurStates = Wait1; + else + if (1 == aorai_CurStates && (res & 128) == 0) aorai_CurStates = Wait1; + else + if (1 == aorai_CurStates && (res & 192) == 192) aorai_CurStates = Wait1; + else + if (5 == aorai_CurStates && (res & 192) == 128) aorai_CurStates = Wait2; + else + if (4 == aorai_CurStates && (res & 192) == 128) + aorai_CurStates = Wait2; + else + if (3 == aorai_CurStates && (res & 192) == 128) + aorai_CurStates = Wait2; + else + if (2 == aorai_CurStates && (res & 192) == 128) + aorai_CurStates = Wait2; + else + if (1 == aorai_CurStates && (res & 192) == 128) + aorai_CurStates = Wait2; + else + if (2 == aorai_CurStates && (res & 128) == 0) { + aorai_CurStates = Wait3; + aorai_x1 = res; + } + else + if (3 == aorai_CurStates && (res & 128) == 0) { + aorai_CurStates = Wait4; + aorai_x2 = res; + } + else + if (4 == aorai_CurStates && (res & 128) == 0) { + aorai_CurStates = Wait5; + aorai_y1 = res; + } + else aorai_CurStates = aorai_reject; + /@ assert Aorai: aorai_smoke_test: aorai_CurStates ≢ aorai_reject; @/ + ; + return; + } + +*/ + +/*@ ensures 0 ≤ \result < 0x100; + assigns \result, Frama_C_entropy_source; + assigns \result \from Frama_C_entropy_source; + assigns Frama_C_entropy_source \from Frama_C_entropy_source; + */ +int input_data(void) +{ + int tmp; + /*@ ghost input_data_pre_func(); */ + tmp = Frama_C_interval(0x00,0xff); + /*@ ghost input_data_post_func(tmp); */ + return tmp; +} + +/*@ ghost + void output_pre_func(int x, int y) + { + /@ slevel full; @/ + aorai_CurOpStatus = aorai_Called; + aorai_CurOperation = op_output; + aorai_StatesHistory_2 = aorai_StatesHistory_1; + aorai_StatesHistory_1 = aorai_CurStates; + if (23 == aorai_CurStates) aorai_CurStates = Error; + else + if (22 == aorai_CurStates) aorai_CurStates = Error; + else + if (21 == aorai_CurStates) aorai_CurStates = Error; + else + if (20 == aorai_CurStates) aorai_CurStates = Error; + else + if (19 == aorai_CurStates) aorai_CurStates = Error; + else + if (13 == aorai_CurStates) aorai_CurStates = Error; + else + if (12 == aorai_CurStates) aorai_CurStates = Error; + else + if (11 == aorai_CurStates) aorai_CurStates = Error; + else + if (10 == aorai_CurStates) aorai_CurStates = Error; + else + if (9 == aorai_CurStates) aorai_CurStates = Error; + else + if (8 == aorai_CurStates) aorai_CurStates = Error; + else + if (0 == aorai_CurStates && (y != aorai_y1 + + 128 * aorai_y2 || + x != aorai_x1 + + 128 * aorai_x2)) + aorai_CurStates = Error; + else + if (0 == aorai_CurStates && (x == aorai_x1 + + 128 * aorai_x2 && + y == aorai_y1 + + 128 * aorai_y2)) + aorai_CurStates = Wait1; + else aorai_CurStates = aorai_reject; + /@ assert Aorai: aorai_smoke_test: aorai_CurStates ≢ aorai_reject; @/ + ; + return; + } + +*/ + +/*@ ghost + void output_post_func(void) + { + /@ slevel full; @/ + aorai_CurOpStatus = aorai_Terminated; + aorai_CurOperation = op_output; + aorai_StatesHistory_2 = aorai_StatesHistory_1; + aorai_StatesHistory_1 = aorai_CurStates; + if (19 == aorai_CurStates) aorai_CurStates = Wait1; + else aorai_CurStates = aorai_reject; + /@ assert Aorai: aorai_smoke_test: aorai_CurStates ≢ aorai_reject; @/ + ; + return; + } + +*/ + +/*@ assigns \nothing; */ +void output(int x, int y) +{ + /*@ ghost output_pre_func(x,y); */ + /*@ ghost output_post_func(); */ + return; +} + +int read(int *status) +{ + int __retres; + int s = input_status(); + if (s & 0x01) { + int tmp_0; + *status = s & 0x0e; + tmp_0 = input_data(); + __retres = tmp_0; + goto return_label; + } + __retres = -1; + return_label: ; + return __retres; +} + +void main(void) +{ + /*@ ghost int aorai_Loop_Init_18; */ + while (indefinitely) { + int status; + int data = read(& status); + if (data != -1) { + int tmp_0; + if (status != 0) { + n = 0; + continue; + } + if (data & 0x80) { + if (n != 0) { + n = 0; + continue; + } + } + else { + /*@ split data & 0x40; */ ; + if (n == 0) continue; + } + tmp_0 = n; + n ++; + buffer[tmp_0] = data; + if (n == 5) { + if ((buffer[0] & 0x40) == 0) { + int x = buffer[1] + 0x80 * buffer[2]; + int y = buffer[3] + 0x80 * buffer[4]; + output(x,y); + Frama_C_show_aorai_state(n,x,y); + } + n = 0; + } + } + } + return; +} + + diff --git a/src/plugins/aorai/tests/ya/oracle/single_call.res.oracle b/src/plugins/aorai/tests/ya/oracle/single_call.res.oracle index ee4213fd46c5d23bbeacb123d8f1409c65f5ef1a..6264eea6c56d38291d3d6007ccec7b1702a4c7df 100644 --- a/src/plugins/aorai/tests/ya/oracle/single_call.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/single_call.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ya/single_call.i (no preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_single_call_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { @@ -9,8 +8,8 @@ enum aorai_OpStatusList { aorai_Terminated = 1, aorai_Called = 0 }; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ ghost int S0 = 1; */ /*@ ghost int Sf = 0; */ /*@ ghost int aorai_intermediate_state = 0; */ @@ -40,6 +39,7 @@ enum aorai_OpStatusList { int S0_tmp; int Sf_tmp; int aorai_intermediate_state_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_main; S0_tmp = S0; @@ -83,6 +83,7 @@ enum aorai_OpStatusList { int S0_tmp; int Sf_tmp; int aorai_intermediate_state_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_main; S0_tmp = S0; diff --git a/src/plugins/aorai/tests/ya/oracle/singleassignment-right.res.oracle b/src/plugins/aorai/tests/ya/oracle/singleassignment-right.res.oracle index 47bd37cf3ee9430554f51b2119e5f95c25f49990..067d521b9343014601ca3fe534174c42e4c083eb 100644 --- a/src/plugins/aorai/tests/ya/oracle/singleassignment-right.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/singleassignment-right.res.oracle @@ -1,12 +1,11 @@ [kernel] Parsing tests/ya/singleassignment-right.i (no preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_singleassignment-right_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_States { - aorai_reject_state = -2, a = 0, - b = 1, - c = 2 + aorai_reject = 1, + b = 2, + c = 3 }; enum aorai_ListOper { op_main = 0 @@ -19,10 +18,12 @@ enum aorai_OpStatusList { */ /*@ check lemma b_deterministic_trans{L}: \true; */ +/*@ check lemma aorai_reject_deterministic_trans{L}: \true; + */ /*@ check lemma a_deterministic_trans{L}: \true; */ -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ ghost int aorai_CurStates = a; */ /*@ ghost int aorai_x = 0; */ /*@ ghost int aorai_y = 0; */ @@ -36,6 +37,9 @@ enum aorai_OpStatusList { behavior buch_state_a_out: ensures aorai_CurStates ≢ a; + behavior buch_state_aorai_reject_out: + ensures aorai_CurStates ≢ aorai_reject; + behavior buch_state_b_in_0: assumes aorai_CurStates ≡ a; ensures aorai_CurStates ≡ b; @@ -59,6 +63,7 @@ enum aorai_OpStatusList { @/ void main_pre_func(int *x, int *y) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_main; if (0 == aorai_CurStates) { @@ -66,6 +71,7 @@ enum aorai_OpStatusList { aorai_x = *x; aorai_y = *y; } + else aorai_CurStates = aorai_reject; return; } @@ -81,6 +87,9 @@ enum aorai_OpStatusList { behavior buch_state_a_out: ensures aorai_CurStates ≢ a; + behavior buch_state_aorai_reject_out: + ensures aorai_CurStates ≢ aorai_reject; + behavior buch_state_b_out: ensures aorai_CurStates ≢ b; @@ -104,13 +113,15 @@ enum aorai_OpStatusList { @/ void main_post_func(void) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_main; - if (1 == aorai_CurStates) { + if (2 == aorai_CurStates) { aorai_CurStates = c; aorai_x = aorai_y; aorai_y = aorai_x; } + else aorai_CurStates = aorai_reject; return; } diff --git a/src/plugins/aorai/tests/ya/oracle/singleassignment-wrong.res.oracle b/src/plugins/aorai/tests/ya/oracle/singleassignment-wrong.res.oracle index a24943fca9867c96902f607deaafe3a12f1a2e71..9eca9305b90905e2fe0c03ebb470b6b321956636 100644 --- a/src/plugins/aorai/tests/ya/oracle/singleassignment-wrong.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/singleassignment-wrong.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ya/singleassignment-wrong.i (no preprocessing) -[aorai] Welcome to the Aorai plugin [aorai] User Error: The metavariable aorai_x is assigned several times during the transition from a to b: { Call(main) } aorai_x <- x aorai_x <- aorai_x + 1 diff --git a/src/plugins/aorai/tests/ya/oracle/stack.res.oracle b/src/plugins/aorai/tests/ya/oracle/stack.res.oracle index 6ca094fa00c5447876ad01b5e9f2b6297b9ecbcd..1c87bd335767554b3c662d504f66f15913c08133 100644 --- a/src/plugins/aorai/tests/ya/oracle/stack.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/stack.res.oracle @@ -1,15 +1,14 @@ [kernel] Parsing tests/ya/stack.i (no preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_stack_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_States { - aorai_reject_state = -2, accept = 0, - empty_stack = 1, - emptying_stack = 2, - filled_stack = 3, - filling_stack = 4, - init = 5 + aorai_reject = 1, + empty_stack = 2, + emptying_stack = 3, + filled_stack = 4, + filling_stack = 5, + init = 6 }; enum aorai_ListOper { op_main = 2, @@ -24,11 +23,13 @@ enum aorai_OpStatusList { */ /*@ check lemma filling_stack_deterministic_trans{L}: \true; */ +/*@ check lemma aorai_reject_deterministic_trans{L}: \true; + */ /*@ check lemma accept_deterministic_trans{L}: \true; */ int g = 0; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ check lemma empty_stack_deterministic_trans{L}: ¬(\at(aorai_CurOperation,L) ≡ op_push ∧ @@ -62,6 +63,9 @@ check lemma emptying_stack_deterministic_trans{L}: behavior buch_state_accept_out: ensures aorai_CurStates ≢ accept; + behavior buch_state_aorai_reject_out: + ensures aorai_CurStates ≢ aorai_reject; + behavior buch_state_empty_stack_out: ensures aorai_CurStates ≢ empty_stack; @@ -86,11 +90,13 @@ check lemma emptying_stack_deterministic_trans{L}: @/ void push_pre_func(void) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_push; - if (3 == aorai_CurStates) aorai_CurStates = filling_stack; + if (4 == aorai_CurStates) aorai_CurStates = filling_stack; else - if (1 == aorai_CurStates) aorai_CurStates = filling_stack; + if (2 == aorai_CurStates) aorai_CurStates = filling_stack; + else aorai_CurStates = aorai_reject; return; } @@ -105,6 +111,9 @@ check lemma emptying_stack_deterministic_trans{L}: behavior buch_state_accept_out: ensures aorai_CurStates ≢ accept; + behavior buch_state_aorai_reject_out: + ensures aorai_CurStates ≢ aorai_reject; + behavior buch_state_empty_stack_out: ensures aorai_CurStates ≢ empty_stack; @@ -133,12 +142,14 @@ check lemma emptying_stack_deterministic_trans{L}: @/ void push_post_func(void) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_push; - if (4 == aorai_CurStates) { + if (5 == aorai_CurStates) { aorai_CurStates = filled_stack; aorai_n ++; } + else aorai_CurStates = aorai_reject; return; } @@ -180,6 +191,9 @@ void push(void) behavior buch_state_accept_out: ensures aorai_CurStates ≢ accept; + behavior buch_state_aorai_reject_out: + ensures aorai_CurStates ≢ aorai_reject; + behavior buch_state_empty_stack_out: ensures aorai_CurStates ≢ empty_stack; @@ -202,9 +216,11 @@ void push(void) @/ void pop_pre_func(void) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_pop; - if (3 == aorai_CurStates && aorai_n > 0) aorai_CurStates = emptying_stack; + if (4 == aorai_CurStates && aorai_n > 0) aorai_CurStates = emptying_stack; + else aorai_CurStates = aorai_reject; return; } @@ -221,6 +237,9 @@ void push(void) behavior buch_state_accept_out: ensures aorai_CurStates ≢ accept; + behavior buch_state_aorai_reject_out: + ensures aorai_CurStates ≢ aorai_reject; + behavior buch_state_empty_stack_in_0: assumes aorai_CurStates ≡ emptying_stack ∧ aorai_n ≡ 1; ensures aorai_CurStates ≡ empty_stack; @@ -255,17 +274,19 @@ void push(void) @/ void pop_post_func(void) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_pop; - if (2 == aorai_CurStates && aorai_n == 1) { + if (3 == aorai_CurStates && aorai_n == 1) { aorai_CurStates = empty_stack; aorai_n --; } else - if (2 == aorai_CurStates && aorai_n > 1) { + if (3 == aorai_CurStates && aorai_n > 1) { aorai_CurStates = filled_stack; aorai_n --; } + else aorai_CurStates = aorai_reject; return; } @@ -307,6 +328,9 @@ void pop(void) behavior buch_state_accept_out: ensures aorai_CurStates ≢ accept; + behavior buch_state_aorai_reject_out: + ensures aorai_CurStates ≢ aorai_reject; + behavior buch_state_empty_stack_in_0: assumes aorai_CurStates ≡ init; ensures aorai_CurStates ≡ empty_stack; @@ -334,12 +358,14 @@ void pop(void) @/ void main_pre_func(void) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_main; - if (5 == aorai_CurStates) { + if (6 == aorai_CurStates) { aorai_CurStates = empty_stack; aorai_n = 0; } + else aorai_CurStates = aorai_reject; return; } @@ -359,6 +385,9 @@ void pop(void) assumes aorai_CurStates ≢ empty_stack; ensures aorai_CurStates ≢ accept; + behavior buch_state_aorai_reject_out: + ensures aorai_CurStates ≢ aorai_reject; + behavior buch_state_empty_stack_out: ensures aorai_CurStates ≢ empty_stack; @@ -376,9 +405,11 @@ void pop(void) @/ void main_post_func(void) { + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_main; - if (1 == aorai_CurStates) aorai_CurStates = accept; + if (2 == aorai_CurStates) aorai_CurStates = accept; + else aorai_CurStates = aorai_reject; return; } diff --git a/src/plugins/aorai/tests/ya/oracle/test_acces_params.res.oracle b/src/plugins/aorai/tests/ya/oracle/test_acces_params.res.oracle index 89553036d1a684d71bccedc4dc525fe7dbcb2ed1..72d1dbd1b7087f20168713e8811b6529fe5047c3 100644 --- a/src/plugins/aorai/tests/ya/oracle/test_acces_params.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/test_acces_params.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ya/test_acces_params.c (with preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_test_acces_params_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { @@ -15,8 +14,8 @@ int status = 0; int rr = 1; /*@ global invariant inv: 0 ≤ rr ≤ 5000; */ -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ ghost int S1 = 0; */ /*@ ghost int S2 = 0; */ /*@ ghost int S3 = 0; */ @@ -64,6 +63,7 @@ int rr = 1; int S4_tmp; int SF_tmp; int mainst_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_opa; S1_tmp = S1; @@ -129,6 +129,7 @@ int rr = 1; int S4_tmp; int SF_tmp; int mainst_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_opa; S1_tmp = S1; @@ -216,6 +217,7 @@ void opa(int i, int j) int S4_tmp; int SF_tmp; int mainst_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_opb; S1_tmp = S1; @@ -282,6 +284,7 @@ void opa(int i, int j) int S4_tmp; int SF_tmp; int mainst_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_opb; S1_tmp = S1; @@ -367,6 +370,7 @@ int opb(void) int S4_tmp; int SF_tmp; int mainst_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_main; S1_tmp = S1; @@ -432,6 +436,7 @@ int opb(void) int S4_tmp; int SF_tmp; int mainst_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_main; S1_tmp = S1; diff --git a/src/plugins/aorai/tests/ya/oracle/test_acces_params2.res.oracle b/src/plugins/aorai/tests/ya/oracle/test_acces_params2.res.oracle index 16997723976399ec7e581375b99d0be6dc37e33e..f20db94ee5b3eb2af611286e49d3866b42e02735 100644 --- a/src/plugins/aorai/tests/ya/oracle/test_acces_params2.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/test_acces_params2.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ya/test_acces_params2.c (with preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_test_acces_params2_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { @@ -15,8 +14,8 @@ enum aorai_OpStatusList { int rr = 1; /*@ global invariant inv: 0 ≤ rr ≤ 5000; */ -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ ghost int S1 = 1; */ /*@ ghost int S2 = 0; */ /*@ ghost int S3 = 0; */ @@ -69,6 +68,7 @@ int rr = 1; int S5_tmp; int S6_tmp; int S7_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_opa; S1_tmp = S1; @@ -142,6 +142,7 @@ int rr = 1; int S5_tmp; int S6_tmp; int S7_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_opa; S1_tmp = S1; @@ -239,6 +240,7 @@ int opa(int r) int S5_tmp; int S6_tmp; int S7_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_opb; S1_tmp = S1; @@ -311,6 +313,7 @@ int opa(int r) int S5_tmp; int S6_tmp; int S7_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_opb; S1_tmp = S1; @@ -398,6 +401,7 @@ void opb(void) int S5_tmp; int S6_tmp; int S7_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_opc; S1_tmp = S1; @@ -463,6 +467,7 @@ void opb(void) int S5_tmp; int S6_tmp; int S7_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_opc; S1_tmp = S1; @@ -569,6 +574,7 @@ void opc(void) int S5_tmp; int S6_tmp; int S7_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_main; S1_tmp = S1; @@ -641,6 +647,7 @@ void opc(void) int S5_tmp; int S6_tmp; int S7_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_main; S1_tmp = S1; diff --git a/src/plugins/aorai/tests/ya/oracle/test_boucle_rechercheTableau.res.oracle b/src/plugins/aorai/tests/ya/oracle/test_boucle_rechercheTableau.res.oracle index 6bd1a0b39b8010458503b8e83ae36ac33f416ecf..d9e7db7f8036d21031746b26ee84b19aa5ffcf14 100644 --- a/src/plugins/aorai/tests/ya/oracle/test_boucle_rechercheTableau.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/test_boucle_rechercheTableau.res.oracle @@ -3,7 +3,6 @@ parsing obsolete ACSL construct '\valid_range(addr,min,max)'. '\valid(addr+(min..max))' should be used instead. [kernel] tests/ya/test_boucle_rechercheTableau.c:7: Warning: parsing obsolete ACSL construct '\valid_range(addr,min,max)'. '\valid(addr+(min..max))' should be used instead. -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_test_boucle_rechercheTableau_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { @@ -15,8 +14,8 @@ enum aorai_OpStatusList { aorai_Terminated = 1, aorai_Called = 0 }; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ ghost int End = 0; */ /*@ ghost int Idle = 1; */ /*@ ghost int WillDoFoo = 0; */ @@ -45,6 +44,7 @@ enum aorai_OpStatusList { int End_tmp; int Idle_tmp; int WillDoFoo_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_isPresent; End_tmp = End; @@ -92,6 +92,7 @@ enum aorai_OpStatusList { int End_tmp; int Idle_tmp; int WillDoFoo_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_isPresent; End_tmp = End; @@ -189,6 +190,7 @@ int isPresent(int *t, int max, int val) int End_tmp; int Idle_tmp; int WillDoFoo_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_foo; End_tmp = End; @@ -230,6 +232,7 @@ int isPresent(int *t, int max, int val) int End_tmp; int Idle_tmp; int WillDoFoo_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_foo; End_tmp = End; @@ -284,6 +287,7 @@ void foo(void) int End_tmp; int Idle_tmp; int WillDoFoo_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_main; End_tmp = End; @@ -325,6 +329,7 @@ void foo(void) int End_tmp; int Idle_tmp; int WillDoFoo_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_main; End_tmp = End; diff --git a/src/plugins/aorai/tests/ya/oracle/test_factorial.res.oracle b/src/plugins/aorai/tests/ya/oracle/test_factorial.res.oracle index 009f14f70dd4771f190e1b6b609515a3a8316b8a..ed5f20033adfc02c42e59041a6d3fc7548e8ef8d 100644 --- a/src/plugins/aorai/tests/ya/oracle/test_factorial.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/test_factorial.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ya/test_factorial.c (with preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_test_factorial_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { @@ -11,8 +10,8 @@ enum aorai_OpStatusList { aorai_Terminated = 1, aorai_Called = 0 }; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ ghost int S1 = 0; */ /*@ ghost int S2 = 0; */ /*@ ghost int main_0 = 1; */ @@ -41,6 +40,7 @@ enum aorai_OpStatusList { int S1_tmp; int S2_tmp; int main_0_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_decode_int; S1_tmp = S1; @@ -87,6 +87,7 @@ enum aorai_OpStatusList { int S1_tmp; int S2_tmp; int main_0_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_decode_int; S1_tmp = S1; @@ -208,6 +209,7 @@ int decode_int(char *s) int S1_tmp; int S2_tmp; int main_0_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_factorial; S1_tmp = S1; @@ -254,6 +256,7 @@ int decode_int(char *s) int S1_tmp; int S2_tmp; int main_0_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_factorial; S1_tmp = S1; @@ -322,6 +325,7 @@ int factorial(int value) int S1_tmp; int S2_tmp; int main_0_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_main; S1_tmp = S1; @@ -368,6 +372,7 @@ int factorial(int value) int S1_tmp; int S2_tmp; int main_0_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_main; S1_tmp = S1; diff --git a/src/plugins/aorai/tests/ya/oracle/test_recursion4.res.oracle b/src/plugins/aorai/tests/ya/oracle/test_recursion4.res.oracle index cdfe4aba74bff1e589436adad382f28f9967766a..3f9a007d77696b6178c88a55def1baf568004e5c 100644 --- a/src/plugins/aorai/tests/ya/oracle/test_recursion4.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/test_recursion4.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ya/test_recursion4.c (with preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_test_recursion4_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { @@ -12,8 +11,8 @@ enum aorai_OpStatusList { aorai_Called = 0 }; #pragma JessieIntegerModel(math) -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ ghost int End = 0; */ /*@ ghost int Idle = 1; */ /*@ ghost int WillDoFoo = 0; */ @@ -42,6 +41,7 @@ enum aorai_OpStatusList { int End_tmp; int Idle_tmp; int WillDoFoo_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_isPresent; End_tmp = End; @@ -95,6 +95,7 @@ enum aorai_OpStatusList { int End_tmp; int Idle_tmp; int WillDoFoo_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_isPresent; End_tmp = End; @@ -185,6 +186,7 @@ int isPresent(int *t, int size, int val) int End_tmp; int Idle_tmp; int WillDoFoo_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_foo; End_tmp = End; @@ -226,6 +228,7 @@ int isPresent(int *t, int size, int val) int End_tmp; int Idle_tmp; int WillDoFoo_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_foo; End_tmp = End; @@ -280,6 +283,7 @@ void foo(void) int End_tmp; int Idle_tmp; int WillDoFoo_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_main; End_tmp = End; @@ -321,6 +325,7 @@ void foo(void) int End_tmp; int Idle_tmp; int WillDoFoo_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_main; End_tmp = End; diff --git a/src/plugins/aorai/tests/ya/oracle/test_recursion5.res.oracle b/src/plugins/aorai/tests/ya/oracle/test_recursion5.res.oracle index bc9334eec11d7af2e8fcb00eb21f5fb24d1a832f..b3d197570e702e04d0d7730ca993dd6fa5d6faa1 100644 --- a/src/plugins/aorai/tests/ya/oracle/test_recursion5.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/test_recursion5.res.oracle @@ -3,7 +3,6 @@ parsing obsolete ACSL construct '\valid_range(addr,min,max)'. '\valid(addr+(min..max))' should be used instead. [kernel] tests/ya/test_recursion5.c:28: Warning: parsing obsolete ACSL construct '\valid_range(addr,min,max)'. '\valid(addr+(min..max))' should be used instead. -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_test_recursion5_0.i (no preprocessing) /* Generated by Frama-C */ enum aorai_ListOper { @@ -16,8 +15,8 @@ enum aorai_OpStatusList { aorai_Terminated = 1, aorai_Called = 0 }; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ ghost int End = 0; */ /*@ ghost int Idle = 1; */ /*@ ghost int IgnoreFoo = 0; */ @@ -53,6 +52,7 @@ enum aorai_OpStatusList { int Idle_tmp; int IgnoreFoo_tmp; int WillDoFoo_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_isPresentRec; End_tmp = End; @@ -117,6 +117,7 @@ enum aorai_OpStatusList { int Idle_tmp; int IgnoreFoo_tmp; int WillDoFoo_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_isPresentRec; End_tmp = End; @@ -215,6 +216,7 @@ int isPresentRec(int *t, int i, int max, int val) int Idle_tmp; int IgnoreFoo_tmp; int WillDoFoo_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_isPresent; End_tmp = End; @@ -272,6 +274,7 @@ int isPresentRec(int *t, int i, int max, int val) int Idle_tmp; int IgnoreFoo_tmp; int WillDoFoo_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_isPresent; End_tmp = End; @@ -352,6 +355,7 @@ int isPresent(int *t, int max, int val) int Idle_tmp; int IgnoreFoo_tmp; int WillDoFoo_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_foo; End_tmp = End; @@ -402,6 +406,7 @@ int isPresent(int *t, int max, int val) int Idle_tmp; int IgnoreFoo_tmp; int WillDoFoo_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_foo; End_tmp = End; @@ -466,6 +471,7 @@ void foo(void) int Idle_tmp; int IgnoreFoo_tmp; int WillDoFoo_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_main; End_tmp = End; @@ -516,6 +522,7 @@ void foo(void) int Idle_tmp; int IgnoreFoo_tmp; int WillDoFoo_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_main; End_tmp = End; diff --git a/src/plugins/aorai/tests/ya/oracle/test_struct.res.oracle b/src/plugins/aorai/tests/ya/oracle/test_struct.res.oracle index 0e102ceda9633ce37d9262207c569e610ce0a69b..fa0bb669fc7a5d68255e8ce6fc8d1bd8aabd11f6 100644 --- a/src/plugins/aorai/tests/ya/oracle/test_struct.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle/test_struct.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ya/test_struct.c (with preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_test_struct_0.i (no preprocessing) /* Generated by Frama-C */ struct People { @@ -16,8 +15,8 @@ enum aorai_OpStatusList { }; struct People nobody; int myAge = 0; -/*@ ghost enum aorai_ListOper aorai_CurOperation = op_main; */ -/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus = aorai_Called; */ +/*@ ghost enum aorai_ListOper aorai_CurOperation; */ +/*@ ghost enum aorai_OpStatusList aorai_CurOpStatus; */ /*@ ghost int S1 = 0; */ /*@ ghost int main_0 = 1; */ /*@ ghost @@ -42,6 +41,7 @@ int myAge = 0; { int S1_tmp; int main_0_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_increment; S1_tmp = S1; @@ -77,6 +77,7 @@ int myAge = 0; { int S1_tmp; int main_0_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_increment; S1_tmp = S1; @@ -129,6 +130,7 @@ void increment(void) { int S1_tmp; int main_0_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Called; aorai_CurOperation = op_main; S1_tmp = S1; @@ -164,6 +166,7 @@ void increment(void) { int S1_tmp; int main_0_tmp; + /@ slevel full; @/ aorai_CurOpStatus = aorai_Terminated; aorai_CurOperation = op_main; S1_tmp = S1; diff --git a/src/plugins/aorai/tests/ya/oracle_prove/aorai_ptr_field.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/aorai_ptr_field.res.oracle index 5d9a38bc1e4b760ac98152b2e6c6958812759e8d..45a91772ac37c0a8a776a8b3f720ea67c19b56ee 100644 --- a/src/plugins/aorai/tests/ya/oracle_prove/aorai_ptr_field.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle_prove/aorai_ptr_field.res.oracle @@ -1,4 +1,3 @@ [kernel] Parsing tests/ya/aorai_ptr_field.i (no preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_aorai_ptr_field_0.i (no preprocessing) [wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/assigns.0.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/assigns.0.res.oracle index 6e42468e3ad6fb56d5cfecda01abf90d858bcfe2..982103df2daf7ea1a089a36951f686d4c9a1ad59 100644 --- a/src/plugins/aorai/tests/ya/oracle_prove/assigns.0.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle_prove/assigns.0.res.oracle @@ -1,4 +1,3 @@ [kernel] Parsing tests/ya/assigns.c (with preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_assigns_0.i (no preprocessing) [wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/assigns.1.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/assigns.1.res.oracle index bfa57eb1f306974f472def9cf44e9cb20c224eb2..19922b414f8a559fe85fd825037f7154ba64f231 100644 --- a/src/plugins/aorai/tests/ya/oracle_prove/assigns.1.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle_prove/assigns.1.res.oracle @@ -1,4 +1,3 @@ [kernel] Parsing tests/ya/assigns.c (with preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_assigns_1.i (no preprocessing) [wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/assigns.2.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/assigns.2.res.oracle index f5a60a3aac12f9e6f74b645b97c97125445d9996..5a761e8ca86775a91718ded77e107d61a8a15aa6 100644 --- a/src/plugins/aorai/tests/ya/oracle_prove/assigns.2.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle_prove/assigns.2.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ya/assigns.c (with preprocessing) -[aorai] Welcome to the Aorai plugin /* Generated by Frama-C */ int X; void f(void) diff --git a/src/plugins/aorai/tests/ya/oracle_prove/bts1289.0.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/bts1289.0.res.oracle index 8a21ce6dc7cc4ae686a93943b42b1a52a4ecf689..9e49047ac776ff21695ad39cf63803a0e8c0aa67 100644 --- a/src/plugins/aorai/tests/ya/oracle_prove/bts1289.0.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle_prove/bts1289.0.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ya/bts1289.i (no preprocessing) -[aorai] Welcome to the Aorai plugin [aorai] Warning: Call to main does not follow automaton's specification. This path is assumed to be dead [kernel] Parsing TMPDIR/aorai_bts1289_0.i (no preprocessing) [wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/bts1289.1.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/bts1289.1.res.oracle index 7455ed9f29ad0d766b44878cabe2cf61ab7e0a98..09d835e87402e3767aef3dca97a0ef21ea085a87 100644 --- a/src/plugins/aorai/tests/ya/oracle_prove/bts1289.1.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle_prove/bts1289.1.res.oracle @@ -1,4 +1,3 @@ [kernel] Parsing tests/ya/bts1289.i (no preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_bts1289_1.i (no preprocessing) [wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/declared_function.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/declared_function.res.oracle index e961cfa00b2c702983e5a54ba2f3c9f44d55d313..500161bb9b87f344c719102b69b2fca48fd92521 100644 --- a/src/plugins/aorai/tests/ya/oracle_prove/declared_function.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle_prove/declared_function.res.oracle @@ -1,6 +1,5 @@ [kernel] Parsing tests/ya/declared_function.i (no preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_declared_function_0.i (no preprocessing) -[kernel:annot:missing-spec] TMPDIR/aorai_declared_function_0.i:48: Warning: +[kernel:annot:missing-spec] TMPDIR/aorai_declared_function_0.i:50: Warning: Neither code nor specification for function f, generating default assigns from the prototype [wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/deterministic.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/deterministic.res.oracle index da8094d3368a5686310a2aff3d01b936866ceb30..8b53a748afa1149d700e7f74203ad0bb37c35a04 100644 --- a/src/plugins/aorai/tests/ya/oracle_prove/deterministic.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle_prove/deterministic.res.oracle @@ -1,4 +1,3 @@ [kernel] Parsing tests/ya/deterministic.i (no preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_deterministic_0.i (no preprocessing) [wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/formals.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/formals.res.oracle index 203e6f02f62136e70e652d204f160ecb34450cde..fbd3997a5e7e5d298aefcc9b3f03b2bbbd2b00ca 100644 --- a/src/plugins/aorai/tests/ya/oracle_prove/formals.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle_prove/formals.res.oracle @@ -1,4 +1,3 @@ [kernel] Parsing tests/ya/formals.i (no preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_formals_0.i (no preprocessing) [wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/generate_assigns_bts1290.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/generate_assigns_bts1290.res.oracle index 8c689f78567e5268a9ff9b5e916b7ee948bb47ab..55b4a9433c8e88bcb17b22bb5bb7485f7747e270 100644 --- a/src/plugins/aorai/tests/ya/oracle_prove/generate_assigns_bts1290.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle_prove/generate_assigns_bts1290.res.oracle @@ -1,4 +1,3 @@ [kernel] Parsing tests/ya/generate_assigns_bts1290.i (no preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_generate_assigns_bts1290_0.i (no preprocessing) [wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/hoare_seq.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/hoare_seq.res.oracle index 25f11ffa4fd49a20ff9441ac586602ccffb8bfa8..5f917f2df5c7f9b6bb104d8d8afc525bce69d14e 100644 --- a/src/plugins/aorai/tests/ya/oracle_prove/hoare_seq.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle_prove/hoare_seq.res.oracle @@ -1,4 +1,3 @@ [kernel] Parsing tests/ya/hoare_seq.i (no preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_hoare_seq_0.i (no preprocessing) [wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/incorrect.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/incorrect.res.oracle index e5437b11cf441f0122b9d89b3ba1147984506890..30ba0541d811ba71dc98cdebc6793c7e0d12e87e 100644 --- a/src/plugins/aorai/tests/ya/oracle_prove/incorrect.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle_prove/incorrect.res.oracle @@ -1,7 +1,6 @@ [kernel] Parsing tests/ya/incorrect.i (no preprocessing) -[aorai] Welcome to the Aorai plugin [aorai] Warning: Call to main does not follow automaton's specification. This path is assumed to be dead [kernel] Parsing TMPDIR/aorai_incorrect_0.i (no preprocessing) [wp] Warning: Missing RTE guards -[kernel:annot:missing-spec] TMPDIR/aorai_incorrect_0.i:62: Warning: +[kernel:annot:missing-spec] TMPDIR/aorai_incorrect_0.i:69: Warning: Neither code nor specification for function f, generating default assigns from the prototype diff --git a/src/plugins/aorai/tests/ya/oracle_prove/loop_bts1050.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/loop_bts1050.res.oracle index 8830b5bd606bd9d84295fe6287d86194126227e3..49b40bd6a118b65a30760349ede69b4d669ee30e 100644 --- a/src/plugins/aorai/tests/ya/oracle_prove/loop_bts1050.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle_prove/loop_bts1050.res.oracle @@ -1,4 +1,3 @@ [kernel] Parsing tests/ya/loop_bts1050.i (no preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_loop_bts1050_0.i (no preprocessing) [wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/metavariables-incompatible.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/metavariables-incompatible.res.oracle index 57c2d7eed1ca61046277d1cbf5d005a9fde10a52..a682bee8a270311ec22d7a3b33999a452ac306bf 100644 --- a/src/plugins/aorai/tests/ya/oracle_prove/metavariables-incompatible.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle_prove/metavariables-incompatible.res.oracle @@ -1,4 +1,3 @@ [kernel] Parsing tests/ya/metavariables-incompatible.i (no preprocessing) -[aorai] Welcome to the Aorai plugin -[aorai] User Error: The use of metavariables is incompatible with non-deterministic automata, such as automa using extended transitions. +[aorai] User Error: The use of metavariables is incompatible with non-deterministic automata, such as automata using extended transitions. [kernel] Plug-in aorai aborted: invalid user input. diff --git a/src/plugins/aorai/tests/ya/oracle_prove/metavariables-right.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/metavariables-right.res.oracle index 6803c149a7b942ab01ffcff164c2ae40bf6aca0d..54e1691625c95c6428570c38d5f776886b469f60 100644 --- a/src/plugins/aorai/tests/ya/oracle_prove/metavariables-right.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle_prove/metavariables-right.res.oracle @@ -1,4 +1,3 @@ [kernel] Parsing tests/ya/metavariables-right.i (no preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_metavariables-right_0.i (no preprocessing) [wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/metavariables-wrong.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/metavariables-wrong.res.oracle index 44c1487fcf7693e627a38f17cea95e7cd8e7b492..7aca51a51b2a805049c34693029c51f4dbd8a369 100644 --- a/src/plugins/aorai/tests/ya/oracle_prove/metavariables-wrong.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle_prove/metavariables-wrong.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ya/metavariables-wrong.i (no preprocessing) -[aorai] Welcome to the Aorai plugin [aorai] User Error: The metavariables aorai_x may not be initialized before the transition from e to f_0: { (Call(h)) and ((aorai_x) > (0)) } [kernel] Plug-in aorai aborted: invalid user input. diff --git a/src/plugins/aorai/tests/ya/oracle_prove/not_prm.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/not_prm.res.oracle index fd02e38e18a3bbf64d83f462bb12b7d3f1b5bc04..9921e92ae87197c4147f52ecfbff12b30d2fea70 100644 --- a/src/plugins/aorai/tests/ya/oracle_prove/not_prm.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle_prove/not_prm.res.oracle @@ -1,4 +1,3 @@ [kernel] Parsing tests/ya/not_prm.i (no preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_not_prm_0.i (no preprocessing) [wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/other.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/other.res.oracle index 470d9d475b7189d3ad2178ee95013cc97bdc81f5..67ad5163c35ce47843920767d47f50ca90c19b6f 100644 --- a/src/plugins/aorai/tests/ya/oracle_prove/other.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle_prove/other.res.oracle @@ -1,4 +1,3 @@ [kernel] Parsing tests/ya/other.c (with preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_other_0.i (no preprocessing) [wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/seq.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/seq.res.oracle index 750146c1ae60528b0c2e8ad46caf226758da9106..7c0f0ef38ef39f16d8dd3704f753bea8042bf337 100644 --- a/src/plugins/aorai/tests/ya/oracle_prove/seq.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle_prove/seq.res.oracle @@ -1,4 +1,3 @@ [kernel] Parsing tests/ya/seq.i (no preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_seq_0.i (no preprocessing) [wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/seq_loop.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/seq_loop.res.oracle index 37849cdec351ef0d0ac0a23bd999d16c95507974..aaa9705b556710ed07a4fa154c06b82d02874836 100644 --- a/src/plugins/aorai/tests/ya/oracle_prove/seq_loop.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle_prove/seq_loop.res.oracle @@ -1,4 +1,3 @@ [kernel] Parsing tests/ya/seq_loop.i (no preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_seq_loop_0.i (no preprocessing) [wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/serial.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/serial.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..2dd3de37879294166ef9a7e0f933bf3cc88c7339 --- /dev/null +++ b/src/plugins/aorai/tests/ya/oracle_prove/serial.res.oracle @@ -0,0 +1,5 @@ +[kernel] Parsing tests/ya/serial.c (with preprocessing) +[kernel] Parsing TMPDIR/aorai_serial_0.i (no preprocessing) +[kernel:annot:missing-spec] TMPDIR/aorai_serial_0.i:738: Warning: + Neither code nor specification for function Frama_C_show_aorai_state, generating default assigns from the prototype +[wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/single_call.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/single_call.res.oracle index dbd60dc8fb54dbf01fb849c02ef8a49365e03b57..ecbefc2abff8eb03290a35b61fc23cd191fe0e48 100644 --- a/src/plugins/aorai/tests/ya/oracle_prove/single_call.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle_prove/single_call.res.oracle @@ -1,4 +1,3 @@ [kernel] Parsing tests/ya/single_call.i (no preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_single_call_0.i (no preprocessing) [wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/singleassignment-right.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/singleassignment-right.res.oracle index 79c1ae490e64e6a010e1842eec97bd6062a2cf0d..46c7832cef04833d9e3c5c2c7b367a8c4bf70d0c 100644 --- a/src/plugins/aorai/tests/ya/oracle_prove/singleassignment-right.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle_prove/singleassignment-right.res.oracle @@ -1,4 +1,3 @@ [kernel] Parsing tests/ya/singleassignment-right.i (no preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_singleassignment-right_0.i (no preprocessing) [wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/singleassignment-wrong.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/singleassignment-wrong.res.oracle index a24943fca9867c96902f607deaafe3a12f1a2e71..9eca9305b90905e2fe0c03ebb470b6b321956636 100644 --- a/src/plugins/aorai/tests/ya/oracle_prove/singleassignment-wrong.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle_prove/singleassignment-wrong.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ya/singleassignment-wrong.i (no preprocessing) -[aorai] Welcome to the Aorai plugin [aorai] User Error: The metavariable aorai_x is assigned several times during the transition from a to b: { Call(main) } aorai_x <- x aorai_x <- aorai_x + 1 diff --git a/src/plugins/aorai/tests/ya/oracle_prove/stack.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/stack.res.oracle index ad8ddcef2ca5c41625a8a4dec207a6a71cdf6be6..e56f27fc2b989aca361e326f8f48dbf18daef36b 100644 --- a/src/plugins/aorai/tests/ya/oracle_prove/stack.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle_prove/stack.res.oracle @@ -1,4 +1,3 @@ [kernel] Parsing tests/ya/stack.i (no preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_stack_0.i (no preprocessing) [wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/test_acces_params.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/test_acces_params.res.oracle index a20fbf3e28dfbe78c2e6e38549ae116e82d50117..0bf1b088bf5ade07b4cd849c3aec445cb17b41ef 100644 --- a/src/plugins/aorai/tests/ya/oracle_prove/test_acces_params.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle_prove/test_acces_params.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ya/test_acces_params.c (with preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_test_acces_params_0.i (no preprocessing) [wp] TMPDIR/aorai_test_acces_params_0.i:4: Warning: Global invariant not handled yet ('inv' ignored) diff --git a/src/plugins/aorai/tests/ya/oracle_prove/test_acces_params2.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/test_acces_params2.res.oracle index c45f6f03706d1f2f3f8b0c0ea9771e9bca8aa970..82a83a9128b6065cf9c1cddf718442da4c93d7d1 100644 --- a/src/plugins/aorai/tests/ya/oracle_prove/test_acces_params2.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle_prove/test_acces_params2.res.oracle @@ -1,5 +1,4 @@ [kernel] Parsing tests/ya/test_acces_params2.c (with preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_test_acces_params2_0.i (no preprocessing) [wp] TMPDIR/aorai_test_acces_params2_0.i:3: Warning: Global invariant not handled yet ('inv' ignored) diff --git a/src/plugins/aorai/tests/ya/oracle_prove/test_boucle_rechercheTableau.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/test_boucle_rechercheTableau.res.oracle index d303821150962269a00d47dd2e504fcea9944db9..8cab8fa7b812e4fb8decee97420467e6fd790c5b 100644 --- a/src/plugins/aorai/tests/ya/oracle_prove/test_boucle_rechercheTableau.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle_prove/test_boucle_rechercheTableau.res.oracle @@ -3,6 +3,5 @@ parsing obsolete ACSL construct '\valid_range(addr,min,max)'. '\valid(addr+(min..max))' should be used instead. [kernel] tests/ya/test_boucle_rechercheTableau.c:7: Warning: parsing obsolete ACSL construct '\valid_range(addr,min,max)'. '\valid(addr+(min..max))' should be used instead. -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_test_boucle_rechercheTableau_0.i (no preprocessing) [wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/test_factorial.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/test_factorial.res.oracle index 533a909e627c6e37bef7e29d3cf59dfd1a159e28..0a55ec0fe94f5ad8b0d702a2202938a4b848c915 100644 --- a/src/plugins/aorai/tests/ya/oracle_prove/test_factorial.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle_prove/test_factorial.res.oracle @@ -1,4 +1,3 @@ [kernel] Parsing tests/ya/test_factorial.c (with preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_test_factorial_0.i (no preprocessing) [wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/test_recursion4.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/test_recursion4.res.oracle index 5ca3ac392fdd4b832d8ddadfb0116c1e1e74530b..c87a3ebe4e904d75261e70724144576db3cd5b96 100644 --- a/src/plugins/aorai/tests/ya/oracle_prove/test_recursion4.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle_prove/test_recursion4.res.oracle @@ -1,4 +1,3 @@ [kernel] Parsing tests/ya/test_recursion4.c (with preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_test_recursion4_0.i (no preprocessing) [wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/test_recursion5.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/test_recursion5.res.oracle index 6d11db5117d25a5e722e0f3d7601bd33b5908fe3..2cc98760865bd5e4cdda8a2f355a993384137333 100644 --- a/src/plugins/aorai/tests/ya/oracle_prove/test_recursion5.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle_prove/test_recursion5.res.oracle @@ -3,6 +3,5 @@ parsing obsolete ACSL construct '\valid_range(addr,min,max)'. '\valid(addr+(min..max))' should be used instead. [kernel] tests/ya/test_recursion5.c:28: Warning: parsing obsolete ACSL construct '\valid_range(addr,min,max)'. '\valid(addr+(min..max))' should be used instead. -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_test_recursion5_0.i (no preprocessing) [wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/oracle_prove/test_struct.res.oracle b/src/plugins/aorai/tests/ya/oracle_prove/test_struct.res.oracle index fe4190800bde83f284a0788579d355d2a84ed468..4c72fb29ede0839691a5f3174338e5fc10fa2bb6 100644 --- a/src/plugins/aorai/tests/ya/oracle_prove/test_struct.res.oracle +++ b/src/plugins/aorai/tests/ya/oracle_prove/test_struct.res.oracle @@ -1,4 +1,3 @@ [kernel] Parsing tests/ya/test_struct.c (with preprocessing) -[aorai] Welcome to the Aorai plugin [kernel] Parsing TMPDIR/aorai_test_struct_0.i (no preprocessing) [wp] Warning: Missing RTE guards diff --git a/src/plugins/aorai/tests/ya/other.c b/src/plugins/aorai/tests/ya/other.c index 4e13872dbf2b5ae2c6f44bb887577bfa91d3402e..c4977e2a37d1bd55cf58ded7ffe03019fe0d6f5e 100644 --- a/src/plugins/aorai/tests/ya/other.c +++ b/src/plugins/aorai/tests/ya/other.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ int x=0; diff --git a/src/plugins/aorai/tests/ya/saveload.i b/src/plugins/aorai/tests/ya/saveload.i new file mode 100644 index 0000000000000000000000000000000000000000..24fb0c24fecadc7208148311d896180e2eb04a72 --- /dev/null +++ b/src/plugins/aorai/tests/ya/saveload.i @@ -0,0 +1,16 @@ +/* run.config +NOFRAMAC: +EXECNOW: LOG @PTEST_NAME@.res.0.log BIN @PTEST_NAME@.sav @frama-c@ -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya @PTEST_FILE@ -save @PTEST_DIR@/result/@PTEST_NAME@.sav > @PTEST_DIR@/result/@PTEST_NAME@.res.0.log +EXECNOW: LOG @PTEST_NAME@.res.1.log @frama-c@ -load @PTEST_DIR@/result/@PTEST_NAME@.sav -then-on aorai -eva > @PTEST_DIR@/result/@PTEST_NAME@.res.1.log +*/ +/* run.config_prove +DONTRUN: +*/ + +void f () { } + +int main () { +f(); +Frama_C_show_aorai_state(); +return 0; +} diff --git a/src/plugins/aorai/tests/ya/saveload.ya b/src/plugins/aorai/tests/ya/saveload.ya new file mode 100644 index 0000000000000000000000000000000000000000..cb6e45d39cd57a0fffb13e72e281322b8857f579 --- /dev/null +++ b/src/plugins/aorai/tests/ya/saveload.ya @@ -0,0 +1,6 @@ +%init: init; +%deterministic; +%accept: accept; + +init: -> accept; +accept: -> accept; diff --git a/src/plugins/aorai/tests/ya/seq.i b/src/plugins/aorai/tests/ya/seq.i index f573a5491b319de72d6072634e78f3ebc33d5381..1ba54569e1265a39feb5116465e75c7547c1fb61 100644 --- a/src/plugins/aorai/tests/ya/seq.i +++ b/src/plugins/aorai/tests/ya/seq.i @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -load-module tests/Aorai_test.cmxs -aorai-acceptance -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -load-module tests/Aorai_test.cmxs -aorai-acceptance -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ void f() { } diff --git a/src/plugins/aorai/tests/ya/seq_loop.i b/src/plugins/aorai/tests/ya/seq_loop.i index 07cc7cf2a9b9593684429bbd6d0a1950f97818c1..bee4d37d3cf6133cb65ca4bb52f1beb98e427bbb 100644 --- a/src/plugins/aorai/tests/ya/seq_loop.i +++ b/src/plugins/aorai/tests/ya/seq_loop.i @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -load-module tests/Aorai_test.cmxs -aorai-acceptance -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -load-module tests/Aorai_test.cmxs -aorai-acceptance -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ void f() {} diff --git a/src/plugins/aorai/tests/ya/serial.c b/src/plugins/aorai/tests/ya/serial.c new file mode 100644 index 0000000000000000000000000000000000000000..9efe13a270bb6d0f69b7ec73c1522c4daf3c465e --- /dev/null +++ b/src/plugins/aorai/tests/ya/serial.c @@ -0,0 +1,99 @@ +/* run.config + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -load-module tests/Aorai_test.cmxs -aorai-smoke-tests -aorai-test-number @PTEST_NUMBER@ -aorai-no-acceptance -aorai-instrumentation-history 2 -aorai-no-generate-annotations -aorai-no-generate-deterministic-lemmas -then-last -eva -eva-partition-value n -eva-ilevel 256 +*/ +/* run.config_prove +OPT: -cpp-extra-args="-DFOR_WP" -aorai-automata @PTEST_DIR@/@PTEST_NAME@_wp.ya -load-module tests/Aorai_test.cmxs -aorai-smoke-tests -aorai-test-number @PTEST_NUMBER@ -aorai-no-acceptance @PROVE_OPTIONS@ +*/ + +#include "__fc_builtin.h" + +#ifndef FOR_WP +#define BW_AND & +#define BW_AND2 & +#define BW_AND3 & +#else +#define BW_AND == +#define BW_AND2 >= +#define BW_AND3 <= +#endif + +/*@ assigns \result,Frama_C_entropy_source \from Frama_C_entropy_source; + ensures 0 <= \result < 0x100; */ +int input_status(void) { + return Frama_C_interval(0x00, 0xff); +} + +/*@ assigns \result,Frama_C_entropy_source \from Frama_C_entropy_source; + ensures 0 <= \result < 0x100; */ +int input_data(void) { + return Frama_C_interval(0x00, 0xff); +} + +/*@ assigns \nothing; */ +void output(int x, int y) { + // do nothing +} + + +int read(int *status) +{ + int s = input_status(); + + if (s BW_AND2 0x01) { + *status = s BW_AND 0x0e; + return input_data(); + } + + return -1; +} + + +volatile int indefinitely; + +int buffer[5]; // buffer to store bytes +int n = 0; // number of bytes received + +void main(void) +{ + while (indefinitely) + { + int status; + int data = read(&status); + + if (data != -1) { // data is present + + if (status != 0) { // read issue + n = 0; + continue; + } + if (data BW_AND3 0x80) { // status received + if (n != 0) { // but data was expected + n = 0; + continue; + } + //@ split data & 0x40; + } + else { // data receieved + if (n == 0) { // but status was expected} + continue; + } + } + + buffer[n++] = data; + + if (n == 5) { // the packet is completely read + if ((buffer[0] BW_AND 0x40) == 0) // it is a release action + { + int x = buffer[1] + 0x80 * buffer[2]; + int y = buffer[3] + 0x80 * buffer[4]; + output(x, y); + /* "Error" state should show up as, for now, it is hard to prove + the metavariable équation in the input automaton */ + Frama_C_show_aorai_state(n,x,y); + } + + n = 0; + } + } + } +} diff --git a/src/plugins/aorai/tests/ya/serial.ya b/src/plugins/aorai/tests/ya/serial.ya new file mode 100644 index 0000000000000000000000000000000000000000..6e893819100f43bfb1a18da1cd6e2ecdfdf44bc7 --- /dev/null +++ b/src/plugins/aorai/tests/ya/serial.ya @@ -0,0 +1,160 @@ +%init : Wait1; +%deterministic; +%observables: input_status, input_data, output; + +$x1 : int; +$x2 : int; +$y1 : int; +$y2 : int; + +Error : { 0 == 1 } -> Error; + +Wait1 : + { CALL(input_status) } -> StatusReq1 +| { CALL(input_data) } -> Error +| { CALL(output) } -> Error +| other -> Wait1 +; + +Wait2 : + { CALL(input_status) } -> StatusReq2 +| { CALL(input_data) } -> Error +| { CALL(output) } -> Error +| other -> Wait2 +; + +Wait3 : + { CALL(input_status) } -> StatusReq3 +| { CALL(input_data) } -> Error +| { CALL(output) } -> Error +| other -> Wait3 +; + +Wait4 : + { CALL(input_status) } -> StatusReq4 +| { CALL(input_data) } -> Error +| { CALL(output) } -> Error +| other -> Wait4 +; + +Wait5 : + { CALL(input_status) } -> StatusReq5 +| { CALL(input_data) } -> Error +| { CALL(output) } -> Error +| other -> Wait5 +; + +StatusReq1 : + { input_status().\result & 1 == 0 } -> Wait1 +| { input_status().\result & 15 == 1 } -> StatusOk1 +| other -> StatusError +; + +StatusReq2 : + { input_status().\result & 1 == 0 } -> Wait2 +| { input_status().\result & 15 == 1 } -> StatusOk2 +| other -> StatusError +; + +StatusReq3 : + { input_status().\result & 1 == 0 } -> Wait3 +| { input_status().\result & 15 == 1 } -> StatusOk3 +| other -> StatusError +; + +StatusReq4 : + { input_status().\result & 1 == 0 } -> Wait4 +| { input_status().\result & 15 == 1 } -> StatusOk4 +| other -> StatusError +; + +StatusReq5 : + { input_status().\result & 1 == 0 } -> Wait5 +| { input_status().\result & 15 == 1 } -> StatusOk5 +| other -> StatusError +; + +StatusError : + { CALL(input_status) } -> StatusReq1 +| { CALL(input_data) } -> DataReqE +| { CALL(output) } -> Error +| other -> StatusError +; + +StatusOk1 : + { CALL(input_status) } -> StatusReq1 +| { CALL(input_data) } -> DataReq1 +| { CALL(output) } -> Error +| other -> StatusOk1 +; + +StatusOk2 : + { CALL(input_status) } -> StatusReq2 +| { CALL(input_data) } -> DataReq2 +| { CALL(output) } -> Error +| other -> StatusOk2 +; + +StatusOk3 : + { CALL(input_status) } -> StatusReq3 +| { CALL(input_data) } -> DataReq3 +| { CALL(output) } -> Error +| other -> StatusOk3 +; + +StatusOk4 : + { CALL(input_status) } -> StatusReq4 +| { CALL(input_data) } -> DataReq4 +| { CALL(output) } -> Error +| other -> StatusOk4 +; + +StatusOk5 : + { CALL(input_status) } -> StatusReq5 +| { CALL(input_data) } -> DataReq5 +| { CALL(output) } -> Error +| other -> StatusOk5 +; + +DataReqE : + { RETURN(input_data) } -> Wait1 +; + +DataReq1 : + { input_data().\result & 192 == 128 } -> Wait2 +| { input_data().\result & 192 == 192 } -> Wait1 +| { input_data().\result & 128 == 0 } -> Wait1 +; + +DataReq2 : + { input_data().\result & 192 == 128 } -> Wait2 +| { input_data().\result & 192 == 192 } -> Wait1 +| { input_data().\result & 128 == 0 } $x1 := \result; -> Wait3 +; + +DataReq3 : + { input_data().\result & 192 == 128 } -> Wait2 +| { input_data().\result & 192 == 192 } -> Wait1 +| { input_data().\result & 128 == 0 } $x2 := \result; -> Wait4 +; + +DataReq4 : + { input_data().\result & 192 == 128 } -> Wait2 +| { input_data().\result & 192 == 192 } -> Wait1 +| { input_data().\result & 128 == 0 } $y1 := \result; -> Wait5 +; + +DataReq5 : + { input_data().\result & 192 == 128 } -> Wait2 +| { input_data().\result & 192 == 192 } -> Wait1 +| { input_data().\result & 128 == 0 } $y2 := \result; -> Complete +; + +Complete : + { CALL(output) && output().x == $x1 + 128 * $x2 && output().y == $y1 + 128 * $y2 } -> Wait1 +| { CALL(output) && (output().x != $x1 + 128 * $x2 || output().y != $y1 + 128 * $y2) } -> Error +| { CALL(input_status) } -> StatusReq1 +| { CALL(input_data) } -> Error +| other -> Complete +; + diff --git a/src/plugins/aorai/tests/ya/serial_wp.ya b/src/plugins/aorai/tests/ya/serial_wp.ya new file mode 100644 index 0000000000000000000000000000000000000000..1a28de31009827dd8d4018f2f53cc67816a6b661 --- /dev/null +++ b/src/plugins/aorai/tests/ya/serial_wp.ya @@ -0,0 +1,159 @@ +%init : Wait1; +%deterministic; +%observables: input_status, input_data, output; + +$x1 : int; +$x2 : int; +$y1 : int; +$y2 : int; + +Error : { false } -> Error; + +Wait1 : + { CALL(input_status) } -> StatusReq1 +| { CALL(input_data) } -> Error +| { CALL(output) } -> Error +| other -> Wait1 +; + +Wait2 : + { CALL(input_status) } -> StatusReq2 +| { CALL(input_data) } -> Error +| { CALL(output) } -> Error +| other -> Wait2 +; + +Wait3 : + { CALL(input_status) } -> StatusReq3 +| { CALL(input_data) } -> Error +| { CALL(output) } -> Error +| other -> Wait3 +; + +Wait4 : + { CALL(input_status) } -> StatusReq4 +| { CALL(input_data) } -> Error +| { CALL(output) } -> Error +| other -> Wait4 +; + +Wait5 : + { CALL(input_status) } -> StatusReq5 +| { CALL(input_data) } -> Error +| { CALL(output) } -> Error +| other -> Wait5 +; + +StatusReq1 : + { input_status().\result < 1 } -> Wait1 +| { input_status().\result == 14 } -> StatusOk1 +| other -> StatusError +; + +StatusReq2 : + { input_status().\result < 1 } -> Wait2 +| { input_status().\result == 14 } -> StatusOk2 +| other -> StatusError +; + +StatusReq3 : + { input_status().\result < 1 } -> Wait3 +| { input_status().\result == 14 } -> StatusOk3 +| other -> StatusError +; + +StatusReq4 : + { input_status().\result < 1 } -> Wait4 +| { input_status().\result == 14 } -> StatusOk4 +| other -> StatusError +; + +StatusReq5 : + { input_status().\result < 1 } -> Wait5 +| { input_status().\result == 14 } -> StatusOk5 +| other -> StatusError +; + +StatusError : + { CALL(input_status) } -> StatusReq1 +| { CALL(input_data) } -> DataReqE +| { CALL(output) } -> Error +| other -> StatusError +; + +StatusOk1 : + { CALL(input_status) } -> StatusReq1 +| { CALL(input_data) } -> DataReq1 +| { CALL(output) } -> Error +| other -> StatusOk1 +; + +StatusOk2 : + { CALL(input_status) } -> StatusReq2 +| { CALL(input_data) } -> DataReq2 +| { CALL(output) } -> Error +| other -> StatusOk2 +; + +StatusOk3 : + { CALL(input_status) } -> StatusReq3 +| { CALL(input_data) } -> DataReq3 +| { CALL(output) } -> Error +| other -> StatusOk3 +; + +StatusOk4 : + { CALL(input_status) } -> StatusReq4 +| { CALL(input_data) } -> DataReq4 +| { CALL(output) } -> Error +| other -> StatusOk4 +; + +StatusOk5 : + { CALL(input_status) } -> StatusReq5 +| { CALL(input_data) } -> DataReq5 +| { CALL(output) } -> Error +| other -> StatusOk5 +; + +DataReqE : + { RETURN(input_data) } -> Wait1 +; + +DataReq1 : + { input_data().\result <= 128 && input_data().\result != 64 } -> Wait2 +| { input_data().\result == 64 } -> Wait1 +| { input_data().\result > 128 } -> Wait1 +; + +DataReq2 : + { input_data().\result <= 128 && input_data().\result != 64 } -> Wait2 +| { input_data().\result == 64 } -> Wait1 +| { input_data().\result > 128 } $x1 := \result; -> Wait3 +; + +DataReq3 : + { input_data().\result <= 128 && input_data().\result != 64 } -> Wait2 +| { input_data().\result == 64 } -> Wait1 +| { input_data().\result > 128 } $x2 := \result; -> Wait4 +; + +DataReq4 : + { input_data().\result <= 128 && input_data().\result != 64 } -> Wait2 +| { input_data().\result == 64 } -> Wait1 +| { input_data().\result > 128 } $y1 := \result; -> Wait5 +; + +DataReq5 : + { input_data().\result <= 128 && input_data().\result != 64 } -> Wait2 +| { input_data().\result == 64 } -> Wait1 +| { input_data().\result > 128 } $y2 := \result; -> Complete +; + +Complete : + { CALL(output) && output().x == $x1 + 128 * $x2 && output().y == $y1 + 128 * $y2 } -> Wait1 +| { CALL(output) && (output().x != $x1 + 128 * $x2 || output().y != $y1 + 128 * $y2) } -> Error +| { CALL(input_status) } -> StatusReq1 +| { CALL(input_data) } -> Error +| other -> Complete +; diff --git a/src/plugins/aorai/tests/ya/single_call.i b/src/plugins/aorai/tests/ya/single_call.i index 257ce2b2c7a4493ee42953dcff3b29bed8d29643..51abf5a7ef33870f78f6a029de9e3ebbb3330e69 100644 --- a/src/plugins/aorai/tests/ya/single_call.i +++ b/src/plugins/aorai/tests/ya/single_call.i @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -load-module tests/Aorai_test.cmxs -aorai-acceptance -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -load-module tests/Aorai_test.cmxs -aorai-acceptance -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ int main () {} diff --git a/src/plugins/aorai/tests/ya/singleassignment-right.i b/src/plugins/aorai/tests/ya/singleassignment-right.i index 943c3e5e67cf9c02fde3be2c6dc73b2fbaa07b7d..4c5612f51075bcfe936814e8492beb88f67935c4 100644 --- a/src/plugins/aorai/tests/ya/singleassignment-right.i +++ b/src/plugins/aorai/tests/ya/singleassignment-right.i @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ void main(int *x, int *y) diff --git a/src/plugins/aorai/tests/ya/singleassignment-wrong.i b/src/plugins/aorai/tests/ya/singleassignment-wrong.i index c983ce03e455dd3ac55c8baa1c76fc0785a8028f..4a88230c1c71bc1958ba3a68ca1a473d28633b66 100644 --- a/src/plugins/aorai/tests/ya/singleassignment-wrong.i +++ b/src/plugins/aorai/tests/ya/singleassignment-wrong.i @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ int main(int x) diff --git a/src/plugins/aorai/tests/ya/stack.i b/src/plugins/aorai/tests/ya/stack.i index b3a734178295ace67bf450f577e757095db612b1..d911301c6860deccbbf88ee8e2cecaf097232e3a 100644 --- a/src/plugins/aorai/tests/ya/stack.i +++ b/src/plugins/aorai/tests/ya/stack.i @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ diff --git a/src/plugins/aorai/tests/ya/test_acces_params.c b/src/plugins/aorai/tests/ya/test_acces_params.c index 884140ce9cab8b66952394937c1595f7a31dd37a..dc673f9bc593429faf4c8cadd396389fa5c115a7 100644 --- a/src/plugins/aorai/tests/ya/test_acces_params.c +++ b/src/plugins/aorai/tests/ya/test_acces_params.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ int status=0; diff --git a/src/plugins/aorai/tests/ya/test_acces_params2.c b/src/plugins/aorai/tests/ya/test_acces_params2.c index 86092179e3f19e4041f7d3f3b5b2623d073edf51..7f25f23facbb6f7de9782534fb2dc42e0e0515f0 100644 --- a/src/plugins/aorai/tests/ya/test_acces_params2.c +++ b/src/plugins/aorai/tests/ya/test_acces_params2.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ diff --git a/src/plugins/aorai/tests/ya/test_boucle_rechercheTableau.c b/src/plugins/aorai/tests/ya/test_boucle_rechercheTableau.c index 7dcf436cfe3bc7a95f03bb57faf63c8cca87b1b9..da220198440138b3924dddc99a92b9ea53794f5d 100644 --- a/src/plugins/aorai/tests/ya/test_boucle_rechercheTableau.c +++ b/src/plugins/aorai/tests/ya/test_boucle_rechercheTableau.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ diff --git a/src/plugins/aorai/tests/ya/test_factorial.c b/src/plugins/aorai/tests/ya/test_factorial.c index 9cb2213b68d6e23abeaed004b89d16e8b7a8d67e..fbb9762854cd43b3ef4c17245f2919486f58d4b8 100644 --- a/src/plugins/aorai/tests/ya/test_factorial.c +++ b/src/plugins/aorai/tests/ya/test_factorial.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ diff --git a/src/plugins/aorai/tests/ya/test_recursion4.c b/src/plugins/aorai/tests/ya/test_recursion4.c index cf4c5d8523a6c123692f77b03bb2a129b9e3c20c..e88b8471fb74d57f267b879b89fe4b2c3bdc803a 100644 --- a/src/plugins/aorai/tests/ya/test_recursion4.c +++ b/src/plugins/aorai/tests/ya/test_recursion4.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ # pragma JessieIntegerModel(math) diff --git a/src/plugins/aorai/tests/ya/test_recursion5.c b/src/plugins/aorai/tests/ya/test_recursion5.c index 241030e711241484c0f829e0a16101618649f832..0f902c0071f25495d236c849b770836a8b227ee4 100644 --- a/src/plugins/aorai/tests/ya/test_recursion5.c +++ b/src/plugins/aorai/tests/ya/test_recursion5.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ diff --git a/src/plugins/aorai/tests/ya/test_struct.c b/src/plugins/aorai/tests/ya/test_struct.c index 1b8ff3ec2ff039f6a94506b149db7d128961e656..d94c75970eb6a1897bc2cb560147174f73452bf3 100644 --- a/src/plugins/aorai/tests/ya/test_struct.c +++ b/src/plugins/aorai/tests/ya/test_struct.c @@ -1,5 +1,5 @@ /* run.config* - OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-test 1 -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ + OPT: -aorai-automata @PTEST_DIR@/@PTEST_NAME@.ya -aorai-acceptance -load-module tests/Aorai_test.cmxs -aorai-test-number @PTEST_NUMBER@ @PROVE_OPTIONS@ */ struct People{ diff --git a/src/plugins/aorai/yaparser.mly b/src/plugins/aorai/yaparser.mly index 3a88ed02f8f6e646fb116fe4846ee366ea58e190..699489687f31b95eaecdead54796d716fa0709a5 100644 --- a/src/plugins/aorai/yaparser.mly +++ b/src/plugins/aorai/yaparser.mly @@ -32,7 +32,11 @@ open Logic_ptree open Promelaast open Bool3 -type options = Deterministic | Init of string list | Accept of string list +type options = + | Deterministic + | Init of string list + | Accept of string list + | Observables of string list let to_seq c = [{ condition = Some c; @@ -104,13 +108,22 @@ let check_state st = Aorai_option.abort "Error: the state '%s' is used but never defined." st.name -let interpret_option = function +let interpret_option auto = function | Init states -> - List.iter set_init_state states + List.iter set_init_state states; auto | Accept states -> - List.iter set_accept_state states + List.iter set_accept_state states; auto | Deterministic -> - Aorai_option.Deterministic.set true + Aorai_option.Deterministic.set true; auto + | Observables names -> + let module Set = Datatype.String.Set in + let new_set = Set.of_list names in + let observables = + match auto.observables with + | None -> Some new_set + | Some set -> Some (Set.union set new_set) + in + { auto with observables } let build_automaton options metavariables trans = let htable_to_list table = Hashtbl.fold (fun _ st l -> st :: l) table [] in @@ -119,15 +132,15 @@ let build_automaton options metavariables trans = and metavariables = List.fold_left add_metavariable Datatype.String.Map.empty metavariables in - List.iter interpret_option options; + let auto = { states; trans; metavariables; observables = None } in + let auto = List.fold_left interpret_option auto options in List.iter check_state states; if not (List.exists (fun st -> st.init=True) states) then Aorai_option.abort "Automaton does not declare an initial state"; if undefined_states <> [] then Aorai_option.abort "Error: the state(s) %a are used but never defined." (Pretty_utils.pp_list ~sep:"," Format.pp_print_string) undefined_states; - { states; trans; metavariables } - + auto type pre_cond = Behavior of string | Pre of Promelaast.condition @@ -169,6 +182,7 @@ option | "init" -> Init $3 | "accept" -> Accept $3 | "deterministic" -> Deterministic + | "observables" -> Observables $3 | _ -> Aorai_option.abort "unknown option: '%s'" $2 } diff --git a/src/plugins/markdown-report/sarif_gen.ml b/src/plugins/markdown-report/sarif_gen.ml index 37fd6b824e300ae8820e6581f6eea17ac26aa84a..7c9df870307d17843e20bd6ecbdb3cc6163cf751 100644 --- a/src/plugins/markdown-report/sarif_gen.ml +++ b/src/plugins/markdown-report/sarif_gen.ml @@ -206,6 +206,7 @@ let gen_status ip = Sarif_result.create ~ruleId:user_annot_id ~level ~locations ~message () let gen_statuses () = + let cmp = Property.Ordered_by_function.compare in let f ip content = let exclude = is_alarm ip || @@ -213,7 +214,7 @@ let gen_statuses () = in if exclude then content else (gen_status ip) :: content in - List.rev (Property_status.fold f []) + List.rev (Property_status.fold_sorted ~cmp f []) let gen_artifacts () = let add_src_file f = diff --git a/src/plugins/markdown-report/tests/sarif/oracle/cwe125.sarif b/src/plugins/markdown-report/tests/sarif/oracle/cwe125.sarif index 5855585658f0d7aee1f680420db13842a321ca1f..01038bb8a72d1d607ca386bebf1c5ed0289b8063 100644 --- a/src/plugins/markdown-report/tests/sarif/oracle/cwe125.sarif +++ b/src/plugins/markdown-report/tests/sarif/oracle/cwe125.sarif @@ -120,7 +120,9 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function printf." }, + "message": { + "text": "reachability of stmt line 27 in getValueFromArray." + }, "locations": [ { "physicalLocation": { @@ -131,8 +133,8 @@ "region": { "startLine": 27, "endLine": 27, - "endColumn": 6, - "byteLength": 6 + "endColumn": 38, + "byteLength": 38 } } } @@ -165,9 +167,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term \\result in function printf." - }, + "message": { "text": "behavior default! in function printf." }, "locations": [ { "physicalLocation": { @@ -189,7 +189,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior default! in function printf." }, + "message": { "text": "assigns clause in function printf." }, "locations": [ { "physicalLocation": { @@ -212,7 +212,7 @@ "kind": "pass", "level": "none", "message": { - "text": "reachability of stmt line 27 in getValueFromArray." + "text": "from clause of term \\result in function printf." }, "locations": [ { @@ -224,8 +224,8 @@ "region": { "startLine": 27, "endLine": 27, - "endColumn": 38, - "byteLength": 38 + "endColumn": 6, + "byteLength": 6 } } } diff --git a/src/plugins/markdown-report/tests/sarif/oracle/with-libc.sarif b/src/plugins/markdown-report/tests/sarif/oracle/with-libc.sarif index fa8798f3f64f7402378d14b6c3f03f0c37f49400..f9bed3f4deea0fcb4cbf40cb71c14458a221fb72 100644 --- a/src/plugins/markdown-report/tests/sarif/oracle/with-libc.sarif +++ b/src/plugins/markdown-report/tests/sarif/oracle/with-libc.sarif @@ -50,22 +50,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term __fc_strtok_ptr in function strtok." - }, + "message": { "text": "MemChr." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 261, - "startColumn": 12, - "endLine": 261, - "endColumn": 27, - "byteLength": 15 + "startLine": 57, + "startColumn": 4, + "endLine": 59, + "endColumn": 62, + "byteLength": 134 } } } @@ -75,22 +73,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term \\result in function strcpy." - }, + "message": { "text": "MemCmp." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 356, - "startColumn": 12, - "endLine": 356, - "endColumn": 19, - "byteLength": 7 + "startLine": 39, + "startColumn": 4, + "endLine": 42, + "endColumn": 70, + "byteLength": 170 } } } @@ -100,20 +96,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior default! in function strnlen." }, + "message": { "text": "MemSet." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 135, - "startColumn": 14, - "endLine": 135, - "endColumn": 21, - "byteLength": 7 + "startLine": 68, + "startColumn": 4, + "endLine": 70, + "endColumn": 63, + "byteLength": 135 } } } @@ -123,20 +119,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function strcasecmp." }, + "message": { "text": "StrChr." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/strings.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 50, - "startColumn": 11, - "endLine": 50, - "endColumn": 21, - "byteLength": 10 + "startLine": 168, + "startColumn": 4, + "endLine": 170, + "endColumn": 75, + "byteLength": 132 } } } @@ -146,22 +142,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term \\result in function strpbrk." - }, + "message": { "text": "StrCmp." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 214, - "startColumn": 12, - "endLine": 214, - "endColumn": 19, - "byteLength": 7 + "startLine": 143, + "startColumn": 4, + "endLine": 147, + "endColumn": 63, + "byteLength": 170 } } } @@ -171,22 +165,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term \\result in function strncat." - }, + "message": { "text": "StrLen." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 433, - "startColumn": 12, - "endLine": 433, - "endColumn": 19, - "byteLength": 7 + "startLine": 132, + "startColumn": 4, + "endLine": 135, + "endColumn": 38, + "byteLength": 185 } } } @@ -196,22 +188,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term *(s + (0 ..)) in function strtok_r." - }, + "message": { "text": "StrNCmp." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 288, - "startColumn": 10, - "endLine": 288, - "endColumn": 16, - "byteLength": 6 + "startLine": 155, + "startColumn": 4, + "endLine": 159, + "endColumn": 53, + "byteLength": 191 } } } @@ -221,20 +211,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior partial in function strncpy." }, + "message": { "text": "WMemChr." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 378, - "startColumn": 12, - "endLine": 378, - "endColumn": 13, - "byteLength": 1 + "startLine": 183, + "startColumn": 4, + "endLine": 185, + "endColumn": 63, + "byteLength": 143 } } } @@ -244,22 +234,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term \\result in function strcat." - }, + "message": { "text": "WcsChr." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 414, - "startColumn": 12, - "endLine": 414, - "endColumn": 19, - "byteLength": 7 + "startLine": 266, + "startColumn": 4, + "endLine": 269, + "endColumn": 29, + "byteLength": 153 } } } @@ -269,20 +257,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior default in function strrchr." }, + "message": { "text": "WcsCmp." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 195, - "startColumn": 12, - "endLine": 195, - "endColumn": 13, - "byteLength": 1 + "startLine": 240, + "startColumn": 4, + "endLine": 244, + "endColumn": 63, + "byteLength": 173 } } } @@ -292,20 +280,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "dest_null_terminated." }, + "message": { "text": "WcsLen." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 417, - "startColumn": 34, - "endLine": 417, - "endColumn": 77, - "byteLength": 43 + "startLine": 230, + "startColumn": 4, + "endLine": 232, + "endColumn": 63, + "byteLength": 147 } } } @@ -315,20 +303,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior default! in function bzero." }, + "message": { "text": "WcsNCmp." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/strings.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 40, - "startColumn": 12, - "endLine": 40, - "endColumn": 17, - "byteLength": 5 + "startLine": 252, + "startColumn": 4, + "endLine": 256, + "endColumn": 53, + "byteLength": 194 } } } @@ -338,20 +326,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior new_str in function strtok_r." }, + "message": { "text": "dynamic_allocation." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/__fc_alloc_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 327, - "startColumn": 12, - "endLine": 327, - "endColumn": 13, - "byteLength": 1 + "startLine": 39, + "startColumn": 4, + "endLine": 41, + "endColumn": 61, + "byteLength": 110 } } } @@ -361,22 +349,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term __fc_strtok_ptr in function strtok." - }, + "message": { "text": "memchr_def." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 272, - "startColumn": 12, - "endLine": 272, - "endColumn": 27, - "byteLength": 15 + "startLine": 57, + "startColumn": 4, + "endLine": 59, + "endColumn": 62, + "byteLength": 134 } } } @@ -386,23 +372,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": - "from clause of term *(dest + (strlen{Old}(dest) .. strlen{Old}(dest) + n)) in function strncat." - }, + "message": { "text": "memcmp_strlen_left." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 439, - "startColumn": 12, - "endLine": 439, - "endColumn": 48, - "byteLength": 36 + "startLine": 119, + "startColumn": 4, + "endLine": 121, + "endColumn": 77, + "byteLength": 148 } } } @@ -412,20 +395,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_s." }, + "message": { "text": "memcmp_strlen_right." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 486, - "startColumn": 29, - "endLine": 486, - "endColumn": 49, - "byteLength": 20 + "startLine": 123, + "startColumn": 4, + "endLine": 125, + "endColumn": 77, + "byteLength": 149 } } } @@ -435,20 +418,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "room_string." }, + "message": { "text": "memcmp_strlen_shift_left." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 438, - "startColumn": 26, - "endLine": 438, - "endColumn": 64, - "byteLength": 38 + "startLine": 127, + "startColumn": 4, + "endLine": 130, + "endColumn": 38, + "byteLength": 184 } } } @@ -458,20 +441,43 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_s_or_delim_not_found." }, + "message": { "text": "memcmp_strlen_shift_right." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 258, - "startColumn": 6, - "endLine": 260, + "startLine": 132, + "startColumn": 4, + "endLine": 135, + "endColumn": 38, + "byteLength": 185 + } + } + } + ] + }, + { + "ruleId": "user-spec", + "kind": "pass", + "level": "none", + "message": { "text": "memcmp_zero." }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "libc/__fc_string_axiomatic.h", + "uriBaseId": "FRAMAC_SHARE" + }, + "region": { + "startLine": 39, + "startColumn": 4, + "endLine": 42, "endColumn": 70, - "byteLength": 120 + "byteLength": 170 } } } @@ -481,7 +487,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "wcslen_create_shift." }, + "message": { "text": "memset_def." }, "locations": [ { "physicalLocation": { @@ -490,11 +496,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 230, + "startLine": 68, "startColumn": 4, - "endLine": 232, + "endLine": 70, "endColumn": 63, - "byteLength": 147 + "byteLength": 135 } } } @@ -504,7 +510,30 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "StrChr." }, + "message": { "text": "never_allocable." }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "libc/__fc_alloc_axiomatic.h", + "uriBaseId": "FRAMAC_SHARE" + }, + "region": { + "startLine": 39, + "startColumn": 4, + "endLine": 41, + "endColumn": 61, + "byteLength": 110 + } + } + } + ] + }, + { + "ruleId": "user-spec", + "kind": "pass", + "level": "none", + "message": { "text": "strchr_def." }, "locations": [ { "physicalLocation": { @@ -527,22 +556,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term \\result in function memmove." - }, + "message": { "text": "strcmp_zero." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 107, - "startColumn": 12, - "endLine": 107, - "endColumn": 19, - "byteLength": 7 + "startLine": 143, + "startColumn": 4, + "endLine": 147, + "endColumn": 63, + "byteLength": 170 } } } @@ -552,20 +579,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function strchr." }, + "message": { "text": "strlen_at_null." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 173, - "startColumn": 12, - "endLine": 173, - "endColumn": 13, - "byteLength": 1 + "startLine": 92, + "startColumn": 4, + "endLine": 93, + "endColumn": 61, + "byteLength": 86 } } } @@ -575,7 +602,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "wcscmp_zero." }, + "message": { "text": "strlen_before_null." }, "locations": [ { "physicalLocation": { @@ -584,11 +611,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 240, + "startLine": 89, "startColumn": 4, - "endLine": 244, - "endColumn": 63, - "byteLength": 173 + "endLine": 90, + "endColumn": 72, + "byteLength": 101 } } } @@ -598,20 +625,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_valid_string." }, + "message": { "text": "strlen_create." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 164, - "startColumn": 33, - "endLine": 164, - "endColumn": 59, - "byteLength": 26 + "startLine": 111, + "startColumn": 4, + "endLine": 113, + "endColumn": 51, + "byteLength": 111 } } } @@ -621,20 +648,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "equal_prefix." }, + "message": { "text": "strlen_create_shift." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 376, - "startColumn": 26, - "endLine": 376, - "endColumn": 60, - "byteLength": 34 + "startLine": 115, + "startColumn": 4, + "endLine": 117, + "endColumn": 62, + "byteLength": 143 } } } @@ -644,20 +671,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_ptr." }, + "message": { "text": "strlen_neg." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 358, - "startColumn": 24, - "endLine": 358, - "endColumn": 39, - "byteLength": 15 + "startLine": 84, + "startColumn": 4, + "endLine": 87, + "endColumn": 22, + "byteLength": 109 } } } @@ -667,20 +694,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_same_base." }, + "message": { "text": "strlen_not_zero." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 177, - "startColumn": 30, - "endLine": 177, - "endColumn": 64, - "byteLength": 34 + "startLine": 95, + "startColumn": 4, + "endLine": 97, + "endColumn": 58, + "byteLength": 120 } } } @@ -690,20 +717,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_nstring_src." }, + "message": { "text": "strlen_pos_or_null." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 423, - "startColumn": 32, - "endLine": 423, - "endColumn": 58, - "byteLength": 26 + "startLine": 78, + "startColumn": 4, + "endLine": 82, + "endColumn": 40, + "byteLength": 169 } } } @@ -713,20 +740,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function strtok." }, + "message": { "text": "strlen_shift." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 246, - "startColumn": 10, - "endLine": 246, - "endColumn": 16, - "byteLength": 6 + "startLine": 107, + "startColumn": 4, + "endLine": 109, + "endColumn": 59, + "byteLength": 118 } } } @@ -736,20 +763,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "equal_after_copy." }, + "message": { "text": "strlen_sup." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 373, - "startColumn": 30, - "endLine": 373, + "startLine": 103, + "startColumn": 4, + "endLine": 105, "endColumn": 51, - "byteLength": 21 + "byteLength": 108 } } } @@ -759,20 +786,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_same_base." }, + "message": { "text": "strlen_zero." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 79, - "startColumn": 30, - "endLine": 79, - "endColumn": 66, - "byteLength": 36 + "startLine": 99, + "startColumn": 4, + "endLine": 101, + "endColumn": 59, + "byteLength": 117 } } } @@ -782,22 +809,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term \\result in function strsignal." - }, + "message": { "text": "strncmp_zero." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 518, - "startColumn": 12, - "endLine": 518, - "endColumn": 19, - "byteLength": 7 + "startLine": 155, + "startColumn": 4, + "endLine": 159, + "endColumn": 53, + "byteLength": 191 } } } @@ -807,20 +832,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_src." }, + "message": { "text": "wcschr_def." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 459, - "startColumn": 31, - "endLine": 459, - "endColumn": 53, - "byteLength": 22 + "startLine": 266, + "startColumn": 4, + "endLine": 269, + "endColumn": 29, + "byteLength": 153 } } } @@ -830,22 +855,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term \\result in function strdup." - }, + "message": { "text": "wcscmp_zero." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 480, - "startColumn": 12, - "endLine": 480, - "endColumn": 19, - "byteLength": 7 + "startLine": 240, + "startColumn": 4, + "endLine": 244, + "endColumn": 63, + "byteLength": 173 } } } @@ -855,20 +878,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function strcoll." }, + "message": { "text": "wcslen_at_null." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 155, - "startColumn": 11, - "endLine": 155, - "endColumn": 18, - "byteLength": 7 + "startLine": 207, + "startColumn": 4, + "endLine": 208, + "endColumn": 65, + "byteLength": 90 } } } @@ -878,20 +901,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_null_or_same_base." }, + "message": { "text": "wcslen_before_null." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 171, + "startLine": 204, "startColumn": 4, - "endLine": 171, - "endColumn": 60, - "byteLength": 56 + "endLine": 205, + "endColumn": 76, + "byteLength": 105 } } } @@ -901,20 +924,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_s." }, + "message": { "text": "wcslen_create." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 131, - "startColumn": 29, - "endLine": 131, - "endColumn": 53, - "byteLength": 24 + "startLine": 226, + "startColumn": 4, + "endLine": 228, + "endColumn": 52, + "byteLength": 115 } } } @@ -924,22 +947,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term \\result in function strndup." - }, + "message": { "text": "wcslen_create_shift." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 493, - "startColumn": 12, - "endLine": 493, - "endColumn": 19, - "byteLength": 7 + "startLine": 230, + "startColumn": 4, + "endLine": 232, + "endColumn": 63, + "byteLength": 147 } } } @@ -949,20 +970,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "not_first_call." }, + "message": { "text": "wcslen_neg." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 268, - "startColumn": 29, - "endLine": 268, - "endColumn": 53, - "byteLength": 24 + "startLine": 199, + "startColumn": 4, + "endLine": 202, + "endColumn": 22, + "byteLength": 113 } } } @@ -972,20 +993,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function memchr." }, + "message": { "text": "wcslen_not_zero." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 88, - "startColumn": 12, - "endLine": 88, - "endColumn": 13, - "byteLength": 1 + "startLine": 210, + "startColumn": 4, + "endLine": 212, + "endColumn": 59, + "byteLength": 124 } } } @@ -995,22 +1016,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term *saveptr in function strtok_r." - }, + "message": { "text": "wcslen_pos_or_null." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 316, - "startColumn": 12, - "endLine": 316, - "endColumn": 20, - "byteLength": 8 + "startLine": 193, + "startColumn": 4, + "endLine": 197, + "endColumn": 41, + "byteLength": 174 } } } @@ -1020,20 +1039,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "separation." }, + "message": { "text": "wcslen_shift." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 95, - "startColumn": 4, - "endLine": 95, - "endColumn": 62, - "byteLength": 58 + "startLine": 222, + "startColumn": 4, + "endLine": 224, + "endColumn": 55, + "byteLength": 117 } } } @@ -1043,20 +1062,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "room_nstring." }, + "message": { "text": "wcslen_sup." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 364, - "startColumn": 27, - "endLine": 364, - "endColumn": 50, - "byteLength": 23 + "startLine": 218, + "startColumn": 4, + "endLine": 220, + "endColumn": 52, + "byteLength": 112 } } } @@ -1066,20 +1085,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "acsl_c_equiv." }, + "message": { "text": "wcslen_zero." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 127, - "startColumn": 26, - "endLine": 127, - "endColumn": 46, - "byteLength": 20 + "startLine": 214, + "startColumn": 4, + "endLine": 216, + "endColumn": 60, + "byteLength": 121 } } } @@ -1089,23 +1108,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": - "from clause of term *(dest + (0 .. n - 1)) in function strncpy." - }, + "message": { "text": "wcsncmp_zero." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 367, - "startColumn": 12, - "endLine": 367, - "endColumn": 26, - "byteLength": 14 + "startLine": 252, + "startColumn": 4, + "endLine": 256, + "endColumn": 53, + "byteLength": 194 } } } @@ -1115,20 +1131,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "initialization." }, + "message": { "text": "wmemchr_def." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/__fc_string_axiomatic.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 370, - "startColumn": 28, - "endLine": 370, - "endColumn": 57, - "byteLength": 29 + "startLine": 183, + "startColumn": 4, + "endLine": 185, + "endColumn": 63, + "byteLength": 143 } } } @@ -1138,20 +1154,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "memcmp_strlen_left." }, + "message": { "text": "behavior default! in function bzero." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", + "uri": "libc/strings.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 119, - "startColumn": 4, - "endLine": 121, - "endColumn": 77, - "byteLength": 148 + "startLine": 40, + "startColumn": 12, + "endLine": 40, + "endColumn": 17, + "byteLength": 5 } } } @@ -1161,20 +1177,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function strlcat." }, + "message": { "text": "valid_memory_area." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/strings.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 451, - "startColumn": 12, - "endLine": 451, - "endColumn": 33, - "byteLength": 21 + "startLine": 36, + "startColumn": 32, + "endLine": 36, + "endColumn": 63, + "byteLength": 31 } } } @@ -1184,20 +1200,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "danglingness." }, + "message": { "text": "s_initialized." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/strings.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 74, - "startColumn": 8, - "endLine": 75, - "endColumn": 61, - "byteLength": 80 + "startLine": 38, + "startColumn": 39, + "endLine": 38, + "endColumn": 75, + "byteLength": 36 } } } @@ -1207,20 +1223,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_delim." }, + "message": { "text": "zero_initialized." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/strings.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 245, - "startColumn": 31, - "endLine": 245, - "endColumn": 55, - "byteLength": 24 + "startLine": 39, + "startColumn": 28, + "endLine": 39, + "endColumn": 63, + "byteLength": 35 } } } @@ -1230,20 +1246,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "allocation." }, + "message": { "text": "assigns clause in function bzero." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/strings.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 475, - "startColumn": 24, - "endLine": 475, - "endColumn": 49, - "byteLength": 25 + "startLine": 37, + "startColumn": 10, + "endLine": 37, + "endColumn": 31, + "byteLength": 21 } } } @@ -1253,20 +1269,23 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "memcmp_strlen_right." }, + "message": { + "text": + "from clause of term *((char *)s + (0 .. n - 1)) in function bzero." + }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", + "uri": "libc/strings.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 123, - "startColumn": 4, - "endLine": 125, - "endColumn": 77, - "byteLength": 149 + "startLine": 37, + "startColumn": 10, + "endLine": 37, + "endColumn": 31, + "byteLength": 21 } } } @@ -1276,20 +1295,22 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_null." }, + "message": { + "text": "specialization of valid_string_s at stmt 2." + }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", - "uriBaseId": "FRAMAC_SHARE" + "uri": "tests/sarif/libc.c", + "uriBaseId": "PWD" }, "region": { - "startLine": 190, - "startColumn": 25, - "endLine": 190, - "endColumn": 41, - "byteLength": 16 + "startLine": 13, + "startColumn": 10, + "endLine": 13, + "endColumn": 19, + "byteLength": 9 } } } @@ -1299,10 +1320,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": - "from clause of term *((char *)dest + (0 .. n - 1)) in function memcpy." - }, + "message": { "text": "behavior default! in function memchr." }, "locations": [ { "physicalLocation": { @@ -1311,11 +1329,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 96, + "startLine": 88, "startColumn": 12, - "endLine": 96, - "endColumn": 35, - "byteLength": 23 + "endLine": 88, + "endColumn": 13, + "byteLength": 1 } } } @@ -1325,7 +1343,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "initialization." }, + "message": { "text": "behavior found in function memchr." }, "locations": [ { "physicalLocation": { @@ -1334,11 +1352,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 71, - "startColumn": 8, - "endLine": 72, - "endColumn": 71, - "byteLength": 116 + "startLine": 88, + "startColumn": 12, + "endLine": 88, + "endColumn": 13, + "byteLength": 1 } } } @@ -1348,7 +1366,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_s1." }, + "message": { "text": "behavior not_found in function memchr." }, "locations": [ { "physicalLocation": { @@ -1357,11 +1375,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 151, - "startColumn": 30, - "endLine": 151, - "endColumn": 51, - "byteLength": 21 + "startLine": 88, + "startColumn": 12, + "endLine": 88, + "endColumn": 13, + "byteLength": 1 } } } @@ -1371,7 +1389,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_null." }, + "message": { "text": "valid." }, "locations": [ { "physicalLocation": { @@ -1380,11 +1398,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 168, - "startColumn": 25, - "endLine": 168, - "endColumn": 41, - "byteLength": 16 + "startLine": 68, + "startColumn": 9, + "endLine": 69, + "endColumn": 74, + "byteLength": 100 } } } @@ -1394,7 +1412,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "danglingness." }, + "message": { "text": "initialization." }, "locations": [ { "physicalLocation": { @@ -1403,11 +1421,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 59, - "startColumn": 30, - "endLine": 59, - "endColumn": 49, - "byteLength": 19 + "startLine": 71, + "startColumn": 8, + "endLine": 72, + "endColumn": 71, + "byteLength": 116 } } } @@ -1417,9 +1435,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term \\result in function strerror." - }, + "message": { "text": "danglingness." }, "locations": [ { "physicalLocation": { @@ -1428,11 +1444,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 342, - "startColumn": 12, - "endLine": 342, - "endColumn": 19, - "byteLength": 7 + "startLine": 74, + "startColumn": 8, + "endLine": 75, + "endColumn": 61, + "byteLength": 80 } } } @@ -1442,20 +1458,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "strlen_shift." }, + "message": { "text": "char_found." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", - "uriBaseId": "FRAMAC_SHARE" - }, - "region": { - "startLine": 107, - "startColumn": 4, - "endLine": 109, - "endColumn": 59, - "byteLength": 118 + "uri": "libc/string.h", + "uriBaseId": "FRAMAC_SHARE" + }, + "region": { + "startLine": 78, + "startColumn": 24, + "endLine": 78, + "endColumn": 44, + "byteLength": 20 } } } @@ -1465,7 +1481,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior not_found in function strrchr." }, + "message": { "text": "char_not_found." }, "locations": [ { "physicalLocation": { @@ -1474,11 +1490,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 195, - "startColumn": 12, - "endLine": 195, - "endColumn": 13, - "byteLength": 1 + "startLine": 85, + "startColumn": 28, + "endLine": 85, + "endColumn": 49, + "byteLength": 21 } } } @@ -1488,7 +1504,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "cannot_allocate." }, + "message": { "text": "result_same_base." }, "locations": [ { "physicalLocation": { @@ -1497,11 +1513,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 501, - "startColumn": 29, - "endLine": 501, - "endColumn": 64, - "byteLength": 35 + "startLine": 79, + "startColumn": 30, + "endLine": 79, + "endColumn": 66, + "byteLength": 36 } } } @@ -1511,7 +1527,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior default! in function strcasestr." }, + "message": { "text": "result_char." }, "locations": [ { "physicalLocation": { @@ -1520,11 +1536,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 239, - "startColumn": 12, - "endLine": 239, - "endColumn": 13, - "byteLength": 1 + "startLine": 80, + "startColumn": 25, + "endLine": 80, + "endColumn": 45, + "byteLength": 20 } } } @@ -1534,7 +1550,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "ptr_subset." }, + "message": { "text": "result_in_str." }, "locations": [ { "physicalLocation": { @@ -1543,11 +1559,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 265, - "startColumn": 24, - "endLine": 265, - "endColumn": 57, - "byteLength": 33 + "startLine": 81, + "startColumn": 27, + "endLine": 83, + "endColumn": 54, + "byteLength": 120 } } } @@ -1557,7 +1573,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function strncpy." }, + "message": { "text": "result_null." }, "locations": [ { "physicalLocation": { @@ -1566,11 +1582,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 367, - "startColumn": 12, - "endLine": 367, - "endColumn": 26, - "byteLength": 14 + "startLine": 86, + "startColumn": 25, + "endLine": 86, + "endColumn": 41, + "byteLength": 16 } } } @@ -1580,7 +1596,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_s1." }, + "message": { "text": "assigns clause in function memchr." }, "locations": [ { "physicalLocation": { @@ -1589,11 +1605,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 55, - "startColumn": 23, - "endLine": 55, - "endColumn": 49, - "byteLength": 26 + "startLine": 88, + "startColumn": 12, + "endLine": 88, + "endColumn": 13, + "byteLength": 1 } } } @@ -1603,7 +1619,9 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior complete in function strncat." }, + "message": { + "text": "from clause of term \\result in function memchr." + }, "locations": [ { "physicalLocation": { @@ -1612,11 +1630,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 444, + "startLine": 76, "startColumn": 12, - "endLine": 444, - "endColumn": 13, - "byteLength": 1 + "endLine": 76, + "endColumn": 19, + "byteLength": 7 } } } @@ -1626,7 +1644,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_s." }, + "message": { "text": "behavior default! in function memcmp." }, "locations": [ { "physicalLocation": { @@ -1635,11 +1653,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 125, - "startColumn": 29, - "endLine": 125, - "endColumn": 49, - "byteLength": 20 + "startLine": 65, + "startColumn": 11, + "endLine": 65, + "endColumn": 17, + "byteLength": 6 } } } @@ -1649,9 +1667,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term \\result in function strcoll." - }, + "message": { "text": "valid_s1." }, "locations": [ { "physicalLocation": { @@ -1660,11 +1676,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 153, - "startColumn": 12, - "endLine": 153, - "endColumn": 19, - "byteLength": 7 + "startLine": 55, + "startColumn": 23, + "endLine": 55, + "endColumn": 49, + "byteLength": 26 } } } @@ -1674,9 +1690,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "result_valid_string_bounded_and_same_prefix." - }, + "message": { "text": "valid_s2." }, "locations": [ { "physicalLocation": { @@ -1685,11 +1699,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 497, - "startColumn": 4, - "endLine": 499, - "endColumn": 29, - "byteLength": 124 + "startLine": 56, + "startColumn": 23, + "endLine": 56, + "endColumn": 49, + "byteLength": 26 } } } @@ -1699,7 +1713,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_s." }, + "message": { "text": "initialization." }, "locations": [ { "physicalLocation": { @@ -1708,11 +1722,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 204, - "startColumn": 29, - "endLine": 204, - "endColumn": 49, - "byteLength": 20 + "startLine": 57, + "startColumn": 32, + "endLine": 57, + "endColumn": 68, + "byteLength": 36 } } } @@ -1722,7 +1736,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior allocation in function strndup." }, + "message": { "text": "initialization." }, "locations": [ { "physicalLocation": { @@ -1731,11 +1745,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 506, - "startColumn": 12, - "endLine": 506, - "endColumn": 13, - "byteLength": 1 + "startLine": 58, + "startColumn": 32, + "endLine": 58, + "endColumn": 68, + "byteLength": 36 } } } @@ -1745,10 +1759,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": - "from clause of term *(__fc_strtok_ptr + (0 ..)) in function strtok." - }, + "message": { "text": "danglingness." }, "locations": [ { "physicalLocation": { @@ -1757,11 +1768,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 248, - "startColumn": 10, - "endLine": 248, - "endColumn": 30, - "byteLength": 20 + "startLine": 59, + "startColumn": 30, + "endLine": 59, + "endColumn": 49, + "byteLength": 19 } } } @@ -1771,7 +1782,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "char_not_found." }, + "message": { "text": "danglingness." }, "locations": [ { "physicalLocation": { @@ -1780,11 +1791,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 189, - "startColumn": 28, - "endLine": 189, - "endColumn": 40, - "byteLength": 12 + "startLine": 60, + "startColumn": 30, + "endLine": 60, + "endColumn": 49, + "byteLength": 19 } } } @@ -1794,7 +1805,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "disjoint clause in function strtok." }, + "message": { "text": "logic_spec." }, "locations": [ { "physicalLocation": { @@ -1803,11 +1814,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 283, - "startColumn": 12, - "endLine": 283, - "endColumn": 13, - "byteLength": 1 + "startLine": 63, + "startColumn": 24, + "endLine": 63, + "endColumn": 73, + "byteLength": 49 } } } @@ -1817,9 +1828,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term \\result in function strndup." - }, + "message": { "text": "assigns clause in function memcmp." }, "locations": [ { "physicalLocation": { @@ -1828,11 +1837,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 488, - "startColumn": 12, - "endLine": 488, - "endColumn": 19, - "byteLength": 7 + "startLine": 65, + "startColumn": 11, + "endLine": 65, + "endColumn": 17, + "byteLength": 6 } } } @@ -1842,7 +1851,9 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "s_not_null." }, + "message": { + "text": "from clause of term \\result in function memcmp." + }, "locations": [ { "physicalLocation": { @@ -1851,11 +1862,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 256, - "startColumn": 24, - "endLine": 256, - "endColumn": 34, - "byteLength": 10 + "startLine": 61, + "startColumn": 12, + "endLine": 61, + "endColumn": 19, + "byteLength": 7 } } } @@ -1865,7 +1876,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid." }, + "message": { "text": "behavior default! in function memcpy." }, "locations": [ { "physicalLocation": { @@ -1874,11 +1885,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 68, - "startColumn": 9, - "endLine": 69, - "endColumn": 74, - "byteLength": 100 + "startLine": 101, + "startColumn": 12, + "endLine": 101, + "endColumn": 13, + "byteLength": 1 } } } @@ -1888,7 +1899,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_accept." }, + "message": { "text": "valid_dest." }, "locations": [ { "physicalLocation": { @@ -1897,11 +1908,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 213, - "startColumn": 34, - "endLine": 213, - "endColumn": 59, - "byteLength": 25 + "startLine": 92, + "startColumn": 25, + "endLine": 92, + "endColumn": 48, + "byteLength": 23 } } } @@ -1911,7 +1922,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior not_found in function memchr." }, + "message": { "text": "valid_src." }, "locations": [ { "physicalLocation": { @@ -1920,11 +1931,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 88, - "startColumn": 12, - "endLine": 88, - "endColumn": 13, - "byteLength": 1 + "startLine": 93, + "startColumn": 24, + "endLine": 93, + "endColumn": 51, + "byteLength": 27 } } } @@ -1934,7 +1945,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function strspn." }, + "message": { "text": "separation." }, "locations": [ { "physicalLocation": { @@ -1943,11 +1954,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 206, - "startColumn": 12, - "endLine": 206, - "endColumn": 19, - "byteLength": 7 + "startLine": 95, + "startColumn": 4, + "endLine": 95, + "endColumn": 62, + "byteLength": 58 } } } @@ -1957,7 +1968,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "initialization." }, + "message": { "text": "copied_contents." }, "locations": [ { "physicalLocation": { @@ -1966,11 +1977,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 58, - "startColumn": 32, - "endLine": 58, - "endColumn": 68, - "byteLength": 36 + "startLine": 98, + "startColumn": 29, + "endLine": 98, + "endColumn": 76, + "byteLength": 47 } } } @@ -1980,20 +1991,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "strlen_before_null." }, + "message": { "text": "result_ptr." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 89, - "startColumn": 4, - "endLine": 90, - "endColumn": 72, - "byteLength": 101 + "startLine": 99, + "startColumn": 24, + "endLine": 99, + "endColumn": 39, + "byteLength": 15 } } } @@ -2003,7 +2014,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function strlen." }, + "message": { "text": "assigns clause in function memcpy." }, "locations": [ { "physicalLocation": { @@ -2012,11 +2023,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 129, - "startColumn": 14, - "endLine": 129, - "endColumn": 20, - "byteLength": 6 + "startLine": 96, + "startColumn": 12, + "endLine": 96, + "endColumn": 35, + "byteLength": 23 } } } @@ -2026,7 +2037,10 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior default! in function strlcpy." }, + "message": { + "text": + "from clause of term *((char *)dest + (0 .. n - 1)) in function memcpy." + }, "locations": [ { "physicalLocation": { @@ -2035,11 +2049,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 393, - "startColumn": 7, - "endLine": 393, - "endColumn": 14, - "byteLength": 7 + "startLine": 96, + "startColumn": 12, + "endLine": 96, + "endColumn": 35, + "byteLength": 23 } } } @@ -2049,7 +2063,9 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "separation." }, + "message": { + "text": "from clause of term \\result in function memcpy." + }, "locations": [ { "physicalLocation": { @@ -2058,11 +2074,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 354, - "startColumn": 4, - "endLine": 354, - "endColumn": 59, - "byteLength": 55 + "startLine": 97, + "startColumn": 12, + "endLine": 97, + "endColumn": 19, + "byteLength": 7 } } } @@ -2072,7 +2088,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior default in function strchr." }, + "message": { "text": "behavior default! in function memmove." }, "locations": [ { "physicalLocation": { @@ -2081,9 +2097,9 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 173, + "startLine": 111, "startColumn": 12, - "endLine": 173, + "endLine": 111, "endColumn": 13, "byteLength": 1 } @@ -2095,7 +2111,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "complete clause in function strtok_r." }, + "message": { "text": "valid_dest." }, "locations": [ { "physicalLocation": { @@ -2104,11 +2120,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 327, - "startColumn": 12, - "endLine": 327, - "endColumn": 13, - "byteLength": 1 + "startLine": 104, + "startColumn": 25, + "endLine": 104, + "endColumn": 48, + "byteLength": 23 } } } @@ -2118,10 +2134,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": - "from clause of term *(dest + (strlen{Old}(dest) .. strlen{Old}(dest) + n)) in function strncat." - }, + "message": { "text": "valid_src." }, "locations": [ { "physicalLocation": { @@ -2130,11 +2143,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 425, - "startColumn": 12, - "endLine": 425, - "endColumn": 50, - "byteLength": 38 + "startLine": 105, + "startColumn": 24, + "endLine": 105, + "endColumn": 51, + "byteLength": 27 } } } @@ -2144,7 +2157,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior no_allocation in function strdup." }, + "message": { "text": "copied_contents." }, "locations": [ { "physicalLocation": { @@ -2153,11 +2166,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 484, - "startColumn": 12, - "endLine": 484, - "endColumn": 13, - "byteLength": 1 + "startLine": 108, + "startColumn": 29, + "endLine": 108, + "endColumn": 76, + "byteLength": 47 } } } @@ -2167,7 +2180,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior default! in function strcat." }, + "message": { "text": "result_ptr." }, "locations": [ { "physicalLocation": { @@ -2176,11 +2189,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 420, - "startColumn": 12, - "endLine": 420, - "endColumn": 13, - "byteLength": 1 + "startLine": 109, + "startColumn": 24, + "endLine": 109, + "endColumn": 39, + "byteLength": 15 } } } @@ -2190,20 +2203,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "StrCmp." }, + "message": { "text": "assigns clause in function memmove." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 143, - "startColumn": 4, - "endLine": 147, - "endColumn": 63, - "byteLength": 170 + "startLine": 106, + "startColumn": 12, + "endLine": 106, + "endColumn": 35, + "byteLength": 23 } } } @@ -2213,20 +2226,23 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "strlen_at_null." }, + "message": { + "text": + "from clause of term *((char *)dest + (0 .. n - 1)) in function memmove." + }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 92, - "startColumn": 4, - "endLine": 93, - "endColumn": 61, - "byteLength": 86 + "startLine": 106, + "startColumn": 12, + "endLine": 106, + "endColumn": 35, + "byteLength": 23 } } } @@ -2237,8 +2253,7 @@ "kind": "pass", "level": "none", "message": { - "text": - "from clause of term *(*saveptr + (0 ..)) in function strtok_r." + "text": "from clause of term \\result in function memmove." }, "locations": [ { @@ -2248,11 +2263,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 290, - "startColumn": 10, - "endLine": 290, - "endColumn": 25, - "byteLength": 15 + "startLine": 107, + "startColumn": 12, + "endLine": 107, + "endColumn": 19, + "byteLength": 7 } } } @@ -2262,7 +2277,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior default! in function strspn." }, + "message": { "text": "behavior default! in function memset." }, "locations": [ { "physicalLocation": { @@ -2271,11 +2286,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 210, - "startColumn": 14, - "endLine": 210, - "endColumn": 20, - "byteLength": 6 + "startLine": 121, + "startColumn": 12, + "endLine": 121, + "endColumn": 13, + "byteLength": 1 } } } @@ -2285,7 +2300,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_s2." }, + "message": { "text": "valid_s." }, "locations": [ { "physicalLocation": { @@ -2294,11 +2309,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 138, - "startColumn": 30, - "endLine": 138, - "endColumn": 51, - "byteLength": 21 + "startLine": 115, + "startColumn": 22, + "endLine": 115, + "endColumn": 42, + "byteLength": 20 } } } @@ -2308,7 +2323,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_char." }, + "message": { "text": "acsl_c_equiv." }, "locations": [ { "physicalLocation": { @@ -2317,10 +2332,10 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 80, - "startColumn": 25, - "endLine": 80, - "endColumn": 45, + "startLine": 118, + "startColumn": 26, + "endLine": 118, + "endColumn": 46, "byteLength": 20 } } @@ -2331,7 +2346,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function strlcpy." }, + "message": { "text": "result_ptr." }, "locations": [ { "physicalLocation": { @@ -2340,10 +2355,10 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 388, - "startColumn": 12, - "endLine": 388, - "endColumn": 24, + "startLine": 119, + "startColumn": 24, + "endLine": 119, + "endColumn": 36, "byteLength": 12 } } @@ -2354,23 +2369,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": - "from clause of term *((char *)s + (0 .. n - 1)) in function bzero." - }, + "message": { "text": "assigns clause in function memset." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/strings.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 37, - "startColumn": 10, - "endLine": 37, - "endColumn": 31, - "byteLength": 21 + "startLine": 116, + "startColumn": 12, + "endLine": 116, + "endColumn": 32, + "byteLength": 20 } } } @@ -2380,7 +2392,10 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_in_str." }, + "message": { + "text": + "from clause of term *((char *)s + (0 .. n - 1)) in function memset." + }, "locations": [ { "physicalLocation": { @@ -2389,11 +2404,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 81, - "startColumn": 27, - "endLine": 83, - "endColumn": 54, - "byteLength": 120 + "startLine": 116, + "startColumn": 12, + "endLine": 116, + "endColumn": 32, + "byteLength": 20 } } } @@ -2403,7 +2418,9 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "char_found." }, + "message": { + "text": "from clause of term \\result in function memset." + }, "locations": [ { "physicalLocation": { @@ -2412,11 +2429,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 78, - "startColumn": 24, - "endLine": 78, - "endColumn": 44, - "byteLength": 20 + "startLine": 117, + "startColumn": 12, + "endLine": 117, + "endColumn": 19, + "byteLength": 7 } } } @@ -2426,20 +2443,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "MemChr." }, + "message": { "text": "behavior default! in function stpcpy." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 57, - "startColumn": 4, - "endLine": 59, - "endColumn": 62, - "byteLength": 134 + "startLine": 405, + "startColumn": 12, + "endLine": 405, + "endColumn": 13, + "byteLength": 1 } } } @@ -2449,9 +2466,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term \\result in function strtok_r." - }, + "message": { "text": "valid_string_src." }, "locations": [ { "physicalLocation": { @@ -2460,11 +2475,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 319, - "startColumn": 12, - "endLine": 319, - "endColumn": 19, - "byteLength": 7 + "startLine": 396, + "startColumn": 31, + "endLine": 396, + "endColumn": 53, + "byteLength": 22 } } } @@ -2474,7 +2489,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "char_found." }, + "message": { "text": "room_string." }, "locations": [ { "physicalLocation": { @@ -2483,11 +2498,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 184, - "startColumn": 24, - "endLine": 184, - "endColumn": 35, - "byteLength": 11 + "startLine": 397, + "startColumn": 26, + "endLine": 397, + "endColumn": 55, + "byteLength": 29 } } } @@ -2497,9 +2512,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term \\result in function strtok." - }, + "message": { "text": "separation." }, "locations": [ { "physicalLocation": { @@ -2508,11 +2521,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 250, - "startColumn": 10, - "endLine": 250, - "endColumn": 17, - "byteLength": 7 + "startLine": 399, + "startColumn": 4, + "endLine": 399, + "endColumn": 59, + "byteLength": 55 } } } @@ -2522,7 +2535,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_src." }, + "message": { "text": "equal_contents." }, "locations": [ { "physicalLocation": { @@ -2531,11 +2544,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 396, - "startColumn": 31, - "endLine": 396, - "endColumn": 53, - "byteLength": 22 + "startLine": 402, + "startColumn": 28, + "endLine": 402, + "endColumn": 49, + "byteLength": 21 } } } @@ -2545,7 +2558,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function strtok." }, + "message": { "text": "points_to_end." }, "locations": [ { "physicalLocation": { @@ -2554,11 +2567,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 269, - "startColumn": 12, - "endLine": 269, - "endColumn": 32, - "byteLength": 20 + "startLine": 403, + "startColumn": 27, + "endLine": 403, + "endColumn": 57, + "byteLength": 30 } } } @@ -2568,20 +2581,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "wcslen_at_null." }, + "message": { "text": "assigns clause in function stpcpy." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 207, - "startColumn": 4, - "endLine": 208, - "endColumn": 65, - "byteLength": 90 + "startLine": 400, + "startColumn": 12, + "endLine": 400, + "endColumn": 32, + "byteLength": 20 } } } @@ -2591,7 +2604,10 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_valid_string." }, + "message": { + "text": + "from clause of term *(dest + (0 .. strlen{Old}(src))) in function stpcpy." + }, "locations": [ { "physicalLocation": { @@ -2600,11 +2616,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 187, - "startColumn": 33, - "endLine": 187, - "endColumn": 59, - "byteLength": 26 + "startLine": 400, + "startColumn": 12, + "endLine": 400, + "endColumn": 32, + "byteLength": 20 } } } @@ -2614,7 +2630,9 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_src_fits." }, + "message": { + "text": "from clause of term \\result in function stpcpy." + }, "locations": [ { "physicalLocation": { @@ -2623,11 +2641,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 429, - "startColumn": 35, - "endLine": 429, - "endColumn": 77, - "byteLength": 42 + "startLine": 401, + "startColumn": 12, + "endLine": 401, + "endColumn": 19, + "byteLength": 7 } } } @@ -2637,20 +2655,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_null_or_in_haystack." }, + "message": { "text": "behavior default! in function strcasecmp." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/strings.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 236, - "startColumn": 4, - "endLine": 237, - "endColumn": 65, - "byteLength": 82 + "startLine": 50, + "startColumn": 11, + "endLine": 50, + "endColumn": 21, + "byteLength": 10 } } } @@ -2660,20 +2678,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior default! in function memset." }, + "message": { "text": "valid_string_s1." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/strings.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 121, - "startColumn": 12, - "endLine": 121, - "endColumn": 13, - "byteLength": 1 + "startLine": 46, + "startColumn": 28, + "endLine": 46, + "endColumn": 49, + "byteLength": 21 } } } @@ -2683,20 +2701,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_first_occur." }, + "message": { "text": "valid_string_s2." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/strings.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 165, - "startColumn": 32, - "endLine": 165, - "endColumn": 79, - "byteLength": 47 + "startLine": 47, + "startColumn": 28, + "endLine": 47, + "endColumn": 49, + "byteLength": 21 } } } @@ -2706,20 +2724,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function strtok_r." }, + "message": { "text": "assigns clause in function strcasecmp." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/strings.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 313, - "startColumn": 12, - "endLine": 313, - "endColumn": 27, - "byteLength": 15 + "startLine": 50, + "startColumn": 11, + "endLine": 50, + "endColumn": 21, + "byteLength": 10 } } } @@ -2729,20 +2747,22 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "room_string." }, + "message": { + "text": "from clause of term \\result in function strcasecmp." + }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/strings.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 430, - "startColumn": 26, - "endLine": 430, - "endColumn": 74, - "byteLength": 48 + "startLine": 48, + "startColumn": 10, + "endLine": 48, + "endColumn": 17, + "byteLength": 7 } } } @@ -2752,7 +2772,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "initialization." }, + "message": { "text": "behavior default! in function strcasestr." }, "locations": [ { "physicalLocation": { @@ -2761,11 +2781,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 312, - "startColumn": 37, - "endLine": 312, - "endColumn": 58, - "byteLength": 21 + "startLine": 239, + "startColumn": 12, + "endLine": 239, + "endColumn": 13, + "byteLength": 1 } } } @@ -2775,20 +2795,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "WMemChr." }, + "message": { "text": "valid_string_haystack." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 183, - "startColumn": 4, - "endLine": 185, + "startLine": 231, + "startColumn": 36, + "endLine": 231, "endColumn": 63, - "byteLength": 143 + "byteLength": 27 } } } @@ -2798,7 +2818,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior default! in function strcmp." }, + "message": { "text": "valid_string_needle." }, "locations": [ { "physicalLocation": { @@ -2807,11 +2827,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 142, - "startColumn": 11, - "endLine": 142, - "endColumn": 17, - "byteLength": 6 + "startLine": 232, + "startColumn": 34, + "endLine": 232, + "endColumn": 59, + "byteLength": 25 } } } @@ -2821,20 +2841,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_s1." }, + "message": { "text": "result_null_or_in_haystack." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/strings.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 46, - "startColumn": 28, - "endLine": 46, - "endColumn": 49, - "byteLength": 21 + "startLine": 236, + "startColumn": 4, + "endLine": 237, + "endColumn": 65, + "byteLength": 82 } } } @@ -2844,20 +2864,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function bzero." }, + "message": { "text": "assigns clause in function strcasestr." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/strings.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 37, - "startColumn": 10, - "endLine": 37, - "endColumn": 31, - "byteLength": 21 + "startLine": 239, + "startColumn": 12, + "endLine": 239, + "endColumn": 13, + "byteLength": 1 } } } @@ -2868,8 +2888,7 @@ "kind": "pass", "level": "none", "message": { - "text": - "from clause of term *(dest + (0 .. strlen{Old}(src))) in function strcpy." + "text": "from clause of term \\result in function strcasestr." }, "locations": [ { @@ -2879,11 +2898,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 355, + "startLine": 233, "startColumn": 12, - "endLine": 355, - "endColumn": 32, - "byteLength": 20 + "endLine": 233, + "endColumn": 19, + "byteLength": 7 } } } @@ -2893,7 +2912,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_delim." }, + "message": { "text": "behavior default! in function strcat." }, "locations": [ { "physicalLocation": { @@ -2902,11 +2921,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 286, - "startColumn": 31, - "endLine": 286, - "endColumn": 55, - "byteLength": 24 + "startLine": 420, + "startColumn": 12, + "endLine": 420, + "endColumn": 13, + "byteLength": 1 } } } @@ -2916,7 +2935,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior partial in function strncat." }, + "message": { "text": "valid_string_src." }, "locations": [ { "physicalLocation": { @@ -2925,11 +2944,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 444, - "startColumn": 12, - "endLine": 444, - "endColumn": 13, - "byteLength": 1 + "startLine": 408, + "startColumn": 31, + "endLine": 408, + "endColumn": 53, + "byteLength": 22 } } } @@ -2939,7 +2958,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_ptr." }, + "message": { "text": "valid_string_dest." }, "locations": [ { "physicalLocation": { @@ -2948,11 +2967,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 418, - "startColumn": 24, - "endLine": 418, - "endColumn": 39, - "byteLength": 15 + "startLine": 409, + "startColumn": 32, + "endLine": 409, + "endColumn": 50, + "byteLength": 18 } } } @@ -2962,7 +2981,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_ptr." }, + "message": { "text": "room_string." }, "locations": [ { "physicalLocation": { @@ -2971,11 +2990,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 109, - "startColumn": 24, - "endLine": 109, - "endColumn": 39, - "byteLength": 15 + "startLine": 410, + "startColumn": 26, + "endLine": 410, + "endColumn": 70, + "byteLength": 44 } } } @@ -2985,7 +3004,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function strdup." }, + "message": { "text": "sum_of_lengths." }, "locations": [ { "physicalLocation": { @@ -2994,11 +3013,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 484, - "startColumn": 12, - "endLine": 484, - "endColumn": 13, - "byteLength": 1 + "startLine": 413, + "startColumn": 28, + "endLine": 413, + "endColumn": 76, + "byteLength": 48 } } } @@ -3008,7 +3027,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "equal_contents." }, + "message": { "text": "initialization." }, "locations": [ { "physicalLocation": { @@ -3017,11 +3036,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 357, - "startColumn": 28, - "endLine": 357, - "endColumn": 49, - "byteLength": 21 + "startLine": 416, + "startColumn": 4, + "endLine": 416, + "endColumn": 60, + "byteLength": 56 } } } @@ -3031,7 +3050,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function strstr." }, + "message": { "text": "dest_null_terminated." }, "locations": [ { "physicalLocation": { @@ -3040,11 +3059,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 229, - "startColumn": 12, - "endLine": 229, - "endColumn": 13, - "byteLength": 1 + "startLine": 417, + "startColumn": 34, + "endLine": 417, + "endColumn": 77, + "byteLength": 43 } } } @@ -3054,9 +3073,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term \\result in function strchrnul." - }, + "message": { "text": "result_ptr." }, "locations": [ { "physicalLocation": { @@ -3065,11 +3082,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 176, - "startColumn": 12, - "endLine": 176, - "endColumn": 19, - "byteLength": 7 + "startLine": 418, + "startColumn": 24, + "endLine": 418, + "endColumn": 39, + "byteLength": 15 } } } @@ -3079,7 +3096,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_src." }, + "message": { "text": "assigns clause in function strcat." }, "locations": [ { "physicalLocation": { @@ -3088,11 +3105,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 93, - "startColumn": 24, - "endLine": 93, - "endColumn": 51, - "byteLength": 27 + "startLine": 411, + "startColumn": 12, + "endLine": 411, + "endColumn": 58, + "byteLength": 46 } } } @@ -3102,7 +3119,10 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_src." }, + "message": { + "text": + "from clause of term *(dest +\n (strlen{Old}(dest) ..\n strlen{Old}(dest) +\n strlen{Old}(src))) in function strcat." + }, "locations": [ { "physicalLocation": { @@ -3111,11 +3131,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 384, - "startColumn": 31, - "endLine": 384, - "endColumn": 53, - "byteLength": 22 + "startLine": 411, + "startColumn": 12, + "endLine": 411, + "endColumn": 58, + "byteLength": 46 } } } @@ -3126,7 +3146,7 @@ "kind": "pass", "level": "none", "message": { - "text": "from clause of term \\result in function strcmp." + "text": "from clause of term \\result in function strcat." }, "locations": [ { @@ -3136,9 +3156,9 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 139, + "startLine": 414, "startColumn": 12, - "endLine": 139, + "endLine": 414, "endColumn": 19, "byteLength": 7 } @@ -3150,7 +3170,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior default! in function strdup." }, + "message": { "text": "behavior default in function strchr." }, "locations": [ { "physicalLocation": { @@ -3159,9 +3179,9 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 484, + "startLine": 173, "startColumn": 12, - "endLine": 484, + "endLine": 173, "endColumn": 13, "byteLength": 1 } @@ -3173,20 +3193,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "s_initialized." }, + "message": { "text": "behavior default! in function strchr." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/strings.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 38, - "startColumn": 39, - "endLine": 38, - "endColumn": 75, - "byteLength": 36 + "startLine": 173, + "startColumn": 12, + "endLine": 173, + "endColumn": 13, + "byteLength": 1 } } } @@ -3196,7 +3216,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "s_null." }, + "message": { "text": "behavior found in function strchr." }, "locations": [ { "physicalLocation": { @@ -3205,11 +3225,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 310, - "startColumn": 20, - "endLine": 310, - "endColumn": 30, - "byteLength": 10 + "startLine": 173, + "startColumn": 12, + "endLine": 173, + "endColumn": 13, + "byteLength": 1 } } } @@ -3219,20 +3239,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "WcsLen." }, + "message": { "text": "behavior not_found in function strchr." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 230, - "startColumn": 4, - "endLine": 232, - "endColumn": 63, - "byteLength": 147 + "startLine": 173, + "startColumn": 12, + "endLine": 173, + "endColumn": 13, + "byteLength": 1 } } } @@ -3242,7 +3262,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_subset." }, + "message": { "text": "valid_string_s." }, "locations": [ { "physicalLocation": { @@ -3251,11 +3271,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 306, - "startColumn": 27, - "endLine": 306, - "endColumn": 72, - "byteLength": 45 + "startLine": 157, + "startColumn": 29, + "endLine": 157, + "endColumn": 49, + "byteLength": 20 } } } @@ -3265,7 +3285,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_dest." }, + "message": { "text": "char_found." }, "locations": [ { "physicalLocation": { @@ -3274,11 +3294,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 424, - "startColumn": 32, - "endLine": 424, - "endColumn": 50, - "byteLength": 18 + "startLine": 160, + "startColumn": 24, + "endLine": 160, + "endColumn": 35, + "byteLength": 11 } } } @@ -3288,7 +3308,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_subset." }, + "message": { "text": "char_not_found." }, "locations": [ { "physicalLocation": { @@ -3297,11 +3317,34 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 321, - "startColumn": 27, - "endLine": 322, - "endColumn": 65, - "byteLength": 85 + "startLine": 167, + "startColumn": 28, + "endLine": 167, + "endColumn": 40, + "byteLength": 12 + } + } + } + ] + }, + { + "ruleId": "user-spec", + "kind": "pass", + "level": "none", + "message": { "text": "result_char." }, + "locations": [ + { + "physicalLocation": { + "artifactLocation": { + "uri": "libc/string.h", + "uriBaseId": "FRAMAC_SHARE" + }, + "region": { + "startLine": 161, + "startColumn": 25, + "endLine": 161, + "endColumn": 44, + "byteLength": 19 } } } @@ -3311,7 +3354,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_s." }, + "message": { "text": "result_same_base." }, "locations": [ { "physicalLocation": { @@ -3320,11 +3363,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 197, - "startColumn": 29, - "endLine": 197, - "endColumn": 49, - "byteLength": 20 + "startLine": 162, + "startColumn": 30, + "endLine": 162, + "endColumn": 66, + "byteLength": 36 } } } @@ -3334,7 +3377,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_ptr." }, + "message": { "text": "result_in_length." }, "locations": [ { "physicalLocation": { @@ -3343,11 +3386,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 99, - "startColumn": 24, - "endLine": 99, - "endColumn": 39, - "byteLength": 15 + "startLine": 163, + "startColumn": 30, + "endLine": 163, + "endColumn": 59, + "byteLength": 29 } } } @@ -3357,7 +3400,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior default! in function strlcat." }, + "message": { "text": "result_valid_string." }, "locations": [ { "physicalLocation": { @@ -3366,11 +3409,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 455, - "startColumn": 14, - "endLine": 455, - "endColumn": 21, - "byteLength": 7 + "startLine": 164, + "startColumn": 33, + "endLine": 164, + "endColumn": 59, + "byteLength": 26 } } } @@ -3380,7 +3423,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "disjoint clause in function strtok_r." }, + "message": { "text": "result_first_occur." }, "locations": [ { "physicalLocation": { @@ -3389,11 +3432,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 327, - "startColumn": 12, - "endLine": 327, - "endColumn": 13, - "byteLength": 1 + "startLine": 165, + "startColumn": 32, + "endLine": 165, + "endColumn": 79, + "byteLength": 47 } } } @@ -3403,10 +3446,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": - "from clause of term *(__fc_strtok_ptr + (0 ..)) in function strtok." - }, + "message": { "text": "result_null." }, "locations": [ { "physicalLocation": { @@ -3415,11 +3455,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 269, - "startColumn": 12, - "endLine": 269, - "endColumn": 32, - "byteLength": 20 + "startLine": 168, + "startColumn": 25, + "endLine": 168, + "endColumn": 41, + "byteLength": 16 } } } @@ -3429,7 +3469,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_nstring_src." }, + "message": { "text": "result_null_or_same_base." }, "locations": [ { "physicalLocation": { @@ -3438,11 +3478,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 363, - "startColumn": 32, - "endLine": 363, - "endColumn": 58, - "byteLength": 26 + "startLine": 171, + "startColumn": 4, + "endLine": 171, + "endColumn": 60, + "byteLength": 56 } } } @@ -3452,9 +3492,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term *saveptr in function strtok_r." - }, + "message": { "text": "assigns clause in function strchr." }, "locations": [ { "physicalLocation": { @@ -3463,11 +3501,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 294, - "startColumn": 10, - "endLine": 294, - "endColumn": 18, - "byteLength": 8 + "startLine": 173, + "startColumn": 12, + "endLine": 173, + "endColumn": 13, + "byteLength": 1 } } } @@ -3478,7 +3516,7 @@ "kind": "pass", "level": "none", "message": { - "text": "from clause of term \\result in function stpcpy." + "text": "from clause of term \\result in function strchr." }, "locations": [ { @@ -3488,9 +3526,9 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 401, + "startLine": 158, "startColumn": 12, - "endLine": 401, + "endLine": 158, "endColumn": 19, "byteLength": 7 } @@ -3502,9 +3540,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term \\result in function memset." - }, + "message": { "text": "behavior default! in function strchrnul." }, "locations": [ { "physicalLocation": { @@ -3513,11 +3549,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 117, + "startLine": 179, "startColumn": 12, - "endLine": 117, - "endColumn": 19, - "byteLength": 7 + "endLine": 179, + "endColumn": 13, + "byteLength": 1 } } } @@ -3527,7 +3563,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_src." }, + "message": { "text": "valid_string_s." }, "locations": [ { "physicalLocation": { @@ -3536,11 +3572,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 105, - "startColumn": 24, - "endLine": 105, - "endColumn": 51, - "byteLength": 27 + "startLine": 175, + "startColumn": 29, + "endLine": 175, + "endColumn": 49, + "byteLength": 20 } } } @@ -3550,20 +3586,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "wcslen_neg." }, + "message": { "text": "result_same_base." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 199, - "startColumn": 4, - "endLine": 202, - "endColumn": 22, - "byteLength": 113 + "startLine": 177, + "startColumn": 30, + "endLine": 177, + "endColumn": 64, + "byteLength": 34 } } } @@ -3573,7 +3609,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_internal_str." }, + "message": { "text": "assigns clause in function strchrnul." }, "locations": [ { "physicalLocation": { @@ -3582,11 +3618,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 519, - "startColumn": 33, - "endLine": 519, - "endColumn": 60, - "byteLength": 27 + "startLine": 179, + "startColumn": 12, + "endLine": 179, + "endColumn": 13, + "byteLength": 1 } } } @@ -3596,7 +3632,9 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior default! in function strncpy." }, + "message": { + "text": "from clause of term \\result in function strchrnul." + }, "locations": [ { "physicalLocation": { @@ -3605,11 +3643,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 378, + "startLine": 176, "startColumn": 12, - "endLine": 378, - "endColumn": 13, - "byteLength": 1 + "endLine": 176, + "endColumn": 19, + "byteLength": 7 } } } @@ -3619,7 +3657,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_reject." }, + "message": { "text": "behavior default! in function strcmp." }, "locations": [ { "physicalLocation": { @@ -3628,11 +3666,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 198, - "startColumn": 34, - "endLine": 198, - "endColumn": 59, - "byteLength": 25 + "startLine": 142, + "startColumn": 11, + "endLine": 142, + "endColumn": 17, + "byteLength": 6 } } } @@ -3642,20 +3680,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "wcschr_def." }, + "message": { "text": "valid_string_s1." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 266, - "startColumn": 4, - "endLine": 269, - "endColumn": 29, - "byteLength": 153 + "startLine": 137, + "startColumn": 30, + "endLine": 137, + "endColumn": 51, + "byteLength": 21 } } } @@ -3665,20 +3703,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "wcslen_shift." }, + "message": { "text": "valid_string_s2." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 222, - "startColumn": 4, - "endLine": 224, - "endColumn": 55, - "byteLength": 117 + "startLine": 138, + "startColumn": 30, + "endLine": 138, + "endColumn": 51, + "byteLength": 21 } } } @@ -3688,7 +3726,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "not_first_call." }, + "message": { "text": "acsl_c_equiv." }, "locations": [ { "physicalLocation": { @@ -3697,11 +3735,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 311, - "startColumn": 29, - "endLine": 311, - "endColumn": 46, - "byteLength": 17 + "startLine": 140, + "startColumn": 26, + "endLine": 140, + "endColumn": 50, + "byteLength": 24 } } } @@ -3711,7 +3749,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_null_or_in_haystack." }, + "message": { "text": "assigns clause in function strcmp." }, "locations": [ { "physicalLocation": { @@ -3720,11 +3758,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 225, - "startColumn": 4, - "endLine": 227, - "endColumn": 59, - "byteLength": 141 + "startLine": 142, + "startColumn": 11, + "endLine": 142, + "endColumn": 17, + "byteLength": 6 } } } @@ -3734,7 +3772,9 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_s1." }, + "message": { + "text": "from clause of term \\result in function strcmp." + }, "locations": [ { "physicalLocation": { @@ -3743,11 +3783,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 144, - "startColumn": 30, - "endLine": 144, - "endColumn": 55, - "byteLength": 25 + "startLine": 139, + "startColumn": 12, + "endLine": 139, + "endColumn": 19, + "byteLength": 7 } } } @@ -3757,9 +3797,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term \\result in function strtok." - }, + "message": { "text": "behavior default! in function strcoll." }, "locations": [ { "physicalLocation": { @@ -3768,10 +3806,10 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 263, - "startColumn": 12, - "endLine": 263, - "endColumn": 19, + "startLine": 155, + "startColumn": 11, + "endLine": 155, + "endColumn": 18, "byteLength": 7 } } @@ -3782,7 +3820,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_src." }, + "message": { "text": "valid_string_s1." }, "locations": [ { "physicalLocation": { @@ -3791,11 +3829,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 351, - "startColumn": 31, - "endLine": 351, - "endColumn": 53, - "byteLength": 22 + "startLine": 151, + "startColumn": 30, + "endLine": 151, + "endColumn": 51, + "byteLength": 21 } } } @@ -3805,7 +3843,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_bounded." }, + "message": { "text": "valid_string_s2." }, "locations": [ { "physicalLocation": { @@ -3814,11 +3852,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 133, - "startColumn": 28, - "endLine": 133, - "endColumn": 64, - "byteLength": 36 + "startLine": 152, + "startColumn": 30, + "endLine": 152, + "endColumn": 51, + "byteLength": 21 } } } @@ -3828,7 +3866,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "acsl_c_equiv." }, + "message": { "text": "assigns clause in function strcoll." }, "locations": [ { "physicalLocation": { @@ -3837,11 +3875,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 147, - "startColumn": 26, - "endLine": 147, - "endColumn": 53, - "byteLength": 27 + "startLine": 155, + "startColumn": 11, + "endLine": 155, + "endColumn": 18, + "byteLength": 7 } } } @@ -3852,7 +3890,7 @@ "kind": "pass", "level": "none", "message": { - "text": "allocates/frees clause in function strndup." + "text": "from clause of term \\result in function strcoll." }, "locations": [ { @@ -3862,11 +3900,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 506, + "startLine": 153, "startColumn": 12, - "endLine": 506, - "endColumn": 13, - "byteLength": 1 + "endLine": 153, + "endColumn": 19, + "byteLength": 7 } } } @@ -3876,7 +3914,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_nul_terminated." }, + "message": { "text": "behavior default! in function strcpy." }, "locations": [ { "physicalLocation": { @@ -3885,11 +3923,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 344, - "startColumn": 35, - "endLine": 344, - "endColumn": 51, - "byteLength": 16 + "startLine": 360, + "startColumn": 12, + "endLine": 360, + "endColumn": 13, + "byteLength": 1 } } } @@ -3899,7 +3937,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_dest." }, + "message": { "text": "valid_string_src." }, "locations": [ { "physicalLocation": { @@ -3908,11 +3946,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 409, - "startColumn": 32, - "endLine": 409, - "endColumn": 50, - "byteLength": 18 + "startLine": 351, + "startColumn": 31, + "endLine": 351, + "endColumn": 53, + "byteLength": 22 } } } @@ -3922,7 +3960,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior default! in function strcpy." }, + "message": { "text": "room_string." }, "locations": [ { "physicalLocation": { @@ -3931,11 +3969,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 360, - "startColumn": 12, - "endLine": 360, - "endColumn": 13, - "byteLength": 1 + "startLine": 352, + "startColumn": 26, + "endLine": 352, + "endColumn": 55, + "byteLength": 29 } } } @@ -3945,20 +3983,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "strlen_not_zero." }, + "message": { "text": "separation." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 95, + "startLine": 354, "startColumn": 4, - "endLine": 97, - "endColumn": 58, - "byteLength": 120 + "endLine": 354, + "endColumn": 59, + "byteLength": 55 } } } @@ -3968,7 +4006,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_null_or_same_base." }, + "message": { "text": "equal_contents." }, "locations": [ { "physicalLocation": { @@ -3977,11 +4015,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 216, - "startColumn": 4, - "endLine": 216, - "endColumn": 60, - "byteLength": 56 + "startLine": 357, + "startColumn": 28, + "endLine": 357, + "endColumn": 49, + "byteLength": 21 } } } @@ -3991,9 +4029,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term \\result in function strncat." - }, + "message": { "text": "result_ptr." }, "locations": [ { "physicalLocation": { @@ -4002,11 +4038,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 441, - "startColumn": 12, - "endLine": 441, - "endColumn": 19, - "byteLength": 7 + "startLine": 358, + "startColumn": 24, + "endLine": 358, + "endColumn": 39, + "byteLength": 15 } } } @@ -4016,7 +4052,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "danglingness." }, + "message": { "text": "assigns clause in function strcpy." }, "locations": [ { "physicalLocation": { @@ -4025,11 +4061,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 60, - "startColumn": 30, - "endLine": 60, - "endColumn": 49, - "byteLength": 19 + "startLine": 355, + "startColumn": 12, + "endLine": 355, + "endColumn": 32, + "byteLength": 20 } } } @@ -4041,7 +4077,7 @@ "level": "none", "message": { "text": - "from clause of term *(*saveptr + (0 ..)) in function strtok_r." + "from clause of term *(dest + (0 .. strlen{Old}(src))) in function strcpy." }, "locations": [ { @@ -4051,11 +4087,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 313, + "startLine": 355, "startColumn": 12, - "endLine": 313, - "endColumn": 27, - "byteLength": 15 + "endLine": 355, + "endColumn": 32, + "byteLength": 20 } } } @@ -4065,7 +4101,9 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "can_allocate." }, + "message": { + "text": "from clause of term \\result in function strcpy." + }, "locations": [ { "physicalLocation": { @@ -4074,11 +4112,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 491, - "startColumn": 26, - "endLine": 491, - "endColumn": 60, - "byteLength": 34 + "startLine": 356, + "startColumn": 12, + "endLine": 356, + "endColumn": 19, + "byteLength": 7 } } } @@ -4088,7 +4126,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_s." }, + "message": { "text": "behavior default! in function strcspn." }, "locations": [ { "physicalLocation": { @@ -4097,11 +4135,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 175, - "startColumn": 29, - "endLine": 175, - "endColumn": 49, - "byteLength": 20 + "startLine": 202, + "startColumn": 14, + "endLine": 202, + "endColumn": 21, + "byteLength": 7 } } } @@ -4111,7 +4149,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_haystack." }, + "message": { "text": "valid_string_s." }, "locations": [ { "physicalLocation": { @@ -4120,11 +4158,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 231, - "startColumn": 36, - "endLine": 231, - "endColumn": 63, - "byteLength": 27 + "startLine": 197, + "startColumn": 29, + "endLine": 197, + "endColumn": 49, + "byteLength": 20 } } } @@ -4134,9 +4172,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term \\result in function memchr." - }, + "message": { "text": "valid_string_reject." }, "locations": [ { "physicalLocation": { @@ -4145,11 +4181,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 76, - "startColumn": 12, - "endLine": 76, - "endColumn": 19, - "byteLength": 7 + "startLine": 198, + "startColumn": 34, + "endLine": 198, + "endColumn": 59, + "byteLength": 25 } } } @@ -4159,7 +4195,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function strtok_r." }, + "message": { "text": "result_bounded." }, "locations": [ { "physicalLocation": { @@ -4168,11 +4204,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 288, - "startColumn": 10, - "endLine": 288, - "endColumn": 16, - "byteLength": 6 + "startLine": 200, + "startColumn": 28, + "endLine": 200, + "endColumn": 53, + "byteLength": 25 } } } @@ -4182,7 +4218,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "complete clause in function strtok." }, + "message": { "text": "assigns clause in function strcspn." }, "locations": [ { "physicalLocation": { @@ -4191,11 +4227,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 283, - "startColumn": 12, - "endLine": 283, - "endColumn": 13, - "byteLength": 1 + "startLine": 202, + "startColumn": 14, + "endLine": 202, + "endColumn": 21, + "byteLength": 7 } } } @@ -4206,8 +4242,7 @@ "kind": "pass", "level": "none", "message": { - "text": - "from clause of term __fc_heap_status in function strdup." + "text": "from clause of term \\result in function strcspn." }, "locations": [ { @@ -4217,34 +4252,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 473, + "startLine": 199, "startColumn": 12, - "endLine": 473, - "endColumn": 28, - "byteLength": 16 - } - } - } - ] - }, - { - "ruleId": "user-spec", - "kind": "pass", - "level": "none", - "message": { "text": "valid_string_s2." }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "libc/strings.h", - "uriBaseId": "FRAMAC_SHARE" - }, - "region": { - "startLine": 47, - "startColumn": 28, - "endLine": 47, - "endColumn": 49, - "byteLength": 21 + "endLine": 199, + "endColumn": 19, + "byteLength": 7 } } } @@ -4254,7 +4266,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function memset." }, + "message": { "text": "behavior allocation in function strdup." }, "locations": [ { "physicalLocation": { @@ -4263,11 +4275,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 116, + "startLine": 484, "startColumn": 12, - "endLine": 116, - "endColumn": 32, - "byteLength": 20 + "endLine": 484, + "endColumn": 13, + "byteLength": 1 } } } @@ -4277,7 +4289,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "logic_spec." }, + "message": { "text": "behavior default! in function strdup." }, "locations": [ { "physicalLocation": { @@ -4286,11 +4298,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 63, - "startColumn": 24, - "endLine": 63, - "endColumn": 73, - "byteLength": 49 + "startLine": 484, + "startColumn": 12, + "endLine": 484, + "endColumn": 13, + "byteLength": 1 } } } @@ -4300,7 +4312,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior default! in function strxfrm." }, + "message": { "text": "behavior no_allocation in function strdup." }, "locations": [ { "physicalLocation": { @@ -4309,11 +4321,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 463, - "startColumn": 14, - "endLine": 463, - "endColumn": 21, - "byteLength": 7 + "startLine": 484, + "startColumn": 12, + "endLine": 484, + "endColumn": 13, + "byteLength": 1 } } } @@ -4323,7 +4335,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_accept." }, + "message": { "text": "valid_string_s." }, "locations": [ { "physicalLocation": { @@ -4332,11 +4344,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 205, - "startColumn": 34, - "endLine": 205, - "endColumn": 59, - "byteLength": 25 + "startLine": 468, + "startColumn": 29, + "endLine": 468, + "endColumn": 49, + "byteLength": 20 } } } @@ -4346,10 +4358,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": - "from clause of term *(dest + (0 .. n - 1)) in function strxfrm." - }, + "message": { "text": "can_allocate." }, "locations": [ { "physicalLocation": { @@ -4358,11 +4367,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 460, - "startColumn": 12, - "endLine": 460, - "endColumn": 26, - "byteLength": 14 + "startLine": 472, + "startColumn": 26, + "endLine": 472, + "endColumn": 49, + "byteLength": 23 } } } @@ -4372,7 +4381,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior resume_str in function strtok." }, + "message": { "text": "cannot_allocate." }, "locations": [ { "physicalLocation": { @@ -4381,11 +4390,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 283, - "startColumn": 12, - "endLine": 283, - "endColumn": 13, - "byteLength": 1 + "startLine": 479, + "startColumn": 29, + "endLine": 479, + "endColumn": 53, + "byteLength": 24 } } } @@ -4395,20 +4404,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "wcslen_create." }, + "message": { "text": "allocation." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 226, - "startColumn": 4, - "endLine": 228, - "endColumn": 52, - "byteLength": 115 + "startLine": 475, + "startColumn": 24, + "endLine": 475, + "endColumn": 49, + "byteLength": 25 } } } @@ -4418,20 +4427,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "memchr_def." }, + "message": { "text": "result_valid_string_and_same_contents." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 57, + "startLine": 477, "startColumn": 4, - "endLine": 59, - "endColumn": 62, - "byteLength": 134 + "endLine": 477, + "endColumn": 51, + "byteLength": 47 } } } @@ -4441,7 +4450,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "s_null." }, + "message": { "text": "result_null." }, "locations": [ { "physicalLocation": { @@ -4450,11 +4459,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 267, - "startColumn": 20, - "endLine": 267, - "endColumn": 30, - "byteLength": 10 + "startLine": 482, + "startColumn": 25, + "endLine": 482, + "endColumn": 41, + "byteLength": 16 } } } @@ -4464,7 +4473,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function memcmp." }, + "message": { "text": "assigns clause in function strdup." }, "locations": [ { "physicalLocation": { @@ -4473,11 +4482,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 65, - "startColumn": 11, - "endLine": 65, - "endColumn": 17, - "byteLength": 6 + "startLine": 473, + "startColumn": 12, + "endLine": 473, + "endColumn": 28, + "byteLength": 16 } } } @@ -4487,7 +4496,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function strerror." }, + "message": { "text": "assigns clause in function strdup." }, "locations": [ { "physicalLocation": { @@ -4496,9 +4505,9 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 347, + "startLine": 484, "startColumn": 12, - "endLine": 347, + "endLine": 484, "endColumn": 13, "byteLength": 1 } @@ -4510,7 +4519,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior complete in function strncpy." }, + "message": { "text": "assigns clause in function strdup." }, "locations": [ { "physicalLocation": { @@ -4519,9 +4528,9 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 378, + "startLine": 484, "startColumn": 12, - "endLine": 378, + "endLine": 484, "endColumn": 13, "byteLength": 1 } @@ -4533,7 +4542,10 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_dest." }, + "message": { + "text": + "from clause of term __fc_heap_status in function strdup." + }, "locations": [ { "physicalLocation": { @@ -4542,11 +4554,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 92, - "startColumn": 25, - "endLine": 92, - "endColumn": 48, - "byteLength": 23 + "startLine": 473, + "startColumn": 12, + "endLine": 473, + "endColumn": 28, + "byteLength": 16 } } } @@ -4556,7 +4568,9 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "char_not_found." }, + "message": { + "text": "from clause of term \\result in function strdup." + }, "locations": [ { "physicalLocation": { @@ -4565,11 +4579,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 85, - "startColumn": 28, - "endLine": 85, - "endColumn": 49, - "byteLength": 21 + "startLine": 474, + "startColumn": 12, + "endLine": 474, + "endColumn": 19, + "byteLength": 7 } } } @@ -4580,7 +4594,7 @@ "kind": "pass", "level": "none", "message": { - "text": "from clause of term \\result in function strtok_r." + "text": "from clause of term \\result in function strdup." }, "locations": [ { @@ -4590,9 +4604,9 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 305, + "startLine": 470, "startColumn": 12, - "endLine": 305, + "endLine": 470, "endColumn": 19, "byteLength": 7 } @@ -4604,7 +4618,9 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior default! in function strpbrk." }, + "message": { + "text": "from clause of term \\result in function strdup." + }, "locations": [ { "physicalLocation": { @@ -4613,11 +4629,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 218, + "startLine": 480, "startColumn": 12, - "endLine": 218, - "endColumn": 13, - "byteLength": 1 + "endLine": 480, + "endColumn": 19, + "byteLength": 7 } } } @@ -4650,7 +4666,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_bounded." }, + "message": { "text": "allocates/frees clause in function strdup." }, "locations": [ { "physicalLocation": { @@ -4659,11 +4675,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 200, - "startColumn": 28, - "endLine": 200, - "endColumn": 53, - "byteLength": 25 + "startLine": 484, + "startColumn": 12, + "endLine": 484, + "endColumn": 13, + "byteLength": 1 } } } @@ -4673,9 +4689,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term *(s + (0 ..)) in function strtok_r." - }, + "message": { "text": "behavior default! in function strerror." }, "locations": [ { "physicalLocation": { @@ -4684,11 +4698,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 304, + "startLine": 347, "startColumn": 12, - "endLine": 304, - "endColumn": 18, - "byteLength": 6 + "endLine": 347, + "endColumn": 13, + "byteLength": 1 } } } @@ -4698,7 +4712,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function strcmp." }, + "message": { "text": "result_internal_str." }, "locations": [ { "physicalLocation": { @@ -4707,11 +4721,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 142, - "startColumn": 11, - "endLine": 142, - "endColumn": 17, - "byteLength": 6 + "startLine": 343, + "startColumn": 33, + "endLine": 343, + "endColumn": 59, + "byteLength": 26 } } } @@ -4721,7 +4735,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "char_found." }, + "message": { "text": "result_nul_terminated." }, "locations": [ { "physicalLocation": { @@ -4730,11 +4744,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 160, - "startColumn": 24, - "endLine": 160, - "endColumn": 35, - "byteLength": 11 + "startLine": 344, + "startColumn": 35, + "endLine": 344, + "endColumn": 51, + "byteLength": 16 } } } @@ -4744,7 +4758,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "saveptr_subset." }, + "message": { "text": "result_valid_string." }, "locations": [ { "physicalLocation": { @@ -4753,11 +4767,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 323, - "startColumn": 28, - "endLine": 323, - "endColumn": 67, - "byteLength": 39 + "startLine": 345, + "startColumn": 33, + "endLine": 345, + "endColumn": 59, + "byteLength": 26 } } } @@ -4767,7 +4781,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_saveptr." }, + "message": { "text": "assigns clause in function strerror." }, "locations": [ { "physicalLocation": { @@ -4776,11 +4790,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 287, - "startColumn": 26, - "endLine": 287, - "endColumn": 41, - "byteLength": 15 + "startLine": 347, + "startColumn": 12, + "endLine": 347, + "endColumn": 13, + "byteLength": 1 } } } @@ -4790,7 +4804,9 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior default! in function strndup." }, + "message": { + "text": "from clause of term \\result in function strerror." + }, "locations": [ { "physicalLocation": { @@ -4799,11 +4815,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 506, + "startLine": 342, "startColumn": 12, - "endLine": 506, - "endColumn": 13, - "byteLength": 1 + "endLine": 342, + "endColumn": 19, + "byteLength": 7 } } } @@ -4813,20 +4829,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "strlen_sup." }, + "message": { "text": "behavior default! in function strlcat." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 103, - "startColumn": 4, - "endLine": 105, - "endColumn": 51, - "byteLength": 108 + "startLine": 455, + "startColumn": 14, + "endLine": 455, + "endColumn": 21, + "byteLength": 7 } } } @@ -4836,20 +4852,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "StrLen." }, + "message": { "text": "valid_string_src." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 132, - "startColumn": 4, - "endLine": 135, - "endColumn": 38, - "byteLength": 185 + "startLine": 448, + "startColumn": 31, + "endLine": 448, + "endColumn": 53, + "byteLength": 22 } } } @@ -4859,7 +4875,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function strncat." }, + "message": { "text": "valid_string_dest." }, "locations": [ { "physicalLocation": { @@ -4868,11 +4884,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 431, - "startColumn": 12, - "endLine": 431, - "endColumn": 58, - "byteLength": 46 + "startLine": 449, + "startColumn": 32, + "endLine": 449, + "endColumn": 50, + "byteLength": 18 } } } @@ -4882,20 +4898,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "dynamic_allocation." }, + "message": { "text": "room_nstring." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_alloc_axiomatic.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 39, - "startColumn": 4, - "endLine": 41, - "endColumn": 61, - "byteLength": 110 + "startLine": 450, + "startColumn": 27, + "endLine": 450, + "endColumn": 48, + "byteLength": 21 } } } @@ -4905,7 +4921,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "s_not_null." }, + "message": { "text": "bounded_result." }, "locations": [ { "physicalLocation": { @@ -4914,11 +4930,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 298, - "startColumn": 24, - "endLine": 298, - "endColumn": 34, - "byteLength": 10 + "startLine": 453, + "startColumn": 28, + "endLine": 453, + "endColumn": 65, + "byteLength": 37 } } } @@ -4928,7 +4944,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "room_string." }, + "message": { "text": "assigns clause in function strlcat." }, "locations": [ { "physicalLocation": { @@ -4937,11 +4953,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 397, - "startColumn": 26, - "endLine": 397, - "endColumn": 55, - "byteLength": 29 + "startLine": 451, + "startColumn": 12, + "endLine": 451, + "endColumn": 33, + "byteLength": 21 } } } @@ -4951,7 +4967,10 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "saveptr_subset." }, + "message": { + "text": + "from clause of term *(dest + (strlen{Old}(dest) .. n)) in function strlcat." + }, "locations": [ { "physicalLocation": { @@ -4960,11 +4979,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 308, - "startColumn": 28, - "endLine": 308, - "endColumn": 54, - "byteLength": 26 + "startLine": 451, + "startColumn": 12, + "endLine": 451, + "endColumn": 33, + "byteLength": 21 } } } @@ -4974,7 +4993,9 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior default! in function strsignal." }, + "message": { + "text": "from clause of term \\result in function strlcat." + }, "locations": [ { "physicalLocation": { @@ -4983,11 +5004,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 523, + "startLine": 452, "startColumn": 12, - "endLine": 523, - "endColumn": 13, - "byteLength": 1 + "endLine": 452, + "endColumn": 19, + "byteLength": 7 } } } @@ -4997,7 +5018,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior default! in function strlen." }, + "message": { "text": "behavior default! in function strlcpy." }, "locations": [ { "physicalLocation": { @@ -5006,11 +5027,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 129, - "startColumn": 14, - "endLine": 129, - "endColumn": 20, - "byteLength": 6 + "startLine": 393, + "startColumn": 7, + "endLine": 393, + "endColumn": 14, + "byteLength": 7 } } } @@ -5020,7 +5041,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function strsep." }, + "message": { "text": "valid_string_src." }, "locations": [ { "physicalLocation": { @@ -5029,11 +5050,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 331, - "startColumn": 12, - "endLine": 331, - "endColumn": 20, - "byteLength": 8 + "startLine": 384, + "startColumn": 31, + "endLine": 384, + "endColumn": 53, + "byteLength": 22 } } } @@ -5043,7 +5064,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_internal_str." }, + "message": { "text": "room_nstring." }, "locations": [ { "physicalLocation": { @@ -5052,11 +5073,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 343, - "startColumn": 33, - "endLine": 343, - "endColumn": 59, - "byteLength": 26 + "startLine": 385, + "startColumn": 27, + "endLine": 385, + "endColumn": 48, + "byteLength": 21 } } } @@ -5066,20 +5087,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "MemSet." }, + "message": { "text": "separation." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 68, + "startLine": 387, "startColumn": 4, - "endLine": 70, - "endColumn": 63, - "byteLength": 135 + "endLine": 387, + "endColumn": 61, + "byteLength": 57 } } } @@ -5089,10 +5110,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": - "from clause of term *((char *)s + (0 .. n - 1)) in function memset." - }, + "message": { "text": "initialization." }, "locations": [ { "physicalLocation": { @@ -5101,11 +5119,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 116, - "startColumn": 12, - "endLine": 116, - "endColumn": 32, - "byteLength": 20 + "startLine": 390, + "startColumn": 28, + "endLine": 390, + "endColumn": 73, + "byteLength": 45 } } } @@ -5115,7 +5133,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function strrchr." }, + "message": { "text": "bounded_result." }, "locations": [ { "physicalLocation": { @@ -5124,11 +5142,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 195, - "startColumn": 12, - "endLine": 195, - "endColumn": 13, - "byteLength": 1 + "startLine": 391, + "startColumn": 28, + "endLine": 391, + "endColumn": 50, + "byteLength": 22 } } } @@ -5138,7 +5156,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function strndup." }, + "message": { "text": "assigns clause in function strlcpy." }, "locations": [ { "physicalLocation": { @@ -5147,11 +5165,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 506, + "startLine": 388, "startColumn": 12, - "endLine": 506, - "endColumn": 13, - "byteLength": 1 + "endLine": 388, + "endColumn": 24, + "byteLength": 12 } } } @@ -5161,7 +5179,10 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_subset." }, + "message": { + "text": + "from clause of term *(dest + (0 .. n - 1)) in function strlcpy." + }, "locations": [ { "physicalLocation": { @@ -5170,11 +5191,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 264, - "startColumn": 27, - "endLine": 264, - "endColumn": 72, - "byteLength": 45 + "startLine": 388, + "startColumn": 12, + "endLine": 388, + "endColumn": 24, + "byteLength": 12 } } } @@ -5185,7 +5206,7 @@ "kind": "pass", "level": "none", "message": { - "text": "behavior no_allocation in function strndup." + "text": "from clause of term \\result in function strlcpy." }, "locations": [ { @@ -5195,11 +5216,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 506, + "startLine": 389, "startColumn": 12, - "endLine": 506, - "endColumn": 13, - "byteLength": 1 + "endLine": 389, + "endColumn": 19, + "byteLength": 7 } } } @@ -5209,9 +5230,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "allocates/frees clause in function strndup." - }, + "message": { "text": "behavior default! in function strlen." }, "locations": [ { "physicalLocation": { @@ -5220,11 +5239,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 487, + "startLine": 129, "startColumn": 14, - "endLine": 487, - "endColumn": 21, - "byteLength": 7 + "endLine": 129, + "endColumn": 20, + "byteLength": 6 } } } @@ -5234,7 +5253,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior default! in function strchr." }, + "message": { "text": "valid_string_s." }, "locations": [ { "physicalLocation": { @@ -5243,11 +5262,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 173, - "startColumn": 12, - "endLine": 173, - "endColumn": 13, - "byteLength": 1 + "startLine": 125, + "startColumn": 29, + "endLine": 125, + "endColumn": 49, + "byteLength": 20 } } } @@ -5257,20 +5276,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "wcsncmp_zero." }, + "message": { "text": "acsl_c_equiv." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 252, - "startColumn": 4, - "endLine": 256, - "endColumn": 53, - "byteLength": 194 + "startLine": 127, + "startColumn": 26, + "endLine": 127, + "endColumn": 46, + "byteLength": 20 } } } @@ -5280,9 +5299,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term \\result in function strcspn." - }, + "message": { "text": "assigns clause in function strlen." }, "locations": [ { "physicalLocation": { @@ -5291,11 +5308,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 199, - "startColumn": 12, - "endLine": 199, - "endColumn": 19, - "byteLength": 7 + "startLine": 129, + "startColumn": 14, + "endLine": 129, + "endColumn": 20, + "byteLength": 6 } } } @@ -5305,7 +5322,9 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior default! in function strchrnul." }, + "message": { + "text": "from clause of term \\result in function strlen." + }, "locations": [ { "physicalLocation": { @@ -5314,11 +5333,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 179, + "startLine": 126, "startColumn": 12, - "endLine": 179, - "endColumn": 13, - "byteLength": 1 + "endLine": 126, + "endColumn": 19, + "byteLength": 7 } } } @@ -5328,20 +5347,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_char." }, + "message": { "text": "behavior default! in function strncasecmp." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/strings.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 161, - "startColumn": 25, - "endLine": 161, - "endColumn": 44, - "byteLength": 19 + "startLine": 57, + "startColumn": 11, + "endLine": 57, + "endColumn": 22, + "byteLength": 11 } } } @@ -5351,20 +5370,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "WcsChr." }, + "message": { "text": "valid_string_s1." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", + "uri": "libc/strings.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 266, - "startColumn": 4, - "endLine": 269, - "endColumn": 29, - "byteLength": 153 + "startLine": 53, + "startColumn": 28, + "endLine": 53, + "endColumn": 53, + "byteLength": 25 } } } @@ -5374,22 +5393,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term \\result in function strlcat." - }, + "message": { "text": "valid_string_s2." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/strings.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 452, - "startColumn": 12, - "endLine": 452, - "endColumn": 19, - "byteLength": 7 + "startLine": 54, + "startColumn": 28, + "endLine": 54, + "endColumn": 53, + "byteLength": 25 } } } @@ -5399,20 +5416,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_same_base." }, + "message": { "text": "assigns clause in function strncasecmp." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/strings.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 162, - "startColumn": 30, - "endLine": 162, - "endColumn": 66, - "byteLength": 36 + "startLine": 57, + "startColumn": 11, + "endLine": 57, + "endColumn": 22, + "byteLength": 11 } } } @@ -5422,20 +5439,22 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_s." }, + "message": { + "text": "from clause of term \\result in function strncasecmp." + }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/string.h", + "uri": "libc/strings.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 157, - "startColumn": 29, - "endLine": 157, - "endColumn": 49, - "byteLength": 20 + "startLine": 55, + "startColumn": 10, + "endLine": 55, + "endColumn": 17, + "byteLength": 7 } } } @@ -5445,7 +5464,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function strcspn." }, + "message": { "text": "behavior complete in function strncat." }, "locations": [ { "physicalLocation": { @@ -5454,11 +5473,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 202, - "startColumn": 14, - "endLine": 202, - "endColumn": 21, - "byteLength": 7 + "startLine": 444, + "startColumn": 12, + "endLine": 444, + "endColumn": 13, + "byteLength": 1 } } } @@ -5468,7 +5487,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "bounded_result." }, + "message": { "text": "behavior default! in function strncat." }, "locations": [ { "physicalLocation": { @@ -5477,11 +5496,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 453, - "startColumn": 28, - "endLine": 453, - "endColumn": 65, - "byteLength": 37 + "startLine": 444, + "startColumn": 12, + "endLine": 444, + "endColumn": 13, + "byteLength": 1 } } } @@ -5491,7 +5510,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "copied_contents." }, + "message": { "text": "behavior partial in function strncat." }, "locations": [ { "physicalLocation": { @@ -5500,11 +5519,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 98, - "startColumn": 29, - "endLine": 98, - "endColumn": 76, - "byteLength": 47 + "startLine": 444, + "startColumn": 12, + "endLine": 444, + "endColumn": 13, + "byteLength": 1 } } } @@ -5514,7 +5533,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_valid_string." }, + "message": { "text": "valid_nstring_src." }, "locations": [ { "physicalLocation": { @@ -5523,10 +5542,10 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 345, - "startColumn": 33, - "endLine": 345, - "endColumn": 59, + "startLine": 423, + "startColumn": 32, + "endLine": 423, + "endColumn": 58, "byteLength": 26 } } @@ -5537,7 +5556,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "room_string." }, + "message": { "text": "valid_string_dest." }, "locations": [ { "physicalLocation": { @@ -5546,11 +5565,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 410, - "startColumn": 26, - "endLine": 410, - "endColumn": 70, - "byteLength": 44 + "startLine": 424, + "startColumn": 32, + "endLine": 424, + "endColumn": 50, + "byteLength": 18 } } } @@ -5560,20 +5579,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "strlen_zero." }, + "message": { "text": "room_string." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 99, - "startColumn": 4, - "endLine": 101, - "endColumn": 59, - "byteLength": 117 + "startLine": 430, + "startColumn": 26, + "endLine": 430, + "endColumn": 74, + "byteLength": 48 } } } @@ -5583,9 +5602,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term \\result in function strdup." - }, + "message": { "text": "room_string." }, "locations": [ { "physicalLocation": { @@ -5594,11 +5611,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 470, - "startColumn": 12, - "endLine": 470, - "endColumn": 19, - "byteLength": 7 + "startLine": 438, + "startColumn": 26, + "endLine": 438, + "endColumn": 64, + "byteLength": 38 } } } @@ -5608,7 +5625,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function strcasestr." }, + "message": { "text": "valid_string_src_fits." }, "locations": [ { "physicalLocation": { @@ -5617,11 +5634,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 239, - "startColumn": 12, - "endLine": 239, - "endColumn": 13, - "byteLength": 1 + "startLine": 429, + "startColumn": 35, + "endLine": 429, + "endColumn": 77, + "byteLength": 42 } } } @@ -5631,20 +5648,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior default! in function strcasecmp." }, + "message": { "text": "valid_string_src_too_large." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/strings.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 50, - "startColumn": 11, - "endLine": 50, - "endColumn": 21, - "byteLength": 10 + "startLine": 437, + "startColumn": 4, + "endLine": 437, + "endColumn": 49, + "byteLength": 45 } } } @@ -5654,7 +5671,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "bounded_result." }, + "message": { "text": "result_ptr." }, "locations": [ { "physicalLocation": { @@ -5663,11 +5680,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 391, - "startColumn": 28, - "endLine": 391, - "endColumn": 50, - "byteLength": 22 + "startLine": 427, + "startColumn": 24, + "endLine": 427, + "endColumn": 39, + "byteLength": 15 } } } @@ -5677,7 +5694,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function strncat." }, + "message": { "text": "sum_of_lengths." }, "locations": [ { "physicalLocation": { @@ -5686,11 +5703,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 439, - "startColumn": 12, - "endLine": 439, - "endColumn": 48, - "byteLength": 36 + "startLine": 434, + "startColumn": 28, + "endLine": 434, + "endColumn": 76, + "byteLength": 48 } } } @@ -5700,10 +5717,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": - "from clause of term *(dest + (strlen{Old}(dest) .. n)) in function strlcat." - }, + "message": { "text": "sum_of_bounded_lengths." }, "locations": [ { "physicalLocation": { @@ -5712,11 +5726,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 451, - "startColumn": 12, - "endLine": 451, - "endColumn": 33, - "byteLength": 21 + "startLine": 442, + "startColumn": 36, + "endLine": 442, + "endColumn": 74, + "byteLength": 38 } } } @@ -5726,20 +5740,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "strlen_create." }, + "message": { "text": "assigns clause in function strncat." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 111, - "startColumn": 4, - "endLine": 113, - "endColumn": 51, - "byteLength": 111 + "startLine": 431, + "startColumn": 12, + "endLine": 431, + "endColumn": 58, + "byteLength": 46 } } } @@ -5749,22 +5763,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term \\result in function strcasecmp." - }, + "message": { "text": "assigns clause in function strncat." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/strings.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 48, - "startColumn": 10, - "endLine": 48, - "endColumn": 17, - "byteLength": 7 + "startLine": 425, + "startColumn": 12, + "endLine": 425, + "endColumn": 50, + "byteLength": 38 } } } @@ -5774,7 +5786,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior resume_str in function strtok_r." }, + "message": { "text": "assigns clause in function strncat." }, "locations": [ { "physicalLocation": { @@ -5783,11 +5795,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 327, + "startLine": 439, "startColumn": 12, - "endLine": 327, - "endColumn": 13, - "byteLength": 1 + "endLine": 439, + "endColumn": 48, + "byteLength": 36 } } } @@ -5797,7 +5809,10 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior default! in function memmove." }, + "message": { + "text": + "from clause of term *(dest +\n (strlen{Old}(dest) ..\n strlen{Old}(dest) +\n strlen{Old}(src))) in function strncat." + }, "locations": [ { "physicalLocation": { @@ -5806,11 +5821,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 111, + "startLine": 431, "startColumn": 12, - "endLine": 111, - "endColumn": 13, - "byteLength": 1 + "endLine": 431, + "endColumn": 58, + "byteLength": 46 } } } @@ -5820,7 +5835,9 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function strtok_r." }, + "message": { + "text": "from clause of term \\result in function strncat." + }, "locations": [ { "physicalLocation": { @@ -5829,11 +5846,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 303, + "startLine": 433, "startColumn": 12, - "endLine": 303, - "endColumn": 20, - "byteLength": 8 + "endLine": 433, + "endColumn": 19, + "byteLength": 7 } } } @@ -5843,7 +5860,10 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior found in function strrchr." }, + "message": { + "text": + "from clause of term *(dest + (strlen{Old}(dest) .. strlen{Old}(dest) + n)) in function strncat." + }, "locations": [ { "physicalLocation": { @@ -5852,11 +5872,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 195, + "startLine": 425, "startColumn": 12, - "endLine": 195, - "endColumn": 13, - "byteLength": 1 + "endLine": 425, + "endColumn": 50, + "byteLength": 38 } } } @@ -5866,7 +5886,9 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_dest." }, + "message": { + "text": "from clause of term \\result in function strncat." + }, "locations": [ { "physicalLocation": { @@ -5875,11 +5897,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 449, - "startColumn": 32, - "endLine": 449, - "endColumn": 50, - "byteLength": 18 + "startLine": 426, + "startColumn": 12, + "endLine": 426, + "endColumn": 19, + "byteLength": 7 } } } @@ -5889,7 +5911,10 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_s." }, + "message": { + "text": + "from clause of term *(dest + (strlen{Old}(dest) .. strlen{Old}(dest) + n)) in function strncat." + }, "locations": [ { "physicalLocation": { @@ -5898,11 +5923,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 212, - "startColumn": 29, - "endLine": 212, - "endColumn": 49, - "byteLength": 20 + "startLine": 439, + "startColumn": 12, + "endLine": 439, + "endColumn": 48, + "byteLength": 36 } } } @@ -5912,7 +5937,9 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "cannot_allocate." }, + "message": { + "text": "from clause of term \\result in function strncat." + }, "locations": [ { "physicalLocation": { @@ -5921,11 +5948,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 479, - "startColumn": 29, - "endLine": 479, - "endColumn": 53, - "byteLength": 24 + "startLine": 441, + "startColumn": 12, + "endLine": 441, + "endColumn": 19, + "byteLength": 7 } } } @@ -5935,20 +5962,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "strlen_create_shift." }, + "message": { "text": "behavior default! in function strncmp." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 115, - "startColumn": 4, - "endLine": 117, - "endColumn": 62, - "byteLength": 143 + "startLine": 149, + "startColumn": 11, + "endLine": 149, + "endColumn": 18, + "byteLength": 7 } } } @@ -5958,9 +5985,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term \\result in function strtok_r." - }, + "message": { "text": "valid_string_s1." }, "locations": [ { "physicalLocation": { @@ -5969,11 +5994,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 292, - "startColumn": 10, - "endLine": 292, - "endColumn": 17, - "byteLength": 7 + "startLine": 144, + "startColumn": 30, + "endLine": 144, + "endColumn": 55, + "byteLength": 25 } } } @@ -5983,7 +6008,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_nul_terminated." }, + "message": { "text": "valid_string_s2." }, "locations": [ { "physicalLocation": { @@ -5992,11 +6017,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 520, - "startColumn": 35, - "endLine": 520, - "endColumn": 51, - "byteLength": 16 + "startLine": 145, + "startColumn": 30, + "endLine": 145, + "endColumn": 55, + "byteLength": 25 } } } @@ -6006,7 +6031,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "sum_of_lengths." }, + "message": { "text": "acsl_c_equiv." }, "locations": [ { "physicalLocation": { @@ -6015,11 +6040,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 413, - "startColumn": 28, - "endLine": 413, - "endColumn": 76, - "byteLength": 48 + "startLine": 147, + "startColumn": 26, + "endLine": 147, + "endColumn": 53, + "byteLength": 27 } } } @@ -6029,7 +6054,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_null." }, + "message": { "text": "assigns clause in function strncmp." }, "locations": [ { "physicalLocation": { @@ -6038,11 +6063,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 86, - "startColumn": 25, - "endLine": 86, - "endColumn": 41, - "byteLength": 16 + "startLine": 149, + "startColumn": 11, + "endLine": 149, + "endColumn": 18, + "byteLength": 7 } } } @@ -6053,8 +6078,7 @@ "kind": "pass", "level": "none", "message": { - "text": - "from clause of term __fc_heap_status in function strndup." + "text": "from clause of term \\result in function strncmp." }, "locations": [ { @@ -6064,11 +6088,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 492, + "startLine": 146, "startColumn": 12, - "endLine": 492, - "endColumn": 28, - "byteLength": 16 + "endLine": 146, + "endColumn": 19, + "byteLength": 7 } } } @@ -6078,7 +6102,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_s2." }, + "message": { "text": "behavior complete in function strncpy." }, "locations": [ { "physicalLocation": { @@ -6087,11 +6111,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 152, - "startColumn": 30, - "endLine": 152, - "endColumn": 51, - "byteLength": 21 + "startLine": 378, + "startColumn": 12, + "endLine": 378, + "endColumn": 13, + "byteLength": 1 } } } @@ -6101,7 +6125,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "separation." }, + "message": { "text": "behavior default! in function strncpy." }, "locations": [ { "physicalLocation": { @@ -6110,11 +6134,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 366, - "startColumn": 4, - "endLine": 366, - "endColumn": 43, - "byteLength": 39 + "startLine": 378, + "startColumn": 12, + "endLine": 378, + "endColumn": 13, + "byteLength": 1 } } } @@ -6124,9 +6148,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term \\result in function strchr." - }, + "message": { "text": "behavior partial in function strncpy." }, "locations": [ { "physicalLocation": { @@ -6135,11 +6157,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 158, + "startLine": 378, "startColumn": 12, - "endLine": 158, - "endColumn": 19, - "byteLength": 7 + "endLine": 378, + "endColumn": 13, + "byteLength": 1 } } } @@ -6149,7 +6171,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_dest." }, + "message": { "text": "valid_nstring_src." }, "locations": [ { "physicalLocation": { @@ -6158,11 +6180,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 104, - "startColumn": 25, - "endLine": 104, - "endColumn": 48, - "byteLength": 23 + "startLine": 363, + "startColumn": 32, + "endLine": 363, + "endColumn": 58, + "byteLength": 26 } } } @@ -6172,9 +6194,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term *saveptr in function strtok_r." - }, + "message": { "text": "room_nstring." }, "locations": [ { "physicalLocation": { @@ -6183,11 +6203,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 303, - "startColumn": 12, - "endLine": 303, - "endColumn": 20, - "byteLength": 8 + "startLine": 364, + "startColumn": 27, + "endLine": 364, + "endColumn": 50, + "byteLength": 23 } } } @@ -6197,9 +6217,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term \\result in function strtok." - }, + "message": { "text": "separation." }, "locations": [ { "physicalLocation": { @@ -6208,11 +6226,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 275, - "startColumn": 12, - "endLine": 275, - "endColumn": 19, - "byteLength": 7 + "startLine": 366, + "startColumn": 4, + "endLine": 366, + "endColumn": 43, + "byteLength": 39 } } } @@ -6222,7 +6240,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "copied_contents." }, + "message": { "text": "src_fits." }, "locations": [ { "physicalLocation": { @@ -6231,11 +6249,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 108, - "startColumn": 29, - "endLine": 108, - "endColumn": 76, - "byteLength": 47 + "startLine": 372, + "startColumn": 22, + "endLine": 372, + "endColumn": 37, + "byteLength": 15 } } } @@ -6245,7 +6263,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior default! in function strsep." }, + "message": { "text": "src_too_long." }, "locations": [ { "physicalLocation": { @@ -6254,11 +6272,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 334, - "startColumn": 12, - "endLine": 334, - "endColumn": 13, - "byteLength": 1 + "startLine": 375, + "startColumn": 26, + "endLine": 375, + "endColumn": 42, + "byteLength": 16 } } } @@ -6268,10 +6286,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": - "from clause of term *(dest +\n (strlen{Old}(dest) ..\n strlen{Old}(dest) +\n strlen{Old}(src))) in function strncat." - }, + "message": { "text": "result_ptr." }, "locations": [ { "physicalLocation": { @@ -6280,11 +6295,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 431, - "startColumn": 12, - "endLine": 431, - "endColumn": 58, - "byteLength": 46 + "startLine": 369, + "startColumn": 24, + "endLine": 369, + "endColumn": 39, + "byteLength": 15 } } } @@ -6294,7 +6309,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "sum_of_lengths." }, + "message": { "text": "initialization." }, "locations": [ { "physicalLocation": { @@ -6303,11 +6318,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 434, + "startLine": 370, "startColumn": 28, - "endLine": 434, - "endColumn": 76, - "byteLength": 48 + "endLine": 370, + "endColumn": 57, + "byteLength": 29 } } } @@ -6317,7 +6332,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function strcpy." }, + "message": { "text": "equal_after_copy." }, "locations": [ { "physicalLocation": { @@ -6326,11 +6341,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 355, - "startColumn": 12, - "endLine": 355, - "endColumn": 32, - "byteLength": 20 + "startLine": 373, + "startColumn": 30, + "endLine": 373, + "endColumn": 51, + "byteLength": 21 } } } @@ -6340,10 +6355,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": - "from clause of term *((char *)dest + (0 .. n - 1)) in function memmove." - }, + "message": { "text": "equal_prefix." }, "locations": [ { "physicalLocation": { @@ -6352,11 +6364,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 106, - "startColumn": 12, - "endLine": 106, - "endColumn": 35, - "byteLength": 23 + "startLine": 376, + "startColumn": 26, + "endLine": 376, + "endColumn": 60, + "byteLength": 34 } } } @@ -6366,20 +6378,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "wcslen_before_null." }, + "message": { "text": "assigns clause in function strncpy." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 204, - "startColumn": 4, - "endLine": 205, - "endColumn": 76, - "byteLength": 105 + "startLine": 367, + "startColumn": 12, + "endLine": 367, + "endColumn": 26, + "byteLength": 14 } } } @@ -6389,7 +6401,10 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "ptr_subset." }, + "message": { + "text": + "from clause of term *(dest + (0 .. n - 1)) in function strncpy." + }, "locations": [ { "physicalLocation": { @@ -6398,11 +6413,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 279, - "startColumn": 24, - "endLine": 279, - "endColumn": 77, - "byteLength": 53 + "startLine": 367, + "startColumn": 12, + "endLine": 367, + "endColumn": 26, + "byteLength": 14 } } } @@ -6413,7 +6428,7 @@ "kind": "pass", "level": "none", "message": { - "text": "from clause of term \\result in function strcasestr." + "text": "from clause of term \\result in function strncpy." }, "locations": [ { @@ -6423,9 +6438,9 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 233, + "startLine": 368, "startColumn": 12, - "endLine": 233, + "endLine": 368, "endColumn": 19, "byteLength": 7 } @@ -6437,7 +6452,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "allocates/frees clause in function strdup." }, + "message": { "text": "behavior allocation in function strndup." }, "locations": [ { "physicalLocation": { @@ -6446,9 +6461,9 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 484, + "startLine": 506, "startColumn": 12, - "endLine": 484, + "endLine": 506, "endColumn": 13, "byteLength": 1 } @@ -6460,7 +6475,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior default! in function strncat." }, + "message": { "text": "behavior default! in function strndup." }, "locations": [ { "physicalLocation": { @@ -6469,9 +6484,9 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 444, + "startLine": 506, "startColumn": 12, - "endLine": 444, + "endLine": 506, "endColumn": 13, "byteLength": 1 } @@ -6483,7 +6498,9 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function memmove." }, + "message": { + "text": "behavior no_allocation in function strndup." + }, "locations": [ { "physicalLocation": { @@ -6492,11 +6509,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 106, + "startLine": 506, "startColumn": 12, - "endLine": 106, - "endColumn": 35, - "byteLength": 23 + "endLine": 506, + "endColumn": 13, + "byteLength": 1 } } } @@ -6506,7 +6523,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_src." }, + "message": { "text": "valid_string_s." }, "locations": [ { "physicalLocation": { @@ -6515,11 +6532,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 448, - "startColumn": 31, - "endLine": 448, - "endColumn": 53, - "byteLength": 22 + "startLine": 486, + "startColumn": 29, + "endLine": 486, + "endColumn": 49, + "byteLength": 20 } } } @@ -6529,7 +6546,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior default! in function strcspn." }, + "message": { "text": "can_allocate." }, "locations": [ { "physicalLocation": { @@ -6538,11 +6555,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 202, - "startColumn": 14, - "endLine": 202, - "endColumn": 21, - "byteLength": 7 + "startLine": 491, + "startColumn": 26, + "endLine": 491, + "endColumn": 60, + "byteLength": 34 } } } @@ -6552,7 +6569,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior default! in function memcmp." }, + "message": { "text": "cannot_allocate." }, "locations": [ { "physicalLocation": { @@ -6561,11 +6578,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 65, - "startColumn": 11, - "endLine": 65, - "endColumn": 17, - "byteLength": 6 + "startLine": 501, + "startColumn": 29, + "endLine": 501, + "endColumn": 64, + "byteLength": 35 } } } @@ -6575,7 +6592,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function strncmp." }, + "message": { "text": "allocation." }, "locations": [ { "physicalLocation": { @@ -6584,11 +6601,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 149, - "startColumn": 11, - "endLine": 149, - "endColumn": 18, - "byteLength": 7 + "startLine": 495, + "startColumn": 24, + "endLine": 495, + "endColumn": 60, + "byteLength": 36 } } } @@ -6599,44 +6616,21 @@ "kind": "pass", "level": "none", "message": { - "text": "from clause of term \\result in function strncasecmp." + "text": "result_valid_string_bounded_and_same_prefix." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/strings.h", - "uriBaseId": "FRAMAC_SHARE" - }, - "region": { - "startLine": 55, - "startColumn": 10, - "endLine": 55, - "endColumn": 17, - "byteLength": 7 - } - } - } - ] - }, - { - "ruleId": "user-spec", - "kind": "pass", - "level": "none", - "message": { "text": "memcmp_strlen_shift_left." }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 127, + "startLine": 497, "startColumn": 4, - "endLine": 130, - "endColumn": 38, - "byteLength": 184 + "endLine": 499, + "endColumn": 29, + "byteLength": 124 } } } @@ -6646,9 +6640,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term \\result in function memcmp." - }, + "message": { "text": "result_null." }, "locations": [ { "physicalLocation": { @@ -6657,11 +6649,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 61, - "startColumn": 12, - "endLine": 61, - "endColumn": 19, - "byteLength": 7 + "startLine": 504, + "startColumn": 25, + "endLine": 504, + "endColumn": 41, + "byteLength": 16 } } } @@ -6671,20 +6663,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "src_fits." }, + "message": { "text": "assigns clause in function strndup." }, "locations": [ { "physicalLocation": { "artifactLocation": { "uri": "libc/string.h", - "uriBaseId": "FRAMAC_SHARE" - }, - "region": { - "startLine": 372, - "startColumn": 22, - "endLine": 372, - "endColumn": 37, - "byteLength": 15 + "uriBaseId": "FRAMAC_SHARE" + }, + "region": { + "startLine": 492, + "startColumn": 12, + "endLine": 492, + "endColumn": 28, + "byteLength": 16 } } } @@ -6694,9 +6686,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term \\result in function strncmp." - }, + "message": { "text": "assigns clause in function strndup." }, "locations": [ { "physicalLocation": { @@ -6705,11 +6695,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 146, + "startLine": 506, "startColumn": 12, - "endLine": 146, - "endColumn": 19, - "byteLength": 7 + "endLine": 506, + "endColumn": 13, + "byteLength": 1 } } } @@ -6719,20 +6709,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "memcmp_zero." }, + "message": { "text": "assigns clause in function strndup." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 39, - "startColumn": 4, - "endLine": 42, - "endColumn": 70, - "byteLength": 170 + "startLine": 506, + "startColumn": 12, + "endLine": 506, + "endColumn": 13, + "byteLength": 1 } } } @@ -6742,7 +6732,10 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_in_length." }, + "message": { + "text": + "from clause of term __fc_heap_status in function strndup." + }, "locations": [ { "physicalLocation": { @@ -6751,11 +6744,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 163, - "startColumn": 30, - "endLine": 163, - "endColumn": 59, - "byteLength": 29 + "startLine": 492, + "startColumn": 12, + "endLine": 492, + "endColumn": 28, + "byteLength": 16 } } } @@ -6765,7 +6758,9 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "initialization." }, + "message": { + "text": "from clause of term \\result in function strndup." + }, "locations": [ { "physicalLocation": { @@ -6774,11 +6769,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 57, - "startColumn": 32, - "endLine": 57, - "endColumn": 68, - "byteLength": 36 + "startLine": 493, + "startColumn": 12, + "endLine": 493, + "endColumn": 19, + "byteLength": 7 } } } @@ -6788,20 +6783,22 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "StrNCmp." }, + "message": { + "text": "from clause of term \\result in function strndup." + }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 155, - "startColumn": 4, - "endLine": 159, - "endColumn": 53, - "byteLength": 191 + "startLine": 488, + "startColumn": 12, + "endLine": 488, + "endColumn": 19, + "byteLength": 7 } } } @@ -6836,20 +6833,22 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior default! in function strncasecmp." }, + "message": { + "text": "allocates/frees clause in function strndup." + }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/strings.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 57, - "startColumn": 11, - "endLine": 57, - "endColumn": 22, - "byteLength": 11 + "startLine": 487, + "startColumn": 14, + "endLine": 487, + "endColumn": 21, + "byteLength": 7 } } } @@ -6859,7 +6858,9 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior default! in function strcoll." }, + "message": { + "text": "allocates/frees clause in function strndup." + }, "locations": [ { "physicalLocation": { @@ -6868,11 +6869,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 155, - "startColumn": 11, - "endLine": 155, - "endColumn": 18, - "byteLength": 7 + "startLine": 506, + "startColumn": 12, + "endLine": 506, + "endColumn": 13, + "byteLength": 1 } } } @@ -6882,10 +6883,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": - "from clause of term *(dest +\n (strlen{Old}(dest) ..\n strlen{Old}(dest) +\n strlen{Old}(src))) in function strcat." - }, + "message": { "text": "behavior default! in function strnlen." }, "locations": [ { "physicalLocation": { @@ -6894,11 +6892,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 411, - "startColumn": 12, - "endLine": 411, - "endColumn": 58, - "byteLength": 46 + "startLine": 135, + "startColumn": 14, + "endLine": 135, + "endColumn": 21, + "byteLength": 7 } } } @@ -6908,7 +6906,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior default! in function memcpy." }, + "message": { "text": "valid_string_s." }, "locations": [ { "physicalLocation": { @@ -6917,11 +6915,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 101, - "startColumn": 12, - "endLine": 101, - "endColumn": 13, - "byteLength": 1 + "startLine": 131, + "startColumn": 29, + "endLine": 131, + "endColumn": 53, + "byteLength": 24 } } } @@ -6931,7 +6929,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "separation." }, + "message": { "text": "result_bounded." }, "locations": [ { "physicalLocation": { @@ -6940,11 +6938,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 399, - "startColumn": 4, - "endLine": 399, - "endColumn": 59, - "byteLength": 55 + "startLine": 133, + "startColumn": 28, + "endLine": 133, + "endColumn": 64, + "byteLength": 36 } } } @@ -6954,7 +6952,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior new_str in function strtok." }, + "message": { "text": "assigns clause in function strnlen." }, "locations": [ { "physicalLocation": { @@ -6963,11 +6961,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 283, - "startColumn": 12, - "endLine": 283, - "endColumn": 13, - "byteLength": 1 + "startLine": 135, + "startColumn": 14, + "endLine": 135, + "endColumn": 21, + "byteLength": 7 } } } @@ -6977,7 +6975,9 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior default! in function memchr." }, + "message": { + "text": "from clause of term \\result in function strnlen." + }, "locations": [ { "physicalLocation": { @@ -6986,11 +6986,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 88, + "startLine": 132, "startColumn": 12, - "endLine": 88, - "endColumn": 13, - "byteLength": 1 + "endLine": 132, + "endColumn": 19, + "byteLength": 7 } } } @@ -7000,20 +7000,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "wcslen_sup." }, + "message": { "text": "behavior default! in function strpbrk." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { "startLine": 218, - "startColumn": 4, - "endLine": 220, - "endColumn": 52, - "byteLength": 112 + "startColumn": 12, + "endLine": 218, + "endColumn": 13, + "byteLength": 1 } } } @@ -7023,9 +7023,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term *(s + (0 ..)) in function strtok." - }, + "message": { "text": "valid_string_s." }, "locations": [ { "physicalLocation": { @@ -7034,11 +7032,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 262, - "startColumn": 12, - "endLine": 262, - "endColumn": 18, - "byteLength": 6 + "startLine": 212, + "startColumn": 29, + "endLine": 212, + "endColumn": 49, + "byteLength": 20 } } } @@ -7048,7 +7046,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_s1." }, + "message": { "text": "valid_string_accept." }, "locations": [ { "physicalLocation": { @@ -7057,11 +7055,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 137, - "startColumn": 30, - "endLine": 137, - "endColumn": 51, - "byteLength": 21 + "startLine": 213, + "startColumn": 34, + "endLine": 213, + "endColumn": 59, + "byteLength": 25 } } } @@ -7071,7 +7069,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_haystack." }, + "message": { "text": "result_null_or_same_base." }, "locations": [ { "physicalLocation": { @@ -7080,11 +7078,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 220, - "startColumn": 36, - "endLine": 220, - "endColumn": 63, - "byteLength": 27 + "startLine": 216, + "startColumn": 4, + "endLine": 216, + "endColumn": 60, + "byteLength": 56 } } } @@ -7094,9 +7092,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term *stringp in function strsep." - }, + "message": { "text": "assigns clause in function strpbrk." }, "locations": [ { "physicalLocation": { @@ -7105,11 +7101,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 331, + "startLine": 218, "startColumn": 12, - "endLine": 331, - "endColumn": 20, - "byteLength": 8 + "endLine": 218, + "endColumn": 13, + "byteLength": 1 } } } @@ -7119,7 +7115,9 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "separation." }, + "message": { + "text": "from clause of term \\result in function strpbrk." + }, "locations": [ { "physicalLocation": { @@ -7128,11 +7126,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 387, - "startColumn": 4, - "endLine": 387, - "endColumn": 61, - "byteLength": 57 + "startLine": 214, + "startColumn": 12, + "endLine": 214, + "endColumn": 19, + "byteLength": 7 } } } @@ -7142,7 +7140,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior found in function strchr." }, + "message": { "text": "behavior default in function strrchr." }, "locations": [ { "physicalLocation": { @@ -7151,9 +7149,9 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 173, + "startLine": 195, "startColumn": 12, - "endLine": 173, + "endLine": 195, "endColumn": 13, "byteLength": 1 } @@ -7165,20 +7163,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "strcmp_zero." }, + "message": { "text": "behavior default! in function strrchr." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 143, - "startColumn": 4, - "endLine": 147, - "endColumn": 63, - "byteLength": 170 + "startLine": 195, + "startColumn": 12, + "endLine": 195, + "endColumn": 13, + "byteLength": 1 } } } @@ -7188,7 +7186,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_s." }, + "message": { "text": "behavior found in function strrchr." }, "locations": [ { "physicalLocation": { @@ -7197,11 +7195,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 468, - "startColumn": 29, - "endLine": 468, - "endColumn": 49, - "byteLength": 20 + "startLine": 195, + "startColumn": 12, + "endLine": 195, + "endColumn": 13, + "byteLength": 1 } } } @@ -7211,7 +7209,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior not_found in function strchr." }, + "message": { "text": "behavior not_found in function strrchr." }, "locations": [ { "physicalLocation": { @@ -7220,9 +7218,9 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 173, + "startLine": 195, "startColumn": 12, - "endLine": 173, + "endLine": 195, "endColumn": 13, "byteLength": 1 } @@ -7234,20 +7232,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "WcsCmp." }, + "message": { "text": "valid_string_s." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 240, - "startColumn": 4, - "endLine": 244, - "endColumn": 63, - "byteLength": 173 + "startLine": 181, + "startColumn": 29, + "endLine": 181, + "endColumn": 49, + "byteLength": 20 } } } @@ -7257,7 +7255,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior default! in function strtok_r." }, + "message": { "text": "char_found." }, "locations": [ { "physicalLocation": { @@ -7266,11 +7264,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 327, - "startColumn": 12, - "endLine": 327, - "endColumn": 13, - "byteLength": 1 + "startLine": 184, + "startColumn": 24, + "endLine": 184, + "endColumn": 35, + "byteLength": 11 } } } @@ -7280,7 +7278,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_null_or_same_base." }, + "message": { "text": "char_not_found." }, "locations": [ { "physicalLocation": { @@ -7289,11 +7287,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 193, - "startColumn": 4, - "endLine": 193, - "endColumn": 60, - "byteLength": 56 + "startLine": 189, + "startColumn": 28, + "endLine": 189, + "endColumn": 40, + "byteLength": 12 } } } @@ -7303,7 +7301,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "initialization." }, + "message": { "text": "result_char." }, "locations": [ { "physicalLocation": { @@ -7312,11 +7310,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 416, - "startColumn": 4, - "endLine": 416, - "endColumn": 60, - "byteLength": 56 + "startLine": 185, + "startColumn": 25, + "endLine": 185, + "endColumn": 38, + "byteLength": 13 } } } @@ -7326,7 +7324,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "equal_contents." }, + "message": { "text": "result_same_base." }, "locations": [ { "physicalLocation": { @@ -7335,11 +7333,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 402, - "startColumn": 28, - "endLine": 402, - "endColumn": 49, - "byteLength": 21 + "startLine": 186, + "startColumn": 30, + "endLine": 186, + "endColumn": 66, + "byteLength": 36 } } } @@ -7349,20 +7347,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "strlen_pos_or_null." }, + "message": { "text": "result_valid_string." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 78, - "startColumn": 4, - "endLine": 82, - "endColumn": 40, - "byteLength": 169 + "startLine": 187, + "startColumn": 33, + "endLine": 187, + "endColumn": 59, + "byteLength": 26 } } } @@ -7372,7 +7370,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function strdup." }, + "message": { "text": "result_null." }, "locations": [ { "physicalLocation": { @@ -7381,11 +7379,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 484, - "startColumn": 12, - "endLine": 484, - "endColumn": 13, - "byteLength": 1 + "startLine": 190, + "startColumn": 25, + "endLine": 190, + "endColumn": 41, + "byteLength": 16 } } } @@ -7395,7 +7393,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function strdup." }, + "message": { "text": "result_null_or_same_base." }, "locations": [ { "physicalLocation": { @@ -7404,11 +7402,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 473, - "startColumn": 12, - "endLine": 473, - "endColumn": 28, - "byteLength": 16 + "startLine": 193, + "startColumn": 4, + "endLine": 193, + "endColumn": 60, + "byteLength": 56 } } } @@ -7418,7 +7416,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_valid_string_and_same_contents." }, + "message": { "text": "assigns clause in function strrchr." }, "locations": [ { "physicalLocation": { @@ -7427,11 +7425,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 477, - "startColumn": 4, - "endLine": 477, - "endColumn": 51, - "byteLength": 47 + "startLine": 195, + "startColumn": 12, + "endLine": 195, + "endColumn": 13, + "byteLength": 1 } } } @@ -7441,7 +7439,9 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior default! in function strtok." }, + "message": { + "text": "from clause of term \\result in function strrchr." + }, "locations": [ { "physicalLocation": { @@ -7450,11 +7450,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 283, + "startLine": 182, "startColumn": 12, - "endLine": 283, - "endColumn": 13, - "byteLength": 1 + "endLine": 182, + "endColumn": 19, + "byteLength": 7 } } } @@ -7464,7 +7464,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "room_nstring." }, + "message": { "text": "behavior default! in function strsep." }, "locations": [ { "physicalLocation": { @@ -7473,11 +7473,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 450, - "startColumn": 27, - "endLine": 450, - "endColumn": 48, - "byteLength": 21 + "startLine": 334, + "startColumn": 12, + "endLine": 334, + "endColumn": 13, + "byteLength": 1 } } } @@ -7487,20 +7487,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "memcmp_strlen_shift_right." }, + "message": { "text": "valid_string_stringp." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 132, - "startColumn": 4, - "endLine": 135, - "endColumn": 38, - "byteLength": 185 + "startLine": 329, + "startColumn": 35, + "endLine": 329, + "endColumn": 76, + "byteLength": 41 } } } @@ -7510,7 +7510,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "src_too_long." }, + "message": { "text": "valid_string_delim." }, "locations": [ { "physicalLocation": { @@ -7519,11 +7519,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 375, - "startColumn": 26, - "endLine": 375, - "endColumn": 42, - "byteLength": 16 + "startLine": 330, + "startColumn": 33, + "endLine": 330, + "endColumn": 57, + "byteLength": 24 } } } @@ -7533,7 +7533,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function strsignal." }, + "message": { "text": "assigns clause in function strsep." }, "locations": [ { "physicalLocation": { @@ -7542,11 +7542,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 523, + "startLine": 331, "startColumn": 12, - "endLine": 523, - "endColumn": 13, - "byteLength": 1 + "endLine": 331, + "endColumn": 20, + "byteLength": 8 } } } @@ -7556,7 +7556,9 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "can_allocate." }, + "message": { + "text": "from clause of term *stringp in function strsep." + }, "locations": [ { "physicalLocation": { @@ -7565,11 +7567,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 472, - "startColumn": 26, - "endLine": 472, - "endColumn": 49, - "byteLength": 23 + "startLine": 331, + "startColumn": 12, + "endLine": 331, + "endColumn": 20, + "byteLength": 8 } } } @@ -7579,20 +7581,22 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "wcslen_pos_or_null." }, + "message": { + "text": "from clause of term \\result in function strsep." + }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 193, - "startColumn": 4, - "endLine": 197, - "endColumn": 41, - "byteLength": 174 + "startLine": 332, + "startColumn": 12, + "endLine": 332, + "endColumn": 19, + "byteLength": 7 } } } @@ -7602,20 +7606,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "strncmp_zero." }, + "message": { "text": "behavior default! in function strsignal." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 155, - "startColumn": 4, - "endLine": 159, - "endColumn": 53, - "byteLength": 191 + "startLine": 523, + "startColumn": 12, + "endLine": 523, + "endColumn": 13, + "byteLength": 1 } } } @@ -7625,20 +7629,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_s1." }, + "message": { "text": "result_internal_str." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/strings.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 53, - "startColumn": 28, - "endLine": 53, - "endColumn": 53, - "byteLength": 25 + "startLine": 519, + "startColumn": 33, + "endLine": 519, + "endColumn": 60, + "byteLength": 27 } } } @@ -7648,9 +7652,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term \\result in function strsep." - }, + "message": { "text": "result_nul_terminated." }, "locations": [ { "physicalLocation": { @@ -7659,11 +7661,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 332, - "startColumn": 12, - "endLine": 332, - "endColumn": 19, - "byteLength": 7 + "startLine": 520, + "startColumn": 35, + "endLine": 520, + "endColumn": 51, + "byteLength": 16 } } } @@ -7673,7 +7675,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior allocation in function strdup." }, + "message": { "text": "result_valid_string." }, "locations": [ { "physicalLocation": { @@ -7682,11 +7684,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 484, - "startColumn": 12, - "endLine": 484, - "endColumn": 13, - "byteLength": 1 + "startLine": 521, + "startColumn": 33, + "endLine": 521, + "endColumn": 59, + "byteLength": 26 } } } @@ -7696,7 +7698,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_s." }, + "message": { "text": "assigns clause in function strsignal." }, "locations": [ { "physicalLocation": { @@ -7705,11 +7707,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 181, - "startColumn": 29, - "endLine": 181, - "endColumn": 49, - "byteLength": 20 + "startLine": 523, + "startColumn": 12, + "endLine": 523, + "endColumn": 13, + "byteLength": 1 } } } @@ -7719,7 +7721,9 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "char_not_found." }, + "message": { + "text": "from clause of term \\result in function strsignal." + }, "locations": [ { "physicalLocation": { @@ -7728,11 +7732,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 167, - "startColumn": 28, - "endLine": 167, - "endColumn": 40, - "byteLength": 12 + "startLine": 518, + "startColumn": 12, + "endLine": 518, + "endColumn": 19, + "byteLength": 7 } } } @@ -7742,7 +7746,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_needle." }, + "message": { "text": "behavior default! in function strspn." }, "locations": [ { "physicalLocation": { @@ -7751,11 +7755,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 232, - "startColumn": 34, - "endLine": 232, - "endColumn": 59, - "byteLength": 25 + "startLine": 210, + "startColumn": 14, + "endLine": 210, + "endColumn": 20, + "byteLength": 6 } } } @@ -7765,7 +7769,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior found in function memchr." }, + "message": { "text": "valid_string_s." }, "locations": [ { "physicalLocation": { @@ -7774,11 +7778,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 88, - "startColumn": 12, - "endLine": 88, - "endColumn": 13, - "byteLength": 1 + "startLine": 204, + "startColumn": 29, + "endLine": 204, + "endColumn": 49, + "byteLength": 20 } } } @@ -7788,7 +7792,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_same_base." }, + "message": { "text": "valid_string_accept." }, "locations": [ { "physicalLocation": { @@ -7797,11 +7801,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 186, - "startColumn": 30, - "endLine": 186, - "endColumn": 66, - "byteLength": 36 + "startLine": 205, + "startColumn": 34, + "endLine": 205, + "endColumn": 59, + "byteLength": 25 } } } @@ -7834,7 +7838,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "acsl_c_equiv." }, + "message": { "text": "assigns clause in function strspn." }, "locations": [ { "physicalLocation": { @@ -7843,11 +7847,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 140, - "startColumn": 26, - "endLine": 140, - "endColumn": 50, - "byteLength": 24 + "startLine": 206, + "startColumn": 12, + "endLine": 206, + "endColumn": 19, + "byteLength": 7 } } } @@ -7857,20 +7861,22 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "wcslen_not_zero." }, + "message": { + "text": "from clause of term \\result in function strspn." + }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 210, - "startColumn": 4, - "endLine": 212, - "endColumn": 59, - "byteLength": 124 + "startLine": 206, + "startColumn": 12, + "endLine": 206, + "endColumn": 19, + "byteLength": 7 } } } @@ -7881,7 +7887,7 @@ "kind": "pass", "level": "none", "message": { - "text": "from clause of term \\result in function strdup." + "text": "from clause of term \\result in function strspn." }, "locations": [ { @@ -7891,9 +7897,9 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 474, + "startLine": 207, "startColumn": 12, - "endLine": 474, + "endLine": 207, "endColumn": 19, "byteLength": 7 } @@ -7905,7 +7911,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior default! in function strrchr." }, + "message": { "text": "behavior default! in function strstr." }, "locations": [ { "physicalLocation": { @@ -7914,9 +7920,9 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 195, + "startLine": 229, "startColumn": 12, - "endLine": 195, + "endLine": 229, "endColumn": 13, "byteLength": 1 } @@ -7928,7 +7934,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "allocation." }, + "message": { "text": "valid_string_haystack." }, "locations": [ { "physicalLocation": { @@ -7937,11 +7943,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 495, - "startColumn": 24, - "endLine": 495, - "endColumn": 60, - "byteLength": 36 + "startLine": 220, + "startColumn": 36, + "endLine": 220, + "endColumn": 63, + "byteLength": 27 } } } @@ -7951,7 +7957,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_s2." }, + "message": { "text": "valid_string_needle." }, "locations": [ { "physicalLocation": { @@ -7960,10 +7966,10 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 145, - "startColumn": 30, - "endLine": 145, - "endColumn": 55, + "startLine": 221, + "startColumn": 34, + "endLine": 221, + "endColumn": 59, "byteLength": 25 } } @@ -7974,7 +7980,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function strncat." }, + "message": { "text": "result_null_or_in_haystack." }, "locations": [ { "physicalLocation": { @@ -7983,11 +7989,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 425, - "startColumn": 12, - "endLine": 425, - "endColumn": 50, - "byteLength": 38 + "startLine": 225, + "startColumn": 4, + "endLine": 227, + "endColumn": 59, + "byteLength": 141 } } } @@ -7997,20 +8003,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "never_allocable." }, + "message": { "text": "assigns clause in function strstr." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_alloc_axiomatic.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 39, - "startColumn": 4, - "endLine": 41, - "endColumn": 61, - "byteLength": 110 + "startLine": 229, + "startColumn": 12, + "endLine": 229, + "endColumn": 13, + "byteLength": 1 } } } @@ -8020,7 +8026,9 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_null." }, + "message": { + "text": "from clause of term \\result in function strstr." + }, "locations": [ { "physicalLocation": { @@ -8029,11 +8037,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 504, - "startColumn": 25, - "endLine": 504, - "endColumn": 41, - "byteLength": 16 + "startLine": 222, + "startColumn": 12, + "endLine": 222, + "endColumn": 19, + "byteLength": 7 } } } @@ -8043,7 +8051,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function strndup." }, + "message": { "text": "behavior default! in function strtok." }, "locations": [ { "physicalLocation": { @@ -8052,9 +8060,9 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 506, + "startLine": 283, "startColumn": 12, - "endLine": 506, + "endLine": 283, "endColumn": 13, "byteLength": 1 } @@ -8066,7 +8074,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "initialization." }, + "message": { "text": "behavior new_str in function strtok." }, "locations": [ { "physicalLocation": { @@ -8075,11 +8083,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 307, - "startColumn": 28, - "endLine": 307, - "endColumn": 49, - "byteLength": 21 + "startLine": 283, + "startColumn": 12, + "endLine": 283, + "endColumn": 13, + "byteLength": 1 } } } @@ -8089,7 +8097,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_valid_string." }, + "message": { "text": "behavior resume_str in function strtok." }, "locations": [ { "physicalLocation": { @@ -8098,34 +8106,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 521, - "startColumn": 33, - "endLine": 521, - "endColumn": 59, - "byteLength": 26 - } - } - } - ] - }, - { - "ruleId": "user-spec", - "kind": "pass", - "level": "none", - "message": { "text": "WcsNCmp." }, - "locations": [ - { - "physicalLocation": { - "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", - "uriBaseId": "FRAMAC_SHARE" - }, - "region": { - "startLine": 252, - "startColumn": 4, - "endLine": 256, - "endColumn": 53, - "byteLength": 194 + "startLine": 283, + "startColumn": 12, + "endLine": 283, + "endColumn": 13, + "byteLength": 1 } } } @@ -8135,7 +8120,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "sum_of_bounded_lengths." }, + "message": { "text": "valid_string_delim." }, "locations": [ { "physicalLocation": { @@ -8144,11 +8129,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 442, - "startColumn": 36, - "endLine": 442, - "endColumn": 74, - "byteLength": 38 + "startLine": 245, + "startColumn": 31, + "endLine": 245, + "endColumn": 55, + "byteLength": 24 } } } @@ -8158,7 +8143,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "points_to_end." }, + "message": { "text": "valid_string_s_or_delim_not_found." }, "locations": [ { "physicalLocation": { @@ -8167,11 +8152,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 403, - "startColumn": 27, - "endLine": 403, - "endColumn": 57, - "byteLength": 30 + "startLine": 258, + "startColumn": 6, + "endLine": 260, + "endColumn": 70, + "byteLength": 120 } } } @@ -8181,7 +8166,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_s." }, + "message": { "text": "not_first_call." }, "locations": [ { "physicalLocation": { @@ -8190,11 +8175,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 115, - "startColumn": 22, - "endLine": 115, - "endColumn": 42, - "byteLength": 20 + "startLine": 268, + "startColumn": 29, + "endLine": 268, + "endColumn": 53, + "byteLength": 24 } } } @@ -8204,9 +8189,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term \\result in function strxfrm." - }, + "message": { "text": "s_not_null." }, "locations": [ { "physicalLocation": { @@ -8215,11 +8198,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 461, - "startColumn": 12, - "endLine": 461, - "endColumn": 19, - "byteLength": 7 + "startLine": 256, + "startColumn": 24, + "endLine": 256, + "endColumn": 34, + "byteLength": 10 } } } @@ -8229,9 +8212,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term \\result in function memcpy." - }, + "message": { "text": "s_null." }, "locations": [ { "physicalLocation": { @@ -8240,11 +8221,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 97, - "startColumn": 12, - "endLine": 97, - "endColumn": 19, - "byteLength": 7 + "startLine": 267, + "startColumn": 20, + "endLine": 267, + "endColumn": 30, + "byteLength": 10 } } } @@ -8254,20 +8235,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "wmemchr_def." }, + "message": { "text": "result_subset." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 183, - "startColumn": 4, - "endLine": 185, - "endColumn": 63, - "byteLength": 143 + "startLine": 264, + "startColumn": 27, + "endLine": 264, + "endColumn": 72, + "byteLength": 45 } } } @@ -8277,7 +8258,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function strtok." }, + "message": { "text": "ptr_subset." }, "locations": [ { "physicalLocation": { @@ -8286,11 +8267,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 261, - "startColumn": 12, - "endLine": 261, - "endColumn": 27, - "byteLength": 15 + "startLine": 265, + "startColumn": 24, + "endLine": 265, + "endColumn": 57, + "byteLength": 33 } } } @@ -8300,9 +8281,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term \\result in function strnlen." - }, + "message": { "text": "result_subset." }, "locations": [ { "physicalLocation": { @@ -8311,11 +8290,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 132, - "startColumn": 12, - "endLine": 132, - "endColumn": 19, - "byteLength": 7 + "startLine": 277, + "startColumn": 27, + "endLine": 278, + "endColumn": 72, + "byteLength": 92 } } } @@ -8325,10 +8304,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": - "from clause of term *(dest + (0 .. strlen{Old}(src))) in function stpcpy." - }, + "message": { "text": "ptr_subset." }, "locations": [ { "physicalLocation": { @@ -8337,11 +8313,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 400, - "startColumn": 12, - "endLine": 400, - "endColumn": 32, - "byteLength": 20 + "startLine": 279, + "startColumn": 24, + "endLine": 279, + "endColumn": 77, + "byteLength": 53 } } } @@ -8351,7 +8327,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_subset." }, + "message": { "text": "assigns clause in function strtok." }, "locations": [ { "physicalLocation": { @@ -8360,11 +8336,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 277, - "startColumn": 27, - "endLine": 278, - "endColumn": 72, - "byteLength": 92 + "startLine": 246, + "startColumn": 10, + "endLine": 246, + "endColumn": 16, + "byteLength": 6 } } } @@ -8374,7 +8350,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function strxfrm." }, + "message": { "text": "assigns clause in function strtok." }, "locations": [ { "physicalLocation": { @@ -8383,11 +8359,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 460, + "startLine": 261, "startColumn": 12, - "endLine": 460, - "endColumn": 26, - "byteLength": 14 + "endLine": 261, + "endColumn": 27, + "byteLength": 15 } } } @@ -8397,20 +8373,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function strncasecmp." }, + "message": { "text": "assigns clause in function strtok." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/strings.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 57, - "startColumn": 11, - "endLine": 57, - "endColumn": 22, - "byteLength": 11 + "startLine": 269, + "startColumn": 12, + "endLine": 269, + "endColumn": 32, + "byteLength": 20 } } } @@ -8420,7 +8396,9 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "room_nstring." }, + "message": { + "text": "from clause of term *(s + (0 ..)) in function strtok." + }, "locations": [ { "physicalLocation": { @@ -8429,11 +8407,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 385, - "startColumn": 27, - "endLine": 385, - "endColumn": 48, - "byteLength": 21 + "startLine": 246, + "startColumn": 10, + "endLine": 246, + "endColumn": 16, + "byteLength": 6 } } } @@ -8443,7 +8421,10 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "room_string." }, + "message": { + "text": + "from clause of term *(__fc_strtok_ptr + (0 ..)) in function strtok." + }, "locations": [ { "physicalLocation": { @@ -8452,11 +8433,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 352, - "startColumn": 26, - "endLine": 352, - "endColumn": 55, - "byteLength": 29 + "startLine": 248, + "startColumn": 10, + "endLine": 248, + "endColumn": 30, + "byteLength": 20 } } } @@ -8466,7 +8447,9 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_ptr." }, + "message": { + "text": "from clause of term \\result in function strtok." + }, "locations": [ { "physicalLocation": { @@ -8475,11 +8458,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 427, - "startColumn": 24, - "endLine": 427, - "endColumn": 39, - "byteLength": 15 + "startLine": 250, + "startColumn": 10, + "endLine": 250, + "endColumn": 17, + "byteLength": 7 } } } @@ -8489,7 +8472,9 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_dest." }, + "message": { + "text": "from clause of term __fc_strtok_ptr in function strtok." + }, "locations": [ { "physicalLocation": { @@ -8498,11 +8483,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 458, - "startColumn": 25, - "endLine": 458, - "endColumn": 48, - "byteLength": 23 + "startLine": 252, + "startColumn": 10, + "endLine": 252, + "endColumn": 25, + "byteLength": 15 } } } @@ -8513,7 +8498,7 @@ "kind": "pass", "level": "none", "message": { - "text": "from clause of term \\result in function strspn." + "text": "from clause of term __fc_strtok_ptr in function strtok." }, "locations": [ { @@ -8523,11 +8508,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 206, + "startLine": 261, "startColumn": 12, - "endLine": 206, - "endColumn": 19, - "byteLength": 7 + "endLine": 261, + "endColumn": 27, + "byteLength": 15 } } } @@ -8537,7 +8522,9 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior default! in function strerror." }, + "message": { + "text": "from clause of term *(s + (0 ..)) in function strtok." + }, "locations": [ { "physicalLocation": { @@ -8546,11 +8533,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 347, + "startLine": 262, "startColumn": 12, - "endLine": 347, - "endColumn": 13, - "byteLength": 1 + "endLine": 262, + "endColumn": 18, + "byteLength": 6 } } } @@ -8560,7 +8547,9 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_src_too_large." }, + "message": { + "text": "from clause of term \\result in function strtok." + }, "locations": [ { "physicalLocation": { @@ -8569,11 +8558,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 437, - "startColumn": 4, - "endLine": 437, - "endColumn": 49, - "byteLength": 45 + "startLine": 263, + "startColumn": 12, + "endLine": 263, + "endColumn": 19, + "byteLength": 7 } } } @@ -8583,20 +8572,23 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "MemCmp." }, + "message": { + "text": + "from clause of term *(__fc_strtok_ptr + (0 ..)) in function strtok." + }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 39, - "startColumn": 4, - "endLine": 42, - "endColumn": 70, - "byteLength": 170 + "startLine": 269, + "startColumn": 12, + "endLine": 269, + "endColumn": 32, + "byteLength": 20 } } } @@ -8606,20 +8598,22 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "wcslen_zero." }, + "message": { + "text": "from clause of term __fc_strtok_ptr in function strtok." + }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 214, - "startColumn": 4, - "endLine": 216, - "endColumn": 60, - "byteLength": 121 + "startLine": 272, + "startColumn": 12, + "endLine": 272, + "endColumn": 27, + "byteLength": 15 } } } @@ -8630,7 +8624,7 @@ "kind": "pass", "level": "none", "message": { - "text": "from clause of term \\result in function strncpy." + "text": "from clause of term \\result in function strtok." }, "locations": [ { @@ -8640,9 +8634,9 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 368, + "startLine": 275, "startColumn": 12, - "endLine": 368, + "endLine": 275, "endColumn": 19, "byteLength": 7 } @@ -8654,7 +8648,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function memcpy." }, + "message": { "text": "complete clause in function strtok." }, "locations": [ { "physicalLocation": { @@ -8663,11 +8657,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 96, + "startLine": 283, "startColumn": 12, - "endLine": 96, - "endColumn": 35, - "byteLength": 23 + "endLine": 283, + "endColumn": 13, + "byteLength": 1 } } } @@ -8677,22 +8671,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "specialization of valid_string_s at stmt 2." - }, + "message": { "text": "disjoint clause in function strtok." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "tests/sarif/libc.c", - "uriBaseId": "PWD" + "uri": "libc/string.h", + "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 13, - "startColumn": 10, - "endLine": 13, - "endColumn": 19, - "byteLength": 9 + "startLine": 283, + "startColumn": 12, + "endLine": 283, + "endColumn": 13, + "byteLength": 1 } } } @@ -8702,7 +8694,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_stringp." }, + "message": { "text": "behavior default! in function strtok_r." }, "locations": [ { "physicalLocation": { @@ -8711,11 +8703,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 329, - "startColumn": 35, - "endLine": 329, - "endColumn": 76, - "byteLength": 41 + "startLine": 327, + "startColumn": 12, + "endLine": 327, + "endColumn": 13, + "byteLength": 1 } } } @@ -8725,20 +8717,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "strlen_neg." }, + "message": { "text": "behavior new_str in function strtok_r." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 84, - "startColumn": 4, - "endLine": 87, - "endColumn": 22, - "byteLength": 109 + "startLine": 327, + "startColumn": 12, + "endLine": 327, + "endColumn": 13, + "byteLength": 1 } } } @@ -8748,7 +8740,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior default! in function strstr." }, + "message": { "text": "behavior resume_str in function strtok_r." }, "locations": [ { "physicalLocation": { @@ -8757,9 +8749,9 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 229, + "startLine": 327, "startColumn": 12, - "endLine": 229, + "endLine": 327, "endColumn": 13, "byteLength": 1 } @@ -8771,7 +8763,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_needle." }, + "message": { "text": "valid_string_delim." }, "locations": [ { "physicalLocation": { @@ -8780,11 +8772,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 221, - "startColumn": 34, - "endLine": 221, - "endColumn": 59, - "byteLength": 25 + "startLine": 286, + "startColumn": 31, + "endLine": 286, + "endColumn": 55, + "byteLength": 24 } } } @@ -8794,7 +8786,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "initialization." }, + "message": { "text": "valid_saveptr." }, "locations": [ { "physicalLocation": { @@ -8803,11 +8795,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 390, - "startColumn": 28, - "endLine": 390, - "endColumn": 73, - "byteLength": 45 + "startLine": 287, + "startColumn": 26, + "endLine": 287, + "endColumn": 41, + "byteLength": 15 } } } @@ -8817,20 +8809,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "memset_def." }, + "message": { "text": "valid_string_s_or_delim_not_found." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 68, - "startColumn": 4, - "endLine": 70, - "endColumn": 63, - "byteLength": 135 + "startLine": 300, + "startColumn": 6, + "endLine": 302, + "endColumn": 70, + "byteLength": 120 } } } @@ -8840,7 +8832,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_ptr." }, + "message": { "text": "not_first_call." }, "locations": [ { "physicalLocation": { @@ -8849,11 +8841,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 369, - "startColumn": 24, - "endLine": 369, - "endColumn": 39, - "byteLength": 15 + "startLine": 311, + "startColumn": 29, + "endLine": 311, + "endColumn": 46, + "byteLength": 17 } } } @@ -8863,9 +8855,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term \\result in function strncat." - }, + "message": { "text": "initialization." }, "locations": [ { "physicalLocation": { @@ -8874,11 +8864,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 426, - "startColumn": 12, - "endLine": 426, - "endColumn": 19, - "byteLength": 7 + "startLine": 312, + "startColumn": 37, + "endLine": 312, + "endColumn": 58, + "byteLength": 21 } } } @@ -8888,9 +8878,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term \\result in function strlcpy." - }, + "message": { "text": "s_not_null." }, "locations": [ { "physicalLocation": { @@ -8899,11 +8887,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 389, - "startColumn": 12, - "endLine": 389, - "endColumn": 19, - "byteLength": 7 + "startLine": 298, + "startColumn": 24, + "endLine": 298, + "endColumn": 34, + "byteLength": 10 } } } @@ -8913,7 +8901,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function strchrnul." }, + "message": { "text": "s_null." }, "locations": [ { "physicalLocation": { @@ -8922,11 +8910,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 179, - "startColumn": 12, - "endLine": 179, - "endColumn": 13, - "byteLength": 1 + "startLine": 310, + "startColumn": 20, + "endLine": 310, + "endColumn": 30, + "byteLength": 10 } } } @@ -8936,7 +8924,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "acsl_c_equiv." }, + "message": { "text": "result_subset." }, "locations": [ { "physicalLocation": { @@ -8945,11 +8933,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 118, - "startColumn": 26, - "endLine": 118, - "endColumn": 46, - "byteLength": 20 + "startLine": 306, + "startColumn": 27, + "endLine": 306, + "endColumn": 72, + "byteLength": 45 } } } @@ -8959,9 +8947,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term \\result in function strlen." - }, + "message": { "text": "initialization." }, "locations": [ { "physicalLocation": { @@ -8970,11 +8956,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 126, - "startColumn": 12, - "endLine": 126, - "endColumn": 19, - "byteLength": 7 + "startLine": 307, + "startColumn": 28, + "endLine": 307, + "endColumn": 49, + "byteLength": 21 } } } @@ -8984,10 +8970,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": - "from clause of term *(dest + (0 .. n - 1)) in function strlcpy." - }, + "message": { "text": "saveptr_subset." }, "locations": [ { "physicalLocation": { @@ -8996,11 +8979,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 388, - "startColumn": 12, - "endLine": 388, - "endColumn": 24, - "byteLength": 12 + "startLine": 308, + "startColumn": 28, + "endLine": 308, + "endColumn": 54, + "byteLength": 26 } } } @@ -9010,7 +8993,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior default! in function strncmp." }, + "message": { "text": "result_subset." }, "locations": [ { "physicalLocation": { @@ -9019,11 +9002,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 149, - "startColumn": 11, - "endLine": 149, - "endColumn": 18, - "byteLength": 7 + "startLine": 321, + "startColumn": 27, + "endLine": 322, + "endColumn": 65, + "byteLength": 85 } } } @@ -9033,7 +9016,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function strndup." }, + "message": { "text": "saveptr_subset." }, "locations": [ { "physicalLocation": { @@ -9042,11 +9025,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 492, - "startColumn": 12, - "endLine": 492, - "endColumn": 28, - "byteLength": 16 + "startLine": 323, + "startColumn": 28, + "endLine": 323, + "endColumn": 67, + "byteLength": 39 } } } @@ -9056,7 +9039,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_delim." }, + "message": { "text": "assigns clause in function strtok_r." }, "locations": [ { "physicalLocation": { @@ -9065,11 +9048,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 330, - "startColumn": 33, - "endLine": 330, - "endColumn": 57, - "byteLength": 24 + "startLine": 288, + "startColumn": 10, + "endLine": 288, + "endColumn": 16, + "byteLength": 6 } } } @@ -9079,7 +9062,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function strpbrk." }, + "message": { "text": "assigns clause in function strtok_r." }, "locations": [ { "physicalLocation": { @@ -9088,11 +9071,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 218, - "startColumn": 12, - "endLine": 218, - "endColumn": 13, - "byteLength": 1 + "startLine": 303, + "startColumn": 12, + "endLine": 303, + "endColumn": 20, + "byteLength": 8 } } } @@ -9102,7 +9085,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_null." }, + "message": { "text": "assigns clause in function strtok_r." }, "locations": [ { "physicalLocation": { @@ -9111,11 +9094,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 482, - "startColumn": 25, - "endLine": 482, - "endColumn": 41, - "byteLength": 16 + "startLine": 313, + "startColumn": 12, + "endLine": 313, + "endColumn": 27, + "byteLength": 15 } } } @@ -9125,20 +9108,22 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_memory_area." }, + "message": { + "text": "from clause of term *(s + (0 ..)) in function strtok_r." + }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/strings.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 36, - "startColumn": 32, - "endLine": 36, - "endColumn": 63, - "byteLength": 31 + "startLine": 288, + "startColumn": 10, + "endLine": 288, + "endColumn": 16, + "byteLength": 6 } } } @@ -9148,7 +9133,10 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_s_or_delim_not_found." }, + "message": { + "text": + "from clause of term *(*saveptr + (0 ..)) in function strtok_r." + }, "locations": [ { "physicalLocation": { @@ -9157,11 +9145,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 300, - "startColumn": 6, - "endLine": 302, - "endColumn": 70, - "byteLength": 120 + "startLine": 290, + "startColumn": 10, + "endLine": 290, + "endColumn": 25, + "byteLength": 15 } } } @@ -9172,7 +9160,7 @@ "kind": "pass", "level": "none", "message": { - "text": "from clause of term \\result in function strspn." + "text": "from clause of term \\result in function strtok_r." }, "locations": [ { @@ -9182,10 +9170,10 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 207, - "startColumn": 12, - "endLine": 207, - "endColumn": 19, + "startLine": 292, + "startColumn": 10, + "endLine": 292, + "endColumn": 17, "byteLength": 7 } } @@ -9196,7 +9184,9 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_ptr." }, + "message": { + "text": "from clause of term *saveptr in function strtok_r." + }, "locations": [ { "physicalLocation": { @@ -9205,11 +9195,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 119, - "startColumn": 24, - "endLine": 119, - "endColumn": 36, - "byteLength": 12 + "startLine": 294, + "startColumn": 10, + "endLine": 294, + "endColumn": 18, + "byteLength": 8 } } } @@ -9220,7 +9210,7 @@ "kind": "pass", "level": "none", "message": { - "text": "from clause of term __fc_strtok_ptr in function strtok." + "text": "from clause of term *saveptr in function strtok_r." }, "locations": [ { @@ -9230,11 +9220,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 252, - "startColumn": 10, - "endLine": 252, - "endColumn": 25, - "byteLength": 15 + "startLine": 303, + "startColumn": 12, + "endLine": 303, + "endColumn": 20, + "byteLength": 8 } } } @@ -9244,7 +9234,9 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function strcat." }, + "message": { + "text": "from clause of term *(s + (0 ..)) in function strtok_r." + }, "locations": [ { "physicalLocation": { @@ -9253,11 +9245,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 411, + "startLine": 304, "startColumn": 12, - "endLine": 411, - "endColumn": 58, - "byteLength": 46 + "endLine": 304, + "endColumn": 18, + "byteLength": 6 } } } @@ -9267,7 +9259,9 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "behavior default! in function stpcpy." }, + "message": { + "text": "from clause of term \\result in function strtok_r." + }, "locations": [ { "physicalLocation": { @@ -9276,11 +9270,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 405, + "startLine": 305, "startColumn": 12, - "endLine": 405, - "endColumn": 13, - "byteLength": 1 + "endLine": 305, + "endColumn": 19, + "byteLength": 7 } } } @@ -9290,20 +9284,23 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "zero_initialized." }, + "message": { + "text": + "from clause of term *(*saveptr + (0 ..)) in function strtok_r." + }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/strings.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 39, - "startColumn": 28, - "endLine": 39, - "endColumn": 63, - "byteLength": 35 + "startLine": 313, + "startColumn": 12, + "endLine": 313, + "endColumn": 27, + "byteLength": 15 } } } @@ -9313,7 +9310,9 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "result_char." }, + "message": { + "text": "from clause of term *saveptr in function strtok_r." + }, "locations": [ { "physicalLocation": { @@ -9322,11 +9321,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 185, - "startColumn": 25, - "endLine": 185, - "endColumn": 38, - "byteLength": 13 + "startLine": 316, + "startColumn": 12, + "endLine": 316, + "endColumn": 20, + "byteLength": 8 } } } @@ -9336,7 +9335,9 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_s2." }, + "message": { + "text": "from clause of term \\result in function strtok_r." + }, "locations": [ { "physicalLocation": { @@ -9345,11 +9346,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 56, - "startColumn": 23, - "endLine": 56, - "endColumn": 49, - "byteLength": 26 + "startLine": 319, + "startColumn": 12, + "endLine": 319, + "endColumn": 19, + "byteLength": 7 } } } @@ -9359,7 +9360,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function stpcpy." }, + "message": { "text": "complete clause in function strtok_r." }, "locations": [ { "physicalLocation": { @@ -9368,11 +9369,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 400, + "startLine": 327, "startColumn": 12, - "endLine": 400, - "endColumn": 32, - "byteLength": 20 + "endLine": 327, + "endColumn": 13, + "byteLength": 1 } } } @@ -9382,9 +9383,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term \\result in function strstr." - }, + "message": { "text": "disjoint clause in function strtok_r." }, "locations": [ { "physicalLocation": { @@ -9393,11 +9392,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 222, + "startLine": 327, "startColumn": 12, - "endLine": 222, - "endColumn": 19, - "byteLength": 7 + "endLine": 327, + "endColumn": 13, + "byteLength": 1 } } } @@ -9407,9 +9406,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term \\result in function strrchr." - }, + "message": { "text": "behavior default! in function strxfrm." }, "locations": [ { "physicalLocation": { @@ -9418,10 +9415,10 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 182, - "startColumn": 12, - "endLine": 182, - "endColumn": 19, + "startLine": 463, + "startColumn": 14, + "endLine": 463, + "endColumn": 21, "byteLength": 7 } } @@ -9432,7 +9429,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "assigns clause in function strnlen." }, + "message": { "text": "valid_dest." }, "locations": [ { "physicalLocation": { @@ -9441,11 +9438,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 135, - "startColumn": 14, - "endLine": 135, - "endColumn": 21, - "byteLength": 7 + "startLine": 458, + "startColumn": 25, + "endLine": 458, + "endColumn": 48, + "byteLength": 23 } } } @@ -9455,20 +9452,20 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_s2." }, + "message": { "text": "valid_string_src." }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/strings.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 54, - "startColumn": 28, - "endLine": 54, + "startLine": 459, + "startColumn": 31, + "endLine": 459, "endColumn": 53, - "byteLength": 25 + "byteLength": 22 } } } @@ -9478,9 +9475,7 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { - "text": "from clause of term *(s + (0 ..)) in function strtok." - }, + "message": { "text": "assigns clause in function strxfrm." }, "locations": [ { "physicalLocation": { @@ -9489,11 +9484,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 246, - "startColumn": 10, - "endLine": 246, - "endColumn": 16, - "byteLength": 6 + "startLine": 460, + "startColumn": 12, + "endLine": 460, + "endColumn": 26, + "byteLength": 14 } } } @@ -9503,7 +9498,10 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "valid_string_src." }, + "message": { + "text": + "from clause of term *(dest + (0 .. n - 1)) in function strxfrm." + }, "locations": [ { "physicalLocation": { @@ -9512,11 +9510,11 @@ "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 408, - "startColumn": 31, - "endLine": 408, - "endColumn": 53, - "byteLength": 22 + "startLine": 460, + "startColumn": 12, + "endLine": 460, + "endColumn": 26, + "byteLength": 14 } } } @@ -9526,20 +9524,22 @@ "ruleId": "user-spec", "kind": "pass", "level": "none", - "message": { "text": "strchr_def." }, + "message": { + "text": "from clause of term \\result in function strxfrm." + }, "locations": [ { "physicalLocation": { "artifactLocation": { - "uri": "libc/__fc_string_axiomatic.h", + "uri": "libc/string.h", "uriBaseId": "FRAMAC_SHARE" }, "region": { - "startLine": 168, - "startColumn": 4, - "endLine": 170, - "endColumn": 75, - "byteLength": 132 + "startLine": 461, + "startColumn": 12, + "endLine": 461, + "endColumn": 19, + "byteLength": 7 } } } diff --git a/src/plugins/value/Eva.mli b/src/plugins/value/Eva.mli index dc8c0bae4f7a55464e4331bbacf81ef69aa63e0e..d71fa98facac49545316eaa36eac9ee5ca40cdc1 100644 --- a/src/plugins/value/Eva.mli +++ b/src/plugins/value/Eva.mli @@ -40,6 +40,10 @@ module Value_parameters: sig to interpret calls to function [kf]. Raises [Not_found] if there is no builtin of name [name]. *) val use_builtin: Cil_types.kernel_function -> string -> unit + + (** [use_global_value_partitioning vi] instructs the analysis to use + value partitioning on the global variable [vi]. *) + val use_global_value_partitioning: Cil_types.varinfo -> unit end module Eval_terms: sig diff --git a/src/plugins/value/value_parameters.ml b/src/plugins/value/value_parameters.ml index df4428ee75a433d53cc23d1ced1a4a1525d9a02f..122835c78c2f664423edae6235400c83c89f93d9 100644 --- a/src/plugins/value/value_parameters.ml +++ b/src/plugins/value/value_parameters.ml @@ -800,6 +800,9 @@ module ValuePartitioning = end) let () = add_precision_dep ValuePartitioning.parameter +let use_global_value_partitioning vi = + ValuePartitioning.add vi.Cil_types.vname + let () = Parameter_customize.set_group precision_tuning module SplitLimit = Int diff --git a/src/plugins/value/value_parameters.mli b/src/plugins/value/value_parameters.mli index 573e922bde59f3540e00a19d85516740c142acdd..23816c0c964ecdba0fa6d034e11a0410bdbee094 100644 --- a/src/plugins/value/value_parameters.mli +++ b/src/plugins/value/value_parameters.mli @@ -228,6 +228,10 @@ val enabled_domains: unit -> (string * string) list builtin `b`. *) val use_builtin: Cil_types.kernel_function -> string -> unit +(** [use_global_value_partitioning vi] enable value partitioning on the global + variable `vi`. *) +val use_global_value_partitioning: Cil_types.varinfo -> unit + (* Local Variables: compile-command: "make -C ../../.." diff --git a/src/plugins/variadic/classify.ml b/src/plugins/variadic/classify.ml index a7fd07bd903055bc33815aa8928b0413ae558fff..80b9c73dfc85db1828aacf1c9e530c078134c780 100644 --- a/src/plugins/variadic/classify.ml +++ b/src/plugins/variadic/classify.ml @@ -110,6 +110,20 @@ let mk_format_fun vi f_kind f_buffer ~format_pos = (* Classification *) (* ************************************************************************ *) +let is_frama_c_builtin name = + Ast_info.is_frama_c_builtin name || + Cil_builtins.Builtin_functions.mem name || + Extlib.string_prefix "__FRAMAC_" name (* Mthread prefixes *) + +let va_builtins = [ + "__builtin_va_start"; + "__builtin_va_copy"; + "__builtin_va_arg"; + "__builtin_va_end"; +] + +let is_va_builtin s = List.mem s va_builtins + let classify_std env vi = match vi.vname with (* fcntl.h - Overloads of functions *) | "fcntl" -> mk_overload env @@ -148,7 +162,9 @@ let classify_std env vi = match vi.vname with (* stropts.h *) | "ioctl" -> mk_overload env ["__va_ioctl_void" ; "__va_ioctl_int" ; "__va_ioctl_ptr"] - + | n when Extlib.string_prefix "__sync_" n -> Misc + | n when is_va_builtin n -> Misc + | n when is_frama_c_builtin n -> Builtin (* Anything else *) | _ -> Unknown diff --git a/src/plugins/variadic/tests/erroneous/oracle/variadic-builtin.res.oracle b/src/plugins/variadic/tests/erroneous/oracle/variadic-builtin.res.oracle index 348e8c477dabbdd59001acfa7a657eb14cb7aa1b..bf189af5926715a5665d71211f84b792dbffd641 100644 --- a/src/plugins/variadic/tests/erroneous/oracle/variadic-builtin.res.oracle +++ b/src/plugins/variadic/tests/erroneous/oracle/variadic-builtin.res.oracle @@ -1,5 +1,9 @@ +[variadic] tests/erroneous/variadic-builtin.i:1: + Declaration of variadic function Frama_C_show_each_warning. [variadic] tests/erroneous/variadic-builtin.i:1: Variadic builtin Frama_C_show_each_warning left untransformed. +[variadic] tests/erroneous/variadic-builtin.i:5: + Call to variadic builtin Frama_C_show_each_warning left untransformed. [kernel] tests/erroneous/variadic-builtin.i:6: Plug-in variadic aborted: unimplemented feature. You may send a feature request at https://git.frama-c.com/pub/frama-c/issues with: '[Plug-in variadic] The variadic plugin doesn't handle calls to a pointer to the variadic builtin Frama_C_show_each_warning.'. diff --git a/src/plugins/variadic/tests/known/oracle/printf_garbled_mix.res.oracle b/src/plugins/variadic/tests/known/oracle/printf_garbled_mix.res.oracle index 3cecd8f9b1e42365b8af2c9e3217c941bd59aea4..3ba86d9da3ae971fb31c76d3bfd3a967be0ddb5c 100644 --- a/src/plugins/variadic/tests/known/oracle/printf_garbled_mix.res.oracle +++ b/src/plugins/variadic/tests/known/oracle/printf_garbled_mix.res.oracle @@ -14,8 +14,6 @@ Declaration of variadic function sscanf. [variadic] FRAMAC_SHARE/libc/stdio.h:541: Declaration of variadic function dprintf. -[variadic] tests/known/printf_garbled_mix.c:8: - Variadic builtin Frama_C_show_each_nb_printed left untransformed. [variadic] tests/known/printf_garbled_mix.c:7: Translating call to printf to a call to the specialized version printf_va_1. [eva] Analyzing a complete application starting at main diff --git a/src/plugins/variadic/translate.ml b/src/plugins/variadic/translate.ml index 7508c434ecc9a43c3de56d6f184157739d8e8dac..04887ec9f26596fd79d24cba26791327ff487e03 100644 --- a/src/plugins/variadic/translate.ml +++ b/src/plugins/variadic/translate.ml @@ -27,16 +27,7 @@ module Typ = Extends.Typ (* List of builtin function names to translate *) -let va_builtins = [ - "__builtin_va_start"; - "__builtin_va_copy"; - "__builtin_va_arg"; - "__builtin_va_end"] - -let is_framac_builtin vi = - Ast_info.is_frama_c_builtin vi.vname || - Extlib.string_prefix "__FRAMAC_" vi.vname (* Mthread prefixes *) - +let is_framac_builtin vi = Classify.is_frama_c_builtin vi.vname (* In place visitor for translation *) @@ -53,8 +44,7 @@ let translate_variadics (file : file) = method! vglob glob = begin match glob with - | GFunDecl(_, vi, _) | GFun ({svar = vi}, _) - when not (is_framac_builtin vi) -> + | GFunDecl(_, vi, _) | GFun ({svar = vi}, _) -> if not (Table.mem classification vi) then begin let vf = Classify.classify env vi in Option.iter (Table.add classification vi) vf @@ -87,15 +77,16 @@ let translate_variadics (file : file) = (* Translate types and signatures *) method! vglob glob = begin match glob with - | GFunDecl(_, vi, _) when is_framac_builtin vi -> - Self.result ~level:2 ~current:true - "Variadic builtin %s left untransformed." vi.vname; - Cil.SkipChildren - | GFunDecl(_, vi, _) -> - if Table.mem classification vi then - Generic.add_vpar vi; - Cil.DoChildren + (match Table.find_opt classification vi with + | None -> Cil.DoChildren (* may transform the type *) + | Some { vf_class = Builtin } -> + Self.result ~level:2 ~current:true + "Variadic builtin %s left untransformed." vi.vname; + Cil.SkipChildren + | Some _ -> + Generic.add_vpar vi; + Cil.DoChildren) | GFun ({svar = vi} as fundec, _) -> if Table.mem classification vi then begin @@ -147,6 +138,10 @@ let translate_variadics (file : file) = | Overload o -> Standard.overloaded_call ~fundec o | Aggregator a -> Standard.aggregator_call ~fundec ~ghost a | FormatFun f -> Standard.format_fun_call ~fundec env f + | Builtin -> + Self.result ~level:2 ~current:true + "Call to variadic builtin %s left untransformed." f.vname; + raise Not_found | _ -> raise Standard.Translate_call_exn in call_translator block loc mk_call vf args @@ -156,7 +151,7 @@ let translate_variadics (file : file) = in begin match i with | Call(_, {enode = Lval(Var vi, _)}, _, _) - when List.mem vi.vname va_builtins -> + when Classify.is_va_builtin vi.vname -> File.must_recompute_cfg fundec; Cil.ChangeTo (Generic.translate_va_builtin fundec i) | Call(lv, {enode = Lval(Var vi, NoOffset)}, args, loc) -> diff --git a/src/plugins/variadic/va_types.mli b/src/plugins/variadic/va_types.mli index 70063338550ae6ea4ca452d6c679b1c8649128ae..54cf2034a833d59df8dbee529b047b1f0d36735e 100644 --- a/src/plugins/variadic/va_types.mli +++ b/src/plugins/variadic/va_types.mli @@ -26,6 +26,8 @@ open Cil_types type variadic_class = | Unknown (** Function declared and not known by Frama-C *) + | Builtin + (** Function registered as a builtin function in Cil_builtins *) | Defined (** Function for which we have the definition in the project *) | Misc diff --git a/tests/syntax/oracle/bts1553_2.res.oracle b/tests/syntax/oracle/bts1553_2.res.oracle index 9293259fe565811c4e9f7f6dedc355b38faa4288..93dacee514969b19d8bc20ff47fcaffdd2a4c526 100644 --- a/tests/syntax/oracle/bts1553_2.res.oracle +++ b/tests/syntax/oracle/bts1553_2.res.oracle @@ -5,6 +5,8 @@ struct a { int b ; }; + /* compiler builtin: + void Frama_C_show_aorai_state(...); */ /* compiler builtin: __builtin_va_list __builtin_next_arg(void); */ /* compiler builtin: @@ -40,6 +42,8 @@ struct a { int b ; }; + /* compiler builtin: + void Frama_C_show_aorai_state(...); */ /* compiler builtin: __builtin_va_list __builtin_next_arg(void); */ /* compiler builtin: diff --git a/tests/syntax/oracle/check_builtin_bts1440.res.oracle b/tests/syntax/oracle/check_builtin_bts1440.res.oracle index 510a8f2b3ab41a3c39cd5c26cc41c8703528b9e1..f81e5813ccc1c324160bc8600bf6e042c3e3fbbd 100644 --- a/tests/syntax/oracle/check_builtin_bts1440.res.oracle +++ b/tests/syntax/oracle/check_builtin_bts1440.res.oracle @@ -2,6 +2,8 @@ [kernel:file:print-one] result of parsing tests/syntax/check_builtin_bts1440.i: /* Generated by Frama-C */ + void Frama_C_show_aorai_state(...); + void __builtin__Exit(int); int __builtin___fprintf_chk(void *, int, char const * , ...); diff --git a/tests/syntax/oracle/static_formals_1.res.oracle b/tests/syntax/oracle/static_formals_1.res.oracle index 94353adf96ce8cb00b16e417c838e314206f2554..f3dc98b3d3003fb066ecc0db86d86140b90ce85c 100644 --- a/tests/syntax/oracle/static_formals_1.res.oracle +++ b/tests/syntax/oracle/static_formals_1.res.oracle @@ -1,24 +1,24 @@ [kernel] Parsing tests/syntax/static_formals_1.c (with preprocessing) [kernel] Parsing tests/syntax/static_formals_2.c (with preprocessing) /* Generated by Frama-C */ -/*@ requires /* vid:25, lvid:25 */x < 10; */ -static int /* vid:58 */f(int /* vid:25, lvid:25 */x); +/*@ requires /* vid:26, lvid:26 */x < 10; */ +static int /* vid:60 */f(int /* vid:26, lvid:26 */x); -int /* vid:30 */g(void) +int /* vid:31 */g(void) { - int /* vid:31 */tmp; - /* vid:31 */tmp = /* vid:58 */f(4); - return /* vid:31 */tmp; + int /* vid:32 */tmp; + /* vid:32 */tmp = /* vid:60 */f(4); + return /* vid:32 */tmp; } -/*@ requires /* vid:53, lvid:53 */x < 10; */ -static int /* vid:59 */f_0(int /* vid:53, lvid:53 */x); +/*@ requires /* vid:55, lvid:55 */x < 10; */ +static int /* vid:61 */f_0(int /* vid:55, lvid:55 */x); -int /* vid:56 */h(void) +int /* vid:58 */h(void) { - int /* vid:57 */tmp; - /* vid:57 */tmp = /* vid:59 */f_0(6); - return /* vid:57 */tmp; + int /* vid:59 */tmp; + /* vid:59 */tmp = /* vid:61 */f_0(6); + return /* vid:59 */tmp; }