Proposals of Changes to the Mathematical Language Specification: Difference between revisions
From Event-B
Jump to navigationJump to search
imported>Wohuai New page: =Change Proposals to Version 1.0= * Matthias: Section 2.3 says that integer literals are unsigned, i.e., nonnegative. In Arithmetic Rewrite Rules, it is assumed that integer literals ... |
imported>Jrloria No edit summary |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
=Change Proposals to Version 1.0= | =Change Proposals to Version 1.0= | ||
* Matthias: Section 2.3 says that integer literals are unsigned, i.e., nonnegative. In [[Arithmetic Rewrite Rules]], it is assumed that integer literals may also be negative. I therefore propose to say in Section 2.3 that integer literals can be positive, zero, or negative, but that negative literals such as -1 are parsed to unary minus followed by 1. | * Matthias: Section 2.3 says that integer literals are unsigned, i.e., nonnegative. In [[Arithmetic Rewrite Rules]], it is however assumed that integer literals may also be negative. I therefore propose to say in Section 2.3 that integer literals can be positive, zero, or negative, but that negative literals such as -1 are parsed to unary minus followed by 1. | ||
* Matthias: The Paragraph "Arithmetic Operators" on page 19 says that "the exponentiation operator has the least priority". That would mean 1+1^2 is parsed as (1+1)^2 and evaluates to 4, which is not the case in Rodin. Giving the exponentiation operator least priority is also uncommon. I therefore propose to change the paragraph to say that the exponentiation operator has highest priority among all arithmetic operators. | |||
[[Category:Design proposal]] |
Latest revision as of 12:53, 26 March 2010
Change Proposals to Version 1.0
- Matthias: Section 2.3 says that integer literals are unsigned, i.e., nonnegative. In Arithmetic Rewrite Rules, it is however assumed that integer literals may also be negative. I therefore propose to say in Section 2.3 that integer literals can be positive, zero, or negative, but that negative literals such as -1 are parsed to unary minus followed by 1.
- Matthias: The Paragraph "Arithmetic Operators" on page 19 says that "the exponentiation operator has the least priority". That would mean 1+1^2 is parsed as (1+1)^2 and evaluates to 4, which is not the case in Rodin. Giving the exponentiation operator least priority is also uncommon. I therefore propose to change the paragraph to say that the exponentiation operator has highest priority among all arithmetic operators.