[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*From*: Stephan Merz <stephan.merz@xxxxxxxxx>*Date*: Wed, 5 Jan 2022 10:49:28 +0100*Ironport-data*: A9a23:0mCVcK/RvLM1+JtkvVXbDrUDpH+TJUtcMsCJ2f8bfWQNrUon0zIDn2QcCm/Ua/yPNDChKNl3Otu/pE4HsJTQmt5mG3M5pCpnJ55ogZqcVI7Bdi8cHAvLc5adFBo/hykmh2ipwPkcFhcwnT/wdOixxZVA/fvQHOCkUbaZYnkZqTJMEU/Ntzozw4bVvaYz2bBVMyvV0T/Di5W31G2Ng1aYAUpIg063ky6Didyp0N8uUvPSUtgQ1LPWvyF94JvyvshdJVOgKmVfNrbSq+ouUNiEEm3lExcFUrtJk57+e0wOB6bQZE2A1CMQVK+ljRxP4Cc1187XNtJGMRYR22jPxYkvjosU3XCzYV9B0qnkhOAUSx1FCGJ0O6Zs05CbGUiB7P2i73fsUCXQmcpOJWQZBKApp9lTO0Z/3fMfLz8JYx+ZgP+u2/SwTewEasELdZK0ZtNO4CgIITbxVK56G/gvWZ7i6d5D1yornehSGf+YYtEDLDtpdhXJJRxJIFYeTpwk9NpELFHrK2gA7gOB/P9vpTDHllkpluS0YYTBIYnSA5hBwROxuETt+kLVAjU7Pfij0xy781e437eaxWejTOr+D5W9//9uxUWRnykdVkRQWly8rv20zEW5Xrpix4Uv0nJGhcAPGIaDFLERniFUoUJoejYZUttUVvU4sUSDlPOS7AGeCWwJCDVGbbTKcedeqSMCjje0cxHBXFSDc4F5jVqS8bCbqT69Iy8INXREbigBJefAy8e2u5k913ojUf46eJNYTbTJ9fXYzDeNoywziK8UkNYQka68+DgrRhrESofhFmYI2+kcYo5pAs6VqmJoi0xEJGU3Ncp9Ebs=*Ironport-hdrordr*: A9a23:vBbMbqAfiSJxBDvlHemE55DYdb4zR+YMi2TDGXoRdfU1SL3+qynKpp4mPHDP5Ar5NEtOpTnEAtjifZq+z+8Q3WByB9eftWDd0QPCQb2Kr7GSoQEIcBeOk9K1oJ0QCJSWf+eAdWSS4/yV3OE2fuxQuuVviJrY/Ns2mE0dKz1XVw==*References*: <5e5b0ddf-7bc3-49a7-b9f8-51955b513dc2n@googlegroups.com>

Hello, concerning the syntax errors: 1. Your _expression_ "CHOOSE k \in Nat : P(k)" appears where TLA+ expects a definition, an axiom / assumption or a theorem. Since m and k are declared as constants, I believe what you really mean is ASSUME k \in Nat /\ (k > (1+(1+4/m)^0.5) / 2) /\ (k < (2+(1+4/m)^0.5) / 2) Alternatively, you could remove the constant parameter k and write the definition k == CHOOSE k \in Nat : ( (k > (1+(1+4/m)^0.5) / 2) /\ (k < (2+(1+4/m)^0.5) / 2) ) but presumably you'd like to check your spec for all possible values of k rather than a fixed one. 2. The final conjunct of your next-state relation is incomplete because the ELSE branch is missing. Perhaps you meant to write c' >= k => E' >= r' * c' in order to restrict transitions to those that satisfy this implication, but perhaps you rather meant to assert the invariant c >= k => E >= r * c and verify that this implication is true for every state along every run of the system? In that case, you should write a definition like Inv == c >= k => E >= r * c and use the TLA+ tools to verify that it holds (but see below). 3. [][Next] is not a well-formed formula of TLA+, you should write Spec == Init /\ [][Next]_<<c,E,r>> 4. Although not an error, it is a bit strange that your definitions of the initial predicate and the next-state relation are written as disjunctions with a single disjunct. You may want to remove the leading "\/" (but perhaps this is a simplified version and you have other disjuncts in mind). ––– More fundamentally, while TLA+ has a standard module representing the real numbers, the currently available TLA+ tools (the model checkers TLC and Apalache as well as the interactive proof system TLAPS) do not support real numbers. I am therefore afraid that TLA+ is not the most appropriate formalism for what you are trying to do. Best regards, Stephan
You received this message because you are subscribed to the Google Groups "tlaplus" group. To unsubscribe from this group and stop receiving emails from it, send an email to tlaplus+unsubscribe@xxxxxxxxxxxxxxxx. To view this discussion on the web visit https://groups.google.com/d/msgid/tlaplus/7E53DB11-052B-49D1-9E87-7F61180186BF%40gmail.com. |

**Follow-Ups**:**Re: [tlaplus] Parse error was expecting "==== or more module body"***From:*Adeeb Abdul Salam

**References**:**[tlaplus] Parse error was expecting "==== or more module body"***From:*Adeeb Abdul Salam

- Prev by Date:
**[tlaplus] Parse error was expecting "==== or more module body"** - Next by Date:
**Re: [tlaplus] Parse error was expecting "==== or more module body"** - Previous by thread:
**[tlaplus] Parse error was expecting "==== or more module body"** - Next by thread:
**Re: [tlaplus] Parse error was expecting "==== or more module body"** - Index(es):