Skip to content

Commit

Permalink
add option to prevent transitions where start and target are equal
Browse files Browse the repository at this point in the history
  • Loading branch information
nimec01 committed Dec 23, 2024
1 parent 1575a30 commit 55b3968
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Modelling/StateDiagram/Config.hs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ data SDConfig
, preventMultiEdgesInOriginalDiagram :: Maybe Bool
, compoundsHaveNames :: Maybe Bool
, enforceOutgoingEdgesFromNormalAndHierarchical :: Bool
, preventTransitionsToItself :: Bool
, chartLimits :: ChartLimits
, extraConstraint :: String
} deriving (Show,Eq)
Expand Down Expand Up @@ -92,6 +93,7 @@ defaultSDConfigScenario1
, preventMultiEdgesInOriginalDiagram = Nothing
, compoundsHaveNames = Just False
, enforceOutgoingEdgesFromNormalAndHierarchical = True
, preventTransitionsToItself = False
, chartLimits =
ChartLimits { regionsStates = 0
, hierarchicalStates = 1
Expand Down Expand Up @@ -129,6 +131,7 @@ defaultSDConfigScenario2
, preventMultiEdgesInOriginalDiagram = Nothing
, compoundsHaveNames = Just False
, enforceOutgoingEdgesFromNormalAndHierarchical = True
, preventTransitionsToItself = False
, chartLimits =
ChartLimits { regionsStates = 1
, hierarchicalStates = 0
Expand Down Expand Up @@ -166,6 +169,7 @@ defaultSDConfigScenario3
, preventMultiEdgesInOriginalDiagram = Nothing
, compoundsHaveNames = Just False
, enforceOutgoingEdgesFromNormalAndHierarchical = True
, preventTransitionsToItself = False
, chartLimits =
ChartLimits { regionsStates = 0
, hierarchicalStates = 1
Expand Down Expand Up @@ -303,6 +307,7 @@ sdConfigToAlloy SDConfig { bitwidth
, preventMultiEdgesInOriginalDiagram
, compoundsHaveNames
, enforceOutgoingEdgesFromNormalAndHierarchical
, preventTransitionsToItself
, chartLimits = ChartLimits { regionsStates
, hierarchicalStates
, regions
Expand Down Expand Up @@ -354,6 +359,7 @@ pred scenarioConfig #{oB}
preventMultiEdgesInOriginalDiagram}
#{if preventNestedEndNodes then "disj[EndNodes, allContainedNodes]" else ""}
#{if enforceOutgoingEdgesFromNormalAndHierarchical then "all s : (NormalStates + HierarchicalStates) | some (Flows <: from).s" else ""}
#{if preventTransitionsToItself then "no s : States | s in (Flows <: from).s.to" else ""}
#{lowerBound startNodes "StartNodes"}
#{lowerBound shallowHistoryNodes "ShallowHistoryNodes"}
#{lowerBound deepHistoryNodes "DeepHistoryNodes"}
Expand Down

0 comments on commit 55b3968

Please sign in to comment.