151 research outputs found

    Sawja: Static Analysis Workshop for Java

    Get PDF
    Static analysis is a powerful technique for automatic verification of programs but raises major engineering challenges when developing a full-fledged analyzer for a realistic language such as Java. This paper describes the Sawja library: a static analysis framework fully compliant with Java 6 which provides OCaml modules for efficiently manipulating Java bytecode programs. We present the main features of the library, including (i) efficient functional data-structures for representing program with implicit sharing and lazy parsing, (ii) an intermediate stack-less representation, and (iii) fast computation and manipulation of complete programs

    Integrated Java Bytecode Verification

    Get PDF
    AbstractExisting Java verifiers perform an iterative data-flow analysis to discover the unambiguous type of values stored on the stack or in registers. Our novel verification algorithm uses abstract interpretation to obtain definition/use information for each register and stack location in the program, which in turn is used to transform the program into Static Single Assignment form. In SSA, verification is reduced to simple type compatibility checking between the definition type of each SSA variable and the type of each of its uses. Inter-adjacent transitions of a value through stack and registers are no longer verified explicitly. This integrated approach is more efficient than traditional bytecode verification but still as safe as strict verification, as overall program correctness can be induced once the data flow from each definition to all associated uses is known to be type-safe

    Structural Encoding of Static Single Assignment Form

    Get PDF
    AbstractStatic Single Assignment (SSA) form is often used as an intermediate representation during code optimization in Java Virtual Machines. Recently, SSA has successfully been used for bytecode verification. However, constructing SSA at the code consumer is costly. SSA-based mobile code transport formats have been shown to eliminate this cost by shifting SSA creation to the code producer. These new formats, however, are not backward compatible with the established Java class-file format. We propose a novel approach to transport SSA information implicitly through structural code properties of standard Java bytecode. While the resulting bytecode sequence can still be directly executed by traditional Virtual Machines, our novel VM can infer SSA form and confirm its safety with virtually no overhead

    A Neural Model for Generating Natural Language Summaries of Program Subroutines

    Full text link
    Source code summarization -- creating natural language descriptions of source code behavior -- is a rapidly-growing research topic with applications to automatic documentation generation, program comprehension, and software maintenance. Traditional techniques relied on heuristics and templates built manually by human experts. Recently, data-driven approaches based on neural machine translation have largely overtaken template-based systems. But nearly all of these techniques rely almost entirely on programs having good internal documentation; without clear identifier names, the models fail to create good summaries. In this paper, we present a neural model that combines words from code with code structure from an AST. Unlike previous approaches, our model processes each data source as a separate input, which allows the model to learn code structure independent of the text in code. This process helps our approach provide coherent summaries in many cases even when zero internal documentation is provided. We evaluate our technique with a dataset we created from 2.1m Java methods. We find improvement over two baseline techniques from SE literature and one from NLP literature

    Flow logic for language-based safety and security

    Get PDF

    Bytecode verification on Java smart cards

    Get PDF
    International audienceThis article presents a novel approach to the problem of bytecode verification for Java Card applets. By relying on prior off-card bytecode transformations, we simplify the bytecode verifier and reduce its memory requirements to the point where it can be embedded on a smart card, thus increasing significantly the security of post-issuance downloading of applets on Java Cards. This article describes the on-card verification algorithm and the off-card code transformations, and evaluates experimentally their impact on applet code size

    Deep Type Inference for Mobile Functions

    Get PDF

    Partial Redundancy Elimination for Access Path Expressions

    Get PDF

    Progetto e realizzazione di uno strumento di trasformazione del bytecode Java per una verifica efficiente

    Get PDF
    Il Bytecode Verifier della Java Virtual Machine testa staticamente la sicurezza dei tipi del bytecode ed è alla base del modello di sicurezza di Java. Tuttavia, esistono esempi di programmi Java legali, che non sono accettati dal Bytecode Verifier. Questa tesi espone e analizza i limiti del Bytecode Verifier soffermandosi, in particolare, sul problema delle subroutines. Inoltre, una soluzione al problema della verifica delle subroutines è presentata. La soluzione proposta si basa su uno strumento di trasformazione del bytecode Java, che apporta delle modifiche al codice prima che questo sia verificato. Il codice modificato sarà, infine, sottoposto all’algoritmo di verifica standard. La trasformazione del bytecode non cambia la semantica del programma originario: il bytecode trasformato può essere eseguito dopo la verifica al posto del bytecode originario
    • …
    corecore