psitta

Documentation Index

SRS Model Invariants

This document lists all formal invariants of the SRS model used in the application.

An invariant is a property that must always hold to guarantee:

Invariants are divided into two categories:

  1. invariants related to SRSConfig (global, static configuration),
  2. invariants related to SRSState (dynamic, persisted state).

1. SRSConfig Invariants

These invariants concern only the model configuration.

They must be verified:

They must not be verified on every runtime SRS update.


1.1. Probabilistic parameters

Rationale:


1.2. Temporal decay parameters

Rationale:


1.3. Long pause handling

Rationale:

Rationale:


1.4. Learning phases

Hard invariant.

Soft invariant (recommended, but not strictly required).

Rationale:


1.5. Multiplicative factors

Rationale:


1.6. Day boundary

Rationale:


1.7. Derived definition (not an invariant)

This relationship is definitional and guaranteed by a getter. It must not be verified dynamically. The second relation ensures that w < rStar and that the logarithmic expressions in the model are always defined.


1.8. Default parameters

rstar is a probabilistic parameter representing the target recall probability.


All intervals are in days.

Note: It is recommended that easyInterval be greater than or equal to the last step in learningSteps, to avoid a regression when graduating with “Easy”.


Minimum possible value of easeFactor.


Maximum review interval. An interval that is too short has no value but is not forbidden.


Default value of easeFactor.


Default value of w.


2. SRSState Invariants

These invariants concern the dynamic memorisation state.

They must be:

Unlike SRSConfig, SRSState may attempt to correct certain invariants to prevent irreversible corruption.


2.1. Temporal invariants

Rationale:


Rationale:


2.2. Mathematical invariants

Rationale:


Rationale:


Rationale:


Rationale: this is a minimum bound.


2.3. Logical state invariants

Rationale:


2.4. History

Rationale:


2.5. Cross-variable invariants

Rationale:

interval represents the theoretically optimal interval between lastReview and nextReview.

By construction: nextReview is computed as lastReview + interval at the moment the SRS is updated, regardless of whether the current date has exceeded that value.


2.6. Soft invariants (debug / monitoring)

These invariants must not cause failures in production, but may trigger:

Examples:


3. Fundamental Rule


4. What Are Not Invariants

Formulas that must not be treated as invariants:

This is a w update equation. w is a stored latent state — it does not strictly depend on wMax and rbar at all times.

For the same reason, there is no invariant between: interval, easeFactor, kFactor, and w.



This document is the reference for any future SRS evolution. Any modification to the model must preserve these invariants or explicitly justify their evolution.