Open ondrej33 opened 9 months ago
This raises many good points, I would just add one more note:
In many cases, we can actually speed-up a computation by restricting it to an already known subset of viable results. For example, take the formula (AX a) & (EF b)
. Here, we know that the result must satisfy both sub-formulas, yet based on the rationale given above, we know that AX a
is probably "easier" to compute than EF b
. Hence it makes sense to first verify AX a
and then verify EF b
only on the resulting states.
However, this adds two new issues:
AX a
is a set that has a very poor symbolic representation, it can actually slow down the computation of EF
, because the computation already starts with this "poor set".Some other notes:
formal x in (formulaA): (formulaB)
. That is, we explicitly restrict the validity of a quantifier to a know set.
Currently, formulae trees are always evaluated by traversing the tree branches recursively from left to right. Similarly, when given several formulae, they are always evaluated in a given order. This is usually not a problem if we only expect the final result. However, in future, it might be useful to obtain partial results for some (sub-)formulae during the computation. Therefore, it may prove useful to order the sub-formulae with respect to their "complexity" and evaluate simpler sub-formulae first (i.e., "AX p" could be considered simpler than "AF p").
To achieve this, we need to:
For now, I see two approaches how to do it (there are surely more):
operator
+index
+indices of children
. A pre-computed dictionary would guide us in which nodes to jump to and evaluate.In the far future, we could also extend this - we can determine sets of "unrelated" sub-formulae and evaluate them simultaneously.