Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6719887
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:08:46+00:00 2026-05-26T09:08:46+00:00

What are the various tradeoffs for performing static analysis on various levels of code?

  • 0

What are the various tradeoffs for performing static analysis on various levels of code? For instance for Java, why would someone perform static analysis on Java source code vs. Jasmin code vs. Java bytecode? Does the choice restrict or expand the various types of analyses able to be done? Does the choice influence the correctness of the analyses? Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T09:08:46+00:00Added an answer on May 26, 2026 at 9:08 am

    What are the various tradeoffs for performing static analysis on various levels of code? For instance for Java, why would someone perform static analysis on Java source code vs. Java bytecode?

    From a user perspective, I’d say that, unless you have very specific, easy to formalize, properties to analyze (such as pure safety properties) go with a tool that supports Java source code.

    From a tool-developer perspective, it may be easier to work with one level or another. I here present the differences that come to my mind. (Note that with a compiler and/or a decent decompiler a tool for instance operate on one layer and present the results on another.)

    Pros for Java source code:

    • Structured language, i.e. loops etc, instead of arbitrary jumps. (This makes it a lot easier to create a weakest precondition calculus for instance.)
    • You can make more assumptions in the code (bytecode programs are more expressive).

    Pros for Bytecode:

    • The language specification (the semantics of the bytecode instructions) are a lot simpler.
    • A more “pinned down” specification of the machine (the VM)
    • You can extend the analysis to legacy code and libraries.
    • Analysis allows for other languages targeting the JVM (Closure, Scala, JRuby…)
    • No need for a possibly complex parser

    Pros for machine code:

    • You verify what you actually feed the CPU with. (No need to use a verified compiler or verified VM if you want a fully verified chain.)

    State of the art tools such as Spec# etc (formal methods dialect of C#) usually go through an intermediate language (BoogiePL (neighter MSIL nor C#) in the Spec# case) specifically designed for formal analysis.

    Does the choice restrict or expand the various types of analyses able to be done?

    In the end… no, not really. You face the same fundamental problems regardless of which (Turing complete) language you choose to analyze. Depending on what properties you analyze, YMMV though.

    If you’re into formal methods and thinking about implementing an analysis yourself, I suspect you’ll find better tool-support for bytecode. If you’re a user or developer and want to perform analysis on your own code-base, I suspect you’ll benefit more from tools operating on Java-source code level.

    Does the choice influence the correctness of the analyses?

    Depends on what you mean by correctness. A static analysis is most often “defensive” in the sense that you don’t assume anything that you don’t know is true. If you restrict your attention to sound verification systems, all of them will be “equally correct”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For various reasons calling System.exit is frowned upon when writing Java Applications , so
For various reasons, such as cookies, SEO, and to keep things simple, I would
Various examples I've seen use AES/CBC/PKCS7Padding when I get a cypher instance. Obviously AES
Despite various measure ments to setup correct caching code in htaccess file, I still
Throughout various code, I have seen memory allocation in debug builds with NULL ...
From various sources on teh interwebs I've gleaned this following function: public static Nullable<T>
In various c++ code you often see different usage of strings: PWSTR, char*, std::string,
For various reasons I would like to not store the connection string for my
Mixing various Frameworks and Libraries I often see code like this float floatValue =
Various programs can do stuff only when you haven't used the computer for a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.