A unified documentation generation tool for Java PathFinder (JPF) that combines configuration analysis and type hierarchy analysis with modern architecture and tooling.
JPF AutoDoc is a modern, unified tool that replaces the functionality of both jpf-autodoc-options and jpf-autodoc-types with:
- Java 11 Compatibility: Modern Java features and module system support
- Gradle Build System: Modern dependency management and build automation
- Jackson XML: Modern XML handling instead of Castor
- Picocli CLI: Modern command-line interface with automatic help generation
- Parallel Processing: Multi-threaded analysis for better performance
- Comprehensive Testing: Unit, integration, and output validation tests
- Advanced Caching: Intelligent output caching with memory management
- Multiple Output Formats: Markdown, XML, JSON, HTML, and Console output
- Archive Support: Read class files from JAR, ZIP, and other archive formats
- Extracts JPF configuration options from bytecode
- Analyzes
@JPFOptionannotations - Identifies choice generators and loggers
- Cross-references implementation vs. documentation
- Analyzes JPF listener implementations
- Documents instruction factory patterns
- Maps native peer classes to model classes
- Tracks inheritance hierarchies
- Markdown: Modern documentation format with tables and navigation
- XML: Structured data export using Jackson
- JSON: Machine-readable output for APIs
- HTML: Web-ready documentation with CSS styling
- Console: Readable text output for testing and debugging
- Parallel Processing: Multi-threaded analysis and output generation
- Intelligent Caching: Output caching with memory and size limits
- Memory Optimization: Efficient handling of large datasets
- Performance Monitoring: Built-in timing and metrics
- Validation Reports: Comprehensive validation with detailed reporting
- Archive Analysis: Support for JAR, ZIP, and other archive formats
- Java 11+: For compilation and runtime
- Java 17+: For Gradle 9.0 compatibility (daemon only)
- Gradle 8.0+: For building and dependency management (9.0 compatible)
- JPF Core: Optional, for enhanced analysis capabilities
# Automatic setup (recommended)
./setup-gradle.sh
# Verify configuration
./gradlew checkGradleCompatibilityFor detailed setup instructions, see README_GRADLE_SETUP.md.
# Clone the repository
git clone https://github.com/cm45t3r/jpf-autodoc.git
cd jpf-autodoc
# Build the project
./gradlew build
# Create executable JAR
./gradlew createExecutableJar# Show help
./bin/jpfautodoc --help
# Show version
./bin/jpfautodoc --version
# Analyze JPF configuration options
./bin/jpfautodoc -cp /path/to/jpf-core --config-only -o markdown -f config.md /path/to/jpf-core
# Analyze type hierarchies
./bin/jpfautodoc -cp /path/to/jpf-core --types-only -o xml -f types.xml /path/to/jpf-core
# Analyze from JAR file
./bin/jpfautodoc -cp jpf-core.jar --config-only -o markdown -f config.md jpf-core.jar
# Analyze from ZIP archive
./bin/jpfautodoc -cp jpf-core.zip --types-only -o xml -f types.xml jpf-core.zip
# Full analysis with all output formats
./bin/jpfautodoc -cp /path/to/jpf-core --verbose --parallel 4 -o html -f docs.html /path/to/jpf-core
# Run with validation enabled
./bin/jpfautodoc -cp /path/to/jpf-core --validate --parallel 4 /path/to/jpf-core-cp, --classpath <path>: Classpath to analyze (supports directories, JAR, ZIP, and other archive files)-o, --output <format>: Output format (markdown, xml, json, html, text)-f, --file <file>: Output file path--config-only: Analyze only configuration options--types-only: Analyze only type hierarchies--verbose: Include detailed metadata in output
--parallel <threads>: Number of parallel threads (default: number of processors)--validate: Enable validation reports in output--include <patterns>: Include pattern for class names--exclude <patterns>: Exclude pattern for class names
markdown: Comprehensive markdown documentationxml: Structured XML using Jacksonjson: Machine-readable JSONhtml: Beautiful HTML with CSS stylingtext: Simple console output
./bin/jpfautodoc -cp ../jpf-core/build/ --config-only -o markdown -f jpf-config.md ../jpf-core/build/./bin/jpfautodoc -cp ../jpf-core/build/ --types-only -o xml -f jpf-types.xml ../jpf-core/build/# Analyze from JAR file
./bin/jpfautodoc -cp jpf-core.jar --config-only -o markdown -f jpf-config.md jpf-core.jar
# Analyze from ZIP archive
./bin/jpfautodoc -cp jpf-core.zip --types-only -o xml -f jpf-types.xml jpf-core.zip
# Analyze from directory containing archives
./bin/jpfautodoc -cp /path/to/libs/ --verbose -o html -f analysis.html /path/to/libs/# Generate all formats in parallel
./bin/jpfautodoc -cp ../jpf-core/build/ --verbose --parallel 4 \
-o markdown -f jpf-analysis.md \
-o xml -f jpf-analysis.xml \
-o json -f jpf-analysis.json \
-o html -f jpf-analysis.html \
../jpf-core/build/./bin/jpfautodoc -cp ../jpf-core/build/ \
--parallel 8 \
--verbose \
-o markdown -f jpf-analysis.md \
../jpf-core/build/- Analysis Engine: Unified analysis of JPF components
- Output Generators: Multiple format support with caching
- Validation System: Comprehensive validation and reporting
- Caching System: Performance optimization with intelligent caching
- Testing Framework: Comprehensive test coverage
- Archive Reader: Support for JAR, ZIP, and other archive formats
- Java 11: Modern Java features and performance
- Gradle: Modern build system with dependency management
- Jackson: Modern XML/JSON processing
- JUnit 5: Modern testing framework
- Picocli: Modern CLI framework
./gradlew test# Unit tests
./gradlew test --tests "*Test"
# Performance tests
./gradlew test --tests "*PerformanceTest"
# Integration tests
./gradlew test --tests "*IntegrationTest"- Total Tests: 41
- Passing Tests: 41 (100%)
- Test Categories:
- ClassFile Tests: 5 tests
- Output Cache Tests: 10 tests
- Output Generator Tests: 9 tests
- Output Integration Tests: 6 tests
- Output Performance Tests: 7 tests
- Archive Reader Tests: 4 tests
- Concurrent Generation: < 10 seconds for 4 output formats
- Large Dataset Handling: < 15 seconds for 500+ configuration options
- Memory Usage: Efficient handling of large datasets
- Cache Performance: Intelligent caching with configurable limits
- Parallel Processing: Multi-threaded analysis and output generation
- Memory Management: Configurable memory limits and efficient usage
- Intelligent Caching: Output caching with expiration and size limits
- Performance Monitoring: Built-in timing and metrics
# Old approach
ant -f build.xml -Dclasspath=/path/to/jpf-core
# New approach
./bin/jpfautodoc -cp /path/to/jpf-core --config-only -o xml -f options.xml /path/to/jpf-core# Old approach
ant -f build.xml -Dclasspath=/path/to/jpf-core
# New approach
./bin/jpfautodoc -cp /path/to/jpf-core --types-only -o xml -f types.xml /path/to/jpf-coregit clone https://github.com/cm45t3r/jpf-autodoc.git
cd jpf-autodoc
./gradlew build./gradlew test./gradlew createExecutableJar
./gradlew distZip- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Ensure all tests pass
- Submit a pull request
- Contributing Guidelines - How to contribute to JPF AutoDoc
- Code of Conduct - Community standards and guidelines
- Issue Templates - Templates for bug reports and feature requests
- Pull Request Template - Guidelines for pull requests
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Copyright Notice: The Java source files contain NASA copyright notices as they are part of the JPF ecosystem. The LICENSE file contains the standard Apache License 2.0 template.
For issues and questions:
- Check the test suite for usage examples
- Review the CLI help:
./bin/jpfautodoc --help - Run the demo script:
./demo-cli.sh
Status: Production Ready ✅
The JPF AutoDoc system provides a modern, comprehensive solution for JPF documentation generation with advanced features, comprehensive testing, and production-ready quality.