Documentation

Aesop.Forward.Match.Types

structure Aesop.Match :

A match associates hypotheses to (a prefix of) the slots of a slot cluster.

  • subst : Substitution

    The substitution induced by the hyps or pattern substitutions added to the slots.

  • patInstSubsts : Array Substitution

    The pattern substitutions that have been added to the match.

  • level : SlotIndex

    The match's level is the index of the maximal slot for which a hyp or pattern substitution has been added to the match.

  • forwardDeps : Array PremiseIndex

    Premises that appear in slots which are as yet unassigned in this match (i.e., in slots with index greater than level). This is a property of the rule, but we include it here because it's used to check whether two matches are equivalent.

  • conclusionDeps : Array PremiseIndex

    Premises that appear in the rule's conclusion. This is a property of the rule, but we include it here because it's used to check whether two matches are equivalent.

Instances For
    Equations
    def Aesop.Match.equiv (m₁ m₂ : Match) :

    Two matches are equivalent if (a) they have the same level; (b) for each premise that appears in a slot greater than the matches' level, their substitution assigns the same value; (c) for each premise that appears in the rule's conclusion, their substitution assigns the same value.

    If we already have a match m₁ and we obtain an equivalent match m₂, then m₂ is redundant. This is because if the matches are partial, then m₂ can be completed by exactly the hypotheses that complete m₁, since they agree on the premise instantiations that are relevant for the possible completions. And if the matches are complete, then they assign the same instantiations to the variables that appear in the rule's conclusion, and these are the only ones that ultimately matter.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      Equations
      • One or more equations did not get rendered due to their size.
      Equations

      A complete match contains complete matches for each slot cluster. This means there is one match for each slot cluster and each such match contains a hypothesis for each of the slots.

      Instances For

        An entry in the forward state queues. Represents a complete match.

        Instances For

          Compare two queue entries by rule priority, rule name and the expressions contained in the match. Higher-priority rules are considered less (since the queues are min-queues). The ordering on expressions is arbitrary.

          Equations

          Compare two queue entries by rule priority, rule name and the expressions contained in the match. Higher-priority rules are considered less (since the queues are min-queues). The ordering on expressions is arbitrary.

          Equations
          Instances For