dataesr/scientific-paragraphs-categorization huggingface dataset:
Adding x86 Instruction Extensions to CompCert Our extension to CompCert was adapted from the 2. 2 distribution of Comp-Cert,  8  and it focuses only on the part of the distribution that targets the ia32 architecture. There is no particular reason for our choice of CompCert version, except that this was the most recent release when our project started. Equivalent enhancements can be made to more recent versions of CompCert with some additional development effort. Relevant CompCert features. The architecture of CompCert is depicted in Figure  1. We follow  [30]  in this description. The source language of CompCert is called CompCertC, which covers most of the iso C 99 standard and some features of iso C 2011 such as the _Alignof and _Alignas attributes. Some features of C not directly supported in CompCertC v2.
2, such as struct-returning functions, are supported via rewriting from the C source during parsing. The semantics of CompCertC is formalized in Coq and it makes precise many behaviors unspecified or undefined in the C standard, whilst assigning other undefined behaviours as "bad". Memory is modeled as a collection of byte-addressable disjoint blocks, which permits formalizing in detail pointer arithmetic and pointer casts. and the pretty-printer of the assembly output file. Additionally, some internal transformations of the compiler, notably register allocation, are implemented outside of Coq, but then subject to a translation validation step that guarantees that the transformation preserves the program semantics. The front-end of the compiler comprises the translations down to Cminor: this is a typeless version of C, where side-effects have been removed from expressionevaluation; local variables are independent from the memory model; memory loads/stores and address computations are made explicit; and a simplified control structure (e.
The remaining transformation steps comprise the Mach format that deals with the layout of stack frames in accordance to the function calling conventions, and the final Asm language modeling the target assembly language. The generation of the executable file is not included in the certified portion of CompCert -instead, the Asm abstract syntax is pretty-printed and the resulting programs is assembled/linked using standard system tools. Semantic preservation. CompCert is proven to ensure the classical notion of correctness for compilers known as semantic preservation. Intuitively, this property guarantees that, for any given source program S, the compiler will produce a compiled program T that operates consistently with the semantics of S. Consistency is defined based on a notion of observable behaviour of a program, which captures the interaction between the program's execution and the environment.
Let us denote the evaluation of a program P over inputs p, resulting in outputs o and observable behaviour B as P ( p) ⇓ ( o, B). Then, semantic preservation can thus be written as ∀B, p, o, T ( p) ⇓ ( o, B) =⇒ S( p) ⇓ ( o, B) meaning that any observable behaviour of the target program is an admissible observable behaviour of the source program. Observable behaviours in CompCert are possibly infinite sequence of events that model interactions of the program with the outside world, such as accesses to volatile variables, calls to system libraries, or user defined events (so called annotations). High-level view of our CompCert extension. Our extension to CompCert is consistent with the typical treatment of instruction extensions in widely used compilers such as gcc: instruction extensions appear as intrinsics, i.
Translation into CompCertC maps all vector types/values into a new 128-bit scalar type. Subsequent transformations were extended to support this data type. Modifications to the CompCert backend. The most intrusive modifications to CompCert were done at the back-end level, most prominently in the register allocation stage. CompCert uses a non-verified graph-coloring algorithm to compute a candidate register allocation, whose output is then checked within Coq for correctness. We added the eight 128-bit xmm register-bank to the machine description, taking into account that floating point operations in CompCert were already using 64-bit half of these registers. This implied extending the notion of interference used during register allocation and adapting the corresponding proof of correctness.
During the constructions of the stack-frame layout, the calling convention for vector parameters/return-values was implemented supporting up to 4 parameters and the return-value passed on registers. The final component of our extensions was the addition to the assembly pretty-printer, supporting a flexible specification of the code to be produced by each built-in. Consequences for semantics preservation. Our new version of CompCert comes with an extended semantics preservation theorem that has essentially the same statement as the original one. The difference resides in the fact that the machine model now explicily allows built-in functions to manipulate 128bit values. Note that, although we did not add a detailed formalization of the semantics of all instruction extensions, this is not a limitation when it comes to the correctness of the compiler itself: indeed, our theorem says that, whatever semantics are associated by a machine architecture to a particular extended instruction, these will have precisely the same meaning at source level.
Coverage supercop (System for Unified Performance Evaluation Related to Cryptographic Operations and Primitives) is a toolkit for measuring the performance of cryptographic software. In this work we looked at version 20170105 of the toolkit. supercop evaluates cryptographic primitives according to several criteria, the most prominent of which for the purpose of this work is execution time. A supercop release contains all the machinery required to carry out performance evaluation in a specific computer; any computer can be used as a representative for a particular architecture and collected data can be submitted to a central repository of collected benchmarks. The implementations contained in a supercop release are organized in three hierarchical levels. At the top level reside so-called operations these correspond to the algorithms that constitute an abstract interface to a cryptographic component; for example, for digital signatures the operations comprise key generation, signature generation and signature verification.
We now detail how we compute our metrics. Performance Metrics. We consider each supercop operation separately, so let us fix an arbitrary one called o ∈ O, where O is the set of all operations in supercop. Let C be the set of compilation tools activated in supercop and P (o) a set of primitives that realize o. Denote I(p) as the set of all implementations provided for primitive p ∈ P (o). Let also t p C denote the fastest timing value reported by supercop over all implementations i ∈ I(p), for primitive p ∈ P (o), when compiled with all of the compilers in C. Note that, if such a value t p C has been reported by supercop, then this means that at least one implementation i ∈ I(p) was correctly compiled by at least one of the configured compilers in C. Furthermore, t p C corresponds to the target code that runs faster over all the implementations given for p, and over all compilation options that were exhaustively attempted over C.
The cost of certified compilation. If one looks at the performance penalty per operation for CompCert version 2. 2 and version 3. 0, as detailed above, and take the average over all operations, the we obtain a factor of 3. 34 and 2. 58, respectively. Note that, in primitives such as AES-GCM, the timing ratio is huge and can reach 700-fold because baseline implementations use AES-NI, while CompCert is generating code for AES. Nevertheless, these findings are consistent with what is usually reported for other application domains, and it does show that CompCert version 3. 0 has significantly reduced the performance penalty when compared to previous versions. Note, however, that this is at the cost of a reduction in coverage (cf. Table  2 ). More recent versions of CompCert that we have benchmarked using a different set-up confirm a gradual improvement in the optimization capabilities of the compiler.
First a value analysis computes an overapproximation of the values of the pointers: this is key for the precision of the checker when the program to verify stores sensitive data into memory. Then, a type system infers what are the run-time values that may depend on sensitive data. Finally, the policy checker validates that neither the control-flow nor the memory accesses depend on sensitive data. Type system overview. The type system assigns a security level at each program point and in each calling context to each register and memory locationcollectively called locations. Here, a calling context is a stack of call sites. Security levels are taken in the usual security lattice with two points High and Low. Locations are labeled High at a particular program point and calling context if they may hold a value that depends on secret data whenever execution reaches that point in that context.
Finally, our analyses soundly and precisely handle compiler intrinsics. An example. aez  [27]  is an authenticated encryption scheme that was designed with the use of hardware support for aes computations in mind. The implementations for aez included in supercop comprise both reference code written purely in C, and high-speed code relying on aes-ni extensions. Our experiments in running CompCert 2. 2 and CompCert with intrinsics support over aez indicates that the ratio with respect to the non-verified baseline compilation is over 700 in the case of the former and drops to roughly 7 when intrinsics support is added. We ran our new type-system over the aez implementation, and we found a constant-time violation, albeit a benevolent one. The code causing the violation is the following: if (d && !is_zero(vandnot(loadu(pad+abytes), final0))) return -1; This is part of the AEZCore implementation for the decryption operation: it checks whether the correct padding has been returned upon decryption and immediately exits the function if the check fails.
Conclusions and upcoming developments Our work initiates a systematic study of the coverage of formal methods tools for cryptographic implementations, and develops generalizations of the CompCert verified compiler and of a constant-time static analysis to accommodate intrinsics. The statistics are encouraging, but there is significant room for achieving further coverage. The development is available at https://github. com/haslab/ccomp-simd. We are currently porting our work to version 3. 7 of CompCert, which will allow us to benefit from numerous new features that have been added since. Most notably, support to 64 bit architectures (in particular amd64), which by itself widens the applicability of the tool, and opens the way to support intrinsics for new vector extensions such as avx, avx2 and avx-512.
Acknowledgements. This work is financed by  National Funds  through the  FCT -Fundação para a Ciência e a Tecnologia (Portuguese Foundation for Science and Technology)  within the project  PTDC/CCI-INF/31698/2017 , and by the  Norte Portugal Regional Operational Programme  ( NORTE 2020 ) under the  Portugal 2020 Partnership Agreement , through the  European Regional Development Fund (ERDF)  and also by national funds through the  FCT , within project  NORTE-01-0145-FEDER-028550  (REASSURE).
The VO-wBA is based on the method presented in  Menna et al. (2019a Menna et al. ( , 2019b) )  and here simulated through a prototypal approach implemented within the Agisoft Metashape Python API (Metashape Python Reference, 2020). The procedure is tailored for future integration in other implementations, such as ORB-SLAM 1,2 and OpenVSLAM 3. If a stereo or trifocal camera system is used  (Drap et al. , 2015b; Menna et al. , 2019a and 2019b) , data from one camera are selected for the following steps. If AHRS data are collected and synchronised with the image recording, the attitude and heading readings are used to define the coordinated reference system of the survey. For each image set defined by the wBA, the sparse point cloud is submitted to the plane fitting block and the pose of central image to mosaicing blocks 3.
The plane fitting module The sparse point cloud of tie points is used to estimate the projection plane through a RANSAC best fitting approach 1 https://github. com/raulmur/ORB_SLAM 2 https://github. com/raulmur/ORB_SLAM2 implemented in Python. When the scene geometry is too far from the planarity assumption, the image plane projection step is skipped and only the sparse point cloud is visualised. When AHRS information is available, the local horizontal plane passing through the centroid of the initialized map is chosen as XY plane; in the other cases the first plane fitted through the initialized map defines the XY plane for projection.
The 3D visualization module Two different tools have been envisaged for rendering the 3D sparse point cloud together with camera positions and the 3D mosaics (3DSIP, Figure  3 d  and e ). For faster and more efficient visualization on a local scale, a WebSocket protocol is used to facilitate real-time data transfer to the remote computer (or tablet for a diver), which accesses the necessary 3D data for visualization trough a web browser. For large scale projects surveyed by ROVs using a support vessel, more powerful computational resources are typically available; in these cases, an incremental visualisation is carried out using the open-source WebGL based point cloud renderer Potree 4.
CASE STUDIES The procedure detailed in section 3 is show-cased in several examples. The images were acquired with different platforms at different depths and in various underwater scenarios and seafloor characteristics, as summarised in table 1. Here, the real-time acquisition and processing is simulated as if the images were acquired by an ROV and transmitted to the surface computing unit, or as if the diver was equipped with an embedded device with separate processing units, one in charge of the image acquisition and computation of VO/SLAM/iSfM solution and the other of data visualization. In the presented experiments, the VO/SLAM/iSfM is run on images recorded at different the acquisition frame rate (Table  1 ). The incremental mosaicing, both in the image space (image mosaic) and object space (point cloud mosaic), is performed on reduced image resolutions.
Description of datasets The case studies cover a broad range of application domains, environmental characteristics, and image acquisition platforms, i. e. underwater cameras operated by divers (COMEX POOL, NIWA T2-2017 and Moorea RESILIENCE SITE plots 4-7) and a submarine (XLENDI). The COMEX POOL dataset, part of a series of subsea metrology qualification tests, was first presented in  Menna et al. (2019a Menna et al. ( , 2019b) )  to investigate the use of vision-based real-time navigation and mapping techniques for underwater inspection and monitoring applications. The images were acquired with an ORUS3D 3Kv 5  system, in a controlled environment (the COMEX pool), at night to emulate typical operative high depths. The pool floor was covered with contrast plates to help the automatic image processing procedures.
The NIWA T2-2017 original video was recorded divers from the Antarctica New Zealand and NIWA (National Institute of Water and Atmospheric Research) in the Tethys Bay, Ross Sea,Antarctica. The dataset, as discussed in  Piazza et al. (2018) , was acquired within an ongoing international collaboration with a three-fold aim: (i) to extract 3D information from old video footage recorded following the common scientific diving practices, but not originally intended for photogrammetric purposes; (ii) to formulate best practices for 3D mapping and modelling of harsh underwater environments, such as in Antarctica; (iii) to develop automatic image sampling, processing and analysis procedures for non-destructive surveys of rockybottom benthic communities and habitats in Antarctica. The seafloor, mainly flat with some irregularities, is covered by living organisms, mainly sea stars, urchins.
The Moorea RESILIENCE SITE plots 4-7 dataset was acquired within the Moorea Island Digital Ecosystem Avatar (IDEA) project (https://mooreaidea. ethz. ch/), an inter-disciplinary and international project whose final aim is to digitize the entire Moorea island ecosystem (both inland and underwater) at different scales from island to microbes. Results of the photogrammetric underwater acquisitions and analyses were discussed in  Neyer et al. (2018) ,  Nocerino et al. (2019)  and  Rossi et al. (2019). The dataset was acquired by divers on a hilly bottom covered by coral reef. The XLENDI dataset was acquired with the ROV-3D system  (Drap et al. , 2015b)  mounted on a submarine  (Drap et al. , 2015a). It is a subset of a wider survey, realised within a deep underwater archaeological excavation over the Xlendi Phoenician shipwreck.
Results The results of the different datasets are shown in Figures  3 to 7. It is here highlighted that the accuracy of navigation/orientation approach is not extensively investigated, since it is marginal to the focus of this study and mainly related to the choice of the VO/SLAM/iSfM. As expected, the stitching approach in image space provides useful and satisfactory results in the case of a flat sea bottom such as in the case of the COMEX pool dataset (Figure  3 f  and g ). For accuracy assessment, the centre of circular targets fixed on the pool from the 3DSIP point clouds are compared with reference 3D coordinates measured with a laser tracker (see  Menna et al. , 2019a and 2019b for details). The RMS of the similarity transformation residuals results below five centimetres. In Figure  4a  3DSIP point clouds are over imposed in different colours to a 5-mm accurate textured mesh.
Results from the COMEX POOL dataset: first oriented frames with sparse point cloud (a), 3DSIP (b) and 2DSIM(c); entire image sequence oriented with sparse point cloud (c) and 3DSIP (d); final 2DSIM (f) with a detail (gAccuracy assessment from the COMEX POOL dataset: 3DSIP point clouds over imposed in different colours to a 5-mm accurate textured mesh(a); detail of the textured mesh (b) and 3DSIP (c).
Results from the NIWA T2-2017 dataset: entire image sequence oriented with sparse point cloud and 3DSIP (a); details of the sparse point cloud (b), and 3DSIP (c); two separate parts of the 2DSIM (d, e). Results from the Moorea RESILIENCE SITE plots 4-7 dataset: first oriented frames with sparse point cloud (a) and 3DSIP (b); details of the sparse point cloud (c), and 3DSIP (d); two separate parts of the 2DSIP (e, f).
ACKNOWLEDGEMENTS This study was partially supported by the  French Single Inter-Ministry Fund (FUI) , in the framework of the  GREENEXPLORER  project. The COMEX POOL dataset was acquired by  COMEX  ( COmpanie Maritime d'EXpertise Marseille, France ) within the  GREENEXPLORER  project. The  NIWA   T2-2017  dataset acquisition was funded by  NZ Ministry of Primary Industries and Ministry of Business, Innovation and Employment , respectively, and supported by  Antarctica New Zealand  and the excellent NIWA dive teams. It was processed within the Project " ICE-LAPSE " ( PNRA 2013/AZ1. 16 :" Analysis of Antarctic benthos dynamics by using non-destructive monitoring devices and permanent stations "), funded by the  Italian National Antarctic Program. The video recording was performed by  Ian Hawes  ( University of Waikato, Waikato, NZ ).
The Moorea RESILIENCE SITE plots 4-7 dataset was acquired within the  Moorea Island Digital Ecosystem Avatar (IDEA)  project, supported by the financial and scientific support of  Prof. Matthias Troyer  through the  Institute of Theoretical Physics, ETH Zurich , the  U. S. National Science Foundation  under Grant No. OCE 16-37396  (and earlier awards) as well as a generous gift from the  Gordon and Betty Moore Foundation. The  IDEA  project is executed under permits issued by the  French Polynesian Government  ( Délégation à la Recherche ) and the  Haut-Commissariat de la République en Polynésie Francaise (DTRT)  ( Protocole d'Accueil   2005-2018 ). The authors are grateful to  Dr. A. Brooks  ( Marine Science Institute, University of California, Santa Barbara -UCSB, California, USA ),  Prof.
A. Capra  ( DIEF Department, University of Modena and Reggio Emilia, Modena, Italy ) and the  UCSB Gump station team in Moorea  for their crucial support in the data acquisition, and  Prof. A. Gruen  ( Institute of Theoretical Physics, ETH Zurich ) for his scientific support. The XLENDI dataset was acquired by COMEX the framework of the  GROPLAN  project (http://www. lsis. org/groplan/),funded by the  National Agency of Research (ANR) of France. The  XLENDI  project is carried out with the support of the  Superintendence of Cultural Heritage of Malta  and lead by  Prof. T. Gambin  ( Department of Classics and Archaeology, University of Malta ) and  Prof. J. -C. Sourisseau  ( Aix-Marseille University, Centre Camille Jullian, CNRS ,  UMR 7299 ,  Aix-En-Provence, France). A special thank goes to  Alessandro Torresani  and  Daniele Morabito  from  3DOM FBK  for the useful insights on the realtime visualization tool architecture.
A threshold function f is positive if and only if f (X ) ≥ f (Z) ∀(X, Z) ∈ {0, 1} n such that X ≥ Z (meaning that ∀i: x i ≥ z i ). To account for saturation occurring in dendrites, we introduce the sub-linear threshold unit (SLTU): ( ) , , 0 0 1 ( ) 0 = =  ≥ Θ  =    ∑ ∑ d n i j i j i j if E w X f X otherwise with 1 1 ( ) 0 ≥  =   if Y E X otherwise Such a neuron model can compute all positive Boolean functions (see Def. 4) provided a sufficient number of dendrites and synapses  11. We used integer-valued and non-negative parameters both for the LTU and the SLTU without loss of generality. It allows to exactly determine the number of similar synapses necessary to implement a given computation. The code necessary to perform all simulations is available from: http://doi. org/10. 5281/zenodo.
Acknowledgements This project started a long time ago within a team directed by  Alain Destexhe  and stems from multiple discussions with B. Teleńczuk. We also want to thank  F. Danneville  and  C. Loyez  for the stimulant discussions,  Prof. A. Cappy  for his remarks on the method, and  M. Humphries  for numerous valuable comments. Finally we want to thank  A. Foust  for making our scientific English easier to read and  Ms Marini-Audouard  for the proof-reading before submission. A previous version of this article is availabile on bioRxiv: https://doi. org/10. 1101/2020. 04. 20. 051342.
The first category includes the compilation into an Arithmetic Circuit (AC) form, the evidence optimization. This step provides an C-code (C-HLS Compliant) that can feed HLS tool such as Vivado-HLS from Xilinx. 2. HLS directives proposal for the C-code in order to generate efficient implementation onto FPGA (C-HLS Compliant with directives). These directives are proposed to guide the management of the parallelism for the resource usage, the management of the memory and the management of SW/HW interface. These directives are defined in Pragma form using the Vivado-HLS tool [23].
Then the HLS tool (Vivado-HLS) is able to provide the embedded version onto the FPGA support. We place our proposal as a front end of commercial HLS tool by proposing the adequate parameters for the HLS directives, the C-code of the BN monitors, as well the adequate interface between the FPGA and the CPU with BRAM or DMA option. The adaptation with the HLS tool from Xilinx is shown in Figure  12.