paper-with-me

Papers

Generating Concurrent Programs From Sequential Data Structure Knowledge Using Answer Set Programming

2021-09-17 · Sarat Chandra Varanasi, Neeraj Mittal, Gopal Gupta

We tackle the problem of automatically designing concurrent data structure operations given a sequential data structure specification and knowledge about concurrent behavior. Designing concurrent code is a non-trivial task even in simplest of cases. Humans often design concurrent data structure operations by transforming sequential versions into their respective concurrent versions. This requires an understanding of the data structure, its sequential behavior, thread interactions during concurrent execution and shared memory synchronization primitives. We mechanize this design process using automated commonsense reasoning. We assume that the data structure description is provided as axioms alongside the sequential code of its algebraic operations. This information is used to automatically derive concurrent code for that data structure, such as dictionary operations for linked lists and binary search trees. Knowledge in our case is expressed using Answer Set Programming (ASP), and we employ deduction and abduction -- just as humans do -- in the reasoning involved. ASP allows for succinct modeling of first order theories of pointer data structures, run-time thread interactions and shared memory synchronization. Our reasoner can systematically make the same judgments as a human reasoner, while constructing provably safe concurrent code. We present several reasoning challenges involved in transforming the sequential data structure into its equivalent concurrent version. All the reasoning tasks are encoded in ASP and our reasoner can make sound judgments to transform sequential code into concurrent code. To the best of our knowledge, our work is the first one to use commonsense reasoning to automatically transform sequential programs into concurrent code. We also have developed a tool that we describe that relies on state-of-the-art ASP solvers and performs the reasoning tasks involved to generate concurrent code.

📄 PDF Abstract BibTeX arXiv:2109.08298

Code (0)

등록된 구현이 없습니다.

Similar Papers 제목 키워드 기반

The algebra of Krom logic programs

2026-06-14 · Christian Antić arxiv

This paper investigates the algebraic structure of Krom logic programs, consisting only of facts and rules with at most one body atom. We show that sequential composition endows the class of Krom programs with a natural …

Horn-ICE Learning for Synthesizing Invariants and Contracts

2017-12-26 · Deepak D'Souza, P. Ezudheen, Pranav Garg, P. Madhusudan 외

We design learning algorithms for synthesizing invariants using Horn implication counterexamples (Horn-ICE), extending the ICE-learning model. In particular, we describe a decision-tree learning algorithm that learns fro…

Learning Program Representations for Food Images and Cooking Recipes

2022-03-30 · CVPR 2022 1 · Dim P. Papadopoulos, Enrique Mora, Nadiia Chepurko, Kuan Wei Huang 외

In this paper, we are interested in modeling a how-to instructional procedure, such as a cooking recipe, with a meaningful and rich high-level representation. Specifically, we propose to represent cooking recipes and foo…

Cross-Modal RetrievalRetrieval

Locksynth: Deriving Synchronization Code for Concurrent Data Structures with ASP

2023-05-20 · Sarat Chandra Varanasi, Neeraj Mittal, Gopal Gupta

We present Locksynth, a tool that automatically derives synchronization needed for destructive updates to concurrent data structures that involve a constant number of shared heap memory write operations. Locksynth serves…

C++ code

Automatic Program Synthesis of Long Programs with a Learned Garbage Collector

2018-09-12 · NeurIPS 2018 12 · Amit Zohar, Lior Wolf

We consider the problem of generating automatic code given sample input-output pairs. We train a neural network to map from the current state and the outputs to the program's next statement. The neural network optimizes …

Program Synthesis