src/HOL/SPARK/Manual/loop_invariant/proc1.siv
author haftmann
Thu, 19 Jun 2025 17:15:40 +0200
changeset 82734 89347c0cc6a3
parent 45044 2fae15f8984d
permissions -rw-r--r--
treat map_filter similar to list_all, list_ex, list_ex1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
45044
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
     1
*****************************************************************************
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
     2
                       Semantic Analysis of SPARK Text
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
     3
    Examiner Pro Edition, Version 9.1.0, Build Date 20101119, Build 19039
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
     4
             Copyright (C) 2010 Altran Praxis Limited, Bath, U.K.
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
     5
*****************************************************************************
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
     6
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
     7
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
     8
CREATED 22-SEP-2011, 11:10:50  SIMPLIFIED 22-SEP-2011, 11:10:51
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
     9
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    10
SPARK Simplifier Pro Edition, Version 9.1.0, Build Date 20101119, Build 19039
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    11
Copyright (C) 2010 Altran Praxis Limited, Bath, U.K.
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    12
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    13
procedure Loop_Invariant.Proc1
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    14
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    15
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    16
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    17
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    18
For path(s) from start to run-time check associated with statement of line 7:
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    19
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    20
procedure_proc1_1.
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    21
*** true .          /* all conclusions proved */
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    22
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    23
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    24
For path(s) from start to run-time check associated with statement of line 8:
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    25
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    26
procedure_proc1_2.
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    27
*** true .          /* all conclusions proved */
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    28
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    29
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    30
For path(s) from start to run-time check associated with statement of line 8:
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    31
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    32
procedure_proc1_3.
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    33
*** true .          /* all conclusions proved */
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    34
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    35
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    36
For path(s) from start to assertion of line 8:
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    37
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    38
procedure_proc1_4.
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    39
*** true .          /* all conclusions proved */
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    40
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    41
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    42
For path(s) from assertion of line 8 to assertion of line 8:
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    43
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    44
procedure_proc1_5.
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    45
H1:    a <= 2147483647 .
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    46
H2:    b >= 0 .
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    47
H3:    b <= 4294967295 .
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    48
H4:    loop__1__i >= 1 .
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    49
H5:    (loop__1__i - 1) * b mod 4294967296 >= 0 .
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    50
H6:    (loop__1__i - 1) * b mod 4294967296 <= 4294967295 .
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    51
H7:    ((loop__1__i - 1) * b mod 4294967296 + b) mod 4294967296 >= 0 .
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    52
H8:    ((loop__1__i - 1) * b mod 4294967296 + b) mod 4294967296 <= 4294967295 .
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    53
H9:    loop__1__i < a .
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    54
H10:   integer__size >= 0 .
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    55
H11:   natural__size >= 0 .
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    56
H12:   word32__size >= 0 .
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    57
       ->
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    58
C1:    loop__1__i * b mod 4294967296 = ((loop__1__i - 1) * b mod 4294967296 + b)
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    59
           mod 4294967296 .
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    60
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    61
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    62
For path(s) from assertion of line 8 to run-time check associated with 
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    63
          statement of line 11:
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    64
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    65
procedure_proc1_6.
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    66
*** true .          /* all conclusions proved */
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    67
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    68
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    69
For path(s) from start to finish:
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    70
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    71
procedure_proc1_7.
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    72
*** true .          /* all conclusions proved */
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    73
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    74
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    75
For path(s) from assertion of line 8 to finish:
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    76
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    77
procedure_proc1_8.
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    78
H1:    a <= 2147483647 .
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    79
H2:    b >= 0 .
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    80
H3:    b <= 4294967295 .
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    81
H4:    a <= 2147483647 .
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    82
H5:    a >= 1 .
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    83
H6:    (a - 1) * b mod 4294967296 >= 0 .
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    84
H7:    (a - 1) * b mod 4294967296 <= 4294967295 .
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    85
H8:    ((a - 1) * b mod 4294967296 + b) mod 4294967296 >= 0 .
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    86
H9:    ((a - 1) * b mod 4294967296 + b) mod 4294967296 <= 4294967295 .
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    87
H10:   integer__size >= 0 .
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    88
H11:   natural__size >= 0 .
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    89
H12:   word32__size >= 0 .
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    90
       ->
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    91
C1:    a * b mod 4294967296 = ((a - 1) * b mod 4294967296 + b) mod 4294967296 .
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    92
2fae15f8984d Added documentation for HOL-SPARK
berghofe
parents:
diff changeset
    93