Git Product home page Git Product logo

code-analyzer's Introduction

Compiler_project

How it works:

Just input the path for the Java code that needed to be analyzed, and you'll get a html page and a text file where you can find the follwing:

  • For every block that's excted we write the no.of the block into the output.text file.
  • If the HTML page, the excuted code will be colered in green and the blocks that weren't excuted (uncalled function for example) will be in pink.
  • If there were a branch coverage case it will be colored orange in the HTML page.

You can see an example in the images bellow bellow:

INPUT

6644ab21-7a2b-4bc9-bb88-3bf5190dbe4b

As Input shown, IF function contains another IF which have an Print function. Our Purpose is to put \blocknumber + "number of this block" in each new statment, as shown in the output.

OUTPUT

14b5866b-ca92-4a17-b4f5-a06a448523aa

In our main file: main.java We use:

1- We use Walker to know how to walk through the tree and point to specific position to write before or after this position:

2023-03-22_18h36_13

2- We use 2 Rewritter to write in the out.java and new.html, the out.java is a augmented code that writes the style.css, which adds the right colors to the HTML page that shows as an output of our program.

3- we run the out.java directly from our main, and out.java directly run the HTML page on the default browser of your device.

code-analyzer's People

Contributors

aml-hassan-abd-el-hamid avatar asmahan-rashed avatar nada-khalefa avatar nourelshehry avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.