@@ -25,29 +25,31 @@ the program.
2525There is a hierarchy of four kinds of purity, all of which share the
2626property of no effect on the initial Java program state.
2727
28- ** pure** methods: The basic kind of pure method has no side effects on the external program
28+ ** pure** methods: This basic kind of ` pure ` method has no side effects on the external program
2929state but may allocate and dispose of objects within the method and may return
3030a newly allocated object (e.g. a ` String ` ). Because it can return a fresh object,
3131it is not a deterministic method from the point of view of the Java program heap.
3232
33- ** spec_pure** methods: A spec_pure method is a pure method that does not return any
33+ ** spec_pure** methods: A ` spec_pure ` method is a ` pure ` method that does not return any
3434fresh object; it either returns a primitive value or an object reference that was
35- already allocated in the pre-state. Consequently it is deterministic.
35+ already allocated in the pre-state. Consequently it is deterministic.
36+ A method must be at least ` spec_pure ` to be used in a specification.
3637
37- ** strictly_pure** methods: A strictly_pure method is a spec_pure method that does not
38+ ** strictly_pure** methods: A ` strictly_pure ` method is a ` spec_pure ` method that does not
3839allocate any new objects in the body of the method. Such a method has no effect on the
3940object heap at all; it may read heap values and perform computations on the method's
40- local stack. Though a strictly_pure method is generally undistinguishable by a calling method from a
41- spec_pure method, some tools can benefit by knowing that a method makes no changes,
41+ local stack. Though a ` strictly_pure ` method is generally indistinguishable by a calling method from a
42+ ` spec_pure ` method, some tools can benefit by knowing that a method makes no changes,
4243even internally, to the program heap.
4344
44- ** heap_free** methods: A heap_free method is one that does not depend on the program heap
45+ ** heap_free** methods: A ` heap_free ` method is one that does not depend on the program heap
4546at all. Hence such a method (if deterministic) returns the same value for the same arguments
4647no matter in what heap or program state it is invoked. Examples are purely mathematical
4748library functions.
4849
49- A method marked with any kind of purity may not have any ` assignable ` clauses;
50+ A method marked with any kind of purity should not have any ` assignable ` clauses;
5051all the method's behaviors are implicitly ` assignable \nothing ` .
52+ Any ` assignable ` clause that is present must be ` assignable \nothing ` .
5153
5254To be called in a method specification, a method must be at least ` spec_pure ` .
5355For historical reasons, a method parked ` pure ` that returns a primitive value
0 commit comments