You got the semantics right. Let’s talk about language features, expressiveness and better names!
STEP / TRANSITION
Groups a set of GIVEN WHEN THEN conditions. May be executed or not.
The Gherkin thing is called SCENARIO, so the new name already implies that this will be part of a sequence.
Petri nets would call this a transition.
GIVEN a / IF a / PRE a / REQUIRE a / WITH a
a needs to be true so that the STEP can invoke.
Petri nets call a transition “enabled” when it “may fire”. That is like saying all of it’s GIVENs are true. See also Petri net - Wikipedia
THEN b / GIVE b / POST b / WIN b / ACHIEVE b
b will be true after the STEP was invoked.
GIVEN + THEN is the smallest language set that already is fun. We can start with an initial setup, then turn things from false to true. We might also denote GIVEN a GIVEN b THEN c as a & b => c. Invokation order does not matter. Things terminate when everything is true, latest.
We can run Monto Carlo simulations based on that and combine investigations with initial probabilities like in the first publication.
WHEN c / ON c
The non-deterministic event c that may or may not happen that invokes the STEP.
In a simulation, that non-determinism is hard to handle. My simulation treats WHEN like a THEN. From a probablistic point of view, we might replace WHEN y with GIVEN y would happen THEN y did happen. But that is not exactly the same as a thing that may or may not happen.
In a Petri net, WHEN and STEP are the same thing - a transition.
UNLESS d / NOT GIVEN d / IF NOT d
d needs to be false so that the STEP can invoke.
UNLESS was introduced as a future work idea in the first publication
It is quite tempting to introduce this, because mitigations will always need to be negated otherwise, like in GIVEN mitigation is NOT holding the attacker back. On the other hand, if UNLESS d is combined with other THEN d steps, this will cause rules to be taken out of the game. We have full decision expressiveness and can model NP-complete problems like SAT or CLIQUE.
GIVEN AWAY e / TAKEN e / CONSUME e / LOSE e / SACRIFICE e
e must be true so that the STEP can invoke - like in GIVEN. e will be false after the STEP was invoked.
This is what Petri Nets do all the time. Like discussed in the second publication it adds insane expressiveness. Petri Nets also go from a false/true model to a number model and check / increase / decrease counters. Consuming inputs adds decision support and invites NP-complete problems. Execution order matters. Reachability and termination computations may become hard problems.
Conclusion
Those are my thoughts. What do you think, @sjgibbs ? How do you like the alternative names?