Context-Sensitive Abstract Interpretation of Dynamic Languages
- URL: http://arxiv.org/abs/2401.18029v1
- Date: Wed, 31 Jan 2024 17:45:05 GMT
- Title: Context-Sensitive Abstract Interpretation of Dynamic Languages
- Authors: Franciszek Piszcz
- Abstract summary: There is a vast gap in the quality of IDE tooling between static languages like Java and dynamic languages like Python or JavaScript.
Modern frameworks and libraries in these languages heavily use their dynamic capabilities to achieve the best ergonomics and readability.
We propose an algorithm that can bridge this gap by statically analyzing dynamic metaprogramming and runtime in programs.
- Score: 0.0
- License: http://creativecommons.org/licenses/by-nc-nd/4.0/
- Abstract: There is a vast gap in the quality of IDE tooling between static languages
like Java and dynamic languages like Python or JavaScript. Modern frameworks
and libraries in these languages heavily use their dynamic capabilities to
achieve the best ergonomics and readability. This has a side effect of making
the current generation of IDEs blind to control flow and data flow, which often
breaks navigation, autocompletion and refactoring. In this thesis we propose an
algorithm that can bridge this gap between tooling for dynamic and static
languages by statically analyzing dynamic metaprogramming and runtime
reflection in programs. We use a technique called abstract interpretation to
partially execute programs and extract information that is usually only
available at runtime. Our algorithm has been implemented in a prototype
analyzer that can analyze programs written in a subset of JavaScript.
Related papers
- Dynamic Code Orchestration: Harnessing the Power of Large Language Models for Adaptive Script Execution [0.5735035463793009]
Research examines dynamic code execution of written language directives within the context of a running application.
The research clearly shows how written language directives, backed by a large language model, offer radically new programming and operating system paradigms.
arXiv Detail & Related papers (2024-08-07T17:11:31Z) - Scaling Symbolic Execution to Large Software Systems [0.0]
Symbolic execution is a popular static analysis technique used both in program verification and in bug detection software.
We focus on an error finding framework called the Clang Static Analyzer, and the infrastructure built around it named CodeChecker.
arXiv Detail & Related papers (2024-08-04T02:54:58Z) - LILO: Learning Interpretable Libraries by Compressing and Documenting Code [71.55208585024198]
We introduce LILO, a neurosymbolic framework that iteratively synthesizes, compresses, and documents code.
LILO combines LLM-guided program synthesis with recent algorithmic advances in automated from Stitch.
We find that AutoDoc boosts performance by helping LILO's synthesizer to interpret and deploy learned abstractions.
arXiv Detail & Related papers (2023-10-30T17:55:02Z) - Learning Type Inference for Enhanced Dataflow Analysis [6.999203506253375]
We propose CodeTIDAL5, a Transformer-based model trained to reliably predict type annotations.
Our model outperforms the current state-of-the-art by 7.85% on the ManyTypes4TypeScript benchmark.
We present JoernTI, an integration of our approach into Joern, an open source static analysis tool.
arXiv Detail & Related papers (2023-10-01T13:52:28Z) - A Static Evaluation of Code Completion by Large Language Models [65.18008807383816]
Execution-based benchmarks have been proposed to evaluate functional correctness of model-generated code on simple programming problems.
static analysis tools such as linters, which can detect errors without running the program, haven't been well explored for evaluating code generation models.
We propose a static evaluation framework to quantify static errors in Python code completions, by leveraging Abstract Syntax Trees.
arXiv Detail & Related papers (2023-06-05T19:23:34Z) - Augmented Language Models: a Survey [55.965967655575454]
This survey reviews works in which language models (LMs) are augmented with reasoning skills and the ability to use tools.
We refer to them as Augmented Language Models (ALMs)
The missing token objective allows ALMs to learn to reason, use tools, and even act, while still performing standard natural language tasks.
arXiv Detail & Related papers (2023-02-15T18:25:52Z) - Serenity: Library Based Python Code Analysis for Code Completion and
Automated Machine Learning [8.362734311902278]
We present a framework for static analysis of Python that turns out to be sufficient for some tasks.
Serenity exploits two basic mechanisms: (a) reliance on dynamic dispatch at the core of language translation, and (b) extreme abstraction of libraries.
We demonstrate the efficiency and usefulness of Serenity's analysis in two applications: code completion and automated machine learning.
arXiv Detail & Related papers (2023-01-05T02:09:08Z) - Pre-Trained Language Models for Interactive Decision-Making [72.77825666035203]
We describe a framework for imitation learning in which goals and observations are represented as a sequence of embeddings.
We demonstrate that this framework enables effective generalization across different environments.
For test tasks involving novel goals or novel scenes, initializing policies with language models improves task completion rates by 43.6%.
arXiv Detail & Related papers (2022-02-03T18:55:52Z) - Leveraging Language to Learn Program Abstractions and Search Heuristics [66.28391181268645]
We introduce LAPS (Language for Abstraction and Program Search), a technique for using natural language annotations to guide joint learning of libraries and neurally-guided search models for synthesis.
When integrated into a state-of-the-art library learning system (DreamCoder), LAPS produces higher-quality libraries and improves search efficiency and generalization.
arXiv Detail & Related papers (2021-06-18T15:08:47Z) - Exploring Software Naturalness through Neural Language Models [56.1315223210742]
The Software Naturalness hypothesis argues that programming languages can be understood through the same techniques used in natural language processing.
We explore this hypothesis through the use of a pre-trained transformer-based language model to perform code analysis tasks.
arXiv Detail & Related papers (2020-06-22T21:56:14Z)
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.