HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

What's the meaning of the $\top$ symbol in a Hoare triple?

Submitted by: @import:stackexchange-cs··
0
Viewed 0 times
meaningtriplethetopwhatsymbolhoare

Problem

I'm studying program verification and came across the following triple:

$$ \{\top\} \;P \; \{y=(x+1)\} $$
What's the meaning of the $\top$ symbol on the precondition? Does it mean $P$ can take any input?

Solution

The symbol $\top$, known as top, stands for "True". There is also a symbol $\bot$, known as bottom, which stands for "False". Top is always true, and bottom is always false. In your case, having a precondition that always holds is the same as having no precondition.

Context

StackExchange Computer Science Q#66151, answer score: 2

Revisions (0)

No revisions yet.