PageRenderTime 9ms CodeModel.GetById 6ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/src/tools/semantics/code/instructions/liberty_assignment.e

http://github.com/tybor/Liberty
Specman e | 51 lines | 31 code | 6 blank | 14 comment | 0 complexity | 647f1b03341b926f874bea6b746fbda5 MD5 | raw file
 1-- This file is part of Liberty Eiffel.
 2--
 3-- Liberty Eiffel is free software: you can redistribute it and/or modify
 4-- it under the terms of the GNU General Public License as published by
 5-- the Free Software Foundation, version 3 of the License.
 6--
 7-- Liberty Eiffel is distributed in the hope that it will be useful,
 8-- but WITHOUT ANY WARRANTY; without even the implied warranty of
 9-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10-- GNU General Public License for more details.
11--
12-- You should have received a copy of the GNU General Public License
13-- along with Liberty Eiffel.  If not, see <http://www.gnu.org/licenses/>.
14--
15deferred class LIBERTY_ASSIGNMENT
16
17inherit
18   LIBERTY_INSTRUCTION
19
20feature {ANY}
21   writable: LIBERTY_WRITABLE
22   expression: LIBERTY_EXPRESSION
23
24feature {LIBERTY_REACHABLE, LIBERTY_REACHABLE_COLLECTION_MARKER}
25   mark_reachable_code (mark: INTEGER) is
26      do
27         writable.mark_reachable_code(mark)
28         expression.mark_reachable_code(mark)
29      end
30
31feature {}
32   make (a_writable: like writable; a_expression: like expression; a_position: like position) is
33      require
34         a_writable /= Void
35         a_expression /= Void
36         a_position /= Void
37      do
38         writable := a_writable
39         expression := a_expression
40         position := a_position
41      ensure
42         writable = a_writable
43         expression = a_expression
44         position = a_position
45      end
46
47invariant
48   writable /= Void
49   expression /= Void
50
51end