diff --git a/code/languages/com.mbeddr.formal.nusmv/solutions/com.mbeddr.formal.base.tooling/models/com.mbeddr.formal.base.tooling.project.mps b/code/languages/com.mbeddr.formal.nusmv/solutions/com.mbeddr.formal.base.tooling/models/com.mbeddr.formal.base.tooling.project.mps
index 82765f617..4d636e5f2 100644
--- a/code/languages/com.mbeddr.formal.nusmv/solutions/com.mbeddr.formal.base.tooling/models/com.mbeddr.formal.base.tooling.project.mps
+++ b/code/languages/com.mbeddr.formal.nusmv/solutions/com.mbeddr.formal.base.tooling/models/com.mbeddr.formal.base.tooling.project.mps
@@ -13,6 +13,12 @@
+
+
+
+
+
+
@@ -27,10 +33,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -40,6 +59,9 @@
+
+
+
@@ -57,6 +79,7 @@
+
@@ -64,6 +87,9 @@
+
+
+
@@ -78,12 +104,14 @@
+
+
@@ -93,6 +121,9 @@
+
+
+
@@ -110,9 +141,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -129,34 +178,286 @@
-
-
-
-
-
+
+
+
+
+
-
-
+
+
+
-
-
-
+
+
+
-
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
@@ -169,17 +470,26 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
@@ -194,78 +504,95 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/code/languages/com.mbeddr.formal.safety/solutions/com.mbeddr.formal.safety.build/models/com.mbeddr.formal.safety.build.mps b/code/languages/com.mbeddr.formal.safety/solutions/com.mbeddr.formal.safety.build/models/com.mbeddr.formal.safety.build.mps
index 1c4ec39ad..4b3276037 100644
--- a/code/languages/com.mbeddr.formal.safety/solutions/com.mbeddr.formal.safety.build/models/com.mbeddr.formal.safety.build.mps
+++ b/code/languages/com.mbeddr.formal.safety/solutions/com.mbeddr.formal.safety.build/models/com.mbeddr.formal.safety.build.mps
@@ -347,8 +347,8 @@
-
-
+
+
@@ -448,7 +448,7 @@
-
+
@@ -13283,7 +13283,7 @@
-
+
@@ -13291,7 +13291,7 @@
-
+
@@ -13313,8 +13313,8 @@
-
-
+
+
@@ -13399,7 +13399,7 @@
-
+
@@ -13743,7 +13743,7 @@
-
+
@@ -14092,6 +14092,12 @@
+
+
+
+
+
+
@@ -14110,6 +14116,9 @@
+
+
+
@@ -14140,6 +14149,9 @@
+
+
+
diff --git a/rcp_resources/bin/fasten.bat b/rcp_resources/bin/fasten.bat
index bd7467b42..1a41ef6f6 100644
--- a/rcp_resources/bin/fasten.bat
+++ b/rcp_resources/bin/fasten.bat
@@ -1,9 +1,11 @@
@ECHO OFF
::----------------------------------------------------------------------
-:: JetBrains MPS startup script
+:: JetBrains MPS startup script.
:: Generated by MPS
::----------------------------------------------------------------------
+SET IDEA_PATHS_SELECTOR=MPS2022.2
+SET PRODUCT=MPS
:: ---------------------------------------------------------------------
:: Ensure IDE_HOME points to the directory where the IDE is installed.
@@ -27,14 +29,15 @@ IF "%IDE_BIN_DIR:~-8%" == "bin\win\" (
:: Try (in order): MPS_JDK, mps%BITS%.exe.jdk, ..\jre, JDK_HOME, JAVA_HOME.
:: ---------------------------------------------------------------------
SET JDK=
+SET IDEA_VENDOR_NAME=JetBrains
IF EXIST "%MPS_JDK%" SET JDK=%MPS_JDK%
-IF NOT "%JDK%" == "" GOTO check
+IF EXIST "%JDK%" GOTO check
SET BITS=64
-SET USER_JDK64_FILE=%USERPROFILE%\.MPS2019.2\config\mps%BITS%.exe.jdk
+SET USER_JDK64_FILE=%APPDATA%\%IDEA_VENDOR_NAME%\MPS2022.2\mps%BITS%.exe.jdk
SET BITS=
-SET USER_JDK_FILE=%USERPROFILE%\.MPS2019.2\config\mps%BITS%.exe.jdk
+SET USER_JDK_FILE=%APPDATA%\%IDEA_VENDOR_NAME%\MPS2022.2\mps%BITS%.exe.jdk
IF EXIST "%USER_JDK64_FILE%" (
SET /P JDK=<%USER_JDK64_FILE%
) ELSE (
@@ -42,106 +45,110 @@ IF EXIST "%USER_JDK64_FILE%" (
)
IF NOT "%JDK%" == "" (
IF NOT EXIST "%JDK%" SET JDK="%IDE_HOME%\%JDK%"
- GOTO check
+ IF EXIST "%JDK%" GOTO check
)
-:: Do not use our own 64 bit JDK for 32 bit Windwos
-IF NOT DEFINED PROGRAMFILES(X86) GOTO skip64bitJDK
-
-IF EXIST "%IDE_HOME%\jbr" SET JDK=%IDE_HOME%\jbr
-IF NOT "%JDK%" == "" GOTO check
-
-IF EXIST "%IDE_HOME%\jre64" SET JDK=%IDE_HOME%\jre64
-IF NOT "%JDK%" == "" GOTO check
-
-IF EXIST "%IDE_HOME%\jre" SET JDK=%IDE_HOME%\jre
-IF NOT "%JDK%" == "" GOTO check
+IF "%PROCESSOR_ARCHITECTURE%" == "AMD64" (
+ IF EXIST "%IDE_HOME%\jbr" SET JDK=%IDE_HOME%\jbr
+ IF EXIST "%JDK%" GOTO check
+)
+IF EXIST "%IDE_HOME%\jbr-x86" SET JDK=%IDE_HOME%\jbr-x86
+IF EXIST "%JDK%" GOTO check
-:skip64bitJDK
IF EXIST "%JDK_HOME%" SET JDK=%JDK_HOME%
-IF NOT "%JDK%" == "" GOTO check
+IF EXIST "%JDK%" GOTO check
IF EXIST "%JAVA_HOME%" SET JDK=%JAVA_HOME%
:check
SET JAVA_EXE=%JDK%\bin\javaw.exe
-IF NOT EXIST "%JAVA_EXE%" SET JAVA_EXE=%JDK%\jre\bin\javaw.exe
IF NOT EXIST "%JAVA_EXE%" (
ECHO ERROR: cannot start JetBrains MPS.
ECHO No JDK found. Please validate either MPS_JDK, JDK_HOME or JAVA_HOME points to valid JDK installation.
- ECHO
EXIT /B
)
SET JRE=%JDK%
IF EXIST "%JRE%\jre" SET JRE=%JDK%\jre
-IF EXIST "%JRE%\lib\amd64" (
- SET BITS=64
-) ELSE (
- IF EXIST "%JRE%\lib\jrt-fs.jar" SET BITS=64
-)
+
+SET BITS=
+FINDSTR /B /C:"OS_ARCH=\"x86_64\"" "%JRE%\release" > NUL
+IF NOT ERRORLEVEL 1 SET BITS=64
+FINDSTR /B /C:"OS_ARCH=\"amd64\"" "%JRE%\release" > NUL
+IF NOT ERRORLEVEL 1 SET BITS=64
:: ---------------------------------------------------------------------
:: Collect JVM options and properties.
:: ---------------------------------------------------------------------
IF NOT "%MPS_PROPERTIES%" == "" SET IDE_PROPERTIES_PROPERTY="-Didea.properties.file=%MPS_PROPERTIES%"
-:: explicit
-SET VM_OPTIONS_FILE=%MPS_VM_OPTIONS%
-IF NOT EXIST "%VM_OPTIONS_FILE%" (
- :: Toolbox
- SET VM_OPTIONS_FILE=%IDE_HOME%.vmoptions
+SET VM_OPTIONS_FILE=
+SET USER_VM_OPTIONS_FILE=
+IF NOT "%MPS_VM_OPTIONS%" == "" (
+ :: 1. %_VM_OPTIONS%
+ IF EXIST "%MPS_VM_OPTIONS%" SET "VM_OPTIONS_FILE=%MPS_VM_OPTIONS%"
+)
+:: custom value from MPS team to reduce typo risk
+SET "VMOPTIONS_FNAME=%PRODUCT%%BITS%.exe.vmoptions"
+::
+IF "%VM_OPTIONS_FILE%" == "" (
+ :: 2. \bin\[win\].vmoptions ...
+ IF EXIST "%IDE_BIN_DIR%\%VMOPTIONS_FNAME%" (
+ SET "VM_OPTIONS_FILE=%IDE_BIN_DIR%\%VMOPTIONS_FNAME%"
+ ) ELSE IF EXIST "%IDE_BIN_DIR%\win\%VMOPTIONS_FNAME%" (
+ SET "VM_OPTIONS_FILE=%IDE_BIN_DIR%\win\%VMOPTIONS_FNAME%"
+ )
+ :: ... [+ .vmoptions (Toolbox) || \.vmoptions]
+ IF EXIST "%IDE_HOME%.vmoptions" (
+ SET "USER_VM_OPTIONS_FILE=%IDE_HOME%.vmoptions"
+ ) ELSE IF EXIST "%APPDATA%\%IDEA_VENDOR_NAME%\%IDEA_PATHS_SELECTOR%\%VMOPTIONS_FNAME%" (
+ SET "USER_VM_OPTIONS_FILE=%APPDATA%\%IDEA_VENDOR_NAME%\%IDEA_PATHS_SELECTOR%\%VMOPTIONS_FNAME%"
+ )
)
-IF NOT EXIST "%VM_OPTIONS_FILE%" (
- :: user-overridden
- SET VM_OPTIONS_FILE=%USERPROFILE%\.MPS2019.2\config\mps%BITS%.exe.vmoptions
+
+SET ACC=
+SET USER_GC=
+IF NOT "%USER_VM_OPTIONS_FILE%" == "" (
+ SET ACC="-Djb.vmOptionsFile=%USER_VM_OPTIONS_FILE%"
+ FINDSTR /R /C:"-XX:\+.*GC" "%USER_VM_OPTIONS_FILE%" > NUL
+ IF NOT ERRORLEVEL 1 SET USER_GC=yes
+) ELSE IF NOT "%VM_OPTIONS_FILE%" == "" (
+ SET ACC="-Djb.vmOptionsFile=%VM_OPTIONS_FILE%"
)
-IF NOT EXIST "%VM_OPTIONS_FILE%" (
- :: default, standard installation
- SET VM_OPTIONS_FILE=%IDE_BIN_DIR%\mps%BITS%.exe.vmoptions
+IF NOT "%VM_OPTIONS_FILE%" == "" (
+ IF "%USER_GC%" == "" (
+ FOR /F "eol=# usebackq delims=" %%i IN ("%VM_OPTIONS_FILE%") DO CALL SET "ACC=%%ACC%% %%i"
+ ) ELSE (
+ FOR /F "eol=# usebackq delims=" %%i IN (`FINDSTR /R /V /C:"-XX:\+Use.*GC" "%VM_OPTIONS_FILE%"`) DO CALL SET "ACC=%%ACC%% %%i"
+ )
)
-IF NOT EXIST "%VM_OPTIONS_FILE%" (
- :: default, universal package
- SET VM_OPTIONS_FILE=%IDE_BIN_DIR%\win\mps%BITS%.exe.vmoptions
+IF NOT "%USER_VM_OPTIONS_FILE%" == "" (
+ FOR /F "eol=# usebackq delims=" %%i IN ("%USER_VM_OPTIONS_FILE%") DO CALL SET "ACC=%%ACC%% %%i"
)
-IF NOT EXIST "%VM_OPTIONS_FILE%" (
- ECHO ERROR: cannot find VM options file.
+IF "%VM_OPTIONS_FILE%%USER_VM_OPTIONS_FILE%" == "" (
+ ECHO ERROR: cannot find a VM options file.
)
-SET ACC=
-FOR /F "eol=# usebackq delims=" %%i IN ("%VM_OPTIONS_FILE%") DO CALL "%IDE_BIN_DIR%\append.bat" "%%i"
-IF EXIST "%VM_OPTIONS_FILE%" SET ACC=%ACC% -Djb.vmOptionsFile="%VM_OPTIONS_FILE%"
-
-SET IDEA_PATHS_SELECTOR=MPS2019.2
-SET COMMON_JVM_ARGS="-XX:ErrorFile=%USERPROFILE%\java_error_in_IDEA_%%p.log" "-XX:HeapDumpPath=%USERPROFILE%\java_error_in_IDEA.hprof" -Didea.paths.selector=%IDEA_PATHS_SELECTOR% %IDE_PROPERTIES_PROPERTY%
-SET IDE_JVM_ARGS=-Didea.platform.prefix=Idea -Didea.jre.check=true
+SET COMMON_JVM_ARGS="-XX:ErrorFile=%USERPROFILE%\java_error_in_%PRODUCT%_%%p.log" "-XX:HeapDumpPath=%USERPROFILE%\java_error_in_%PRODUCT%.hprof" -Didea.paths.selector=%IDEA_PATHS_SELECTOR% -Didea.vendor.name="%IDEA_VENDOR_NAME%" %IDE_PROPERTIES_PROPERTY%
+SET IDE_JVM_ARGS=-Didea.platform.prefix=Idea -Didea.jre.check=true -Djava.system.class.loader=com.intellij.util.lang.PathClassLoader
SET ALL_JVM_ARGS=%ACC% %COMMON_JVM_ARGS% %IDE_JVM_ARGS%
-SET CLASS_PATH=%IDE_HOME%\lib\branding.jar
-SET CLASS_PATH=%CLASS_PATH%;%IDE_HOME%\lib\mps-boot.jar
-SET CLASS_PATH=%CLASS_PATH%;%IDE_HOME%\lib\mps-boot-util.jar
-SET CLASS_PATH=%CLASS_PATH%;%IDE_HOME%\lib\bootstrap.jar
-SET CLASS_PATH=%CLASS_PATH%;%IDE_HOME%\lib\extensions.jar
-SET CLASS_PATH=%CLASS_PATH%;%IDE_HOME%\lib\util.jar
-SET CLASS_PATH=%CLASS_PATH%;%IDE_HOME%\lib\jdom.jar
-SET CLASS_PATH=%CLASS_PATH%;%IDE_HOME%\lib\log4j.jar
-SET CLASS_PATH=%CLASS_PATH%;%IDE_HOME%\lib\trove4j.jar
-SET CLASS_PATH=%CLASS_PATH%;%IDE_HOME%\lib\jna.jar
+SET CLASS_PATH=%IDE_HOME%\lib\*
+SET CLASS_PATH=%CLASS_PATH%;%IDE_HOME%\lib\ant\lib\ant.jar
SET CLASS_PATH=%CLASS_PATH%;%JDK%\lib\tools.jar
IF NOT "%IDEA_CLASS_PATH%" == "" SET CLASS_PATH=%CLASS_PATH%;%IDEA_CLASS_PATH%
:: ---------------------------------------------------------------------
:: Run the IDE.
:: ---------------------------------------------------------------------
-SET OLD_PATH=%PATH%
-SET PATH=%IDE_BIN_DIR%;%PATH%;%IDE_HOME%\external_tools\
-
-
-SET JAVA_HOME=..\jbr\
-
SET MAIN_CLASS=jetbrains.mps.Launcher
-start "" "%JAVA_EXE%" %ALL_JVM_ARGS% -Didea.main.class.name=%MAIN_CLASS% -cp "%CLASS_PATH%" %MAIN_CLASS% %*
-
-SET PATH=%OLD_PATH%
-
+start "" "%JAVA_EXE%" ^
+ %ALL_JVM_ARGS% ^
+ -Didea.main.class.name=%MAIN_CLASS% ^
+ -cp "%CLASS_PATH%" ^
+ --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.base/jdk.internal.vm=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/sun.security.ssl=ALL-UNNAMED --add-opens=java.base/sun.security.util=ALL-UNNAMED --add-opens=java.desktop/java.awt=ALL-UNNAMED --add-opens=java.desktop/java.awt.dnd.peer=ALL-UNNAMED --add-opens=java.desktop/java.awt.event=ALL-UNNAMED --add-opens=java.desktop/java.awt.image=ALL-UNNAMED --add-opens=java.desktop/java.awt.peer=ALL-UNNAMED --add-opens=java.desktop/javax.swing=ALL-UNNAMED --add-opens=java.desktop/javax.swing.plaf.basic=ALL-UNNAMED --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED --add-opens=java.desktop/sun.awt.datatransfer=ALL-UNNAMED --add-opens=java.desktop/sun.awt.image=ALL-UNNAMED --add-opens=java.desktop/sun.awt=ALL-UNNAMED --add-opens=java.desktop/sun.font=ALL-UNNAMED --add-opens=java.desktop/sun.java2d=ALL-UNNAMED --add-opens=java.desktop/sun.swing=ALL-UNNAMED --add-opens=jdk.attach/sun.tools.attach=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-opens=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED --add-opens=jdk.jdi/com.sun.tools.jdi=ALL-UNNAMED --add-opens=java.desktop/sun.awt.windows=ALL-UNNAMED ^
+ %MAIN_CLASS% ^
+ %*
+
+exit