SearcharxivSearch

arXiv subjects

Raphael Straub

Publications and source records attributed to Raphael Straub.

4 recordsLinked to original sources

Exploring the Effectiveness of Abstract Syntax Tree Patterns for Algorithm Recognition

The automated recognition of algorithm implementations can support many software maintenance and re-engineering activities by providing knowledge about the concerns present in the code base. Moreover, recognizing inefficient algorithms like Bubble Sort and suggesting superior alternatives from a library can help in assessing and improving the quality of a system. Approaches from related work suffer from usability as well as scalability issues and their accuracy is not evaluated. In this paper, we investigate how well our approach based on the abstract syntax tree of a program performs for automatic algorithm recognition. To this end, we have implemented a prototype consisting of: A domain-specific language designed to capture the key features of an algorithm and used to express a search pattern on the abstract syntax tree, a matching algorithm to find these features, and an initial catalog of "ready to use" patterns. To create our search patterns we performed a web search using the algorithm name and described key features of the found reference implementations with our domain-specific language. We evaluate our prototype on a subset of the BigCloneEval benchmark containing algorithms like Fibonacci, Bubble Sort, and Binary Search. We achieve an average F1-score of 0.74 outperforming the large language model Codellama which attains 0.35. Additionally, we use multiple code clone detection tools as a baseline for comparison, achieving a recall of 0.62 while the best-performing tool reaches 0.20.

cs.SE

On the Anatomy of Real-World R Code for Static Analysis

CONTEXT The R programming language has a huge and active community, especially in the area of statistical computing. Its interpreted nature allows for several interesting constructs, like the manipulation of functions at run-time, that hinder the static analysis of R programs. At the same time, there is a lack of existing research regarding how these features, or even the R language as a whole are used in practice. OBJECTIVE In this paper, we conduct a large-scale, static analysis of more than 50 million lines of real-world R programs and packages to identify their characteristics and the features that are actually used. Moreover, we compare the similarities and differences between the scripts of R users and the implementations of package authors. We provide insights for static analysis tools like the lintr package as well as potential interpreter optimizations and uncover areas for future research. METHOD We analyze 4230 R scripts submitted alongside publications and the sources of 19450 CRAN packages for over 350000 R files, collecting and summarizing quantitative information for features of interest. RESULTS We find a high frequency of name-based indexing operations, assignments, and loops, but a low frequency for most of R's reflective functions. Furthermore, we find neither testing functions nor many calls to R's foreign function interface (FFI) in the publication submissions. CONCLUSION R scripts and package sources differ, for example, in their size, the way they include other packages, and their usage of R's reflective capabilities. We provide features that are used frequently and should be prioritized by static analysis tools, like operator assignments, function calls, and certain reflective functions like load.

cs.PL

Classical to quantum transition of a driven nonlinear nanomechanical resonator

Much experimental effort is invested these days in fabricating nanoelectromechanical systems (NEMS) that are sufficiently small, cold, and clean, so as to approach quantum mechanical behavior as their typical quantum energy scale $\hbarΩ$ becomes comparable to that of the ambient thermal energy $k_{B}T$. Such systems will hopefully enable one to observe the quantum behavior of human-made objects, and test some of the basic principles of quantum mechanics. Here we expand and elaborate on our recent suggestion [PRL 99 (2007) 040404] to exploit the nonlinear nature of a nanoresonator in order to observe its transition into the quantum regime. We study this transition for an isolated resonator, as well as one that is coupled to a heat bath at either zero or finite temperature. We argue that by exploiting nonlinearities, quantum dynamics can be probed using technology that is almost within reach. Numerical solutions of the equations of motion display the first quantum corrections to classical dynamics that appear as the classical-to-quantum transition occurs. This provides practical signatures to look for in future experiments with NEMS resonators.

cond-mat.mes-hall

Classical to Quantum Transition of a Driven Nonlinear Nanomechanical Resonator

We seek the first indications that a nanoelectromechanical system (NEMS) is entering the quantum domain as its mass and temperature are decreased. We find them by studying the transition from classical to quantum behavior of a driven nonlinear Duffing resonator. Numerical solutions of the equations of motion, operating in the bistable regime of the resonator, demonstrate that the quantum Wigner function gradually deviates from the corresponding classical phase-space probability density. These clear differences that develop due to nonlinearity can serve as experimental evidence, in the near future, that NEMS resonators are entering the quantum domain.

cond-mat.mes-hall