aboutsummaryrefslogtreecommitdiffhomepage
path: root/notes/assert_set_statement.txt
blob: c7080d46cf115223deb3ef69b38f5c774762c836 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

assert-set statement
====================

Perhaps something like this:

    int x
    if ... {
        ...
        x = 1
    } else if ... {
        ...
        x = 2
    } else if ...
    ...
    } else {
        x = 9
    }
    assert is_set x

And the inverse:

    assert is_unset x

Other useful things:

    assert lifetime x >= y

    assert low_bound(x) <= high_bound(y)