Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.
SECRET//ORCON//NOFORN
2.3.4 Managing Short Circuits
The Grasshopper rule engine supports operator short circuiting to greatly reduce
the number of rules that need to be evaluated. A short circuit occurs when an
operator receives a return value from a fact that guarantees the outcome of the
operator. For example, if an “and” operator receives a result of false from any
child fact, the end result of the operator will always be false. Due to this, the rule
engine will stop evaluation of the remaining child rule for the operator and
return. The short circuit situation for each operator is described below in
Operator Descriptions.
When writing rules, the rule writer needs to take the short circuit situations into
account. For example, when using the “and” operator, the rule writer should
place the rules that are most commonly false at the beginning, to assure the
minimal number of rules will be evaluated.
31
SECRET//ORCON//NOFORN