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

*From*: Andrew Helwer <andrew.helwer@xxxxxxxxx>*Date*: Thu, 4 Mar 2021 18:01:05 -0800 (PST)*References*: <bd69edf1-dc54-4afc-84e7-bb7536cc6e0bn@googlegroups.com> <78dc63ed-d4a5-4d56-a6b5-0fac83290053n@googlegroups.com>

You need to override the definition of both Real and Infinity. For my spec, I defined Infinity to be the value 100 and Real to be the set 0 ..10 \cup {Infinity}. If you're expected your clock or timers to go above 10 you'll need to increase the size of the Real set as necessary.

If you're using the set Real in other contexts in the spec that require a different override, you can solve this problem by writing something like the following definitions:

\* Possible values for a clock to take, in arbitrary units.

Time == {t \in Real : t >= 0}

\* A time window of nonzero length.

TimeSpan == {t \in Time : t > 0}

\* A time window of nonzero length.

TimeSpan == {t \in Time : t > 0}

Then you can override the definitions of Time and TimeSpan specifically instead of Real generally.

Andrew

On Thursday, March 4, 2021 at 11:47:36 AM UTC-5 lisboa...@xxxxxxxxx wrote:

Edited the message and forgot to change the subject. However, to explain the problem related to the subject, a similar problem comes up when trying to init uper-bound timers with Infinity. In this case, TLC gives an error of the type : Error while evaluating unbounded CHOOSE _expression_.Em quinta-feira, 4 de março de 2021 às 17:42:19 UTC+1, Felipe Lisboa escreveu:Hey,

In the context of writing a DRAM controller spec, I followed Lamport's procedure described in "Real Time is Really Simple", which consists of using countdown timers to model my timing constraints.I added a type invariant predicate to check type-check my timers (see below) and I am initializing them with 0. But TLC gives me:Attempted to check if the value 0 is an element of the string "Reals".TimeTypeOK ==/\ cmds_lbtimer \in [Banks \X CMDS] -> Real]/\ arvl_lbtimer \in [Requestors -> Real]/\ chsl_lbtimer \in Real/\ now \in {r \in Real : r =< maxtime}Why is this ? Is there something wrong with the standard module Reals?Thanks,

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/32144135-ddd7-4085-b727-857cc45decffn%40googlegroups.com.

**Follow-Ups**:**[tlaplus] Re: Unbounded CHOOSE while using Standard Module Reals***From:*Felipe Lisboa

**References**:**[tlaplus] Unbounded CHOOSE while using Standard Module Reals***From:*Felipe Lisboa

**[tlaplus] Re: Unbounded CHOOSE while using Standard Module Reals***From:*Felipe Lisboa

- Prev by Date:
**Re: [tlaplus] Repo for questions asked in this group** - Next by Date:
**Re: [tlaplus] Line Numbers with tla2tex.TeX** - Previous by thread:
**[tlaplus] Re: Unbounded CHOOSE while using Standard Module Reals** - Next by thread:
**[tlaplus] Re: Unbounded CHOOSE while using Standard Module Reals** - Index(es):