This is a runtime and a model checker for the LMNtal (pronounced "elemental") language.
- cmake 3.16+
- g++ or clang++
- re2c 1.0.3+
- bison 3.0+
- ruby 1.9.3+
- build-essential (on Ubuntu/Debian)
Build the package as follows:
export LMNTAL_HOME=/path/to/lmntal-compiler # set the path to the LMNtal compiler
cd slim
./build-cmake.sh # Build with CMake (Release mode)For development builds:
./build-cmake.sh --debug # Debug build
./build-cmake.sh --devel # Developer mode with additional checksAmong generated files, build/bin/slim is the LMNtal interpreter.
So you can run SLIM as follows:
lmntal --slimcode source.lmn > source.il # Compile the source.lmn file and generate a source.il
./build/bin/slim source.il # Execute the runtime with the source.ilYou can see what options are available with SLIM as follows:
./build/bin/slim --help
After building and testing locally, you can optionally install SLIM system-wide:
./build-cmake.sh # Build locally
./run-tests.sh # Test the build
# Install system-wide (optional)
cd build
sudo cmake --install . --prefix /usr/localThen you can use slim from anywhere:
slim --help # System-wide slim command
slim source.il # Run without ./build/bin/ prefixlmntal --slimcode source.lmn > source.il
./build/bin/slim --nd source.il # single core
./build/bin/slim --nd --use-Ncore=12 source.il # multi-core
./build/bin/slim --nd --use-Ncore=12 --delta-mem source.il # multi-core optimizationTo test the project, run the following:
./run-tests.sh # Run all tests (simplest)
./run-tests.sh --output-on-failure # Show detailed output on failures
slim_CHECK_ND=yes ./run-tests.sh # Include time-consuming model checking testsAlternative methods:
# From build directory
cd build && make check # Equivalent to 'ctest --output-on-failure'
cd build && ctest # Direct ctest (from build directory)To add or modify a test, see test.
We use ClangFormat for code formatting. Install ClangFormat and run the following:
clang-format -i filename.cpp # Format individual files
./scripts/format.sh # Format all source filesバグ報告は lmntal@ueda.info.waseda.ac.jp までお願いします。
最新版における新しい機能やその他の変更点については NEWS を参照してください。
インストール方法は INSTALL に記述されています。