dataesr/scientific-paragraphs-categorization huggingface dataset:
Transactional access to databases is an important abstraction allowing programmers to consider blocks of actions (transactions) as executing in isolation. The strongest consistency model is serializability, which ensures the atomicity abstraction of transactions executing over a sequentially consistent memory. Since ensuring serializability carries a significant penalty on availability, modern databases provide weaker consistency models, one of the most prominent being snapshot isolation. In general, the correctness of a program relying on serializable transactions may be broken when using weaker models. However, certain programs may also be insensitive to consistency relaxations, i. e. , all their properties holding under serializability are preserved even when they are executed over a weak consistent database and without additional synchronization.
In this paper, we address the issue of verifying if a given program is robust against snapshot isolation, i. e. , all its behaviors are serializable even if it is executed over a database ensuring snapshot isolation. We show that this verification problem is polynomial time reducible to a state reachability problem in transactional programs over a sequentially consistent shared memory. This reduction opens the door to the reuse of the classic verification technology for reasoning about weakly-consistent programs. In particular, we show that it can be used to derive a proof technique based on Lipton's reduction theory that allows to prove programs robust.
Introduction Transactions simplify concurrent programming by enabling computations on shared data that are isolated from other concurrent computations and resilient to failures. Modern databases provide transactions in various forms corresponding to different tradeoffs between consistency and availability. The strongest consistency level is achieved with serializable transactions  [20]  whose outcome in concurrent executions is the same as if the transactions were executed atomically in some order. Since serializability carries a significant penalty on availability, modern databases often provide weaker consistency models, one of the most prominent being snapshot isolation (SI)  [4]. Then, an important issue is to ensure that the level of consistency needed by a given program coincides with the one that is guaranteed by its infrastructure, i.
e. , the database it uses. One way to tackle this issue is to investigate the problem of checking robustness of programs against consistency relaxations: Given a program P and two consistency models S and W such that S is stronger than W , we say that P is robust for S against W if for every two implementations I S and I W of S and W respectively, the set of computations of P when running with I S is the same as its set of computations when running with I W. This means that P is not sensitive to the consistency relaxation from S to W , and therefore it is possible to reason about the behaviors of P assuming that it is running over S, and no additional synchronization is required when P runs over the weak model W such that it maintains all its properties satisfied with S. In this paper, we address the problem of verifying robustness of transactional programs for serializability, against snapshot isolation.
Under snapshot isolation, any transaction t reads values from a snapshot of the database taken at its start and t can commit only if no other committed transaction has written to a location that t wrote to, since t started. Robustness is a form of program equivalence between two versions of the same program, obtained using two semantics, one more permissive than the other. It ensures that this permissiveness has no effect on the program under consideration. The difficulty in checking robustness is to apprehend the extra behaviors due to the relaxed model w. r. t. the strong model. This requires a priori reasoning about complex order constraints between operations in arbitrarily long computations, which may need maintaining unbounded ordered structures, and make robustness checking hard or even undecidable.
Overview In this section, we give an overview of our approach for checking robustness against snapshot isolation. While serializability enforces that transactions are atomic and conflicting transactions, i. e. , which read or write to a common location, cannot commit concurrently, SI  [4]  allows that conflicting transactions commit in parallel as long as they don't contain a write-write conflict, i. e. , write on a common location. Moreover, under SI, each transaction reads from a snapshot of the database taken at its start. These relaxations permit the "anomaly" known as Write Skew (WS) shown in Figure  1a , where an anomaly is a program execution which is allowed by SI, but not by serializability. The execution of Write Skew under SI allows the reads of x and y to return 0 although this cannot happen under serializability.
The issue event corresponds to a sequence of reads and/or writes where the writes are visible only to the current transaction. We interpret it as a single event since a transaction starts with a database snapshot that it updates in isolation, without observing other concurrently executing transactions. The commit event is where the writes are propagated and made visible to all processes. Under serializability, the two events coincide, i. e. , they are adjacent in the execution. Under SI, this is not the case and in between the issue and the commit of the same transaction, we may have issue/commit events from concurrent transactions. When a transaction commit does not occur immediately after its issue, we say that the underlying transaction is delayed. For example, the following execution of WS corresponds to the happens-before cycle in Figure  1b  where the write to x was committed after t 2 finished, hence, t 1 was delayed: begin(p1, t1)ld(p1, t1, y, 0)isu(p1, t1, x, 1) com(p1, t1) begin(p2, t2)ld(p2, t2, x, 0)isu(p2, t2, y, 1)com(p2, t2) Above, begin(p 1 , t 1 ) stands for starting a new transaction t 1 by process p 1 , ld represents read (load) actions, while isu denotes write actions that are visible only to the current transaction (not yet committed).
Correctness The role of a process in an execution is chosen non-deterministically at runtime. Therefore, the final instrumentation of a given program P, denoted by [[P]], is obtained by replacing each labeled instruction linst with the concatenation of the instrumentations corresponding to the attacker and the happens-before helpers, i. e. ,  [[ linst ] ] ::= [[ linst ]] A [[ linst ]] HbH The following theorem states the correctness of the instrumentation. theorem, we show that is sufficient to search for executions that contain a single delayed transaction. Notice that in the instrumentation of the attacker, the delayed transaction must contain a read and write instructions on different variables. Also, the transactions of the happens-before helpers must not contain a write to a variable that the delayed transaction writes to.
Experiments To test the applicability of our robustness checking algorithms, we have considered a benchmark of 10 applications extracted from the literature related to weakly consistent databases in general. A first set of applications are open source projects that were implemented to be run over the Cassandra database, extracted from  [10]. The second set of applications is composed of: TPC-C  [23] , an on-line transaction processing benchmark widely used in the database community, SmallBank, a simplified representation of a banking application  [2] , Fu-sionTicket, a movie ticketing application  [15] , Auction, an online auction application  [5] , and Courseware, a course registration service extracted from  [13, 18]. A first experiment concerns the reduction of robustness checking to SC reachability.
For each application, we have constructed a client (i. e. , a program composed of transactions defined within that application) with a fixed number of processes (at most 3) and a fixed number of transactions (between 3 and 7 transactions per process). We have encoded the instrumentation of this client, defined in Section 5, in the Boogie programming language  [3]  and used the Civl verifier  [14]  in order to check whether the assertions introduced by the instrumentation are violated (which would represent a robustness violation). Note that since clients are of fixed size, this requires no additional assertions/invariants (it is an instance of bounded model checking). The results are reported in Table  1. We have found two of the applications, Courseware and SmallBank, to not be robust against snapshot isolation.
Related Work Decidability and complexity of robustness has been investigated in the context of relaxed memory models such as TSO and Power  [6, 8, 12]. Our work borrows some high-level principles from  [6]  which addresses the robustness against TSO. We reuse the high-level methodology of characterizing minimal violations according to some measure and defining reductions to SC reachability using a program instrumentation. Instantiating this methodology in our context is however very different, several fundamental differences being: -SI and TSO admit different sets of relaxations and SI is a model of transactional databases. -We use a different notion of measure: the measure in  [6]  counts the number of events between a write issue and a write commit while our notion of measure counts the number of delayed transactions.
MATERIALS AND METHODS Bacterial strains. For the construction of MCR protein-producing E. coli clones (Table  1 ), mcr variants were cloned into pDM1 (GenBank accession no. MN128719), an isopropyl-␤-D-1-thiogalactopyranoside (IPTG)-inducible derivative of pACYC184; protein expression from this vector is induced only after addition of IPTG to the culture medium. The SacI and XmaI sites of the vector were used for mcr-1, mcr-2, mcr-4, mcr-5, and mcr-8, while the NdeI and XmaI sites were used for mcr-3. A collection of 40 E. coli clinical isolates (Table  1 ), including 19 confirmed MCR protein producers, 12 colistin-resistant isolates that tested negative for commonly encountered mcr genes, and 9 colistin-susceptible isolates, was used for blinded validation of the MALDIxin test. Genotype determination.
Hydrolyzed cells were centrifuged at 17,000 ϫ g for 2 min, the supernatant was discarded, and the pellet was resuspended in ultrapure water to a McFarland standard of 10. A 0. 4-l aliquot of this suspension was loaded onto the target and immediately overlaid with 1. 2 l of a matrix consisting of a 9:1 mixture of 2,5-dihydroxybenzoic acid and 2-hydroxy-5-methoxybenzoic acid (super-DHB) (Sigma-Aldrich) dissolved in 90:10 (vol/vol) chloroform/methanol to a final concentra- tion of 10 mg/ml. The bacterial suspension and matrix were mixed directly on the target by pipetting, and the mixture was dried gently under a stream of air for less than 1 min. MALDI-TOF MS analysis was performed with a MALDI Biotyper Sirius system (Bruker Daltonics), using the newly introduced linear negative-ion mode. Data analysis.
These observations suggest that the optimized version of the MALDIxin test presented here will have broad utility in detecting colistin resistance in a range of Gram-negative bacteria. The diagnostic assay described in this study will initially be made available to users of the MALDI Biotyper Sirius, along with full application support, for research use only (RUO) validation studies. This will be followed by the transformation of an already existing, RUO, web-based, automated algorithm (Bruker Daltonics) into a new MALDI Biotyper software module. Dedicated MALDIxin consumables (e. g. , preportioned purified matrix and calibration standards) will also be developed, to enable simplified and standardized performance of the assay. Successful deployment of the new software module, in conjunction with MALDIxin-specific laboratory consumables, will allow subsequent introduction of in vitro diagnostic consumables and software, following further clinical and analytical studies.
ACKNOWLEDGMENTS We acknowledge  Youri Glupczynski ,  Pierre Bogaerts ,  Richard Bonnet , and  IHMA Inc. ( Schaumburg, IL ) for providing E. coli clinical isolates. This study was supported by the  MRC Confidence in Concept Fund, ISSF Wellcome Trust  Grant  105603/Z/14/Z  (to G. L. -M. ), and  MRC Career Development Award   MR/ M009505/1  (to D. A. I. M. ). L. D. , A. F. , and G. L. -M. are coinventors of the MALDIxin test, for which a patent has been filed by  Imperial Innovations.
What You Learn from This Chapter This chapter will present the computational approach of registering images from different modalities based on manual selection of matching pairs of landmarks. Here we will present an image registration workflow based on MATLAB's image processing toolbox using the identification of sites of clathrin-mediated endocytosis by correlative light electron microscopy (CLEM) as an example. In the Appendix section, we will discuss the concept of image transformations and how to generate them based on pairs of landmarks. We will also learn how to fit a 2D Gaussian for a more accurate positioning of the landmarks.
Introduction The purpose is to use Fluorescence Microscopy (FM) to localize clathrin vesicles, and to correlate it with Electron Microscopy (EM) to identify their ultrastructure (. Fig. 6. 1), based on the use of beads, as it was done in  Avinoam et al. (2015). We will introduce the basic concept of image registration and dedicated MATLAB image processing commands to register light microscopy images of clathrin-mediated endocytosis and corresponding electron microscopy images to reveal the underlying ultrastructure  (Avinoam et al. 2015). We will also discuss how enhancing the localization accuracy of fluorescence signals will improve the registration accuracy. The first task in a typical CLEM experiment is to identify the two image datasets to be registered. The data from the second image modality (in the CLEM case this is EM) will likely be acquired in a targeted approach using the previous light microscopy observations.
For a good review about different approaches of targeting the same area, the reader can be referred to de  Boer et al. (2015). The data we will use here were acquired using the protocol described in  Avinoam et al. (2015). In order to obtain a higher-resolution insight into the ultrastructure underlying a fluorescence signal, we acquired images at high magnification (pixel size ≈ 1 nm, FOV 2 μm). The field of view at this magnification however is too small to contain enough landmark beads for a direct registration of the FM data. Therefore we need to first register to a lower magnification EM overview and then to the final high-resolution EM data (see. Figs. 6. 2 and 6. 6 for an overview of datasets and scales). Important note: on EM images the polystyrene beads appear as extended gray circles, not as black spots.
The small black spots spread across the EM image are gold particles used to register EM data on itself for tilt correction (tomographic reconstruction) or alignment. We will use these gold beads as landmarks to accurately register the EM images of different magnifications. The MATLAB functions described here will all handle 2D image data. Therefore we need to reduce the EM source data from the tomographic volumes. We can either choose single slices or an average of a small subset (5-10) slices from the source volumes. This can easily be done in Fiji  (Schindelin et al. 2012 ), Icy (de Chaumont et al. 2012)  or similar software. Here we could also adjust the contrast/brightness of the images to facilitate recognition of landmark features later in the process. We already have prepared the matching images from FM and EM and made them available in the data directory.
Ideally, we could now run an automated routine that would provide us with appropriate landmark features in both images. However, as the image data from FM and EM are intrinsically complementary and thus very different, in most of the cases the landmarks need to be selected manually. Fig. 6. 2 We will register the fluorescent image ex1_FM. tif on the EM data ex1_EM. tif using beads visible in both modalities. We will then register ex1_EM. tif on ex1_highmag. tif which is acquired at the same depth of the sample using black gold particles. The position of interest showing clathrin is deeper in the cell, and appears as the other non black slice in this figure in the high mag EM stack. It is named ex1_highmag_poi. tif in this chapter.
Tools Description All codes are available here: 7 http://doi. org/10. 5281/zenodo. 1473535 We will use the commercial software package MATLAB as well as its Image Processing and Optimization toolboxes (alternatively to the optimization toolbox, we can use the CurveFitting toobox; both versions of the code are provided). MATLAB provides a set of registration tools, gathered under the topic "image registration" in the MATLAB documentation (mat). In particular, we will use: 5 cpselect: built-in function from MATLAB Image Processing Toolbox allowing to provide a user interface for the selection of landmarks pairs. These are called control points in MATLAB language. 5 fitgeotrans: built-in function from MATLAB Image processing toolbox allowing to fit a defined geometric transform matching pairs of landmarks (control points in Matlab language).
6 To refine the localisation of fluorescent spots correponding to the landmark beads, we will fit a 2D Gaussian to the beads' signal in a cropped image (see. Fig. 6. 11). For this procedure, there are two possible toolboxes in MATLAB: the Curve Fitting Toolbox, or the Optimization Toolbox. In particular, we will use: 5 if we use the curve fitting toolbox we can use fit: built-in function from MATLAB Curve Fitting Toolbox allowing to find the parameters of a function which best fits given data. The advantage is that it provides also confidence intervals in fitting. 5 if we use the optimization toolbox we can use lsqnonlin: built-in function from MATLAB Optimization Toolbox allowing to find the parameters of a function which best fits given data by least square fitting. In our case, the function will be a 2D Gaussian equation and the data will be the pixels values of the cropped image around the manually selected landmarks.
This is the case for our test dataset  (Avinoam et al. 2015). The beads will be our landmarks (or control points in Matlab language). The typical feature of interest, an intracellular structural or morphological feature would have a size of about 100 nm. This is way beyond the diffraction limit of conventional fluorescence microscopy. The typical pixel size of FM data is on the order of 80-100 nm, so a single pixel difference in localization in the FM image could distort the registration of our feature by 100%. Therefore it is necessary to perform a precise sub-pixel localization not only on the fluorescent signal of interest but also on those of the landmarks. The workflow to register the light microscopy data onto the EM data will be the following: 5 identify the area of interest based on the target fluorescence signal (step 1) 5 identify the locations of the surrounding fluorescent beads using the different channels 5 identify the location of the beads visible in the EM image 5 mark the matching landmark pairs in both images (step 2) 5 precisely determine their localization in the FM image (step 3) 5 calculate the image transformation (step 4) 5 evaluate the confidence in structure matching (step 5)  6 5 mark the coordinate of the feature of interest 5 precisely determine its localization in the FM image 5 apply the coordinate transformation 5 create the output data (image overlays, coordinate lists, …) The field of view in which we observe the EM features is not sufficiently large to capture enough landmark beads.
Labeling of Landmark Pairs MATLAB's Image Processing Toolbox offers a selection of graphical tools to mark positions in an image. The command to mark coordinates in a displayed image is be ginput. However, we would like to assign coordinate pairs in the two image modes simultaneously. Therefore, the tool of choice is cpselect. This function expects the two images to be displayed as input and will give us two coordinate lists as a result of the point selection. The first image and associated coordinates are referred-to as "moving" and the second as "fixed". This means that the first image is the one whose coordinate system will be transferred onto the second. Note: Moving image is also sometimes called source image, and fixed image called target image.
Correlation from Low Magnification Tomogram to High Magnification EM Image In order to locate the feature of interest in or high-resolution dataset, we need to register the low-magnification EM data, where we will map the FM data onto, to the highmagnification images. We can do this using the exact same tools as for registering the FM data with the low-magnification EM data. We will do this procedure first to get familiar with the tools, as we have very similar features in both images. We will use the gold beads (black spots) present on the specimen as common landmarks to register the EM images of different resolutions (. Fig. 6. 3). 6 First, we want to load our images. em is the overview (low-magnification) EM image, hm is the high-magnification image at the same z-height that also contains the gold beads we will use as landmarks.
6 Because the polystyrene beads we use as landmark markers are very difficult to identify on the EM data (position of beads in EM data are shown in. Fig. 6. 10, some initialization points are provided for the ease of this demonstration. Let's load their coordinates (this file is in the code directory): 1 load('preselectedpoints. mat'); This mat-file contains two variables: em_cp_preselected and fm_cp_preselected. The cpselect window should now look like on. Fig. 6. 5. Try to add a point using the "Add point and Predict Match" toggle button. Once we are done with selecting landmark pairs, close the cpselect window. The two output variables c_fm and c_em contain the two coordinate lists, in pixels, that we need in order to generate our transformation. Fig. 6. 5  The manual selection process of landmark pairs in light (right) and electron microscopy (left) images using MATLAB's cpselect tool 6.
In order to transform an image we can use the MATLAB function imwarp. Obviously our initial FM image covers a much larger 6 field of view than the EM image  (. Fig. 6. 6). We therefore need to provide the function with the scale and dimension of the target image. This is done using imref2D. In order to generate the pair of registered images, we will now apply the transformation in the structured variable strucT computed by fitgeotrans, using imwarp. The result of these commands is shown in. Fig. 6. 7 (for one channel only). This will give us an idea about the deviation of the landmark positions from their predictions in EM pixels (. Fig. 6. 10). Optionally, we can try different types of transformations and compare the resulting deviations. It is advised to check what happens to the matrix when the control points are moved to slightly different positions (using cpselect).
In the example we skipped step 3, the refining of FM coordinates using a Gaussian fit. In order to improve the accuracy of the registration, both the localization of the fluorescence signal of interest and of the landmark beads can be improved using a fit of the peak with sub-pixel accuracy. This fit can be performed directly in MATLAB during the workflow. We are going to add this step, just after the manual selection, for the FM fluorescent signal of the beads (Step 6. 5. 2). For this we can use the provided script called GaussianFit_. that corresponds to the Toolbox available on our computer (either optimization or curve fitting Matlab toolbox). We should start by removing the suffix of the file needed such that it is called GaussianFit. m alone. To know which toolbox is available, type ver.