dataesr/scientific-paragraphs-categorization huggingface dataset:
This paper contributes to the trend of providing fully verified container libraries. We consider an implementation of the bounded doubly linked list container which manages the list in a fixed size, heap allocated array. The container provides constant time methods to update the list by adding, deleting, and changing elements, as well as cursors for list traversal and access to elements. The library is implemented in C, but we wrote the code and its specification by imitating the ones provided by GNAT for the standard library of Ada 2012. The proof of functional correctness is done using VeriFast, which provides an auto-active verification environment for Separation Logic extended with algebraic data types. The specifications proved entail the contracts of the Ada library and include new features.
Introduction Standard libraries of programming languages provide efficient implementations for common data containers. The details of these implementations are abstracted away by generic interfaces which are specified in terms of well understood mathematical structures such as sets, multisets, sequences, and partial functions. The intensive use of container libraries makes important their formal verification. However, the functional correctness of these libraries is challenging to verify for several reasons. Firstly, their implementation is highly optimized: it employs complex data structures and manages the memory directly through pointers/references or specific memory allocators. Secondly, the specification of containers is rarely formal. Notable exceptions are, e. g. , Eiffel  [28]  and SPARK  [11] ; recently,  [1]  provided a specification of the Ada 2012 container library.
The list elements are designated using (bi-directional) cursors, also used to traverse the list. In conclusion, the code of this container was designed to ensure efficiency of operations and not its verification, and therefore it provides a realistic test for the automated verification. Thanks to the introduction of formal contracts in Ada 2012, the container has been fully specified recently based on a previous specification in Why3 by Dross et al. [11]. The specification given is "meant to facilitate the formal verification of code using this container"  [12] , and it is presently used to prove the clients written in SPARK. The container is specified in terms of a model representing a functional implementation of bounded vectors, also written in Ada. This kind of specification is a substitute for the algebraic data types, not supported by Ada.
It has the advantage of being executable, which enables the run-time verification of the implementation. An important feature of these contracts is their completeness  [27]  with respect to the models considered for the container and the cursors. This aspect is a challenge for the state of the art verification tools. The formal verification of these contracts can not be done by GNATprove, the deductive verification environment for SPARK, because the code employs language constructs out of its scope. The goal of our study is to apply on-the-shelf verification tools to prove the full functional correctness and the memory safety for this implementation, without simplifying the code or the specification. To open the case study to more verification platforms, we choose to write this library in C, because C may capture all the features of the container implementation, except the strong typing and the generic types of Ada.
The C implementation mimics the Ada code. The functional specification of the C code translates the container contracts from Ada based on (i) representation predicates that relate heap regions with algebraic models using inductively defined predicates, (ii) algebraic lists and maps, and (iii) inductively defined predicates and functions on the algebraic models. The logic including these features is undecidable in general. Therefore, we have to help the prover to obtain push button verification. The auto-active verification  [20]  environments are helpful in such tasks. The invariant properties of the implementation and the features exhibited by the specification guided us towards deductive verification platforms that support Separation Logic  [31]  (SL) and algebraic data types. Consequently, we choose the VeriFast  [15]  auto-active verification tool, which provides means for (a) the specification of representation predicates in the style introduced for SL by O'Hearn et al.
[25] , (b) the definition of polymorphic algebraic data types, predicates and functions, and (c) the definition of user lemmas to help verification. Using these features, we employ a verification methodology based on the refinement of the original specification. The refined specification not only captures accurately the contracts, but also eases the deductive verification process, i. e. , the writing of lemmas. For example, we employ a style of writing representation predicates in SL that leads to simpler lemmas for list segment composition. To summarize, we verified the C implementation of a bounded doubly linked list container against its functional specification. In addition, we verified the safety of memory accesses using Separation Logic. For this, we annotated the C code and we extended the library for algebraic polymorphic lists of VeriFast with new predicates and lemmas.
Overview Implementation: The code is written in a very simple fragment of C, which may be easily translated to most imperative programming languages. It uses records and pointers to records, dynamic memory allocation, classic accesses to record fields and array elements, basic integer type and its operations. Like in the original code, the container does not support concurrency and has been written to obtain efficient operations and not to ease the verification. The container elements are designated through cursors, which represent valid positions in the list; they may be moved forward and backward in the list. The container interface includes 30 operations including classic operations (creation, copy, size access, clearing and deallocation, equality test, searching) and a rich set of utilities (inserting or deleting bunches of elements at some position, searching from the end, merging lists, swapping elements or links, reversing in place, sorting).
For the syntax of specifications, we employ in the following the specification language of VeriFast, which extends the normalized specification language for C, ACSL  [3] , with shorthand notations and operators for Separation Logic. Therefore, we employ '?' to introduce existentially quantified variables, '&*&' for both classic conjunction and the separating one, '|->' for the points-to operator that defines the content (right operand) of an allocated memory cell (left operand), and emp for the empty heap. Algebraic lists of VeriFast have type list and are polymorphic; the operations on lists have classic names. The definition of new logic types (and functions) is introduced by the keyword inductive (resp. fixpoint).
Moreover, the predicate computes from m and first, the BDLL starting index, the segments before and after, into which the cursor pc splits m. Given a BDLL container, the model of valid cursors for this container is defined (following Ada 2012 specification) as the finite bijection between the set of abstract cursors and the positions (from 1 to the size) in the list. We encode the mathematical type map by an association list, using the polymorphic type provided in the libraries of VeriFast. The cursor model is computed by the logic function positions (line 19 in Fig. 3 ) from the container model, the index of the first node in the BDLL, and the first position in the list.
We encode the invariant of the BDLL data structure in the predicate list_inv. The adoption of C for the implementation keeps us away from the problems of verifying object-related properties, for example. However, this choice leads to an overburden in annotations because we have to specify that parameters of type 'struct List*' satisfy the invariant. Additional annotation have been supplied to axiomatize global constants (like the No_Element record in Fig. 1 ) and arrays of user-defined structures (like nodes in List). Contract cases are intensively used in the considered GNAT library. We got around the absence of contract cases in VeriFast using conditional expressions and logic predicate and functions that relate two models (old and new). We do not observe any expressivity or performance problems with this method of encoding contracts.
The support for automation of these proofs is of an utmost importance to scale the verification to a full library of containers. Data Availability Statement and Acknowledgements. The annotated code of the library and the sources used by its proof are available in the figshare repository  [5]. The file-set also includes the distribution of the VeriFast tool running in the virtual machine provided at https://doi. org/10. 6084/m9. figshare. 5896615. This work has been supported by the French national research organization ANR (grant ANR-14-CE28-0018). We thank Claire Dross and Yannick Moy from AdaCore for guiding us through the Ada standard library and for supplying the latest version of its specification. We thank Samantha Dihn for the first C version of the Ada containers.
For reinforced concrete structures, several corrosion detection methods exist: concrete resistivity, half-cell potential or linear polarization resistance (LPR) measurement. The LPR value can be linked to the corrosion rate thanks the Stern-Geary equation if strong hypotheses are made. Existing commercial devices use a guard ring to canalize the current on specific steel rebar area and assume that the steel rebar is uniformly polarized. However, recent works reveal that the top part of the steel rebar, right under the counter electrode, is the most polarized point. The particular point is referred as the point of interest (PI). This works belongs to the DIAMOND project which aims to produce a new corrosion rate measurement device. Comsol® software was used to model the influence of concrete cover, resistivity and injected current on the current density at the PI.
The main reason for the discrepancies is attributed to confinement problems  [22, 23]  This work belongs to the DIAMOND project  [24]  which aims to create a new electrochemical device to assess corrosion of reinforced concrete structure by measuring simultaneously half-cell corrosion potential, concrete resistivity and corrosion rate with the same device. It consists on a more simple geometry (no guard ring) and is based on corrosion rate measurement on a single point, the PI. The present study focusses on corrosion rate assessment. The DIAMOND probe will be first presented. Then, the measurement methodology is introduced. The measurement is then numerically modelled using COMSOL® software. The results are presented in abacus were three parameters are taken into account: concrete cover and resistivity, rebar diameter.
Statistical analysis Data were analysed using SPSS (PASW statistics 20) and was presented as the mean ± SEM. A linear mixed model was used to analyse the effect of light treatments (control and light) on hatchability, mortality (ED, MD and LD), HW, chick quality and chick weight: Y = μ + light treatment + incubator + batch + ε A second linear mixed model was used to analyse the effect of light treatments and incubation stage on embryonic parameters, blood values and plasma hormones concentrations. The model was: Y = μ + light treatment + incubation stage + interaction treatment incubation stage ð Þ + incubator + batch + ε The µ is the overall mean and ε the residual error term. Light treatment, incubation stage, interaction, incubator were fixed effects; batch was a random effect. The interaction was removed from the original model when it was not significant.
23 pg/ml). The total increase was similar at 1. 33 times of the base level. The control group showed a rapid decrease in plasma MT levels between 12 and 15 h (from 109. 07 to 89. 14 pg/ml) before returning to a similar level at 0 h (which was 85. 32 pg/ml). In contrast, the light-exposed embryos experienced a gradual drop in MT levels from 9 h, that is, from the beginning of the dark period and continuing to drop to 94. 55 pg/ml at 18 h of the light period. This level had not returned to the level seen at 0 h (which was 82. 42 pg/ml) suggesting there would be further gradual decrease in plasma MT during the remainder of the light period. Data obtained during days 19 to 21 was at a period when both groups of eggs were in dark conditions. At the beginning of IP the levels of plasma MT had increased in both groups, with the control being higher than the light group (149.
The increasing volume of scientific datasets imposes the use of compression to reduce the data storage or transmission costs, specifically for the oceanography or meteorological datasets generated by Earth observation mission ground segments. These data are mostly produced in NetCDF formatted files. Indeed, the NetCDF-4/HDF5 file formats are widely spread in the global scientific community because of the nice features they offer. Particularly, the HDF5 offers the dynamically loaded filter plugin functionality allowing users to write filters, such as compression/decompression filters, to process the data before reading or writing it on the disk. In this work, we evaluate the performance of lossy and lossless compression/decompression methods through NetCDF-4 and HDF5 tools on analytical and real scientific floating-point datasets.
Indeed, at some level, these least significant digits or bits may not be scientifically meaningful in datasets corrupted by noise, and this is particularly true for floating point data. This paper studies compression and clipping old and new methods that can be applied to scientific datasets in order to maximize the compression performance while preserving the scientific data content and the numerical accuracy. It focuses on methods that can be applied to scientific datasets, i. e. vectors or matrices of floating point numbers. First, lossless compression algorithms can be applied to any kind of data. The standard is the Deflate algorithm  (Deutsch, 1996) , native in NetCDF-4/HDF5 libraries. It is widely spread and implemented in compression tools such as zip, gzip and zlib library. It is a reference for lossless data compression.
Performance metrics A nearly exhaustive list of metrics for assessing the performance of lossy compression of scientific datasets is provided in Zchecker  (Tao et al. , 2017b). For the sake of conciseness, it has been chosen to present only a few of them in this paper. The following metrics have been chosen:  the compression ratio () to evaluate the size reduction as a result of the compression. It is defined by the ratio of the original file size over the compressed file size: 𝐶𝑅(𝐹) = 𝑓𝑖𝑙𝑒𝑠𝑖𝑧𝑒(𝐹 𝑜𝑟𝑖𝑔 ) 𝑓𝑖𝑙𝑒𝑠𝑖𝑧𝑒(𝐹 𝑐𝑜𝑚𝑝 )  the compression speed () and decompression speed () to evaluate the speed of the compression and of the decompression. They are defined by the ratio of the original file size over the compression or decompression time: 𝐶𝑆(𝐹) = 𝑓𝑖𝑙𝑒𝑠𝑖𝑧𝑒(𝐹 𝑜𝑟𝑖𝑔 ) 𝑡 𝑐𝑜𝑚𝑝 𝐷𝑆(𝐹) = 𝑓𝑖𝑙𝑒𝑠𝑖𝑧𝑒(𝐹 𝑜𝑟𝑖𝑔 ) 𝑡 𝑑𝑒𝑐𝑜𝑚𝑝 The compression speed and the decompression speed are expressed in MB/s.
The following metrics have been chosen to assess the data degradation of the lossy compression algorithms:  the maximum absolute error    to evaluate the maximum error between the original and compressed data. It is defined as the maximum value of the pointwise absolute difference between the original and compressed data: 𝑒 𝑎𝑏𝑠 𝑚𝑎𝑥 = max 𝑖 |𝑠 𝑖 -𝑠̃𝑖|  the mean error ̅ to evaluate if any bias is introduced in the compressed data. It is defined as the mean of the pointwise difference between the original and compressed data: 𝑒̅ = 1 𝑁 ∑(𝑠 𝑖 -𝑠̃𝑖) 𝑁-1 𝑖=0  the SNR to evaluate the signal to compression error ratio. It is defined by the ratio of the signal level over the root mean square compression error. It is expressed in decibel (dB): 𝑆𝑁𝑅 𝑑𝐵 = 20 log 10 ( √ 1 𝑁 ∑ 𝑠 𝑖 2 𝑁-1 𝑖=0 √ 1 𝑁 ∑ (𝑠 𝑖 -𝑠̃𝑖) 2 𝑁-1 𝑖=0 ) Geosci.
Analytical datasets Synthetic datasets with known statistics have been generated in order to test the compression algorithms under variable conditions. The following datasets have been generated:  𝑠1 a noisy sinusoid of 1 dimension,  s3D a noisy sinusoid pulse of 3 dimensions. The signal 1 is a noisy sinusoid defined by: 𝑠1(𝑖) = 𝑐 + 𝑎 1 × sin (2𝜋𝑖 𝑓 𝑠1 𝑓 𝑠 ) + 𝑛(𝑖) Where  is the mean value,  1 is the amplitude of the sinusoid,  1 is its frequency and () is a zero mean Gaussian noise of variance 1. The signal 1 is generated with  = 100,  1 computed so as to obtain a SNR of 20dB, and The signal 3 a noisy sinusoid pulse of 3 dimensions defined by: 𝑠3𝐷(𝑖 1 , 𝑖 2 , 𝑖 3 ) = 𝑎 2 × √𝑖 1 2 + 𝑖 2 2 + 𝑖 3 2 √𝐿 2 + 𝑀 2 + 𝑁 2 × sin (2𝜋√𝑖 1 2 + 𝑖 2 2 + 𝑖 3 2 𝑓 𝑠3𝐷 𝑓 𝑒𝑐ℎ ) + 𝑛(𝑖 1 , 𝑖 2 , 𝑖 3 ) Where , ,  are the 3 dimensions of the signal 3 ,  2 is the amplitude of the sinusoid,  3 is its frequency and ( 1 ,  2 ,  3 ) is a zero mean Gaussian noise of variance 1 The signal 3 is generated with L = 256, M = 256, N = 2048,  2 computed to obtain a SNR of 40dB, and The datasets 1 and 3 datasets have been stored into NetCDF-4 formatted files.
Performance assessment of lossless compression methods The lossless compression algorithms evaluated are Deflate and Zstandard with or without Shuffle or Bitshuffle preprocessing step. Moreover, LZ4 is evaluated but always with the Bitshuffle preprocessing step because the implementation of LZ4 we use embarks Bitshuffle. We run lossless compression algorithm using h5repack tool from the HDF5 library in version 1. where in_file. nc is the input dataset formatted as a NetCDF-4 file and compressed_file. h5 is the compressed dataset in HDF5 file format. The input dataset contains the var variable processed by one or several HDF5 filter. Table  4  provides the list of filter options used. They shall replace the filter option between brackets on previous command line. The decompression is performed calling h5repack tool with a command line formatted as follows: h5repack -i compressed_file.
h5 -o out_file. h5 --filter=var:NONE Compression and decompression has been performed on a Dell T1600 with an Intel Xeon E31225 4 cores CPU at 3. 1GHz, and 4GB memory under RedHat 6. 5 (64 bits) OS. Compression and decompression are run on a single core. In order to obtain meaningful compression and decompression speed results, we employed the following process:  Each compression or decompression is run 10 times.  The elapse time (real clock time) of each run is measured.  The minimum and maximum times measured are removed from the list of measures  The mean of the remaining 8 measures provides the compression or decompression time. Figure  4  provides the results obtained for the compression and decompression of the dataset 1 and Fig. 5  provides the results obtained for the compression and decompression of the dataset 3.
Nevertheless, the compression ratio obtained with Bitshuffle and LZ4 are only slightly lower than the compression ratio obtained with Bitshuffle and Zstandard at low compression level zstd_lvl. Finally, the compression/decompression speeds obtained with Zstandard and LZ4 for the compression of the dataset 3 are by far lower than the one achieved for the compression of the dataset 1. We conclude that for the lossless compression of scientific dataset the preprocessing by Shuffle of Bitshuffle are very helpful to increase the compression performance. Then, Zstandard can provide higher compression and decompression speeds than Deflate at low compression level. However, on the 3 dataset, we observe that Zstandard compression and decompression.
dsd in_file. nc bitgroomed_file. nc h5repack -i bitgroomed_file. nc -o compressed_file. h5 --filter=var:SHUF --filter=var:UD=32015,1,5 Both Sz and Bit Grooming algorithms respect the specified maximum absolute error value. Moreover, none introduces a statistical bias: the mean absolute errors of both algorithms, not shown in this table, are very close to zero. The errors introduced by these two algorithms are similar. However, it can be shown that Bit Grooming provided higher compression ratio than Sz on the dataset 1, while the compression speeds are similar. On the contrary, Sz provide higher compression ratio and compression speed than Bit Grooming on the dataset 3.  For Sz algorithm, the absErrBound parameter is successively set to 5e-5, 5e-4, 5e-3, 5e-2, 5e-1, 5  For the Bit Grooming algorithm, the dsd parameter is successively set to 4, 3, 2, 1, 0, -1 As for the results reported in Table  5 , Zstandard with zstd_lvl = 5 has been applied after Sz and Shuffle and Zstandard with zstd_lvl = 5 has been applied after Bit Grooming.
On the dataset 1, the Bit Grooming algorithm provides better compression performance than Sz except for very high compression ratio (dsd ≤ -1 or absErrBound ≥ 5). On the dataset 3 , the Bit Grooming algorithm provides better compression performance than Sz but only for low compression ratio (dsd ≥ 2 or absErrBound ≤ 5e-3). We conclude that both Sz and Bit Grooming algorithms are valuable for the compression in the absolute error bounded compression mode. Bit Grooming tend to provide better performance at low compression ratios while Sz tends to provide better performance at higher compression ratios but the limit depends on the dataset.
Performance comparison in the relative error bounded compression mode As for the performance comparison in the absolute error bounded compression mode, Zstandard with zstd_lvl = 5 has been applied after Sz and Shuffle and Zstandard with zstd_lvl = 5 has been applied after Bit Grooming in order to measure the compression ratio and the compression speeds. We first focus on the results obtained on the dataset 1. Table  6  compares the compression errors obtained in the relative error bounded compression mode. The algorithms have been configured in order to obtain a maximum absolute error of 0. 5. As the maximum absolute value in s1 dataset is 118, the pw_relBoundRatio parameter in Sz is set to 0. 00424 and the number of significant digits nsd parameter in the Bit Grooming and in the Digit Rounding algorithm is set to 3 in Table  6.
nc -o compressed_file. h5 --filter=var:UD=digitRoundingID,1,3 --filter=var:UD=32015,1,5 It can be observed in Table  6  that all three algorithms respect the relative error bound specified. However, as previously mentioned the Bit Grooming algorithm is too conservative. The same is observed with the Digit Rounding algorithm for the compression of the dataset 1. The quality obtained with the Digit Rounding algorithm is similar to the one obtained with the Bit Grooming. Nevertheless, the compression ratio is higher. As for the results reported in Table  6 , Zstandard with zstd_lvl = 5 has been applied after Sz and Shuffle and Zstandard with zstd_lvl = 5 has been applied after Bit Grooming and Digit Rounding algorithms. The Digit Rounding algorithm provides better compression performance than Sz or Bit Grooming.
At high compression ratio, Sz provides similar performance as the Digit Rounding algorithm. Figure  8  (left) compares the compression ratio obtained as a function of the parameter nsd, which is the user specified number of significant digit. Even if the nsd is not a parameter of Sz algorithm, we made the correspondence between the pw_relBoundRatio and the nsd parameters for the dataset 1 (i. e. pw_relBoundRatio = 4. 24e -nsd ) and plot the compression ratio obtained with Sz algorithm on the same figure. It can be seen that, whatever the nsd specified by the user, the compression ratio obtained with the Digit Rounding are higher than the compression ratio obtained with the Bit Grooming algorithm. It can also be seen that the compression obtained with Sz algorithm are even higher. We now focus on the results obtained on the dataset 3.