Inference of Resource Management Specifications
- URL: http://arxiv.org/abs/2306.11953v2
- Date: Thu, 21 Sep 2023 21:52:15 GMT
- Title: Inference of Resource Management Specifications
- Authors: Narges Shadab, Pritam Gharat, Shrey Tiwari, Michael D. Ernst, Martin
Kellogg, Shuvendu Lahiri, Akash Lal, Manu Sridharan
- Abstract summary: A resource leak occurs when a program fails to free some finite resource after it is no longer needed.
Recent work proposed an approach to prevent resource leaks based on checking resource management specifications.
This paper presents a novel technique to automatically infer a resource management specification for a program.
- Score: 2.8975089867684436
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: A resource leak occurs when a program fails to free some finite resource
after it is no longer needed. Such leaks are a significant cause of real-world
crashes and performance problems. Recent work proposed an approach to prevent
resource leaks based on checking resource management specifications. A resource
management specification expresses how the program allocates resources, passes
them around, and releases them; it also tracks the ownership relationship
between objects and resources, and aliasing relationships between objects.
While this specify-and-verify approach has several advantages compared to prior
techniques, the need to manually write annotations presents a significant
barrier to its practical adoption.
This paper presents a novel technique to automatically infer a resource
management specification for a program, broadening the applicability of
specify-and-check verification for resource leaks. Inference in this domain is
challenging because resource management specifications differ significantly in
nature from the types that most inference techniques target. Further, for
practical effectiveness, we desire a technique that can infer the resource
management specification intended by the developer, even in cases when the code
does not fully adhere to that specification. We address these challenges
through a set of inference rules carefully designed to capture real-world
coding patterns, yielding an effective fixed-point-based inference algorithm.
We have implemented our inference algorithm in two different systems,
targeting programs written in Java and C#. In an experimental evaluation, our
technique inferred 85.5% of the annotations that programmers had written
manually for the benchmarks. Further, the verifier issued nearly the same rate
of false alarms with the manually-written and automatically-inferred
annotations.
Related papers
- Seeker: Enhancing Exception Handling in Code with LLM-based Multi-Agent Approach [54.03528377384397]
In real world software development, improper or missing exception handling can severely impact the robustness and reliability of code.
We explore the use of large language models (LLMs) to improve exception handling in code.
We propose Seeker, a multi agent framework inspired by expert developer strategies for exception handling.
arXiv Detail & Related papers (2024-10-09T14:45:45Z) - Quality-Diversity with Limited Resources [23.891258120466105]
RefQD decomposes a neural network into representation and decision parts.
It shares the representation part with all decision parts in the archive to reduce the resource overhead.
It achieves comparable or better performance compared to sample-efficient QD algorithms.
arXiv Detail & Related papers (2024-06-06T04:06:00Z) - RAG-based Crowdsourcing Task Decomposition via Masked Contrastive Learning with Prompts [21.69333828191263]
We propose a retrieval-augmented generation-based crowdsourcing framework that reimagines task decomposition (TD) as event detection from the perspective of natural language understanding.
We present a Prompt-Based Contrastive learning framework for TD (PBCT), which incorporates a prompt-based trigger detector to overcome dependence.
Experiment results demonstrate the competitiveness of our method in both supervised and zero-shot detection.
arXiv Detail & Related papers (2024-06-04T08:34:19Z) - Automated Static Warning Identification via Path-based Semantic
Representation [37.70518599085676]
This paper employs deep neural networks' powerful feature extraction and representation abilities to generate code semantics from control flow graph paths for warning identification.
We fine-tune the pre-trained language model to encode the path sequences and capture the semantic representations for model building.
arXiv Detail & Related papers (2023-06-27T15:46:45Z) - Neural Inventory Control in Networks via Hindsight Differentiable Policy Optimization [5.590976834881065]
We argue that inventory management presents unique opportunities for reliably applying and evaluating deep reinforcement learning (DRL) algorithms.
The first is Hindsight Differentiable Policy Optimization (HDPO), which performs gradient descent to optimize policy performance.
The second technique involves aligning policy (neural) network structures with the structure of the inventory network.
arXiv Detail & Related papers (2023-06-20T02:58:25Z) - Instance Relation Graph Guided Source-Free Domain Adaptive Object
Detection [79.89082006155135]
Unsupervised Domain Adaptation (UDA) is an effective approach to tackle the issue of domain shift.
UDA methods try to align the source and target representations to improve the generalization on the target domain.
The Source-Free Adaptation Domain (SFDA) setting aims to alleviate these concerns by adapting a source-trained model for the target domain without requiring access to the source data.
arXiv Detail & Related papers (2022-03-29T17:50:43Z) - Domain Adaptive Semantic Segmentation without Source Data [50.18389578589789]
We investigate domain adaptive semantic segmentation without source data, which assumes that the model is pre-trained on the source domain.
We propose an effective framework for this challenging problem with two components: positive learning and negative learning.
Our framework can be easily implemented and incorporated with other methods to further enhance the performance.
arXiv Detail & Related papers (2021-10-13T04:12:27Z) - Multi-Agent Reinforcement Learning with Temporal Logic Specifications [65.79056365594654]
We study the problem of learning to satisfy temporal logic specifications with a group of agents in an unknown environment.
We develop the first multi-agent reinforcement learning technique for temporal logic specifications.
We provide correctness and convergence guarantees for our main algorithm.
arXiv Detail & Related papers (2021-02-01T01:13:03Z) - Resource Allocation via Model-Free Deep Learning in Free Space Optical
Communications [119.81868223344173]
The paper investigates the general problem of resource allocation for mitigating channel fading effects in Free Space Optical (FSO) communications.
Under this framework, we propose two algorithms that solve FSO resource allocation problems.
arXiv Detail & Related papers (2020-07-27T17:38:51Z) - A Transformer-based Approach for Source Code Summarization [86.08359401867577]
We learn code representation for summarization by modeling the pairwise relationship between code tokens.
We show that despite the approach is simple, it outperforms the state-of-the-art techniques by a significant margin.
arXiv Detail & Related papers (2020-05-01T23:29:36Z) - Analysis & Shortcomings of E-Recruitment Systems: Towards a
Semantics-based Approach Addressing Knowledge Incompleteness and Limited
Domain Coverage [0.0]
The rapid development of the Internet has led to introducing new methods for e-recruitment and human resources management.
The skill gap, i.e. the propensity to precisely detect and extract relevant skills in applicant resumes and job posts, still form a major obstacle for e-recruitment systems.
An e-recruitment framework addressing current shortcomings through the use of multiple cooperative semantic resources is detailed.
arXiv Detail & Related papers (2020-04-25T01:25:35Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.