Precise Analysis of String Expressions

Aske Simon Christensen, Anders Møller, Michael Ignatieff Schwartzbach

    Research output: Contribution to book/anthology/report/proceedingArticle in proceedingsResearchpeer-review

    272 Citations (Scopus)

    Abstract

    We perform static analysis of Java programs to answer a simple question: which values may occur as results of string expressions? The answers are summarized for each expression by a regular language that is guaranteed to contain all possible values. We present several applications of this analysis, including statically checking the syntax of dynamically generated expressions, such as SQL queries. Our analysis constructs flow graphs from class files and generates a context-free grammar with a nonterminal for each string expression. The language of this grammar is then widened into a regular language through a variant of an algorithm previously used for speech recognition. The collection of resulting regular languages is compactly represented as a special kind of multi-level automaton from which individual answers may be extracted. If a program error is detected, examples of invalid strings are automatically produced. We present extensive benchmarks demonstrating that the analysis is efficient and produces results of useful precision.
    Original languageEnglish
    Title of host publicationStatic Analysis : 10th International Symposium, SAS 2003 San Diego, CA, USA, June 11-13, 2003 Proceedings
    Number of pages18
    PublisherSpringer
    Publication date2003
    Pages1-18
    ISBN (Print)3-540-40325-6
    DOIs
    Publication statusPublished - 2003
    EventStatic Analysis International Symposium. SAS 2003 - San Diego, California, United States
    Duration: 11 Jun 200313 Jun 2003
    Conference number: 10

    Conference

    ConferenceStatic Analysis International Symposium. SAS 2003
    Number10
    Country/TerritoryUnited States
    CitySan Diego, California
    Period11/06/200313/06/2003
    SeriesLecture Notes in Computer Science
    Volume2694
    ISSN0302-9743

    Keywords

    • Regular language
    • Static analysis
    • Graph flow
    • Flow graphs
    • Fluence graph
    • SQL
    • Regular expression
    • Speech recognition
    • Context free grammar
    • Data flow
    • Database query
    • JAVA language
    • Program verification
    • Program analysis
    • Character string

    Fingerprint

    Dive into the research topics of 'Precise Analysis of String Expressions'. Together they form a unique fingerprint.

    Cite this