           *******************************************************
                       Semantic Analysis of SPARK Text
   Examiner Pro Edition, Version 11.0.0, Build Date 20120914, Build 25178
             Copyright (C) 2012 Altran Praxis Limited, Bath, U.K.
           *******************************************************


                        DATE : 27-MAR-2013 10:45:47.05

                          procedure T2Q6.SumArray




For path(s) from start to run-time check associated with statement of line 7:

procedure_sumarray_1.
H1:    for_all(i___1: integer, ((i___1 >= indextype__first) and (
           i___1 <= indextype__last)) -> ((element(a, [
           i___1]) >= elementtype__first) and (element(a, [
           i___1]) <= elementtype__last))) .
        ->
C1:    0 >= sumtype__first .
C2:    0 <= sumtype__last .


For path(s) from start to run-time check associated with statement of line 9:

procedure_sumarray_2.
H1:    for_all(i___1: integer, ((i___1 >= indextype__first) and (
           i___1 <= indextype__last)) -> ((element(a, [
           i___1]) >= elementtype__first) and (element(a, [
           i___1]) <= elementtype__last))) .
H2:    0 >= sumtype__first .
H3:    0 <= sumtype__last .
H4:    0 >= sumtype__first .
H5:    0 <= sumtype__last .
        ->
C1:    0 + element(a, [indextype__first]) >= sumtype__first .
C2:    0 + element(a, [indextype__first]) <= sumtype__last .
C3:    indextype__first >= indextype__first .
C4:    indextype__first <= indextype__last .


For path(s) from assertion of line 10 to run-time check associated with statement of line 9:

procedure_sumarray_3.
H1:    sum = sum_between(a, indextype__first, loop__1__i) .
H2:    0 <= sum .
H3:    sum <= elementtype__last * (loop__1__i - indextype__first + 1) .
H4:    for_all(i___1: integer, ((i___1 >= indextype__first) and (
           i___1 <= indextype__last)) -> ((element(a, [
           i___1]) >= elementtype__first) and (element(a, [
           i___1]) <= elementtype__last))) .
H5:    ((((loop__1__i >= counttype__first) and (loop__1__i <=
           counttype__last)) and ((indextype__first >=
           indextype__first) and (indextype__first <=
           indextype__last))) and (for_all(i___1: integer, ((
           i___1 >= indextype__first) and (i___1 <=
           indextype__last)) -> ((element(a, [i___1]) >=
           elementtype__first) and (element(a, [i___1]) <=
           elementtype__last))))) -> (((indextype__first =
           loop__1__i) -> (sum_between(a, indextype__first,
           loop__1__i) = element(a, [loop__1__i]))) and (((
           indextype__first < loop__1__i) -> (sum_between(a,
           indextype__first, loop__1__i) = sum_between(a,
           indextype__first, loop__1__i - 1) + element(a, [
           loop__1__i]))) and ((indextype__first > loop__1__i) -> (
           sum_between(a, indextype__first, loop__1__i) >=
           elementtype__last * (indextype__first - loop__1__i))))) .
H6:    sum_between(a, indextype__first, loop__1__i) >=
           sumtype__first .
H7:    sum_between(a, indextype__first, loop__1__i) <=
           sumtype__last .
H8:    loop__1__i >= indextype__first .
H9:    loop__1__i <= indextype__last .
H10:   loop__1__i >= indextype__first .
H11:   loop__1__i <= indextype__last .
H12:   not (loop__1__i = indextype__last) .
H13:   sum >= sumtype__first .
H14:   sum <= sumtype__last .
        ->
C1:    sum + element(a, [loop__1__i + 1]) >= sumtype__first .
C2:    sum + element(a, [loop__1__i + 1]) <= sumtype__last .
C3:    loop__1__i + 1 >= indextype__first .
C4:    loop__1__i + 1 <= indextype__last .


For path(s) from start to assertion of line 10:

procedure_sumarray_4.
H1:    for_all(i___1: integer, ((i___1 >= indextype__first) and (
           i___1 <= indextype__last)) -> ((element(a, [
           i___1]) >= elementtype__first) and (element(a, [
           i___1]) <= elementtype__last))) .
H2:    0 >= sumtype__first .
H3:    0 <= sumtype__last .
H4:    0 >= sumtype__first .
H5:    0 <= sumtype__last .
H6:    0 + element(a, [indextype__first]) >= sumtype__first .
H7:    0 + element(a, [indextype__first]) <= sumtype__last .
H8:    indextype__first >= indextype__first .
H9:    indextype__first <= indextype__last .
H10:   ((((indextype__first >= counttype__first) and (
           indextype__first <= counttype__last)) and ((
           indextype__first >= indextype__first) and (
           indextype__first <= indextype__last))) and (for_all(
           i___1: integer, ((i___1 >= indextype__first) and (
           i___1 <= indextype__last)) -> ((element(a, [
           i___1]) >= elementtype__first) and (element(a, [
           i___1]) <= elementtype__last))))) -> (((
           indextype__first = indextype__first) -> (
           sum_between(a, indextype__first, indextype__first) = element(
           a, [indextype__first]))) and (((indextype__first <
           indextype__first) -> (sum_between(a, indextype__first,
           indextype__first) = sum_between(a, indextype__first,
           indextype__first - 1) + element(a, [indextype__first]))) and ((
           indextype__first > indextype__first) -> (
           sum_between(a, indextype__first, indextype__first) >=
           elementtype__last * (indextype__first -
           indextype__first))))) .
H11:   sum_between(a, indextype__first, indextype__first) >=
           sumtype__first .
H12:   sum_between(a, indextype__first, indextype__first) <=
           sumtype__last .
        ->
C1:    0 + element(a, [indextype__first]) = sum_between(a,
           indextype__first, indextype__first) .
C2:    0 <= 0 + element(a, [indextype__first]) .
C3:    0 + element(a, [indextype__first]) <= elementtype__last * (
           indextype__first - indextype__first + 1) .
C4:    for_all(i___1: integer, ((i___1 >= indextype__first) and (
           i___1 <= indextype__last)) -> ((element(a, [
           i___1]) >= elementtype__first) and (element(a, [
           i___1]) <= elementtype__last))) .
C5:    ((((indextype__first >= counttype__first) and (
           indextype__first <= counttype__last)) and ((
           indextype__first >= indextype__first) and (
           indextype__first <= indextype__last))) and (for_all(
           i___1: integer, ((i___1 >= indextype__first) and (
           i___1 <= indextype__last)) -> ((element(a, [
           i___1]) >= elementtype__first) and (element(a, [
           i___1]) <= elementtype__last))))) -> (((
           indextype__first = indextype__first) -> (
           sum_between(a, indextype__first, indextype__first) = element(
           a, [indextype__first]))) and (((indextype__first <
           indextype__first) -> (sum_between(a, indextype__first,
           indextype__first) = sum_between(a, indextype__first,
           indextype__first - 1) + element(a, [indextype__first]))) and ((
           indextype__first > indextype__first) -> (
           sum_between(a, indextype__first, indextype__first) >=
           elementtype__last * (indextype__first -
           indextype__first))))) .
C6:    sum_between(a, indextype__first, indextype__first) >=
           sumtype__first .
C7:    sum_between(a, indextype__first, indextype__first) <=
           sumtype__last .
C8:    indextype__first >= indextype__first .
C9:    indextype__first <= indextype__last .
C10:   indextype__first >= indextype__first .
C11:   indextype__first <= indextype__last .


For path(s) from assertion of line 10 to assertion of line 10:

procedure_sumarray_5.
H1:    sum = sum_between(a, indextype__first, loop__1__i) .
H2:    0 <= sum .
H3:    sum <= elementtype__last * (loop__1__i - indextype__first + 1) .
H4:    for_all(i___1: integer, ((i___1 >= indextype__first) and (
           i___1 <= indextype__last)) -> ((element(a, [
           i___1]) >= elementtype__first) and (element(a, [
           i___1]) <= elementtype__last))) .
H5:    ((((loop__1__i >= counttype__first) and (loop__1__i <=
           counttype__last)) and ((indextype__first >=
           indextype__first) and (indextype__first <=
           indextype__last))) and (for_all(i___1: integer, ((
           i___1 >= indextype__first) and (i___1 <=
           indextype__last)) -> ((element(a, [i___1]) >=
           elementtype__first) and (element(a, [i___1]) <=
           elementtype__last))))) -> (((indextype__first =
           loop__1__i) -> (sum_between(a, indextype__first,
           loop__1__i) = element(a, [loop__1__i]))) and (((
           indextype__first < loop__1__i) -> (sum_between(a,
           indextype__first, loop__1__i) = sum_between(a,
           indextype__first, loop__1__i - 1) + element(a, [
           loop__1__i]))) and ((indextype__first > loop__1__i) -> (
           sum_between(a, indextype__first, loop__1__i) >=
           elementtype__last * (indextype__first - loop__1__i))))) .
H6:    sum_between(a, indextype__first, loop__1__i) >=
           sumtype__first .
H7:    sum_between(a, indextype__first, loop__1__i) <=
           sumtype__last .
H8:    loop__1__i >= indextype__first .
H9:    loop__1__i <= indextype__last .
H10:   loop__1__i >= indextype__first .
H11:   loop__1__i <= indextype__last .
H12:   not (loop__1__i = indextype__last) .
H13:   sum >= sumtype__first .
H14:   sum <= sumtype__last .
H15:   sum + element(a, [loop__1__i + 1]) >= sumtype__first .
H16:   sum + element(a, [loop__1__i + 1]) <= sumtype__last .
H17:   loop__1__i + 1 >= indextype__first .
H18:   loop__1__i + 1 <= indextype__last .
H19:   ((((loop__1__i + 1 >= counttype__first) and (
           loop__1__i + 1 <= counttype__last)) and ((
           indextype__first >= indextype__first) and (
           indextype__first <= indextype__last))) and (for_all(
           i___1: integer, ((i___1 >= indextype__first) and (
           i___1 <= indextype__last)) -> ((element(a, [
           i___1]) >= elementtype__first) and (element(a, [
           i___1]) <= elementtype__last))))) -> (((
           indextype__first = loop__1__i + 1) -> (
           sum_between(a, indextype__first, loop__1__i + 1) = element(
           a, [loop__1__i + 1]))) and (((indextype__first <
           loop__1__i + 1) -> (sum_between(a, indextype__first,
           loop__1__i + 1) = sum_between(a, indextype__first,
           loop__1__i + 1 - 1) + element(a, [loop__1__i + 1]))) and ((
           indextype__first > loop__1__i + 1) -> (
           sum_between(a, indextype__first, loop__1__i + 1) >=
           elementtype__last * (indextype__first - (
           loop__1__i + 1)))))) .
H20:   sum_between(a, indextype__first, loop__1__i + 1) >=
           sumtype__first .
H21:   sum_between(a, indextype__first, loop__1__i + 1) <=
           sumtype__last .
        ->
C1:    sum + element(a, [loop__1__i + 1]) = sum_between(a,
           indextype__first, loop__1__i + 1) .
C2:    0 <= sum + element(a, [loop__1__i + 1]) .
C3:    sum + element(a, [loop__1__i + 1]) <= elementtype__last * (
           loop__1__i + 1 - indextype__first + 1) .
C4:    for_all(i___1: integer, ((i___1 >= indextype__first) and (
           i___1 <= indextype__last)) -> ((element(a, [
           i___1]) >= elementtype__first) and (element(a, [
           i___1]) <= elementtype__last))) .
C5:    ((((loop__1__i + 1 >= counttype__first) and (
           loop__1__i + 1 <= counttype__last)) and ((
           indextype__first >= indextype__first) and (
           indextype__first <= indextype__last))) and (for_all(
           i___1: integer, ((i___1 >= indextype__first) and (
           i___1 <= indextype__last)) -> ((element(a, [
           i___1]) >= elementtype__first) and (element(a, [
           i___1]) <= elementtype__last))))) -> (((
           indextype__first = loop__1__i + 1) -> (
           sum_between(a, indextype__first, loop__1__i + 1) = element(
           a, [loop__1__i + 1]))) and (((indextype__first <
           loop__1__i + 1) -> (sum_between(a, indextype__first,
           loop__1__i + 1) = sum_between(a, indextype__first,
           loop__1__i + 1 - 1) + element(a, [loop__1__i + 1]))) and ((
           indextype__first > loop__1__i + 1) -> (
           sum_between(a, indextype__first, loop__1__i + 1) >=
           elementtype__last * (indextype__first - (
           loop__1__i + 1)))))) .
C6:    sum_between(a, indextype__first, loop__1__i + 1) >=
           sumtype__first .
C7:    sum_between(a, indextype__first, loop__1__i + 1) <=
           sumtype__last .
C8:    loop__1__i + 1 >= indextype__first .
C9:    loop__1__i + 1 <= indextype__last .
C10:   loop__1__i + 1 >= indextype__first .
C11:   loop__1__i + 1 <= indextype__last .


For path(s) from assertion of line 10 to finish:

procedure_sumarray_6.
H1:    sum = sum_between(a, indextype__first, loop__1__i) .
H2:    0 <= sum .
H3:    sum <= elementtype__last * (loop__1__i - indextype__first + 1) .
H4:    for_all(i___1: integer, ((i___1 >= indextype__first) and (
           i___1 <= indextype__last)) -> ((element(a, [
           i___1]) >= elementtype__first) and (element(a, [
           i___1]) <= elementtype__last))) .
H5:    ((((loop__1__i >= counttype__first) and (loop__1__i <=
           counttype__last)) and ((indextype__first >=
           indextype__first) and (indextype__first <=
           indextype__last))) and (for_all(i___1: integer, ((
           i___1 >= indextype__first) and (i___1 <=
           indextype__last)) -> ((element(a, [i___1]) >=
           elementtype__first) and (element(a, [i___1]) <=
           elementtype__last))))) -> (((indextype__first =
           loop__1__i) -> (sum_between(a, indextype__first,
           loop__1__i) = element(a, [loop__1__i]))) and (((
           indextype__first < loop__1__i) -> (sum_between(a,
           indextype__first, loop__1__i) = sum_between(a,
           indextype__first, loop__1__i - 1) + element(a, [
           loop__1__i]))) and ((indextype__first > loop__1__i) -> (
           sum_between(a, indextype__first, loop__1__i) >=
           elementtype__last * (indextype__first - loop__1__i))))) .
H6:    sum_between(a, indextype__first, loop__1__i) >=
           sumtype__first .
H7:    sum_between(a, indextype__first, loop__1__i) <=
           sumtype__last .
H8:    loop__1__i >= indextype__first .
H9:    loop__1__i <= indextype__last .
H10:   loop__1__i >= indextype__first .
H11:   loop__1__i <= indextype__last .
H12:   loop__1__i = indextype__last .
H13:   ((((indextype__last >= counttype__first) and (
           indextype__last <= counttype__last)) and ((
           indextype__first >= indextype__first) and (
           indextype__first <= indextype__last))) and (for_all(
           i___1: integer, ((i___1 >= indextype__first) and (
           i___1 <= indextype__last)) -> ((element(a, [
           i___1]) >= elementtype__first) and (element(a, [
           i___1]) <= elementtype__last))))) -> (((
           indextype__first = indextype__last) -> (
           sum_between(a, indextype__first, indextype__last) = element(
           a, [indextype__last]))) and (((indextype__first <
           indextype__last) -> (sum_between(a, indextype__first,
           indextype__last) = sum_between(a, indextype__first,
           indextype__last - 1) + element(a, [indextype__last]))) and ((
           indextype__first > indextype__last) -> (
           sum_between(a, indextype__first, indextype__last) >=
           elementtype__last * (indextype__first -
           indextype__last))))) .
H14:   sum_between(a, indextype__first, indextype__last) >=
           sumtype__first .
H15:   sum_between(a, indextype__first, indextype__last) <=
           sumtype__last .
        ->
C1:    sum = sum_between(a, indextype__first, indextype__last) .
