Skip to content

open-jumpco/kfsm-samples

Repository files navigation

KFSM samples

88x31

This project contains samples for using KFSM

Build

git clone https://github.com/open-jumpco/kfsm-samples.git
./gradlew assemble

Build Graal Native Image

This was tested by building normal build with JDK 8 and 11 and then using Graal 19.1.1 to build the native image.

# Install GraalVM native-image compiler
gu install native-image
# Create the native image
./gradlew nativeImage

I prefer using sdkman to switch runtimes while doing this kind of exercise.

Executing applications

Windows

run.cmd

*nix

./run.sh

Generated State Table

LockFSM State Map

Start Event[Guard] Target Action

LOCKED

LOCK

DOUBLE_LOCKED

{
doubleLock()
}

LOCKED

UNLOCK

UNLOCKED

{
unlock()
}

DOUBLE_LOCKED

UNLOCK

LOCKED

{
doubleUnlock()
}

DOUBLE_LOCKED

LOCK

DOUBLE_LOCKED

{
alarm()
}

UNLOCKED

LOCK

LOCKED

{
lock()
}

Generated State Diagram

lock

To learn more about visualization visit kfsm-viz and kfsm-viz-plugin

Releases

No releases published

Packages

No packages published