In computer science, an invariant is a logical assertion that is always held to be true during a certain phase of execution of a computer program. For example, a loop invariant is a condition that is true at the beginning and the end of every iteration of a loop.

Programmers often use assertions in their code to make invariants explicit.



📂 Slip-box | Последнее изменение: 04.02.2025 11:25