Skip to content

ridamranjan/CodeZap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Code Analyzer & Developer Intelligence Platform

An intelligent, modular system for understanding source code through structured analysis. This project transforms raw code into a semantic, language-neutral representation that can power analyzers, tooling, and AI systems.


Current Focus

The project is currently focused on building the core analysis engine, specifically:

Code → AST → IR → Clean JSON

This pipeline converts code into a structured format that is:

  • human-readable
  • machine-analyzable
  • language-agnostic

What It Does (Current Capabilities)

1. Parsing & Structure Extraction

  • Parses Python code using ast

  • Extracts:

    • functions, classes
    • loops and conditionals
    • assignments and variables
    • calls and control flow

2. Intermediate Representation (IR)

A custom Semantic IR layer that:

  • preserves code structure
  • captures execution logic
  • abstracts away Python-specific syntax

Example:

function → body → if → return

3. Clean JSON Output (Language-Neutral)

The IR is converted into a clean JSON format designed for:

  • analyzers
  • AI systems
  • cross-language compatibility

Example:

{
  "type": "function",
  "name": "factorial",
  "body": [
    {
      "type": "if",
      "condition": "n <= 1",
      "body": [
        { "type": "return", "value": "1" }
      ],
      "else": [
        { "type": "return", "value": "n * factorial(n)" }
      ]
    }
  ]
}

Architecture (Current)

CodeZap/
│
├── ir/              # IRNode + IRBuilder (AST → IR)
├── driver/          # File parsing entry
├── printer/         # Debug visualization
├── analyzers/       # (soon) analysis modules
└── main.py          # entry point

Core Pipeline (current)

Python Code
   ↓
AST (Python)
   ↓
IR (custom semantic structure)
   ↓
Clean JSON (language-neutral)

Current Status

  • AST parsing
  • IR (Intermediate Representation)
  • Clean JSON export
  • Call graph (next step)
  • Advanced analyzers (planned)

Usage (Current)

Run the Analyzer

Run from the project root directory:

py -m CodeZap.main path/to/file.py

Save Output to File (Optional)

You can redirect the output to a file:

py -m CodeZap.main path/to/file.py > output.json

Example

py -m CodeZap.main test.py > output.json

This will:

  • parse the input file
  • build IR
  • output clean JSON

Roadmap (Next Steps)

Phase 1 (Current)

  • AST → IR
  • IR → Clean JSON

Phase 2

  • Call Graph generation
  • Recursion detection
  • Basic code metrics

Phase 3

  • AI-powered explanations
  • Refactoring suggestions
  • Complexity metrics
  • Security and Data leakage flags

Phase 4

  • Multi-language support

Phase 5

  • Frontend/Dashboard etc

Contributing

Project is in active development. Structure may evolve contributions and ideas are welcome.


License

Apache License 2.0


Note

This is a core engine-first project. Higher-level features (AI, dashboard, security) will be built on top of the current foundation.

About

AI powered tool that aims to help developers and team to build, analyze and debug all in one place.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages