SearcharxivSearch

arXiv subjects

Yuanyuan Xie

Publications and source records attributed to Yuanyuan Xie.

7 recordsLinked to original sources

Write Your Own CodeChecker: An Automated Test-Driven Checker Development Approach with LLMs

With the rising demand for code quality assurance, developers are not only utilizing existing static code checkers but also seeking custom checkers to satisfy their specific needs. Nowadays, various code-checking frameworks provide extensive checker customization interfaces to meet this need. However, both the abstract checking logic and the complex API usage of large-scale checker frameworks make this task challenging. To this end, automated code checker generation is anticipated to ease the burden of checker development. In this paper, we propose AutoChecker, an innovative LLM-powered approach that can write code checkers automatically based on only a rule description and a test suite. To achieve comprehensive checking logic, AutoChecker incrementally updates the checker's logic by focusing on solving one selected case each time. To obtain precise API knowledge, during each iteration, it leverages fine-grained logic-guided API-context retrieval, where it first decomposes the checking logic into a series of sub-operations and then retrieves checker-related API-contexts for each sub-operation. For evaluation, we apply AutoChecker, five baselines, and three ablation methods using multiple LLMs to generate checkers for 20 randomly selected PMD rules. Experimental results show that AutoChecker significantly outperforms others across all effectiveness metrics, with an average test pass rate of 82.28%. Additionally, the checkers generated by AutoChecker can be successfully applied to real-world projects, matching the performance of official checkers.

cs.SE

Fix the Tests: Augmenting LLMs to Repair Test Cases with Static Collector and Neural Reranker

During software evolution, it is advocated that test code should co-evolve with production code. In real development scenarios, test updating may lag behind production code changing, which may cause compilation failure or bring other troubles. Existing techniques based on pre-trained language models can be directly adopted to repair obsolete tests caused by such unsynchronized code changes, especially syntactic-related ones. However, the lack of task-oriented contextual information affects the repair accuracy on large-scale projects. Starting from an obsolete test, the key challenging task is precisely identifying and constructing Test-Repair-Oriented Contexts (TROCtxs) from the whole repository within a limited token size. In this paper, we propose SYNTER (SYNtactic-breaking-changes-induced TEst Repair), a novel approach based on LLMs to automatically repair obsolete test cases via precise and concise TROCtxs construction. Inspired by developers' programming practices, we design three types of TROCtx: class context, usage context, and environment context. Given an obsolete test case to repair, SYNTER firstly collects the related code information for each type of TROCtx through static analysis techniques automatically. Then, it generates reranking queries to identify the most relevant TROCtxs, which will be taken as the repair-required key contexts and be input to the large language model for the final test repair. To evaluate the effectiveness of SYNTER, we construct a benchmark dataset that contains a set of obsolete tests caused by syntactic breaking changes. The experimental results show that SYNTER outperforms baseline approaches both on textual- and intent-matching metrics. With the augmentation of constructed TROCtxs, hallucinations are reduced by 57.1%.

cs.SE

$L^q$-spectrum of graph-directed self-similar measures that have overlaps and are essentially of finite type

For self-similar measures with overlaps, closed formulas of the $L^q$-spectrum have been obtained by Ngai and the author for measures that are essentially of finite type in [J. Aust. Math. Soc. \textbf{106} (2019), 56--103]. We extend the results of Ngai and the author \cite{Ngai-Xie_2019} to the graph-directed self-similar measures. For graph-directed self-similar measures satisfying the graph open set condition, the $L^q$-spectrum has been studied by Edgar and Mauldin \cite{Edgar-Mauldin_1992}. The main novelty of our results is that the graph-directed self-similar measures we consider do not need to satisfy the graph open set condition. For graph-directed self-similar measures $μ$ on $\R^d$ ($d\ge1$), which could have overlaps but are essentially of finite type, we set up a framework for deriving a closed formula for the $L^q$-spectrum of $μ$ for $q\ge 0$, and prove the differentiability of the $L^q$-spectrum. This framework allows us to include graph-directed self-similar measures that are strongly connected and not strongly connected and those in higher dimension.

math.SP

Re-imagining the Future of Forest Management -- An Age-Dependent Approach towards Harvesting

Facing the drastic climate changes, current strategies for enhancing carbon dioxide stocks need to be thoroughly honed. To address the problem, we first built a carbon sequestration growth model driven by growth rate dependency (GRDM). We abstracted the carbon cycling system into the process of photosynthesis, the humidity fluctuation, and the original storage of carbon in the trees. In the photosynthesis model, we considered various factors, including transition rate of absorption and organic matter production. We also designed an Economic Return Evaluation Model (EREM) to estimate the optimal distribution of trees in the forest based on the utility function. Maximizing the utility brought by the amount of carbon storage, we derived the equation for profit optimization with the constraints of total economic expenses allowed. To assess its performance, we took an object-oriented approach, simulated an ideal forest by placing instances of trees and plotted a time-dependent forest composition graph. After proper normalization of climate and economic data, we also make predictions for 169 worldwide forest-covered countries. Our model further suggests high sensitivity and robustness with a similar trend of overall utility when environmental aridity or proportion of harvested woods are varied. Finally, we apply the model to Georgia temperate deciduous forest, and we evaluate the carbon storage ability to adjust the Red Spruce based on available biological literature research. We recognize that while the model is preliminary in its failure to identify a diverse array of variables, it has encapsulated key features of idealized forests.

q-bio.OT

The existence of the solution of the wave equation on graphs

Let $G=(V, E)$ be a finite weighted graph, and $Ω\subseteq V$ be a domain such that $Ω^\circ\neq\emptyset$. In this paper, we study the following initial boundary problem for the non-homogenous wave equation \begin{equation*} \left\{ \begin{aligned} &\partial_t^2 u(t,x)-Δ_Ωu(t,x)=f(t,x),\qquad&&(t,x)\in[0,\infty)\times Ω^\circ,\\ &u(0,x)=g(x),\qquad&& x\inΩ^\circ,\\ &\partial_tu(0,x)=h(x),\qquad&& x\inΩ^\circ,\\ &u(t,x)=0,\qquad&&(t,x)\in[0,\infty)\times\partial Ω, \end{aligned} \right. \end{equation*} where $Δ_Ω$ denotes the Dirichlet Laplacian on $Ω^\circ$. Using Rothe's method, we prove that the above wave equation has a unique solution.

math.AP

Application of Rothe's method to a nonlinear wave equation on graphs

We study a nonlinear wave equation on finite connected weighted graphs. Using Rothe's and energy methods, we prove the existence and uniqueness of solution under certain assumption. For linear wave equation on graphs, Lin and Xie \cite{Lin-Xie} obtained the existence and uniqueness of solution. The main novelty of this paper is that the wave equation we considered has the nonlinear damping term $|u_t|^{p-1}\cdot u_t$ ($p>1$).

math.AP

Semilinear heat equations and parabolic variational inequalities on graphs

Let $G=(V,E)$ be a locally finite connected weighted graph, and $Ω$ be an unbounded subset of $V$. Using Rothe's method, we study the existence of solutions for the semilinear heat equation $\partial_tu+|u|^{p-1}\cdot u=Δu~(p\ge1)$ and the parabolic variational inequality \begin{eqnarray*} \int_{Ω^\circ} \partial_tu\cdot(v-u)\,dμ\ge \int_{Ω^\circ}(Δu+f)\cdot(v-u)\,dμ\qquad\mbox{for any }v\in \mathcal{H}, \end{eqnarray*} where $\mathcal{H}=\{u\in W^{1,2}(V):u=0\mbox{ on }V\backslashΩ^\circ\}$.

math.AP