Contents

assertFact(_:)

Adds the specified fact to the fact set with a membership grade of 1.0, and reevaluates the rules in the system’s agenda.

Declaration

func assertFact(_ fact: any NSObjectProtocol)

Parameters

  • fact:

    An object representing a truth to be claimed by the rule system. For details, see the Facts property.

Discussion

Calling this method is equivalent to calling the assertFact(_:grade:) method with a grade value of 1.0. Asserting a fact adds it to the facts array if it is not already present.

Upon asserting or retracting any facts, the system reevaluates the rules in its agenda list so any rules that depend on changes to the set of facts can perform their actions.

See Also

Asserting and Retracting Facts