Skip to content

lmntal/slim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,759 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SLIM - Slim LMNtal IMprementation

This is a runtime and a model checker for the LMNtal (pronounced "elemental") language.

Getting started

Requirements

  1. cmake 3.16+
  2. g++ or clang++
  3. re2c 1.0.3+
  4. bison 3.0+
  5. ruby 1.9.3+
  6. build-essential (on Ubuntu/Debian)

Installation

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 checks

Among 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.il

You can see what options are available with SLIM as follows:

./build/bin/slim --help

System-wide Installation

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/local

Then you can use slim from anywhere:

slim --help            # System-wide slim command
slim source.il         # Run without ./build/bin/ prefix

Model Checking

lmntal --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 optimization

Development

Testing

To 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 tests

Alternative 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.

Formatting

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

For the further information ...

バグ報告は lmntal@ueda.info.waseda.ac.jp までお願いします。

最新版における新しい機能やその他の変更点については NEWS を参照してください。

インストール方法は INSTALL に記述されています。

About

slim LMNtal implementation

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors