Astah Professional and Astah UMLver.11 enhance existing code reverse capabilities with AI. AI-Powered Code Reverse adds automatic Sequence Diagram generation and expanded programming language support for code-based diagram generation.
This makes it easier to understand system behavior and structure from code, especially when working with unfamiliar codebases.
AI-powered Code Reverse uses an external AI service you select. Astah itself does not perform AI processing, nor does it learn from or analyze user data.
To use AI-powered Code Reverse, a valid API key must be configured. If the API key is not configured correctly, AI-powered Code Reverse will not function.
Key Features
1. Class Diagram Generation
Automatically generates UML Class Diagrams from source code in languages such as Java, C#, C++, C, Python, Go, TypeScript, and more. (→ Jump to Class Diagram Generation)
2. Sequence Diagram Generation
Automatically generates UML Sequence Diagrams based on the actual execution flow of the code to support deeper analysis. (→ Jump to Sequence Diagram Generation)
Supported Programming Languages
The following languages are supported:
Java: Full support for classes, interfaces, enums, annotations, generics, etc.
Model Name: Name of the AI model (e.g., gpt-5.1, claude-opus-4-1-20250805, gemini-2.5-pro)
Test the Connection
Click Test Connection to verify configuration correctness
Click OK to save changes.
Large Project Best Practices
To ensure a smooth experience and prevent data loss due to memory limitations, please follow these recommendations when processing large source code bases:
Increase JVM Memory: Before starting, increase Astah’s maximum heap size.
Open astah-pro.l4j.ini in the Astah installation folder.
Change -Xmx1024m to a higher value (e.g., -Xmx4096m).
Restart Astah.
Process Incrementally: Instead of reversing the entire solution at once, select specific sub-directories or modules.
Save Frequently: Save your .asta project file after each successful module reversal.
Note on API Costs: AI processing consumes tokens based on the volume of code. Large-scale operations can result in significant API provider charges. We recommend starting with a small subset to verify results first.
Target Directory: Choose the directory containing source files (multi-language projects are supported)
Include Subdirectories: Enable if needed
Choose Diagram Type
Under Target Diagram Type, select Class Diagram
Set Generation Options
Auto create class diagram: Automatically create class diagrams per package/namespace (recommended OFF for large projects; you can generate diagrams manually afterward)
Show full class details: Generate more detailed diagrams with the appearance of classes, attributes, and operations.
User Prompt: Enter custom instructions (e.g., “Ignore all non-public members”)
Start Generation
Click OK to begin analysis.
The AI analyzes the code and generates a UML static model (classes, attributes, operations, inheritance, interfaces, associations, etc.).
Ensure to enable auto create class diagrams to generate diagrams automatically.
Reversing Rules
Based on field types, AI Code Reverse will intelligently determine whether to model something as an attribute or an association.
Modeled as attributes:
Primitive types
Strings
Enums
Collections of value types (e.g., List<string>, Map<string, int>)
Max Call Hierarchy Depth: You can specify the maximum message-call depth for the generated diagram. Recommended 3–10
User Prompt: Custom analysis rules (e.g., “Ignore all logging calls”)
Start Generation
Click OK
The plugin analyzes the program flow and generates the Sequence Diagram
Reversing Rules
Specifying a Entry Method
You can specify an “entry method” to let AI know which method to start to reverse. You can analyze the execution flow of a specific method (e.g., PaymentService.process()). If you don’t specify the “entry method”, AI automatically detects an appropriate starting point, such as:
Web framework entry points
Spring Boot @RestController
Flask @app.route
Express app.get()
Public API methods
Key business logic methods
Test entry points
Unit test or integration test methods
TIPS: Start by leaving the Entry Methods field blank to allow automatic detection, then refine the analysis by specifying a method.
Multi-Language Call Chain Tracking
The AI can follow cross-language call chains (e.g., Java → Python → Go) and generate multi-language Sequence Diagrams.
Troubleshooting
Issue: Multi-Language Analysis Is Inaccurate
Check:
Check if the programming language version is supported
Provide clearer user prompts
Try a different AI model
Issue: Multi-Language Call Tracking Fails
Check:
Ensure all related source code is within the analysis directory.
Confirm that network calls use standard protocols (REST, gRPC).
Specify the entry method and call path manually.
Issue: Out of Memory in Large Projects
Solution:
Increase Astah’s JVM memory allocation.
Analyze modules separately instead of the entire project at once.
Usage Tips
We recommend starting with smaller projects that use a single programming language.
Adjust your prompts based on the generated output and gradually refine them to improve results.
Notes, Cautions, and Safe Use
Handling Confidential Information
The handling of information sent to AI services varies depending on the service used and the applicable contract terms. Please review the terms of use, data policies, and settings of each AI service before using it.
Backup Recommendation
Before editing models with AI, we strongly recommend creating a full backup of the project.
About AI-Generated Content
AI-generated content may not always be complete, correct, or consistent.
Always review the output carefully and revise it as needed.
Unexpected behavior or issues may occur depending on your prompts, model settings, or service status.
Token Limitations
AI services have an upper limit on the number of tokens they can process.
Sending or receiving very large specifications or model data in a single request may:
Reduce response quality
Cause timeout or errors
Make processing unstable
Try to adjust your prompts so that the exchanged information does not become excessively long.
Updating AI Code Reverse
AI Code Reverse is provided as a plug-in which is already bundled with Astah professional and Astah UML version 11 and later. When updates with bug fixes or improvements become available, we provide an updated plug-in .jar file. Follow the steps below to update AI Code Reverse to the latest version.