AnyComposition definition not making sense to me

(Charles) #1

definition from docs:

Composes a number of clauses, such that 0 or more of the clauses can be run.

so any does not mean at least 1 ? Apparently not, isn’t it more useful to have a clause construct that means more than “none or not none”, what am I missing ?


(Andras Slemmer) #2

Agreed, it should be 1 or more clauses.

The three compositions AllComposition, FirstComposition and AnyComposition are loosely based on logical connectives.
AllComposition corresponds to conjunction (A and B) or universal quantification (all of [A,B,C…])
AnyComposition corresponds to simple disjunction (A or B) or existential quantification (at least one of [A,B,C…])
FirstComposition corresponds to exclusive disjunction (either A or B but not both) or uniqueness quantification (precisely one of [A,B,C…]

The current code doesn’t encode these correctly (AnyComposition accepts 0 matching subclauses and FirstComposition sequences). We are aware of this issue, the current clause code is still in flux.

(Charles) #3

thank you for elaborating