Alone together: compositional reasoning and inference for weak isolation

Serializability is a well-understood correctness criterion that simplifies reasoning about the behavior of concurrent transactions by ensuring they are isolated from each other while they execute. However, enforcing serializable isolation comes at a steep cost in performance because it necessarily r...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Veröffentlicht in:Proceedings of ACM on programming languages 2018-01, Vol.2 (POPL), p.1-34
Hauptverfasser: Kaki, Gowtham, Nagar, Kartik, Najafzadeh, Mahsa, Jagannathan, Suresh
Format: Artikel
Sprache:eng
Online-Zugang:Volltext
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
container_end_page 34
container_issue POPL
container_start_page 1
container_title Proceedings of ACM on programming languages
container_volume 2
creator Kaki, Gowtham
Nagar, Kartik
Najafzadeh, Mahsa
Jagannathan, Suresh
description Serializability is a well-understood correctness criterion that simplifies reasoning about the behavior of concurrent transactions by ensuring they are isolated from each other while they execute. However, enforcing serializable isolation comes at a steep cost in performance because it necessarily restricts opportunities to exploit concurrency even when such opportunities would not violate application-specific invariants. As a result, database systems in practice support, and often encourage, developers to implement transactions using weaker alternatives. These alternatives break the strong isolation guarantees offered by serializable transactions to permit greater concurrency. Unfortunately, the semantics of weak isolation is poorly understood, and usually explained only informally in terms of low-level implementation artifacts. Consequently, verifying high-level correctness properties in such environments remains a challenging problem. To address this issue, we present a novel program logic that enables compositional reasoning about the behavior of concurrently executing weakly-isolated transactions. Recognizing that the proof burden necessary to use this logic may dissuade application developers, we also describe an inference procedure based on this foundation that ascertains the weakest isolation level that still guarantees the safety of high-level consistency assertions associated with such transactions. The key to effective inference is the observation that weakly-isolated transactions can be viewed as functional (monadic) computations over an abstract database state, allowing us to treat their operations as state transformers over the database. This interpretation enables automated verification using off-the-shelf SMT solvers. Our development is parametric over a transaction’s specific isolation semantics, allowing it to be applicable over a range of concurrency control mechanisms. Case studies and experiments on real-world applications (written in an embedded DSL in OCaml) demonstrate the utility of our approach, and provide strong evidence that automated verification of weakly-isolated transactions can be placed on the same formal footing as their strongly-isolated serializable counterparts.
doi_str_mv 10.1145/3158115
format Article
fullrecord <record><control><sourceid>crossref</sourceid><recordid>TN_cdi_crossref_primary_10_1145_3158115</recordid><sourceformat>XML</sourceformat><sourcesystem>PC</sourcesystem><sourcerecordid>10_1145_3158115</sourcerecordid><originalsourceid>FETCH-LOGICAL-c258t-77042b833e8de5edf34299538743165a59e8e7bb47e9976131c575313d5f00c23</originalsourceid><addsrcrecordid>eNpNkMFKAzEURYMoWGrxF7JzNZqXlzSJu1LUCgU3uh4ymTc1Ok1KMiD-vRS76OrcxeEuDmO3IO4BlH5A0BZAX7CZVEY3oCRcnu1rtqj1SwgBDpVFN2Ob1ZgT8SnvaPqk8shD3h9yjVPMyY-8kK85xbTjPvU8poEKpUB8yIX_kP_msebRH-UbdjX4sdLixDn7eH56X2-a7dvL63q1bYLUdmqMEUp2FpFsT5r6AZV0TqM1CmGpvXZkyXSdMuScWQJC0EYjYK8HIYLEObv7_w0l11poaA8l7n35bUG0xwbtqQH-AXQgTM4</addsrcrecordid><sourcetype>Aggregation Database</sourcetype><iscdi>true</iscdi><recordtype>article</recordtype></control><display><type>article</type><title>Alone together: compositional reasoning and inference for weak isolation</title><source>ACM Digital Library Complete</source><source>EZB-FREE-00999 freely available EZB journals</source><creator>Kaki, Gowtham ; Nagar, Kartik ; Najafzadeh, Mahsa ; Jagannathan, Suresh</creator><creatorcontrib>Kaki, Gowtham ; Nagar, Kartik ; Najafzadeh, Mahsa ; Jagannathan, Suresh</creatorcontrib><description>Serializability is a well-understood correctness criterion that simplifies reasoning about the behavior of concurrent transactions by ensuring they are isolated from each other while they execute. However, enforcing serializable isolation comes at a steep cost in performance because it necessarily restricts opportunities to exploit concurrency even when such opportunities would not violate application-specific invariants. As a result, database systems in practice support, and often encourage, developers to implement transactions using weaker alternatives. These alternatives break the strong isolation guarantees offered by serializable transactions to permit greater concurrency. Unfortunately, the semantics of weak isolation is poorly understood, and usually explained only informally in terms of low-level implementation artifacts. Consequently, verifying high-level correctness properties in such environments remains a challenging problem. To address this issue, we present a novel program logic that enables compositional reasoning about the behavior of concurrently executing weakly-isolated transactions. Recognizing that the proof burden necessary to use this logic may dissuade application developers, we also describe an inference procedure based on this foundation that ascertains the weakest isolation level that still guarantees the safety of high-level consistency assertions associated with such transactions. The key to effective inference is the observation that weakly-isolated transactions can be viewed as functional (monadic) computations over an abstract database state, allowing us to treat their operations as state transformers over the database. This interpretation enables automated verification using off-the-shelf SMT solvers. Our development is parametric over a transaction’s specific isolation semantics, allowing it to be applicable over a range of concurrency control mechanisms. Case studies and experiments on real-world applications (written in an embedded DSL in OCaml) demonstrate the utility of our approach, and provide strong evidence that automated verification of weakly-isolated transactions can be placed on the same formal footing as their strongly-isolated serializable counterparts.</description><identifier>ISSN: 2475-1421</identifier><identifier>EISSN: 2475-1421</identifier><identifier>DOI: 10.1145/3158115</identifier><language>eng</language><ispartof>Proceedings of ACM on programming languages, 2018-01, Vol.2 (POPL), p.1-34</ispartof><lds50>peer_reviewed</lds50><oa>free_for_read</oa><woscitedreferencessubscribed>false</woscitedreferencessubscribed><citedby>FETCH-LOGICAL-c258t-77042b833e8de5edf34299538743165a59e8e7bb47e9976131c575313d5f00c23</citedby><cites>FETCH-LOGICAL-c258t-77042b833e8de5edf34299538743165a59e8e7bb47e9976131c575313d5f00c23</cites></display><links><openurl>$$Topenurl_article</openurl><openurlfulltext>$$Topenurlfull_article</openurlfulltext><thumbnail>$$Tsyndetics_thumb_exl</thumbnail><link.rule.ids>314,776,780,27903,27904</link.rule.ids></links><search><creatorcontrib>Kaki, Gowtham</creatorcontrib><creatorcontrib>Nagar, Kartik</creatorcontrib><creatorcontrib>Najafzadeh, Mahsa</creatorcontrib><creatorcontrib>Jagannathan, Suresh</creatorcontrib><title>Alone together: compositional reasoning and inference for weak isolation</title><title>Proceedings of ACM on programming languages</title><description>Serializability is a well-understood correctness criterion that simplifies reasoning about the behavior of concurrent transactions by ensuring they are isolated from each other while they execute. However, enforcing serializable isolation comes at a steep cost in performance because it necessarily restricts opportunities to exploit concurrency even when such opportunities would not violate application-specific invariants. As a result, database systems in practice support, and often encourage, developers to implement transactions using weaker alternatives. These alternatives break the strong isolation guarantees offered by serializable transactions to permit greater concurrency. Unfortunately, the semantics of weak isolation is poorly understood, and usually explained only informally in terms of low-level implementation artifacts. Consequently, verifying high-level correctness properties in such environments remains a challenging problem. To address this issue, we present a novel program logic that enables compositional reasoning about the behavior of concurrently executing weakly-isolated transactions. Recognizing that the proof burden necessary to use this logic may dissuade application developers, we also describe an inference procedure based on this foundation that ascertains the weakest isolation level that still guarantees the safety of high-level consistency assertions associated with such transactions. The key to effective inference is the observation that weakly-isolated transactions can be viewed as functional (monadic) computations over an abstract database state, allowing us to treat their operations as state transformers over the database. This interpretation enables automated verification using off-the-shelf SMT solvers. Our development is parametric over a transaction’s specific isolation semantics, allowing it to be applicable over a range of concurrency control mechanisms. Case studies and experiments on real-world applications (written in an embedded DSL in OCaml) demonstrate the utility of our approach, and provide strong evidence that automated verification of weakly-isolated transactions can be placed on the same formal footing as their strongly-isolated serializable counterparts.</description><issn>2475-1421</issn><issn>2475-1421</issn><fulltext>true</fulltext><rsrctype>article</rsrctype><creationdate>2018</creationdate><recordtype>article</recordtype><recordid>eNpNkMFKAzEURYMoWGrxF7JzNZqXlzSJu1LUCgU3uh4ymTc1Ok1KMiD-vRS76OrcxeEuDmO3IO4BlH5A0BZAX7CZVEY3oCRcnu1rtqj1SwgBDpVFN2Ob1ZgT8SnvaPqk8shD3h9yjVPMyY-8kK85xbTjPvU8poEKpUB8yIX_kP_msebRH-UbdjX4sdLixDn7eH56X2-a7dvL63q1bYLUdmqMEUp2FpFsT5r6AZV0TqM1CmGpvXZkyXSdMuScWQJC0EYjYK8HIYLEObv7_w0l11poaA8l7n35bUG0xwbtqQH-AXQgTM4</recordid><startdate>201801</startdate><enddate>201801</enddate><creator>Kaki, Gowtham</creator><creator>Nagar, Kartik</creator><creator>Najafzadeh, Mahsa</creator><creator>Jagannathan, Suresh</creator><scope>AAYXX</scope><scope>CITATION</scope></search><sort><creationdate>201801</creationdate><title>Alone together: compositional reasoning and inference for weak isolation</title><author>Kaki, Gowtham ; Nagar, Kartik ; Najafzadeh, Mahsa ; Jagannathan, Suresh</author></sort><facets><frbrtype>5</frbrtype><frbrgroupid>cdi_FETCH-LOGICAL-c258t-77042b833e8de5edf34299538743165a59e8e7bb47e9976131c575313d5f00c23</frbrgroupid><rsrctype>articles</rsrctype><prefilter>articles</prefilter><language>eng</language><creationdate>2018</creationdate><toplevel>peer_reviewed</toplevel><toplevel>online_resources</toplevel><creatorcontrib>Kaki, Gowtham</creatorcontrib><creatorcontrib>Nagar, Kartik</creatorcontrib><creatorcontrib>Najafzadeh, Mahsa</creatorcontrib><creatorcontrib>Jagannathan, Suresh</creatorcontrib><collection>CrossRef</collection><jtitle>Proceedings of ACM on programming languages</jtitle></facets><delivery><delcategory>Remote Search Resource</delcategory><fulltext>fulltext</fulltext></delivery><addata><au>Kaki, Gowtham</au><au>Nagar, Kartik</au><au>Najafzadeh, Mahsa</au><au>Jagannathan, Suresh</au><format>journal</format><genre>article</genre><ristype>JOUR</ristype><atitle>Alone together: compositional reasoning and inference for weak isolation</atitle><jtitle>Proceedings of ACM on programming languages</jtitle><date>2018-01</date><risdate>2018</risdate><volume>2</volume><issue>POPL</issue><spage>1</spage><epage>34</epage><pages>1-34</pages><issn>2475-1421</issn><eissn>2475-1421</eissn><abstract>Serializability is a well-understood correctness criterion that simplifies reasoning about the behavior of concurrent transactions by ensuring they are isolated from each other while they execute. However, enforcing serializable isolation comes at a steep cost in performance because it necessarily restricts opportunities to exploit concurrency even when such opportunities would not violate application-specific invariants. As a result, database systems in practice support, and often encourage, developers to implement transactions using weaker alternatives. These alternatives break the strong isolation guarantees offered by serializable transactions to permit greater concurrency. Unfortunately, the semantics of weak isolation is poorly understood, and usually explained only informally in terms of low-level implementation artifacts. Consequently, verifying high-level correctness properties in such environments remains a challenging problem. To address this issue, we present a novel program logic that enables compositional reasoning about the behavior of concurrently executing weakly-isolated transactions. Recognizing that the proof burden necessary to use this logic may dissuade application developers, we also describe an inference procedure based on this foundation that ascertains the weakest isolation level that still guarantees the safety of high-level consistency assertions associated with such transactions. The key to effective inference is the observation that weakly-isolated transactions can be viewed as functional (monadic) computations over an abstract database state, allowing us to treat their operations as state transformers over the database. This interpretation enables automated verification using off-the-shelf SMT solvers. Our development is parametric over a transaction’s specific isolation semantics, allowing it to be applicable over a range of concurrency control mechanisms. Case studies and experiments on real-world applications (written in an embedded DSL in OCaml) demonstrate the utility of our approach, and provide strong evidence that automated verification of weakly-isolated transactions can be placed on the same formal footing as their strongly-isolated serializable counterparts.</abstract><doi>10.1145/3158115</doi><tpages>34</tpages><oa>free_for_read</oa></addata></record>
fulltext fulltext
identifier ISSN: 2475-1421
ispartof Proceedings of ACM on programming languages, 2018-01, Vol.2 (POPL), p.1-34
issn 2475-1421
2475-1421
language eng
recordid cdi_crossref_primary_10_1145_3158115
source ACM Digital Library Complete; EZB-FREE-00999 freely available EZB journals
title Alone together: compositional reasoning and inference for weak isolation
url https://sfx.bib-bvb.de/sfx_tum?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2025-01-27T15%3A22%3A34IST&url_ver=Z39.88-2004&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&rfr_id=info:sid/primo.exlibrisgroup.com:primo3-Article-crossref&rft_val_fmt=info:ofi/fmt:kev:mtx:journal&rft.genre=article&rft.atitle=Alone%20together:%20compositional%20reasoning%20and%20inference%20for%20weak%20isolation&rft.jtitle=Proceedings%20of%20ACM%20on%20programming%20languages&rft.au=Kaki,%20Gowtham&rft.date=2018-01&rft.volume=2&rft.issue=POPL&rft.spage=1&rft.epage=34&rft.pages=1-34&rft.issn=2475-1421&rft.eissn=2475-1421&rft_id=info:doi/10.1145/3158115&rft_dat=%3Ccrossref%3E10_1145_3158115%3C/crossref%3E%3Curl%3E%3C/url%3E&disable_directlink=true&sfx.directlink=off&sfx.report_link=0&rft_id=info:oai/&rft_id=info:pmid/&rfr_iscdi=true