Clarify evaluate order and semantics of REPEAT_SPEC.

Description

Currently the spec does not say whether the terminate_condition should be evaluated before or after the execution of the PLAN_ITEM. Adding a Boolean would enable the two standard flavours of loop to be supported i.e. while/do and repeat/until.

Activity

Show:
Thomas Beale
April 28, 2020, 12:07 PM

So I think I will fix this one by documenting the terminate_condition here as acting as a post-test in the sense you have implemented it. This probably won’t be the final answer on this, but it should at least be coherent for now. We can treat exceptions as more like ‘clinical interrupts’ as I was describing above.

Thomas Beale
April 28, 2020, 12:17 PM
Matija Polajnar
May 5, 2020, 7:15 AM

I don’t think we have a common understanding here.

What we have implemented is that the terminate condition does occur before each iteration, but only if the lower bound for repeats has already been reached. So the number of repeats (not counting the initial run) always respects the interval in the repeats attribute (well, unless someone abandons the entire plan or whatever), but after the lower bound has been reached, each new iteration (until the upper bound is reached) is preceded by a terminate condition predicate.

Thomas Beale
May 5, 2020, 9:42 AM
Matija Polajnar
May 5, 2020, 10:57 AM

Yes, this now matches our understanding and implementation of those attributes!

Reporter

Thomas Beale

Raised By

Thomas Beale

Components

Affects versions

Configure