|
652 | 652 | types, the logic type is \CodeInline{integer}, for C floating point types, the |
653 | 653 | logic type is \CodeInline{real} (structures are kept as are until one really |
654 | 654 | tries to compute something with its field and this case, the value of the field |
655 | | -itself is promoted). When one tries to add an \CodeInline{integer} and a |
| 655 | +itself is promoted). When one tries to sum an \CodeInline{integer} and a |
656 | 656 | \CodeInline{real}, the \CodeInline{integer} is promoted to a \CodeInline{real}. |
657 | 657 |
|
658 | 658 |
|
659 | | -Thus, here even if \CodeInline{x+y} might overflow, we can safely compare the |
| 659 | +Thus, here, even if \CodeInline{x+y} might overflow, we can safely compare the |
660 | 660 | resulting value to \CodeInline{INT\_MIN} and \CodeInline{INT\_MAX}. Note that |
661 | 661 | it also means that for C types that have defined overflow, the behavior is the |
662 | 662 | one from ACSL. For example: |
|
680 | 680 | \image{addition-unsigned-fixed} |
681 | 681 |
|
682 | 682 |
|
683 | | -However, there are still operations that may be undefined, for example, if one |
| 683 | +However, there are still operations that may be undefined. For example, if one |
684 | 684 | writes the following ACSL properties, there are divisions by 0: |
685 | 685 |
|
686 | 686 |
|
|
692 | 692 |
|
693 | 693 | Nevertheless, those annotations are well-defined in ACSL. Even if we are not |
694 | 694 | able to \textit{compute} the values of these divisions, it is correct to write |
695 | | -these assertions, the first one evaluates to true, the second is unknown: in the |
| 695 | +these assertions. The first one evaluates to true, the second is unknown: in the |
696 | 696 | first assertion, even if we cannot compute the terms, they are indeed the same, |
697 | 697 | thus equal ; in the second, we cannot say if they equal because even if they are |
698 | 698 | different, nothing tells us what is the value that would eventually be |
|
0 commit comments