Thank you for your interest in contributing to SLIM! This guide will help you get started.
- Ubuntu 24.04 (recommended) or compatible Linux distribution
- CMake 3.16+
- C++11 compatible compiler (GCC/Clang)
- LMNtal compiler (set
LMNTAL_HOMEenvironment variable)
# Clone the repository
git clone <repository-url>
cd slim-cmake
# Install dependencies
sudo apt install cmake bison flex re2c ruby build-essential
# Set up environment
export LMNTAL_HOME=/path/to/lmntal/compiler
# Build
./build-cmake.sh
# Test
./build-test/src/slim --help
cd build-test && make test# Create feature branch
git checkout -b feature/your-feature-name
# Clean build for new branch
rm -rf build*
./build-cmake.sh
# Make your changes...
# Edit source files, update CMakeLists.txt if needed
# Test your changes
cd build-test && make && make test
# Format code (if available)
find src -name "*.cpp" -o -name "*.h" | xargs clang-format -i
# Commit and push
git add .
git commit -m "Add your feature description"
git push origin feature/your-feature-name- Follow existing code style (2-space indentation, similar to Google style)
- Use
clang-formatwhen available - Add tests for new functionality
- Update documentation for user-facing changes
- All commits must pass CI checks
- Add source files to appropriate directory (
src/vm/,src/verifier/, etc.) - Update the corresponding
CMakeLists.txt - Clean rebuild:
rm -rf build-test && ./build-cmake.sh
- Code builds successfully
- All tests pass
- Code is formatted consistently
- Documentation updated if needed
- Commit messages are clear and descriptive
cd build-test
make test # All tests
ctest -R "system_" # System tests only
ctest -R "statespace_" # State space tests only
export slim_CHECK_ND=yes && make test # Include non-deterministic tests- System tests: Add
.lmntestfiles totest/system_check/testsuite/ - Update appropriate
check.shscripts - See
test/README.mdfor detailed testing documentation
- VM (
src/vm/): Runtime virtual machine - Verifier (
src/verifier/): Model checker and state space exploration - Loader (
src/loader/): Intermediate language parser and loader - Element (
src/element/): Core data structures and utilities - Extensions (
src/ext/): Built-in rule implementations
- CMake-based: Modern, cross-platform build system
- Generated files: Parsers and code generation handled automatically
- Out-of-source builds: All build artifacts in separate
build/directories
- Read
CLAUDE.mdfor comprehensive development guide - Check
CMAKE_MIGRATION.mdfor build system details - Look at existing code for patterns and conventions
- Open an issue for bugs or feature requests
By contributing, you agree that your contributions will be licensed under the same license as the project.