PageRenderTime 11ms CodeModel.GetById 8ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/src/lib/backtracking/node/backtracking_node_binary.e

http://github.com/tybor/Liberty
Specman e | 82 lines | 45 code | 9 blank | 28 comment | 0 complexity | 22f6e4a5f86383828df8a2f1838e7d24 MD5 | raw file
 1-- This file is part of a Liberty Eiffel library.
 2-- See the full copyright at the end.
 3--
 4deferred class BACKTRACKING_NODE_BINARY
 5   --
 6   -- Node for a sequence of 2 nodes
 7   --
 8
 9inherit
10   BACKTRACKING_NODE
11      undefine
12         fill_tagged_out_memory
13      end
14
15insert
16   BACKTRACKING_NODE_FILL
17
18feature {ANY}
19   first: BACKTRACKING_NODE
20         -- first node of the sequence
21
22   second: BACKTRACKING_NODE
23         -- second node of the sequence
24
25   make (frst, scnd: BACKTRACKING_NODE)
26      require
27         first_not_void: frst /= Void
28         second_not_void: scnd /= Void
29      do
30         first := frst
31         second := scnd
32      ensure
33         definition: first = frst and second = scnd
34         first_not_void: first /= Void
35         second_not_void: second /= Void
36      end
37
38   set_first (value: BACKTRACKING_NODE)
39      require
40         value_not_void: value /= Void
41      do
42         first := value
43      ensure
44         definition: first = value
45         first_not_void: first /= Void
46      end
47
48   set_second (value: BACKTRACKING_NODE)
49      require
50         value_not_void: value /= Void
51      do
52         second := value
53      ensure
54         definition: second = value
55         second_not_void: second /= Void
56      end
57
58invariant
59   first_not_void: first /= Void
60   second_not_void: second /= Void
61
62end -- class BACKTRACKING_NODE_BINARY
63--
64-- Copyright (C) 2009-2017: by all the people cited in the AUTHORS file.
65--
66-- Permission is hereby granted, free of charge, to any person obtaining a copy
67-- of this software and associated documentation files (the "Software"), to deal
68-- in the Software without restriction, including without limitation the rights
69-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
70-- copies of the Software, and to permit persons to whom the Software is
71-- furnished to do so, subject to the following conditions:
72--
73-- The above copyright notice and this permission notice shall be included in
74-- all copies or substantial portions of the Software.
75--
76-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
77-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
78-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
79-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
80-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
81-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
82-- THE SOFTWARE.