TemporalFactStore provides access to temporal facts.
| 61 | |
| 62 | // TemporalFactStore provides access to temporal facts. |
| 63 | type TemporalFactStore interface { |
| 64 | ReadOnlyTemporalFactStore |
| 65 | |
| 66 | // Add adds a temporal fact to the store. |
| 67 | // Returns (true, nil) if the fact was added, (false, nil) if duplicate. |
| 68 | // Returns (false, ErrIntervalLimitExceeded) if the atom has too many intervals. |
| 69 | Add(atom ast.Atom, interval ast.Interval) (bool, error) |
| 70 | |
| 71 | // AddEternal adds a fact valid for all time (eternal/timeless). |
| 72 | AddEternal(atom ast.Atom) (bool, error) |
| 73 | |
| 74 | // Coalesce merges adjacent/overlapping intervals for the same fact. |
| 75 | Coalesce(predicate ast.PredicateSym) error |
| 76 | |
| 77 | // Merge merges contents of given store. |
| 78 | Merge(ReadOnlyTemporalFactStore) error |
| 79 | } |
| 80 | |
| 81 | // DefaultMaxIntervalsPerAtom is the default maximum number of intervals allowed per atom. |
| 82 | // This prevents interval explosion in recursive temporal rules. |