This PR adds two additional model-level evaluable function implementations, under org.omg.sysml.expressions.functions.
ListRangeFunction implements the range construction operator'..'. An expression of the form e1...e2, in which e1 and e2 evaluate to integers, results in an ordered sequence of a range of sequential integers from the value of e1 to the value of e2, inclusive. For example, 1..3 evaluates to the sequence (1, 2, 3). If the value of e1 is greater than the value of e2, then the result is the empty sequence.
ExcludesFunction implements the SequenceFunctions::excludes function. This function tests whether a value is excluded from a sequence. For example, excludes(1..3, 2) is false, while excludes(1..3, 0) is true. It is the inverse of the includes function, which was already implemented.
It also adds tests to org.omg.sysml.interactive.tests.ModelLevelEvaluationTest for the above new function implementations, as well as adding some additional tests for other sequence-related functions previously implemented.
This PR adds two additional model-level evaluable function implementations, under
org.omg.sysml.expressions.functions
.ListRangeFunction
implements the range construction operator'..'
. An expression of the forme1
...
e2
, in whiche1
ande2
evaluate to integers, results in an ordered sequence of a range of sequential integers from the value ofe1
to the value ofe2
, inclusive. For example,1..3
evaluates to the sequence(1, 2, 3)
. If the value ofe1
is greater than the value ofe2
, then the result is the empty sequence.ExcludesFunction
implements theSequenceFunctions::excludes
function. This function tests whether a value is excluded from a sequence. For example,excludes(1..3, 2)
is false, whileexcludes(1..3, 0)
is true. It is the inverse of theincludes
function, which was already implemented.It also adds tests to
org.omg.sysml.interactive.tests.ModelLevelEvaluationTest
for the above new function implementations, as well as adding some additional tests for other sequence-related functions previously implemented.