Hamid Bagheri

SE
5papers
1,189citations
Novelty39%
AI Score39

5 Papers

SEOct 19, 2023
Automated Repair of Declarative Software Specifications in the Era of Large Language Models

Md Rashedul Hasan, Jiawei Li, Iftekhar Ahmed et al.

The growing adoption of declarative software specification languages, coupled with their inherent difficulty in debugging, has underscored the need for effective and automated repair techniques applicable to such languages. Researchers have recently explored various methods to automatically repair declarative software specifications, such as template-based repair, feedback-driven iterative repair, and bounded exhaustive approaches. The latest developments in large language models provide new opportunities for the automatic repair of declarative specifications. In this study, we assess the effectiveness of utilizing OpenAI's ChatGPT to repair software specifications written in the Alloy declarative language. Unlike imperative languages, specifications in Alloy are not executed but rather translated into logical formulas and evaluated using backend constraint solvers to identify specification instances and counterexamples to assertions. Our evaluation focuses on ChatGPT's ability to improve the correctness and completeness of Alloy declarative specifications through automatic repairs. We analyze the results produced by ChatGPT and compare them with those of leading automatic Alloy repair methods. Our study revealed that while ChatGPT falls short in comparison to existing techniques, it was able to successfully repair bugs that no other technique could address. Our analysis also identified errors in ChatGPT's generated repairs, including improper operator usage, type errors, higher-order logic misuse, and relational arity mismatches. Additionally, we observed instances of hallucinations in ChatGPT-generated repairs and inconsistency in its results. Our study provides valuable insights for software practitioners, researchers, and tool builders considering ChatGPT for declarative specification repairs.

NIJan 30
Toward Non-Expert Customized Congestion Control

Mingrui Zhang, Hamid Bagheri, Lisong Xu

General-purpose congestion control algorithms (CCAs) are designed to achieve general congestion control goals, but they may not meet the specific requirements of certain users. Customized CCAs can meet certain users' specific requirements; however, non-expert users often lack the expertise to implement them. In this paper, we present an exploratory non-expert customized CCA framework, named NECC, which enables non-expert users to easily model, implement, and deploy their customized CCAs by leveraging Large Language Models and the Berkeley Packet Filter (BPF) interface. To the best of our knowledge, we are the first to address the customized CCA implementation problem. Our evaluations using real-world CCAs show that the performance of NECC is very promising, and we discuss the insights that we find and possible future research directions.

SEFeb 19, 2021
FLACK: Counterexample-Guided Fault Localization for Alloy Models

Guolong Zheng, ThanhVu Nguyen, Simón Gutiérrez Brida et al.

Fault localization is a practical research topic that helps developers identify code locations that might cause bugs in a program. Most existing fault localization techniques are designed for imperative programs (e.g., C and Java) and rely on analyzing correct and incorrect executions of the program to identify suspicious statements. In this work, we introduce a fault localization approach for models written in a declarative language, where the models are not "executed," but rather converted into a logical formula and solved using backend constraint solvers. We present FLACK, a tool that takes as input an Alloy model consisting of some violated assertion and returns a ranked list of suspicious expressions contributing to the assertion violation. The key idea is to analyze the differences between counterexamples, i.e., instances of the model that do not satisfy the assertion, and instances that do satisfy the assertion to find suspicious expressions in the input model. The experimental results show that FLACK is efficient (can handle complex, real-world Alloy models with thousand lines of code within 5 seconds), accurate (can consistently rank buggy expressions in the top 1.9\% of the suspicious list), and useful (can often narrow down the error to the exact location within the suspicious expressions).

IRNov 15, 2017
Sentiment analysis of twitter data

Hamid Bagheri, Md Johirul Islam

Social networks are the main resources to gather information about people's opinion and sentiments towards different topics as they spend hours daily on social media and share their opinion. In this technical paper, we show the application of sentimental analysis and how to connect to Twitter and run sentimental analysis queries. We run experiments on different queries from politics to humanity and show the interesting results. We realized that the neutral sentiments for tweets are significantly high which clearly shows the limitations of the current works.

SENov 3, 2014
Synthesis from Formal Partial Abstractions

Hamid Bagheri

Developing complex software systems is costly, time-consuming and error-prone. Model- driven development (MDD) promises to improve software productivity, timeliness, quality and cost through the transformation of abstract application models to code-level implementations. However, it remains unreasonably difficult to build the modeling languages and translators required for software synthesis. This difficulty, in turns, limits the applicability of MDD, and makes it hard to achieve reliability in MDD tools. This dissertation research seeks to reduce the cost, broaden the applicability, and increase the quality of model-driven development systems by embedding modeling languages within established formal languages and by using the analyzers provided with such languages for synthesis purposes to reduce the need for hand coding of translators. This dissertation, in particular, explores the proposed approach using relational logic as expressed in Alloy as the general specification language, and the Alloy Analyzer as the general-purpose analyzer. Synthesis is thus driven by finite-domain constraint satisfaction. One important aspect of this work is its focus on partial specifications of particular aspects of the system, such as application architectures and target platforms, and synthesis of partial code bases from such specifications. Contributions of this work include novel insights, methods and tools for (1) synthesizing architectural models from abstract application models; (2) synthesizing partial, platform-specific application frameworks from application architectures; and (3) synthesizing object-relational mapping tradeoff spaces and database schemas for database-backed object-oriented applications.