TLA + "Specifying Systems" draft translation --Section 6.6 Choose (Choose statement)

This section points

  • Choose  v : v S \text{Choose } v: v\notin S is the value of a specific uncertain
  • Only one chain to meet the state statute ( x = CHOOSE  n : n N a t ) [ x = CHOOSE  n : n N a t ] x (x= \text{CHOOSE }n:n \in Nat) \wedge \square[x'= \text{CHOOSE }n:n\in Nat]_{x}

Section 5.1 through memory interface Choose  v : v S \text{Choose } v: v\notin S introduced Choose operator, which is an expression that evaluates to an element not in S. In the above 6.3, we see that it is a powerful tool that can be refined using it.

The most common use Choose operator is assigned a unique value "name." For example, if a a and b b are real numbers and b 0 b \ neq 0 , then a / b a/b satisfies the formula a = b ( a / b ) a = b*(a / b) unique real number. Thus, the division standard module Reals defined on real numbers Real follows: a / b CHOOSE  c R e a l : a = b c a/b \triangleq \text{CHOOSE } c\in Real: a = b*c (expression CHOOSE  x S : p \text{CHOOSE } x\in S: p represents CHOOSE  x : ( x S ) p \text{CHOOSE } x:(x \in S) \wedge p ). in case a a non-zero real numbers, then there is no real number c c , such that a = 0 c a=0*c . therefore, a / 0 a/0 values with indeterminate. We do not know what the real number is multiplied by a string equal, so we can not say whether there is a real number c c make a a equal x y z c “xyz” *c . Therefore, we do not know a / x y z a /“ xyz” is.

Use mathematical knowledge relatively few programmers often think CHOOSE \text{CHOOSE} is an uncertain operator. In mathematics, there is no such thing uncertainty or uncertainty operator function or the like. If an expression equal to 42 today, then tomorrow, equal to 42, starting from tomorrow is still equal to 42 million years. Statute ( x = CHOOSE  n : n N a t ) [ x = CHOOSE  n : n N a t ] x (x= \text{CHOOSE }n:n \in Nat) \wedge \square[x'= \text{CHOOSE }n:n\in Nat]_{x} Only one state to meet its chain, the chain in this state, x x value is always equal CHOOSE  n : n N a t \text{CHOOSE }n:n \in Nat , which is a specific natural number not specified, the following which are very different statute ( x N a t ) [ x N a t ] (x \in Nat) \wedge \square [x' \in Nat] all states x x is always state of the chain of natural numbers ( x x may be different) satisfy the above statute, the statute is highly uncertain, its status satisfies chain are many.

Released four original articles · won praise 1 · views 5525

Guess you like

Origin blog.csdn.net/robinhzp/article/details/103567094