From 1b31359cdc676ca83ed8d229860786b0c04a909d Mon Sep 17 00:00:00 2001
From: Dennis Hendriks <dh_tue@hotmail.com>
Date: Sun, 4 Aug 2024 16:16:48 +0200
Subject: [PATCH 01/18] #352 Add CifCollectUtils.collectDiscVariables.

---
 .../escet/cif/common/CifCollectUtils.java     | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/cif/org.eclipse.escet.cif.common/src/org/eclipse/escet/cif/common/CifCollectUtils.java b/cif/org.eclipse.escet.cif.common/src/org/eclipse/escet/cif/common/CifCollectUtils.java
index 2cf55dec17..d594f85fc3 100644
--- a/cif/org.eclipse.escet.cif.common/src/org/eclipse/escet/cif/common/CifCollectUtils.java
+++ b/cif/org.eclipse.escet.cif.common/src/org/eclipse/escet/cif/common/CifCollectUtils.java
@@ -155,6 +155,25 @@ public class CifCollectUtils {
         return declarations;
     }
 
+    /**
+     * Collect the discrete variables declared in the given component (recursively).
+     *
+     * <p>
+     * Does not support component definition/instantiation.
+     * </p>
+     *
+     * @param <T> The type of the collection for storing found discrete variables.
+     * @param comp The component.
+     * @param variables The discrete variables collected so far. Is modified in-place.
+     * @return The updated variables collection.
+     */
+    public static <T extends Collection<DiscVariable>> T collectDiscVariables(ComplexComponent comp, T variables) {
+        getComplexComponentsStream(comp).flatMap(cc -> cc.getDeclarations().stream())
+                .filter(decl -> decl instanceof DiscVariable).map(decl -> (DiscVariable)decl)
+                .collect(Collectors.toCollection(() -> variables));
+        return variables;
+    }
+
     /**
      * Collect the discrete and input variables declared in the given component (recursively).
      *
-- 
GitLab


From 4ac8b090f8edabfbb798bfa32f468894926d693e Mon Sep 17 00:00:00 2001
From: Dennis Hendriks <dh_tue@hotmail.com>
Date: Sun, 4 Aug 2024 16:21:08 +0200
Subject: [PATCH 02/18] #352 Remove old CIF to mCRL2 implementation.

---
 .../.classpath                                |   5 -
 .../META-INF/MANIFEST.MF                      |   5 +-
 .../cif/cif2mcrl2/tree/InstanceTreeTest.java  |  75 ---
 .../cif/cif2mcrl2/AutomatonExtractor.java     | 231 -------
 .../cif/cif2mcrl2/Cif2Mcrl2Application.java   | 293 ---------
 .../cif2mcrl2/Cif2Mcrl2CommandHandler.java    |  31 -
 .../cif/cif2mcrl2/InstanceTreeBuilder.java    | 145 ----
 .../cif/cif2mcrl2/InstanceTreeHelper.java     | 108 ---
 .../cif/cif2mcrl2/InstanceTreeScanner.java    | 128 ----
 .../cif/cif2mcrl2/InstanceTreeVerifier.java   | 228 -------
 .../eclipse/escet/cif/cif2mcrl2/NameMaps.java | 506 --------------
 .../cif2mcrl2/options/DebugFileOption.java    |  57 --
 .../options/DefineInstanceTreeOption.java     |  47 --
 .../options/EnableDebugOutputOption.java      |  48 --
 .../options/GenerateValueActionsOption.java   | 234 -------
 .../cif/cif2mcrl2/storage/AutomatonData.java  | 236 -------
 .../cif/cif2mcrl2/storage/EventVarUsage.java  | 112 ----
 .../cif/cif2mcrl2/storage/VarAccess.java      |  76 ---
 .../escet/cif/cif2mcrl2/storage/VarUsage.java |  57 --
 .../cif/cif2mcrl2/storage/VariableData.java   | 113 ----
 .../cif2mcrl2/tree/AutomatonProcessNode.java  | 431 ------------
 .../cif2mcrl2/tree/CombinedProcessNode.java   | 622 ------------------
 .../cif/cif2mcrl2/tree/CombinedTextNode.java  |  34 -
 .../cif2mcrl2/tree/ElementaryTextNode.java    |  29 -
 .../escet/cif/cif2mcrl2/tree/ProcessNode.java | 146 ----
 .../escet/cif/cif2mcrl2/tree/TextNode.java    |  19 -
 .../cif2mcrl2/tree/VariableProcessNode.java   | 127 ----
 27 files changed, 1 insertion(+), 4142 deletions(-)
 delete mode 100644 cif/org.eclipse.escet.cif.cif2mcrl2/src-test/org/eclipse/escet/cif/cif2mcrl2/tree/InstanceTreeTest.java
 delete mode 100644 cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/AutomatonExtractor.java
 delete mode 100644 cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/Cif2Mcrl2Application.java
 delete mode 100644 cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/Cif2Mcrl2CommandHandler.java
 delete mode 100644 cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/InstanceTreeBuilder.java
 delete mode 100644 cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/InstanceTreeHelper.java
 delete mode 100644 cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/InstanceTreeScanner.java
 delete mode 100644 cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/InstanceTreeVerifier.java
 delete mode 100644 cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/NameMaps.java
 delete mode 100644 cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/options/DebugFileOption.java
 delete mode 100644 cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/options/DefineInstanceTreeOption.java
 delete mode 100644 cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/options/EnableDebugOutputOption.java
 delete mode 100644 cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/options/GenerateValueActionsOption.java
 delete mode 100644 cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/storage/AutomatonData.java
 delete mode 100644 cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/storage/EventVarUsage.java
 delete mode 100644 cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/storage/VarAccess.java
 delete mode 100644 cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/storage/VarUsage.java
 delete mode 100644 cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/storage/VariableData.java
 delete mode 100644 cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/tree/AutomatonProcessNode.java
 delete mode 100644 cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/tree/CombinedProcessNode.java
 delete mode 100644 cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/tree/CombinedTextNode.java
 delete mode 100644 cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/tree/ElementaryTextNode.java
 delete mode 100644 cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/tree/ProcessNode.java
 delete mode 100644 cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/tree/TextNode.java
 delete mode 100644 cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/tree/VariableProcessNode.java

diff --git a/cif/org.eclipse.escet.cif.cif2mcrl2/.classpath b/cif/org.eclipse.escet.cif.cif2mcrl2/.classpath
index aa53673ccf..fe1a205326 100644
--- a/cif/org.eclipse.escet.cif.cif2mcrl2/.classpath
+++ b/cif/org.eclipse.escet.cif.cif2mcrl2/.classpath
@@ -7,10 +7,5 @@
 	</classpathentry>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="src" output="target/test-classes" path="src-test">
-		<attributes>
-			<attribute name="test" value="true"/>
-		</attributes>
-	</classpathentry>
 	<classpathentry kind="output" path="target/classes"/>
 </classpath>
diff --git a/cif/org.eclipse.escet.cif.cif2mcrl2/META-INF/MANIFEST.MF b/cif/org.eclipse.escet.cif.cif2mcrl2/META-INF/MANIFEST.MF
index 3672a29105..33466cf8ab 100644
--- a/cif/org.eclipse.escet.cif.cif2mcrl2/META-INF/MANIFEST.MF
+++ b/cif/org.eclipse.escet.cif.cif2mcrl2/META-INF/MANIFEST.MF
@@ -25,8 +25,5 @@ Require-Bundle: org.eclipse.ui;bundle-version="3.115.0",
 Import-Package: org.junit.jupiter.api;version="5.9.2"
 Bundle-RequiredExecutionEnvironment: JavaSE-17
 Bundle-ActivationPolicy: lazy
-Export-Package: org.eclipse.escet.cif.cif2mcrl2,
- org.eclipse.escet.cif.cif2mcrl2.options,
- org.eclipse.escet.cif.cif2mcrl2.storage,
- org.eclipse.escet.cif.cif2mcrl2.tree
+Export-Package: org.eclipse.escet.cif.cif2mcrl2
 Automatic-Module-Name: org.eclipse.escet.cif.cif2mcrl2
diff --git a/cif/org.eclipse.escet.cif.cif2mcrl2/src-test/org/eclipse/escet/cif/cif2mcrl2/tree/InstanceTreeTest.java b/cif/org.eclipse.escet.cif.cif2mcrl2/src-test/org/eclipse/escet/cif/cif2mcrl2/tree/InstanceTreeTest.java
deleted file mode 100644
index e765addea7..0000000000
--- a/cif/org.eclipse.escet.cif.cif2mcrl2/src-test/org/eclipse/escet/cif/cif2mcrl2/tree/InstanceTreeTest.java
+++ /dev/null
@@ -1,75 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Copyright (c) 2010, 2024 Contributors to the Eclipse Foundation
-//
-// See the NOTICE file(s) distributed with this work for additional
-// information regarding copyright ownership.
-//
-// This program and the accompanying materials are made available
-// under the terms of the MIT License which is available at
-// https://opensource.org/licenses/MIT
-//
-// SPDX-License-Identifier: MIT
-//////////////////////////////////////////////////////////////////////////////
-
-package org.eclipse.escet.cif.cif2mcrl2.tree;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertThrows;
-
-import org.eclipse.escet.cif.cif2mcrl2.InstanceTreeHelper;
-import org.eclipse.escet.common.java.exceptions.InvalidInputException;
-import org.junit.jupiter.api.Test;
-
-/** Tests of the instance tree parser. */
-public class InstanceTreeTest {
-    @Test
-    @SuppressWarnings("javadoc")
-    public void testOk1() {
-        TextNode n = InstanceTreeHelper.parseTreeText("( ( Ph19 fork19) Ph20)");
-        CombinedTextNode cn = (CombinedTextNode)n;
-        assertEquals(2, cn.children.size());
-        ElementaryTextNode en = (ElementaryTextNode)cn.children.get(1);
-        assertEquals("Ph20", en.name);
-
-        cn = (CombinedTextNode)cn.children.get(0);
-        assertEquals(2, cn.children.size());
-        en = (ElementaryTextNode)cn.children.get(0);
-        assertEquals("Ph19", en.name);
-        en = (ElementaryTextNode)cn.children.get(1);
-        assertEquals("fork19", en.name);
-    }
-
-    @Test
-    @SuppressWarnings("javadoc")
-    public void testOk2() {
-        TextNode n = InstanceTreeHelper.parseTreeText("Ph19");
-        ElementaryTextNode en = (ElementaryTextNode)n;
-        assertEquals("Ph19", en.name);
-    }
-
-    @Test
-    @SuppressWarnings("javadoc")
-    public void testOk3() {
-        TextNode n = InstanceTreeHelper.parseTreeText("(Ph19)");
-        ElementaryTextNode en = (ElementaryTextNode)n;
-        assertEquals("Ph19", en.name);
-    }
-
-    @Test
-    @SuppressWarnings("javadoc")
-    public void testFail1() { // No ')' at the end.
-        assertThrows(InvalidInputException.class, () -> InstanceTreeHelper.parseTreeText("(Ph19"));
-    }
-
-    @Test
-    @SuppressWarnings("javadoc")
-    public void testFail2() { // No '(' at the start.
-        assertThrows(InvalidInputException.class, () -> InstanceTreeHelper.parseTreeText("Ph19)"));
-    }
-
-    @Test
-    @SuppressWarnings("javadoc")
-    public void testFail3() { // '()' pair.
-        assertThrows(InvalidInputException.class, () -> InstanceTreeHelper.parseTreeText("Ph19 ()"));
-    }
-}
diff --git a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/AutomatonExtractor.java b/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/AutomatonExtractor.java
deleted file mode 100644
index d3224ec043..0000000000
--- a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/AutomatonExtractor.java
+++ /dev/null
@@ -1,231 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Copyright (c) 2010, 2024 Contributors to the Eclipse Foundation
-//
-// See the NOTICE file(s) distributed with this work for additional
-// information regarding copyright ownership.
-//
-// This program and the accompanying materials are made available
-// under the terms of the MIT License which is available at
-// https://opensource.org/licenses/MIT
-//
-// SPDX-License-Identifier: MIT
-//////////////////////////////////////////////////////////////////////////////
-
-package org.eclipse.escet.cif.cif2mcrl2;
-
-import static org.eclipse.escet.common.java.Lists.list;
-import static org.eclipse.escet.common.java.Maps.map;
-import static org.eclipse.escet.common.java.Sets.set;
-import static org.eclipse.escet.common.java.Sets.setc;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-
-import org.eclipse.escet.cif.cif2mcrl2.options.GenerateValueActionsOption;
-import org.eclipse.escet.cif.cif2mcrl2.storage.AutomatonData;
-import org.eclipse.escet.cif.cif2mcrl2.storage.VariableData;
-import org.eclipse.escet.cif.common.CifEnumLiteral;
-import org.eclipse.escet.cif.common.CifEvalException;
-import org.eclipse.escet.cif.common.CifEvalUtils;
-import org.eclipse.escet.cif.common.CifTypeUtils;
-import org.eclipse.escet.cif.common.CifValueUtils;
-import org.eclipse.escet.cif.metamodel.cif.Component;
-import org.eclipse.escet.cif.metamodel.cif.Group;
-import org.eclipse.escet.cif.metamodel.cif.Specification;
-import org.eclipse.escet.cif.metamodel.cif.automata.Automaton;
-import org.eclipse.escet.cif.metamodel.cif.automata.Location;
-import org.eclipse.escet.cif.metamodel.cif.declarations.Declaration;
-import org.eclipse.escet.cif.metamodel.cif.declarations.DiscVariable;
-import org.eclipse.escet.cif.metamodel.cif.types.BoolType;
-import org.eclipse.escet.cif.metamodel.cif.types.CifType;
-import org.eclipse.escet.cif.metamodel.cif.types.EnumType;
-import org.eclipse.escet.cif.metamodel.cif.types.IntType;
-import org.eclipse.escet.common.java.Assert;
-
-/**
- * Inspector for extracting CIF elements from the specification and collecting them in {@link #varDatas} and
- * {@link #autDatas}.
- */
-public class AutomatonExtractor {
-    /** Found variables in the specification. */
-    private List<VariableData> varDatas = null;
-
-    /** Found automata in the specification. */
-    private List<AutomatonData> autDatas = null;
-
-    /**
-     * Extract the automata and variables from the specification.
-     *
-     * @param spec Specification to search.
-     * @param names Mapping of CIF elements to unique mCRL2 names.
-     */
-    public void findElements(Specification spec, NameMaps names) {
-        varDatas = list();
-        unfoldForVariables(spec, names); // Collect variables from the specification.
-
-        // Set the 'has value action' flag for each variable.
-        Set<String> varNames = setc(varDatas.size());
-        for (VariableData vd: varDatas) {
-            varNames.add(vd.name);
-        }
-        Set<String> valueNames = GenerateValueActionsOption.matchNames(varNames);
-        for (VariableData vd: varDatas) {
-            vd.setValueAction(valueNames.contains(vd.name));
-        }
-
-        // Construct reverse map of the collected variables for adding them to their automaton.
-        Map<DiscVariable, VariableData> variableMap = map();
-        for (VariableData vd: varDatas) {
-            variableMap.put(vd.variable, vd);
-        }
-
-        autDatas = list();
-        unfoldForAutomata(spec, variableMap);
-    }
-
-    /**
-     * Unfold and extract variables from a group.
-     *
-     * @param group Group to search.
-     * @param names Mapping of CIF elements to unique mCRL2 names.
-     */
-    private void unfoldForVariables(Group group, NameMaps names) {
-        for (Component comp: group.getComponents()) {
-            if (comp instanceof Automaton) {
-                Automaton aut = (Automaton)comp;
-                getVariableElements(aut, names);
-                continue;
-            }
-            Assert.check(comp instanceof Group);
-            Group g = (Group)comp;
-            unfoldForVariables(g, names);
-        }
-    }
-
-    /**
-     * Extract the variable elements from the automaton.
-     *
-     * @param aut Automaton to inspect.
-     * @param names Mapping of CIF elements to unique mCRL2 names.
-     */
-    private void getVariableElements(Automaton aut, NameMaps names) {
-        for (Declaration decl: aut.getDeclarations()) {
-            if (decl instanceof DiscVariable) {
-                DiscVariable dv = (DiscVariable)decl;
-                CifType tp = CifTypeUtils.normalizeType(dv.getType());
-                String initialValue = null;
-                try {
-                    Object val = CifEvalUtils.eval(dv.getValue().getValues().get(0), true);
-                    if (tp instanceof BoolType) {
-                        initialValue = ((Boolean)val) ? "true" : "false";
-                    } else if (tp instanceof IntType) {
-                        initialValue = Integer.toString((int)val);
-                    } else if (tp instanceof EnumType) {
-                        initialValue = names.getEnumLitName(((CifEnumLiteral)val).literal);
-                    } else {
-                        throw new RuntimeException("Unexpected type: " + tp);
-                    }
-                } catch (CifEvalException e) {
-                    Assert.fail("Unexpected eval failure");
-                }
-                varDatas.add(new VariableData(dv, initialValue));
-            }
-        }
-    }
-
-    /**
-     * Unfold and extract variables from a group.
-     *
-     * @param group Group to search.
-     * @param variableMap Mapping of variables in the meta model to their representation in the translation.
-     */
-    private void unfoldForAutomata(Group group, Map<DiscVariable, VariableData> variableMap) {
-        for (Component comp: group.getComponents()) {
-            if (comp instanceof Automaton) {
-                Automaton aut = (Automaton)comp;
-                getAutomatonElements(aut, variableMap);
-                continue;
-            }
-            Assert.check(comp instanceof Group);
-            Group g = (Group)comp;
-            unfoldForAutomata(g, variableMap);
-        }
-    }
-
-    /**
-     * Extract elements from the automaton, and add them to the global collections.
-     *
-     * @param aut Automaton to inspect.
-     * @param variableMap Mapping of variables in the meta model to their representation in the translation.
-     */
-    private void getAutomatonElements(Automaton aut, Map<DiscVariable, VariableData> variableMap) {
-        Location initialLocation = null;
-        for (Location loc: aut.getLocations()) {
-            if (!loc.getInitials().isEmpty() && CifValueUtils.isTriviallyTrue(loc.getInitials(), true, true)) {
-                initialLocation = loc;
-                break;
-            }
-        }
-        AutomatonData ad = new AutomatonData(aut, initialLocation);
-        ad.addAutomatonVars(variableMap);
-
-        autDatas.add(ad);
-    }
-
-    /**
-     * Get the found automata of the specification.
-     *
-     * @return Found automata of the specification.
-     */
-    public List<AutomatonData> getAutDatas() {
-        return autDatas;
-    }
-
-    /**
-     * Retrieve how many automata use each variable.
-     *
-     * @return Mapping of each variable to the number of automata that use it.
-     */
-    private Map<VariableData, Integer> getVarCounts() {
-        Map<VariableData, Integer> varCounts = map();
-        for (AutomatonData ad: autDatas) {
-            for (VariableData vd: ad.vars.values()) {
-                Integer c = varCounts.get(vd);
-                varCounts.put(vd, (c == null) ? 1 : c + 1);
-            }
-        }
-        return varCounts;
-    }
-
-    /**
-     * Get the set of variables that are used in exactly one automaton.
-     *
-     * @return The set of variables that are used in exactly one automaton.
-     */
-    public Set<VariableData> getSingleUseVariables() {
-        Set<VariableData> vds = set();
-        for (Entry<VariableData, Integer> entry: getVarCounts().entrySet()) {
-            if (entry.getValue() == 1) {
-                vds.add(entry.getKey());
-            }
-        }
-        return vds;
-    }
-
-    /**
-     * Get the set of variables that are used in more than one automaton.
-     *
-     * @return The set of variables that are used in more than one automaton.
-     */
-    public Set<VariableData> getSharedVariables() {
-        Set<VariableData> vds = set();
-        for (Entry<VariableData, Integer> entry: getVarCounts().entrySet()) {
-            if (entry.getValue() > 1) {
-                vds.add(entry.getKey());
-            }
-        }
-        return vds;
-    }
-}
diff --git a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/Cif2Mcrl2Application.java b/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/Cif2Mcrl2Application.java
deleted file mode 100644
index 63c47713cf..0000000000
--- a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/Cif2Mcrl2Application.java
+++ /dev/null
@@ -1,293 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Copyright (c) 2010, 2024 Contributors to the Eclipse Foundation
-//
-// See the NOTICE file(s) distributed with this work for additional
-// information regarding copyright ownership.
-//
-// This program and the accompanying materials are made available
-// under the terms of the MIT License which is available at
-// https://opensource.org/licenses/MIT
-//
-// SPDX-License-Identifier: MIT
-//////////////////////////////////////////////////////////////////////////////
-
-package org.eclipse.escet.cif.cif2mcrl2;
-
-import static org.eclipse.escet.common.app.framework.output.OutputProvider.warn;
-import static org.eclipse.escet.common.java.Lists.list;
-import static org.eclipse.escet.common.java.Strings.fmt;
-
-import java.util.List;
-import java.util.Set;
-import java.util.stream.Collectors;
-
-import org.eclipse.escet.cif.cif2cif.AddDefaultInitialValues;
-import org.eclipse.escet.cif.cif2cif.ElimAlgVariables;
-import org.eclipse.escet.cif.cif2cif.ElimComponentDefInst;
-import org.eclipse.escet.cif.cif2cif.ElimConsts;
-import org.eclipse.escet.cif.cif2cif.ElimMonitors;
-import org.eclipse.escet.cif.cif2cif.ElimSelf;
-import org.eclipse.escet.cif.cif2cif.RemoveAnnotations;
-import org.eclipse.escet.cif.cif2cif.RemoveIoDecls;
-import org.eclipse.escet.cif.cif2cif.SimplifyValues;
-import org.eclipse.escet.cif.cif2mcrl2.options.DebugFileOption;
-import org.eclipse.escet.cif.cif2mcrl2.options.DefineInstanceTreeOption;
-import org.eclipse.escet.cif.cif2mcrl2.options.EnableDebugOutputOption;
-import org.eclipse.escet.cif.cif2mcrl2.options.GenerateValueActionsOption;
-import org.eclipse.escet.cif.cif2mcrl2.storage.AutomatonData;
-import org.eclipse.escet.cif.cif2mcrl2.storage.VariableData;
-import org.eclipse.escet.cif.cif2mcrl2.tree.ProcessNode;
-import org.eclipse.escet.cif.cif2mcrl2.tree.TextNode;
-import org.eclipse.escet.cif.common.CifCollectUtils;
-import org.eclipse.escet.cif.io.CifReader;
-import org.eclipse.escet.cif.metamodel.cif.Specification;
-import org.eclipse.escet.cif.metamodel.cif.declarations.EnumDecl;
-import org.eclipse.escet.cif.metamodel.cif.declarations.Event;
-import org.eclipse.escet.common.app.framework.Application;
-import org.eclipse.escet.common.app.framework.Paths;
-import org.eclipse.escet.common.app.framework.io.AppStream;
-import org.eclipse.escet.common.app.framework.io.AppStreams;
-import org.eclipse.escet.common.app.framework.io.FileAppStream;
-import org.eclipse.escet.common.app.framework.options.InputFileOption;
-import org.eclipse.escet.common.app.framework.options.Option;
-import org.eclipse.escet.common.app.framework.options.OptionCategory;
-import org.eclipse.escet.common.app.framework.options.Options;
-import org.eclipse.escet.common.app.framework.options.OutputFileOption;
-import org.eclipse.escet.common.app.framework.output.IOutputComponent;
-import org.eclipse.escet.common.app.framework.output.OutputProvider;
-import org.eclipse.escet.common.box.AppStreamCodeBox;
-import org.eclipse.escet.common.box.Box;
-import org.eclipse.escet.common.box.HBox;
-import org.eclipse.escet.common.box.TextBox;
-import org.eclipse.escet.common.box.VBox;
-
-/** Application implementing the CIF to mCRL2 transformation. */
-public class Cif2Mcrl2Application extends Application<IOutputComponent> {
-    /**
-     * Application main method.
-     *
-     * @param args The command-line arguments supplied to the application.
-     */
-    public static void main(String[] args) {
-        Cif2Mcrl2Application cmApp = new Cif2Mcrl2Application();
-        cmApp.run(args, true);
-    }
-
-    /** Constructor for the {@link Cif2Mcrl2Application} class. */
-    public Cif2Mcrl2Application() {
-        // Nothing to do.
-    }
-
-    /**
-     * Constructor of the {@link Cif2Mcrl2Application} class.
-     *
-     * @param streams The streams to use for input, output, warning, and error streams.
-     */
-    public Cif2Mcrl2Application(AppStreams streams) {
-        super(streams);
-    }
-
-    @Override
-    protected OutputProvider<IOutputComponent> getProvider() {
-        return new OutputProvider<>();
-    }
-
-    @Override
-    protected int runInternal() {
-        // Read CIF input.
-        CifReader cifReader = new CifReader().init();
-        Specification spec = cifReader.read();
-        String absSpecPath = Paths.resolve(InputFileOption.getPath());
-        if (isTerminationRequested()) {
-            return 0;
-        }
-
-        // Remove/ignore I/O declarations, to increase the supported subset.
-        RemoveIoDecls removeIoDecls = new RemoveIoDecls();
-        removeIoDecls.transform(spec);
-        if (removeIoDecls.haveAnySvgInputDeclarationsBeenRemoved()) {
-            warn("The specification contains CIF/SVG input declarations. These will be ignored.");
-        }
-
-        // Perform preprocessing on the specification. The most expensive
-        // variant of value simplification is used, to inline (and thus
-        // support) constants, and get the most simple result.
-        new RemoveAnnotations().transform(spec);
-        new ElimComponentDefInst().transform(spec);
-        new ElimSelf().transform(spec);
-        new ElimAlgVariables().transform(spec);
-        new ElimConsts().transform(spec);
-        new ElimMonitors().transform(spec);
-        new SimplifyValues().transform(spec);
-        new AddDefaultInitialValues().transform(spec);
-        if (isTerminationRequested()) {
-            return 0;
-        }
-
-        // Check preconditions.
-        CifToMcrl2PreChecker checker = new CifToMcrl2PreChecker(() -> isTerminationRequested());
-        checker.reportPreconditionViolations(spec, absSpecPath, "CIF to mCRL2 transformation");
-        if (isTerminationRequested()) {
-            return 0;
-        }
-
-        // Collect enumerations.
-        List<EnumDecl> enumDecls = list();
-        CifCollectUtils.collectEnumDecls(spec, enumDecls);
-
-        // Initialize names mapping.
-        NameMaps names = new NameMaps(enumDecls);
-
-        // Extract CIF elements from the specification.
-        AutomatonExtractor ae = new AutomatonExtractor();
-        ae.findElements(spec, names);
-        List<AutomatonData> autDatas = ae.getAutDatas();
-        Set<VariableData> sharedVars = ae.getSharedVariables();
-        Set<VariableData> singleUseVars = ae.getSingleUseVariables();
-        if (isTerminationRequested()) {
-            return 0;
-        }
-
-        // Construct tree with names, verify correctness, and get the local
-        // variables of the specification.
-        Set<VariableData> localVars;
-        ProcessNode procRoot;
-        String text = DefineInstanceTreeOption.getTreeText();
-        if (text.isEmpty()) {
-            localVars = singleUseVars;
-            procRoot = InstanceTreeBuilder.buildDefaultTree(autDatas, sharedVars);
-        } else {
-            TextNode tn = InstanceTreeHelper.parseTreeText(text);
-            localVars = InstanceTreeVerifier.checkAndGetLocals(tn, autDatas, sharedVars, singleUseVars);
-            procRoot = InstanceTreeBuilder.buildProcessTree(tn, autDatas, sharedVars, singleUseVars);
-        }
-        if (isTerminationRequested()) {
-            return 0;
-        }
-
-        // Verify tree shape (var1 || (var2 || ( ... || <behavior-without-vars>))).
-        // Further consequences are in CombinedProcess.addInstantiations
-        InstanceTreeVerifier.checkProcessTreeShape(procRoot);
-        if (isTerminationRequested()) {
-            return 0;
-        }
-
-        // Compute actions.
-        procRoot.deriveActions(localVars);
-        if (isTerminationRequested()) {
-            return 0;
-        }
-
-        // If requested, dump debug information of the instance tree.
-        if (EnableDebugOutputOption.getEnableDebugOutput()) {
-            String path = DebugFileOption.getDerivedPath(".cif", "_dbg.txt");
-            AppStream stream = new FileAppStream(path, Paths.resolve(path));
-            AppStreamCodeBox code = new AppStreamCodeBox(stream, 4);
-            procRoot.dumpActions(code);
-            code.close();
-        }
-        if (isTerminationRequested()) {
-            return 0;
-        }
-
-        // Generate and write output.
-        Box code = generateCode(procRoot, localVars, names);
-        if (isTerminationRequested()) {
-            return 0;
-        }
-
-        String outFile = OutputFileOption.getDerivedPath(".cif", ".mcrl2");
-        code.writeToFile(outFile, Paths.resolve(outFile));
-
-        return 0;
-    }
-
-    /**
-     * Generate mCRL2 code for the processes and instantiation tree.
-     *
-     * @param procRoot Root of the tree.
-     * @param localVars Local variables.
-     * @param names Mapping of CIF elements to unique mCRL2 names.
-     * @return Generated mCRL2 code.
-     */
-    private static Box generateCode(ProcessNode procRoot, Set<VariableData> localVars, NameMaps names) {
-        // Initialize code.
-        VBox code = new VBox();
-
-        // Enumeration sorts.
-        for (EnumDecl enumDecl: names.getRepresentativeEnums()) {
-            String litNames = enumDecl.getLiterals().stream().map(l -> names.getEnumLitName(l))
-                    .collect(Collectors.joining(" | "));
-            code.add(new TextBox(fmt("sort %s = struct %s;", names.getEnumName(enumDecl), litNames)));
-            code.add();
-        }
-
-        // Process definitions, sorts, and actions for the variables.
-        procRoot.addDefinitions(names, localVars, code);
-
-        // Event declarations.
-        HBox hb = new HBox();
-        hb.add("act ");
-        boolean first = true;
-        for (Event evt: procRoot.eventVarUse.keySet()) {
-            if (!first) {
-                hb.add(", ");
-            }
-            first = false;
-            hb.add(fmt("%s, %s", names.getEventName(evt), names.getRenamedEventName(evt)));
-        }
-        hb.add(";");
-        code.add(hb);
-        code.add();
-
-        // Instantiation of the tree.
-        VBox vb = new VBox();
-        procRoot.addInstantiations(names, localVars, vb);
-        code.add(new HBox("init ", vb, ";"));
-
-        // Return the generated code.
-        return code;
-    }
-
-    @Override
-    public String getAppName() {
-        return "CIF to mCRL2 transformer";
-    }
-
-    @Override
-    public String getAppDescription() {
-        return "Convert CIF specification to mCRL2.";
-    }
-
-    /**
-     * Options specific to the CIF to mCRL2 transformer.
-     *
-     * @return Options specific to the CIF to mCRL2 transformer.
-     */
-    private OptionCategory getConvertOptionsCategory() {
-        List<OptionCategory> subPages = list();
-
-        @SuppressWarnings("rawtypes")
-        List<Option> options = list();
-        options.add(Options.getInstance(InputFileOption.class));
-        options.add(Options.getInstance(DefineInstanceTreeOption.class));
-        options.add(Options.getInstance(GenerateValueActionsOption.class));
-        options.add(Options.getInstance(EnableDebugOutputOption.class));
-        options.add(Options.getInstance(DebugFileOption.class));
-        options.add(Options.getInstance(OutputFileOption.class));
-        return new OptionCategory("CIF to mCRL2 options", "Options for converting a CIF specification to mCRL2.",
-                subPages, options);
-    }
-
-    @Override
-    protected OptionCategory getAllOptions() {
-        List<OptionCategory> subPages = list();
-        subPages.add(getGeneralOptionCategory());
-        subPages.add(getConvertOptionsCategory());
-
-        @SuppressWarnings("rawtypes")
-        List<Option> options = list();
-        String optDesc = "All options for the conversion from CIF to mCRL2.";
-        return new OptionCategory("CIF to mCRL2 conversion options", optDesc, subPages, options);
-    }
-}
diff --git a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/Cif2Mcrl2CommandHandler.java b/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/Cif2Mcrl2CommandHandler.java
deleted file mode 100644
index 6f9bb2404e..0000000000
--- a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/Cif2Mcrl2CommandHandler.java
+++ /dev/null
@@ -1,31 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Copyright (c) 2010, 2024 Contributors to the Eclipse Foundation
-//
-// See the NOTICE file(s) distributed with this work for additional
-// information regarding copyright ownership.
-//
-// This program and the accompanying materials are made available
-// under the terms of the MIT License which is available at
-// https://opensource.org/licenses/MIT
-//
-// SPDX-License-Identifier: MIT
-//////////////////////////////////////////////////////////////////////////////
-
-package org.eclipse.escet.cif.cif2mcrl2;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.escet.common.app.framework.Application;
-import org.eclipse.escet.common.eclipse.ui.SingleFileCommandHandler;
-
-/** Handler for Eclipse UI command for CIF to mCRL2 transformation. */
-public class Cif2Mcrl2CommandHandler extends SingleFileCommandHandler {
-    @Override
-    protected String[] getCommandLineArgs(IFile file) {
-        return new String[] {getFileName(file), "--option-dialog=yes"};
-    }
-
-    @Override
-    protected Class<? extends Application<?>> getApplicationClass() {
-        return Cif2Mcrl2Application.class;
-    }
-}
diff --git a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/InstanceTreeBuilder.java b/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/InstanceTreeBuilder.java
deleted file mode 100644
index 09672f5902..0000000000
--- a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/InstanceTreeBuilder.java
+++ /dev/null
@@ -1,145 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Copyright (c) 2010, 2024 Contributors to the Eclipse Foundation
-//
-// See the NOTICE file(s) distributed with this work for additional
-// information regarding copyright ownership.
-//
-// This program and the accompanying materials are made available
-// under the terms of the MIT License which is available at
-// https://opensource.org/licenses/MIT
-//
-// SPDX-License-Identifier: MIT
-//////////////////////////////////////////////////////////////////////////////
-
-package org.eclipse.escet.cif.cif2mcrl2;
-
-import static org.eclipse.escet.common.java.Lists.list;
-import static org.eclipse.escet.common.java.Lists.listc;
-import static org.eclipse.escet.common.java.Maps.map;
-import static org.eclipse.escet.common.java.Strings.fmt;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.escet.cif.cif2mcrl2.storage.AutomatonData;
-import org.eclipse.escet.cif.cif2mcrl2.storage.VariableData;
-import org.eclipse.escet.cif.cif2mcrl2.tree.AutomatonProcessNode;
-import org.eclipse.escet.cif.cif2mcrl2.tree.CombinedProcessNode;
-import org.eclipse.escet.cif.cif2mcrl2.tree.CombinedTextNode;
-import org.eclipse.escet.cif.cif2mcrl2.tree.ElementaryTextNode;
-import org.eclipse.escet.cif.cif2mcrl2.tree.ProcessNode;
-import org.eclipse.escet.cif.cif2mcrl2.tree.TextNode;
-import org.eclipse.escet.cif.cif2mcrl2.tree.VariableProcessNode;
-import org.eclipse.escet.common.java.Assert;
-
-/** Class for building the instance process tree. */
-public class InstanceTreeBuilder {
-    /** Constructor of the {@link InstanceTreeBuilder} class. */
-    private InstanceTreeBuilder() {
-        // Static class.
-    }
-
-    /**
-     * Build the process tree from the text node tree.
-     *
-     * <p>
-     * All checks have already been done in {@link InstanceTreeVerifier#checkAndGetLocals}.
-     * </p>
-     *
-     * @param node Root text node to use.
-     * @param autDatas Automata to use in the tree.
-     * @param sharedVars Shared variables to use in the tree.
-     * @param singleUseVars Variables that may be used in the tree.
-     * @return Constructed process tree.
-     */
-    public static ProcessNode buildProcessTree(TextNode node, List<AutomatonData> autDatas,
-            Set<VariableData> sharedVars, Set<VariableData> singleUseVars)
-    {
-        // Build name maps for faster conversion.
-        Map<String, AutomatonData> autNames = map();
-        for (AutomatonData autData: autDatas) {
-            autNames.put(autData.name, autData);
-        }
-
-        Map<String, VariableData> varNames = map();
-        for (VariableData dv: sharedVars) {
-            varNames.put(dv.name, dv);
-        }
-        for (VariableData dv: singleUseVars) {
-            varNames.put(dv.name, dv);
-        }
-
-        return buildProcessNode("1", node, autNames, varNames);
-    }
-
-    /**
-     * Convert the provided text node to a node in the process tree.
-     *
-     * @param name Name of the node (hierarchical name).
-     * @param node Node to convert.
-     * @param autNames Available automata.
-     * @param varNames Available variables.
-     * @return The converted node.
-     */
-    private static ProcessNode buildProcessNode(String name, TextNode node, Map<String, AutomatonData> autNames,
-            Map<String, VariableData> varNames)
-    {
-        if (node instanceof ElementaryTextNode) {
-            ElementaryTextNode etn = (ElementaryTextNode)node;
-            AutomatonData autData = autNames.get(etn.name);
-            if (autData != null) {
-                return new AutomatonProcessNode(name, autData);
-            }
-            return new VariableProcessNode(name, varNames.get(etn.name));
-        }
-        Assert.check(node instanceof CombinedTextNode);
-        CombinedTextNode ctn = (CombinedTextNode)node;
-        List<ProcessNode> processes = listc(ctn.children.size());
-        int i = 1;
-        for (TextNode n: ctn.children) {
-            String childName = fmt("%s.%d", name, i);
-            processes.add(buildProcessNode(childName, n, autNames, varNames));
-            i++;
-        }
-        return new CombinedProcessNode(name, processes);
-    }
-
-    /**
-     * Build the default process node tree. Behavior processes at the bottom, and variable processes at the top.
-     *
-     * @param autDatas Collection automata to add.
-     * @param sharedVars Collection variables to add.
-     * @return Constructed process tree.
-     */
-    public static ProcessNode buildDefaultTree(List<AutomatonData> autDatas, Set<VariableData> sharedVars) {
-        String name = "1";
-        for (int i = 1; i < autDatas.size() + sharedVars.size(); i++) {
-            name += ".1";
-        }
-        ProcessNode root = null;
-        for (AutomatonData ad: autDatas) {
-            if (root == null) {
-                root = new AutomatonProcessNode(name, ad);
-            } else {
-                ProcessNode node = new AutomatonProcessNode(name + ".2", ad);
-                root = new CombinedProcessNode(name, list(root, node));
-            }
-            if (name.length() > 1) {
-                name = name.substring(0, name.length() - 2);
-            }
-        }
-        for (VariableData dv: sharedVars) {
-            if (root == null) {
-                root = new VariableProcessNode(name, dv);
-            } else {
-                ProcessNode node = new VariableProcessNode(name + ".2", dv);
-                root = new CombinedProcessNode(name, list(root, node));
-            }
-            if (name.length() > 1) {
-                name = name.substring(0, name.length() - 2);
-            }
-        }
-        return root;
-    }
-}
diff --git a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/InstanceTreeHelper.java b/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/InstanceTreeHelper.java
deleted file mode 100644
index 6b43fbcd5e..0000000000
--- a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/InstanceTreeHelper.java
+++ /dev/null
@@ -1,108 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Copyright (c) 2010, 2024 Contributors to the Eclipse Foundation
-//
-// See the NOTICE file(s) distributed with this work for additional
-// information regarding copyright ownership.
-//
-// This program and the accompanying materials are made available
-// under the terms of the MIT License which is available at
-// https://opensource.org/licenses/MIT
-//
-// SPDX-License-Identifier: MIT
-//////////////////////////////////////////////////////////////////////////////
-
-package org.eclipse.escet.cif.cif2mcrl2;
-
-import static org.eclipse.escet.common.java.Lists.list;
-
-import java.util.List;
-
-import org.eclipse.escet.cif.cif2mcrl2.tree.CombinedTextNode;
-import org.eclipse.escet.cif.cif2mcrl2.tree.ElementaryTextNode;
-import org.eclipse.escet.cif.cif2mcrl2.tree.TextNode;
-import org.eclipse.escet.common.java.Assert;
-import org.eclipse.escet.common.java.exceptions.InvalidInputException;
-
-/** Helper class for interpreting the instance tree provided by the user. */
-public class InstanceTreeHelper {
-    /** Constructor of the {@link InstanceTreeHelper} class. */
-    private InstanceTreeHelper() {
-        // Static class.
-    }
-
-    /**
-     * Parse the instance tree text string, getting a tree of nodes to combine.
-     *
-     * @param text Text to parse.
-     * @return Tree of nodes to instantiate.
-     */
-    public static TextNode parseTreeText(String text) {
-        InstanceTreeScanner scanner = new InstanceTreeScanner(text);
-        return parseTreeText(scanner, true);
-    }
-
-    /**
-     * Parse the instance tree text string, getting a tree of nodes to combine.
-     *
-     * @param scanner Scanner of the instance tree text.
-     * @param outer If set, the call parses at the outermost level (and expects EOF at the end). If unset, it is a parse
-     *     at an inner level (expecting an open at the start and a close parenthesis at the end).
-     * @return The parse result.
-     */
-    private static TextNode parseTreeText(InstanceTreeScanner scanner, boolean outer) {
-        if (!outer) { // At an inner level, check for the open parenthesis.
-            Assert.check(scanner.peekParOpen());
-            scanner.scanNext();
-        }
-
-        // Collect nodes (elementary as well as combined).
-        List<TextNode> nodes = list();
-        while (true) {
-            if (scanner.peekParOpen()) {
-                nodes.add(parseTreeText(scanner, false));
-                continue;
-            }
-
-            String name = scanner.peekName();
-            if (name != null) {
-                nodes.add(new ElementaryTextNode(name));
-                scanner.scanNext();
-                continue;
-            }
-
-            break;
-        }
-
-        TextNode n;
-        switch (nodes.size()) {
-            case 0:
-                String msg = "Missing node name in the instance tree option text.";
-                throw new InvalidInputException(msg);
-            case 1:
-                n = nodes.get(0);
-                break;
-            default:
-                n = new CombinedTextNode(nodes);
-                break;
-        }
-
-        if (outer) {
-            if (scanner.peekEOF()) {
-                return n;
-            }
-
-            Assert.check(scanner.peekParClose());
-            String msg = "Unexpected ')' at top-level in the instance tree option text.";
-            throw new InvalidInputException(msg);
-        } else {
-            if (scanner.peekParClose()) {
-                scanner.scanNext();
-                return n;
-            }
-
-            Assert.check(scanner.peekEOF());
-            String msg = "Missing ')' in the instance tree option text.";
-            throw new InvalidInputException(msg);
-        }
-    }
-}
diff --git a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/InstanceTreeScanner.java b/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/InstanceTreeScanner.java
deleted file mode 100644
index 5b68f922f1..0000000000
--- a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/InstanceTreeScanner.java
+++ /dev/null
@@ -1,128 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Copyright (c) 2010, 2024 Contributors to the Eclipse Foundation
-//
-// See the NOTICE file(s) distributed with this work for additional
-// information regarding copyright ownership.
-//
-// This program and the accompanying materials are made available
-// under the terms of the MIT License which is available at
-// https://opensource.org/licenses/MIT
-//
-// SPDX-License-Identifier: MIT
-//////////////////////////////////////////////////////////////////////////////
-
-package org.eclipse.escet.cif.cif2mcrl2;
-
-/** Scanner of the instance tree text. */
-public class InstanceTreeScanner {
-    /** Index in {@link #text} pointing to the first unscanned character. */
-    private int index = 0;
-
-    /** Text to scan. */
-    private final String text;
-
-    /**
-     * Next token to return.
-     *
-     * <p>
-     * <ul>
-     * <li>{@code null} means EOF,</li>
-     * <li>{@code "("} means parenthesis-open,</li>
-     * <li>{@code ")"} means parenthesis-close,</li>
-     * <li>otherwise, it is an identifier.</li>
-     * </ul>
-     * </p>
-     */
-    private String token;
-
-    /**
-     * Constructor of the {@link InstanceTreeScanner} class.
-     *
-     * @param text Text to scan.
-     */
-    public InstanceTreeScanner(String text) {
-        this.text = text;
-        scanNext(); // Initialize #token.
-    }
-
-    /** Get the next token. */
-    public void scanNext() {
-        // Skip any white space.
-        while (index < text.length()) {
-            char k = text.charAt(index);
-            if (k == ' ' || k == ',' || k == '\t' || k == '\n' || k == '\r') {
-                index++;
-            } else {
-                break;
-            }
-        }
-
-        if (index == text.length()) { // EOF detected.
-            token = null;
-            return;
-        }
-
-        char k = text.charAt(index);
-        if (k == '(') { // Parenthesis-open detected.
-            token = "(";
-            index++;
-            return;
-        }
-
-        if (k == ')') { // Parenthesis-close detected.
-            token = ")";
-            index++;
-            return;
-        }
-
-        // It's a name.
-        int j = index++;
-        while (index < text.length()) {
-            k = text.charAt(index);
-            if (k == ' ' || k == ',' || k == '\t' || k == '\n' || k == '\r' || k == '(' || k == ')') {
-                break;
-            }
-            index++;
-        }
-        token = text.substring(j, index);
-    }
-
-    /**
-     * Peek whether the next token is an EOF.
-     *
-     * @return Whether the next token is an EOF.
-     */
-    public boolean peekEOF() {
-        return token == null;
-    }
-
-    /**
-     * Peek whether the next token is a '(' token.
-     *
-     * @return Whether the next token is an open parenthesis token.
-     */
-    public boolean peekParOpen() {
-        return !peekEOF() && token.equals("(");
-    }
-
-    /**
-     * Peek whether the next token is a ')' token.
-     *
-     * @return Whether the next token is a close parenthesis token.
-     */
-    public boolean peekParClose() {
-        return !peekEOF() && token.equals(")");
-    }
-
-    /**
-     * Peek the next name if available.
-     *
-     * @return The name token that is next in the stream, or {@code null} if another token comes first.
-     */
-    public String peekName() {
-        if (peekEOF() || peekParOpen() || peekParClose()) {
-            return null;
-        }
-        return token;
-    }
-}
diff --git a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/InstanceTreeVerifier.java b/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/InstanceTreeVerifier.java
deleted file mode 100644
index ed1421eaf4..0000000000
--- a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/InstanceTreeVerifier.java
+++ /dev/null
@@ -1,228 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Copyright (c) 2010, 2024 Contributors to the Eclipse Foundation
-//
-// See the NOTICE file(s) distributed with this work for additional
-// information regarding copyright ownership.
-//
-// This program and the accompanying materials are made available
-// under the terms of the MIT License which is available at
-// https://opensource.org/licenses/MIT
-//
-// SPDX-License-Identifier: MIT
-//////////////////////////////////////////////////////////////////////////////
-
-package org.eclipse.escet.cif.cif2mcrl2;
-
-import static org.eclipse.escet.common.app.framework.output.OutputProvider.out;
-import static org.eclipse.escet.common.java.Lists.list;
-import static org.eclipse.escet.common.java.Maps.map;
-import static org.eclipse.escet.common.java.Sets.set;
-import static org.eclipse.escet.common.java.Strings.fmt;
-
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.escet.cif.cif2mcrl2.storage.AutomatonData;
-import org.eclipse.escet.cif.cif2mcrl2.storage.VariableData;
-import org.eclipse.escet.cif.cif2mcrl2.tree.AutomatonProcessNode;
-import org.eclipse.escet.cif.cif2mcrl2.tree.CombinedProcessNode;
-import org.eclipse.escet.cif.cif2mcrl2.tree.CombinedTextNode;
-import org.eclipse.escet.cif.cif2mcrl2.tree.ElementaryTextNode;
-import org.eclipse.escet.cif.cif2mcrl2.tree.ProcessNode;
-import org.eclipse.escet.cif.cif2mcrl2.tree.TextNode;
-import org.eclipse.escet.cif.cif2mcrl2.tree.VariableProcessNode;
-import org.eclipse.escet.common.java.Assert;
-import org.eclipse.escet.common.java.Strings;
-import org.eclipse.escet.common.java.exceptions.UnsupportedException;
-
-/** Verify whether the instance tree is correct. */
-public class InstanceTreeVerifier {
-    /** Constructor of the {@link InstanceTreeVerifier} class. */
-    private InstanceTreeVerifier() {
-        // Static class.
-    }
-
-    /**
-     * Check the tree of instance names on correctness. Also get the variables to treat as local variables.
-     *
-     * @param root Root text node.
-     * @param autDatas Automata that should be used in the tree.
-     * @param sharedVars Shared variables that should be used in the tree.
-     * @param singleUseVars Variables that are used in one automaton only.
-     * @return Variables local to a mCRL2 behavior processes.
-     */
-    public static Set<VariableData> checkAndGetLocals(TextNode root, List<AutomatonData> autDatas,
-            Set<VariableData> sharedVars, Set<VariableData> singleUseVars)
-    {
-        // Prepare a usage map of all names.
-        Map<String, Boolean> useMap = map();
-        for (AutomatonData autData: autDatas) {
-            useMap.put(autData.name, false);
-        }
-        for (VariableData dv: sharedVars) {
-            useMap.put(dv.name, false);
-        }
-        for (VariableData dv: singleUseVars) {
-            useMap.put(dv.name, false);
-        }
-        Assert.check(useMap.size() == autDatas.size() + sharedVars.size() + singleUseVars.size());
-
-        // Check the tree for usage of the names.
-        List<String> problems = checkNode(root, useMap);
-
-        // Verify that required names are indeed used.
-        for (AutomatonData autData: autDatas) {
-            if (!useMap.get(autData.name)) {
-                String msg = fmt("Automaton \"%s\" is missing in the instance tree text.", autData.name);
-                problems.add(msg);
-            }
-        }
-        for (VariableData dv: sharedVars) {
-            if (!useMap.get(dv.name)) {
-                String msg = fmt("Discrete variable \"%s\" is missing in the instance tree text.", dv.name);
-                problems.add(msg);
-            }
-        }
-
-        // Report fatal problems, if any exist.
-        if (!problems.isEmpty()) {
-            Collections.sort(problems, Strings.SORTER);
-            String msg = "CIF to mCRL2 transformation failed due to missing automata or discrete variables:\n - "
-                    + String.join("\n - ", problems);
-            throw new UnsupportedException(msg);
-        }
-
-        // Inform about used local variables, and construct the remaining local
-        // variables.
-        Set<VariableData> localVars = set();
-        for (VariableData dv: singleUseVars) {
-            if (useMap.get(dv.name)) {
-                out(fmt("INFO: Discrete variable \"%s\" is instantiated as variable process, but could be a local "
-                        + "variable of an automaton process instead.", dv.name));
-            } else {
-                localVars.add(dv);
-            }
-        }
-        return localVars;
-    }
-
-    /**
-     * Check usage of names in the sub-tree.
-     *
-     * @param node Sub-tree to inspect.
-     * @param useMap Available names mapped to usage information.
-     * @return Problems found in the sub-tree.
-     */
-    private static List<String> checkNode(TextNode node, Map<String, Boolean> useMap) {
-        if (node instanceof ElementaryTextNode) {
-            ElementaryTextNode etn = (ElementaryTextNode)node;
-            Boolean used = useMap.get(etn.name);
-            if (used == null) {
-                return list(fmt("Name \"%s\" used in the instance tree text is not an absolute name of an automaton "
-                        + "or discrete variable.", etn.name));
-            }
-            if (used) {
-                return list(fmt("Name \"%s\" is included multiple times in the instance tree option text.", etn.name));
-            }
-            useMap.put(etn.name, true);
-            return list();
-        }
-        Assert.check(node instanceof CombinedTextNode);
-        CombinedTextNode ctn = (CombinedTextNode)node;
-        List<String> problems = list();
-        for (TextNode n: ctn.children) {
-            problems.addAll(checkNode(n, useMap));
-        }
-        return problems;
-    }
-
-    /**
-     * Check the shape of the process tree, bottom nodes should contain parallel compositions of automata, to the top a
-     * chain with a single variable process at each level.
-     *
-     * @param root Root of the tree to check
-     */
-    public static void checkProcessTreeShape(ProcessNode root) {
-        if (root instanceof AutomatonProcessNode) {
-            return; // Tree is a single automaton -> ok.
-        }
-        if (root instanceof VariableProcessNode) {
-            return; // Tree is a single variable -> ok.
-        }
-
-        Assert.check(root instanceof CombinedProcessNode);
-        checkProcessTreeShape((CombinedProcessNode)root, false);
-    }
-
-    /**
-     * Check the shape of the process tree, bottom nodes should contain parallel compositions of automata, to the top a
-     * chain with a single variable process at each level.
-     *
-     * <p>
-     * The general shape of the tree should be <em>"{@code [var-node] || [remainder]}"</em> or
-     * <em>"{@code [remainder] || [var-node]}"</em> where {@code [remainder]} is then again one of the previous forms,
-     * or an arbitrary collection of parallel executing automata without {@code [var-node]}s.
-     * </p>
-     *
-     * @param root Root of the (sub)tree to check.
-     * @param seenBehaviour Whether anything else than a parallel composition with a single variable has been
-     *     encountered while recursing down.
-     */
-    private static void checkProcessTreeShape(CombinedProcessNode root, boolean seenBehaviour) {
-        if (!seenBehaviour && root.children.size() == 2) {
-            // At the "top of the tree" part, one child should be a variable node, the
-            // second child should be a combined node, or an automaton node.
-
-            // Assign the nodes, trying to make 'ch1' a variable.
-            ProcessNode ch1 = root.children.get(0);
-            ProcessNode ch2 = root.children.get(1);
-            if (!(ch1 instanceof VariableProcessNode)) {
-                // Fist assignment did not work, swapping them is the only remaining option.
-                ch1 = root.children.get(1);
-                ch2 = root.children.get(0);
-            }
-
-            if (ch1 instanceof VariableProcessNode) {
-                if (ch2 instanceof VariableProcessNode) {
-                    // ch1 == variable, ch2 == variable
-                    String msg = "Unsupported tree shape. Instance tree has no behavior, please add one or more "
-                            + "processes.";
-                    throw new UnsupportedException(msg);
-                } else if (ch2 instanceof AutomatonProcessNode) {
-                    // ch1 == variable, ch2 == behavior
-                    return; // Variable and an automaton -> ok
-                } else {
-                    // ch1 == variable, ch2 == parallel composition
-                    Assert.check(ch2 instanceof CombinedProcessNode);
-                    checkProcessTreeShape((CombinedProcessNode)ch2, false);
-                    return;
-                }
-            } // else there does not seem to be a variable here, drop into the behavior part.
-        } // else seenBehavior holds or > 2 children, drop into behavior part.
-
-        // At the 'bottom-part' of the tree, should only encounter parallel composition or
-        // behavior process nodes.
-
-        // Check for no variables here.
-        for (ProcessNode pn: root.children) {
-            if (pn instanceof VariableProcessNode) {
-                VariableProcessNode vpn = (VariableProcessNode)pn;
-                String msg = fmt("Unsupported tree shape: Variable \"%s\" should be above all automata in the instance "
-                        + "tree and be the only direct child in the parallel composition.", vpn.name);
-                throw new UnsupportedException(msg);
-            }
-        }
-
-        // Recurse down over combined process nodes.
-        for (ProcessNode pn: root.children) {
-            if (pn instanceof CombinedProcessNode) {
-                checkProcessTreeShape((CombinedProcessNode)pn, true);
-            } else {
-                Assert.check(pn instanceof AutomatonProcessNode);
-            }
-        }
-        return;
-    }
-}
diff --git a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/NameMaps.java b/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/NameMaps.java
deleted file mode 100644
index dba97fd6e2..0000000000
--- a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/NameMaps.java
+++ /dev/null
@@ -1,506 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Copyright (c) 2010, 2024 Contributors to the Eclipse Foundation
-//
-// See the NOTICE file(s) distributed with this work for additional
-// information regarding copyright ownership.
-//
-// This program and the accompanying materials are made available
-// under the terms of the MIT License which is available at
-// https://opensource.org/licenses/MIT
-//
-// SPDX-License-Identifier: MIT
-//////////////////////////////////////////////////////////////////////////////
-
-package org.eclipse.escet.cif.cif2mcrl2;
-
-import static org.eclipse.escet.common.java.Lists.set2list;
-import static org.eclipse.escet.common.java.Maps.map;
-import static org.eclipse.escet.common.java.Sets.set;
-
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.escet.cif.common.CifEnumUtils;
-import org.eclipse.escet.cif.common.CifTypeUtils;
-import org.eclipse.escet.cif.metamodel.cif.automata.Automaton;
-import org.eclipse.escet.cif.metamodel.cif.automata.Location;
-import org.eclipse.escet.cif.metamodel.cif.declarations.DiscVariable;
-import org.eclipse.escet.cif.metamodel.cif.declarations.EnumDecl;
-import org.eclipse.escet.cif.metamodel.cif.declarations.EnumLiteral;
-import org.eclipse.escet.cif.metamodel.cif.declarations.Event;
-import org.eclipse.escet.cif.metamodel.cif.types.BoolType;
-import org.eclipse.escet.cif.metamodel.cif.types.CifType;
-import org.eclipse.escet.cif.metamodel.cif.types.EnumType;
-import org.eclipse.escet.cif.metamodel.cif.types.IntType;
-
-/** Mappings of elements (variables, automata, and events) to names in mCRL2. */
-public class NameMaps {
-    /** Collection of handed out names, used for duplicate checking. */
-    private Set<String> names;
-
-    /** Set of words reserved by mCRL2. See also http://www.mcrl2.org/release/user_manual/language_reference/lex.html */
-    private static final String[] RESERVED = {"act", "allow", "block", "comm", "cons", "delay", "div", "end", "eqn",
-            "exists", "forall", "glob", "hide", "if", "in", "init", "lambda", "map", "mod", "mu", "nu", "pbes", "proc",
-            "rename", "sort", "struct", "sum", "val", "var", "whr", "yaled", "Bag", "Bool", "Int", "List", "Nat", "Pos",
-            "Real", "Set", "delta", "false", "nil", "tau", "true"};
-
-    /**
-     * Constructor of the {@link NameMaps} class.
-     *
-     * @param enumDecls The enumeration declarations of the CIF specification.
-     */
-    public NameMaps(List<EnumDecl> enumDecls) {
-        names = set();
-        for (String r: RESERVED) {
-            names.add(r);
-        }
-
-        this.enumRepresentatives = CifEnumUtils.getEnumDeclReprs(enumDecls);
-    }
-
-    //
-    // Overall collection of names.
-    //
-
-    /**
-     * Test whether the given name is unique for all prefixes.
-     *
-     * @param name Name to test.
-     * @param prefixes Prefixes that should all lead to a unique name.
-     * @return Whether the name leads to unique prefixed names for all prefixes.
-     */
-    private boolean testNames(String name, String[] prefixes) {
-        for (String prefix: prefixes) {
-            if (names.contains(prefix + name)) {
-                return false;
-            }
-        }
-        return true;
-    }
-
-    /**
-     * Add all prefixed names.
-     *
-     * @param name Base name.
-     * @param prefixes Collection of prefixes for the base name.
-     */
-    private void addNames(String name, String[] prefixes) {
-        for (String prefix: prefixes) {
-            names.add(prefix + name);
-        }
-    }
-
-    /**
-     * Add a set of unique names derived from a suggested base name.
-     *
-     * @param baseName Suggested basename to use.
-     * @param prefixes Prefixes that should all lead to a unique name.
-     * @return Basename that leads to unique names for all prefixes.
-     */
-    private String makeName(String baseName, String[] prefixes) {
-        if (testNames(baseName, prefixes)) {
-            addNames(baseName, prefixes);
-            return baseName;
-        }
-        int i = 2;
-        while (true) {
-            String name = baseName + String.valueOf(i);
-            if (testNames(name, prefixes)) {
-                addNames(name, prefixes);
-                return name;
-            }
-            i++;
-        }
-    }
-
-    //
-    // Behavior process names.
-    //
-
-    /** Prefix of behavior process. */
-    private static final String AUT_EFSM = "BehProc_";
-
-    /** Prefix of the location sort of behavior processes. */
-    private static final String AUT_LOCSORT = "LocSort_";
-
-    /** Prefix of the location variable of a behavior processes. */
-    private static final String AUT_LOCVAR = "Locvar_";
-
-    /** Prefix of the location names of behavior processes. */
-    private static final String AUT_LOCATION = "loc_";
-
-    /** All prefixes in use for behavior processes. */
-    private static final String[] AUT_PREFIXES = {AUT_EFSM, AUT_LOCSORT, AUT_LOCVAR, AUT_LOCATION};
-
-    /** Mapping of behavior processes to their unique names. */
-    private Map<Automaton, String> automatonMap = map();
-
-    /**
-     * Get the base name of a behavior process.
-     *
-     * @param aut Automaton to name.
-     * @return Basename (without prefix) of the given process.
-     */
-    private String getAutomaton(Automaton aut) {
-        String name = automatonMap.get(aut);
-        if (name != null) {
-            return name;
-        }
-        name = makeName(aut.getName(), AUT_PREFIXES);
-        automatonMap.put(aut, name);
-        return name;
-    }
-
-    /**
-     * Get the mCRL2 name of a behavior process.
-     *
-     * @param behavior Automaton to name.
-     * @return Name of the behavior process.
-     */
-    public String getBehaviorProcess(Automaton behavior) {
-        return AUT_EFSM + getAutomaton(behavior);
-    }
-
-    /**
-     * Get the mCRL2 sort name of locations of a behavior process.
-     *
-     * @param behavior Automaton to name.
-     * @return Name of the location sort of a behavior process.
-     */
-    public String getLocationSortName(Automaton behavior) {
-        return AUT_LOCSORT + getAutomaton(behavior);
-    }
-
-    /**
-     * Get the mCRL2 name of the location variable of a behavior process.
-     *
-     * @param behavior Automaton to name.
-     * @return Name of the location variable of a behavior process.
-     */
-    public String getLocationVariableName(Automaton behavior) {
-        return AUT_LOCVAR + getAutomaton(behavior);
-    }
-
-    /**
-     * Get the mCRL2 name for a location in an process.
-     *
-     * @param loc Location to name.
-     * @param aut Automaton containing the location.
-     * @return Name of the location.
-     */
-    public String getLocationName(Location loc, Automaton aut) {
-        String prefix = AUT_LOCATION + getAutomaton(aut);
-        if (loc.getName() == null) {
-            return prefix;
-        }
-        return prefix + "_" + loc.getName();
-    }
-
-    //
-    // Variable processes.
-    //
-
-    /** Prefix of the variable process. */
-    private static final String VAR_EFSM = "VarProc_";
-
-    /** Prefix of the behavior process read action of the variable. */
-    private static final String VAR_AREAD = "aread_";
-
-    /** Prefix of the behavior process write action of the variable. */
-    private static final String VAR_AWRITE = "awrite_";
-
-    /** Prefix of the variable process read action of the variable. */
-    private static final String VAR_VREAD = "vread_";
-
-    /** Prefix of the variable process write action of the variable. */
-    private static final String VAR_VWRITE = "vwrite_";
-
-    /** Prefix of the sync action between write action of the variable and the process(es). */
-    private static final String VAR_SYNC = "sync_";
-
-    /** Prefix of the variable get-value action. */
-    private static final String VAR_VALUE = "value_";
-
-    /** Prefix of the variable name. */
-    private static final String VAR_NAME = "";
-
-    /** All prefixes in use with a variable. */
-    private static final String[] VAR_PREFIXES = {VAR_EFSM, VAR_NAME, VAR_SYNC, VAR_VALUE, VAR_AREAD, VAR_AWRITE,
-            VAR_VREAD, VAR_VWRITE};
-
-    /** Mapping of variables to their unique names. */
-    private Map<DiscVariable, String> variableMap = map();
-
-    /**
-     * Get the base name of a variable.
-     *
-     * @param var Variable to name.
-     * @return Basename (without prefix) of the given variable.
-     */
-    private String getVariable(DiscVariable var) {
-        String name = variableMap.get(var);
-        if (name != null) {
-            return name;
-        }
-        name = makeName(var.getName(), VAR_PREFIXES);
-        variableMap.put(var, name);
-        return name;
-    }
-
-    /**
-     * Get the mCRL2 name of the variable.
-     *
-     * @param var Variable to name.
-     * @return Name of the variable.
-     */
-    public String getVariableName(DiscVariable var) {
-        return VAR_NAME + getVariable(var);
-    }
-
-    /**
-     * Get the mCRL2 action name for reading the given variable by a behavior process.
-     *
-     * @param var Variable to read.
-     * @return Action name to use for reading the variable.
-     */
-    public String getBehRead(DiscVariable var) {
-        return VAR_AREAD + getVariable(var);
-    }
-
-    /**
-     * Get the mCRL2 action name for writing the given variable by a behavior process.
-     *
-     * @param var Variable to write.
-     * @return Action name to use for writing the variable.
-     */
-    public String getBehWrite(DiscVariable var) {
-        return VAR_AWRITE + getVariable(var);
-    }
-
-    /**
-     * Get the mCRL2 action name for reading the given variable by a variable process.
-     *
-     * @param var Variable to read.
-     * @return Action name to use for reading the variable.
-     */
-    public String getVarRead(DiscVariable var) {
-        return VAR_VREAD + getVariable(var);
-    }
-
-    /**
-     * Get the mCRL2 action name for writing the given variable by a variable process.
-     *
-     * @param var Variable to write.
-     * @return Action name to use for writing the variable.
-     */
-    public String getVarWrite(DiscVariable var) {
-        return VAR_VWRITE + getVariable(var);
-    }
-
-    /**
-     * Get the mCRL2 action name for synchronized write between the variable process and the behavior process(es).
-     *
-     * @param var Variable to write.
-     * @return Action name to use for writing the variable.
-     */
-    public String getVarSync(DiscVariable var) {
-        return VAR_SYNC + getVariable(var);
-    }
-
-    /**
-     * Get the mCRL2 name of a variable process.
-     *
-     * @param var Variable to convert to process name.
-     * @return Name of the variable process.
-     */
-    public String getVariableProcess(DiscVariable var) {
-        return VAR_EFSM + getVariable(var);
-    }
-
-    /**
-     * Get the mCRL2 name of a variable get-value action.
-     *
-     * @param var Variable to convert to process name.
-     * @return Name of the variable get-value action.
-     */
-    public String getVariableValue(DiscVariable var) {
-        return VAR_VALUE + getVariable(var);
-    }
-
-    //
-    // Event names.
-    //
-
-    /** Prefix of an action denoting an event. */
-    private static final String EVT_NAME = "";
-
-    /** Prefix of an action denoting a renamed event. */
-    private static final String EVT_RENAMED = "renamed_";
-
-    /** All prefixes of events. */
-    private static final String[] EVT_PREFIXES = {EVT_NAME, EVT_RENAMED};
-
-    /** Mapping of events to their unique names. */
-    private Map<Event, String> eventMap = map();
-
-    /**
-     * Get the base name of an event.
-     *
-     * @param evt Event to name.
-     * @return Basename (without prefix) of the given event.
-     */
-    private String getEvent(Event evt) {
-        String name = eventMap.get(evt);
-        if (name != null) {
-            return name;
-        }
-        name = makeName(evt.getName(), EVT_PREFIXES);
-        eventMap.put(evt, name);
-        return name;
-    }
-
-    /**
-     * Get the mCRL2 name of an event.
-     *
-     * @param evt Event to get name of.
-     * @return Name of the provided event.
-     */
-    public String getEventName(Event evt) {
-        return EVT_NAME + getEvent(evt);
-    }
-
-    /**
-     * Get the mCRL2 name of a renamed event.
-     *
-     * @param evt Event to get name of.
-     * @return Name of the provided event when renamed.
-     */
-    public String getRenamedEventName(Event evt) {
-        return EVT_RENAMED + getEvent(evt);
-    }
-
-    //
-    // Enumeration and literal names.
-    //
-
-    /** Prefix of the names of enumeration sorts. */
-    private static final String ENUM_NAME = "enum_";
-
-    /** All prefixes in use for enumeration sorts. */
-    private static final String[] ENUM_PREFIXES = {ENUM_NAME};
-
-    /** Mapping from enumerations to their representatives. */
-    private final Map<EnumDecl, EnumDecl> enumRepresentatives;
-
-    /** Mapping of representative enumerations to their unique names. */
-    private Map<EnumDecl, String> enumsMap = map();
-
-    /** Prefix of the names of enumeration literal constructors. */
-    private static final String ENUM_LIT_NAME = "enumlit_";
-
-    /** All prefixes in use for enumeration literal constructors. */
-    private static final String[] ENUM_LIT_PREFIXES = {ENUM_LIT_NAME};
-
-    /** Mapping of representative enumeration literals to their unique names. */
-    private Map<EnumLiteral, String> enumLitsMap = map();
-
-    /**
-     * Get the representative enumerations.
-     *
-     * @return The representative enumerations.
-     */
-    public Collection<EnumDecl> getRepresentativeEnums() {
-        Set<EnumDecl> representatives = set();
-        representatives.addAll(enumRepresentatives.values());
-        return set2list(representatives);
-    }
-
-    /**
-     * Get the base name of an enumeration.
-     *
-     * @param enumDecl Enumeration to name.
-     * @return Basename (without prefix) of the given enumeration.
-     */
-    private String getEnum(EnumDecl enumDecl) {
-        // Get representative enum.
-        EnumDecl enumRepr = enumRepresentatives.get(enumDecl);
-
-        // Get enum name.
-        String name = enumsMap.get(enumRepr);
-        if (name != null) {
-            return name;
-        }
-        name = makeName(enumRepr.getName(), ENUM_PREFIXES);
-        enumsMap.put(enumRepr, name);
-        return name;
-    }
-
-    /**
-     * Get the mCRL2 name of an enumeration.
-     *
-     * @param enumDecl Enumeration to get name of.
-     * @return Name of the provided enumeration.
-     */
-    public String getEnumName(EnumDecl enumDecl) {
-        return ENUM_NAME + getEnum(enumDecl);
-    }
-
-    /**
-     * Get the base name of an enumeration literal.
-     *
-     * @param enumLit Enumeration literal to name.
-     * @return Basename (without prefix) of the given enumeration literal.
-     */
-    private String getEnumLit(EnumLiteral enumLit) {
-        // Get representative literal.
-        EnumDecl enumDecl = (EnumDecl)enumLit.eContainer();
-        EnumDecl enumRepr = enumRepresentatives.get(enumDecl);
-        int litIdx = enumDecl.getLiterals().indexOf(enumLit);
-        EnumLiteral litRepr = enumRepr.getLiterals().get(litIdx);
-
-        // Get name.
-        String name = enumLitsMap.get(litRepr);
-        if (name != null) {
-            return name;
-        }
-        name = makeName(litRepr.getName(), ENUM_LIT_PREFIXES);
-        enumLitsMap.put(litRepr, name);
-        return name;
-    }
-
-    /**
-     * Get the mCRL2 name of an enumeration literal.
-     *
-     * @param enumLit Enumeration literal to get name of.
-     * @return Name of the provided enumeration literal.
-     */
-    public String getEnumLitName(EnumLiteral enumLit) {
-        return ENUM_LIT_NAME + getEnumLit(enumLit);
-    }
-
-    //
-    // Type names.
-    //
-
-    /**
-     * Return the name of a type for mCRL2.
-     *
-     * @param tp Type to name.
-     * @return Name of the type in mCRL2.
-     */
-    public String getTypeName(CifType tp) {
-        tp = CifTypeUtils.normalizeType(tp);
-        if (tp instanceof BoolType) {
-            return "Bool";
-        } else if (tp instanceof IntType) {
-            return "Int";
-        } else if (tp instanceof EnumType) {
-            EnumDecl enumDecl = ((EnumType)tp).getEnum();
-            return getEnumName(enumDecl);
-        } else {
-            throw new RuntimeException("Unexpected type: " + tp);
-        }
-    }
-}
diff --git a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/options/DebugFileOption.java b/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/options/DebugFileOption.java
deleted file mode 100644
index c833e08877..0000000000
--- a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/options/DebugFileOption.java
+++ /dev/null
@@ -1,57 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Copyright (c) 2010, 2024 Contributors to the Eclipse Foundation
-//
-// See the NOTICE file(s) distributed with this work for additional
-// information regarding copyright ownership.
-//
-// This program and the accompanying materials are made available
-// under the terms of the MIT License which is available at
-// https://opensource.org/licenses/MIT
-//
-// SPDX-License-Identifier: MIT
-//////////////////////////////////////////////////////////////////////////////
-
-package org.eclipse.escet.cif.cif2mcrl2.options;
-
-import org.eclipse.escet.common.app.framework.options.InputFileOption;
-import org.eclipse.escet.common.app.framework.options.Options;
-import org.eclipse.escet.common.app.framework.options.StringOption;
-
-/** Option for getting a debug output filename. */
-public class DebugFileOption extends StringOption {
-    /**
-     * Constructor for the {@link DebugFileOption} class. Don't directly create instances of this class. Use the
-     * {@link Options#getInstance} method instead.
-     */
-    public DebugFileOption() {
-        super("Debug file", "The path to the debug output file.", 'x', "debug", "FILE", null, true, true,
-                "The debug output file path.", "Debug output file path:");
-    }
-
-    /**
-     * Returns the path of the debug output file, or {@code null} if not provided.
-     *
-     * @return The path of the debug output file, or {@code null}.
-     */
-    public static String getPath() {
-        return Options.get(DebugFileOption.class);
-    }
-
-    /**
-     * Returns the path of the debug output file. If the file path is not specified, a modified input file path is used.
-     * The input path is modified by removing the given input file extension (if present), and adding the given output
-     * file extension.
-     *
-     * @param inExt Input file extension (including the dot).
-     * @param outExt Output file extension (including the dot).
-     * @return The path of the debug output file.
-     * @see InputFileOption
-     */
-    public static String getDerivedPath(String inExt, String outExt) {
-        String rslt = getPath();
-        if (rslt == null) {
-            rslt = InputFileOption.getDerivedPath(inExt, outExt);
-        }
-        return rslt;
-    }
-}
diff --git a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/options/DefineInstanceTreeOption.java b/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/options/DefineInstanceTreeOption.java
deleted file mode 100644
index 5bdad95cc1..0000000000
--- a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/options/DefineInstanceTreeOption.java
+++ /dev/null
@@ -1,47 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Copyright (c) 2010, 2024 Contributors to the Eclipse Foundation
-//
-// See the NOTICE file(s) distributed with this work for additional
-// information regarding copyright ownership.
-//
-// This program and the accompanying materials are made available
-// under the terms of the MIT License which is available at
-// https://opensource.org/licenses/MIT
-//
-// SPDX-License-Identifier: MIT
-//////////////////////////////////////////////////////////////////////////////
-
-package org.eclipse.escet.cif.cif2mcrl2.options;
-
-import org.eclipse.escet.common.app.framework.options.Options;
-import org.eclipse.escet.common.app.framework.options.StringOption;
-
-/** Option to define the instance tree of mCRL2 processes. */
-public class DefineInstanceTreeOption extends StringOption {
-    /**
-     * Constructor for the {@link DefineInstanceTreeOption} class. Don't directly create instances of this class. Use
-     * the {@link Options#getInstance} method instead.
-     */
-    public DefineInstanceTreeOption() {
-        super("Instance tree", // name.
-                "Comma and/or whitespace separated tree of absolute names of automata and discrete variables that "
-                        + "should be translated. Use parentheses to express sub-tree nodes.", // description.
-                't', // cmdShort.
-                "tree", // cmdLong.
-                "TREE", // cmdValue.
-                "", // defaultValue.
-                false, // emptyAsNull.
-                true, // showInDialog.
-                "Comma and/or whitespace separated tree of processes to convert.", // optDialogDescr.
-                "Tree:"); // optDialogLabelText.
-    }
-
-    /**
-     * Get the instance tree text.
-     *
-     * @return The instance tree text.
-     */
-    public static String getTreeText() {
-        return Options.get(DefineInstanceTreeOption.class);
-    }
-}
diff --git a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/options/EnableDebugOutputOption.java b/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/options/EnableDebugOutputOption.java
deleted file mode 100644
index d1a7fffbd6..0000000000
--- a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/options/EnableDebugOutputOption.java
+++ /dev/null
@@ -1,48 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Copyright (c) 2010, 2024 Contributors to the Eclipse Foundation
-//
-// See the NOTICE file(s) distributed with this work for additional
-// information regarding copyright ownership.
-//
-// This program and the accompanying materials are made available
-// under the terms of the MIT License which is available at
-// https://opensource.org/licenses/MIT
-//
-// SPDX-License-Identifier: MIT
-//////////////////////////////////////////////////////////////////////////////
-
-package org.eclipse.escet.cif.cif2mcrl2.options;
-
-import org.eclipse.escet.common.app.framework.options.BooleanOption;
-import org.eclipse.escet.common.app.framework.options.Options;
-
-/**
- * Option to enable generation of a dump of the instance tree for debugging (is implied by giving an output filename for
- * it).
- */
-public class EnableDebugOutputOption extends BooleanOption {
-    /** Constructor for the {@link EnableDebugOutputOption} class. */
-    public EnableDebugOutputOption() {
-        super("Enable debug output", // name
-                "Whether to generate a file containing the debug output of the instantiation tree (yes/no). "
-                        + "[DEFAULT=no]", // desc
-                null, // cmd short
-                "enable-debug", // cmd long
-                "BOOL", // cmd value
-                false, // default value
-                true, // show in dialog
-                "Giving a filename for the debug output implies this option.", // opt dialog descr
-                "Enable generation of a debug output file."); // checkbox text
-    }
-
-    /**
-     * Get the option value.
-     *
-     * @return The option value as stated by the user.
-     */
-    public static boolean getEnableDebugOutput() {
-        boolean enable = Options.get(EnableDebugOutputOption.class);
-        enable |= (DebugFileOption.getPath() != null);
-        return enable;
-    }
-}
diff --git a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/options/GenerateValueActionsOption.java b/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/options/GenerateValueActionsOption.java
deleted file mode 100644
index d6dcc0cffc..0000000000
--- a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/options/GenerateValueActionsOption.java
+++ /dev/null
@@ -1,234 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Copyright (c) 2010, 2024 Contributors to the Eclipse Foundation
-//
-// See the NOTICE file(s) distributed with this work for additional
-// information regarding copyright ownership.
-//
-// This program and the accompanying materials are made available
-// under the terms of the MIT License which is available at
-// https://opensource.org/licenses/MIT
-//
-// SPDX-License-Identifier: MIT
-//////////////////////////////////////////////////////////////////////////////
-
-package org.eclipse.escet.cif.cif2mcrl2.options;
-
-import static org.eclipse.escet.common.app.framework.output.OutputProvider.warn;
-import static org.eclipse.escet.common.java.Lists.list;
-import static org.eclipse.escet.common.java.Sets.set;
-import static org.eclipse.escet.common.java.Strings.fmt;
-
-import java.util.List;
-import java.util.Set;
-import java.util.regex.Pattern;
-
-import org.apache.commons.lang3.StringUtils;
-import org.eclipse.escet.common.app.framework.options.Options;
-import org.eclipse.escet.common.app.framework.options.StringOption;
-import org.eclipse.escet.common.java.exceptions.InvalidOptionException;
-
-/** Option to specify the variables that need to have a 'value' action. */
-public class GenerateValueActionsOption extends StringOption {
-    /** The regular expression pattern for checking the pattern elements of the option. */
-    private static final Pattern FILTER_PATTERN = Pattern
-            .compile("[-+]?[a-zA-Z_*][a-zA-Z0-9_*]*(\\.[a-zA-Z_*][a-zA-Z0-9_*]*)*");
-
-    /** Name of the option. */
-    private static final String NAME = "Generate 'value' actions";
-
-    /** Description in the option dialog. */
-    private static final String OPT_DIALOG_DESCR = "Option to specify which variables should get a 'value' action in "
-            + "the generated mCRL2 code. Specify a comma-separated list of variable names. The \"*\" character can be "
-            + "used as wildcard, and indicates zero or more characters. Prefixing a name with a \"+\" adds the "
-            + "variable(s) matching the name, while a \"-\" prefix removes the variable(s) matching the name. If "
-            + "neither a \"+\" nor a \"-\" prefix is given, \"+\" (adding) is assumed. The list of variables is "
-            + "interpreted relative to selecting no variables. That is, if an empty list is specified, no variables "
-            + "get a 'value' action.";
-
-    /** Default value of the option. */
-    private static final String DEFAULT_VALUE = "+*";
-
-    /** Description of the option. */
-    private static final String DESCRIPTION = fmt("%s [DEFAULT=%s]", OPT_DIALOG_DESCR, DEFAULT_VALUE);
-
-    /** Whether to return {@code null} as option value if it was left empty. */
-    private static final boolean EMPTY_AS_NULL = false;
-
-    /** Short option name. */
-    private static final Character CMD_SHORT = 'r';
-
-    /** Long option name. */
-    private static final String CMD_LONG = "read-values";
-
-    /** Name of the option value. */
-    private static final String CMD_VALUE = "PATTERNS";
-
-    /** Whether to display the option in the option dialog. */
-    private static final boolean SHOW_IN_DIALOG = true;
-
-    /** Text next to the label in the option dialog. */
-    private static final String OPT_DIALOG_LABEL_TEXT = NAME + ":";
-
-    /** Constructor of the {@link GenerateValueActionsOption} class. */
-    public GenerateValueActionsOption() {
-        super(NAME, DESCRIPTION, CMD_SHORT, CMD_LONG, CMD_VALUE, DEFAULT_VALUE, EMPTY_AS_NULL, SHOW_IN_DIALOG,
-                OPT_DIALOG_DESCR, OPT_DIALOG_LABEL_TEXT);
-    }
-
-    /**
-     * Get the patterns specified in the option.
-     *
-     * @return The patterns of the option.
-     */
-    public static List<OptionPattern> getValueActionsOptionPatterns() {
-        String optValue = Options.get(GenerateValueActionsOption.class);
-
-        // Split on ",", check each element for validity, and build a list to return.
-        List<OptionPattern> resultPatterns = list();
-        String[] valuePatterns = StringUtils.split(optValue, ",");
-        for (int i = 0; i < valuePatterns.length; i++) {
-            String s = valuePatterns[i].trim();
-            if (!FILTER_PATTERN.matcher(s).matches()) {
-                String msg = fmt("Value actions pattern \"%s\" has invalid syntax.", s);
-                throw new InvalidOptionException(msg);
-            }
-
-            // Handle the '+' or '-' prefix.
-            boolean addMatch;
-            String regex;
-            if (s.charAt(0) == '+') {
-                addMatch = true;
-                regex = s.substring(1);
-            } else if (s.charAt(0) == '-') {
-                addMatch = false;
-                regex = s.substring(1);
-            } else {
-                addMatch = true;
-                regex = s;
-            }
-
-            // Convert to a normal regular expression pattern and add it to the result list.
-            regex = "^" + regex.replace(".", "\\.").replace("*", ".*") + "$";
-            resultPatterns.add(new OptionPattern(addMatch, s, regex));
-        }
-        return resultPatterns;
-    }
-
-    /** Class containing a pattern. */
-    public static class OptionPattern {
-        /** If set, add names that match, else remove them. */
-        public final boolean addMatch;
-
-        /** Original pattern text as entered by the user. */
-        public final String originalText;
-
-        /** Compiled pattern to match against. */
-        public final Pattern pattern;
-
-        /** Whether the pattern ever had a successful match from {@link #isMatch}. */
-        public boolean wasMatched;
-
-        /** Whether a match on the pattern ever caused a change in the state of the matched text. */
-        public boolean causedChange;
-
-        /**
-         * Constructor of the {@link OptionPattern} class.
-         *
-         * @param addMatch If set, a match with the pattern will cause the matched object to be added to the result,
-         *     else a match will cause removal (pending further matches in other patterns).
-         * @param originalText Original text of the pattern, for reporting purposes.
-         * @param patternText Pattern text to be used in regular expression matching.
-         */
-        public OptionPattern(boolean addMatch, String originalText, String patternText) {
-            this.addMatch = addMatch;
-            this.originalText = originalText;
-            this.pattern = Pattern.compile(patternText);
-            reset();
-        }
-
-        /** Reset the {@link #wasMatched} and {@link #causedChange} flags. */
-        public void reset() {
-            wasMatched = false;
-            causedChange = false;
-        }
-
-        /**
-         * Does the given name match against the pattern?
-         *
-         * @param name Text to match.
-         * @param makesChange Flag whether a match will cause a change in state for the matched name.
-         * @return Whether the given name matches against the pattern. A match is also recorded in {@link #wasMatched}
-         *     and {@link #causedChange} is updated to record effectiveness of the pattern.
-         */
-        public boolean isMatch(String name, boolean makesChange) {
-            boolean match = pattern.matcher(name).matches();
-            if (match) {
-                wasMatched = true;
-                causedChange |= makesChange;
-            }
-            return match;
-        }
-    }
-
-    /**
-     * Match a list of names against the patterns, and return all names that were either never added by the patterns, or
-     * added and removed again.
-     *
-     * <p>
-     * Function also warns the user for entries in the patterns that did not give any match, as that may indicate an
-     * error in the option value.
-     * </p>
-     *
-     * @param names Names to match against the patterns.
-     * @return Names that were added and not removed by the patterns.
-     */
-    public static Set<String> matchNames(Set<String> names) {
-        List<OptionPattern> patterns = getValueActionsOptionPatterns();
-
-        // If there are no names to match the patterns against, there will not be any matches. Also it causes false
-        // positive warnings on failure to match names in the patterns.
-        if (names.isEmpty()) {
-            return names;
-        }
-
-        // Walk over the provided names, and add names that should be added into
-        // the result. As a side effect, the patterns record ever matching a name,
-        // or ever making an effective change.
-        Set<String> matchedNames = set();
-        for (String name: names) {
-            boolean added = false;
-            for (OptionPattern pat: patterns) {
-                boolean matchCausesChange = (added != pat.addMatch);
-                if (pat.isMatch(name, matchCausesChange)) {
-                    added = pat.addMatch;
-                }
-            }
-
-            if (added) {
-                matchedNames.add(name);
-            }
-        }
-
-        // Examine the patterns, reporting patterns to the user that were not useful.
-        for (OptionPattern pat: patterns) {
-            if (!pat.wasMatched) {
-                String msg = fmt(
-                        "Value actions option pattern \"%s\" does not match any variable in the specification.",
-                        pat.originalText);
-                warn(msg);
-            } else if (!pat.causedChange) {
-                String reason;
-                if (pat.addMatch) {
-                    reason = "Matched variables were already added earlier.";
-                } else {
-                    reason = "Matched variables were never added or already removed earlier.";
-                }
-                String msg = fmt("Value actions option pattern \"%s\" does not "
-                        + "make any change to the selected variables. %s", pat.originalText, reason);
-                warn(msg);
-            }
-        }
-
-        return matchedNames;
-    }
-}
diff --git a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/storage/AutomatonData.java b/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/storage/AutomatonData.java
deleted file mode 100644
index 4d860e611b..0000000000
--- a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/storage/AutomatonData.java
+++ /dev/null
@@ -1,236 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Copyright (c) 2010, 2024 Contributors to the Eclipse Foundation
-//
-// See the NOTICE file(s) distributed with this work for additional
-// information regarding copyright ownership.
-//
-// This program and the accompanying materials are made available
-// under the terms of the MIT License which is available at
-// https://opensource.org/licenses/MIT
-//
-// SPDX-License-Identifier: MIT
-//////////////////////////////////////////////////////////////////////////////
-
-package org.eclipse.escet.cif.cif2mcrl2.storage;
-
-import static org.eclipse.escet.common.java.Maps.map;
-import static org.eclipse.escet.common.java.Sets.set;
-
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.escet.cif.common.CifEventUtils;
-import org.eclipse.escet.cif.common.CifTextUtils;
-import org.eclipse.escet.cif.common.CifTypeUtils;
-import org.eclipse.escet.cif.metamodel.cif.automata.Assignment;
-import org.eclipse.escet.cif.metamodel.cif.automata.Automaton;
-import org.eclipse.escet.cif.metamodel.cif.automata.Edge;
-import org.eclipse.escet.cif.metamodel.cif.automata.EdgeEvent;
-import org.eclipse.escet.cif.metamodel.cif.automata.Location;
-import org.eclipse.escet.cif.metamodel.cif.automata.Update;
-import org.eclipse.escet.cif.metamodel.cif.declarations.DiscVariable;
-import org.eclipse.escet.cif.metamodel.cif.declarations.Event;
-import org.eclipse.escet.cif.metamodel.cif.expressions.BinaryExpression;
-import org.eclipse.escet.cif.metamodel.cif.expressions.BoolExpression;
-import org.eclipse.escet.cif.metamodel.cif.expressions.DiscVariableExpression;
-import org.eclipse.escet.cif.metamodel.cif.expressions.EnumLiteralExpression;
-import org.eclipse.escet.cif.metamodel.cif.expressions.EventExpression;
-import org.eclipse.escet.cif.metamodel.cif.expressions.Expression;
-import org.eclipse.escet.cif.metamodel.cif.expressions.IntExpression;
-import org.eclipse.escet.cif.metamodel.cif.expressions.UnaryExpression;
-import org.eclipse.escet.cif.metamodel.cif.types.BoolType;
-import org.eclipse.escet.cif.metamodel.cif.types.CifType;
-import org.eclipse.escet.cif.metamodel.cif.types.EnumType;
-import org.eclipse.escet.cif.metamodel.cif.types.IntType;
-import org.eclipse.escet.common.java.Assert;
-
-/** Storage of information of an automaton. */
-public class AutomatonData {
-    /** Automaton stored in this object. */
-    public final Automaton aut;
-
-    /** Absolute name of the automaton in CIF. */
-    public final String name;
-
-    /** Initial location of the automaton. */
-    public final Location initialLocation;
-
-    /** Discrete variables used in the automaton, with mapping to their representatives in the translation. */
-    public Map<DiscVariable, VariableData> vars;
-
-    /**
-     * Constructor of the {@link AutomatonData} class.
-     *
-     * @param aut Automaton to store in the object.
-     * @param initialLocation Initial location of the automaton.
-     */
-    public AutomatonData(Automaton aut, Location initialLocation) {
-        this.aut = aut;
-        name = CifTextUtils.getAbsName(aut, false);
-        this.initialLocation = initialLocation;
-        vars = null;
-    }
-
-    /**
-     * Find discrete variables in an automaton.
-     *
-     * @param variableMap Mapping of discrete variables in the meta model to their representation in the translation.
-     */
-    public void addAutomatonVars(Map<DiscVariable, VariableData> variableMap) {
-        Set<DiscVariable> dvs = set();
-        for (Location loc: aut.getLocations()) {
-            for (Edge edge: loc.getEdges()) {
-                dvs.addAll(getEdgeReadVariables(edge));
-                dvs.addAll(getEdgeWriteVariables(edge));
-            }
-        }
-
-        vars = map();
-        for (DiscVariable dv: dvs) {
-            vars.put(dv, variableMap.get(dv));
-        }
-    }
-
-    /**
-     * Get the read variables of an edge.
-     *
-     * @param edge Edge to inspect.
-     * @return Set of variables being read in the edge.
-     */
-    public Set<VariableData> getReadVariables(Edge edge) {
-        Set<VariableData> vds = set();
-        for (DiscVariable dv: getEdgeReadVariables(edge)) {
-            vds.add(vars.get(dv));
-        }
-        return vds;
-    }
-
-    /**
-     * Get the read variables of an edge.
-     *
-     * @param edge Edge to inspect.
-     * @return Set of variables being read in the edge.
-     */
-    private static Set<DiscVariable> getEdgeReadVariables(Edge edge) {
-        Set<DiscVariable> dvs = set();
-
-        for (Update upd: edge.getUpdates()) {
-            Assignment asg = (Assignment)upd;
-            dvs.addAll(findExpressionVars(asg.getValue()));
-        }
-        for (Expression e: edge.getGuards()) {
-            dvs.addAll(findExpressionVars(e));
-        }
-        return dvs;
-    }
-
-    /**
-     * Get the written variables of an edge.
-     *
-     * @param edge Edge to inspect.
-     * @return Set of variables being written in the edge.
-     */
-    public Set<VariableData> getWriteVariables(Edge edge) {
-        Set<VariableData> vds = set();
-        for (DiscVariable dv: getEdgeWriteVariables(edge)) {
-            vds.add(vars.get(dv));
-        }
-        return vds;
-    }
-
-    /**
-     * Get the written variables of an edge.
-     *
-     * @param edge Edge to inspect.
-     * @return Set of variables being written in the edge.
-     */
-    private static Set<DiscVariable> getEdgeWriteVariables(Edge edge) {
-        Set<DiscVariable> dvs = set();
-
-        for (Update upd: edge.getUpdates()) {
-            Assignment asg = (Assignment)upd;
-            dvs.addAll(findExpressionVars(asg.getAddressable()));
-        }
-        return dvs;
-    }
-
-    /**
-     * Find discrete variables in an expression.
-     *
-     * @param e Expression to inspect.
-     * @return Used discrete variables in the expression.
-     */
-    private static Set<DiscVariable> findExpressionVars(Expression e) {
-        CifType t = CifTypeUtils.normalizeType(e.getType());
-
-        if (t instanceof BoolType) {
-            if (e instanceof BoolExpression) {
-                return set();
-            } else if (e instanceof BinaryExpression) {
-                BinaryExpression be = (BinaryExpression)e;
-                Set<DiscVariable> dvs = set();
-                dvs.addAll(findExpressionVars(be.getLeft()));
-                dvs.addAll(findExpressionVars(be.getRight()));
-                return dvs;
-            } else if (e instanceof UnaryExpression) {
-                UnaryExpression ue = (UnaryExpression)e;
-                return findExpressionVars(ue.getChild());
-            }
-            DiscVariableExpression dve = (DiscVariableExpression)e;
-            return set(dve.getVariable());
-        }
-
-        if (t instanceof IntType) {
-            if (e instanceof IntExpression) {
-                return set();
-            } else if (e instanceof BinaryExpression) {
-                BinaryExpression be = (BinaryExpression)e;
-                Set<DiscVariable> dvs = set();
-                dvs.addAll(findExpressionVars(be.getLeft()));
-                dvs.addAll(findExpressionVars(be.getRight()));
-                return dvs;
-            } else if (e instanceof UnaryExpression) {
-                UnaryExpression ue = (UnaryExpression)e;
-                return findExpressionVars(ue.getChild());
-            }
-            DiscVariableExpression dve = (DiscVariableExpression)e;
-            return set(dve.getVariable());
-        }
-
-        if (t instanceof EnumType) {
-            if (e instanceof EnumLiteralExpression) {
-                return set();
-            }
-            DiscVariableExpression dve = (DiscVariableExpression)e;
-            return set(dve.getVariable());
-        }
-
-        throw new RuntimeException("Unexpected type: " + t);
-    }
-
-    /**
-     * Get the events belonging to an edge.
-     *
-     * @param edge Edge to inspect.
-     * @return The events of the edge.
-     */
-    public Set<Event> getEvents(Edge edge) {
-        Set<Event> events = set();
-        for (EdgeEvent ee: edge.getEvents()) {
-            EventExpression e = (EventExpression)ee.getEvent();
-            Event evt = e.getEvent();
-            Assert.notNull(evt);
-            events.add(evt);
-        }
-        return events;
-    }
-
-    /**
-     * Get the alphabet of the automaton.
-     *
-     * @return Alphabet of the automaton.
-     */
-    public Set<Event> getAlphabet() {
-        return CifEventUtils.getAlphabet(aut);
-    }
-}
diff --git a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/storage/EventVarUsage.java b/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/storage/EventVarUsage.java
deleted file mode 100644
index 45bf22441e..0000000000
--- a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/storage/EventVarUsage.java
+++ /dev/null
@@ -1,112 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Copyright (c) 2010, 2024 Contributors to the Eclipse Foundation
-//
-// See the NOTICE file(s) distributed with this work for additional
-// information regarding copyright ownership.
-//
-// This program and the accompanying materials are made available
-// under the terms of the MIT License which is available at
-// https://opensource.org/licenses/MIT
-//
-// SPDX-License-Identifier: MIT
-//////////////////////////////////////////////////////////////////////////////
-
-package org.eclipse.escet.cif.cif2mcrl2.storage;
-
-import static org.eclipse.escet.common.java.Maps.map;
-
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-
-import org.eclipse.escet.cif.metamodel.cif.declarations.Event;
-
-/** Class for storing how non-local variables are used in an event. */
-public class EventVarUsage {
-    /** Event associated with the variable use. */
-    public final Event event;
-
-    /** Mapping of variables to their usage. */
-    public Map<VariableData, VarUsage> varUses = map();
-
-    /**
-     * Constructor of the {@link EventVarUsage} class.
-     *
-     * @param event Event associated with this variable use.
-     */
-    public EventVarUsage(Event event) {
-        this.event = event;
-    }
-
-    /**
-     * Set variable access properties for reading, for variables on an edge with the {@link #event}.
-     *
-     * @param vars Variables being read in an edge.
-     * @param firstEdge Whether this is the first time the event on an edge is encountered. Used to store whether a
-     *     variable is always used with an event.
-     * @param localVars Variables that are local to behavior processes.
-     */
-    public void addReadEdgeAccess(Set<VariableData> vars, boolean firstEdge, Set<VariableData> localVars) {
-        // 1. Update the variables already associated with the event.
-        for (Entry<VariableData, VarUsage> entry: varUses.entrySet()) {
-            if (vars.contains(entry.getKey())) {
-                entry.getValue().readAccess.everUsed = true;
-            } else {
-                entry.getValue().readAccess.alwaysUsed = false;
-            }
-        }
-
-        // 2. Add new, non-local, variables.
-        for (VariableData vd: vars) {
-            if (localVars.contains(vd)) {
-                continue;
-            }
-            if (varUses.containsKey(vd)) {
-                continue;
-            }
-
-            VarUsage vu = new VarUsage(vd);
-            vu.readAccess.everUsed = true;
-            if (!firstEdge) {
-                vu.readAccess.alwaysUsed = false;
-            }
-            varUses.put(vd, vu);
-        }
-    }
-
-    /**
-     * Set variable access properties for writing, for variables on an edge with the {@link #event}.
-     *
-     * @param vars Variables being written in an edge.
-     * @param firstEdge Whether this is the first time the event on an edge is encountered. Used to store whether a
-     *     variable is always used with an event.
-     * @param localVars Variables that are local to behavior processes.
-     */
-    public void addWriteEdgeAccess(Set<VariableData> vars, boolean firstEdge, Set<VariableData> localVars) {
-        // 1. Update the variables already associated with the event.
-        for (Entry<VariableData, VarUsage> entry: varUses.entrySet()) {
-            if (vars.contains(entry.getKey())) {
-                entry.getValue().writeAccess.everUsed = true;
-            } else {
-                entry.getValue().writeAccess.alwaysUsed = false;
-            }
-        }
-
-        // 2. Add new, non-local, variables.
-        for (VariableData vd: vars) {
-            if (localVars.contains(vd)) {
-                continue;
-            }
-            if (varUses.containsKey(vd)) {
-                continue;
-            }
-
-            VarUsage vu = new VarUsage(vd);
-            vu.writeAccess.everUsed = true;
-            if (!firstEdge) {
-                vu.writeAccess.alwaysUsed = false;
-            }
-            varUses.put(vd, vu);
-        }
-    }
-}
diff --git a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/storage/VarAccess.java b/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/storage/VarAccess.java
deleted file mode 100644
index df0beab89f..0000000000
--- a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/storage/VarAccess.java
+++ /dev/null
@@ -1,76 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Copyright (c) 2010, 2024 Contributors to the Eclipse Foundation
-//
-// See the NOTICE file(s) distributed with this work for additional
-// information regarding copyright ownership.
-//
-// This program and the accompanying materials are made available
-// under the terms of the MIT License which is available at
-// https://opensource.org/licenses/MIT
-//
-// SPDX-License-Identifier: MIT
-//////////////////////////////////////////////////////////////////////////////
-
-package org.eclipse.escet.cif.cif2mcrl2.storage;
-
-/** How is a variable accessed with respect to read or write. */
-public class VarAccess {
-    /** Is the variable accessed (for read or write) at all? */
-    public boolean everUsed = false;
-
-    /** If it is {@link #everUsed}, are there edges that do not access it? */
-    public boolean alwaysUsed = true;
-
-    @Override
-    public String toString() {
-        if (!everUsed) {
-            return "NEVER";
-        }
-        return alwaysUsed ? "ALWAYS" : "SOMETIMES";
-    }
-
-    /**
-     * Make a fresh copy of the object.
-     *
-     * @return The fresh copy of the object.
-     */
-    public VarAccess copy() {
-        VarAccess va = new VarAccess();
-        va.everUsed = everUsed;
-        va.alwaysUsed = alwaysUsed;
-        return va;
-    }
-
-    /**
-     * Merge the other variable access into self. Goal is to find as much variable access as possible.
-     *
-     * @param other Other variable access to merge into self.
-     */
-    public void merge(VarAccess other) {
-        if (!other.everUsed) {
-            return; // Cannot be better than self.
-        }
-
-        if (!everUsed) {
-            // Other is used, self is not -> other is better.
-            everUsed = other.everUsed;
-            alwaysUsed = other.alwaysUsed;
-            return;
-        }
-
-        // Both other and self are used.
-
-        if (!other.alwaysUsed) {
-            return; // Cannot be better than self.
-        }
-
-        if (!alwaysUsed) {
-            // Other is always used, self is not -> other is better.
-            alwaysUsed = other.alwaysUsed;
-            return;
-        }
-
-        // Both always used -> Already equal.
-        return;
-    }
-}
diff --git a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/storage/VarUsage.java b/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/storage/VarUsage.java
deleted file mode 100644
index 02ab63551b..0000000000
--- a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/storage/VarUsage.java
+++ /dev/null
@@ -1,57 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Copyright (c) 2010, 2024 Contributors to the Eclipse Foundation
-//
-// See the NOTICE file(s) distributed with this work for additional
-// information regarding copyright ownership.
-//
-// This program and the accompanying materials are made available
-// under the terms of the MIT License which is available at
-// https://opensource.org/licenses/MIT
-//
-// SPDX-License-Identifier: MIT
-//////////////////////////////////////////////////////////////////////////////
-
-package org.eclipse.escet.cif.cif2mcrl2.storage;
-
-/** Usage of a variable for read and for write. */
-public class VarUsage {
-    /** Variable being examined. */
-    public final VariableData var;
-
-    /** Read access of the variable. */
-    public VarAccess readAccess = new VarAccess();
-
-    /** Write access of the variable. */
-    public VarAccess writeAccess = new VarAccess();
-
-    /**
-     * Constructor of the {@link VarUsage} class.
-     *
-     * @param var Variable being examined.
-     */
-    public VarUsage(VariableData var) {
-        this.var = var;
-    }
-
-    /**
-     * Make a fresh copy of the object.
-     *
-     * @return The fresh copy of the object.
-     */
-    public VarUsage copy() {
-        VarUsage vu = new VarUsage(var);
-        vu.readAccess = readAccess.copy();
-        vu.writeAccess = writeAccess.copy();
-        return vu;
-    }
-
-    /**
-     * Merge the other variable usage into self. Goal is to find as much variable usage as possible.
-     *
-     * @param other Other variable access to merge into self.
-     */
-    public void merge(VarUsage other) {
-        readAccess.merge(other.readAccess);
-        writeAccess.merge(other.writeAccess);
-    }
-}
diff --git a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/storage/VariableData.java b/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/storage/VariableData.java
deleted file mode 100644
index dd3e184958..0000000000
--- a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/storage/VariableData.java
+++ /dev/null
@@ -1,113 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Copyright (c) 2010, 2024 Contributors to the Eclipse Foundation
-//
-// See the NOTICE file(s) distributed with this work for additional
-// information regarding copyright ownership.
-//
-// This program and the accompanying materials are made available
-// under the terms of the MIT License which is available at
-// https://opensource.org/licenses/MIT
-//
-// SPDX-License-Identifier: MIT
-//////////////////////////////////////////////////////////////////////////////
-
-package org.eclipse.escet.cif.cif2mcrl2.storage;
-
-import org.eclipse.escet.cif.common.CifTextUtils;
-import org.eclipse.escet.cif.common.CifTypeUtils;
-import org.eclipse.escet.cif.metamodel.cif.declarations.DiscVariable;
-import org.eclipse.escet.cif.metamodel.cif.types.CifType;
-import org.eclipse.escet.cif.metamodel.cif.types.IntType;
-
-/** Storage class for a variable with its properties. */
-public class VariableData {
-    /** Variable represented by this class. */
-    public final DiscVariable variable;
-
-    /** Absolute name of the variable in CIF. */
-    public final String name;
-
-    /** Initial value of the variable. */
-    public final String initialValue;
-
-    /** Whether the variable should have a 'value' action to query its current value in mCRL2. */
-    private boolean hasValueAction = false;
-
-    /**
-     * Constructor of the {@link VariableData} class.
-     *
-     * @param variable Variable to store.
-     * @param initialValue Initial value to store.
-     */
-    public VariableData(DiscVariable variable, String initialValue) {
-        this.variable = variable;
-        name = CifTextUtils.getAbsName(variable, false);
-        this.initialValue = initialValue;
-    }
-
-    /**
-     * Get type of the variable.
-     *
-     * @return The type of the variable.
-     */
-    public CifType getType() {
-        CifType tp = CifTypeUtils.normalizeType(variable.getType());
-        return tp;
-    }
-
-    /**
-     * Get lower limit of the variable type, if available.
-     *
-     * @return Lower limit of the type of the variable, if available.
-     */
-    public Integer getLowerLimit() {
-        // TODO: Generalize CifTypeUtils.isRangeLess.
-        CifType tp = getType();
-        if (!(tp instanceof IntType)) {
-            return null;
-        }
-        IntType it = (IntType)tp;
-        if (CifTypeUtils.isRangeless(it)) {
-            return null;
-        }
-        return CifTypeUtils.getLowerBound(it);
-    }
-
-    /**
-     * Get upper limit of the variable type, if available.
-     *
-     * @return Upper limit of the type of the variable, if available.
-     */
-    public Integer getUpperLimit() {
-        // TODO: Generalize CifTypeUtils.isRangeless.
-        CifType tp = getType();
-        if (!(tp instanceof IntType)) {
-            return null;
-        }
-        IntType it = (IntType)tp;
-        if (CifTypeUtils.isRangeless(it)) {
-            return null;
-        }
-        return CifTypeUtils.getUpperBound(it);
-    }
-
-    /**
-     * Set whether the variable has an 'value' action in mCRL2 to query its value.
-     *
-     * @param hasValueAction If set, the variable should get a 'value' action.
-     * @see #getHasValueAction
-     */
-    public void setValueAction(boolean hasValueAction) {
-        this.hasValueAction = hasValueAction;
-    }
-
-    /**
-     * Retrieve whether the variable has an 'value' action in mCRL2 to query its value.
-     *
-     * @return {@code true} if a 'value' action should be generated, else {@code false}.
-     * @see #setValueAction
-     */
-    public boolean getHasValueAction() {
-        return hasValueAction;
-    }
-}
diff --git a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/tree/AutomatonProcessNode.java b/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/tree/AutomatonProcessNode.java
deleted file mode 100644
index 538dc83911..0000000000
--- a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/tree/AutomatonProcessNode.java
+++ /dev/null
@@ -1,431 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Copyright (c) 2010, 2024 Contributors to the Eclipse Foundation
-//
-// See the NOTICE file(s) distributed with this work for additional
-// information regarding copyright ownership.
-//
-// This program and the accompanying materials are made available
-// under the terms of the MIT License which is available at
-// https://opensource.org/licenses/MIT
-//
-// SPDX-License-Identifier: MIT
-//////////////////////////////////////////////////////////////////////////////
-
-package org.eclipse.escet.cif.cif2mcrl2.tree;
-
-import static org.eclipse.escet.common.java.Lists.list;
-import static org.eclipse.escet.common.java.Maps.map;
-import static org.eclipse.escet.common.java.Sets.set;
-import static org.eclipse.escet.common.java.Strings.fmt;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.escet.cif.cif2mcrl2.NameMaps;
-import org.eclipse.escet.cif.cif2mcrl2.storage.AutomatonData;
-import org.eclipse.escet.cif.cif2mcrl2.storage.EventVarUsage;
-import org.eclipse.escet.cif.cif2mcrl2.storage.VariableData;
-import org.eclipse.escet.cif.metamodel.cif.automata.Assignment;
-import org.eclipse.escet.cif.metamodel.cif.automata.Edge;
-import org.eclipse.escet.cif.metamodel.cif.automata.EdgeEvent;
-import org.eclipse.escet.cif.metamodel.cif.automata.Location;
-import org.eclipse.escet.cif.metamodel.cif.automata.Update;
-import org.eclipse.escet.cif.metamodel.cif.declarations.Event;
-import org.eclipse.escet.cif.metamodel.cif.expressions.BinaryExpression;
-import org.eclipse.escet.cif.metamodel.cif.expressions.BoolExpression;
-import org.eclipse.escet.cif.metamodel.cif.expressions.DiscVariableExpression;
-import org.eclipse.escet.cif.metamodel.cif.expressions.EnumLiteralExpression;
-import org.eclipse.escet.cif.metamodel.cif.expressions.EventExpression;
-import org.eclipse.escet.cif.metamodel.cif.expressions.Expression;
-import org.eclipse.escet.cif.metamodel.cif.expressions.IntExpression;
-import org.eclipse.escet.cif.metamodel.cif.expressions.UnaryExpression;
-import org.eclipse.escet.common.box.Box;
-import org.eclipse.escet.common.box.HBox;
-import org.eclipse.escet.common.box.VBox;
-import org.eclipse.escet.common.java.Assert;
-
-/** Automaton process leaf node of the instance tree. */
-public class AutomatonProcessNode extends ProcessNode {
-    /** Automaton represented by this node. */
-    public final AutomatonData autData;
-
-    /**
-     * Constructor of the {@link AutomatonProcessNode} class.
-     *
-     * @param name Name of the node.
-     * @param autData Automaton represented by this node.
-     */
-    public AutomatonProcessNode(String name, AutomatonData autData) {
-        super(name);
-        this.autData = autData;
-    }
-
-    @Override
-    protected String getCifName() {
-        return "automaton " + autData.name;
-    }
-
-    @Override
-    public void deriveActions(Set<VariableData> localVars) {
-        valueVars = set();
-        for (VariableData vd: autData.vars.values()) {
-            if (localVars.contains(vd)) {
-                valueVars.add(vd);
-            }
-        }
-
-        availProcessVars = set();
-        eventVarUse = map();
-
-        // Traverse through all edges, extract variable use, and merge it in
-        // the 'eventVarUse' map.
-        for (Location loc: autData.aut.getLocations()) {
-            for (Edge edge: loc.getEdges()) {
-                Set<VariableData> readVars, writeVars;
-                readVars = autData.getReadVariables(edge);
-                writeVars = autData.getWriteVariables(edge);
-                for (Event evt: autData.getEvents(edge)) {
-                    EventVarUsage evu = eventVarUse.get(evt);
-                    boolean firstEdge = false; // First edge with this event?
-                    if (evu == null) {
-                        evu = new EventVarUsage(evt);
-                        eventVarUse.put(evt, evu);
-                        firstEdge = true;
-                    }
-                    evu.addReadEdgeAccess(readVars, firstEdge, localVars);
-                    evu.addWriteEdgeAccess(writeVars, firstEdge, localVars);
-                }
-            }
-        }
-
-        // Check that all events of the alphabet have been added. Extend the
-        // 'eventVarUse' map, if necessary.
-        for (Event evt: autData.getAlphabet()) {
-            if (!eventVarUse.containsKey(evt)) {
-                EventVarUsage evu = new EventVarUsage(evt);
-                eventVarUse.put(evt, evu);
-            }
-        }
-    }
-
-    @Override
-    public void addDefinitions(NameMaps names, Set<VariableData> localVars, VBox code) {
-        String behProcName = names.getBehaviorProcess(autData.aut);
-        String locSortName = names.getLocationSortName(autData.aut);
-        String locVarName = names.getLocationVariableName(autData.aut);
-
-        // Location sort definition.
-        HBox locNamesBox = new HBox(" | ");
-        for (Location loc: autData.aut.getLocations()) {
-            locNamesBox.add(names.getLocationName(loc, autData.aut));
-        }
-        code.add(new HBox("sort ", locSortName, " = struct ", locNamesBox, ";"));
-        code.add();
-
-        // 'value' actions of the local variables.
-        boolean addedAct = false;
-        for (VariableData vd: autData.vars.values()) {
-            if (localVars.contains(vd)) {
-                if (!vd.getHasValueAction()) {
-                    continue;
-                }
-                String varVal = names.getVariableValue(vd.variable);
-                String typeName = names.getTypeName(vd.getType());
-                code.add("act " + varVal + " : " + typeName + ";");
-                addedAct = true;
-            }
-        }
-        if (addedAct) {
-            code.add();
-        }
-
-        // Behavior process definition
-        // a. Process header.
-        String selfloopParams = locVarName;
-        String params = locVarName + " : " + locSortName;
-        for (VariableData vd: autData.vars.values()) {
-            if (localVars.contains(vd)) {
-                String varName = names.getVariableName(vd.variable);
-                String typeName = names.getTypeName(vd.getType());
-                params += ", " + varName + " : " + typeName;
-                selfloopParams += ", " + varName;
-            }
-        }
-        code.add(fmt("proc %s(%s) =", behProcName, params));
-
-        // b. 'value' action for every local variable.
-        for (VariableData vd: autData.vars.values()) {
-            if (localVars.contains(vd)) {
-                if (!vd.getHasValueAction()) {
-                    continue;
-                }
-                String varVal = names.getVariableValue(vd.variable);
-                String varName = names.getVariableName(vd.variable);
-                code.add(fmt("  %s(%s) . %s(%s) +", varVal, varName, behProcName, selfloopParams));
-            }
-        }
-
-        // c. Count edges.
-        int edgeCount = 0;
-        for (Location loc: autData.aut.getLocations()) {
-            for (Edge edge: loc.getEdges()) {
-                edgeCount += edge.getEvents().size();
-            }
-        }
-
-        // d. Generate edge code.
-        int idx = 0;
-        int last = edgeCount - 1;
-        for (Location loc: autData.aut.getLocations()) {
-            for (Edge edge: loc.getEdges()) {
-                for (EdgeEvent ee: edge.getEvents()) {
-                    Box b = makeEdge(names, localVars, loc, edge, ee);
-                    b = new HBox("  ", b, (idx == last) ? ";" : " +");
-                    code.add(b);
-                    idx++;
-                }
-            }
-        }
-        code.add(); // Add empty line as separation for the next definition.
-    }
-
-    /**
-     * Construct an edge of the behavior process.
-     *
-     * @param names Mapping of CIF elements to mCRL2 names.
-     * @param localVars Local variables of the system.
-     * @param loc Source location.
-     * @param edge Edge to convert.
-     * @param event Event to convert.
-     * @return The created edge.
-     */
-    private Box makeEdge(NameMaps names, Set<VariableData> localVars, Location loc, Edge edge, EdgeEvent event) {
-        Set<VariableData> readVars = autData.getReadVariables(edge);
-
-        List<String> sums = list();
-        List<String> conds = list();
-        List<String> actions = list();
-
-        // Generate sums over external variables.
-        for (VariableData vd: readVars) {
-            if (localVars.contains(vd)) {
-                continue;
-            }
-            String varName = names.getVariableName(vd.variable);
-            String varType = names.getTypeName(vd.variable.getType());
-            sums.add(fmt("sum %s : %s . ", varName, varType));
-
-            // Add upper and lower boundaries of the external variable, if known.
-            Integer limit = vd.getLowerLimit();
-            if (limit != null) {
-                conds.add(fmt("(%s >= %d)", varName, limit));
-            }
-            limit = vd.getUpperLimit();
-            if (limit != null) {
-                conds.add(fmt("(%s <= %d)", varName, limit));
-            }
-        }
-        // External variables that are written but not read don't need sums.
-
-        // Add "location check and guards -> "
-        String locVar = names.getLocationVariableName(autData.aut);
-        String locName = names.getLocationName(loc, autData.aut);
-        conds.add(fmt("(%s == %s)", locVar, locName));
-        if (!edge.getGuards().isEmpty()) {
-            conds.add(makeExpression(names, edge.getGuards()));
-        }
-
-        // Add the event.
-        EventExpression eex = (EventExpression)event.getEvent();
-        actions.add(names.getEventName(eex.getEvent()));
-
-        // Add behavior read actions.
-        for (VariableData vd: readVars) {
-            if (localVars.contains(vd)) {
-                continue;
-            }
-            String varName = names.getVariableName(vd.variable);
-            String behRead = names.getBehRead(vd.variable);
-            actions.add(fmt("%s(%s)", behRead, varName));
-        }
-
-        // Add write actions, save local var updates.
-        Map<VariableData, String> newLocalValues = map();
-        for (Update upd: edge.getUpdates()) {
-            Assignment asg = (Assignment)upd;
-            String asgVal = makeExpression(names, asg.getValue());
-
-            DiscVariableExpression dve = (DiscVariableExpression)asg.getAddressable();
-            VariableData wVar = autData.vars.get(dve.getVariable());
-            Assert.notNull(wVar); // Note: Duplicate check, already done above.
-            if (localVars.contains(wVar)) {
-                Integer limit = wVar.getLowerLimit();
-                if (limit != null) {
-                    conds.add(fmt("(%s >= %d)", asgVal, limit));
-                }
-                limit = wVar.getUpperLimit();
-                if (limit != null) {
-                    conds.add(fmt("(%s <= %d)", asgVal, limit));
-                }
-                newLocalValues.put(wVar, asgVal);
-                continue;
-            }
-            String behWrite = names.getBehWrite(dve.getVariable());
-            actions.add(fmt("%s(%s)", behWrite, asgVal));
-        }
-
-        // Perform recursive call.
-        String behProcName = names.getBehaviorProcess(autData.aut);
-        String targetLocName = (edge.getTarget() == null) ? names.getLocationVariableName(autData.aut)
-                : names.getLocationName(edge.getTarget(), autData.aut);
-        String params = targetLocName;
-        for (VariableData vd: autData.vars.values()) {
-            if (localVars.contains(vd)) {
-                String nVal = newLocalValues.get(vd);
-                if (nVal == null) {
-                    nVal = names.getVariableName(vd.variable);
-                }
-                params += ", " + nVal;
-            }
-        }
-
-        HBox line = new HBox();
-        for (String s: sums) {
-            line.add(s);
-        }
-        Assert.check(!conds.isEmpty());
-        if (conds.size() == 1) {
-            line.add(conds.get(0) + " -> ");
-        } else {
-            line.add("(");
-            boolean first = true;
-            for (String c: conds) {
-                if (!first) {
-                    line.add(" && ");
-                }
-                line.add(c);
-                first = false;
-            }
-            line.add(") -> ");
-        }
-
-        boolean first = true;
-        for (String a: actions) {
-            if (!first) {
-                line.add(" | ");
-            }
-            first = false;
-            line.add(a);
-        }
-        line.add(fmt(" . %s(%s)", behProcName, params));
-        return line;
-    }
-
-    /**
-     * Construct a string denoting the computation in 'exprs'. Expressions are considered to be a conjunction of
-     * booleans.
-     *
-     * @param names Mapping of CIF elements to mCRL2 names.
-     * @param exprs Expressions to convert.
-     * @return Text denoting the computation.
-     */
-    private String makeExpression(NameMaps names, List<Expression> exprs) {
-        if (exprs.isEmpty()) {
-            return "true";
-        }
-        String line = "";
-        for (Expression e: exprs) {
-            if (!line.isEmpty()) {
-                line += " && ";
-            }
-            line += makeExpression(names, e);
-        }
-        return line;
-    }
-
-    /**
-     * Construct a string denoting the computation in 'expr'.
-     *
-     * @param names Mapping of CIF elements to mCRL2 names.
-     * @param expr Expression to convert.
-     * @return Text denoting the computation.
-     */
-    private String makeExpression(NameMaps names, Expression expr) {
-        if (expr instanceof BoolExpression) {
-            BoolExpression be = (BoolExpression)expr;
-            return be.isValue() ? "true" : "false";
-        } else if (expr instanceof BinaryExpression) {
-            BinaryExpression be = (BinaryExpression)expr;
-            String left = makeExpression(names, be.getLeft());
-            String right = makeExpression(names, be.getRight());
-            switch (be.getOperator()) {
-                case CONJUNCTION:
-                    return "(" + left + " && " + right + ")";
-                case DISJUNCTION:
-                    return "(" + left + " || " + right + ")";
-                case EQUAL:
-                    return "(" + left + " == " + right + ")";
-                case GREATER_EQUAL:
-                    return "(" + left + " >= " + right + ")";
-                case GREATER_THAN:
-                    return "(" + left + " > " + right + ")";
-                case LESS_EQUAL:
-                    return "(" + left + " <= " + right + ")";
-                case LESS_THAN:
-                    return "(" + left + " < " + right + ")";
-                case UNEQUAL:
-                    return "(" + left + " != " + right + ")";
-                case ADDITION:
-                    return "(" + left + " + " + right + ")";
-                case MULTIPLICATION:
-                    return "(" + left + " * " + right + ")";
-                case SUBTRACTION:
-                    return "(" + left + " - " + right + ")";
-                case IMPLICATION:
-                    return "(" + left + " => " + right + ")";
-                default:
-                    Assert.fail(fmt("Unexpected binary operator %s found.", be.getOperator()));
-            }
-        } else if (expr instanceof UnaryExpression) {
-            UnaryExpression ue = (UnaryExpression)expr;
-            String child = makeExpression(names, ue.getChild());
-            switch (ue.getOperator()) {
-                case INVERSE:
-                    return "!" + child;
-                case NEGATE:
-                    return "-" + child;
-                case PLUS:
-                    return child;
-                default:
-                    Assert.fail(fmt("Unexpected unary operator %s found.", ue.getOperator()));
-            }
-        } else if (expr instanceof DiscVariableExpression) {
-            DiscVariableExpression de = (DiscVariableExpression)expr;
-            return names.getVariableName(de.getVariable());
-        } else if (expr instanceof IntExpression) {
-            IntExpression ie = (IntExpression)expr;
-            return Integer.toString(ie.getValue());
-        } else if (expr instanceof EnumLiteralExpression) {
-            EnumLiteralExpression ele = (EnumLiteralExpression)expr;
-            return names.getEnumLitName(ele.getLiteral());
-        }
-        throw new RuntimeException("Unexpected expression: " + expr);
-    }
-
-    @Override
-    public void addInstantiations(NameMaps names, Set<VariableData> localVars, VBox code) {
-        String behProcName = names.getBehaviorProcess(autData.aut);
-
-        // X(<locvar + local variables>)
-        Location initLoc = autData.initialLocation;
-        String params = names.getLocationName(initLoc, autData.aut);
-        for (VariableData vd: autData.vars.values()) {
-            if (localVars.contains(vd)) {
-                params += fmt(", %s", vd.initialValue);
-            }
-        }
-
-        code.add(fmt("%s(%s)", behProcName, params));
-    }
-}
diff --git a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/tree/CombinedProcessNode.java b/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/tree/CombinedProcessNode.java
deleted file mode 100644
index 54221d60db..0000000000
--- a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/tree/CombinedProcessNode.java
+++ /dev/null
@@ -1,622 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Copyright (c) 2010, 2024 Contributors to the Eclipse Foundation
-//
-// See the NOTICE file(s) distributed with this work for additional
-// information regarding copyright ownership.
-//
-// This program and the accompanying materials are made available
-// under the terms of the MIT License which is available at
-// https://opensource.org/licenses/MIT
-//
-// SPDX-License-Identifier: MIT
-//////////////////////////////////////////////////////////////////////////////
-
-package org.eclipse.escet.cif.cif2mcrl2.tree;
-
-import static org.eclipse.escet.common.java.Lists.list;
-import static org.eclipse.escet.common.java.Lists.listc;
-import static org.eclipse.escet.common.java.Maps.map;
-import static org.eclipse.escet.common.java.Sets.set;
-import static org.eclipse.escet.common.java.Sets.setc;
-import static org.eclipse.escet.common.java.Strings.fmt;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-
-import org.eclipse.escet.cif.cif2mcrl2.NameMaps;
-import org.eclipse.escet.cif.cif2mcrl2.storage.EventVarUsage;
-import org.eclipse.escet.cif.cif2mcrl2.storage.VarUsage;
-import org.eclipse.escet.cif.cif2mcrl2.storage.VariableData;
-import org.eclipse.escet.cif.metamodel.cif.declarations.DiscVariable;
-import org.eclipse.escet.cif.metamodel.cif.declarations.Event;
-import org.eclipse.escet.common.box.AppStreamCodeBox;
-import org.eclipse.escet.common.box.HBox;
-import org.eclipse.escet.common.box.VBox;
-import org.eclipse.escet.common.java.Assert;
-import org.eclipse.escet.common.java.Pair;
-import org.eclipse.escet.common.java.Strings;
-
-/** Node in the instance tree that combines one or more children. */
-public class CombinedProcessNode extends ProcessNode {
-    /** Children of this node. */
-    public final List<ProcessNode> children;
-
-    /**
-     * Constructor of the {@link CombinedProcessNode} class.
-     *
-     * @param name Name of the node.
-     * @param children Children of this node.
-     */
-    public CombinedProcessNode(String name, List<ProcessNode> children) {
-        super(name);
-        Assert.check(!children.isEmpty());
-        this.children = children;
-    }
-
-    @Override
-    public void deriveActions(Set<VariableData> localVars) {
-        // 1. Derive actions for the children.
-        for (ProcessNode pn: children) {
-            pn.deriveActions(localVars);
-        }
-
-        // 2. Merge available variables of all children.
-        int count = 0;
-        for (ProcessNode pn: children) {
-            count += pn.availProcessVars.size();
-        }
-        availProcessVars = setc(count);
-        for (ProcessNode pn: children) {
-            availProcessVars.addAll(pn.availProcessVars);
-        }
-
-        // 3. Merge value variables of all children.
-        count = 0;
-        for (ProcessNode pn: children) {
-            count += pn.valueVars.size();
-        }
-        valueVars = setc(count);
-        for (ProcessNode pn: children) {
-            valueVars.addAll(pn.valueVars);
-        }
-
-        // 4. Merge event variable uses.
-        eventVarUse = map();
-        for (Event evt: collectAlphabet()) {
-            eventVarUse.put(evt, computeEventVarUsage(evt));
-        }
-
-        // 5. Make all 'availVars' available in 'eventVarUse'.
-        // Processes higher in the tree may want to use the available variables
-        // in an event, even though that does not happen in this sub-tree. By
-        // adding them as "never used" variables for each event, that option
-        // remains open.
-        for (EventVarUsage evu: eventVarUse.values()) {
-            for (VariableData vd: availProcessVars) {
-                if (evu.varUses.containsKey(vd)) {
-                    continue;
-                }
-                evu.varUses.put(vd, new VarUsage(vd));
-            }
-        }
-    }
-
-    /**
-     * Collect the combined alphabet for this sub-tree (union of the alphabets of its children).
-     *
-     * @return The combined alphabet of all children.
-     */
-    private Set<Event> collectAlphabet() {
-        Set<Event> events = set();
-        for (ProcessNode pn: children) {
-            events.addAll(pn.eventVarUse.keySet());
-        }
-        return events;
-    }
-
-    /**
-     * Compute the variable usage for the given event by combining the usage from all children (for the given event).
-     *
-     * @param evt Event to use for combining usage.
-     * @return Combined variable usage for the given event.
-     */
-    private EventVarUsage computeEventVarUsage(Event evt) {
-        EventVarUsage evu = new EventVarUsage(evt);
-
-        // Find the relevant usages of the children.
-        List<EventVarUsage> childEventUsage = listc(children.size());
-        for (ProcessNode pn: children) {
-            EventVarUsage chEvu = pn.eventVarUse.get(evt);
-            if (chEvu != null) {
-                childEventUsage.add(chEvu);
-            }
-        }
-
-        // Find child var usages for each variable.
-        Map<VariableData, List<VarUsage>> varUsageMap = map();
-        for (EventVarUsage chEvu: childEventUsage) {
-            for (Entry<VariableData, VarUsage> entry: chEvu.varUses.entrySet()) {
-                List<VarUsage> vu = varUsageMap.get(entry.getKey());
-                if (vu == null) {
-                    vu = list();
-                    varUsageMap.put(entry.getKey(), vu);
-                }
-                vu.add(entry.getValue());
-            }
-        }
-
-        // Derive combined variable use.
-        for (Entry<VariableData, List<VarUsage>> entry: varUsageMap.entrySet()) {
-            evu.varUses.put(entry.getKey(), computeCombinedVarUse(entry.getValue()));
-        }
-        return evu;
-    }
-
-    /**
-     * Derive how a variable is being used by all relevant children.
-     *
-     * @param uses Usage of the variable by each child.
-     * @return Combined usage.
-     */
-    private VarUsage computeCombinedVarUse(List<VarUsage> uses) {
-        VarUsage result = null;
-        for (VarUsage vu: uses) {
-            if (result == null) {
-                result = vu.copy();
-            } else {
-                result.merge(vu);
-            }
-        }
-        Assert.notNull(result);
-        return result;
-    }
-
-    @Override
-    public void addDefinitions(NameMaps names, Set<VariableData> localVars, VBox code) {
-        for (ProcessNode node: children) {
-            node.addDefinitions(names, localVars, code);
-        }
-    }
-
-    @Override
-    public void addInstantiations(NameMaps names, Set<VariableData> localVars, VBox code) {
-        // Given the shape of the tree enforced by InstanceTreeVerifier.checkProcessTreeShape,
-        // decide which kind of node this is.
-        // * 'false' means it is a node with only behavior processes,
-        // * 'true' means there is a variable process here too.
-        VariableProcessNode variableChild = null;
-        for (ProcessNode node: children) {
-            if (node instanceof VariableProcessNode) {
-                variableChild = (VariableProcessNode)node;
-                break;
-            }
-        }
-
-        VBox vb = new VBox();
-        int closingParens = 0;
-
-        if (variableChild == null) {
-            // Parallel composition of behaviour processes.
-
-            // Add allows.
-            //
-            // Apparently, this code breaks mCRL2 verification due to semantics of 'allow' in the
-            // case of variable process nodes near the top.
-            // Check above reduces its use to behavior process tree only (at the 'bottom' of the
-            // tree, due to the enforced tree shape).
-            closingParens += addAllows(names, vb);
-        } else {
-            // Parallel composition of a variable and a behavior proces(-tree).
-
-            closingParens += addReadWriteBlocks(variableChild, names, vb);
-            closingParens += addReadWriteSync(variableChild, names, vb);
-        }
-
-        // Add variable access synchronization between behavior processes.
-        Map<VariableData, Integer> maxVarReadAccess, maxVarWriteAccess;
-        maxVarReadAccess = getMaxBehaviorProcessAccessCount(true);
-        maxVarWriteAccess = getMaxBehaviorProcessAccessCount(false);
-        closingParens += addBehProcessSync(names, vb, maxVarReadAccess, maxVarWriteAccess);
-
-        // Add comm over events.
-        closingParens += addEventSynchronization(names, vb);
-
-        // Add parallel composition of children.
-        boolean first = true;
-        vb.add("(");
-        closingParens++;
-        for (ProcessNode node: children) {
-            if (!first) {
-                vb.add("||");
-            }
-            first = false;
-            VBox childBox = new VBox();
-            node.addInstantiations(names, localVars, childBox);
-            vb.add(new HBox("  ", childBox));
-        }
-
-        if (closingParens > 0) {
-            vb.add(Strings.duplicate(")", closingParens));
-        }
-        code.add(vb);
-    }
-
-    /**
-     * Add a <code>block({vread, vwrite, aread, awrite, sync}, ..</code> line for the given variable.
-     *
-     * @param varProc Variable process with the variable to block.
-     * @param names Names of the events.
-     * @param code Generated code (appended in-place).
-     * @return Number of additional closing parentheses to add at the end of the code.
-     */
-    private int addReadWriteBlocks(VariableProcessNode varProc, NameMaps names, VBox code) {
-        DiscVariable var = varProc.variable.variable;
-        String blockText = fmt("block({%s, %s, %s, %s},", names.getBehRead(var), names.getBehWrite(var),
-                names.getVarRead(var), names.getVarWrite(var));
-        HBox hb = new HBox();
-        hb.add(blockText);
-        code.add(hb);
-        return 1;
-    }
-
-    /**
-     * Rewrite read and write between variable and process to sync events.
-     *
-     * @param varProc Variable process with the variable to block.
-     * @param names Names of the events.
-     * @param code Generated code (appended in-place).
-     * @return Number of additional closing parentheses to add at the end of the code.
-     */
-    private int addReadWriteSync(VariableProcessNode varProc, NameMaps names, VBox code) {
-        DiscVariable var = varProc.variable.variable;
-        HBox hb = new HBox();
-        hb.add(fmt("hide({%s},", names.getVarSync(var)));
-        code.add(hb);
-        String rdSync = fmt("%s | %s -> %s", names.getBehRead(var), names.getVarRead(var), names.getVarSync(var));
-        String wtSync = fmt("%s | %s -> %s", names.getBehWrite(var), names.getVarWrite(var), names.getVarSync(var));
-        code.add(new HBox("comm(", vertBoxify(list(rdSync, wtSync)), ","));
-        return 2;
-    }
-
-    /**
-     * Add 'allow' wrapper around the process term of this node.
-     *
-     * @param names Mapping of CIF elements to mCRL2 names.
-     * @param code Output stream with code.
-     * @return Number of additional closing parentheses to add at the end of the code.
-     */
-    private int addAllows(NameMaps names, VBox code) {
-        List<String> allows = list();
-
-        // Add allowing reading values from the available values.
-        for (VariableData val: valueVars) {
-            if (!val.getHasValueAction()) {
-                continue;
-            }
-            allows.add(names.getVariableValue(val.variable));
-        }
-
-        // Add action combinations for the events with their variable accesses.
-        List<VarUsage> vus = list();
-        for (EventVarUsage evu: eventVarUse.values()) {
-            vus.clear();
-            for (VarUsage vu: evu.varUses.values()) {
-                vus.add(vu);
-            }
-            addActions(names.getEventName(evu.event), vus, 0, false, allows, names);
-        }
-        if (allows.isEmpty()) {
-            return 0;
-        }
-
-        code.add(new HBox("allow(", vertBoxify(allows), ","));
-        return 1;
-    }
-
-    /**
-     * Recursively expand 'varUsages' to a sequence of actions, both for reading and writing. For the 'never use' or
-     * 'always use' case there is one action to generate, for the 'sometimes use' there are two actions, automaton
-     * process access of the variable, and variable process access (or the empty action if no variable process is
-     * available at this point).
-     *
-     * @param prefix Action prefix constructed so far.
-     * @param varUsages Variable usages to expand.
-     * @param index Current variable in 'varUsages'.
-     * @param readAccess Generate action for write access or for read access of the variable.
-     * @param actions Collected complete allow actions.
-     * @param names Mapping of CIF element to mCRL2 names.
-     */
-    private void addActions(String prefix, List<VarUsage> varUsages, int index, boolean readAccess,
-            List<String> actions, NameMaps names)
-    {
-        if (index == varUsages.size()) {
-            actions.add(prefix);
-            return;
-        }
-
-        VarUsage vu = varUsages.get(index);
-        VariableData varData = vu.var;
-        DiscVariable dv = varData.variable;
-        // Add var usage for 'index'
-        if (readAccess) {
-            // Add read access for var 'index'
-            if (!vu.readAccess.everUsed || !vu.readAccess.alwaysUsed) {
-                // Never used, or sometimes used in behavior process.
-
-                // If there is a variable process, use its action instead.
-                if (availProcessVars.contains(varData)) {
-                    addActions(prefix + " | " + names.getVarRead(dv), varUsages, index + 1, false, actions, names);
-                } else {
-                    // No variable process either, skip this variable.
-                    addActions(prefix, varUsages, index + 1, false, actions, names);
-                }
-            }
-            if (vu.readAccess.everUsed) {
-                // Behavior process reads this variable.
-                addActions(prefix + " | " + names.getBehRead(dv), varUsages, index + 1, false, actions, names);
-            }
-        } else {
-            // Add write access for var 'index'
-            if (!vu.writeAccess.everUsed || !vu.writeAccess.alwaysUsed) {
-                // Never used, or sometimes used in behavior process.
-
-                // If there is a variable process, use its action instead.
-                if (availProcessVars.contains(varData)) {
-                    addActions(prefix + " | " + names.getVarWrite(dv), varUsages, index, true, actions, names);
-                } else {
-                    // No variable process either, skip this variable.
-                    addActions(prefix, varUsages, index, true, actions, names);
-                }
-            }
-            if (vu.writeAccess.everUsed) {
-                // Behavior process writes this variable.
-                addActions(prefix + " | " + names.getBehWrite(dv), varUsages, index, true, actions, names);
-            }
-        }
-    }
-
-    /**
-     * For each variable, the largest number of children that access it concurrently (for an event).
-     *
-     * @param names Map of CIF elements to mCRL2 names.
-     * @param code Output stream.
-     * @param mvra For each variable, the largest number of children that access it for reading concurrently (for any
-     *     event).
-     * @param mvwa For each variable, the largest number of children that access it for writing concurrently (for any
-     *     event).
-     * @return Number of additional closing parentheses needed at the end of the code.
-     */
-    private int addBehProcessSync(NameMaps names, VBox code, Map<VariableData, Integer> mvra,
-            Map<VariableData, Integer> mvwa)
-    {
-        // Sequence of action rewrites, "inside-out", innermost element is at
-        // index 0. Each element contains several independent rewrites.
-        List<List<String>> rewrites = list();
-
-        for (Entry<VariableData, Integer> entry: mvra.entrySet()) {
-            DiscVariable dv = entry.getKey().variable;
-            String behAction = names.getBehRead(dv);
-            addBehActionSync(rewrites, behAction, entry.getValue());
-        }
-        for (Entry<VariableData, Integer> entry: mvwa.entrySet()) {
-            DiscVariable dv = entry.getKey().variable;
-            String behAction = names.getBehWrite(dv);
-            addBehActionSync(rewrites, behAction, entry.getValue());
-        }
-
-        if (rewrites.isEmpty()) {
-            return 0;
-        }
-
-        for (int i = rewrites.size() - 1; i >= 0; i--) {
-            code.add(new HBox("comm(", vertBoxify(rewrites.get(i)), ","));
-        }
-        return rewrites.size();
-    }
-
-    /**
-     * Add an inside-out sequence of rewrite elements for synchronizing read or write actions of a variable by
-     * participating behavior processes.
-     *
-     * <p>
-     * Reduce the number of actions by iteratively mapping (count/2 + 1) actions to one, and updating the count.
-     * </p>
-     *
-     * @param rewrites Sequence of already generated rewrites.
-     * @param actName Action name to synchronize on.
-     * @param count Number of actions that should be reduced to 1.
-     */
-    private void addBehActionSync(List<List<String>> rewrites, String actName, int count) {
-        int index = 0;
-        while (true) {
-            if (count < 2) {
-                return; // 0 or 1 actions left -> no sync needed.
-            }
-
-            // Construct rewrite with floor(count / 2) + 1 actions to 1 action.
-            String s = "";
-            for (int i = 0; i < count / 2 + 1; i++) {
-                if (!s.isEmpty()) {
-                    s += " | ";
-                }
-                s += actName;
-            }
-            s += " -> " + actName;
-
-            // Add to list of rewrites, extending it if needed.
-            if (rewrites.size() == index) {
-                List<String> elm = list();
-                rewrites.add(elm);
-            }
-            rewrites.get(index).add(s);
-
-            count = count - (count / 2 + 1) + 1;
-            index++;
-        }
-    }
-
-    /**
-     * For each variable accessed by behavior processes, decide the largest number of participating processes (for all
-     * events).
-     *
-     * @param readAccess If set, inspect read access behavior, else inspect write access behavior.
-     * @return Largest number of participating behavior processes for each accessed variable.
-     */
-    private Map<VariableData, Integer> getMaxBehaviorProcessAccessCount(boolean readAccess) {
-        Set<VariableData> accessedVars = set();
-        for (ProcessNode node: children) {
-            for (EventVarUsage evu: node.eventVarUse.values()) {
-                accessedVars.addAll(evu.varUses.keySet());
-            }
-        }
-        Map<VariableData, Integer> maxCount = map();
-        for (VariableData vd: accessedVars) {
-            int largest = 0;
-            for (Event event: eventVarUse.keySet()) {
-                int total = 0;
-                for (ProcessNode node: children) {
-                    EventVarUsage evu = node.eventVarUse.get(event);
-                    if (evu == null) {
-                        continue;
-                    }
-
-                    VarUsage vu = evu.varUses.get(vd);
-                    if (vu == null) {
-                        continue;
-                    }
-
-                    if (readAccess) {
-                        if (vu.readAccess.everUsed) {
-                            total++;
-                        }
-                    } else {
-                        if (vu.writeAccess.everUsed) {
-                            total++;
-                        }
-                    }
-                }
-                if (largest < total) {
-                    largest = total;
-                }
-            }
-            maxCount.put(vd, largest);
-        }
-        return maxCount;
-    }
-
-    /**
-     * Perform synchronization on the events of the automata.
-     *
-     * @param names Mapping of CIF elements to mCRL2 names.
-     * @param code Output stream to write to.
-     * @return Number of additional closing parentheses to add at the end.
-     */
-    private int addEventSynchronization(NameMaps names, VBox code) {
-        List<Pair<Event, Integer>> eventCounts = list();
-
-        // Find events that need to be synchronized.
-        for (Event event: eventVarUse.keySet()) {
-            int count = 0;
-            for (ProcessNode node: children) {
-                if (node.eventVarUse.containsKey(event)) {
-                    count++;
-                }
-            }
-            if (count > 1) {
-                eventCounts.add(Pair.pair(event, count));
-            }
-        }
-        if (eventCounts.isEmpty()) {
-            return 0;
-        }
-
-        // Add renamed -> original rewrite.
-        {
-            List<String> lines = listc(eventCounts.size());
-            for (Pair<Event, Integer> evtCount: eventCounts) {
-                lines.add(fmt("%s -> %s", names.getRenamedEventName(evtCount.left), names.getEventName(evtCount.left)));
-            }
-            code.add(new HBox("rename(", vertBoxify(lines), ","));
-        }
-
-        // Forbid unrenamed events.
-        {
-            boolean first = true;
-            HBox line = new HBox();
-            for (Pair<Event, Integer> evtCount: eventCounts) {
-                if (!first) {
-                    line.add(", ");
-                }
-                first = false;
-                line.add(names.getEventName(evtCount.left));
-            }
-            code.add(new HBox("block({", line, "},"));
-        }
-
-        // Synchronize events + rename them.
-        {
-            List<String> lines = listc(eventCounts.size());
-            for (Pair<Event, Integer> evtCount: eventCounts) {
-                String eventName = names.getEventName(evtCount.left);
-
-                String line = "";
-                for (int count = 0; count < evtCount.right; count++) {
-                    if (!line.isEmpty()) {
-                        line += " | ";
-                    }
-                    line += eventName;
-                }
-                lines.add(fmt("%s -> %s", line, names.getRenamedEventName(evtCount.left)));
-            }
-            code.add(new HBox("comm(", vertBoxify(lines), ","));
-        }
-        return 3;
-    }
-
-    @Override
-    public void dumpActions(AppStreamCodeBox code) {
-        super.dumpActions(code);
-
-        code.add();
-        code.add("Children:");
-        code.indent();
-        for (ProcessNode pn: children) {
-            code.add("node " + pn.name);
-        }
-        code.dedent();
-
-        for (ProcessNode pn: children) {
-            code.add();
-            pn.dumpActions(code);
-        }
-    }
-
-    /**
-     * Construct a vertically aligned list of lines in a set-like notation.
-     *
-     * <p>
-     * For instance:
-     *
-     * <pre>
-     * {line1,
-     * line2,
-     * line3,
-     * line4}
-     * </pre>
-     * </p>
-     *
-     * @param lines Lines to vertically align.
-     * @return Box with the aligned lines.
-     */
-    private static VBox vertBoxify(List<String> lines) {
-        VBox vb = new VBox();
-        int last = lines.size() - 1;
-        for (int idx = 0; idx <= last; idx++) {
-            String line = fmt("%s%s%s", (idx == 0) ? "{" : " ", lines.get(idx), (idx == last) ? "}" : ",");
-            vb.add(line);
-        }
-        return vb;
-    }
-}
diff --git a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/tree/CombinedTextNode.java b/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/tree/CombinedTextNode.java
deleted file mode 100644
index b11b5f7625..0000000000
--- a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/tree/CombinedTextNode.java
+++ /dev/null
@@ -1,34 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Copyright (c) 2010, 2024 Contributors to the Eclipse Foundation
-//
-// See the NOTICE file(s) distributed with this work for additional
-// information regarding copyright ownership.
-//
-// This program and the accompanying materials are made available
-// under the terms of the MIT License which is available at
-// https://opensource.org/licenses/MIT
-//
-// SPDX-License-Identifier: MIT
-//////////////////////////////////////////////////////////////////////////////
-
-package org.eclipse.escet.cif.cif2mcrl2.tree;
-
-import java.util.List;
-
-import org.eclipse.escet.common.java.Assert;
-
-/** Text node containing one or more child text nodes. */
-public class CombinedTextNode extends TextNode {
-    /** Children of this combined node. */
-    public final List<TextNode> children;
-
-    /**
-     * Constructor of the {@link CombinedTextNode} class.
-     *
-     * @param children Children of the node.
-     */
-    public CombinedTextNode(List<TextNode> children) {
-        this.children = children;
-        Assert.check(!children.isEmpty());
-    }
-}
diff --git a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/tree/ElementaryTextNode.java b/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/tree/ElementaryTextNode.java
deleted file mode 100644
index 8c007cbef5..0000000000
--- a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/tree/ElementaryTextNode.java
+++ /dev/null
@@ -1,29 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Copyright (c) 2010, 2024 Contributors to the Eclipse Foundation
-//
-// See the NOTICE file(s) distributed with this work for additional
-// information regarding copyright ownership.
-//
-// This program and the accompanying materials are made available
-// under the terms of the MIT License which is available at
-// https://opensource.org/licenses/MIT
-//
-// SPDX-License-Identifier: MIT
-//////////////////////////////////////////////////////////////////////////////
-
-package org.eclipse.escet.cif.cif2mcrl2.tree;
-
-/** Leaf node in the text node tree. */
-public class ElementaryTextNode extends TextNode {
-    /** Name stored in the leaf. */
-    public final String name;
-
-    /**
-     * Constructor of the {@link ElementaryTextNode} class.
-     *
-     * @param name Name to store.
-     */
-    public ElementaryTextNode(String name) {
-        this.name = name;
-    }
-}
diff --git a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/tree/ProcessNode.java b/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/tree/ProcessNode.java
deleted file mode 100644
index 3f5f2db1a0..0000000000
--- a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/tree/ProcessNode.java
+++ /dev/null
@@ -1,146 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Copyright (c) 2010, 2024 Contributors to the Eclipse Foundation
-//
-// See the NOTICE file(s) distributed with this work for additional
-// information regarding copyright ownership.
-//
-// This program and the accompanying materials are made available
-// under the terms of the MIT License which is available at
-// https://opensource.org/licenses/MIT
-//
-// SPDX-License-Identifier: MIT
-//////////////////////////////////////////////////////////////////////////////
-
-package org.eclipse.escet.cif.cif2mcrl2.tree;
-
-import static org.eclipse.escet.common.java.Strings.fmt;
-
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-
-import org.eclipse.escet.cif.cif2mcrl2.NameMaps;
-import org.eclipse.escet.cif.cif2mcrl2.storage.EventVarUsage;
-import org.eclipse.escet.cif.cif2mcrl2.storage.VarUsage;
-import org.eclipse.escet.cif.cif2mcrl2.storage.VariableData;
-import org.eclipse.escet.cif.common.CifTextUtils;
-import org.eclipse.escet.cif.metamodel.cif.declarations.Event;
-import org.eclipse.escet.common.box.AppStreamCodeBox;
-import org.eclipse.escet.common.box.GridBox;
-import org.eclipse.escet.common.box.HBox;
-import org.eclipse.escet.common.box.VBox;
-import org.eclipse.escet.common.java.Assert;
-
-/** Node in the instance tree. */
-public abstract class ProcessNode {
-    /** Name of the node. */
-    public final String name;
-
-    /** Collection of variable processes available in this (sub-)tree. */
-    public Set<VariableData> availProcessVars = null;
-
-    /** How each event uses non-local variables. */
-    public Map<Event, EventVarUsage> eventVarUse = null;
-
-    /** Collection of variables available for querying their current value. */
-    public Set<VariableData> valueVars = null;
-
-    /**
-     * Constructor of the {@link ProcessNode} class.
-     *
-     * @param name Name of the node.
-     */
-    public ProcessNode(String name) {
-        this.name = name;
-    }
-
-    /**
-     * Get the name of the node as CIF element, if available.
-     *
-     * @return Name of the node as CIF element, or {@code null} if not available.
-     */
-    protected String getCifName() {
-        return null;
-    }
-
-    /**
-     * Perform bottom-up traversal of the tree, filling {@link #availProcessVars}, {@link #valueVars}, and
-     * {@link #eventVarUse} of the process nodes.
-     *
-     * @param localVars Variables that are not shared between automata processes.
-     */
-    public abstract void deriveActions(Set<VariableData> localVars);
-
-    /**
-     * Define the processes, location sorts, and actions.
-     *
-     * @param names Mapping of CIF elements to unique mCRL2 names.
-     * @param localVars Local variables of the entire system.
-     * @param code Output stream to write to.
-     */
-    public abstract void addDefinitions(NameMaps names, Set<VariableData> localVars, VBox code);
-
-    /**
-     * Instantiate the process tree.
-     *
-     * @param names Mapping of CIF elements to unique mCRL2 names.
-     * @param localVars Local variables of the entire system.
-     * @param code Output stream to write to.
-     */
-    public abstract void addInstantiations(NameMaps names, Set<VariableData> localVars, VBox code);
-
-    /**
-     * Dump the variable usage of the node. This method only writes output. Some nodes may want to override this for
-     * also dumping the child nodes.
-     *
-     * @param code Output stream to write to.
-     */
-    public void dumpActions(AppStreamCodeBox code) {
-        Map<VariableData, VarUsage> values;
-
-        code.add("===============================================================");
-        String cifName = getCifName();
-        cifName = (cifName == null) ? "" : " (" + cifName + ")";
-        code.add(fmt("Node %s%s", name, cifName));
-
-        if (!availProcessVars.isEmpty()) {
-            code.add();
-            code.add("Available variable processes:");
-            code.indent();
-            for (VariableData dv: availProcessVars) {
-                code.add(dv.name);
-            }
-            code.dedent();
-        }
-
-        if (!eventVarUse.isEmpty()) {
-            code.add();
-            code.add("Variable use by behavior processes ordered by event:");
-            code.indent();
-            for (Entry<Event, EventVarUsage> entry: eventVarUse.entrySet()) {
-                code.add(CifTextUtils.getAbsName(entry.getKey()) + ":");
-                code.indent();
-                values = entry.getValue().varUses;
-                if (values.isEmpty()) {
-                    code.add("No variables from variables processes accessed.");
-                } else {
-                    GridBox b = new GridBox(values.entrySet().size(), 3, 0, 2);
-                    int i = 0;
-                    for (Entry<VariableData, VarUsage> usages: values.entrySet()) {
-                        b.set(i, 0, usages.getKey().name);
-                        VarUsage vu = usages.getValue();
-                        HBox c = new HBox("read:", vu.readAccess.toString());
-                        b.set(i, 1, c);
-                        c = new HBox("write:", vu.writeAccess.toString());
-                        b.set(i, 2, c);
-                        i++;
-                    }
-                    Assert.check(i == values.entrySet().size());
-                    code.add(b);
-                }
-                code.dedent();
-            }
-            code.dedent();
-        }
-    }
-}
diff --git a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/tree/TextNode.java b/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/tree/TextNode.java
deleted file mode 100644
index 159b5fb138..0000000000
--- a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/tree/TextNode.java
+++ /dev/null
@@ -1,19 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Copyright (c) 2010, 2024 Contributors to the Eclipse Foundation
-//
-// See the NOTICE file(s) distributed with this work for additional
-// information regarding copyright ownership.
-//
-// This program and the accompanying materials are made available
-// under the terms of the MIT License which is available at
-// https://opensource.org/licenses/MIT
-//
-// SPDX-License-Identifier: MIT
-//////////////////////////////////////////////////////////////////////////////
-
-package org.eclipse.escet.cif.cif2mcrl2.tree;
-
-/** Base class of the text variant of the instance tree. */
-public abstract class TextNode {
-    // Nothing to do.
-}
diff --git a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/tree/VariableProcessNode.java b/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/tree/VariableProcessNode.java
deleted file mode 100644
index bdf311b9f6..0000000000
--- a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/tree/VariableProcessNode.java
+++ /dev/null
@@ -1,127 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Copyright (c) 2010, 2024 Contributors to the Eclipse Foundation
-//
-// See the NOTICE file(s) distributed with this work for additional
-// information regarding copyright ownership.
-//
-// This program and the accompanying materials are made available
-// under the terms of the MIT License which is available at
-// https://opensource.org/licenses/MIT
-//
-// SPDX-License-Identifier: MIT
-//////////////////////////////////////////////////////////////////////////////
-
-package org.eclipse.escet.cif.cif2mcrl2.tree;
-
-import static org.eclipse.escet.common.java.Lists.list;
-import static org.eclipse.escet.common.java.Maps.map;
-import static org.eclipse.escet.common.java.Sets.set;
-import static org.eclipse.escet.common.java.Strings.fmt;
-
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.escet.cif.cif2mcrl2.NameMaps;
-import org.eclipse.escet.cif.cif2mcrl2.storage.VariableData;
-import org.eclipse.escet.common.box.VBox;
-import org.eclipse.escet.common.java.Assert;
-
-/** Variable process node in the instance tree. */
-public class VariableProcessNode extends ProcessNode {
-    /** Variable represented by this node. */
-    public final VariableData variable;
-
-    /**
-     * Constructor of the {@link VariableProcessNode} class.
-     *
-     * @param name Name of the node.
-     * @param variable Variable represented by this node.
-     */
-    public VariableProcessNode(String name, VariableData variable) {
-        super(name);
-        this.variable = variable;
-    }
-
-    @Override
-    protected String getCifName() {
-        return "variable " + variable.name;
-    }
-
-    @Override
-    public void deriveActions(Set<VariableData> localVars) {
-        Assert.check(!localVars.contains(variable));
-
-        availProcessVars = set(variable);
-        valueVars = set(variable);
-        eventVarUse = map();
-    }
-
-    @Override
-    public void addDefinitions(NameMaps names, Set<VariableData> localVars, VBox code) {
-        String varProcName = names.getVariableProcess(variable.variable);
-        String varType = names.getTypeName(variable.getType());
-
-        String varValue = variable.getHasValueAction() ? names.getVariableValue(variable.variable) : null;
-        String varRead = names.getVarRead(variable.variable);
-        String behRead = names.getBehRead(variable.variable);
-        String varSync = names.getVarSync(variable.variable);
-        String varWrite = names.getVarWrite(variable.variable);
-        String behWrite = names.getBehWrite(variable.variable);
-
-        Integer bnd;
-        String sumPrefix, lower, upper;
-
-        // If the type has range limits, add them as conditions in the
-        // summation.
-        bnd = variable.getLowerLimit();
-        lower = (bnd == null) ? null : fmt("(m >= %d)", bnd);
-        bnd = variable.getUpperLimit();
-        upper = (bnd == null) ? null : fmt("(m <= %d)", bnd);
-
-        String sumText = "sum m:" + varType;
-        if (lower == null) {
-            if (upper == null) {
-                sumPrefix = sumText + " . true";
-            } else {
-                sumPrefix = sumText + " . " + upper;
-            }
-        } else {
-            if (upper == null) {
-                sumPrefix = sumText + " . " + lower;
-            } else {
-                sumPrefix = sumText + " . (" + lower + " && " + upper + ")";
-            }
-        }
-
-        // Action declarations: [value], vread, vwrite, sync, aread, awrite : <type>;
-        List<String> actions = list();
-        if (varValue != null) {
-            actions.add(varValue);
-        }
-        actions.add(varRead);
-        actions.add(varWrite);
-        actions.add(varSync);
-        actions.add(behRead);
-        actions.add(behWrite);
-        String actionsStr = String.join(", ", actions);
-        code.add(fmt("act %s : %s;", actionsStr, varType));
-        code.add();
-
-        // Variable process definition.
-        code.add(fmt("proc %s(v:%s) =", varProcName, varType));
-        if (varValue != null) {
-            code.add(fmt("  %s(v) . %s(v) +", varValue, varProcName));
-        }
-        code.add(fmt("  %s(v) . %s(v) +", varRead, varProcName));
-        code.add(fmt("  %s -> %s(m) . %s(m) +", sumPrefix, varWrite, varProcName));
-        code.add(fmt("  %s -> %s(v) | %s(m) . %s(m);", sumPrefix, varRead, varWrite, varProcName));
-
-        code.add(); // Add empty line as separation for the next definition.
-    }
-
-    @Override
-    public void addInstantiations(NameMaps names, Set<VariableData> localVars, VBox code) {
-        String varProcess = names.getVariableProcess(variable.variable);
-        code.add(fmt("%s(%s)", varProcess, variable.initialValue));
-    }
-}
-- 
GitLab


From 88802a07c5e3f1fe9aec9cde6c735bb141d14cc0 Mon Sep 17 00:00:00 2001
From: Dennis Hendriks <dh_tue@hotmail.com>
Date: Sun, 4 Aug 2024 16:21:45 +0200
Subject: [PATCH 03/18] #352 Reimplement CIF to mCRL2 using linearization.

- Less preprocessing before preconditions check.
- Disallow urgent locations/edges.
- Perform linearization.
- Eliminate type declarations as preprocessing.
- Removed instance tree and instance tree debug related options.
- Separated application from library.
- Derive mCRL2 names for CIF objects from their absolute names.
- No more summations in the mCRL2 code.
- No location pointer (sort) for automata with only one location.
---
 .../plugin.xml                                |   2 +-
 .../cif/cif2mcrl2/CifToMcrl2Application.java  | 128 ++++
 .../cif2mcrl2/CifToMcrl2CommandHandler.java   |  31 +
 .../cif/cif2mcrl2/CifToMcrl2PreChecker.java   |   8 +-
 .../cif/cif2mcrl2/CifToMcrl2Transformer.java  | 572 ++++++++++++++++++
 .../cif2mcrl2/GenerateValueActionsOption.java |  73 +++
 .../cif/cif2mcrl2/ProcessValueActions.java    | 189 ++++++
 7 files changed, 1001 insertions(+), 2 deletions(-)
 create mode 100644 cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/CifToMcrl2Application.java
 create mode 100644 cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/CifToMcrl2CommandHandler.java
 create mode 100644 cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/CifToMcrl2Transformer.java
 create mode 100644 cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/GenerateValueActionsOption.java
 create mode 100644 cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/ProcessValueActions.java

diff --git a/cif/org.eclipse.escet.cif.cif2mcrl2/plugin.xml b/cif/org.eclipse.escet.cif.cif2mcrl2/plugin.xml
index 7eff67d24d..d96adac78f 100644
--- a/cif/org.eclipse.escet.cif.cif2mcrl2/plugin.xml
+++ b/cif/org.eclipse.escet.cif.cif2mcrl2/plugin.xml
@@ -19,7 +19,7 @@
       </category>
       <command
          categoryId="org.eclipse.escet.cif.commands.category"
-         defaultHandler="org.eclipse.escet.cif.cif2mcrl2.Cif2Mcrl2CommandHandler"
+         defaultHandler="org.eclipse.escet.cif.cif2mcrl2.CifToMcrl2CommandHandler"
          id="org.eclipse.escet.cif.cif2mcrl2.CifToMcrl2Command"
          name="Convert CIF to mCRL2">
       </command>
diff --git a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/CifToMcrl2Application.java b/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/CifToMcrl2Application.java
new file mode 100644
index 0000000000..65651ae0f9
--- /dev/null
+++ b/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/CifToMcrl2Application.java
@@ -0,0 +1,128 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2010, 2024 Contributors to the Eclipse Foundation
+//
+// See the NOTICE file(s) distributed with this work for additional
+// information regarding copyright ownership.
+//
+// This program and the accompanying materials are made available
+// under the terms of the MIT License which is available at
+// https://opensource.org/licenses/MIT
+//
+// SPDX-License-Identifier: MIT
+//////////////////////////////////////////////////////////////////////////////
+
+package org.eclipse.escet.cif.cif2mcrl2;
+
+import static org.eclipse.escet.common.java.Lists.list;
+
+import java.util.List;
+
+import org.eclipse.escet.cif.io.CifReader;
+import org.eclipse.escet.cif.metamodel.cif.Specification;
+import org.eclipse.escet.common.app.framework.Application;
+import org.eclipse.escet.common.app.framework.Paths;
+import org.eclipse.escet.common.app.framework.io.AppStreams;
+import org.eclipse.escet.common.app.framework.options.InputFileOption;
+import org.eclipse.escet.common.app.framework.options.Option;
+import org.eclipse.escet.common.app.framework.options.OptionCategory;
+import org.eclipse.escet.common.app.framework.options.Options;
+import org.eclipse.escet.common.app.framework.options.OutputFileOption;
+import org.eclipse.escet.common.app.framework.output.IOutputComponent;
+import org.eclipse.escet.common.app.framework.output.OutputProvider;
+import org.eclipse.escet.common.box.CodeBox;
+
+/** CIF to mCRL2 transformation application. */
+public class CifToMcrl2Application extends Application<IOutputComponent> {
+    /**
+     * Application main method.
+     *
+     * @param args The command-line arguments supplied to the application.
+     */
+    public static void main(String[] args) {
+        CifToMcrl2Application cmApp = new CifToMcrl2Application();
+        cmApp.run(args, true);
+    }
+
+    /** Constructor for the {@link CifToMcrl2Application} class. */
+    public CifToMcrl2Application() {
+        // Nothing to do.
+    }
+
+    /**
+     * Constructor of the {@link CifToMcrl2Application} class.
+     *
+     * @param streams The streams to use for input, output, warning, and error streams.
+     */
+    public CifToMcrl2Application(AppStreams streams) {
+        super(streams);
+    }
+
+    @Override
+    protected int runInternal() {
+        // Read CIF input.
+        CifReader cifReader = new CifReader().init();
+        Specification spec = cifReader.read();
+        String absSpecPath = Paths.resolve(InputFileOption.getPath());
+        if (isTerminationRequested()) {
+            return 0;
+        }
+
+        // Transform.
+        String valueActionPatterns = GenerateValueActionsOption.getValue();
+        CifToMcrl2Transformer transformer = new CifToMcrl2Transformer(() -> isTerminationRequested(),
+                OutputProvider.getWarningOutputStream());
+        CodeBox code = transformer.transform(spec, absSpecPath, valueActionPatterns);
+
+        // Write mCRL2 file.
+        String outPath = OutputFileOption.getDerivedPath(".cif", ".mcrl2");
+        String absOutPath = Paths.resolve(outPath);
+        code.writeToFile(outPath, absOutPath);
+
+        // Done.
+        return 0;
+    }
+
+    @Override
+    public String getAppName() {
+        return "CIF to mCRL2 transformer";
+    }
+
+    @Override
+    public String getAppDescription() {
+        return "Convert CIF specification to mCRL2.";
+    }
+
+    @Override
+    protected OutputProvider<IOutputComponent> getProvider() {
+        return new OutputProvider<>();
+    }
+
+    /**
+     * Options specific to the CIF to mCRL2 transformer.
+     *
+     * @return Options specific to the CIF to mCRL2 transformer.
+     */
+    private OptionCategory getConvertOptionsCategory() {
+        List<OptionCategory> subPages = list();
+
+        @SuppressWarnings("rawtypes")
+        List<Option> options = list();
+        options.add(Options.getInstance(InputFileOption.class));
+        options.add(Options.getInstance(GenerateValueActionsOption.class));
+        options.add(Options.getInstance(OutputFileOption.class));
+        return new OptionCategory("CIF to mCRL2 options", "Options for converting a CIF specification to mCRL2.",
+                subPages, options);
+    }
+
+    @Override
+    protected OptionCategory getAllOptions() {
+        List<OptionCategory> subPages = list();
+        subPages.add(getGeneralOptionCategory());
+        subPages.add(getConvertOptionsCategory());
+
+        @SuppressWarnings("rawtypes")
+        List<Option> options = list();
+        String optDesc = "All options for the conversion from CIF to mCRL2.";
+        return new OptionCategory("CIF to mCRL2 conversion options", optDesc, subPages, options);
+    }
+}
diff --git a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/CifToMcrl2CommandHandler.java b/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/CifToMcrl2CommandHandler.java
new file mode 100644
index 0000000000..2a601fabb8
--- /dev/null
+++ b/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/CifToMcrl2CommandHandler.java
@@ -0,0 +1,31 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2010, 2024 Contributors to the Eclipse Foundation
+//
+// See the NOTICE file(s) distributed with this work for additional
+// information regarding copyright ownership.
+//
+// This program and the accompanying materials are made available
+// under the terms of the MIT License which is available at
+// https://opensource.org/licenses/MIT
+//
+// SPDX-License-Identifier: MIT
+//////////////////////////////////////////////////////////////////////////////
+
+package org.eclipse.escet.cif.cif2mcrl2;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.escet.common.app.framework.Application;
+import org.eclipse.escet.common.eclipse.ui.SingleFileCommandHandler;
+
+/** Handler for Eclipse UI command for CIF to mCRL2 transformation. */
+public class CifToMcrl2CommandHandler extends SingleFileCommandHandler {
+    @Override
+    protected String[] getCommandLineArgs(IFile file) {
+        return new String[] {getFileName(file), "--option-dialog=yes"};
+    }
+
+    @Override
+    protected Class<? extends Application<?>> getApplicationClass() {
+        return CifToMcrl2Application.class;
+    }
+}
diff --git a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/CifToMcrl2PreChecker.java b/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/CifToMcrl2PreChecker.java
index 6a62af904d..e209ec74f4 100644
--- a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/CifToMcrl2PreChecker.java
+++ b/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/CifToMcrl2PreChecker.java
@@ -17,6 +17,7 @@ import org.eclipse.escet.cif.checkers.CifPreconditionChecker;
 import org.eclipse.escet.cif.checkers.checks.AutOnlyWithCertainNumberOfInitLocsCheck;
 import org.eclipse.escet.cif.checkers.checks.AutOnlyWithCertainNumberOfInitLocsCheck.AllowedNumberOfInitLocs;
 import org.eclipse.escet.cif.checkers.checks.CompNoInitPredsCheck;
+import org.eclipse.escet.cif.checkers.checks.EdgeNoUrgentCheck;
 import org.eclipse.escet.cif.checkers.checks.EdgeOnlySimpleAssignmentsCheck;
 import org.eclipse.escet.cif.checkers.checks.EqnNotAllowedCheck;
 import org.eclipse.escet.cif.checkers.checks.EventNoChannelsCheck;
@@ -28,6 +29,7 @@ import org.eclipse.escet.cif.checkers.checks.ExprNoSpecificExprsCheck.NoSpecific
 import org.eclipse.escet.cif.checkers.checks.ExprNoSpecificUnaryExprsCheck;
 import org.eclipse.escet.cif.checkers.checks.ExprNoSpecificUnaryExprsCheck.NoSpecificUnaryOp;
 import org.eclipse.escet.cif.checkers.checks.InvNoSpecificInvsCheck;
+import org.eclipse.escet.cif.checkers.checks.LocNoUrgentCheck;
 import org.eclipse.escet.cif.checkers.checks.SpecAutomataCountsCheck;
 import org.eclipse.escet.cif.checkers.checks.TypeNoSpecificTypesCheck;
 import org.eclipse.escet.cif.checkers.checks.TypeNoSpecificTypesCheck.NoSpecificType;
@@ -166,7 +168,11 @@ public class CifToMcrl2PreChecker extends CifPreconditionChecker {
 
                 // No invariants.
                 new InvNoSpecificInvsCheck().disallow(
-                        NoInvariantSupKind.ALL_KINDS, NoInvariantKind.ALL_KINDS, NoInvariantPlaceKind.ALL_PLACES)
+                        NoInvariantSupKind.ALL_KINDS, NoInvariantKind.ALL_KINDS, NoInvariantPlaceKind.ALL_PLACES),
+
+                // No urgency.
+                new LocNoUrgentCheck(),
+                new EdgeNoUrgentCheck()
 
         );
     }
diff --git a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/CifToMcrl2Transformer.java b/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/CifToMcrl2Transformer.java
new file mode 100644
index 0000000000..afc73940cb
--- /dev/null
+++ b/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/CifToMcrl2Transformer.java
@@ -0,0 +1,572 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2024 Contributors to the Eclipse Foundation
+//
+// See the NOTICE file(s) distributed with this work for additional
+// information regarding copyright ownership.
+//
+// This program and the accompanying materials are made available
+// under the terms of the MIT License which is available at
+// https://opensource.org/licenses/MIT
+//
+// SPDX-License-Identifier: MIT
+//////////////////////////////////////////////////////////////////////////////
+
+package org.eclipse.escet.cif.cif2mcrl2;
+
+import static org.eclipse.escet.common.java.Lists.first;
+import static org.eclipse.escet.common.java.Lists.list;
+import static org.eclipse.escet.common.java.Lists.listc;
+import static org.eclipse.escet.common.java.Maps.mapc;
+import static org.eclipse.escet.common.java.Sets.set;
+import static org.eclipse.escet.common.java.Strings.fmt;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+import org.eclipse.escet.cif.cif2cif.AddDefaultInitialValues;
+import org.eclipse.escet.cif.cif2cif.ElimAlgVariables;
+import org.eclipse.escet.cif.cif2cif.ElimComponentDefInst;
+import org.eclipse.escet.cif.cif2cif.ElimConsts;
+import org.eclipse.escet.cif.cif2cif.ElimTypeDecls;
+import org.eclipse.escet.cif.cif2cif.LinearizeProduct;
+import org.eclipse.escet.cif.cif2cif.RemoveAnnotations;
+import org.eclipse.escet.cif.cif2cif.RemoveIoDecls;
+import org.eclipse.escet.cif.cif2cif.SimplifyValues;
+import org.eclipse.escet.cif.common.CifCollectUtils;
+import org.eclipse.escet.cif.common.CifEnumUtils;
+import org.eclipse.escet.cif.common.CifEvalException;
+import org.eclipse.escet.cif.common.CifEvalUtils;
+import org.eclipse.escet.cif.common.CifTextUtils;
+import org.eclipse.escet.cif.common.CifTypeUtils;
+import org.eclipse.escet.cif.metamodel.cif.Specification;
+import org.eclipse.escet.cif.metamodel.cif.automata.Assignment;
+import org.eclipse.escet.cif.metamodel.cif.automata.Automaton;
+import org.eclipse.escet.cif.metamodel.cif.automata.Edge;
+import org.eclipse.escet.cif.metamodel.cif.automata.EdgeEvent;
+import org.eclipse.escet.cif.metamodel.cif.automata.Location;
+import org.eclipse.escet.cif.metamodel.cif.automata.Update;
+import org.eclipse.escet.cif.metamodel.cif.declarations.DiscVariable;
+import org.eclipse.escet.cif.metamodel.cif.declarations.EnumDecl;
+import org.eclipse.escet.cif.metamodel.cif.declarations.EnumLiteral;
+import org.eclipse.escet.cif.metamodel.cif.declarations.Event;
+import org.eclipse.escet.cif.metamodel.cif.declarations.VariableValue;
+import org.eclipse.escet.cif.metamodel.cif.expressions.BinaryExpression;
+import org.eclipse.escet.cif.metamodel.cif.expressions.BoolExpression;
+import org.eclipse.escet.cif.metamodel.cif.expressions.DiscVariableExpression;
+import org.eclipse.escet.cif.metamodel.cif.expressions.EnumLiteralExpression;
+import org.eclipse.escet.cif.metamodel.cif.expressions.EventExpression;
+import org.eclipse.escet.cif.metamodel.cif.expressions.Expression;
+import org.eclipse.escet.cif.metamodel.cif.expressions.IntExpression;
+import org.eclipse.escet.cif.metamodel.cif.expressions.UnaryExpression;
+import org.eclipse.escet.cif.metamodel.cif.types.BoolType;
+import org.eclipse.escet.cif.metamodel.cif.types.CifType;
+import org.eclipse.escet.cif.metamodel.cif.types.EnumType;
+import org.eclipse.escet.cif.metamodel.cif.types.IntType;
+import org.eclipse.escet.common.box.CodeBox;
+import org.eclipse.escet.common.box.MemoryCodeBox;
+import org.eclipse.escet.common.java.Assert;
+import org.eclipse.escet.common.java.Sets;
+import org.eclipse.escet.common.java.Termination;
+import org.eclipse.escet.common.java.output.WarnOutput;
+import org.eclipse.escet.common.position.metamodel.position.PositionObject;
+
+/** CIF to mCRL2 transformer. */
+public class CifToMcrl2Transformer {
+    /** Cooperative termination query function. */
+    private final Termination termination;
+
+    /** Callback to send warnings to the user. */
+    private final WarnOutput warnOutput;
+
+    /** Per CIF enumeration, its representative. Is {@code null} if not yet initialized. */
+    private Map<EnumDecl, EnumDecl> enums;
+
+    /**
+     * Per discrete variable of the original CIF specification, its original absolute name. Is {@code null} if not yet
+     * initialized.
+     */
+    private Map<DiscVariable, String> origVarNames;
+
+    /**
+     * Per location pointer variable introduced during linearization, its original absolute automaton name. Is
+     * {@code null} if not yet initialized.
+     */
+    private Map<DiscVariable, String> origAutNames;
+
+    /**
+     * Constructor for the {@link CifToMcrl2Transformer} class.
+     *
+     * @param termination Cooperative termination query function.
+     * @param warnOutput Callback to send warnings to the user.
+     */
+    public CifToMcrl2Transformer(Termination termination, WarnOutput warnOutput) {
+        this.termination = termination;
+        this.warnOutput = warnOutput;
+    }
+
+    /**
+     * Transform a CIF specification to an mCRL2 model.
+     *
+     * @param spec The CIF specification. The specification is modified in-place.
+     * @param absSpecPath The absolute local file system path to the CIF file.
+     * @param valueActionPatterns The 'value' action patterns.
+     * @return The mCRL2 model.
+     */
+    public CodeBox transform(Specification spec, String absSpecPath, String valueActionPatterns) {
+        // Perform preprocessing to increase the supported subset.
+        preprocess1(spec);
+
+        // Check preconditions.
+        CifToMcrl2PreChecker checker = new CifToMcrl2PreChecker(termination);
+        checker.reportPreconditionViolations(spec, absSpecPath, "CIF to mCRL2 transformation");
+
+        // Get original discrete variables and their original absolute names.
+        List<DiscVariable> origVars = CifCollectUtils.collectDiscVariables(spec, list());
+        origVarNames = origVars.stream().collect(Collectors.toMap(v -> v, v -> CifTextUtils.getAbsName(v, false)));
+
+        // Perform additional pre-processing to ease the transformation. Also collect location pointer variables and
+        // their original absolute automata names.
+        origAutNames = preprocess2(spec);
+
+        // Collect relevant declarations from the specification.
+        enums = CifEnumUtils.getEnumDeclReprs(CifCollectUtils.collectEnumDecls(spec, list()));
+        List<DiscVariable> vars = CifCollectUtils.collectDiscVariables(spec, list());
+        List<Event> events = CifCollectUtils.collectEvents(spec, list());
+
+        // Collect linearized edges from the specification.
+        List<Automaton> linearizedAuts = CifCollectUtils.collectAutomata(spec, list());
+        Assert.areEqual(linearizedAuts.size(), 1);
+        Automaton aut = first(linearizedAuts);
+        Assert.areEqual(aut.getLocations().size(), 1);
+        Location loc = first(aut.getLocations());
+        List<Edge> edges = loc.getEdges();
+
+        // Collect variables from linearized specification that require 'value' actions.
+        Set<DiscVariable> valueActionVars = determineValueActionVars(vars, valueActionPatterns);
+
+        // Generate the mCRL2 code.
+        MemoryCodeBox code = new MemoryCodeBox();
+        code.add("% Generated by CIF to mCRL2.");
+        code.add();
+        addSortsForEnums(code);
+        addActionsForEvents(events, code);
+        addVarValueActions(valueActionVars, code);
+        addProcessForVarsAndEdges(vars, valueActionVars, edges, code);
+        addInstantiationForInit(vars, code);
+
+        // Return the generated model.
+        return code;
+    }
+
+    /**
+     * Perform preprocessing to increase the supported subset of models.
+     *
+     * @param spec The CIF specification to preprocess. Is modified in-place.
+     */
+    private void preprocess1(Specification spec) {
+        // Remove/ignore I/O declarations, to increase the supported subset.
+        RemoveIoDecls removeIoDecls = new RemoveIoDecls();
+        removeIoDecls.transform(spec);
+        if (removeIoDecls.haveAnySvgInputDeclarationsBeenRemoved()) {
+            warnOutput.line("The specification contains CIF/SVG input declarations. These will be ignored.");
+        }
+
+        // Perform preprocessing on the specification. The most expensive variant of value simplification is used, to
+        // inline (and thus support) constants, and get the most simple result.
+        new RemoveAnnotations().transform(spec);
+        new ElimComponentDefInst().transform(spec);
+        new SimplifyValues().transform(spec);
+    }
+
+    /**
+     * Perform additional pre-processing to ease the transformation.
+     *
+     * @param spec The CIF specification to pre-process. Is modified in-place.
+     * @return Per location pointer variable introduced during linearization, its original absolute automaton name.
+     */
+    private Map<DiscVariable, String> preprocess2(Specification spec) {
+        // Inline type declarations.
+        new ElimTypeDecls().transform(spec);
+
+        // Inline algebraic constants and algebraic variables.
+        new ElimConsts().transform(spec);
+        new ElimAlgVariables().transform(spec);
+
+        // Add default initial values to variables.
+        new AddDefaultInitialValues().transform(spec);
+
+        // Linearize the specification.
+        LinearizeProduct linearize = new LinearizeProduct(true);
+        linearize.transform(spec);
+        return linearize.getLpVarToAbsAutNameMap();
+    }
+
+    /**
+     * Determine the variables of the linearized specification for which 'value' actions are to be generated.
+     *
+     * @param vars The variables of the linearized CIF specification.
+     * @param valueActionPatterns Patterns for selecting variables and automata that get 'value' actions.
+     * @return The variables of the linearized CIF specification that get 'value' actions.
+     */
+    private Set<DiscVariable> determineValueActionVars(List<DiscVariable> vars, String valueActionPatterns) {
+        // Get name to discrete variable mapping.
+        Map<String, DiscVariable> namesMap = mapc(origVarNames.size() + origAutNames.size());
+        for (Entry<DiscVariable, String> entry: origVarNames.entrySet()) {
+            DiscVariable prev = namesMap.put(entry.getValue(), entry.getKey());
+            Assert.check(prev == null); // No duplicates.
+        }
+        for (Entry<DiscVariable, String> entry: origAutNames.entrySet()) {
+            DiscVariable prev = namesMap.put(entry.getValue(), entry.getKey());
+            Assert.check(prev == null); // No duplicates.
+        }
+
+        // Get set of all names to match against.
+        Set<String> names = set();
+        names.addAll(origVarNames.values());
+        names.addAll(origAutNames.values());
+        names = Sets.list2set(Sets.sortedstrings(names));
+
+        // Match names against the patterns to determine the names to include.
+        Set<String> includeNames = ProcessValueActions.matchNames(valueActionPatterns, names, warnOutput);
+
+        // Get the variables of the linearized specification that should get 'value' actions.
+        Set<DiscVariable> result = includeNames.stream().map(n -> namesMap.get(n)).collect(Sets.toSet());
+        Assert.check(vars.containsAll(result)); // Select a subset of the variables from the linearized specification.
+        return result;
+    }
+
+    /**
+     * Add mCRL2 sorts for the representative CIF enumerations.
+     *
+     * @param code The mCRL2 code generated so far. Is extended in-place.
+     */
+    private void addSortsForEnums(MemoryCodeBox code) {
+        // Skip if no enums.
+        if (enums.isEmpty()) {
+            return;
+        }
+
+        // Generate a sort for each unique representative enumeration.
+        code.add("% Sorts for CIF enumerations.");
+        for (EnumDecl enumDecl: enums.values().stream().collect(Sets.toSet())) {
+            String litNames = enumDecl.getLiterals().stream().map(l -> getName(l)).collect(Collectors.joining(" | "));
+            code.add("sort %s = struct %s;", getName(enumDecl), litNames);
+        }
+        code.add();
+    }
+
+    /**
+     * Add mCRL2 actions for the CIF events.
+     *
+     * @param events The CIF events.
+     * @param code The mCRL2 code generated so far. Is extended in-place.
+     */
+    private void addActionsForEvents(List<Event> events, MemoryCodeBox code) {
+        // Skip if no events.
+        if (events.isEmpty()) {
+            return;
+        }
+
+        // Generate an action for each event.
+        code.add("% Actions for CIF events.");
+        for (Event event: events) {
+            code.add("act %s;", getName(event));
+        }
+        code.add();
+    }
+
+    /**
+     * Add mCRL2 actions for the variable 'value' actions.
+     *
+     * @param vars The CIF variables that should get a variable 'value' action.
+     * @param code The mCRL2 code generated so far. Is extended in-place.
+     */
+    private void addVarValueActions(Set<DiscVariable> vars, MemoryCodeBox code) {
+        // Skip if no variables.
+        if (vars.isEmpty()) {
+            return;
+        }
+
+        // Generate an action for each variable.
+        code.add("% Actions for CIF variables having certain values.");
+        for (DiscVariable var: vars) {
+            code.add("act %s'varvalue: %s;", getName(var), generateSortExprForType(var.getType()));
+        }
+        code.add();
+    }
+
+    /**
+     * Add an mCRL2 process for the CIF variables and edges.
+     *
+     * @param vars The CIF variables.
+     * @param valueActVars The CIF variables that should get a variable 'value' action.
+     * @param edges The CIF edges.
+     * @param code The mCRL2 code generated so far. Is extended in-place.
+     */
+    private void addProcessForVarsAndEdges(List<DiscVariable> vars, Set<DiscVariable> valueActVars, List<Edge> edges,
+            MemoryCodeBox code)
+    {
+        // Get integer-typed variables.
+        List<DiscVariable> intVars = vars.stream().filter(v -> v.getType() instanceof IntType).toList();
+
+        // Generate header.
+        code.add("% Process for behavior of the CIF specification.");
+        if (vars.isEmpty()) {
+            code.add("proc P =");
+        } else {
+            code.add("proc P(");
+            code.indent();
+            for (int i = 0; i < vars.size(); i++) {
+                DiscVariable var = vars.get(i);
+                boolean isLast = i == vars.size() - 1;
+                code.add("%s: %s%s", getName(var), generateSortExprForType(var.getType()), isLast ? "" : ",");
+            }
+            code.dedent();
+            code.add(") =");
+        }
+
+        // Generate body.
+        code.indent();
+        if (edges.isEmpty() && valueActVars.isEmpty() && intVars.isEmpty()) {
+            code.add("delta");
+        } else {
+            // Add for edges.
+            boolean first = true;
+            boolean firstEdge = true;
+            for (Edge edge: edges) {
+                if (!first) {
+                    code.add("+");
+                }
+                first = false;
+                if (firstEdge) {
+                    code.add("% CIF linearized edges.");
+                    firstEdge = false;
+                }
+                addProcessExprForEdge(edge, vars, code);
+            }
+
+            // Add for variable 'value' actions.
+            boolean firstValueAct = true;
+            for (DiscVariable valueActVar: valueActVars) {
+                if (!first) {
+                    code.add("+");
+                }
+                first = false;
+                if (firstValueAct) {
+                    code.add("% CIF variable value actions.");
+                    firstValueAct = false;
+                }
+                addProcessExprForValueActVar(valueActVar, code);
+            }
+        }
+        code.dedent();
+        code.add(";");
+    }
+
+    /**
+     * Generate an mCRL2 sort expressions for a CIF type.
+     *
+     * @param type The CIF type.
+     * @return The mCRL2 sort expression.
+     */
+    private String generateSortExprForType(CifType type) {
+        if (type instanceof BoolType) {
+            return "Bool";
+        } else if (type instanceof IntType) {
+            return "Int";
+        } else if (type instanceof EnumType enumType) {
+            EnumDecl representative = enums.get(enumType.getEnum());
+            return getName(representative);
+        } else {
+            throw new RuntimeException("Unexpected type: " + type);
+        }
+    }
+
+    /**
+     * Add an mCRL2 process expression for a CIF edge.
+     *
+     * @param edge The CIF edge.
+     * @param vars The CIF variables of the linearized specification.
+     * @param code The mCRL2 code generated so far. Is extended in-place.
+     */
+    private void addProcessExprForEdge(Edge edge, List<DiscVariable> vars, MemoryCodeBox code) {
+        // Convert guards of the linearized edge. Skip 'true' guards.
+        List<String> guards = edge.getGuards().stream().map(g -> generateExpr(g)).filter(g -> !g.equals("true"))
+                .collect(Collectors.toList());
+
+        // Make sure that assigned integer variables don't go out of range. Prevents runtime errors.
+        Map<DiscVariable, Expression> assignments = getAssignments(edge.getUpdates());
+        List<DiscVariable> intVars = vars.stream().filter(v -> v.getType() instanceof IntType).toList();
+        for (DiscVariable var: intVars) {
+            Expression newValue = assignments.get(var);
+            if (newValue != null) {
+                int lower = CifTypeUtils.getLowerBound((IntType)var.getType());
+                int upper = CifTypeUtils.getUpperBound((IntType)var.getType());
+                guards.add(fmt("%s <= %s", lower, generateExpr(newValue)));
+                guards.add(fmt("%s <= %s", generateExpr(newValue), upper));
+            }
+        }
+
+        // Generate single mCRL2 guard expression.
+        String guard = guards.isEmpty() ? "true" : String.join(" && ", guards);
+
+        // Get event.
+        Assert.areEqual(edge.getEvents().size(), 1);
+        EdgeEvent edgeEvent = first(edge.getEvents());
+        Expression eventRef = edgeEvent.getEvent();
+        Assert.check(eventRef instanceof EventExpression);
+        Event event = ((EventExpression)eventRef).getEvent();
+
+        // Get updates.
+        String updates = assignments.entrySet().stream().map(
+                (Entry<DiscVariable, Expression> e) -> fmt("%s = %s", getName(e.getKey()), generateExpr(e.getValue())))
+                .collect(Collectors.joining(", "));
+
+        // Generate process expression.
+        code.add("(%s) -> %s . P(%s)", guard, getName(event), updates);
+    }
+
+    /**
+     * Get a mapping from assigned variables to their assigned expressions.
+     *
+     * @param updates The CIF updates to consider.
+     * @return The mapping.
+     */
+    private Map<DiscVariable, Expression> getAssignments(List<Update> updates) {
+        Map<DiscVariable, Expression> result = mapc(updates.size());
+        for (Update update: updates) {
+            // Get assignment.
+            Assert.check(update instanceof Assignment);
+            Assignment asgn = (Assignment)update;
+
+            // Get variable and value.
+            Assert.check(asgn.getAddressable() instanceof DiscVariableExpression);
+            DiscVariable var = ((DiscVariableExpression)asgn.getAddressable()).getVariable();
+            Expression value = asgn.getValue();
+
+            // Add to mapping.
+            Expression prev = result.put(var, value);
+            Assert.check(prev == null);
+        }
+        return result;
+    }
+
+    /**
+     * Add an mCRL2 process expression for a variable 'value' action.
+     *
+     * @param var The CIF variable for which to add the variable 'value' action.
+     * @param code The mCRL2 code generated so far. Is extended in-place.
+     */
+    private void addProcessExprForValueActVar(DiscVariable var, MemoryCodeBox code) {
+        code.add("%s'varvalue(%s) . P()", getName(var), getName(var));
+    }
+
+    /**
+     * Generate an mCRL2 data expression for a CIF expression.
+     *
+     * @param expr The CIF expression.
+     * @return The mCRL2 data expression.
+     */
+    private String generateExpr(Expression expr) {
+        if (expr instanceof BoolExpression boolExpr) {
+            return boolExpr.isValue() ? "true" : "false";
+        } else if (expr instanceof BinaryExpression binExpr) {
+            String left = generateExpr(binExpr.getLeft());
+            String right = generateExpr(binExpr.getRight());
+            String op = switch (binExpr.getOperator()) {
+                case ADDITION -> "+";
+                case CONJUNCTION -> "&&";
+                case DISJUNCTION -> "||";
+                case EQUAL -> "==";
+                case GREATER_EQUAL -> ">=";
+                case GREATER_THAN -> ">";
+                case IMPLICATION -> "=>";
+                case LESS_EQUAL -> "<=";
+                case LESS_THAN -> "<";
+                case MULTIPLICATION -> "*";
+                case SUBTRACTION -> "-";
+                case UNEQUAL -> "!=";
+                default -> throw new RuntimeException("Unexpected operator: " + binExpr.getOperator());
+            };
+            return fmt("(%s %s %s)", left, op, right);
+        } else if (expr instanceof UnaryExpression unExpr) {
+            String child = generateExpr(unExpr.getChild());
+            String op = switch (unExpr.getOperator()) {
+                case INVERSE -> "!";
+                case NEGATE -> "-";
+                case PLUS -> "";
+                default -> throw new RuntimeException("Unexpected operator: " + unExpr.getOperator());
+            };
+            return fmt("%s%s", op, child);
+        } else if (expr instanceof DiscVariableExpression discRefExpr) {
+            return getName(discRefExpr.getVariable());
+        } else if (expr instanceof IntExpression intLitExpr) {
+            return Integer.toString(intLitExpr.getValue());
+        } else if (expr instanceof EnumLiteralExpression enumLitRefExpr) {
+            EnumLiteral refEnumLit = enumLitRefExpr.getLiteral();
+            EnumDecl refEnumDecl = (EnumDecl)refEnumLit.eContainer();
+            int litIdx = refEnumDecl.getLiterals().indexOf(refEnumLit);
+            EnumDecl representativeEnumDecl = enums.get(refEnumDecl);
+            EnumLiteral representativeEnumLit = representativeEnumDecl.getLiterals().get(litIdx);
+            return getName(representativeEnumLit);
+        }
+        throw new RuntimeException("Unexpected expression: " + expr);
+    }
+
+    /**
+     * Add an mCRL2 instantiation for the initial values of the variables.
+     *
+     * @param vars The variables.
+     * @param code The code generated so far. Is extended in-place.
+     */
+    private void addInstantiationForInit(List<DiscVariable> vars, MemoryCodeBox code) {
+        List<String> initExprs = listc(vars.size());
+        for (DiscVariable var: vars) {
+            // Get initial value.
+            VariableValue varValue = var.getValue();
+            Assert.areEqual(varValue.getValues().size(), 1);
+            Expression value = first(varValue.getValues());
+
+            // Evaluate statically. For negative integer values, this may not be a literal, but still an expression.
+            try {
+                value = CifEvalUtils.evalAsExpr(value, true);
+            } catch (CifEvalException e) {
+                throw new RuntimeException("Precondition violation.", e);
+            }
+
+            // Add initial value.
+            initExprs.add(generateExpr(value));
+        }
+
+        code.add();
+        code.add("% Initialization.");
+        code.add("init P(%s);", String.join(", ", initExprs));
+    }
+
+    /**
+     * Get the mCRL2 name for a CIF object.
+     *
+     * @param cifObject The CIF object.
+     * @return The mCRL2 name.
+     */
+    private String getName(PositionObject cifObject) {
+        // Get absolute names. Since discrete variables are moved to the single linearized automaton during
+        // linearization, use their original variable/automaton names.
+        String name;
+        if (cifObject instanceof DiscVariable dvar && origVarNames.containsKey(dvar)) {
+            name = origVarNames.get(dvar);
+        } else if (cifObject instanceof DiscVariable dvar && origAutNames.containsKey(dvar)) {
+            name = origAutNames.get(dvar);
+        } else {
+            name = CifTextUtils.getAbsName(cifObject, false);
+        }
+
+        // Make an mCRL2 name. Replace dots by apostrophes. Add one at the end to avoid clashes with mCRL2 keywords.
+        name = name.replace('.', '\'');
+        name += "'";
+        return name;
+    }
+}
diff --git a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/GenerateValueActionsOption.java b/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/GenerateValueActionsOption.java
new file mode 100644
index 0000000000..8e14455144
--- /dev/null
+++ b/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/GenerateValueActionsOption.java
@@ -0,0 +1,73 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2010, 2024 Contributors to the Eclipse Foundation
+//
+// See the NOTICE file(s) distributed with this work for additional
+// information regarding copyright ownership.
+//
+// This program and the accompanying materials are made available
+// under the terms of the MIT License which is available at
+// https://opensource.org/licenses/MIT
+//
+// SPDX-License-Identifier: MIT
+//////////////////////////////////////////////////////////////////////////////
+
+package org.eclipse.escet.cif.cif2mcrl2;
+
+import static org.eclipse.escet.common.java.Strings.fmt;
+
+import org.eclipse.escet.common.app.framework.options.Options;
+import org.eclipse.escet.common.app.framework.options.StringOption;
+
+/** Option to specify the variables that need to have a 'value' action. */
+public class GenerateValueActionsOption extends StringOption {
+    /** Name of the option. */
+    private static final String NAME = "Generate 'value' actions";
+
+    /** Description in the option dialog. */
+    private static final String OPT_DIALOG_DESCR = "Option to specify which variables and automata should get a "
+            + "'value' action in the generated mCRL2 model. Specify a comma-separated list of discrete variable and "
+            + "automata name patterns. Only automata with at least two locations may be specified. The \"*\" character "
+            + "can be used as wildcard in patterns and indicates zero or more characters. Prefixing a pattern with a "
+            + "\"+\" adds the variables and automata matching the pattern, while a \"-\" prefix removes the variables "
+            + "and automata matching the pattern. If neither a \"+\" nor a \"-\" prefix is given, \"+\" (adding) is "
+            + "assumed. The first pattern adds to or removes from an empty list of variables variables and automata.";
+
+    /** Default value of the option. */
+    private static final String DEFAULT_VALUE = "+*";
+
+    /** Description of the option. */
+    private static final String DESCRIPTION = fmt("%s [DEFAULT=%s]", OPT_DIALOG_DESCR, DEFAULT_VALUE);
+
+    /** Whether to return {@code null} as option value if it was left empty. */
+    private static final boolean EMPTY_AS_NULL = false;
+
+    /** Short option name. */
+    private static final Character CMD_SHORT = 'r';
+
+    /** Long option name. */
+    private static final String CMD_LONG = "read-values";
+
+    /** Name of the option value. */
+    private static final String CMD_VALUE = "PATTERNS";
+
+    /** Whether to display the option in the option dialog. */
+    private static final boolean SHOW_IN_DIALOG = true;
+
+    /** Text next to the label in the option dialog. */
+    private static final String OPT_DIALOG_LABEL_TEXT = "Patterns:";
+
+    /** Constructor of the {@link GenerateValueActionsOption} class. */
+    public GenerateValueActionsOption() {
+        super(NAME, DESCRIPTION, CMD_SHORT, CMD_LONG, CMD_VALUE, DEFAULT_VALUE, EMPTY_AS_NULL, SHOW_IN_DIALOG,
+                OPT_DIALOG_DESCR, OPT_DIALOG_LABEL_TEXT);
+    }
+
+    /**
+     * Returns the 'value' actions filter patterns.
+     *
+     * @return The patterns.
+     */
+    public static String getValue() {
+        return Options.get(GenerateValueActionsOption.class);
+    }
+}
diff --git a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/ProcessValueActions.java b/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/ProcessValueActions.java
new file mode 100644
index 0000000000..9e5b1a6fea
--- /dev/null
+++ b/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/ProcessValueActions.java
@@ -0,0 +1,189 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2024 Contributors to the Eclipse Foundation
+//
+// See the NOTICE file(s) distributed with this work for additional
+// information regarding copyright ownership.
+//
+// This program and the accompanying materials are made available
+// under the terms of the MIT License which is available at
+// https://opensource.org/licenses/MIT
+//
+// SPDX-License-Identifier: MIT
+//////////////////////////////////////////////////////////////////////////////
+
+package org.eclipse.escet.cif.cif2mcrl2;
+
+import static org.eclipse.escet.common.java.Lists.list;
+import static org.eclipse.escet.common.java.Sets.set;
+import static org.eclipse.escet.common.java.Strings.fmt;
+
+import java.util.List;
+import java.util.Set;
+import java.util.regex.Pattern;
+
+import org.apache.commons.lang3.StringUtils;
+import org.eclipse.escet.common.java.exceptions.InvalidOptionException;
+import org.eclipse.escet.common.java.output.WarnOutput;
+
+/** Process 'value' actions. */
+public class ProcessValueActions {
+    /** The regular expression pattern for checking the pattern elements of the option. */
+    private static final Pattern FILTER_PATTERN = Pattern
+            .compile("[-+]?[a-zA-Z_*][a-zA-Z0-9_*]*(\\.[a-zA-Z_*][a-zA-Z0-9_*]*)*");
+
+    /** Constructor for the {@link ProcessValueActions} class. */
+    private ProcessValueActions() {
+        // Static class.
+    }
+
+    /**
+     * Match a list of names against the patterns, and return all names that were either never added by the patterns, or
+     * added and removed again.
+     *
+     * <p>
+     * Function also warns the user for entries in the patterns that did not give any match, as that may indicate an
+     * error in the option value.
+     * </p>
+     *
+     * @param optValue The 'value' action patterns option value.
+     * @param names Names to match against the patterns.
+     * @param warn Callback to send warnings to the user.
+     * @return Names that were added and not removed by the patterns.
+     */
+    public static Set<String> matchNames(String optValue, Set<String> names, WarnOutput warn) {
+        // Parse the patterns.
+        List<OptionPattern> patterns = getValueActionsOptionPatterns(optValue);
+
+        // If there are no names to match the patterns against, there will not be any matches. Also it causes false
+        // positive warnings on failure to match names in the patterns.
+        if (names.isEmpty()) {
+            return names;
+        }
+
+        // Walk over the provided names, and add names that should be added into the result. As a side effect, the
+        // patterns record ever matching a name, or ever making an effective change.
+        Set<String> matchedNames = set();
+        for (String name: names) {
+            boolean added = false;
+            for (OptionPattern pat: patterns) {
+                boolean matchCausesChange = (added != pat.addMatch);
+                if (pat.isMatch(name, matchCausesChange)) {
+                    added = pat.addMatch;
+                }
+            }
+
+            if (added) {
+                matchedNames.add(name);
+            }
+        }
+
+        // Examine the patterns, reporting patterns to the user that were not useful.
+        for (OptionPattern pat: patterns) {
+            if (!pat.wasMatched) {
+                String msg = fmt(
+                        "Value actions pattern \"%s\" does not match any variable or automaton in the specification.",
+                        pat.originalText);
+                warn.line(msg);
+            } else if (!pat.causedChange) {
+                String reason;
+                if (pat.addMatch) {
+                    reason = "Matched variables and automata were already added earlier.";
+                } else {
+                    reason = "Matched variables and automata were never added or already removed earlier.";
+                }
+                String msg = fmt("Value actions pattern \"%s\" does not make any change to the selected variables "
+                        + "or automata. %s", pat.originalText, reason);
+                warn.line(msg);
+            }
+        }
+
+        return matchedNames;
+    }
+
+    /**
+     * Get the patterns specified in the option.
+     *
+     * @param optValue The 'value' action patterns option value.
+     * @return The patterns of the option.
+     */
+    private static List<OptionPattern> getValueActionsOptionPatterns(String optValue) {
+        // Split on ",", check each element for validity, and build a list to return.
+        List<OptionPattern> resultPatterns = list();
+        String[] valuePatterns = StringUtils.split(optValue, ",");
+        for (int i = 0; i < valuePatterns.length; i++) {
+            String s = valuePatterns[i].trim();
+            if (!FILTER_PATTERN.matcher(s).matches()) {
+                String msg = fmt("Value actions pattern \"%s\" has invalid syntax.", s);
+                throw new InvalidOptionException(msg);
+            }
+
+            // Handle the '+' or '-' prefix.
+            boolean addMatch;
+            String regex;
+            if (s.charAt(0) == '+') {
+                addMatch = true;
+                regex = s.substring(1);
+            } else if (s.charAt(0) == '-') {
+                addMatch = false;
+                regex = s.substring(1);
+            } else {
+                addMatch = true;
+                regex = s;
+            }
+
+            // Convert to a normal regular expression pattern and add it to the result list.
+            regex = "^" + regex.replace(".", "\\.").replace("*", ".*") + "$";
+            resultPatterns.add(new OptionPattern(addMatch, s, regex));
+        }
+        return resultPatterns;
+    }
+
+    /** Class containing a pattern. */
+    private static class OptionPattern {
+        /** If set, add names that match, else remove them. */
+        public final boolean addMatch;
+
+        /** Original pattern text as entered by the user. */
+        public final String originalText;
+
+        /** Compiled pattern to match against. */
+        public final Pattern pattern;
+
+        /** Whether the pattern ever had a successful match from {@link #isMatch}. */
+        public boolean wasMatched = false;
+
+        /** Whether a match on the pattern ever caused a change in the state of the matched text. */
+        public boolean causedChange = false;
+
+        /**
+         * Constructor of the {@link OptionPattern} class.
+         *
+         * @param addMatch If set, a match with the pattern will cause the matched object to be added to the result,
+         *     else a match will cause removal (pending further matches in other patterns).
+         * @param originalText Original text of the pattern, for reporting purposes.
+         * @param patternText Pattern text to be used in regular expression matching.
+         */
+        public OptionPattern(boolean addMatch, String originalText, String patternText) {
+            this.addMatch = addMatch;
+            this.originalText = originalText;
+            this.pattern = Pattern.compile(patternText);
+        }
+
+        /**
+         * Does the given name match against the pattern?
+         *
+         * @param name Text to match.
+         * @param makesChange Flag whether a match will cause a change in state for the matched name.
+         * @return Whether the given name matches against the pattern. A match is also recorded in {@link #wasMatched}
+         *     and {@link #causedChange} is updated to record effectiveness of the pattern.
+         */
+        public boolean isMatch(String name, boolean makesChange) {
+            boolean match = pattern.matcher(name).matches();
+            if (match) {
+                wasMatched = true;
+                causedChange |= makesChange;
+            }
+            return match;
+        }
+    }
+}
-- 
GitLab


From dec8ff68bae58ccf7084ae476701b32314951071 Mon Sep 17 00:00:00 2001
From: Dennis Hendriks <dh_tue@hotmail.com>
Date: Sun, 4 Aug 2024 16:38:31 +0200
Subject: [PATCH 04/18] #352 Update CIF ToolDef for mCRL2 transformer class
 rename.

---
 cif/org.eclipse.escet.cif.tooldefs/src/cif.tooldef | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cif/org.eclipse.escet.cif.tooldefs/src/cif.tooldef b/cif/org.eclipse.escet.cif.tooldefs/src/cif.tooldef
index a12bf6a9f2..e7c38cf9b5 100644
--- a/cif/org.eclipse.escet.cif.tooldefs/src/cif.tooldef
+++ b/cif/org.eclipse.escet.cif.tooldefs/src/cif.tooldef
@@ -66,13 +66,13 @@ end
 // mcrl2
 tool int cif2mcrl2(string... args, string stdin = "-", string stdout = "-", string stderr = "-",
                    bool appendOut = false, bool appendErr = false, bool errToOut = false, bool ignoreNonZeroExitCode = false):
-    return app("org.eclipse.escet.cif.cif2mcrl2", "org.eclipse.escet.cif.cif2mcrl2.Cif2Mcrl2Application", args, stdin, stdout, stderr,
+    return app("org.eclipse.escet.cif.cif2mcrl2", "org.eclipse.escet.cif.cif2mcrl2.CifToMcrl2Application", args, stdin, stdout, stderr,
                appendOut, appendErr, errToOut, ignoreNonZeroExitCode);
 end
 
 tool int cif2mcrl2(list string args = [], string stdin = "-", string stdout = "-", string stderr = "-",
                    bool appendOut = false, bool appendErr = false, bool errToOut = false, bool ignoreNonZeroExitCode = false):
-    return app("org.eclipse.escet.cif.cif2mcrl2", "org.eclipse.escet.cif.cif2mcrl2.Cif2Mcrl2Application", args, stdin, stdout, stderr,
+    return app("org.eclipse.escet.cif.cif2mcrl2", "org.eclipse.escet.cif.cif2mcrl2.CifToMcrl2Application", args, stdin, stdout, stderr,
                appendOut, appendErr, errToOut, ignoreNonZeroExitCode);
 end
 
-- 
GitLab


From 061b8e4af6ee470d68006407186026611873fe33 Mon Sep 17 00:00:00 2001
From: Dennis Hendriks <dh_tue@hotmail.com>
Date: Sun, 4 Aug 2024 17:37:20 +0200
Subject: [PATCH 05/18] #352 CIF integration tests 'copy_all' script handles
 'mcrl2.real' files.

---
 cif/org.eclipse.escet.cif.tests/tests/copy_all.tooldef | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cif/org.eclipse.escet.cif.tests/tests/copy_all.tooldef b/cif/org.eclipse.escet.cif.tests/tests/copy_all.tooldef
index abda3f95a6..7b0652aa6e 100644
--- a/cif/org.eclipse.escet.cif.tests/tests/copy_all.tooldef
+++ b/cif/org.eclipse.escet.cif.tests/tests/copy_all.tooldef
@@ -29,6 +29,7 @@ copy_files(".",           "cif.real",     "cif");
 copy_files(".",           "xml.real",     "xml");
 copy_files(".",           "txt.real",     "txt");
 copy_files(".",           "graphml.real", "graphml");
+copy_files(".",           "mcrl2.real",   "mcrl2");
 copy_files(".",           "wmod.real",    "wmod");
 copy_files(".",           "trajdata",     "trajdata.expected");
 copy_files(".",           "dmms.txt",     "dmms.expected.txt");
-- 
GitLab


From 7158a337f23856a8251598615dc062196a4dfaec Mon Sep 17 00:00:00 2001
From: Dennis Hendriks <dh_tue@hotmail.com>
Date: Sun, 4 Aug 2024 17:38:24 +0200
Subject: [PATCH 06/18] #352 CIF to mCRL2 integration tests: remove .dbg.txt
 and .out files.

---
 .../tests/cif2mcrl2/EFSM_4_paper.dbg.txt      |  56 -------
 .../tests/cif2mcrl2/EFSM_5_paper.dbg.txt      |  90 ------------
 .../cif2mcrl2/asgn_out_of_range1.dbg.txt      |   6 -
 .../cif2mcrl2/asgn_out_of_range2.dbg.txt      |  26 ----
 .../tests/cif2mcrl2/asgn_out_of_range2.out    |   1 -
 .../tests/cif2mcrl2/assign_test.dbg.txt       | 138 ------------------
 .../tests/cif2mcrl2/enums.dbg.txt             |   8 -
 .../tests/cif2mcrl2/event_based_aut.dbg.txt   |  10 --
 .../tests/cif2mcrl2/example.dbg.txt           |  90 ------------
 .../tests/cif2mcrl2/merge.dbg.txt             | 108 --------------
 .../tests/cif2mcrl2/no_value_actions.dbg.txt  |  90 ------------
 .../cif2mcrl2/svg_input_decl_removed.dbg.txt  |   6 -
 12 files changed, 629 deletions(-)
 delete mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/EFSM_4_paper.dbg.txt
 delete mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/EFSM_5_paper.dbg.txt
 delete mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/asgn_out_of_range1.dbg.txt
 delete mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/asgn_out_of_range2.dbg.txt
 delete mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/asgn_out_of_range2.out
 delete mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/assign_test.dbg.txt
 delete mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/enums.dbg.txt
 delete mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/event_based_aut.dbg.txt
 delete mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/example.dbg.txt
 delete mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/merge.dbg.txt
 delete mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/no_value_actions.dbg.txt
 delete mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/svg_input_decl_removed.dbg.txt

diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/EFSM_4_paper.dbg.txt b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/EFSM_4_paper.dbg.txt
deleted file mode 100644
index a6dde4931d..0000000000
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/EFSM_4_paper.dbg.txt
+++ /dev/null
@@ -1,56 +0,0 @@
-===============================================================
-Node 1
-
-Available variable processes:
-    A.x
-
-Variable use by behavior processes ordered by event:
-    A.a:
-        A.x  read:NEVER  write:ALWAYS
-    A.b:
-        A.x  read:ALWAYS  write:ALWAYS
-    A.c:
-        A.x  read:ALWAYS  write:ALWAYS
-
-Children:
-    node 1.1
-    node 1.2
-
-===============================================================
-Node 1.1
-
-Variable use by behavior processes ordered by event:
-    A.a:
-        A.x  read:NEVER  write:ALWAYS
-    A.b:
-        A.x  read:ALWAYS  write:ALWAYS
-    A.c:
-        A.x  read:ALWAYS  write:ALWAYS
-
-Children:
-    node 1.1.1
-    node 1.1.2
-
-===============================================================
-Node 1.1.1 (automaton A)
-
-Variable use by behavior processes ordered by event:
-    A.a:
-        A.x  read:NEVER  write:ALWAYS
-    A.b:
-        A.x  read:ALWAYS  write:ALWAYS
-    A.c:
-        A.x  read:ALWAYS  write:ALWAYS
-
-===============================================================
-Node 1.1.2 (automaton B)
-
-Variable use by behavior processes ordered by event:
-    A.c:
-        A.x  read:ALWAYS  write:NEVER
-
-===============================================================
-Node 1.2 (variable A.x)
-
-Available variable processes:
-    A.x
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/EFSM_5_paper.dbg.txt b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/EFSM_5_paper.dbg.txt
deleted file mode 100644
index 8f43e87791..0000000000
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/EFSM_5_paper.dbg.txt
+++ /dev/null
@@ -1,90 +0,0 @@
-===============================================================
-Node 1
-
-Available variable processes:
-    A.x
-    A.y
-
-Variable use by behavior processes ordered by event:
-    A.a:
-        A.x  read:NEVER  write:ALWAYS
-        A.y  read:NEVER  write:ALWAYS
-    A.b:
-        A.x  read:ALWAYS  write:ALWAYS
-        A.y  read:NEVER   write:NEVER
-    A.c:
-        A.x  read:ALWAYS  write:ALWAYS
-        A.y  read:ALWAYS  write:NEVER
-
-Children:
-    node 1.1
-    node 1.2
-
-===============================================================
-Node 1.1
-
-Available variable processes:
-    A.x
-
-Variable use by behavior processes ordered by event:
-    A.a:
-        A.x  read:NEVER  write:ALWAYS
-        A.y  read:NEVER  write:ALWAYS
-    A.b:
-        A.x  read:ALWAYS  write:ALWAYS
-    A.c:
-        A.x  read:ALWAYS  write:ALWAYS
-        A.y  read:ALWAYS  write:NEVER
-
-Children:
-    node 1.1.1
-    node 1.1.2
-
-===============================================================
-Node 1.1.1
-
-Variable use by behavior processes ordered by event:
-    A.a:
-        A.x  read:NEVER  write:ALWAYS
-        A.y  read:NEVER  write:ALWAYS
-    A.b:
-        A.x  read:ALWAYS  write:ALWAYS
-    A.c:
-        A.x  read:ALWAYS  write:ALWAYS
-        A.y  read:ALWAYS  write:NEVER
-
-Children:
-    node 1.1.1.1
-    node 1.1.1.2
-
-===============================================================
-Node 1.1.1.1 (automaton A)
-
-Variable use by behavior processes ordered by event:
-    A.a:
-        A.x  read:NEVER  write:ALWAYS
-        A.y  read:NEVER  write:ALWAYS
-    A.b:
-        A.x  read:ALWAYS  write:ALWAYS
-    A.c:
-        A.x  read:ALWAYS  write:ALWAYS
-
-===============================================================
-Node 1.1.1.2 (automaton B)
-
-Variable use by behavior processes ordered by event:
-    A.c:
-        A.x  read:ALWAYS  write:NEVER
-        A.y  read:ALWAYS  write:NEVER
-
-===============================================================
-Node 1.1.2 (variable A.x)
-
-Available variable processes:
-    A.x
-
-===============================================================
-Node 1.2 (variable A.y)
-
-Available variable processes:
-    A.y
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/asgn_out_of_range1.dbg.txt b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/asgn_out_of_range1.dbg.txt
deleted file mode 100644
index 0346fdc2e8..0000000000
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/asgn_out_of_range1.dbg.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-===============================================================
-Node 1 (automaton buff)
-
-Variable use by behavior processes ordered by event:
-    buff.c_e:
-        No variables from variables processes accessed.
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/asgn_out_of_range2.dbg.txt b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/asgn_out_of_range2.dbg.txt
deleted file mode 100644
index aa680bb36d..0000000000
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/asgn_out_of_range2.dbg.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-===============================================================
-Node 1
-
-Available variable processes:
-    buff.cnt
-
-Variable use by behavior processes ordered by event:
-    buff.c_e:
-        buff.cnt  read:ALWAYS  write:ALWAYS
-
-Children:
-    node 1.1
-    node 1.2
-
-===============================================================
-Node 1.1 (automaton buff)
-
-Variable use by behavior processes ordered by event:
-    buff.c_e:
-        buff.cnt  read:ALWAYS  write:ALWAYS
-
-===============================================================
-Node 1.2 (variable buff.cnt)
-
-Available variable processes:
-    buff.cnt
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/asgn_out_of_range2.out b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/asgn_out_of_range2.out
deleted file mode 100644
index c13ed0a1dc..0000000000
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/asgn_out_of_range2.out
+++ /dev/null
@@ -1 +0,0 @@
-INFO: Discrete variable "buff.cnt" is instantiated as variable process, but could be a local variable of an automaton process instead.
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/assign_test.dbg.txt b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/assign_test.dbg.txt
deleted file mode 100644
index d26f1d3c40..0000000000
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/assign_test.dbg.txt
+++ /dev/null
@@ -1,138 +0,0 @@
-===============================================================
-Node 1
-
-Available variable processes:
-    A.y
-
-Variable use by behavior processes ordered by event:
-    a1:
-        A.y  read:ALWAYS  write:NEVER
-    b1:
-        A.y  read:ALWAYS  write:NEVER
-    c1:
-        A.y  read:ALWAYS  write:NEVER
-    a2:
-        A.y  read:ALWAYS  write:NEVER
-    b2:
-        A.y  read:ALWAYS  write:NEVER
-    c2:
-        A.y  read:ALWAYS  write:NEVER
-    a3:
-        A.y  read:ALWAYS  write:NEVER
-    b3:
-        A.y  read:ALWAYS  write:NEVER
-    c3:
-        A.y  read:ALWAYS  write:NEVER
-    a4:
-        A.y  read:NEVER  write:ALWAYS
-    b4:
-        A.y  read:ALWAYS  write:ALWAYS
-    c4:
-        A.y  read:NEVER  write:ALWAYS
-    a5:
-        A.y  read:ALWAYS  write:ALWAYS
-    b5:
-        A.y  read:ALWAYS  write:ALWAYS
-    c5:
-        A.y  read:ALWAYS  write:ALWAYS
-
-Children:
-    node 1.1
-    node 1.2
-
-===============================================================
-Node 1.1
-
-Variable use by behavior processes ordered by event:
-    a1:
-        A.y  read:ALWAYS  write:NEVER
-    b1:
-        A.y  read:ALWAYS  write:NEVER
-    c1:
-        A.y  read:ALWAYS  write:NEVER
-    a2:
-        A.y  read:ALWAYS  write:NEVER
-    b2:
-        A.y  read:ALWAYS  write:NEVER
-    c2:
-        A.y  read:ALWAYS  write:NEVER
-    a3:
-        A.y  read:ALWAYS  write:NEVER
-    b3:
-        A.y  read:ALWAYS  write:NEVER
-    c3:
-        A.y  read:ALWAYS  write:NEVER
-    a4:
-        A.y  read:NEVER  write:ALWAYS
-    b4:
-        A.y  read:ALWAYS  write:ALWAYS
-    c4:
-        A.y  read:NEVER  write:ALWAYS
-    a5:
-        A.y  read:ALWAYS  write:ALWAYS
-    b5:
-        A.y  read:ALWAYS  write:ALWAYS
-    c5:
-        A.y  read:ALWAYS  write:ALWAYS
-
-Children:
-    node 1.1.1
-    node 1.1.2
-
-===============================================================
-Node 1.1.1 (automaton A)
-
-Variable use by behavior processes ordered by event:
-    a1:
-        No variables from variables processes accessed.
-    b1:
-        No variables from variables processes accessed.
-    c1:
-        A.y  read:ALWAYS  write:NEVER
-    a2:
-        No variables from variables processes accessed.
-    b2:
-        No variables from variables processes accessed.
-    c2:
-        A.y  read:ALWAYS  write:NEVER
-    a3:
-        A.y  read:ALWAYS  write:NEVER
-    b3:
-        A.y  read:ALWAYS  write:NEVER
-    c3:
-        A.y  read:ALWAYS  write:NEVER
-    a4:
-        A.y  read:NEVER  write:ALWAYS
-    b4:
-        A.y  read:ALWAYS  write:ALWAYS
-    c4:
-        A.y  read:NEVER  write:ALWAYS
-    a5:
-        A.y  read:ALWAYS  write:ALWAYS
-    b5:
-        A.y  read:ALWAYS  write:ALWAYS
-    c5:
-        A.y  read:ALWAYS  write:ALWAYS
-
-===============================================================
-Node 1.1.2 (automaton B)
-
-Variable use by behavior processes ordered by event:
-    a1:
-        A.y  read:ALWAYS  write:NEVER
-    b1:
-        A.y  read:ALWAYS  write:NEVER
-    c1:
-        A.y  read:ALWAYS  write:NEVER
-    a2:
-        A.y  read:ALWAYS  write:NEVER
-    b2:
-        A.y  read:ALWAYS  write:NEVER
-    c2:
-        A.y  read:ALWAYS  write:NEVER
-
-===============================================================
-Node 1.2 (variable A.y)
-
-Available variable processes:
-    A.y
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/enums.dbg.txt b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/enums.dbg.txt
deleted file mode 100644
index 1a3dfd550d..0000000000
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/enums.dbg.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-===============================================================
-Node 1 (automaton aut)
-
-Variable use by behavior processes ordered by event:
-    aut.e1:
-        No variables from variables processes accessed.
-    aut.e2:
-        No variables from variables processes accessed.
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/event_based_aut.dbg.txt b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/event_based_aut.dbg.txt
deleted file mode 100644
index 308a08224a..0000000000
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/event_based_aut.dbg.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-===============================================================
-Node 1 (automaton A)
-
-Variable use by behavior processes ordered by event:
-    A.a:
-        No variables from variables processes accessed.
-    A.b:
-        No variables from variables processes accessed.
-    A.c:
-        No variables from variables processes accessed.
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/example.dbg.txt b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/example.dbg.txt
deleted file mode 100644
index a8699bd49a..0000000000
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/example.dbg.txt
+++ /dev/null
@@ -1,90 +0,0 @@
-===============================================================
-Node 1
-
-Available variable processes:
-    P.x
-    Q.y
-
-Variable use by behavior processes ordered by event:
-    a:
-        P.x  read:SOMETIMES  write:ALWAYS
-        Q.y  read:ALWAYS     write:NEVER
-    c:
-        Q.y  read:ALWAYS  write:NEVER
-        P.x  read:NEVER   write:NEVER
-    b:
-        Q.y  read:ALWAYS  write:NEVER
-        P.x  read:ALWAYS  write:NEVER
-
-Children:
-    node 1.1
-    node 1.2
-
-===============================================================
-Node 1.1
-
-Available variable processes:
-    P.x
-
-Variable use by behavior processes ordered by event:
-    a:
-        P.x  read:SOMETIMES  write:ALWAYS
-        Q.y  read:ALWAYS     write:NEVER
-    c:
-        Q.y  read:ALWAYS  write:NEVER
-        P.x  read:NEVER   write:NEVER
-    b:
-        Q.y  read:ALWAYS  write:NEVER
-        P.x  read:ALWAYS  write:NEVER
-
-Children:
-    node 1.1.1
-    node 1.1.2
-
-===============================================================
-Node 1.1.1
-
-Variable use by behavior processes ordered by event:
-    a:
-        P.x  read:SOMETIMES  write:ALWAYS
-        Q.y  read:ALWAYS     write:NEVER
-    c:
-        Q.y  read:ALWAYS  write:NEVER
-    b:
-        Q.y  read:ALWAYS  write:NEVER
-        P.x  read:ALWAYS  write:NEVER
-
-Children:
-    node 1.1.1.1
-    node 1.1.1.2
-
-===============================================================
-Node 1.1.1.1 (automaton P)
-
-Variable use by behavior processes ordered by event:
-    a:
-        P.x  read:SOMETIMES  write:ALWAYS
-    c:
-        Q.y  read:ALWAYS  write:NEVER
-
-===============================================================
-Node 1.1.1.2 (automaton Q)
-
-Variable use by behavior processes ordered by event:
-    a:
-        Q.y  read:ALWAYS  write:NEVER
-    b:
-        Q.y  read:ALWAYS  write:NEVER
-        P.x  read:ALWAYS  write:NEVER
-
-===============================================================
-Node 1.1.2 (variable P.x)
-
-Available variable processes:
-    P.x
-
-===============================================================
-Node 1.2 (variable Q.y)
-
-Available variable processes:
-    Q.y
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/merge.dbg.txt b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/merge.dbg.txt
deleted file mode 100644
index a87c8716b1..0000000000
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/merge.dbg.txt
+++ /dev/null
@@ -1,108 +0,0 @@
-===============================================================
-Node 1
-
-Available variable processes:
-    B.x
-
-Variable use by behavior processes ordered by event:
-    nn:
-        B.x  read:NEVER  write:NEVER
-    ns:
-        B.x  read:SOMETIMES  write:NEVER
-    na:
-        B.x  read:ALWAYS  write:NEVER
-    sn:
-        B.x  read:SOMETIMES  write:NEVER
-    ss:
-        B.x  read:SOMETIMES  write:NEVER
-    sa:
-        B.x  read:ALWAYS  write:NEVER
-    an:
-        B.x  read:ALWAYS  write:NEVER
-    as:
-        B.x  read:ALWAYS  write:NEVER
-    aa:
-        B.x  read:ALWAYS  write:NEVER
-
-Children:
-    node 1.1
-    node 1.2
-
-===============================================================
-Node 1.1
-
-Variable use by behavior processes ordered by event:
-    nn:
-        No variables from variables processes accessed.
-    ns:
-        B.x  read:SOMETIMES  write:NEVER
-    na:
-        B.x  read:ALWAYS  write:NEVER
-    sn:
-        B.x  read:SOMETIMES  write:NEVER
-    ss:
-        B.x  read:SOMETIMES  write:NEVER
-    sa:
-        B.x  read:ALWAYS  write:NEVER
-    an:
-        B.x  read:ALWAYS  write:NEVER
-    as:
-        B.x  read:ALWAYS  write:NEVER
-    aa:
-        B.x  read:ALWAYS  write:NEVER
-
-Children:
-    node 1.1.1
-    node 1.1.2
-
-===============================================================
-Node 1.1.1 (automaton A)
-
-Variable use by behavior processes ordered by event:
-    nn:
-        No variables from variables processes accessed.
-    ns:
-        No variables from variables processes accessed.
-    na:
-        No variables from variables processes accessed.
-    sn:
-        B.x  read:SOMETIMES  write:NEVER
-    ss:
-        B.x  read:SOMETIMES  write:NEVER
-    sa:
-        B.x  read:SOMETIMES  write:NEVER
-    an:
-        B.x  read:ALWAYS  write:NEVER
-    as:
-        B.x  read:ALWAYS  write:NEVER
-    aa:
-        B.x  read:ALWAYS  write:NEVER
-
-===============================================================
-Node 1.1.2 (automaton B)
-
-Variable use by behavior processes ordered by event:
-    nn:
-        No variables from variables processes accessed.
-    sn:
-        No variables from variables processes accessed.
-    an:
-        No variables from variables processes accessed.
-    ns:
-        B.x  read:SOMETIMES  write:NEVER
-    ss:
-        B.x  read:SOMETIMES  write:NEVER
-    as:
-        B.x  read:SOMETIMES  write:NEVER
-    na:
-        B.x  read:ALWAYS  write:NEVER
-    sa:
-        B.x  read:ALWAYS  write:NEVER
-    aa:
-        B.x  read:ALWAYS  write:NEVER
-
-===============================================================
-Node 1.2 (variable B.x)
-
-Available variable processes:
-    B.x
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/no_value_actions.dbg.txt b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/no_value_actions.dbg.txt
deleted file mode 100644
index a8699bd49a..0000000000
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/no_value_actions.dbg.txt
+++ /dev/null
@@ -1,90 +0,0 @@
-===============================================================
-Node 1
-
-Available variable processes:
-    P.x
-    Q.y
-
-Variable use by behavior processes ordered by event:
-    a:
-        P.x  read:SOMETIMES  write:ALWAYS
-        Q.y  read:ALWAYS     write:NEVER
-    c:
-        Q.y  read:ALWAYS  write:NEVER
-        P.x  read:NEVER   write:NEVER
-    b:
-        Q.y  read:ALWAYS  write:NEVER
-        P.x  read:ALWAYS  write:NEVER
-
-Children:
-    node 1.1
-    node 1.2
-
-===============================================================
-Node 1.1
-
-Available variable processes:
-    P.x
-
-Variable use by behavior processes ordered by event:
-    a:
-        P.x  read:SOMETIMES  write:ALWAYS
-        Q.y  read:ALWAYS     write:NEVER
-    c:
-        Q.y  read:ALWAYS  write:NEVER
-        P.x  read:NEVER   write:NEVER
-    b:
-        Q.y  read:ALWAYS  write:NEVER
-        P.x  read:ALWAYS  write:NEVER
-
-Children:
-    node 1.1.1
-    node 1.1.2
-
-===============================================================
-Node 1.1.1
-
-Variable use by behavior processes ordered by event:
-    a:
-        P.x  read:SOMETIMES  write:ALWAYS
-        Q.y  read:ALWAYS     write:NEVER
-    c:
-        Q.y  read:ALWAYS  write:NEVER
-    b:
-        Q.y  read:ALWAYS  write:NEVER
-        P.x  read:ALWAYS  write:NEVER
-
-Children:
-    node 1.1.1.1
-    node 1.1.1.2
-
-===============================================================
-Node 1.1.1.1 (automaton P)
-
-Variable use by behavior processes ordered by event:
-    a:
-        P.x  read:SOMETIMES  write:ALWAYS
-    c:
-        Q.y  read:ALWAYS  write:NEVER
-
-===============================================================
-Node 1.1.1.2 (automaton Q)
-
-Variable use by behavior processes ordered by event:
-    a:
-        Q.y  read:ALWAYS  write:NEVER
-    b:
-        Q.y  read:ALWAYS  write:NEVER
-        P.x  read:ALWAYS  write:NEVER
-
-===============================================================
-Node 1.1.2 (variable P.x)
-
-Available variable processes:
-    P.x
-
-===============================================================
-Node 1.2 (variable Q.y)
-
-Available variable processes:
-    Q.y
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/svg_input_decl_removed.dbg.txt b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/svg_input_decl_removed.dbg.txt
deleted file mode 100644
index 8b83e9f084..0000000000
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/svg_input_decl_removed.dbg.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-===============================================================
-Node 1 (automaton p)
-
-Variable use by behavior processes ordered by event:
-    p.c:
-        No variables from variables processes accessed.
-- 
GitLab


From 5fe110bb871c34b9034aa7e3b129b27a72e835ee Mon Sep 17 00:00:00 2001
From: Dennis Hendriks <dh_tue@hotmail.com>
Date: Sun, 4 Aug 2024 17:40:09 +0200
Subject: [PATCH 07/18] #352 Update test_cif2mcrl2.tooldef script.

- No more instance tree option.
- No more debug output file/options.
---
 .../tests/test_cif2mcrl2.tooldef                          | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/cif/org.eclipse.escet.cif.tests/tests/test_cif2mcrl2.tooldef b/cif/org.eclipse.escet.cif.tests/tests/test_cif2mcrl2.tooldef
index 3840f0751e..602cf5c884 100644
--- a/cif/org.eclipse.escet.cif.tests/tests/test_cif2mcrl2.tooldef
+++ b/cif/org.eclipse.escet.cif.tests/tests/test_cif2mcrl2.tooldef
@@ -18,7 +18,6 @@ string test_path = "cif2mcrl2";
 string test_pattern = "*.cif";
 list string default_options = ["--devmode=1"];
 map(string:list string) test_options = {
-    "cif2mcrl2/asgn_out_of_range2.cif": ["-t buff,buff.cnt"],
     "cif2mcrl2/example.cif":            ["--read-values=+*,-*novalue*,-*value*,+*wel"],
     "cif2mcrl2/no_value_actions.cif":   ["-r ''"],
 };
@@ -60,29 +59,24 @@ for test in tests:
 
     string mcrl2_exp  = chfileext(test, oldext="cif", newext="mcrl2");
     string mcrl2_real = chfileext(test, oldext="cif", newext="mcrl2.real");
-    string dbg_exp    = chfileext(test, oldext="cif", newext="dbg.txt");
-    string dbg_real   = chfileext(test, oldext="cif", newext="dbg.txt.real");
 
     // Execute.
-    options = options + ["-o", mcrl2_real, "-x", dbg_real];
+    options = options + ["-o", mcrl2_real];
     cif2mcrl2([test] + options, stdout=test_out_real, stderr=test_err_real, ignoreNonZeroExitCode=true);
 
     // Compare output.
     bool stderr_diff = diff(test_err_exp, test_err_real, missingAsEmpty=true, warnOnDiff=true);
     bool stdout_diff = diff(test_out_exp, test_out_real, missingAsEmpty=true, warnOnDiff=true);
     bool mcrl2_diff  = diff(mcrl2_exp, mcrl2_real, missingAsEmpty=true, warnOnDiff=true);
-    bool dbg_diff    = diff(dbg_exp, dbg_real, missingAsEmpty=true, warnOnDiff=true);
     if not stderr_diff:: rmfile(test_err_real);
     if not stdout_diff:: rmfile(test_out_real);
     if not mcrl2_diff::  if exists(mcrl2_real):: rmfile(mcrl2_real);
-    if not dbg_diff::    if exists(dbg_real):: rmfile(dbg_real);
 
     // Update counts.
     int diff_count = 0;
     if stderr_diff:: diff_count = diff_count + 1;
     if stdout_diff:: diff_count = diff_count + 1;
     if mcrl2_diff::  diff_count = diff_count + 1;
-    if dbg_diff::    diff_count = diff_count + 1;
 
     count = count + 1;
     if diff_count == 0:: successes = successes + 1;
-- 
GitLab


From 258cdaa9c3afbf1c2664d61681c370e30a0a783e Mon Sep 17 00:00:00 2001
From: Dennis Hendriks <dh_tue@hotmail.com>
Date: Sun, 4 Aug 2024 18:38:38 +0200
Subject: [PATCH 08/18] #352 CIF to mCRL2 tests: adapt CIF models to layout
 conventions.

---
 .../tests/cif2mcrl2/EFSM_4_paper.cif          |  7 ++-
 .../tests/cif2mcrl2/EFSM_5_paper.cif          |  7 ++-
 .../tests/cif2mcrl2/assign_test.cif           | 53 +++++++++----------
 3 files changed, 32 insertions(+), 35 deletions(-)

diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/EFSM_4_paper.cif b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/EFSM_4_paper.cif
index 07e17adaef..b2a0539526 100644
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/EFSM_4_paper.cif
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/EFSM_4_paper.cif
@@ -17,15 +17,14 @@ automaton A:
 
   location AS0:
     initial;
-    edge a do x:=0 goto AS1;
+    edge a do x := 0 goto AS1;
 
   location AS1:
-    edge b when x < 5 do x:= x + 1  goto AS1;
-    edge c when x = 5 do x:= 0      goto AS0;
+    edge b when x < 5 do x := x + 1 goto AS1;
+    edge c when x = 5 do x := 0     goto AS0;
 end
 
 automaton B:
-
   location BS0:
     initial;
     edge A.c when A.x = 5;
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/EFSM_5_paper.cif b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/EFSM_5_paper.cif
index 53f730e703..1073c7a068 100644
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/EFSM_5_paper.cif
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/EFSM_5_paper.cif
@@ -17,15 +17,14 @@ automaton A:
 
   location AS0:
     initial;
-    edge a do x:=0, y:=0 goto AS1;
+    edge a do x := 0, y := 0 goto AS1;
 
   location AS1:
-    edge b when x < 2 do x:= x + 1  goto AS1;
-    edge c when x = 2 do x:= 0      goto AS0;
+    edge b when x < 2 do x := x + 1 goto AS1;
+    edge c when x = 2 do x := 0     goto AS0;
 end
 
 automaton B:
-
   location BS0:
     initial;
     edge A.c when A.x = 2 and A.y = 0;
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/assign_test.cif b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/assign_test.cif
index c0a830cca2..07057a34aa 100644
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/assign_test.cif
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/assign_test.cif
@@ -16,42 +16,41 @@ event a3, a4, b3, b4, c3, c4;
 event a5, b5, c5;
 
 automaton A:
-    disc int[0..4] locx, y;
+  disc int[0..4] locx, y;
 
-    location U:
-        initial;
+  location U:
+    initial;
 
-        edge a1 do locx := 1;
-        edge b1 do locx := locx + 1;
-        edge c1 do locx := y + 1;
+    edge a1 do locx := 1;
+    edge b1 do locx := locx + 1;
+    edge c1 do locx := y + 1;
 
-        edge a2 when locx > 1 do locx := 2;
-        edge b2 when locx > 1 do locx := locx - 1;
-        edge c2 when locx > 1 do locx := y + 1;
+    edge a2 when locx > 1 do locx := 2;
+    edge b2 when locx > 1 do locx := locx - 1;
+    edge c2 when locx > 1 do locx := y + 1;
 
-        edge a3 when y > 1 do locx := 2;
-        edge b3 when y > 1 do locx := locx - 1;
-        edge c3 when y > 1 do locx := y + 1;
+    edge a3 when y > 1 do locx := 2;
+    edge b3 when y > 1 do locx := locx - 1;
+    edge c3 when y > 1 do locx := y + 1;
 
-        edge a4 do y := 1;
-        edge b4 do y := y + 1;
-        edge c4 do y := locx + 1;
-
-        edge a5 when y > 1 do y := 2;
-        edge b5 when y > 1 do y := y - 1;
-        edge c5 when y > 1 do y := locx + 1;
+    edge a4 do y := 1;
+    edge b4 do y := y + 1;
+    edge c4 do y := locx + 1;
 
+    edge a5 when y > 1 do y := 2;
+    edge b5 when y > 1 do y := y - 1;
+    edge c5 when y > 1 do y := locx + 1;
 end
 
 automaton B:
-    location V:
-        initial;
+  location V:
+    initial;
 
-        edge a1 when A.y = 2;
-        edge b1 when A.y = 2;
-        edge c1 when A.y = 2;
+    edge a1 when A.y = 2;
+    edge b1 when A.y = 2;
+    edge c1 when A.y = 2;
 
-        edge a2 when A.y = 2;
-        edge b2 when A.y = 2;
-        edge c2 when A.y = 2;
+    edge a2 when A.y = 2;
+    edge b2 when A.y = 2;
+    edge c2 when A.y = 2;
 end
-- 
GitLab


From d7116a3e2919e12033b37d6dca45df3c330c0bcf Mon Sep 17 00:00:00 2001
From: Dennis Hendriks <dh_tue@hotmail.com>
Date: Sun, 4 Aug 2024 18:39:37 +0200
Subject: [PATCH 09/18] #352 Remove test that is now a duplicate test.

---
 .../tests/cif2mcrl2/asgn_out_of_range2.cif    | 26 -------------------
 .../tests/cif2mcrl2/asgn_out_of_range2.mcrl2  | 24 -----------------
 2 files changed, 50 deletions(-)
 delete mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/asgn_out_of_range2.cif
 delete mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/asgn_out_of_range2.mcrl2

diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/asgn_out_of_range2.cif b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/asgn_out_of_range2.cif
deleted file mode 100644
index 88145a2520..0000000000
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/asgn_out_of_range2.cif
+++ /dev/null
@@ -1,26 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Copyright (c) 2010, 2024 Contributors to the Eclipse Foundation
-//
-// See the NOTICE file(s) distributed with this work for additional
-// information regarding copyright ownership.
-//
-// This program and the accompanying materials are made available
-// under the terms of the MIT License which is available at
-// https://opensource.org/licenses/MIT
-//
-// SPDX-License-Identifier: MIT
-//////////////////////////////////////////////////////////////////////////////
-
-plant buff:
-  controllable c_e;
-  disc int[0..3] cnt;
-
-  marked cnt = 0;
-
-  location:
-    initial;
-    marked;
-
-    // Out of range error for 4th transition.
-    edge c_e do cnt := cnt + 1;
-end
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/asgn_out_of_range2.mcrl2 b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/asgn_out_of_range2.mcrl2
deleted file mode 100644
index 87c28b8e9b..0000000000
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/asgn_out_of_range2.mcrl2
+++ /dev/null
@@ -1,24 +0,0 @@
-sort LocSort_buff = struct loc_buff;
-
-proc BehProc_buff(Locvar_buff : LocSort_buff) =
-  sum cnt : Int . ((cnt >= 0) && (cnt <= 3) && (Locvar_buff == loc_buff)) -> c_e | aread_cnt(cnt) | awrite_cnt((cnt + 1)) . BehProc_buff(Locvar_buff);
-
-act value_cnt, vread_cnt, vwrite_cnt, sync_cnt, aread_cnt, awrite_cnt : Int;
-
-proc VarProc_cnt(v:Int) =
-  value_cnt(v) . VarProc_cnt(v) +
-  vread_cnt(v) . VarProc_cnt(v) +
-  sum m:Int . ((m >= 0) && (m <= 3)) -> vwrite_cnt(m) . VarProc_cnt(m) +
-  sum m:Int . ((m >= 0) && (m <= 3)) -> vread_cnt(v) | vwrite_cnt(m) . VarProc_cnt(m);
-
-act c_e, renamed_c_e;
-
-init block({aread_cnt, awrite_cnt, vread_cnt, vwrite_cnt},
-     hide({sync_cnt},
-     comm({aread_cnt | vread_cnt -> sync_cnt,
-           awrite_cnt | vwrite_cnt -> sync_cnt},
-     (
-       BehProc_buff(loc_buff)
-     ||
-       VarProc_cnt(0)
-     ))));
-- 
GitLab


From 8579f7635f73200923817ae171fc02e22f561620 Mon Sep 17 00:00:00 2001
From: Dennis Hendriks <dh_tue@hotmail.com>
Date: Sun, 4 Aug 2024 18:40:02 +0200
Subject: [PATCH 10/18] #352 Rename a test that no longer has two variants.

---
 .../cif2mcrl2/{asgn_out_of_range1.cif => asgn_out_of_range.cif}   | 0
 .../{asgn_out_of_range1.mcrl2 => asgn_out_of_range.mcrl2}         | 0
 2 files changed, 0 insertions(+), 0 deletions(-)
 rename cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/{asgn_out_of_range1.cif => asgn_out_of_range.cif} (100%)
 rename cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/{asgn_out_of_range1.mcrl2 => asgn_out_of_range.mcrl2} (100%)

diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/asgn_out_of_range1.cif b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/asgn_out_of_range.cif
similarity index 100%
rename from cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/asgn_out_of_range1.cif
rename to cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/asgn_out_of_range.cif
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/asgn_out_of_range1.mcrl2 b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/asgn_out_of_range.mcrl2
similarity index 100%
rename from cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/asgn_out_of_range1.mcrl2
rename to cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/asgn_out_of_range.mcrl2
-- 
GitLab


From f20d51a82517d2daf31eda9fa3cfb2b37f5b6b2e Mon Sep 17 00:00:00 2001
From: Dennis Hendriks <dh_tue@hotmail.com>
Date: Sun, 4 Aug 2024 18:50:02 +0200
Subject: [PATCH 11/18] #352 Update CIF to mCRL2 test output.

- I did some interactive rebases, so this may be outdated output.
---
 .../tests/cif2mcrl2/EFSM_4_paper.mcrl2        |  66 ++++----
 .../tests/cif2mcrl2/EFSM_5_paper.mcrl2        |  96 +++++-------
 .../tests/cif2mcrl2/asgn_out_of_range.mcrl2   |  24 ++-
 .../tests/cif2mcrl2/assign_test.mcrl2         | 144 ++++++++----------
 .../tests/cif2mcrl2/enums.mcrl2               |  78 +++++++---
 .../tests/cif2mcrl2/event_based_aut.mcrl2     |  31 +++-
 .../tests/cif2mcrl2/example.err               |   6 +-
 .../tests/cif2mcrl2/example.mcrl2             | 115 +++++++-------
 .../tests/cif2mcrl2/invalid.err               |  28 ++--
 .../tests/cif2mcrl2/merge.mcrl2               | 138 +++++++----------
 .../tests/cif2mcrl2/no_value_actions.mcrl2    |  88 ++++-------
 .../cif2mcrl2/svg_input_decl_removed.mcrl2    |  15 +-
 12 files changed, 386 insertions(+), 443 deletions(-)

diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/EFSM_4_paper.mcrl2 b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/EFSM_4_paper.mcrl2
index 139099fbee..1d3f590c71 100644
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/EFSM_4_paper.mcrl2
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/EFSM_4_paper.mcrl2
@@ -1,42 +1,34 @@
-sort LocSort_A = struct loc_A_AS0 | loc_A_AS1;
+% Generated by CIF to mCRL2.
 
-proc BehProc_A(Locvar_A : LocSort_A) =
-  (Locvar_A == loc_A_AS0) -> a | awrite_x(0) . BehProc_A(loc_A_AS1) +
-  sum x : Int . ((x >= 0) && (x <= 6) && (Locvar_A == loc_A_AS1) && (x < 5)) -> b | aread_x(x) | awrite_x((x + 1)) . BehProc_A(loc_A_AS1) +
-  sum x : Int . ((x >= 0) && (x <= 6) && (Locvar_A == loc_A_AS1) && (x == 5)) -> c | aread_x(x) | awrite_x(0) . BehProc_A(loc_A_AS0);
+% Sorts for CIF enumerations.
+sort A'LPE' = struct A'AS0' | A'AS1';
 
-sort LocSort_B = struct loc_B_BS0;
+% Actions for CIF events.
+act A'a';
+act A'b';
+act A'c';
 
-proc BehProc_B(Locvar_B : LocSort_B) =
-  sum x : Int . ((x >= 0) && (x <= 6) && (Locvar_B == loc_B_BS0) && (x == 5)) -> c | aread_x(x) . BehProc_B(Locvar_B);
+% Actions for CIF variables having certain values.
+act A''varvalue: A'LPE';
+act A'x''varvalue: Int;
 
-act value_x, vread_x, vwrite_x, sync_x, aread_x, awrite_x : Int;
+% Process for behavior of the CIF specification.
+proc P(
+    A'x': Int,
+    A': A'LPE'
+) =
+    % CIF linearized edges.
+    ((A' == A'AS0') && 0 <= 0 && 0 <= 6) -> A'a' . P(A'x' = 0, A' = A'AS1')
+    +
+    (((A' == A'AS1') && (A'x' < 5)) && 0 <= (A'x' + 1) && (A'x' + 1) <= 6) -> A'b' . P(A'x' = (A'x' + 1))
+    +
+    (((A' == A'AS1') && ((A'x' == 5) && (A'x' == 5))) && 0 <= 0 && 0 <= 6) -> A'c' . P(A'x' = 0, A' = A'AS0')
+    +
+    % CIF variable value actions.
+    A''varvalue(A') . P()
+    +
+    A'x''varvalue(A'x') . P()
+;
 
-proc VarProc_x(v:Int) =
-  value_x(v) . VarProc_x(v) +
-  vread_x(v) . VarProc_x(v) +
-  sum m:Int . ((m >= 0) && (m <= 6)) -> vwrite_x(m) . VarProc_x(m) +
-  sum m:Int . ((m >= 0) && (m <= 6)) -> vread_x(v) | vwrite_x(m) . VarProc_x(m);
-
-act a, renamed_a, b, renamed_b, c, renamed_c;
-
-init block({aread_x, awrite_x, vread_x, vwrite_x},
-     hide({sync_x},
-     comm({aread_x | vread_x -> sync_x,
-           awrite_x | vwrite_x -> sync_x},
-     (
-       allow({a | awrite_x,
-              b | awrite_x | aread_x,
-              c | awrite_x | aread_x},
-       comm({aread_x | aread_x -> aread_x},
-       rename({renamed_c -> c},
-       block({c},
-       comm({c | c -> renamed_c},
-       (
-         BehProc_A(loc_A_AS0)
-       ||
-         BehProc_B(loc_B_BS0)
-       ))))))
-     ||
-       VarProc_x(0)
-     ))));
+% Initialization.
+init P(0, A'AS0');
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/EFSM_5_paper.mcrl2 b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/EFSM_5_paper.mcrl2
index 33a54a20b9..cda70e1a2f 100644
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/EFSM_5_paper.mcrl2
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/EFSM_5_paper.mcrl2
@@ -1,58 +1,38 @@
-sort LocSort_A = struct loc_A_AS0 | loc_A_AS1;
-
-proc BehProc_A(Locvar_A : LocSort_A) =
-  (Locvar_A == loc_A_AS0) -> a | awrite_x(0) | awrite_y(0) . BehProc_A(loc_A_AS1) +
-  sum x : Int . ((x >= 0) && (x <= 2) && (Locvar_A == loc_A_AS1) && (x < 2)) -> b | aread_x(x) | awrite_x((x + 1)) . BehProc_A(loc_A_AS1) +
-  sum x : Int . ((x >= 0) && (x <= 2) && (Locvar_A == loc_A_AS1) && (x == 2)) -> c | aread_x(x) | awrite_x(0) . BehProc_A(loc_A_AS0);
-
-sort LocSort_B = struct loc_B_BS0;
-
-proc BehProc_B(Locvar_B : LocSort_B) =
-  sum x : Int . sum y : Int . ((x >= 0) && (x <= 2) && (y >= 0) && (y <= 2) && (Locvar_B == loc_B_BS0) && ((x == 2) && (y == 0))) -> c | aread_x(x) | aread_y(y) . BehProc_B(Locvar_B);
-
-act value_x, vread_x, vwrite_x, sync_x, aread_x, awrite_x : Int;
-
-proc VarProc_x(v:Int) =
-  value_x(v) . VarProc_x(v) +
-  vread_x(v) . VarProc_x(v) +
-  sum m:Int . ((m >= 0) && (m <= 2)) -> vwrite_x(m) . VarProc_x(m) +
-  sum m:Int . ((m >= 0) && (m <= 2)) -> vread_x(v) | vwrite_x(m) . VarProc_x(m);
-
-act value_y, vread_y, vwrite_y, sync_y, aread_y, awrite_y : Int;
-
-proc VarProc_y(v:Int) =
-  value_y(v) . VarProc_y(v) +
-  vread_y(v) . VarProc_y(v) +
-  sum m:Int . ((m >= 0) && (m <= 2)) -> vwrite_y(m) . VarProc_y(m) +
-  sum m:Int . ((m >= 0) && (m <= 2)) -> vread_y(v) | vwrite_y(m) . VarProc_y(m);
-
-act a, renamed_a, b, renamed_b, c, renamed_c;
-
-init block({aread_y, awrite_y, vread_y, vwrite_y},
-     hide({sync_y},
-     comm({aread_y | vread_y -> sync_y,
-           awrite_y | vwrite_y -> sync_y},
-     (
-       block({aread_x, awrite_x, vread_x, vwrite_x},
-       hide({sync_x},
-       comm({aread_x | vread_x -> sync_x,
-             awrite_x | vwrite_x -> sync_x},
-       (
-         allow({a | awrite_x | awrite_y,
-                b | awrite_x | aread_x,
-                c | awrite_x | aread_x | aread_y},
-         comm({aread_x | aread_x -> aread_x},
-         rename({renamed_c -> c},
-         block({c},
-         comm({c | c -> renamed_c},
-         (
-           BehProc_A(loc_A_AS0)
-         ||
-           BehProc_B(loc_B_BS0)
-         ))))))
-       ||
-         VarProc_x(0)
-       ))))
-     ||
-       VarProc_y(0)
-     ))));
+% Generated by CIF to mCRL2.
+
+% Sorts for CIF enumerations.
+sort A'LPE' = struct A'AS0' | A'AS1';
+
+% Actions for CIF events.
+act A'a';
+act A'b';
+act A'c';
+
+% Actions for CIF variables having certain values.
+act A''varvalue: A'LPE';
+act A'x''varvalue: Int;
+act A'y''varvalue: Int;
+
+% Process for behavior of the CIF specification.
+proc P(
+    A'x': Int,
+    A'y': Int,
+    A': A'LPE'
+) =
+    % CIF linearized edges.
+    ((A' == A'AS0') && 0 <= 0 && 0 <= 2 && 0 <= 0 && 0 <= 2) -> A'a' . P(A'x' = 0, A'y' = 0, A' = A'AS1')
+    +
+    (((A' == A'AS1') && (A'x' < 2)) && 0 <= (A'x' + 1) && (A'x' + 1) <= 2) -> A'b' . P(A'x' = (A'x' + 1))
+    +
+    ((((A' == A'AS1') && (A'x' == 2)) && ((A'x' == 2) && (A'y' == 0))) && 0 <= 0 && 0 <= 2) -> A'c' . P(A'x' = 0, A' = A'AS0')
+    +
+    % CIF variable value actions.
+    A''varvalue(A') . P()
+    +
+    A'x''varvalue(A'x') . P()
+    +
+    A'y''varvalue(A'y') . P()
+;
+
+% Initialization.
+init P(0, 0, A'AS0');
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/asgn_out_of_range.mcrl2 b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/asgn_out_of_range.mcrl2
index 640db333f1..486735f66a 100644
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/asgn_out_of_range.mcrl2
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/asgn_out_of_range.mcrl2
@@ -1,11 +1,21 @@
-sort LocSort_buff = struct loc_buff;
+% Generated by CIF to mCRL2.
 
-act value_cnt : Int;
+% Actions for CIF events.
+act buff'c_e';
 
-proc BehProc_buff(Locvar_buff : LocSort_buff, cnt : Int) =
-  value_cnt(cnt) . BehProc_buff(Locvar_buff, cnt) +
-  ((Locvar_buff == loc_buff) && ((cnt + 1) >= 0) && ((cnt + 1) <= 3)) -> c_e . BehProc_buff(Locvar_buff, (cnt + 1));
+% Actions for CIF variables having certain values.
+act buff'cnt''varvalue: Int;
 
-act c_e, renamed_c_e;
+% Process for behavior of the CIF specification.
+proc P(
+    buff'cnt': Int
+) =
+    % CIF linearized edges.
+    (0 <= (buff'cnt' + 1) && (buff'cnt' + 1) <= 3) -> buff'c_e' . P(buff'cnt' = (buff'cnt' + 1))
+    +
+    % CIF variable value actions.
+    buff'cnt''varvalue(buff'cnt') . P()
+;
 
-init BehProc_buff(loc_buff, 0);
+% Initialization.
+init P(0);
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/assign_test.mcrl2 b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/assign_test.mcrl2
index 1e3d2483dc..10dd1d965d 100644
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/assign_test.mcrl2
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/assign_test.mcrl2
@@ -1,85 +1,67 @@
-sort LocSort_A = struct loc_A_U;
+% Generated by CIF to mCRL2.
 
-act value_locx : Int;
+% Actions for CIF events.
+act a1';
+act a2';
+act b1';
+act b2';
+act c1';
+act c2';
+act a3';
+act a4';
+act b3';
+act b4';
+act c3';
+act c4';
+act a5';
+act b5';
+act c5';
 
-proc BehProc_A(Locvar_A : LocSort_A, locx : Int) =
-  value_locx(locx) . BehProc_A(Locvar_A, locx) +
-  ((Locvar_A == loc_A_U) && (1 >= 0) && (1 <= 4)) -> a1 . BehProc_A(Locvar_A, 1) +
-  ((Locvar_A == loc_A_U) && ((locx + 1) >= 0) && ((locx + 1) <= 4)) -> b1 . BehProc_A(Locvar_A, (locx + 1)) +
-  sum y : Int . ((y >= 0) && (y <= 4) && (Locvar_A == loc_A_U) && ((y + 1) >= 0) && ((y + 1) <= 4)) -> c1 | aread_y(y) . BehProc_A(Locvar_A, (y + 1)) +
-  ((Locvar_A == loc_A_U) && (locx > 1) && (2 >= 0) && (2 <= 4)) -> a2 . BehProc_A(Locvar_A, 2) +
-  ((Locvar_A == loc_A_U) && (locx > 1) && ((locx - 1) >= 0) && ((locx - 1) <= 4)) -> b2 . BehProc_A(Locvar_A, (locx - 1)) +
-  sum y : Int . ((y >= 0) && (y <= 4) && (Locvar_A == loc_A_U) && (locx > 1) && ((y + 1) >= 0) && ((y + 1) <= 4)) -> c2 | aread_y(y) . BehProc_A(Locvar_A, (y + 1)) +
-  sum y : Int . ((y >= 0) && (y <= 4) && (Locvar_A == loc_A_U) && (y > 1) && (2 >= 0) && (2 <= 4)) -> a3 | aread_y(y) . BehProc_A(Locvar_A, 2) +
-  sum y : Int . ((y >= 0) && (y <= 4) && (Locvar_A == loc_A_U) && (y > 1) && ((locx - 1) >= 0) && ((locx - 1) <= 4)) -> b3 | aread_y(y) . BehProc_A(Locvar_A, (locx - 1)) +
-  sum y : Int . ((y >= 0) && (y <= 4) && (Locvar_A == loc_A_U) && (y > 1) && ((y + 1) >= 0) && ((y + 1) <= 4)) -> c3 | aread_y(y) . BehProc_A(Locvar_A, (y + 1)) +
-  (Locvar_A == loc_A_U) -> a4 | awrite_y(1) . BehProc_A(Locvar_A, locx) +
-  sum y : Int . ((y >= 0) && (y <= 4) && (Locvar_A == loc_A_U)) -> b4 | aread_y(y) | awrite_y((y + 1)) . BehProc_A(Locvar_A, locx) +
-  (Locvar_A == loc_A_U) -> c4 | awrite_y((locx + 1)) . BehProc_A(Locvar_A, locx) +
-  sum y : Int . ((y >= 0) && (y <= 4) && (Locvar_A == loc_A_U) && (y > 1)) -> a5 | aread_y(y) | awrite_y(2) . BehProc_A(Locvar_A, locx) +
-  sum y : Int . ((y >= 0) && (y <= 4) && (Locvar_A == loc_A_U) && (y > 1)) -> b5 | aread_y(y) | awrite_y((y - 1)) . BehProc_A(Locvar_A, locx) +
-  sum y : Int . ((y >= 0) && (y <= 4) && (Locvar_A == loc_A_U) && (y > 1)) -> c5 | aread_y(y) | awrite_y((locx + 1)) . BehProc_A(Locvar_A, locx);
+% Actions for CIF variables having certain values.
+act A'locx''varvalue: Int;
+act A'y''varvalue: Int;
 
-sort LocSort_B = struct loc_B_V;
+% Process for behavior of the CIF specification.
+proc P(
+    A'locx': Int,
+    A'y': Int
+) =
+    % CIF linearized edges.
+    ((A'y' == 2) && 0 <= 1 && 1 <= 4) -> a1' . P(A'locx' = 1)
+    +
+    (((A'locx' > 1) && (A'y' == 2)) && 0 <= 2 && 2 <= 4) -> a2' . P(A'locx' = 2)
+    +
+    ((A'y' > 1) && 0 <= 2 && 2 <= 4) -> a3' . P(A'locx' = 2)
+    +
+    (0 <= 1 && 1 <= 4) -> a4' . P(A'y' = 1)
+    +
+    ((A'y' > 1) && 0 <= 2 && 2 <= 4) -> a5' . P(A'y' = 2)
+    +
+    ((A'y' == 2) && 0 <= (A'locx' + 1) && (A'locx' + 1) <= 4) -> b1' . P(A'locx' = (A'locx' + 1))
+    +
+    (((A'locx' > 1) && (A'y' == 2)) && 0 <= (A'locx' - 1) && (A'locx' - 1) <= 4) -> b2' . P(A'locx' = (A'locx' - 1))
+    +
+    ((A'y' > 1) && 0 <= (A'locx' - 1) && (A'locx' - 1) <= 4) -> b3' . P(A'locx' = (A'locx' - 1))
+    +
+    (0 <= (A'y' + 1) && (A'y' + 1) <= 4) -> b4' . P(A'y' = (A'y' + 1))
+    +
+    ((A'y' > 1) && 0 <= (A'y' - 1) && (A'y' - 1) <= 4) -> b5' . P(A'y' = (A'y' - 1))
+    +
+    ((A'y' == 2) && 0 <= (A'y' + 1) && (A'y' + 1) <= 4) -> c1' . P(A'locx' = (A'y' + 1))
+    +
+    (((A'locx' > 1) && (A'y' == 2)) && 0 <= (A'y' + 1) && (A'y' + 1) <= 4) -> c2' . P(A'locx' = (A'y' + 1))
+    +
+    ((A'y' > 1) && 0 <= (A'y' + 1) && (A'y' + 1) <= 4) -> c3' . P(A'locx' = (A'y' + 1))
+    +
+    (0 <= (A'locx' + 1) && (A'locx' + 1) <= 4) -> c4' . P(A'y' = (A'locx' + 1))
+    +
+    ((A'y' > 1) && 0 <= (A'locx' + 1) && (A'locx' + 1) <= 4) -> c5' . P(A'y' = (A'locx' + 1))
+    +
+    % CIF variable value actions.
+    A'locx''varvalue(A'locx') . P()
+    +
+    A'y''varvalue(A'y') . P()
+;
 
-proc BehProc_B(Locvar_B : LocSort_B) =
-  sum y : Int . ((y >= 0) && (y <= 4) && (Locvar_B == loc_B_V) && (y == 2)) -> a1 | aread_y(y) . BehProc_B(Locvar_B) +
-  sum y : Int . ((y >= 0) && (y <= 4) && (Locvar_B == loc_B_V) && (y == 2)) -> b1 | aread_y(y) . BehProc_B(Locvar_B) +
-  sum y : Int . ((y >= 0) && (y <= 4) && (Locvar_B == loc_B_V) && (y == 2)) -> c1 | aread_y(y) . BehProc_B(Locvar_B) +
-  sum y : Int . ((y >= 0) && (y <= 4) && (Locvar_B == loc_B_V) && (y == 2)) -> a2 | aread_y(y) . BehProc_B(Locvar_B) +
-  sum y : Int . ((y >= 0) && (y <= 4) && (Locvar_B == loc_B_V) && (y == 2)) -> b2 | aread_y(y) . BehProc_B(Locvar_B) +
-  sum y : Int . ((y >= 0) && (y <= 4) && (Locvar_B == loc_B_V) && (y == 2)) -> c2 | aread_y(y) . BehProc_B(Locvar_B);
-
-act value_y, vread_y, vwrite_y, sync_y, aread_y, awrite_y : Int;
-
-proc VarProc_y(v:Int) =
-  value_y(v) . VarProc_y(v) +
-  vread_y(v) . VarProc_y(v) +
-  sum m:Int . ((m >= 0) && (m <= 4)) -> vwrite_y(m) . VarProc_y(m) +
-  sum m:Int . ((m >= 0) && (m <= 4)) -> vread_y(v) | vwrite_y(m) . VarProc_y(m);
-
-act a1, renamed_a1, b1, renamed_b1, c1, renamed_c1, a2, renamed_a2, b2, renamed_b2, c2, renamed_c2, a3, renamed_a3, b3, renamed_b3, c3, renamed_c3, a4, renamed_a4, b4, renamed_b4, c4, renamed_c4, a5, renamed_a5, b5, renamed_b5, c5, renamed_c5;
-
-init block({aread_y, awrite_y, vread_y, vwrite_y},
-     hide({sync_y},
-     comm({aread_y | vread_y -> sync_y,
-           awrite_y | vwrite_y -> sync_y},
-     (
-       allow({value_locx,
-              a1 | aread_y,
-              b1 | aread_y,
-              c1 | aread_y,
-              a2 | aread_y,
-              b2 | aread_y,
-              c2 | aread_y,
-              a3 | aread_y,
-              b3 | aread_y,
-              c3 | aread_y,
-              a4 | awrite_y,
-              b4 | awrite_y | aread_y,
-              c4 | awrite_y,
-              a5 | awrite_y | aread_y,
-              b5 | awrite_y | aread_y,
-              c5 | awrite_y | aread_y},
-       comm({aread_y | aread_y -> aread_y},
-       rename({renamed_a1 -> a1,
-               renamed_b1 -> b1,
-               renamed_c1 -> c1,
-               renamed_a2 -> a2,
-               renamed_b2 -> b2,
-               renamed_c2 -> c2},
-       block({a1, b1, c1, a2, b2, c2},
-       comm({a1 | a1 -> renamed_a1,
-             b1 | b1 -> renamed_b1,
-             c1 | c1 -> renamed_c1,
-             a2 | a2 -> renamed_a2,
-             b2 | b2 -> renamed_b2,
-             c2 | c2 -> renamed_c2},
-       (
-         BehProc_A(loc_A_U, 0)
-       ||
-         BehProc_B(loc_B_V)
-       ))))))
-     ||
-       VarProc_y(0)
-     ))));
+% Initialization.
+init P(0, 0);
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/enums.mcrl2 b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/enums.mcrl2
index 2ae6569f67..2b9ee81193 100644
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/enums.mcrl2
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/enums.mcrl2
@@ -1,30 +1,58 @@
-sort enum_E = struct enumlit_A | enumlit_B2;
+% Generated by CIF to mCRL2.
 
-sort enum_F = struct enumlit_C | enumlit_D | enumlit_G;
+% Sorts for CIF enumerations.
+sort E' = struct A' | B';
+sort F' = struct C' | D' | G';
+sort h'E' = struct h'B' | h'A';
+sort aut'LPE' = struct aut'l1' | aut'l2' | aut'l3' | aut'l4' | aut'l5' | aut'l6' | aut'l7';
 
-sort enum_E2 = struct enumlit_B | enumlit_A2;
+% Actions for CIF events.
+act aut'e1';
+act aut'e2';
 
-sort LocSort_aut = struct loc_aut_l1 | loc_aut_l2 | loc_aut_l3 | loc_aut_l4 | loc_aut_l5 | loc_aut_l6 | loc_aut_l7;
+% Actions for CIF variables having certain values.
+act aut''varvalue: aut'LPE';
+act aut'x1''varvalue: E';
+act aut'x2''varvalue: E';
+act aut'y''varvalue: F';
+act aut'z''varvalue: h'E';
 
-act value_x2 : enum_E;
-act value_x1 : enum_E;
-act value_y : enum_F;
-act value_z : enum_E2;
+% Process for behavior of the CIF specification.
+proc P(
+    aut'x1': E',
+    aut'x2': E',
+    aut'y': F',
+    aut'z': h'E',
+    aut': aut'LPE'
+) =
+    % CIF linearized edges.
+    ((aut' == aut'l1')) -> aut'e1' . P(aut'x1' = aut'x2', aut' = aut'l2')
+    +
+    ((aut' == aut'l2')) -> aut'e1' . P(aut' = aut'l3')
+    +
+    (((aut' == aut'l3') && (aut'x1' != B'))) -> aut'e1' . P(aut' = aut'l4')
+    +
+    ((aut' == aut'l4')) -> aut'e1' . P(aut'y' = C', aut' = aut'l5')
+    +
+    (((aut' == aut'l5') && (aut'y' == C'))) -> aut'e1' . P(aut' = aut'l6')
+    +
+    ((aut' == aut'l6')) -> aut'e1' . P(aut'z' = h'B', aut' = aut'l7')
+    +
+    (((aut' == aut'l7') && (aut'z' != h'A'))) -> aut'e1' . P(aut' = aut'l1')
+    +
+    (((aut' == aut'l2') && (aut'x1' == aut'x2'))) -> aut'e2' . P()
+    +
+    % CIF variable value actions.
+    aut''varvalue(aut') . P()
+    +
+    aut'x1''varvalue(aut'x1') . P()
+    +
+    aut'x2''varvalue(aut'x2') . P()
+    +
+    aut'y''varvalue(aut'y') . P()
+    +
+    aut'z''varvalue(aut'z') . P()
+;
 
-proc BehProc_aut(Locvar_aut : LocSort_aut, x2 : enum_E, x1 : enum_E, y : enum_F, z : enum_E2) =
-  value_x2(x2) . BehProc_aut(Locvar_aut, x2, x1, y, z) +
-  value_x1(x1) . BehProc_aut(Locvar_aut, x2, x1, y, z) +
-  value_y(y) . BehProc_aut(Locvar_aut, x2, x1, y, z) +
-  value_z(z) . BehProc_aut(Locvar_aut, x2, x1, y, z) +
-  (Locvar_aut == loc_aut_l1) -> e1 . BehProc_aut(loc_aut_l2, x2, x2, y, z) +
-  (Locvar_aut == loc_aut_l2) -> e1 . BehProc_aut(loc_aut_l3, x2, x1, y, z) +
-  ((Locvar_aut == loc_aut_l2) && (x1 == x2)) -> e2 . BehProc_aut(Locvar_aut, x2, x1, y, z) +
-  ((Locvar_aut == loc_aut_l3) && (x1 != enumlit_B2)) -> e1 . BehProc_aut(loc_aut_l4, x2, x1, y, z) +
-  (Locvar_aut == loc_aut_l4) -> e1 . BehProc_aut(loc_aut_l5, x2, x1, enumlit_C, z) +
-  ((Locvar_aut == loc_aut_l5) && (y == enumlit_C)) -> e1 . BehProc_aut(loc_aut_l6, x2, x1, y, z) +
-  (Locvar_aut == loc_aut_l6) -> e1 . BehProc_aut(loc_aut_l7, x2, x1, y, enumlit_B) +
-  ((Locvar_aut == loc_aut_l7) && (z != enumlit_A2)) -> e1 . BehProc_aut(loc_aut_l1, x2, x1, y, z);
-
-act e1, renamed_e1, e2, renamed_e2;
-
-init BehProc_aut(loc_aut_l1, enumlit_A, enumlit_A, enumlit_C, enumlit_B);
+% Initialization.
+init P(A', A', C', h'B', aut'l1');
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/event_based_aut.mcrl2 b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/event_based_aut.mcrl2
index 78ce2e85b8..f90edfe49b 100644
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/event_based_aut.mcrl2
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/event_based_aut.mcrl2
@@ -1,9 +1,28 @@
-sort LocSort_A = struct loc_A_P | loc_A_Q;
+% Generated by CIF to mCRL2.
 
-proc BehProc_A(Locvar_A : LocSort_A) =
-  (Locvar_A == loc_A_P) -> a . BehProc_A(loc_A_Q) +
-  (Locvar_A == loc_A_Q) -> b . BehProc_A(loc_A_P);
+% Sorts for CIF enumerations.
+sort A'LPE' = struct A'P' | A'Q';
 
-act a, renamed_a, b, renamed_b, c, renamed_c;
+% Actions for CIF events.
+act A'a';
+act A'b';
+act A'c';
 
-init BehProc_A(loc_A_P);
+% Actions for CIF variables having certain values.
+act A''varvalue: A'LPE';
+
+% Process for behavior of the CIF specification.
+proc P(
+    A': A'LPE'
+) =
+    % CIF linearized edges.
+    ((A' == A'P')) -> A'a' . P(A' = A'Q')
+    +
+    ((A' == A'Q')) -> A'b' . P(A' = A'P')
+    +
+    % CIF variable value actions.
+    A''varvalue(A') . P()
+;
+
+% Initialization.
+init P(A'P');
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/example.err b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/example.err
index ce12450339..85ddf2364e 100644
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/example.err
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/example.err
@@ -1,3 +1,3 @@
-WARNING: Value actions option pattern "-*novalue*" does not match any variable in the specification.
-WARNING: Value actions option pattern "-*value*" does not match any variable in the specification.
-WARNING: Value actions option pattern "+*wel" does not match any variable in the specification.
+WARNING: Value actions pattern "-*novalue*" does not match any variable or automaton in the specification.
+WARNING: Value actions pattern "-*value*" does not match any variable or automaton in the specification.
+WARNING: Value actions pattern "+*wel" does not match any variable or automaton in the specification.
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/example.mcrl2 b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/example.mcrl2
index 487959b6ef..caf48b9109 100644
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/example.mcrl2
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/example.mcrl2
@@ -1,64 +1,51 @@
-sort LocSort_P = struct loc_P_p1 | loc_P_p2;
-
-proc BehProc_P(Locvar_P : LocSort_P) =
-  sum x : Int . ((x >= 0) && (x <= 10) && (Locvar_P == loc_P_p1)) -> a | aread_x(x) | awrite_x((x + 1)) . BehProc_P(loc_P_p2) +
-  sum y : Int . ((y >= 0) && (y <= 1) && (Locvar_P == loc_P_p2) && (y != 0)) -> c | aread_y(y) . BehProc_P(loc_P_p1) +
-  (Locvar_P == loc_P_p2) -> a | awrite_x(1) . BehProc_P(loc_P_p1);
-
-sort LocSort_Q = struct loc_Q_q1 | loc_Q_q2;
-
-act value_zero : Int;
-
-proc BehProc_Q(Locvar_Q : LocSort_Q, zero : Int) =
-  value_zero(zero) . BehProc_Q(Locvar_Q, zero) +
-  sum y : Int . ((y >= 0) && (y <= 1) && (Locvar_Q == loc_Q_q1) && (y == 1)) -> a | aread_y(y) . BehProc_Q(loc_Q_q2, zero) +
-  sum y : Int . sum x : Int . ((y >= 0) && (y <= 1) && (x >= 0) && (x <= 10) && (Locvar_Q == loc_Q_q2) && (((y == 1) && (x < 8)) && (zero == 0))) -> b | aread_y(y) | aread_x(x) . BehProc_Q(loc_Q_q1, zero) +
-  sum y : Int . sum x : Int . ((y >= 0) && (y <= 1) && (x >= 0) && (x <= 10) && (Locvar_Q == loc_Q_q2) && ((y == 0) => (x >= 8))) -> b | aread_y(y) | aread_x(x) . BehProc_Q(loc_Q_q1, zero);
-
-act value_x, vread_x, vwrite_x, sync_x, aread_x, awrite_x : Int;
-
-proc VarProc_x(v:Int) =
-  value_x(v) . VarProc_x(v) +
-  vread_x(v) . VarProc_x(v) +
-  sum m:Int . ((m >= 0) && (m <= 10)) -> vwrite_x(m) . VarProc_x(m) +
-  sum m:Int . ((m >= 0) && (m <= 10)) -> vread_x(v) | vwrite_x(m) . VarProc_x(m);
-
-act value_y, vread_y, vwrite_y, sync_y, aread_y, awrite_y : Int;
-
-proc VarProc_y(v:Int) =
-  value_y(v) . VarProc_y(v) +
-  vread_y(v) . VarProc_y(v) +
-  sum m:Int . ((m >= 0) && (m <= 1)) -> vwrite_y(m) . VarProc_y(m) +
-  sum m:Int . ((m >= 0) && (m <= 1)) -> vread_y(v) | vwrite_y(m) . VarProc_y(m);
-
-act a, renamed_a, c, renamed_c, b, renamed_b;
-
-init block({aread_y, awrite_y, vread_y, vwrite_y},
-     hide({sync_y},
-     comm({aread_y | vread_y -> sync_y,
-           awrite_y | vwrite_y -> sync_y},
-     (
-       block({aread_x, awrite_x, vread_x, vwrite_x},
-       hide({sync_x},
-       comm({aread_x | vread_x -> sync_x,
-             awrite_x | vwrite_x -> sync_x},
-       (
-         allow({value_zero,
-                a | awrite_x | aread_y,
-                a | awrite_x | aread_x | aread_y,
-                c | aread_y,
-                b | aread_y | aread_x},
-         rename({renamed_a -> a},
-         block({a},
-         comm({a | a -> renamed_a},
-         (
-           BehProc_P(loc_P_p1)
-         ||
-           BehProc_Q(loc_Q_q1, 0)
-         )))))
-       ||
-         VarProc_x(0)
-       ))))
-     ||
-       VarProc_y(1)
-     ))));
+% Generated by CIF to mCRL2.
+
+% Sorts for CIF enumerations.
+sort P'LPE' = struct P'p1' | P'p2';
+sort Q'LPE' = struct Q'q1' | Q'q2';
+
+% Actions for CIF events.
+act a';
+act b';
+act c';
+
+% Actions for CIF variables having certain values.
+act P''varvalue: P'LPE';
+act P'x''varvalue: Int;
+act P'zero''varvalue: Int;
+act Q''varvalue: Q'LPE';
+act Q'y''varvalue: Int;
+
+% Process for behavior of the CIF specification.
+proc P(
+    P'x': Int,
+    P'zero': Int,
+    P': P'LPE',
+    Q'y': Int,
+    Q': Q'LPE'
+) =
+    % CIF linearized edges.
+    (((P' == P'p1') && ((Q' == Q'q1') && (Q'y' == 1))) && 0 <= (P'x' + 1) && (P'x' + 1) <= 10) -> a' . P(P'x' = (P'x' + 1), P' = P'p2', Q' = Q'q2')
+    +
+    (((P' == P'p2') && ((Q' == Q'q1') && (Q'y' == 1))) && 0 <= 1 && 1 <= 10) -> a' . P(P'x' = 1, P' = P'p1', Q' = Q'q2')
+    +
+    ((((Q' == Q'q2') && (Q'y' == 1)) && ((P'x' < 8) && (P'zero' == 0)))) -> b' . P(Q' = Q'q1')
+    +
+    (((Q' == Q'q2') && ((Q'y' == 0) => (P'x' >= 8)))) -> b' . P(Q' = Q'q1')
+    +
+    (((P' == P'p2') && (Q'y' != 0))) -> c' . P(P' = P'p1')
+    +
+    % CIF variable value actions.
+    P''varvalue(P') . P()
+    +
+    P'x''varvalue(P'x') . P()
+    +
+    P'zero''varvalue(P'zero') . P()
+    +
+    Q''varvalue(Q') . P()
+    +
+    Q'y''varvalue(Q'y') . P()
+;
+
+% Initialization.
+init P(0, 0, P'p1', 1, Q'q1');
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/invalid.err b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/invalid.err
index 455faaffa6..a4f62987d8 100644
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/invalid.err
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/invalid.err
@@ -33,14 +33,11 @@ ERROR: CIF to mCRL2 transformation failed due to unsatisfied preconditions:
      - equation y' = 2.0;
                      ^
    * In continuous variable "g.p.cnt":
-     - cont cnt = 0.0 der 1.0;
-                  ^       ^
+     - cont cnt der 1.0;
+                    ^
    * In continuous variable "g.x":
-     - cont x = 0.0 der 1.0;
-                ^       ^
-   * In continuous variable "g.y":
-     - cont y = 0.0;
-                ^
+     - cont x der 1.0;
+                  ^
 
   ---------------------------
   (4/16) A real type is used.
@@ -49,14 +46,11 @@ ERROR: CIF to mCRL2 transformation failed due to unsatisfied preconditions:
      - equation y' = 2.0;
                      ^
    * In continuous variable "g.p.cnt":
-     - cont cnt = 0.0 der 1.0;
-                  ^       ^
+     - cont cnt der 1.0;
+                    ^
    * In continuous variable "g.x":
-     - cont x = 0.0 der 1.0;
-                ^       ^
-   * In continuous variable "g.y":
-     - cont y = 0.0;
-                ^
+     - cont x der 1.0;
+                  ^
 
   ---------------------------
   (5/16) An equation is used.
@@ -148,10 +142,10 @@ ERROR: CIF to mCRL2 transformation failed due to unsatisfied preconditions:
   (16/16) Variable is a continuous variable.
   ------------------------------------------
    * In group "g":
-     - cont x = 0.0 der 1.0;
+     - cont x der 1.0;
             ^
-     - cont y = 0.0;
+     - cont y;
             ^
    * In automaton "g.p":
-     - cont cnt = 0.0 der 1.0;
+     - cont cnt der 1.0;
             ^
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/merge.mcrl2 b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/merge.mcrl2
index 5cf15df698..ff03b6794f 100644
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/merge.mcrl2
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/merge.mcrl2
@@ -1,87 +1,59 @@
-sort LocSort_A = struct loc_A;
+% Generated by CIF to mCRL2.
 
-proc BehProc_A(Locvar_A : LocSort_A) =
-  (Locvar_A == loc_A) -> nn . BehProc_A(Locvar_A) +
-  (Locvar_A == loc_A) -> ns . BehProc_A(Locvar_A) +
-  (Locvar_A == loc_A) -> na . BehProc_A(Locvar_A) +
-  (Locvar_A == loc_A) -> sn . BehProc_A(Locvar_A) +
-  (Locvar_A == loc_A) -> ss . BehProc_A(Locvar_A) +
-  (Locvar_A == loc_A) -> sa . BehProc_A(Locvar_A) +
-  sum x : Bool . ((Locvar_A == loc_A) && x) -> sn | aread_x(x) . BehProc_A(Locvar_A) +
-  sum x : Bool . ((Locvar_A == loc_A) && x) -> ss | aread_x(x) . BehProc_A(Locvar_A) +
-  sum x : Bool . ((Locvar_A == loc_A) && x) -> sa | aread_x(x) . BehProc_A(Locvar_A) +
-  sum x : Bool . ((Locvar_A == loc_A) && x) -> an | aread_x(x) . BehProc_A(Locvar_A) +
-  sum x : Bool . ((Locvar_A == loc_A) && x) -> as | aread_x(x) . BehProc_A(Locvar_A) +
-  sum x : Bool . ((Locvar_A == loc_A) && x) -> aa | aread_x(x) . BehProc_A(Locvar_A);
+% Actions for CIF events.
+act nn';
+act ns';
+act na';
+act sn';
+act ss';
+act sa';
+act an';
+act as';
+act aa';
 
-sort LocSort_B = struct loc_B;
+% Actions for CIF variables having certain values.
+act B'x''varvalue: Bool;
 
-proc BehProc_B(Locvar_B : LocSort_B) =
-  (Locvar_B == loc_B) -> nn . BehProc_B(Locvar_B) +
-  (Locvar_B == loc_B) -> sn . BehProc_B(Locvar_B) +
-  (Locvar_B == loc_B) -> an . BehProc_B(Locvar_B) +
-  (Locvar_B == loc_B) -> ns . BehProc_B(Locvar_B) +
-  (Locvar_B == loc_B) -> ss . BehProc_B(Locvar_B) +
-  (Locvar_B == loc_B) -> as . BehProc_B(Locvar_B) +
-  sum x : Bool . ((Locvar_B == loc_B) && x) -> ns | aread_x(x) . BehProc_B(Locvar_B) +
-  sum x : Bool . ((Locvar_B == loc_B) && x) -> ss | aread_x(x) . BehProc_B(Locvar_B) +
-  sum x : Bool . ((Locvar_B == loc_B) && x) -> as | aread_x(x) . BehProc_B(Locvar_B) +
-  sum x : Bool . ((Locvar_B == loc_B) && x) -> na | aread_x(x) . BehProc_B(Locvar_B) +
-  sum x : Bool . ((Locvar_B == loc_B) && x) -> sa | aread_x(x) . BehProc_B(Locvar_B) +
-  sum x : Bool . ((Locvar_B == loc_B) && x) -> aa | aread_x(x) . BehProc_B(Locvar_B);
+% Process for behavior of the CIF specification.
+proc P(
+    B'x': Bool
+) =
+    % CIF linearized edges.
+    ((B'x' && B'x')) -> aa' . P()
+    +
+    (B'x') -> an' . P()
+    +
+    (B'x') -> as' . P()
+    +
+    ((B'x' && B'x')) -> as' . P()
+    +
+    (B'x') -> na' . P()
+    +
+    (true) -> nn' . P()
+    +
+    (true) -> ns' . P()
+    +
+    (B'x') -> ns' . P()
+    +
+    (B'x') -> sa' . P()
+    +
+    ((B'x' && B'x')) -> sa' . P()
+    +
+    (true) -> sn' . P()
+    +
+    (B'x') -> sn' . P()
+    +
+    (true) -> ss' . P()
+    +
+    (B'x') -> ss' . P()
+    +
+    (B'x') -> ss' . P()
+    +
+    ((B'x' && B'x')) -> ss' . P()
+    +
+    % CIF variable value actions.
+    B'x''varvalue(B'x') . P()
+;
 
-act value_x, vread_x, vwrite_x, sync_x, aread_x, awrite_x : Bool;
-
-proc VarProc_x(v:Bool) =
-  value_x(v) . VarProc_x(v) +
-  vread_x(v) . VarProc_x(v) +
-  sum m:Bool . true -> vwrite_x(m) . VarProc_x(m) +
-  sum m:Bool . true -> vread_x(v) | vwrite_x(m) . VarProc_x(m);
-
-act nn, renamed_nn, ns, renamed_ns, na, renamed_na, sn, renamed_sn, ss, renamed_ss, sa, renamed_sa, an, renamed_an, as, renamed_as, aa, renamed_aa;
-
-init block({aread_x, awrite_x, vread_x, vwrite_x},
-     hide({sync_x},
-     comm({aread_x | vread_x -> sync_x,
-           awrite_x | vwrite_x -> sync_x},
-     (
-       allow({nn,
-              ns,
-              ns | aread_x,
-              na | aread_x,
-              sn,
-              sn | aread_x,
-              ss,
-              ss | aread_x,
-              sa | aread_x,
-              an | aread_x,
-              as | aread_x,
-              aa | aread_x},
-       comm({aread_x | aread_x -> aread_x},
-       rename({renamed_nn -> nn,
-               renamed_ns -> ns,
-               renamed_na -> na,
-               renamed_sn -> sn,
-               renamed_ss -> ss,
-               renamed_sa -> sa,
-               renamed_an -> an,
-               renamed_as -> as,
-               renamed_aa -> aa},
-       block({nn, ns, na, sn, ss, sa, an, as, aa},
-       comm({nn | nn -> renamed_nn,
-             ns | ns -> renamed_ns,
-             na | na -> renamed_na,
-             sn | sn -> renamed_sn,
-             ss | ss -> renamed_ss,
-             sa | sa -> renamed_sa,
-             an | an -> renamed_an,
-             as | as -> renamed_as,
-             aa | aa -> renamed_aa},
-       (
-         BehProc_A(loc_A)
-       ||
-         BehProc_B(loc_B)
-       ))))))
-     ||
-       VarProc_x(false)
-     ))));
+% Initialization.
+init P(false);
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/no_value_actions.mcrl2 b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/no_value_actions.mcrl2
index df1f9ee3a7..f3f5c626c9 100644
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/no_value_actions.mcrl2
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/no_value_actions.mcrl2
@@ -1,57 +1,31 @@
-sort LocSort_P = struct loc_P_p1 | loc_P_p2;
-
-proc BehProc_P(Locvar_P : LocSort_P) =
-  sum x : Int . ((x >= 0) && (x <= 10) && (Locvar_P == loc_P_p1)) -> a | aread_x(x) | awrite_x((x + 1)) . BehProc_P(loc_P_p2) +
-  sum y : Int . ((y >= 0) && (y <= 1) && (Locvar_P == loc_P_p2) && (y != 0)) -> c | aread_y(y) . BehProc_P(loc_P_p1) +
-  (Locvar_P == loc_P_p2) -> a | awrite_x(1) . BehProc_P(loc_P_p1);
-
-sort LocSort_Q = struct loc_Q_q1 | loc_Q_q2;
-
-proc BehProc_Q(Locvar_Q : LocSort_Q, zero : Int) =
-  sum y : Int . ((y >= 0) && (y <= 1) && (Locvar_Q == loc_Q_q1) && (y == 1)) -> a | aread_y(y) . BehProc_Q(loc_Q_q2, zero) +
-  sum y : Int . sum x : Int . ((y >= 0) && (y <= 1) && (x >= 0) && (x <= 10) && (Locvar_Q == loc_Q_q2) && (((y == 1) && (x < 8)) && (zero == 0))) -> b | aread_y(y) | aread_x(x) . BehProc_Q(loc_Q_q1, zero);
-
-act vread_x, vwrite_x, sync_x, aread_x, awrite_x : Int;
-
-proc VarProc_x(v:Int) =
-  vread_x(v) . VarProc_x(v) +
-  sum m:Int . ((m >= 0) && (m <= 10)) -> vwrite_x(m) . VarProc_x(m) +
-  sum m:Int . ((m >= 0) && (m <= 10)) -> vread_x(v) | vwrite_x(m) . VarProc_x(m);
-
-act vread_y, vwrite_y, sync_y, aread_y, awrite_y : Int;
-
-proc VarProc_y(v:Int) =
-  vread_y(v) . VarProc_y(v) +
-  sum m:Int . ((m >= 0) && (m <= 1)) -> vwrite_y(m) . VarProc_y(m) +
-  sum m:Int . ((m >= 0) && (m <= 1)) -> vread_y(v) | vwrite_y(m) . VarProc_y(m);
-
-act a, renamed_a, c, renamed_c, b, renamed_b;
-
-init block({aread_y, awrite_y, vread_y, vwrite_y},
-     hide({sync_y},
-     comm({aread_y | vread_y -> sync_y,
-           awrite_y | vwrite_y -> sync_y},
-     (
-       block({aread_x, awrite_x, vread_x, vwrite_x},
-       hide({sync_x},
-       comm({aread_x | vread_x -> sync_x,
-             awrite_x | vwrite_x -> sync_x},
-       (
-         allow({a | awrite_x | aread_y,
-                a | awrite_x | aread_x | aread_y,
-                c | aread_y,
-                b | aread_y | aread_x},
-         rename({renamed_a -> a},
-         block({a},
-         comm({a | a -> renamed_a},
-         (
-           BehProc_P(loc_P_p1)
-         ||
-           BehProc_Q(loc_Q_q1, 0)
-         )))))
-       ||
-         VarProc_x(0)
-       ))))
-     ||
-       VarProc_y(1)
-     ))));
+% Generated by CIF to mCRL2.
+
+% Sorts for CIF enumerations.
+sort P'LPE' = struct P'p1' | P'p2';
+sort Q'LPE' = struct Q'q1' | Q'q2';
+
+% Actions for CIF events.
+act a';
+act b';
+act c';
+
+% Process for behavior of the CIF specification.
+proc P(
+    P'x': Int,
+    P'zero': Int,
+    P': P'LPE',
+    Q'y': Int,
+    Q': Q'LPE'
+) =
+    % CIF linearized edges.
+    (((P' == P'p1') && ((Q' == Q'q1') && (Q'y' == 1))) && 0 <= (P'x' + 1) && (P'x' + 1) <= 10) -> a' . P(P'x' = (P'x' + 1), P' = P'p2', Q' = Q'q2')
+    +
+    (((P' == P'p2') && ((Q' == Q'q1') && (Q'y' == 1))) && 0 <= 1 && 1 <= 10) -> a' . P(P'x' = 1, P' = P'p1', Q' = Q'q2')
+    +
+    ((((Q' == Q'q2') && (Q'y' == 1)) && ((P'x' < 8) && (P'zero' == 0)))) -> b' . P(Q' = Q'q1')
+    +
+    (((P' == P'p2') && (Q'y' != 0))) -> c' . P(P' = P'p1')
+;
+
+% Initialization.
+init P(0, 0, P'p1', 1, Q'q1');
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/svg_input_decl_removed.mcrl2 b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/svg_input_decl_removed.mcrl2
index 1658c5436f..5393dd7739 100644
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/svg_input_decl_removed.mcrl2
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/svg_input_decl_removed.mcrl2
@@ -1,8 +1,13 @@
-sort LocSort_p = struct loc_p;
+% Generated by CIF to mCRL2.
 
-proc BehProc_p(Locvar_p : LocSort_p) =
-  (Locvar_p == loc_p) -> c . BehProc_p(Locvar_p);
+% Actions for CIF events.
+act p'c';
 
-act c, renamed_c;
+% Process for behavior of the CIF specification.
+proc P =
+    % CIF linearized edges.
+    (true) -> p'c' . P()
+;
 
-init BehProc_p(loc_p);
+% Initialization.
+init P();
-- 
GitLab


From 1a6c3f614ca86ef4c41085c7bca064769d585b44 Mon Sep 17 00:00:00 2001
From: Dennis Hendriks <dh_tue@hotmail.com>
Date: Mon, 5 Aug 2024 18:46:19 +0200
Subject: [PATCH 12/18] #352 Removed some no longer relevant tests.

---
 .../tests/cif2mcrl2/assign_test.cif           | 56 ----------------
 .../tests/cif2mcrl2/assign_test.mcrl2         | 67 -------------------
 .../tests/cif2mcrl2/event_based_aut.cif       | 26 -------
 .../tests/cif2mcrl2/event_based_aut.err       |  1 -
 .../tests/cif2mcrl2/event_based_aut.mcrl2     | 28 --------
 .../tests/cif2mcrl2/merge.cif                 | 35 ----------
 .../tests/cif2mcrl2/merge.err                 |  2 -
 .../tests/cif2mcrl2/merge.mcrl2               | 59 ----------------
 8 files changed, 274 deletions(-)
 delete mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/assign_test.cif
 delete mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/assign_test.mcrl2
 delete mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/event_based_aut.cif
 delete mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/event_based_aut.err
 delete mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/event_based_aut.mcrl2
 delete mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/merge.cif
 delete mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/merge.err
 delete mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/merge.mcrl2

diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/assign_test.cif b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/assign_test.cif
deleted file mode 100644
index 07057a34aa..0000000000
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/assign_test.cif
+++ /dev/null
@@ -1,56 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Copyright (c) 2010, 2024 Contributors to the Eclipse Foundation
-//
-// See the NOTICE file(s) distributed with this work for additional
-// information regarding copyright ownership.
-//
-// This program and the accompanying materials are made available
-// under the terms of the MIT License which is available at
-// https://opensource.org/licenses/MIT
-//
-// SPDX-License-Identifier: MIT
-//////////////////////////////////////////////////////////////////////////////
-
-event a1, a2, b1, b2, c1, c2;
-event a3, a4, b3, b4, c3, c4;
-event a5, b5, c5;
-
-automaton A:
-  disc int[0..4] locx, y;
-
-  location U:
-    initial;
-
-    edge a1 do locx := 1;
-    edge b1 do locx := locx + 1;
-    edge c1 do locx := y + 1;
-
-    edge a2 when locx > 1 do locx := 2;
-    edge b2 when locx > 1 do locx := locx - 1;
-    edge c2 when locx > 1 do locx := y + 1;
-
-    edge a3 when y > 1 do locx := 2;
-    edge b3 when y > 1 do locx := locx - 1;
-    edge c3 when y > 1 do locx := y + 1;
-
-    edge a4 do y := 1;
-    edge b4 do y := y + 1;
-    edge c4 do y := locx + 1;
-
-    edge a5 when y > 1 do y := 2;
-    edge b5 when y > 1 do y := y - 1;
-    edge c5 when y > 1 do y := locx + 1;
-end
-
-automaton B:
-  location V:
-    initial;
-
-    edge a1 when A.y = 2;
-    edge b1 when A.y = 2;
-    edge c1 when A.y = 2;
-
-    edge a2 when A.y = 2;
-    edge b2 when A.y = 2;
-    edge c2 when A.y = 2;
-end
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/assign_test.mcrl2 b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/assign_test.mcrl2
deleted file mode 100644
index 10dd1d965d..0000000000
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/assign_test.mcrl2
+++ /dev/null
@@ -1,67 +0,0 @@
-% Generated by CIF to mCRL2.
-
-% Actions for CIF events.
-act a1';
-act a2';
-act b1';
-act b2';
-act c1';
-act c2';
-act a3';
-act a4';
-act b3';
-act b4';
-act c3';
-act c4';
-act a5';
-act b5';
-act c5';
-
-% Actions for CIF variables having certain values.
-act A'locx''varvalue: Int;
-act A'y''varvalue: Int;
-
-% Process for behavior of the CIF specification.
-proc P(
-    A'locx': Int,
-    A'y': Int
-) =
-    % CIF linearized edges.
-    ((A'y' == 2) && 0 <= 1 && 1 <= 4) -> a1' . P(A'locx' = 1)
-    +
-    (((A'locx' > 1) && (A'y' == 2)) && 0 <= 2 && 2 <= 4) -> a2' . P(A'locx' = 2)
-    +
-    ((A'y' > 1) && 0 <= 2 && 2 <= 4) -> a3' . P(A'locx' = 2)
-    +
-    (0 <= 1 && 1 <= 4) -> a4' . P(A'y' = 1)
-    +
-    ((A'y' > 1) && 0 <= 2 && 2 <= 4) -> a5' . P(A'y' = 2)
-    +
-    ((A'y' == 2) && 0 <= (A'locx' + 1) && (A'locx' + 1) <= 4) -> b1' . P(A'locx' = (A'locx' + 1))
-    +
-    (((A'locx' > 1) && (A'y' == 2)) && 0 <= (A'locx' - 1) && (A'locx' - 1) <= 4) -> b2' . P(A'locx' = (A'locx' - 1))
-    +
-    ((A'y' > 1) && 0 <= (A'locx' - 1) && (A'locx' - 1) <= 4) -> b3' . P(A'locx' = (A'locx' - 1))
-    +
-    (0 <= (A'y' + 1) && (A'y' + 1) <= 4) -> b4' . P(A'y' = (A'y' + 1))
-    +
-    ((A'y' > 1) && 0 <= (A'y' - 1) && (A'y' - 1) <= 4) -> b5' . P(A'y' = (A'y' - 1))
-    +
-    ((A'y' == 2) && 0 <= (A'y' + 1) && (A'y' + 1) <= 4) -> c1' . P(A'locx' = (A'y' + 1))
-    +
-    (((A'locx' > 1) && (A'y' == 2)) && 0 <= (A'y' + 1) && (A'y' + 1) <= 4) -> c2' . P(A'locx' = (A'y' + 1))
-    +
-    ((A'y' > 1) && 0 <= (A'y' + 1) && (A'y' + 1) <= 4) -> c3' . P(A'locx' = (A'y' + 1))
-    +
-    (0 <= (A'locx' + 1) && (A'locx' + 1) <= 4) -> c4' . P(A'y' = (A'locx' + 1))
-    +
-    ((A'y' > 1) && 0 <= (A'locx' + 1) && (A'locx' + 1) <= 4) -> c5' . P(A'y' = (A'locx' + 1))
-    +
-    % CIF variable value actions.
-    A'locx''varvalue(A'locx') . P()
-    +
-    A'y''varvalue(A'y') . P()
-;
-
-% Initialization.
-init P(0, 0);
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/event_based_aut.cif b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/event_based_aut.cif
deleted file mode 100644
index 6a5a6d72e2..0000000000
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/event_based_aut.cif
+++ /dev/null
@@ -1,26 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Copyright (c) 2010, 2024 Contributors to the Eclipse Foundation
-//
-// See the NOTICE file(s) distributed with this work for additional
-// information regarding copyright ownership.
-//
-// This program and the accompanying materials are made available
-// under the terms of the MIT License which is available at
-// https://opensource.org/licenses/MIT
-//
-// SPDX-License-Identifier: MIT
-//////////////////////////////////////////////////////////////////////////////
-
-automaton A:
-  // No variable.
-  controllable a, b, c; // Event c is disabled.
-  alphabet a, b, c;
-
-  location P:
-    initial true;
-    edge a goto Q;
-
-  location Q:
-    edge b goto P;
-    marked;
-end
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/event_based_aut.err b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/event_based_aut.err
deleted file mode 100644
index be3164ec04..0000000000
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/event_based_aut.err
+++ /dev/null
@@ -1 +0,0 @@
-WARNING: File "cif2mcrl2/event_based_aut.cif": Semantic warning at line 17, column 18: The alphabet of automaton "A" globally disables event "A.c", as the event is not used on any of the edges of the automaton.
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/event_based_aut.mcrl2 b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/event_based_aut.mcrl2
deleted file mode 100644
index f90edfe49b..0000000000
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/event_based_aut.mcrl2
+++ /dev/null
@@ -1,28 +0,0 @@
-% Generated by CIF to mCRL2.
-
-% Sorts for CIF enumerations.
-sort A'LPE' = struct A'P' | A'Q';
-
-% Actions for CIF events.
-act A'a';
-act A'b';
-act A'c';
-
-% Actions for CIF variables having certain values.
-act A''varvalue: A'LPE';
-
-% Process for behavior of the CIF specification.
-proc P(
-    A': A'LPE'
-) =
-    % CIF linearized edges.
-    ((A' == A'P')) -> A'a' . P(A' = A'Q')
-    +
-    ((A' == A'Q')) -> A'b' . P(A' = A'P')
-    +
-    % CIF variable value actions.
-    A''varvalue(A') . P()
-;
-
-% Initialization.
-init P(A'P');
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/merge.cif b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/merge.cif
deleted file mode 100644
index d11b77b477..0000000000
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/merge.cif
+++ /dev/null
@@ -1,35 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// Copyright (c) 2010, 2024 Contributors to the Eclipse Foundation
-//
-// See the NOTICE file(s) distributed with this work for additional
-// information regarding copyright ownership.
-//
-// This program and the accompanying materials are made available
-// under the terms of the MIT License which is available at
-// https://opensource.org/licenses/MIT
-//
-// SPDX-License-Identifier: MIT
-//////////////////////////////////////////////////////////////////////////////
-
-event nn, ns, na; // First letter is A usage (never, sometimes, always)
-event sn, ss, sa; // Second letter is B usage (never, sometimes, always)
-event an, as, aa;
-
-automaton A:
-  location:
-    initial;
-    edge nn, ns, na;
-    edge sn, ss, sa;          // Sometimes reads B.x
-    edge sn, ss, sa when B.x;
-    edge an, as, aa when B.x; // Always reads B.x
-end
-
-automaton B:
-  disc bool x;
-  location:
-    initial;
-    edge nn, sn, an;
-    edge ns, ss, as;          // Sometimes reads B.x
-    edge ns, ss, as when B.x;
-    edge na, sa, aa when B.x; // Always reads B.x
-end
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/merge.err b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/merge.err
deleted file mode 100644
index 10fdd69847..0000000000
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/merge.err
+++ /dev/null
@@ -1,2 +0,0 @@
-WARNING: File "cif2mcrl2/merge.cif": Semantic warning at line 33, column 26: Convoluted reference to local declaration. Use "x" instead.
-WARNING: File "cif2mcrl2/merge.cif": Semantic warning at line 34, column 26: Convoluted reference to local declaration. Use "x" instead.
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/merge.mcrl2 b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/merge.mcrl2
deleted file mode 100644
index ff03b6794f..0000000000
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/merge.mcrl2
+++ /dev/null
@@ -1,59 +0,0 @@
-% Generated by CIF to mCRL2.
-
-% Actions for CIF events.
-act nn';
-act ns';
-act na';
-act sn';
-act ss';
-act sa';
-act an';
-act as';
-act aa';
-
-% Actions for CIF variables having certain values.
-act B'x''varvalue: Bool;
-
-% Process for behavior of the CIF specification.
-proc P(
-    B'x': Bool
-) =
-    % CIF linearized edges.
-    ((B'x' && B'x')) -> aa' . P()
-    +
-    (B'x') -> an' . P()
-    +
-    (B'x') -> as' . P()
-    +
-    ((B'x' && B'x')) -> as' . P()
-    +
-    (B'x') -> na' . P()
-    +
-    (true) -> nn' . P()
-    +
-    (true) -> ns' . P()
-    +
-    (B'x') -> ns' . P()
-    +
-    (B'x') -> sa' . P()
-    +
-    ((B'x' && B'x')) -> sa' . P()
-    +
-    (true) -> sn' . P()
-    +
-    (B'x') -> sn' . P()
-    +
-    (true) -> ss' . P()
-    +
-    (B'x') -> ss' . P()
-    +
-    (B'x') -> ss' . P()
-    +
-    ((B'x' && B'x')) -> ss' . P()
-    +
-    % CIF variable value actions.
-    B'x''varvalue(B'x') . P()
-;
-
-% Initialization.
-init P(false);
-- 
GitLab


From 8737b2c090d8717be5b374130638958a13585f9d Mon Sep 17 00:00:00 2001
From: Dennis Hendriks <dh_tue@hotmail.com>
Date: Mon, 5 Aug 2024 18:47:47 +0200
Subject: [PATCH 13/18] #352 Extend CIF to mCRL2 precondition test.

---
 .../tests/cif2mcrl2/invalid.cif               |   6 +
 .../tests/cif2mcrl2/invalid.err               | 105 ++++++++++++++----
 2 files changed, 87 insertions(+), 24 deletions(-)

diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/invalid.cif b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/invalid.cif
index 6961e85ffa..74c939c67b 100644
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/invalid.cif
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/invalid.cif
@@ -37,6 +37,7 @@ group g:
   plant p:
     disc int[1..2] x1 in {1,2};     // Multiple potential initial values.
     disc int[1..2] x2 in any;       // Multiple potential initial values.
+    disc bool      x3 = i;          // Not a statically evaluable initial value.
     cont cnt der 1.0;               // Continuous variable, real type/value.
     disc list bool lb = [true];     // List type/expr.
 
@@ -45,8 +46,11 @@ group g:
 
     location:
       initial true;
+      urgent;                       // Urgent location.
       edge e1 do if true: x1 := 2 end; // 'if' update.
       edge e2 do lb := lb + [false];   // List type/expr.
+      edge e1 do (x1, x2) := (1, 1);   // Multi-assignment.
+      edge e1 now;                  // Urgent edge.
 
       plant invariant 1+1 = 2;      // Invariant.
       plant invariant 1 = 3;        // Invariant.
@@ -55,4 +59,6 @@ group g:
   cont x der 1;                     // Continuous variable.
   cont y;                           // Continuous variable.
   equation y' = 2;                  // Equation.
+
+  input bool i;                     // Input variable.
 end
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/invalid.err b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/invalid.err
index a4f62987d8..fb3f25e284 100644
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/invalid.err
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/invalid.err
@@ -1,13 +1,14 @@
 WARNING: File "cif2mcrl2/invalid.cif": Semantic warning at line 17, column 3: Duplicate state invariant.
 WARNING: File "cif2mcrl2/invalid.cif": Semantic warning at line 18, column 3: Duplicate state invariant.
 WARNING: File "cif2mcrl2/invalid.cif": Semantic warning at line 22, column 13: Automaton "g.no_initial" has no initial location.
-WARNING: File "cif2mcrl2/invalid.cif": Semantic warning at line 39, column 20: Discrete variable "g.p.x2" is not used anywhere in the specification.
-WARNING: File "cif2mcrl2/invalid.cif": Semantic warning at line 43, column 11: Duplicate state invariant.
+WARNING: File "cif2mcrl2/invalid.cif": Semantic warning at line 40, column 20: Discrete variable "g.p.x3" is not used anywhere in the specification.
 WARNING: File "cif2mcrl2/invalid.cif": Semantic warning at line 44, column 11: Duplicate state invariant.
+WARNING: File "cif2mcrl2/invalid.cif": Semantic warning at line 45, column 11: Duplicate state invariant.
+WARNING: File "cif2mcrl2/invalid.cif": Semantic warning at line 53, column 15: Edge is redundantly urgent, since its source location (the location of automaton "g.p") is also urgent.
 ERROR: CIF to mCRL2 transformation failed due to unsatisfied preconditions:
 
   ------------------------------
-  (1/16) A list literal is used.
+  (1/24) A list literal is used.
   ------------------------------
    * In automaton "g.p":
      - edge e2 do lb := lb + [false];
@@ -17,7 +18,7 @@ ERROR: CIF to mCRL2 transformation failed due to unsatisfied preconditions:
                            ^
 
   ---------------------------
-  (2/16) A list type is used.
+  (2/24) A list type is used.
   ---------------------------
    * In automaton "g.p":
      - edge e2 do lb := lb + [false];
@@ -27,7 +28,7 @@ ERROR: CIF to mCRL2 transformation failed due to unsatisfied preconditions:
             ^              ^
 
   -------------------------------------
-  (3/16) A real number literal is used.
+  (3/24) A real number literal is used.
   -------------------------------------
    * In group "g":
      - equation y' = 2.0;
@@ -40,7 +41,7 @@ ERROR: CIF to mCRL2 transformation failed due to unsatisfied preconditions:
                   ^
 
   ---------------------------
-  (4/16) A real type is used.
+  (4/24) A real type is used.
   ---------------------------
    * In group "g":
      - equation y' = 2.0;
@@ -52,15 +53,36 @@ ERROR: CIF to mCRL2 transformation failed due to unsatisfied preconditions:
      - cont x der 1.0;
                   ^
 
+  -------------------------------
+  (5/24) A tuple literal is used.
+  -------------------------------
+   * In automaton "g.p":
+     - edge e1 do (x1, x2) := (1, 1);
+                  ^           ^
+
+  ----------------------------
+  (6/24) A tuple type is used.
+  ----------------------------
+   * In automaton "g.p":
+     - edge e1 do (x1, x2) := (1, 1);
+                  ^           ^
+
   ---------------------------
-  (5/16) An equation is used.
+  (7/24) An equation is used.
   ---------------------------
    * In group "g":
      - equation y' = 2.0;
                    ^
 
+  -------------------------------------------
+  (8/24) An input variable reference is used.
+  -------------------------------------------
+   * In discrete variable "g.p.x3":
+     - disc bool x3 = i;
+                      ^
+
   ----------------------------
-  (6/16) An invariant is used.
+  (9/24) An invariant is used.
   ----------------------------
    * In group "g":
      - invariant false;
@@ -71,57 +93,71 @@ ERROR: CIF to mCRL2 transformation failed due to unsatisfied preconditions:
      - plant invariant false;
              ^
 
-  ------------------------------------------------
-  (7/16) Automaton has multiple initial locations.
-  ------------------------------------------------
+  -------------------------------------------------
+  (10/24) Automaton has multiple initial locations.
+  -------------------------------------------------
    * In group "g":
      - automaton mult_initials:
                  ^
 
-  -----------------------------------------
-  (8/16) Automaton has no initial location.
-  -----------------------------------------
+  ------------------------------------------
+  (11/24) Automaton has no initial location.
+  ------------------------------------------
    * In group "g":
      - automaton no_initial:
                  ^
 
-  -----------------------------------------------------------
-  (9/16) Binary operator "+" is used on a list typed operand.
-  -----------------------------------------------------------
+  ------------------------------------------------------------
+  (12/24) Binary operator "+" is used on a list typed operand.
+  ------------------------------------------------------------
    * In automaton "g.p":
      - edge e2 do lb := lb + [false];
                            ^
 
   --------------------------------------------------
-  (10/16) Component has an initialization predicate.
+  (13/24) Component has an initialization predicate.
   --------------------------------------------------
    * In group "g":
      - initial false;
                ^
 
+  -----------------------------------------------------------------------------------
+  (14/24) Discrete variable has an initial value that cannot be evaluated statically.
+  -----------------------------------------------------------------------------------
+   * In discrete variable "g.p.x3":
+     - disc bool x3 = i;
+                      ^
+
   ----------------------------------------------------------------
-  (11/16) Discrete variable has multiple potential initial values.
+  (15/24) Discrete variable has multiple potential initial values.
   ----------------------------------------------------------------
    * In automaton "g.p":
      - disc int[1..2] x1 in {1, 2};
                       ^
 
   ------------------------------------------------------------------------------------------
-  (12/16) Discrete variable has multiple potential initial values (any value in its domain).
+  (16/24) Discrete variable has multiple potential initial values (any value in its domain).
   ------------------------------------------------------------------------------------------
    * In automaton "g.p":
      - disc int[1..2] x2 in any;
                       ^
 
+  ------------------------------------
+  (17/24) Edge has a multi-assignment.
+  ------------------------------------
+   * In automaton "g.p":
+     - edge e1 do (x1, x2) := (1, 1);
+                           ^
+
   --------------------------------
-  (13/16) Edge has an 'if' update.
+  (18/24) Edge has an 'if' update.
   --------------------------------
    * In automaton "g.p":
      - edge e1 do if true: x1 := 2 end;
                   ^
 
   -----------------------------------------
-  (14/16) Edge has an explicit 'tau' event.
+  (19/24) Edge has an explicit 'tau' event.
   -----------------------------------------
    * In automaton "g.no_initial":
      - edge e1, e2, tau;
@@ -129,8 +165,15 @@ ERROR: CIF to mCRL2 transformation failed due to unsatisfied preconditions:
      - edge tau;
             ^
 
+  -----------------------
+  (20/24) Edge is urgent.
+  -----------------------
+   * In automaton "g.p":
+     - edge e1 now;
+       ^
+
   ---------------------------
-  (15/16) Event is a channel.
+  (21/24) Event is a channel.
   ---------------------------
    * In group "g":
      - event int[0..5] e1;
@@ -138,8 +181,15 @@ ERROR: CIF to mCRL2 transformation failed due to unsatisfied preconditions:
      - event int[0..5] e2;
                        ^
 
+  ---------------------------
+  (22/24) Location is urgent.
+  ---------------------------
+   * In automaton "g.p":
+     - location:
+       ^
+
   ------------------------------------------
-  (16/16) Variable is a continuous variable.
+  (23/24) Variable is a continuous variable.
   ------------------------------------------
    * In group "g":
      - cont x der 1.0;
@@ -149,3 +199,10 @@ ERROR: CIF to mCRL2 transformation failed due to unsatisfied preconditions:
    * In automaton "g.p":
      - cont cnt der 1.0;
             ^
+
+  --------------------------------------
+  (24/24) Variable is an input variable.
+  --------------------------------------
+   * In group "g":
+     - input bool i;
+                  ^
-- 
GitLab


From eebdc8d1998945ee5354654f1055fe6c8138ff59 Mon Sep 17 00:00:00 2001
From: Dennis Hendriks <dh_tue@hotmail.com>
Date: Mon, 5 Aug 2024 18:48:19 +0200
Subject: [PATCH 14/18] #352 Add some more CIF to mCRL2 tests, to test the new
 implementation.

- And one test updated.
---
 .../tests/cif2mcrl2/alphabet.cif              |  25 +++
 .../tests/cif2mcrl2/alphabet.err              |   1 +
 .../tests/cif2mcrl2/alphabet.mcrl2            |  28 +++
 .../tests/cif2mcrl2/assignments.cif           |  23 +++
 .../tests/cif2mcrl2/assignments.mcrl2         |  31 ++++
 .../tests/cif2mcrl2/const_alg_typedecl.cif    |  31 ++++
 .../tests/cif2mcrl2/const_alg_typedecl.mcrl2  |  21 +++
 .../tests/cif2mcrl2/empty_supported.cif       |  17 ++
 .../tests/cif2mcrl2/empty_supported.mcrl2     |   9 +
 .../tests/cif2mcrl2/empty_unsupported.cif     |  14 ++
 .../tests/cif2mcrl2/empty_unsupported.err     |   5 +
 .../tests/cif2mcrl2/guards.cif                |  24 +++
 .../tests/cif2mcrl2/guards.mcrl2              |  34 ++++
 .../tests/cif2mcrl2/initialization.cif        |  24 +++
 .../tests/cif2mcrl2/initialization.mcrl2      |  33 ++++
 .../tests/cif2mcrl2/no_value_actions.cif      |  17 +-
 .../tests/cif2mcrl2/no_value_actions.err      |   3 +
 .../tests/cif2mcrl2/no_value_actions.mcrl2    |  13 +-
 .../tests/cif2mcrl2/only_vars_no_edges.cif    |  19 ++
 .../tests/cif2mcrl2/only_vars_no_edges.err    |   2 +
 .../tests/cif2mcrl2/only_vars_no_edges.mcrl2  |  19 ++
 .../tests/cif2mcrl2/types_exprs_bool.cif      |  99 +++++++++++
 .../tests/cif2mcrl2/types_exprs_bool.mcrl2    | 163 ++++++++++++++++++
 .../tests/cif2mcrl2/types_exprs_enum.cif      |  33 ++++
 .../tests/cif2mcrl2/types_exprs_enum.mcrl2    |  30 ++++
 .../tests/cif2mcrl2/types_exprs_int.cif       |  44 +++++
 .../tests/cif2mcrl2/types_exprs_int.mcrl2     |  52 ++++++
 .../tests/cif2mcrl2/value_actions_subset.cif  |  35 ++++
 .../tests/cif2mcrl2/value_actions_subset.err  |   3 +
 .../cif2mcrl2/value_actions_subset.mcrl2      |  35 ++++
 .../tests/test_cif2mcrl2.tooldef              |   5 +-
 31 files changed, 871 insertions(+), 21 deletions(-)
 create mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/alphabet.cif
 create mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/alphabet.err
 create mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/alphabet.mcrl2
 create mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/assignments.cif
 create mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/assignments.mcrl2
 create mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/const_alg_typedecl.cif
 create mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/const_alg_typedecl.mcrl2
 create mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/empty_supported.cif
 create mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/empty_supported.mcrl2
 create mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/empty_unsupported.cif
 create mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/empty_unsupported.err
 create mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/guards.cif
 create mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/guards.mcrl2
 create mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/initialization.cif
 create mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/initialization.mcrl2
 create mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/no_value_actions.err
 create mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/only_vars_no_edges.cif
 create mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/only_vars_no_edges.err
 create mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/only_vars_no_edges.mcrl2
 create mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/types_exprs_bool.cif
 create mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/types_exprs_bool.mcrl2
 create mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/types_exprs_enum.cif
 create mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/types_exprs_enum.mcrl2
 create mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/types_exprs_int.cif
 create mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/types_exprs_int.mcrl2
 create mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/value_actions_subset.cif
 create mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/value_actions_subset.err
 create mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/value_actions_subset.mcrl2

diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/alphabet.cif b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/alphabet.cif
new file mode 100644
index 0000000000..5ce466a662
--- /dev/null
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/alphabet.cif
@@ -0,0 +1,25 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2010, 2024 Contributors to the Eclipse Foundation
+//
+// See the NOTICE file(s) distributed with this work for additional
+// information regarding copyright ownership.
+//
+// This program and the accompanying materials are made available
+// under the terms of the MIT License which is available at
+// https://opensource.org/licenses/MIT
+//
+// SPDX-License-Identifier: MIT
+//////////////////////////////////////////////////////////////////////////////
+
+automaton A:
+  controllable a, b, c; // Event c is disabled.
+  alphabet a, b, c;
+
+  location P:
+    initial true;
+    edge a goto Q;
+
+  location Q:
+    edge b goto P;
+    marked;
+end
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/alphabet.err b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/alphabet.err
new file mode 100644
index 0000000000..0c1cad60d1
--- /dev/null
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/alphabet.err
@@ -0,0 +1 @@
+WARNING: File "cif2mcrl2/alphabet.cif": Semantic warning at line 16, column 18: The alphabet of automaton "A" globally disables event "A.c", as the event is not used on any of the edges of the automaton.
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/alphabet.mcrl2 b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/alphabet.mcrl2
new file mode 100644
index 0000000000..f90edfe49b
--- /dev/null
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/alphabet.mcrl2
@@ -0,0 +1,28 @@
+% Generated by CIF to mCRL2.
+
+% Sorts for CIF enumerations.
+sort A'LPE' = struct A'P' | A'Q';
+
+% Actions for CIF events.
+act A'a';
+act A'b';
+act A'c';
+
+% Actions for CIF variables having certain values.
+act A''varvalue: A'LPE';
+
+% Process for behavior of the CIF specification.
+proc P(
+    A': A'LPE'
+) =
+    % CIF linearized edges.
+    ((A' == A'P')) -> A'a' . P(A' = A'Q')
+    +
+    ((A' == A'Q')) -> A'b' . P(A' = A'P')
+    +
+    % CIF variable value actions.
+    A''varvalue(A') . P()
+;
+
+% Initialization.
+init P(A'P');
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/assignments.cif b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/assignments.cif
new file mode 100644
index 0000000000..f81eb9d585
--- /dev/null
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/assignments.cif
@@ -0,0 +1,23 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2024 Contributors to the Eclipse Foundation
+//
+// See the NOTICE file(s) distributed with this work for additional
+// information regarding copyright ownership.
+//
+// This program and the accompanying materials are made available
+// under the terms of the MIT License which is available at
+// https://opensource.org/licenses/MIT
+//
+// SPDX-License-Identifier: MIT
+//////////////////////////////////////////////////////////////////////////////
+
+event e, f, g;
+
+automaton a:
+  disc int x, y;
+  location:
+    initial;
+    edge e;                     // No assignments.
+    edge f do x := 1;           // One assignment.
+    edge g do x := 2, y := 3;   // Two assignments (all variables).
+end
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/assignments.mcrl2 b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/assignments.mcrl2
new file mode 100644
index 0000000000..88c2958052
--- /dev/null
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/assignments.mcrl2
@@ -0,0 +1,31 @@
+% Generated by CIF to mCRL2.
+
+% Actions for CIF events.
+act e';
+act f';
+act g';
+
+% Actions for CIF variables having certain values.
+act a'x''varvalue: Int;
+act a'y''varvalue: Int;
+
+% Process for behavior of the CIF specification.
+proc P(
+    a'x': Int,
+    a'y': Int
+) =
+    % CIF linearized edges.
+    (true) -> e' . P()
+    +
+    (-2147483648 <= 1 && 1 <= 2147483647) -> f' . P(a'x' = 1)
+    +
+    (-2147483648 <= 2 && 2 <= 2147483647 && -2147483648 <= 3 && 3 <= 2147483647) -> g' . P(a'x' = 2, a'y' = 3)
+    +
+    % CIF variable value actions.
+    a'x''varvalue(a'x') . P()
+    +
+    a'y''varvalue(a'y') . P()
+;
+
+% Initialization.
+init P(0, 0);
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/const_alg_typedecl.cif b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/const_alg_typedecl.cif
new file mode 100644
index 0000000000..e98f9bea55
--- /dev/null
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/const_alg_typedecl.cif
@@ -0,0 +1,31 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2024 Contributors to the Eclipse Foundation
+//
+// See the NOTICE file(s) distributed with this work for additional
+// information regarding copyright ownership.
+//
+// This program and the accompanying materials are made available
+// under the terms of the MIT License which is available at
+// https://opensource.org/licenses/MIT
+//
+// SPDX-License-Identifier: MIT
+//////////////////////////////////////////////////////////////////////////////
+
+type t = int;
+type tt = t;
+const tt c = 5;
+
+type ttt = bool;
+alg ttt a = aut.x < c;
+
+event e;
+
+automaton aut:
+  type t = int;
+  type tt = t;
+  disc tt x;
+
+  location:
+    initial;
+    edge e when a do x := x + 1;
+end
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/const_alg_typedecl.mcrl2 b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/const_alg_typedecl.mcrl2
new file mode 100644
index 0000000000..f02a5b38e6
--- /dev/null
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/const_alg_typedecl.mcrl2
@@ -0,0 +1,21 @@
+% Generated by CIF to mCRL2.
+
+% Actions for CIF events.
+act e';
+
+% Actions for CIF variables having certain values.
+act aut'x''varvalue: Int;
+
+% Process for behavior of the CIF specification.
+proc P(
+    aut'x': Int
+) =
+    % CIF linearized edges.
+    ((aut'x' < 5) && -2147483648 <= (aut'x' + 1) && (aut'x' + 1) <= 2147483647) -> e' . P(aut'x' = (aut'x' + 1))
+    +
+    % CIF variable value actions.
+    aut'x''varvalue(aut'x') . P()
+;
+
+% Initialization.
+init P(0);
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/empty_supported.cif b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/empty_supported.cif
new file mode 100644
index 0000000000..a3e2c16362
--- /dev/null
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/empty_supported.cif
@@ -0,0 +1,17 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2024 Contributors to the Eclipse Foundation
+//
+// See the NOTICE file(s) distributed with this work for additional
+// information regarding copyright ownership.
+//
+// This program and the accompanying materials are made available
+// under the terms of the MIT License which is available at
+// https://opensource.org/licenses/MIT
+//
+// SPDX-License-Identifier: MIT
+//////////////////////////////////////////////////////////////////////////////
+
+automaton a:
+  location:
+    initial;
+end
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/empty_supported.mcrl2 b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/empty_supported.mcrl2
new file mode 100644
index 0000000000..58a5db662e
--- /dev/null
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/empty_supported.mcrl2
@@ -0,0 +1,9 @@
+% Generated by CIF to mCRL2.
+
+% Process for behavior of the CIF specification.
+proc P =
+    delta
+;
+
+% Initialization.
+init P();
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/empty_unsupported.cif b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/empty_unsupported.cif
new file mode 100644
index 0000000000..98c0908dba
--- /dev/null
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/empty_unsupported.cif
@@ -0,0 +1,14 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2024 Contributors to the Eclipse Foundation
+//
+// See the NOTICE file(s) distributed with this work for additional
+// information regarding copyright ownership.
+//
+// This program and the accompanying materials are made available
+// under the terms of the MIT License which is available at
+// https://opensource.org/licenses/MIT
+//
+// SPDX-License-Identifier: MIT
+//////////////////////////////////////////////////////////////////////////////
+
+// Intentionally empty.
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/empty_unsupported.err b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/empty_unsupported.err
new file mode 100644
index 0000000000..c9915de268
--- /dev/null
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/empty_unsupported.err
@@ -0,0 +1,5 @@
+ERROR: CIF to mCRL2 transformation failed due to unsatisfied preconditions:
+
+  ----------------------------------------------------------------------------
+  (1/1) Specification does not have at least 1 automaton (no automaton found).
+  ----------------------------------------------------------------------------
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/guards.cif b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/guards.cif
new file mode 100644
index 0000000000..c170acbc00
--- /dev/null
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/guards.cif
@@ -0,0 +1,24 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2024 Contributors to the Eclipse Foundation
+//
+// See the NOTICE file(s) distributed with this work for additional
+// information regarding copyright ownership.
+//
+// This program and the accompanying materials are made available
+// under the terms of the MIT License which is available at
+// https://opensource.org/licenses/MIT
+//
+// SPDX-License-Identifier: MIT
+//////////////////////////////////////////////////////////////////////////////
+
+event e, f, g, h;
+
+automaton a:
+  disc int x, y;
+  location:
+    initial;
+    edge e;                             // No guards.
+    edge f when x = 1;                  // One guard.
+    edge g when x = 2, x != 3;          // Two guards.
+    edge h when y = 5 do x := x + 1;    // One guard, int out of range protection.
+end
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/guards.mcrl2 b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/guards.mcrl2
new file mode 100644
index 0000000000..a60da427f6
--- /dev/null
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/guards.mcrl2
@@ -0,0 +1,34 @@
+% Generated by CIF to mCRL2.
+
+% Actions for CIF events.
+act e';
+act f';
+act g';
+act h';
+
+% Actions for CIF variables having certain values.
+act a'x''varvalue: Int;
+act a'y''varvalue: Int;
+
+% Process for behavior of the CIF specification.
+proc P(
+    a'x': Int,
+    a'y': Int
+) =
+    % CIF linearized edges.
+    (true) -> e' . P()
+    +
+    ((a'x' == 1)) -> f' . P()
+    +
+    (((a'x' == 2) && (a'x' != 3))) -> g' . P()
+    +
+    ((a'y' == 5) && -2147483648 <= (a'x' + 1) && (a'x' + 1) <= 2147483647) -> h' . P(a'x' = (a'x' + 1))
+    +
+    % CIF variable value actions.
+    a'x''varvalue(a'x') . P()
+    +
+    a'y''varvalue(a'y') . P()
+;
+
+% Initialization.
+init P(0, 0);
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/initialization.cif b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/initialization.cif
new file mode 100644
index 0000000000..4e05b23259
--- /dev/null
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/initialization.cif
@@ -0,0 +1,24 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2024 Contributors to the Eclipse Foundation
+//
+// See the NOTICE file(s) distributed with this work for additional
+// information regarding copyright ownership.
+//
+// This program and the accompanying materials are made available
+// under the terms of the MIT License which is available at
+// https://opensource.org/licenses/MIT
+//
+// SPDX-License-Identifier: MIT
+//////////////////////////////////////////////////////////////////////////////
+
+event e;
+
+automaton a:
+  disc int w = z + 2;   // 5
+  disc int x;           // 0
+  disc int y = 3;       // 3
+  disc int z = x + y;   // 3
+  location:
+    initial;
+    edge e when w + x + y + z < 0;
+end
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/initialization.mcrl2 b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/initialization.mcrl2
new file mode 100644
index 0000000000..16d5ba79b8
--- /dev/null
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/initialization.mcrl2
@@ -0,0 +1,33 @@
+% Generated by CIF to mCRL2.
+
+% Actions for CIF events.
+act e';
+
+% Actions for CIF variables having certain values.
+act a'w''varvalue: Int;
+act a'x''varvalue: Int;
+act a'y''varvalue: Int;
+act a'z''varvalue: Int;
+
+% Process for behavior of the CIF specification.
+proc P(
+    a'w': Int,
+    a'x': Int,
+    a'y': Int,
+    a'z': Int
+) =
+    % CIF linearized edges.
+    (((((a'w' + a'x') + a'y') + a'z') < 0)) -> e' . P()
+    +
+    % CIF variable value actions.
+    a'w''varvalue(a'w') . P()
+    +
+    a'x''varvalue(a'x') . P()
+    +
+    a'y''varvalue(a'y') . P()
+    +
+    a'z''varvalue(a'z') . P()
+;
+
+% Initialization.
+init P(5, 0, 3, 3);
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/no_value_actions.cif b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/no_value_actions.cif
index aba0804d01..713f83cf6d 100644
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/no_value_actions.cif
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/no_value_actions.cif
@@ -1,5 +1,5 @@
 //////////////////////////////////////////////////////////////////////////////
-// Copyright (c) 2021, 2024 Contributors to the Eclipse Foundation
+// Copyright (c) 2024 Contributors to the Eclipse Foundation
 //
 // See the NOTICE file(s) distributed with this work for additional
 // information regarding copyright ownership.
@@ -11,28 +11,25 @@
 // SPDX-License-Identifier: MIT
 //////////////////////////////////////////////////////////////////////////////
 
-event a, b, c;
-
 automaton P:
+  event a;
   disc int[0..10] x = 0;
   disc int[-5..5] zero = 0;
 
   location p1:
     initial;
-    edge a do x := x + 1 goto p2;
+    edge a goto p2;
 
-  location p2:
-    edge c when Q.y != 0 goto p1;
-    edge a do x := 1 goto p1;
+  location p2;
 end
 
 automaton Q:
+  event b;
   disc int[0..1] y = 1;
 
   location q1:
     initial;
-    edge a when y = 1 goto q2;
+    edge b goto q2;
 
-  location q2:
-    edge b when y = 1 and P.x < 8 and P.zero = 0 goto q1;
+  location q2;
 end
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/no_value_actions.err b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/no_value_actions.err
new file mode 100644
index 0000000000..d76835ee49
--- /dev/null
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/no_value_actions.err
@@ -0,0 +1,3 @@
+WARNING: File "cif2mcrl2/no_value_actions.cif": Semantic warning at line 16, column 19: Discrete variable "P.x" is not used anywhere in the specification.
+WARNING: File "cif2mcrl2/no_value_actions.cif": Semantic warning at line 17, column 19: Discrete variable "P.zero" is not used anywhere in the specification.
+WARNING: File "cif2mcrl2/no_value_actions.cif": Semantic warning at line 28, column 18: Discrete variable "Q.y" is not used anywhere in the specification.
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/no_value_actions.mcrl2 b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/no_value_actions.mcrl2
index f3f5c626c9..27f2d08b9b 100644
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/no_value_actions.mcrl2
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/no_value_actions.mcrl2
@@ -5,9 +5,8 @@ sort P'LPE' = struct P'p1' | P'p2';
 sort Q'LPE' = struct Q'q1' | Q'q2';
 
 % Actions for CIF events.
-act a';
-act b';
-act c';
+act P'a';
+act Q'b';
 
 % Process for behavior of the CIF specification.
 proc P(
@@ -18,13 +17,9 @@ proc P(
     Q': Q'LPE'
 ) =
     % CIF linearized edges.
-    (((P' == P'p1') && ((Q' == Q'q1') && (Q'y' == 1))) && 0 <= (P'x' + 1) && (P'x' + 1) <= 10) -> a' . P(P'x' = (P'x' + 1), P' = P'p2', Q' = Q'q2')
+    ((P' == P'p1')) -> P'a' . P(P' = P'p2')
     +
-    (((P' == P'p2') && ((Q' == Q'q1') && (Q'y' == 1))) && 0 <= 1 && 1 <= 10) -> a' . P(P'x' = 1, P' = P'p1', Q' = Q'q2')
-    +
-    ((((Q' == Q'q2') && (Q'y' == 1)) && ((P'x' < 8) && (P'zero' == 0)))) -> b' . P(Q' = Q'q1')
-    +
-    (((P' == P'p2') && (Q'y' != 0))) -> c' . P(P' = P'p1')
+    ((Q' == Q'q1')) -> Q'b' . P(Q' = Q'q2')
 ;
 
 % Initialization.
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/only_vars_no_edges.cif b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/only_vars_no_edges.cif
new file mode 100644
index 0000000000..4cc3dae8ea
--- /dev/null
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/only_vars_no_edges.cif
@@ -0,0 +1,19 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2024 Contributors to the Eclipse Foundation
+//
+// See the NOTICE file(s) distributed with this work for additional
+// information regarding copyright ownership.
+//
+// This program and the accompanying materials are made available
+// under the terms of the MIT License which is available at
+// https://opensource.org/licenses/MIT
+//
+// SPDX-License-Identifier: MIT
+//////////////////////////////////////////////////////////////////////////////
+
+automaton a:
+  disc int x, y;
+
+  location:
+    initial;
+end
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/only_vars_no_edges.err b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/only_vars_no_edges.err
new file mode 100644
index 0000000000..c63665539e
--- /dev/null
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/only_vars_no_edges.err
@@ -0,0 +1,2 @@
+WARNING: File "cif2mcrl2/only_vars_no_edges.cif": Semantic warning at line 15, column 12: Discrete variable "a.x" is not used anywhere in the specification.
+WARNING: File "cif2mcrl2/only_vars_no_edges.cif": Semantic warning at line 15, column 15: Discrete variable "a.y" is not used anywhere in the specification.
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/only_vars_no_edges.mcrl2 b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/only_vars_no_edges.mcrl2
new file mode 100644
index 0000000000..f9621ad165
--- /dev/null
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/only_vars_no_edges.mcrl2
@@ -0,0 +1,19 @@
+% Generated by CIF to mCRL2.
+
+% Actions for CIF variables having certain values.
+act a'x''varvalue: Int;
+act a'y''varvalue: Int;
+
+% Process for behavior of the CIF specification.
+proc P(
+    a'x': Int,
+    a'y': Int
+) =
+    % CIF variable value actions.
+    a'x''varvalue(a'x') . P()
+    +
+    a'y''varvalue(a'y') . P()
+;
+
+% Initialization.
+init P(0, 0);
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/types_exprs_bool.cif b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/types_exprs_bool.cif
new file mode 100644
index 0000000000..2db068d57d
--- /dev/null
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/types_exprs_bool.cif
@@ -0,0 +1,99 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2024 Contributors to the Eclipse Foundation
+//
+// See the NOTICE file(s) distributed with this work for additional
+// information regarding copyright ownership.
+//
+// This program and the accompanying materials are made available
+// under the terms of the MIT License which is available at
+// https://opensource.org/licenses/MIT
+//
+// SPDX-License-Identifier: MIT
+//////////////////////////////////////////////////////////////////////////////
+
+const bool t = true;
+alg bool a = t;
+
+automaton aut:
+  event e;
+  disc bool v = false;
+
+  location f:
+    initial;
+    edge e do v := true goto t;
+
+  location t:
+    edge e do v := false goto f;
+end
+
+enum E = L1, L2, L3;
+
+automaton b:
+  event e01, e02, e03, e04, e05, e06, e07, e08, e09, e10;
+  event e11, e12, e13, e14, e15, e16, e17, e18, e19, e20;
+  event e21, e22, e23, e24, e25, e26, e27, e28, e29, e30;
+  event e31, e32, e33, e34, e35, e36;
+
+  disc bool vt = true, vf = false;
+  disc int v1 = 1, v2 = 2, v3 = 3;
+  disc E ve1 = L1;
+
+  location:
+    initial;
+
+    // Discrete variable and literals.
+    edge e01 when aut.v = false;
+    edge e02 when aut.v = true;
+
+    // Constant and algebraic variable.
+    edge e03 when aut.v = t;
+    edge e04 when aut.v = a;
+
+    // Binary expressions.
+    edge e05 when aut.v and vt;
+    edge e06 when aut.v and vf;
+
+    edge e07 when aut.v or  vt;
+    edge e08 when aut.v or  vf;
+
+    edge e09 when aut.v =>  vt;
+    edge e10 when aut.v =>  vf;
+
+    edge e11 when v1    <   v3;
+    edge e12 when v3    <   v3;
+    edge e13 when v3    <   v2;
+
+    edge e14 when v1    >   v3;
+    edge e15 when v3    >   v3;
+    edge e16 when v3    >   v2;
+
+    edge e17 when v1   <=   v3;
+    edge e18 when v3   <=   v3;
+    edge e19 when v3   <=   v2;
+
+    edge e20 when v1   >=   v3;
+    edge e21 when v3   >=   v3;
+    edge e22 when v3   >=   v2;
+
+    edge e23 when v1   =    v3;
+    edge e24 when v3   =    v3;
+
+    edge e25 when v1   !=   v3;
+    edge e26 when v3   !=   v3;
+
+    edge e27 when vt   =    vt;
+    edge e28 when vt   =    vf;
+
+    edge e29 when vt   !=   vt;
+    edge e30 when vt   !=   vf;
+
+    edge e31 when ve1  =    L1;
+    edge e32 when ve1  =    L2;
+
+    edge e33 when ve1  !=   L1;
+    edge e34 when ve1  !=   L2;
+
+    // Unary expressions.
+    edge e35 when not aut.v;
+    edge e36 when not not aut.v;
+end
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/types_exprs_bool.mcrl2 b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/types_exprs_bool.mcrl2
new file mode 100644
index 0000000000..51a2671fa1
--- /dev/null
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/types_exprs_bool.mcrl2
@@ -0,0 +1,163 @@
+% Generated by CIF to mCRL2.
+
+% Sorts for CIF enumerations.
+sort E' = struct L1' | L2' | L3';
+sort aut'LPE' = struct aut'f' | aut't';
+
+% Actions for CIF events.
+act aut'e';
+act b'e01';
+act b'e02';
+act b'e03';
+act b'e04';
+act b'e05';
+act b'e06';
+act b'e07';
+act b'e08';
+act b'e09';
+act b'e10';
+act b'e11';
+act b'e12';
+act b'e13';
+act b'e14';
+act b'e15';
+act b'e16';
+act b'e17';
+act b'e18';
+act b'e19';
+act b'e20';
+act b'e21';
+act b'e22';
+act b'e23';
+act b'e24';
+act b'e25';
+act b'e26';
+act b'e27';
+act b'e28';
+act b'e29';
+act b'e30';
+act b'e31';
+act b'e32';
+act b'e33';
+act b'e34';
+act b'e35';
+act b'e36';
+
+% Actions for CIF variables having certain values.
+act aut''varvalue: aut'LPE';
+act aut'v''varvalue: Bool;
+act b'v1''varvalue: Int;
+act b'v2''varvalue: Int;
+act b'v3''varvalue: Int;
+act b've1''varvalue: E';
+act b'vf''varvalue: Bool;
+act b'vt''varvalue: Bool;
+
+% Process for behavior of the CIF specification.
+proc P(
+    aut'v': Bool,
+    aut': aut'LPE',
+    b'vt': Bool,
+    b'vf': Bool,
+    b'v1': Int,
+    b'v2': Int,
+    b'v3': Int,
+    b've1': E'
+) =
+    % CIF linearized edges.
+    ((aut' == aut'f')) -> aut'e' . P(aut'v' = true, aut' = aut't')
+    +
+    ((aut' == aut't')) -> aut'e' . P(aut'v' = false, aut' = aut'f')
+    +
+    ((aut'v' == false)) -> b'e01' . P()
+    +
+    ((aut'v' == true)) -> b'e02' . P()
+    +
+    ((aut'v' == true)) -> b'e03' . P()
+    +
+    ((aut'v' == true)) -> b'e04' . P()
+    +
+    ((aut'v' && b'vt')) -> b'e05' . P()
+    +
+    ((aut'v' && b'vf')) -> b'e06' . P()
+    +
+    ((aut'v' || b'vt')) -> b'e07' . P()
+    +
+    ((aut'v' || b'vf')) -> b'e08' . P()
+    +
+    ((aut'v' => b'vt')) -> b'e09' . P()
+    +
+    ((aut'v' => b'vf')) -> b'e10' . P()
+    +
+    ((b'v1' < b'v3')) -> b'e11' . P()
+    +
+    ((b'v3' < b'v3')) -> b'e12' . P()
+    +
+    ((b'v3' < b'v2')) -> b'e13' . P()
+    +
+    ((b'v1' > b'v3')) -> b'e14' . P()
+    +
+    ((b'v3' > b'v3')) -> b'e15' . P()
+    +
+    ((b'v3' > b'v2')) -> b'e16' . P()
+    +
+    ((b'v1' <= b'v3')) -> b'e17' . P()
+    +
+    ((b'v3' <= b'v3')) -> b'e18' . P()
+    +
+    ((b'v3' <= b'v2')) -> b'e19' . P()
+    +
+    ((b'v1' >= b'v3')) -> b'e20' . P()
+    +
+    ((b'v3' >= b'v3')) -> b'e21' . P()
+    +
+    ((b'v3' >= b'v2')) -> b'e22' . P()
+    +
+    ((b'v1' == b'v3')) -> b'e23' . P()
+    +
+    ((b'v3' == b'v3')) -> b'e24' . P()
+    +
+    ((b'v1' != b'v3')) -> b'e25' . P()
+    +
+    ((b'v3' != b'v3')) -> b'e26' . P()
+    +
+    ((b'vt' == b'vt')) -> b'e27' . P()
+    +
+    ((b'vt' == b'vf')) -> b'e28' . P()
+    +
+    ((b'vt' != b'vt')) -> b'e29' . P()
+    +
+    ((b'vt' != b'vf')) -> b'e30' . P()
+    +
+    ((b've1' == L1')) -> b'e31' . P()
+    +
+    ((b've1' == L2')) -> b'e32' . P()
+    +
+    ((b've1' != L1')) -> b'e33' . P()
+    +
+    ((b've1' != L2')) -> b'e34' . P()
+    +
+    (!aut'v') -> b'e35' . P()
+    +
+    (aut'v') -> b'e36' . P()
+    +
+    % CIF variable value actions.
+    aut''varvalue(aut') . P()
+    +
+    aut'v''varvalue(aut'v') . P()
+    +
+    b'v1''varvalue(b'v1') . P()
+    +
+    b'v2''varvalue(b'v2') . P()
+    +
+    b'v3''varvalue(b'v3') . P()
+    +
+    b've1''varvalue(b've1') . P()
+    +
+    b'vf''varvalue(b'vf') . P()
+    +
+    b'vt''varvalue(b'vt') . P()
+;
+
+% Initialization.
+init P(false, aut'f', true, false, 1, 2, 3, L1');
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/types_exprs_enum.cif b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/types_exprs_enum.cif
new file mode 100644
index 0000000000..f898595aae
--- /dev/null
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/types_exprs_enum.cif
@@ -0,0 +1,33 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2024 Contributors to the Eclipse Foundation
+//
+// See the NOTICE file(s) distributed with this work for additional
+// information regarding copyright ownership.
+//
+// This program and the accompanying materials are made available
+// under the terms of the MIT License which is available at
+// https://opensource.org/licenses/MIT
+//
+// SPDX-License-Identifier: MIT
+//////////////////////////////////////////////////////////////////////////////
+
+enum E = L1, L2, L3;
+
+const E t = L1;
+alg E a = t;
+
+automaton aut:
+  disc E v = L1;
+
+  event e1, e2, e3;
+
+  location:
+    initial;
+
+    // Discrete variable and literals.
+    edge e1 when v = L3;
+
+    // Constant and algebraic variable.
+    edge e2 when v = t;
+    edge e3 when v = a;
+end
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/types_exprs_enum.mcrl2 b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/types_exprs_enum.mcrl2
new file mode 100644
index 0000000000..c42dd2da65
--- /dev/null
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/types_exprs_enum.mcrl2
@@ -0,0 +1,30 @@
+% Generated by CIF to mCRL2.
+
+% Sorts for CIF enumerations.
+sort E' = struct L1' | L2' | L3';
+
+% Actions for CIF events.
+act aut'e1';
+act aut'e2';
+act aut'e3';
+
+% Actions for CIF variables having certain values.
+act aut'v''varvalue: E';
+
+% Process for behavior of the CIF specification.
+proc P(
+    aut'v': E'
+) =
+    % CIF linearized edges.
+    ((aut'v' == L3')) -> aut'e1' . P()
+    +
+    ((aut'v' == L1')) -> aut'e2' . P()
+    +
+    ((aut'v' == L1')) -> aut'e3' . P()
+    +
+    % CIF variable value actions.
+    aut'v''varvalue(aut'v') . P()
+;
+
+% Initialization.
+init P(L1');
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/types_exprs_int.cif b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/types_exprs_int.cif
new file mode 100644
index 0000000000..357eadd4a9
--- /dev/null
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/types_exprs_int.cif
@@ -0,0 +1,44 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2024 Contributors to the Eclipse Foundation
+//
+// See the NOTICE file(s) distributed with this work for additional
+// information regarding copyright ownership.
+//
+// This program and the accompanying materials are made available
+// under the terms of the MIT License which is available at
+// https://opensource.org/licenses/MIT
+//
+// SPDX-License-Identifier: MIT
+//////////////////////////////////////////////////////////////////////////////
+
+const int t = 3;
+alg int[0..10] a = t + 1;
+
+automaton aut:
+  event e;
+  disc int v = 0;
+
+  event e1, e2, e3, e4, e5, e6, e7, e8, e9;
+  disc int v3 = 3;
+
+  location:
+    initial;
+    edge e when v < 10 do v := v + 1;
+
+    // Discrete variable and literals.
+    edge e1 when v = 0;
+    edge e2 when v = 1;
+
+    // Constant and algebraic variable.
+    edge e3 when v = t;
+    edge e4 when v = a;
+
+    // Binary expressions.
+    edge e5 when v + v3 = 5;
+    edge e6 when v - v3 = 5;
+
+    // Unary expressions.
+    edge e7 when +v = 5;
+    edge e8 when -v = -5;
+    edge e9 when --v = --5;
+end
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/types_exprs_int.mcrl2 b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/types_exprs_int.mcrl2
new file mode 100644
index 0000000000..27128a5d18
--- /dev/null
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/types_exprs_int.mcrl2
@@ -0,0 +1,52 @@
+% Generated by CIF to mCRL2.
+
+% Actions for CIF events.
+act aut'e';
+act aut'e1';
+act aut'e2';
+act aut'e3';
+act aut'e4';
+act aut'e5';
+act aut'e6';
+act aut'e7';
+act aut'e8';
+act aut'e9';
+
+% Actions for CIF variables having certain values.
+act aut'v''varvalue: Int;
+act aut'v3''varvalue: Int;
+
+% Process for behavior of the CIF specification.
+proc P(
+    aut'v': Int,
+    aut'v3': Int
+) =
+    % CIF linearized edges.
+    ((aut'v' < 10) && -2147483648 <= (aut'v' + 1) && (aut'v' + 1) <= 2147483647) -> aut'e' . P(aut'v' = (aut'v' + 1))
+    +
+    ((aut'v' == 0)) -> aut'e1' . P()
+    +
+    ((aut'v' == 1)) -> aut'e2' . P()
+    +
+    ((aut'v' == 3)) -> aut'e3' . P()
+    +
+    ((aut'v' == 4)) -> aut'e4' . P()
+    +
+    (((aut'v' + aut'v3') == 5)) -> aut'e5' . P()
+    +
+    (((aut'v' - aut'v3') == 5)) -> aut'e6' . P()
+    +
+    ((aut'v' == 5)) -> aut'e7' . P()
+    +
+    ((-aut'v' == -5)) -> aut'e8' . P()
+    +
+    ((--aut'v' == 5)) -> aut'e9' . P()
+    +
+    % CIF variable value actions.
+    aut'v''varvalue(aut'v') . P()
+    +
+    aut'v3''varvalue(aut'v3') . P()
+;
+
+% Initialization.
+init P(0, 3);
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/value_actions_subset.cif b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/value_actions_subset.cif
new file mode 100644
index 0000000000..713f83cf6d
--- /dev/null
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/value_actions_subset.cif
@@ -0,0 +1,35 @@
+//////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2024 Contributors to the Eclipse Foundation
+//
+// See the NOTICE file(s) distributed with this work for additional
+// information regarding copyright ownership.
+//
+// This program and the accompanying materials are made available
+// under the terms of the MIT License which is available at
+// https://opensource.org/licenses/MIT
+//
+// SPDX-License-Identifier: MIT
+//////////////////////////////////////////////////////////////////////////////
+
+automaton P:
+  event a;
+  disc int[0..10] x = 0;
+  disc int[-5..5] zero = 0;
+
+  location p1:
+    initial;
+    edge a goto p2;
+
+  location p2;
+end
+
+automaton Q:
+  event b;
+  disc int[0..1] y = 1;
+
+  location q1:
+    initial;
+    edge b goto q2;
+
+  location q2;
+end
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/value_actions_subset.err b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/value_actions_subset.err
new file mode 100644
index 0000000000..8ff093d67f
--- /dev/null
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/value_actions_subset.err
@@ -0,0 +1,3 @@
+WARNING: File "cif2mcrl2/value_actions_subset.cif": Semantic warning at line 16, column 19: Discrete variable "P.x" is not used anywhere in the specification.
+WARNING: File "cif2mcrl2/value_actions_subset.cif": Semantic warning at line 17, column 19: Discrete variable "P.zero" is not used anywhere in the specification.
+WARNING: File "cif2mcrl2/value_actions_subset.cif": Semantic warning at line 28, column 18: Discrete variable "Q.y" is not used anywhere in the specification.
diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/value_actions_subset.mcrl2 b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/value_actions_subset.mcrl2
new file mode 100644
index 0000000000..5d2a6ce6b5
--- /dev/null
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/value_actions_subset.mcrl2
@@ -0,0 +1,35 @@
+% Generated by CIF to mCRL2.
+
+% Sorts for CIF enumerations.
+sort P'LPE' = struct P'p1' | P'p2';
+sort Q'LPE' = struct Q'q1' | Q'q2';
+
+% Actions for CIF events.
+act P'a';
+act Q'b';
+
+% Actions for CIF variables having certain values.
+act P'zero''varvalue: Int;
+act Q''varvalue: Q'LPE';
+
+% Process for behavior of the CIF specification.
+proc P(
+    P'x': Int,
+    P'zero': Int,
+    P': P'LPE',
+    Q'y': Int,
+    Q': Q'LPE'
+) =
+    % CIF linearized edges.
+    ((P' == P'p1')) -> P'a' . P(P' = P'p2')
+    +
+    ((Q' == Q'q1')) -> Q'b' . P(Q' = Q'q2')
+    +
+    % CIF variable value actions.
+    P'zero''varvalue(P'zero') . P()
+    +
+    Q''varvalue(Q') . P()
+;
+
+% Initialization.
+init P(0, 0, P'p1', 1, Q'q1');
diff --git a/cif/org.eclipse.escet.cif.tests/tests/test_cif2mcrl2.tooldef b/cif/org.eclipse.escet.cif.tests/tests/test_cif2mcrl2.tooldef
index 602cf5c884..8ae6230d0f 100644
--- a/cif/org.eclipse.escet.cif.tests/tests/test_cif2mcrl2.tooldef
+++ b/cif/org.eclipse.escet.cif.tests/tests/test_cif2mcrl2.tooldef
@@ -18,8 +18,9 @@ string test_path = "cif2mcrl2";
 string test_pattern = "*.cif";
 list string default_options = ["--devmode=1"];
 map(string:list string) test_options = {
-    "cif2mcrl2/example.cif":            ["--read-values=+*,-*novalue*,-*value*,+*wel"],
-    "cif2mcrl2/no_value_actions.cif":   ["-r ''"],
+    "cif2mcrl2/example.cif":              ["--read-values=+*,-*novalue*,-*value*,+*wel"],
+    "cif2mcrl2/no_value_actions.cif":     ["-r ''"],
+    "cif2mcrl2/value_actions_subset.cif": ["--read-values=Q,P.*,-P.x"],
 };
 set string test_skip = {};
 
-- 
GitLab


From d8a252da598ff9edf5d0101bd0dc94ea647dcb6f Mon Sep 17 00:00:00 2001
From: Dennis Hendriks <dh_tue@hotmail.com>
Date: Mon, 5 Aug 2024 19:16:31 +0200
Subject: [PATCH 15/18] #352 Add script to generate mCRL2 state spaces.

---
 .../tests/cif2mcrl2/_do_mcrl2.bash                       | 9 +++++++++
 1 file changed, 9 insertions(+)
 create mode 100644 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/_do_mcrl2.bash

diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/_do_mcrl2.bash b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/_do_mcrl2.bash
new file mode 100644
index 0000000000..638314795d
--- /dev/null
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/_do_mcrl2.bash
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+for f in `find -name "*.mcrl2" -type f`
+do
+    echo $f
+    mcrl22lps $f -o $f.lps
+    lps2lts $f.lps $f.aut
+    rm $f.lps
+done
-- 
GitLab


From 9242260c4412bc847871e2379b7090a36c507b6c Mon Sep 17 00:00:00 2001
From: Dennis Hendriks <dh_tue@hotmail.com>
Date: Mon, 5 Aug 2024 18:01:29 +0200
Subject: [PATCH 16/18] #352 Update CIF to mCRL2 documentation.

---
 .../asciidoc/tools/cif2mcrl2.asciidoc         | 478 ++++++------------
 1 file changed, 146 insertions(+), 332 deletions(-)

diff --git a/cif/org.eclipse.escet.cif.documentation/asciidoc/tools/cif2mcrl2.asciidoc b/cif/org.eclipse.escet.cif.documentation/asciidoc/tools/cif2mcrl2.asciidoc
index 8bf0ae670d..ec82de08bd 100644
--- a/cif/org.eclipse.escet.cif.documentation/asciidoc/tools/cif2mcrl2.asciidoc
+++ b/cif/org.eclipse.escet.cif.documentation/asciidoc/tools/cif2mcrl2.asciidoc
@@ -19,8 +19,8 @@ include::_part_attributes.asciidoc[]
 indexterm:[CIF to mCRL2 transformer]
 indexterm:[tools,CIF to mCRL2 transformer]
 indexterm:[see: mCRL2,CIF to mCRL2 transformer]
-The CIF to mCRL2 transformer is used to convert a CIF specification to a mCRL2 specification.
-link:https://www.mcrl2.org/[mCRL2] is a tool for verifying properties of the model.
+The CIF to mCRL2 transformer is used to convert a CIF specification to an mCRL2 model.
+link:https://www.mcrl2.org/[mCRL2] is a tool for <<sbe-in-practice-steps-verification,verifying>> properties of the model.
 
 indexterm:[CIF to mCRL2 transformer,start]
 
@@ -44,30 +44,16 @@ indexterm:[CIF to mCRL2 transformer,options]
 
 Besides the general application options, this application has the following options:
 
-* _Input file path_: The absolute or relative file system path to the input CIF specification.
+* _Input file path_: The absolute or relative file system path to the input CIF file.
 
-* _Instance tree definition_: mCRL2 uses a tree of processes which you can specify manually here.
-If not specified, it takes the default solution, which first merges all CIF automata (one at a time), and on top of that, the variable processes of the shared variables (also one at a time).
-How to define your own tree is explained in the <<tools-cif2mcrl2-instancetree-syntax,instantiation tree syntax>> Section.
-
-* _Enable debug output_: The transformer derives information about used and available variables in the instantiation tree, and uses that information to generate the mCRL2 action operations at every level.
-By enabling this option, this information is also written to an output file for further external analysis.
-By default, the information is written in a file with the same name as the input file, except first the `.cif` extension is removed (if present), and a `+_dbg.txt+` extension is appended.
-The name of the output file can be changed with the _Debug output file path_ option.
-Setting the latter option enables this option.
-
-* _Debug output file path_: The absolute or relative file system path to use for writing derived information about used and available variables at every level in the instantiation tree.
-Setting this option changes the debug output file path to the given path.
-It also enables the _Enable debug output_ option.
-
-* _Output file path_: The absolute or relative file system path for writing the generated mCRL2 output file.
+* _Output file path_: The absolute or relative file system path to the output mCRL2 file.
 By default, the output file path is the same as the input file path, but with the `.cif` extension removed (if it exists), and the `.mcrl2` extension added.
-By setting this option, the default is overridden by the given value.
+This option can be used to override the default.
 
-* _Generate 'value' actions_: To query the value of variable `x`, a `+value_x+` action can be used.
-By default, such actions are generated for every variable in the system.
-Using this option, you can define precisely which variables should have such an action.
-See the <<cif2mcrl2-value-select>> Section for more details.
+* _Generate 'value' actions_: To query the value of variable or current location of an automaton, a value action can be used.
+By default, such actions are generated for every variable and automaton with at least two locations of the CIF specification.
+Using this option, you can define a reduced set of variables and automata that should get such an action.
+See the <<tools-cif2mcrl2-value-actions,section on value actions>> for more details.
 
 indexterm:[CIF to mCRL2 transformer,supported specifications]
 
@@ -82,7 +68,7 @@ The following restrictions apply:
 The latter may have a range.
 *** Variables with multiple potential initial values are not supported.
 *** The initial value of a variable must be a statically evaluable.
-*** The transformation translates the range of integer variables if used, but it does not enforce that the variables remain within the minimum and maximum integer values.
+*** The transformation ensures that integer variables remain within their range, thus preventing runtime errors.
 ** Continuous variables are not supported.
 ** Algebraic variables are supported, if their types and values are supported.
 ** Input variables are not supported.
@@ -95,11 +81,13 @@ The latter may have a range.
 * Regarding automata:
 ** There must be at least one automaton.
 ** The supervisory kind of automata is ignored.
-** The initialization predicates in locations must be trivially `true` or `false`.
-** There must be exactly one initial location in each automaton.
-** Conditional updates are not supported, only assignment updates are allowed.
+** The initialization predicates in locations must be statically evaluable to `true` or `false`.
+** There must be exactly one initial location in each automaton, and it must be possible to determine this statically.
+** `if` updates are not supported.
+Only assignments are supported.
 ** Multi-assignments are not supported.
-** Urgency of locations and edges is ignored.
+Multiple assignments on an edge is supported.
+** Urgent locations and edges are not supported.
 
 * Regarding expressions:
 ** All expressions and sub-expressions must be of type `bool`, `enum`, or `int`.
@@ -131,9 +119,9 @@ The latter may have a range.
 ** Initialization predicates in components are not supported.
 ** Invariants are not supported.
 ** Marker predicates are ignored.
-* I/O declarations are ignored.
+** I/O declarations are ignored.
 A warning is printed if a CIF/SVG input declaration is encountered.
-* Annotations are ignored.
+** Annotations are ignored.
 
 indexterm:[CIF to mCRL2 transformer,preprocessing]
 
@@ -147,127 +135,121 @@ The following <<tools-cif2cif-chapter-index,CIF to CIF transformations>> are app
 
 * <<tools-cif2cif-chapter-elim-comp-def-inst>>
 
-* <<tools-cif2cif-chapter-elim-self>>
+* <<tools-cif2cif-chapter-simplify-values>>
 
-* <<tools-cif2cif-chapter-elim-alg-vars>>
+The following transformations are additionally applied as preprocesing (in the given order), after checking preconditions, to simplify the transformation:
 
-* <<tools-cif2cif-chapter-elim-consts>>
+* <<tools-cif2cif-chapter-elim-type-decls>>
 
-* <<tools-cif2cif-chapter-elim-monitors>>
+* <<tools-cif2cif-chapter-elim-consts>>
 
-* <<tools-cif2cif-chapter-simplify-values>>
+* <<tools-cif2cif-chapter-elim-alg-vars>>
 
 * <<tools-cif2cif-chapter-add-default-init-values>>
 
-indexterm:[CIF to mCRL2 transformer,generation of value actions]
+* <<tools-cif2cif-chapter-linearize-product>>
+
+indexterm:[CIF to mCRL2 transformer,result of the transformation]
+
+=== Output of the transformation
+
+==== Names
+
+The mCRL2 names of CIF objects, such as automata, variables and events, are based on the absolute names of the CIF objects.
+Each `.` is replaced by an apostrophe (`'`), to form a valid mCRL2 name.
+A single apostrophe is added at the end of each name, to ensure that the names don't conflict with mCRL2 keywords.
+For an automaton `a` with a location `x`, its absolute name is `a.x`.
+Its mCRL2 name is thus `+a'x'+`.
+
+==== Enumerations
+
+The generated mCRL2 model starts with an mCRL2 sort for each CIF enumeration.
+For compatible enumerations, a single representative is used.
+Due to linearization, locations of automata with at least two locations are represented as location pointer variables, and their values come from enumerations as well.
+
+==== Events
 
-[[cif2mcrl2-value-select]]
-=== Generation of 'value' actions
+For each CIF event, an mCRL2 action is generated.
 
-The CIF to mCRL2 transformer generates a `value` action for each variable by default.
+[[tools-cif2mcrl2-value-actions]]
+==== Variable 'value' actions
+
+For each CIF discrete variable, a 'value' action may be generated.
+Due to linearization, locations of automata with at least two locations are represented as location pointer variables, and thus an action may be generated for them as well.
+The name of the action is the mCRL2 name of the variable, with `'varvalue` added to it as postfix.
+These mCRL2 actions have as type the type of the corresponding CIF variable.
+
+By default, a 'value' action is generated for each discrete variable and for each automaton with at least two locations.
 In some cases, this may not be wanted.
 Variables that never have to be queried for their value do not need such an action.
 Having such an action available anyway increases the amount of work that has to be done by the mCRL2 tool.
-To eliminate these unneeded `value` actions, the CIF to mCRL2 transformer has the _Generate 'value' actions_ option.
+To restrict the generation of 'value' actions, the _Generate 'value' actions_ option can be used.
 
-The option takes a comma separated list of variable patterns.
-Each pattern can add or remove variables.
-If the pattern starts with a `pass:c[+]` character, variables are added.
-If the pattern starts with a `-` character, variables are removed.
+The option takes a comma separated list of variable/automata name patterns, that are considered in the order they are given.
+Each pattern can add or remove variables and automata.
+If the pattern starts with a `pass:c[+]` character, variables are added and thus get a 'value' action.
+If the pattern starts with a `-` character, variables are removed and thus don't get a 'value' action.
 If the pattern start neither with a `pass:c[+]` nor with a `-` character, variables are added.
-The main part of each pattern is the name of the variable to add or remove.
-In addition, you can use the `+*+` character as a shorthand for 'zero or more arbitrary characters', allowing you to write abbreviations, and match several variables at the same time.
+
+The main part of each pattern is the name of the variable or automaton to add or remove.
+The absolute names of variables and automata should be used.
+Only automata with at least two locations can be used.
+In addition, you can use the `+*+` character as a shorthand for 'zero or more arbitrary characters', allowing you to write abbreviations, and match several variables and/or automata at the same time.
 
 The list of patterns is interpreted relative to selecting no variables.
-That is, if an empty list is specified, no variables are added.
+That is, if an empty list of patterns is specified, no variables and automata are added.
 By default, the `+*` pattern is used, which adds all variables.
 
-For example, assume existence of the following variables in a CIF model:
+For example, assume existence of the following automata and variables in a CIF specification:
 
 [source]
 ----
-A.p12 A.q2 A.z B.x B.y1 B.y2 B.z C.q
+A.p12 A.q2 A.z B B.x B.y1 B.y2 B.z C.q
 ----
 
-Below a number of example option values, and what variables they select from the above list.
+Below a number of example option values are given, together with what automata and variables they select from the above list.
 
 * The option value `B.x,+A.z` selects variables `B.x` and `A.z`.
 
-* The option value `++*+` selects all variables.
+* The option value `++*+` selects all automata and variables.
 
-* The 'empty' option value selects no variables.
+* The 'empty' option value selects no automata and variables.
 On the command line or in ToolDef scripts, when using the `-r` short option, use `''` for the 'empty' option value.
 
-* The option value `++*1+` selects all variables that end with a `1`, which is variable `B.y1` only (Variable `A.p12` does have a `1` in it, but not at the end.)
+* The option value `++*1+` selects all automata and variables that end with a `1`, which in this case is variable `B.y1` only.
+Variable `A.p12` does have a `1` in it, but not at the end.
 
-* The option value `++*1*+` selects all variables with a `1` at any position.
+* The option value `++*1*+` selects all automata and variables with a `1` at any position.
 This matches both `A.p12` and `B.y1`.
 
-* The option value `++++*,-B.*+++` selects all variables, except those in automaton `B`.
-(`++++*+++` adds all variables, then `+-B.*+` removes all variables that start with `B.`, that is all variables in automaton `B`.)
+* The option value `++++*,-B,-B.*+++` selects all automata and variables, except automaton `B` and the variables defined in it.
+First, `++++*+++` adds all automata and variables.
+Then, `-B` removes automaton `B`.
+Finally, `+-B*+` removes all variables that start with `B.`, so all variables in automaton `B`.
 
-indexterm:[CIF to mCRL2 transformer,instance tree]
+==== Behavior
 
-[[tools-cif2mcrl2-instancetree-syntax]]
-=== Syntax of the instance tree
+A single mCRL2 process named `P` is generated that represents the behavior of the CIF specification.
+The process has a parameter for each variable of the CIF specification.
+Due to linearization, this includes the location pointer variables for automata with at least two locations.
 
-In mCRL2, a behavior process is required for every automaton in the input, and a variable process is needed for every variable used (read or written) by two or more automata.
-In addition, it is allowed to have a variable process for variables that are used in one automaton only (that is, a local variable of the automaton).
+The process consists of alternative process expressions.
+For each linearized CIF edge, there is one alternative.
+Each of these alternatives consists of a guard, an action and a recursive invocation of process `P` with the updates to the variables.
+The mCRL2 guard expressions are constructed from the guards of the linearized CIF edges.
+Additional guards are added to ensure that integer variables remain within their ranges, thus preventing runtime errors.
 
-All these processes must be instantiated using the parallel composition operator.
-For larger specifications, the naive solution of instantiating all processes together in one level fails due to having too many allowed combinations of actions for the mCRL2 tool to handle.
+For each CIF variable and automaton with a variable 'value' action, an additional alternative process expression is added.
+It allows the variable 'value' action to occur for the current value of the variable.
 
-A different solution is to instantiate smaller groups of processes at a time, and then use these groups again in other instantiations.
-Instantiation happens in multiple levels in this case, leading to a tree of process instantiations.
-At each level, the set of allowed actions is restricted by adding action operators.
-This results in a large reduction of the number of possible combinations of actions that need to be explored by the mCRL2 tool.
-Fewer combinations of actions in turn leads to enabling larger specifications to be verified.
+==== Initialization
 
-Which processes and groups are taken together at each level in the tree has a large impact on feasibility.
-The CIF to mCRL2 transformer has a default scheme, where pairs of one group and one behavior process are taken together at each level (except at the bottom, where two behavior processes are merged instead).
-On top of that tree, pairs of a group and a variable process are taken together.
+At the end of the generated mCRL2 program, an initial mCRL2 process is given.
+It matches the initial state of the CIF specification.
 
-The CIF to mCRL2 transformer does not perform analysis to decide how processes and variables should combined.
-In many cases this provides a working solution.
-For some specifications however, you may want to have more influence in the order of grouping.
-For this reason, the _Instance tree definition_ option exists.
-It allows you to define which processes should be taken together at each level in the instantiation tree.
+==== Example
 
-The current implementation has limits with respect to ordering.
-Automata processes must be merged first (but the number of levels and the order of combining is free), and then variables must be added one at a time (but which variable to use at each level is free).
-
-The option expects absolute names of all automata in the specification and absolute names of all discrete variables used in two more automata, separated by white space or commas.
-In addition you may add the absolute names of variables used in only one automaton.
-For each element mentioned, a process is created in mCRL2.
-Variables used in one automaton that are not mentioned, become local variables of the behavior process of the automaton that uses the variable.
-
-Processes for the mentioned CIF elements are instantiated.
-Sub-groups of processes are written by surrounding them with parentheses.
-For example:
-
-[source]
-----
-( ( A B C ) A.x ) B.y
-----
-
-takes automata `A`, `B`, `C` together.
-One level higher, variable `A.x` is added, and finally variable `B.y` is added at the highest level.
-Another order is:
-
-[source]
-----
-( ( ( A B ) C ) B.y ) A.x
-----
-
-First processes `A` and `B` are combined, then process `C` is added, and finally variables `B.y` and `A.x` at the top-most two levels.
-
-indexterm:[CIF to mCRL2 transformer,debug output]
-
-=== Debug output
-
-The transformer analyzes use of the variables by each automaton, and computes variable usage and availability of the variables at each level in the instantiation tree.
-This information is written to a file with debug output by enabling the _Enable debug output_ option.
-As an example, consider the following artificial CIF specification:
+Consider the following CIF specification:
 
 [source, cif]
 ----
@@ -295,231 +277,63 @@ automaton Q:
 
   location q2:
     edge b when y = 1 and P.x < 8 and P.zero = 0 goto q1;
+    edge b when y = 0 => P.x >= 8 goto q1;
 end
 ----
 
-This specification has two automata `P` and `Q`, and two shared variables `P.x` and `Q.y`.
-The ranges of the variables are important, mCRL2 considers the integer type unbounded, depending on your CIF file, without giving upper and lower bounds for the variables, you may end up in the situation that mCRL2 tries every single value of its infinite integer type, which takes a very long time!
-
-Variable `zero` is not shared, only automaton `Q` uses it.
-The transformer moves it to the `Q` process.
-Normally however, you would use a constant instead of a variable.
-
-The instance tree used in the transformation is `( ( P Q ) P.x ) Q.y`.
-The debug output for `P` is:
-
-[source]
-----
-===============================================================
-Node 1.1.1.1
-
-Variable use by behavior processes ordered by event:
-    a:
-        P.x  read:SOMETIMES  write:ALWAYS
-    c:
-        Q.y  read:ALWAYS  write:NEVER
-----
-
-Automaton `P` has one `c` edge, which checks the value of `Q.y` but it does not change its value.
-It has two `a` edges, only the `a` edge in location `p1` reads `P.x` (to compute `x + 1`).
-Both edges assign a new value to `P.x`.
-
-In a similar way, the node information for automaton `Q` is computed.
-The result is:
-
-[source]
-----
-===============================================================
-Node 1.1.1.2
-
-Variable use by behavior processes ordered by event:
-    a:
-        Q.y  read:ALWAYS  write:NEVER
-    b:
-        Q.y  read:ALWAYS  write:NEVER
-        P.x  read:ALWAYS  write:NEVER
-----
-
-The automaton only checks values rather than writing them.
-As you can see, variable `P.x` is not mentioned with event `a`, since there is no edge in the automaton with event `a` that accesses variable `P.x`.
-
-The node that merges both automata, i.e. `( P Q )`, has the following formation:
-
-[source]
-----
-===============================================================
-Node 1.1.1
-
-Variable use by behavior processes ordered by event:
-    a:
-        P.x  read:SOMETIMES  write:ALWAYS
-        Q.y  read:ALWAYS     write:NEVER
-    c:
-        Q.y  read:ALWAYS  write:NEVER
-    b:
-        Q.y  read:ALWAYS  write:NEVER
-        P.x  read:ALWAYS  write:NEVER
-
-Children:
-    node 1.1.1.1
-    node 1.1.1.2
-----
-
-Variable use by each event is simply merged.
-In this example there is no overlap, but that works as you would expect, `SOMETIMES` overrides `NEVER`, and `ALWAYS` overrides `SOMETIMES`.
-
-The node for variable process for `P.x` only provides a variable:
-
-[source]
-----
-===============================================================
-Node 1.1.2
-
-Available variable processes:
-    P.x
-----
-
-The output states that variable `P.x` is available here.
-
-At `( P Q ) P.x` node, the merge of the variable `P.x` with the two automata, this results in:
-
-[source]
-----
-===============================================================
-Node 1.1
-
-Available variable processes:
-    P.x
-
-Variable use by behavior processes ordered by event:
-    a:
-        P.x  read:SOMETIMES  write:ALWAYS
-        Q.y  read:ALWAYS     write:NEVER
-    c:
-        Q.y  read:ALWAYS  write:NEVER
-        P.x  read:NEVER   write:NEVER
-    b:
-        Q.y  read:ALWAYS  write:NEVER
-        P.x  read:ALWAYS  write:NEVER
-
-Children:
-    node 1.1.1
-    node 1.1.2
-----
-
-In this node, variable `P.x` is also available.
-The variable process does not perform events, so the event variable table of node `1.1.1` is copied.
-The only exception is the additional line `P.x` for event `c`.
-The reason for this line is that while `( P Q )` may not use `P.x` in combination with event `c`, other automata higher up in the tree may still need that variable.
-(In a future version of the transformer tool, it may be detected that such use never happens, and there is no need to add the line here.)
-
-Node `1.2` is the variable process of `Q.y`.
-It looks the same as node `1.1.2`, except for the name of the variable.
-
-Finally the top-node that merges `( P Q ) P.x` with `Q.y`, bringing everything together, looks like:
-
-[source]
-----
-===============================================================
-Node 1
-
-Available variable processes:
-    P.x
-    Q.y
-
-Variable use by behavior processes ordered by event:
-    a:
-        P.x  read:SOMETIMES  write:ALWAYS
-        Q.y  read:ALWAYS     write:NEVER
-    c:
-        Q.y  read:ALWAYS  write:NEVER
-        P.x  read:NEVER   write:NEVER
-    b:
-        Q.y  read:ALWAYS  write:NEVER
-        P.x  read:ALWAYS  write:NEVER
-
-Children:
-    node 1.1
-    node 1.2
-----
-
-The `Q.y` variable is now also available.
-The event variable table is again copied.
-Since all events already used variable `Q.y` no additional lines were added.
-
-indexterm:[CIF to mCRL2 transformer,result of the transformation]
-
-=== Output of the transformation
-
-A variable process in mCRL2 handles shared access to a variable.
-For variable `P.x` in the above example it looks like:
-
-[source, mcrl2]
-----
-act value_x, vread_x, vwrite_x, sync_x, aread_x, awrite_x : Int;
-
-proc VarProc_x(v:Int) =
-  value_x(v) . VarProc_x(v) +
-  vread_x(v) . VarProc_x(v) +
-  sum m:Int . ((m >= 0) && (m <= 10)) -> vwrite_x(m) . VarProc_x(m) +
-  sum m:Int . ((m >= 0) && (m <= 10)) -> vread_x(v) | vwrite_x(m) . VarProc_x(m);
-----
-
-The name of the actions all end with the name of the variable.
-If the CIF specification has two or more variables with the same name, a number gets appended to make each variable unique in mCRL2.
-
-A behavior process is generated for each automaton instance.
-Like the variables, the name of the automaton is used in the output.
-If there are name conflicts, a number is appended to make it unique.
-The process is the same list of edges of the original CIF automaton, with added read and write actions for synchronizing with the variable processes:
-
-[source, mcrl2]
-----
-sort LocSort_P = struct loc_P_p1 | loc_P_p2;
-
-proc BehProc_P(Locvar_P : LocSort_P) =
-  sum x : Int . ((x >= 0) && (x <= 10) && (Locvar_P == loc_P_p1)) -> a | aread_x(x) | awrite_x((x + 1)) . BehProc_P(loc_P_p2) +
-  sum y : Int . ((y >= 0) && (y <= 1) && (Locvar_P == loc_P_p2) && (y != 0)) -> c | aread_y(y) . BehProc_P(loc_P_p1) +
-  (Locvar_P == loc_P_p2) -> a | awrite_x(1) . BehProc_P(loc_P_p1);
-----
-
-Locations are encoded in a `struct` and variable read and write actions are added as needed.
-
-The instantiation tree is dominated by the action operators needed for synchronizing and restricting actions.
-The `+value_...+` actions are allowed up the to top level node, to give access to variable values in the verification.
-This leads to:
+By default, the following mCRL2 model is generated for it:
 
 [source, mcrl2]
 ----
-act a, renamed_a, c, renamed_c, b, renamed_b;
-
-init block({aread_y, awrite_y, vread_y, vwrite_y},
-     hide({sync_y},
-     comm({aread_y | vread_y -> sync_y,
-           awrite_y | vwrite_y -> sync_y},
-     (
-       block({aread_x, awrite_x, vread_x, vwrite_x},
-       hide({sync_x},
-       comm({aread_x | vread_x -> sync_x,
-             awrite_x | vwrite_x -> sync_x},
-       (
-         allow({value_zero,
-            a | awrite_x | aread_y,
-                a | awrite_x | aread_x | aread_y,
-                c | aread_y,
-                b | aread_y | aread_x},
-         rename({renamed_a -> a},
-         block({a},
-         comm({a | a -> renamed_a},
-         (
-           BehProc_P(loc_P_p1)
-         ||
-           BehProc_Q(loc_Q_q1, 0)
-         )))))
-       ||
-         VarProc_x(0)
-       ))))
-     ||
-       VarProc_y(1)
-     ))));
+% Generated by CIF to mCRL2.
+
+% Sorts for CIF enumerations.
+sort P'LPE' = struct P'p1' | P'p2';
+sort Q'LPE' = struct Q'q1' | Q'q2';
+
+% Actions for CIF events.
+act a';
+act b';
+act c';
+
+% Actions for CIF variables having certain values.
+act P''varvalue: P'LPE';
+act P'x''varvalue: Int;
+act P'zero''varvalue: Int;
+act Q''varvalue: Q'LPE';
+act Q'y''varvalue: Int;
+
+% Process for behavior of the CIF specification.
+proc P(
+    P'x': Int,
+    P'zero': Int,
+    P': P'LPE',
+    Q'y': Int,
+    Q': Q'LPE'
+) =
+    % CIF linearized edges.
+    (((P' == P'p1') && ((Q' == Q'q1') && (Q'y' == 1))) && 0 <= (P'x' + 1) && (P'x' + 1) <= 10) -> a' . P(P'x' = (P'x' + 1), P' = P'p2', Q' = Q'q2')
+    +
+    (((P' == P'p2') && ((Q' == Q'q1') && (Q'y' == 1))) && 0 <= 1 && 1 <= 10) -> a' . P(P'x' = 1, P' = P'p1', Q' = Q'q2')
+    +
+    ((((Q' == Q'q2') && (Q'y' == 1)) && ((P'x' < 8) && (P'zero' == 0)))) -> b' . P(Q' = Q'q1')
+    +
+    (((Q' == Q'q2') && ((Q'y' == 0) => (P'x' >= 8)))) -> b' . P(Q' = Q'q1')
+    +
+    (((P' == P'p2') && (Q'y' != 0))) -> c' . P(P' = P'p1')
+    +
+    % CIF variable value actions.
+    P''varvalue(P') . P()
+    +
+    P'x''varvalue(P'x') . P()
+    +
+    P'zero''varvalue(P'zero') . P()
+    +
+    Q''varvalue(Q') . P()
+    +
+    Q'y''varvalue(Q'y') . P()
+;
+
+% Initialization.
+init P(0, 0, P'p1', 1, Q'q1');
 ----
-- 
GitLab


From 86cacadaec6ddb586898c3127e392708c56282e6 Mon Sep 17 00:00:00 2001
From: Dennis Hendriks <dh_tue@hotmail.com>
Date: Tue, 6 Aug 2024 12:18:35 +0200
Subject: [PATCH 17/18] #352 Change option --read-values/-r to
 --value-actions/-v.

- The read/write stuff doesn't exist anymore.
- Old name no longer makes any sense.
---
 .../escet/cif/cif2mcrl2/GenerateValueActionsOption.java     | 6 +++---
 .../asciidoc/tools/cif2mcrl2.asciidoc                       | 4 ++--
 .../tests/test_cif2mcrl2.tooldef                            | 6 +++---
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/GenerateValueActionsOption.java b/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/GenerateValueActionsOption.java
index 8e14455144..b9e82bc7f6 100644
--- a/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/GenerateValueActionsOption.java
+++ b/cif/org.eclipse.escet.cif.cif2mcrl2/src/org/eclipse/escet/cif/cif2mcrl2/GenerateValueActionsOption.java
@@ -18,7 +18,7 @@ import static org.eclipse.escet.common.java.Strings.fmt;
 import org.eclipse.escet.common.app.framework.options.Options;
 import org.eclipse.escet.common.app.framework.options.StringOption;
 
-/** Option to specify the variables that need to have a 'value' action. */
+/** Option to specify the automata and variables that need to have a 'value' action. */
 public class GenerateValueActionsOption extends StringOption {
     /** Name of the option. */
     private static final String NAME = "Generate 'value' actions";
@@ -42,10 +42,10 @@ public class GenerateValueActionsOption extends StringOption {
     private static final boolean EMPTY_AS_NULL = false;
 
     /** Short option name. */
-    private static final Character CMD_SHORT = 'r';
+    private static final Character CMD_SHORT = 'v';
 
     /** Long option name. */
-    private static final String CMD_LONG = "read-values";
+    private static final String CMD_LONG = "value-actions";
 
     /** Name of the option value. */
     private static final String CMD_VALUE = "PATTERNS";
diff --git a/cif/org.eclipse.escet.cif.documentation/asciidoc/tools/cif2mcrl2.asciidoc b/cif/org.eclipse.escet.cif.documentation/asciidoc/tools/cif2mcrl2.asciidoc
index ec82de08bd..ecfec6c1b8 100644
--- a/cif/org.eclipse.escet.cif.documentation/asciidoc/tools/cif2mcrl2.asciidoc
+++ b/cif/org.eclipse.escet.cif.documentation/asciidoc/tools/cif2mcrl2.asciidoc
@@ -183,7 +183,7 @@ By default, a 'value' action is generated for each discrete variable and for eac
 In some cases, this may not be wanted.
 Variables that never have to be queried for their value do not need such an action.
 Having such an action available anyway increases the amount of work that has to be done by the mCRL2 tool.
-To restrict the generation of 'value' actions, the _Generate 'value' actions_ option can be used.
+To restrict the generation of 'value' actions, the _Generate 'value' actions_ option can be used (`--value-actions=...` or `-v ...`).
 
 The option takes a comma separated list of variable/automata name patterns, that are considered in the order they are given.
 Each pattern can add or remove variables and automata.
@@ -214,7 +214,7 @@ Below a number of example option values are given, together with what automata a
 * The option value `++*+` selects all automata and variables.
 
 * The 'empty' option value selects no automata and variables.
-On the command line or in ToolDef scripts, when using the `-r` short option, use `''` for the 'empty' option value.
+On the command line or in ToolDef scripts, when using the `-v` short option, use `''` for the 'empty' option value.
 
 * The option value `++*1+` selects all automata and variables that end with a `1`, which in this case is variable `B.y1` only.
 Variable `A.p12` does have a `1` in it, but not at the end.
diff --git a/cif/org.eclipse.escet.cif.tests/tests/test_cif2mcrl2.tooldef b/cif/org.eclipse.escet.cif.tests/tests/test_cif2mcrl2.tooldef
index 8ae6230d0f..88f1407d07 100644
--- a/cif/org.eclipse.escet.cif.tests/tests/test_cif2mcrl2.tooldef
+++ b/cif/org.eclipse.escet.cif.tests/tests/test_cif2mcrl2.tooldef
@@ -18,9 +18,9 @@ string test_path = "cif2mcrl2";
 string test_pattern = "*.cif";
 list string default_options = ["--devmode=1"];
 map(string:list string) test_options = {
-    "cif2mcrl2/example.cif":              ["--read-values=+*,-*novalue*,-*value*,+*wel"],
-    "cif2mcrl2/no_value_actions.cif":     ["-r ''"],
-    "cif2mcrl2/value_actions_subset.cif": ["--read-values=Q,P.*,-P.x"],
+    "cif2mcrl2/example.cif":              ["--value-actions=+*,-*novalue*,-*value*,+*wel"],
+    "cif2mcrl2/no_value_actions.cif":     ["-v ''"],
+    "cif2mcrl2/value_actions_subset.cif": ["--value-actions=Q,P.*,-P.x"],
 };
 set string test_skip = {};
 
-- 
GitLab


From 838f40231e8cf19956b607ee1532d68a329c6a7d Mon Sep 17 00:00:00 2001
From: Dennis Hendriks <dh_tue@hotmail.com>
Date: Tue, 6 Aug 2024 12:39:03 +0200
Subject: [PATCH 18/18] #352 Add missing license header. Make script
 executable.

---
 .../tests/cif2mcrl2/_do_mcrl2.bash                   | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 mode change 100644 => 100755 cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/_do_mcrl2.bash

diff --git a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/_do_mcrl2.bash b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/_do_mcrl2.bash
old mode 100644
new mode 100755
index 638314795d..ac99c5e508
--- a/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/_do_mcrl2.bash
+++ b/cif/org.eclipse.escet.cif.tests/tests/cif2mcrl2/_do_mcrl2.bash
@@ -1,5 +1,17 @@
 #!/usr/bin/env bash
 
+################################################################################
+# Copyright (c) 2024 Contributors to the Eclipse Foundation
+#
+# See the NOTICE file(s) distributed with this work for additional
+# information regarding copyright ownership.
+#
+# This program and the accompanying materials are made available under the terms
+# of the MIT License which is available at https://opensource.org/licenses/MIT
+#
+# SPDX-License-Identifier: MIT
+################################################################################
+
 for f in `find -name "*.mcrl2" -type f`
 do
     echo $f
-- 
GitLab