Searcharxiv⌕ Search

arXiv subjects

Bhargav Nagaraja Bhatt

Publications and source records attributed to Bhargav Nagaraja Bhatt.

2 recordsLinked to original sources

Optimal Dynamic Majority-Quorum Rules: Theory and Evidence

We study the optimal sequential aggregation of randomly arriving votes from a finite population to identify an unknown majority preference before a fixed deadline, trading off decision accuracy against the cost of delay. The optimal policy is a dynamic majority-quorum rule: a joint, time-varying threshold on vote lead and count, in which quorum and supermajority requirements emerge as the solution to an inference problem about non-participants' preferences. At each date, the continuation region is lens-shaped: the lead required to stop grows with turnout until too few voters remain to overturn it, and it vanishes at the deadline. We characterize conditions under which the boundary is monotone in the stakes, the arrival process, and time. Because the exact boundary admits no closed form, we derive a large-population approximation that reduces the two-dimensional rule onto a single sufficient statistic, and express the rule as a sequential significance test set by a single error tolerance. Calibrated on Polkadot governance data, an out-of-sample evaluation finds that our rule with a 2\% error tolerance halves decision times relative to the incumbent mechanism.

econ.TH↗

Automated Repair of Resource Leaks in Android Applications

Resource leaks -- a program does not release resources it previously acquired -- are a common kind of bug in Android applications. Even with the help of existing techniques to automatically detect leaks, writing a leak-free program remains tricky. One of the reasons is Android's event-driven programming model, which complicates the understanding of an application's overall control flow. In this paper, we present PlumbDroid: a technique to automatically detect and fix resource leaks in Android applications. PlumbDroid uses static analysis to find execution traces that may leak a resource. The information built for detection also undergirds automatically building a fix -- consisting of release operations performed at appropriate locations -- that removes the leak and does not otherwise affect the application's usage of the resource. An empirical evaluation on resource leaks from the DroidLeaks curated collection demonstrates that PlumbDroid's approach is scalable, precise, and produces correct fixes for a variety of resource leak bugs: PlumbDroid automatically found and repaired 50 leaks that affect 9 widely used resources of the Android system, including all those collected by DroidLeaks for those resources; on average, it took just 2 minutes to detect and repair a leak. PlumbDroid also compares favorably to Relda2/RelFix -- the only other fully automated approach to repair Android resource leaks -- since it usually detects more leaks with higher precision and producing smaller fixes. These results indicate that PlumbDroid can provide valuable support to enhance the quality of Android applications in practice.

cs.SE↗