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

*From*: Serdar Tasiran <stas...@xxxxxxxxx>*Date*: Wed, 22 Mar 2017 11:08:52 -0700 (PDT)*References*: <31c6cb03-8088-4b6c-8a57-425b4c5af4ec@googlegroups.com> <0f5284e3-3915-403b-a6e1-7334f5131dec@googlegroups.com>

Thank you very much, Stephan and Leslie, for your quick responses and explanations. I will try your suggestions and report.

Serdar

On Wednesday, March 22, 2017 at 1:54:23 PM UTC-4, Leslie Lamport wrote:

On Wednesday, March 22, 2017 at 1:54:23 PM UTC-4, Leslie Lamport wrote:

Here's a little more detail to explain Stephan's response. TLC has a mechanism for replacing a definition in a module with Java methods that TLC uses to evaluate expressions containing the defined operator. This mechanism is used for the definition of Seq in the standard Sequences module. It allows TLC to evaluate an _expression_ like <<-42>> \in Seq(Nat) even though TLC can't evaluate Seq(Nat). In the Sequences module, Seq is defined in terms of Nat. However, because TLC does not use that definition in evaluating expressions containing Seq, overriding the definition of Nat does not change how TLC evaluates expressions containing Seq.

I believe that all the definitions in most of the standard modules are replaced by Java code in this way. (I'm not sure about the Bags module.) I also believe that overriding a definition in a model does what it should. In your example, overriding the definition of Seq with the definition that appears in the Sequences model should work. Thus you could use the definitionSeq(S) == UNION { [1 .. n -> S] : n \in Nat }in the model. (The Nat in this definition will be the one defined by your overriding of the definition of Nat.)I haven't tested this; please let us know if anything I've written is incorrect.Leslie

**References**:**Limiting lengths of all sequences for TLC model checking***From:*Serdar Tasiran

**Re: Limiting lengths of all sequences for TLC model checking***From:*Leslie Lamport

- Prev by Date:
**Re: Limiting lengths of all sequences for TLC model checking** - Next by Date:
**Re: [tlaplus] Next release?** - Previous by thread:
**Re: Limiting lengths of all sequences for TLC model checking** - Next by thread:
**Fatal error starting 1.5.2 on macOS Sierra, and a solution.** - Index(es):