work in progress | string |
OPTION "A":
count: INTEGER -- Number of characters making up the string.OPTION "B":
count: INTEGER -- Number of characters.
- Strongly prefer option A
- steinman@sco.edu
- Prefer option A
- chcouder@mail.club-internet.fr
- jeff.clark@metaphasetech.com
- joachim.durchholz@halstenbach.de
- Prefer option B
- sergei_ivanov@object-tools.com
- icalvo@iname.com
- dougpardee@ureach.com
- xavier@halstenbach.com
- manus@eiffel.com
- franck.arnaud@omgroup.com
- ericb@gobosoft.com
- saunders@wchat.on.ca
- jweirich@one.net
- todd.king@nexthr.com
- richieb@netlabs.net
- Ulrich Windl (by email)
- Don't mind (happy either way)
- kwaxer@aha.ru
valid_index (i: INTEGER): BOOLEAN -- Is 'i' within the bounds of the string? ensure definition: Result = (1 <= i and i <= count)
- Strongly accept the proposal - steinman@sco.edu - Accept the proposal - chcouder@mail.club-internet.fr - joachim.durchholz@halstenbach.de - ericb@gobosoft.com - sergei_ivanov@object-tools.com - icalvo@iname.com - dougpardee@ureach.com - kwaxer@aha.ru - jeff.clark@metaphasetech.com - xavier@halstenbach.com - manus@eiffel.com - jweirich@one.net - todd.king@nexthr.com - richieb@netlabs.net - Ulrich Windl (by email)
item (i: INTEGER): CHARACTER -- Character at index 'i' require valid_index: valid_index (i) infix "@" (i: INTEGER): CHARACTER -- Character at index 'i' require valid_index: valid_index (i) ensure definition: Result = item (i)
- Accept the proposal
- chcouder@mail.club-internet.fr
- joachim.durchholz@halstenbach.de
- ericb@gobosoft.com
- icalvo@iname.com
- kwaxer@aha.ru
- jeff.clark@metaphasetech.com
- xavier@halstenbach.com
- manus@eiffel.com
- steinman@sco.edu
- jweirich@one.net
- todd.king@nexthr.com
- richieb@netlabs.net
- Ulrich Windl (by email)
OPTION "A": ensure substring_not_void: Result /= Void substring_count: Result.count = end_index - start_index + 1 first_item: Result.count > 0 implies Result.item (1) = item (start_index) recurse: Result.count > 0 implies Result.substring(2, Result.count).is_equal( substring(start_index + 1, end_index)) OPTION "B": ensure result_not_void: Result /= Void result_count: Result.count = end_index - start_index + 1 first_item: Result.count > 0 implies Result.item (1) = item (start_index) recurse: Result.count > 0 implies Result.substring(2, Result.count).is_equal( substring(start_index + 1, end_index))
- Prefer option "A"
- franck.arnaud@omgroup.com
- jweirich@one.net
- peter@deakin.edu.au
- joachim.durchholz@halstenbach.de
- wagner@ti.uni-trier.de
- saunders@wchat.on.ca
- ericb@gobosoft.com
- Scott Steinman (by email)
- Prefer option "B"
- kwaxer@aha.ru
- sparker@eiffel.ie
- todd.king@nexthr.com
- jeff.clark@metaphasetech.com
- Ulrich Windl (by email)
- Don't mind (happy either way)
- manus@eiffel.com
- richieb@netlabs.net
put (c: CHARACTER; i: INTEGER) -- Replace character at index 'i' by 'c'. require valid_index: valid_index (i) ensure stable_count: count = old count replaced: item (i) = c stable_before_i: substring (1, i - 1).is_equal (old substring (1, i - 1)) stable_after_i: substring (i + 1, count).is_equal (old substring (i + 1, count))
- Strongly accept this proposal
- peter@deakin.edu.au
- Accept this proposal
- manus@eiffel.com
- dougpardee@ureach.com
- wagner@ti.uni-trier.de
- icalvo@iname.com
- jweirich@one.net
- franck.arnaud@omgroup.com
- joachim.durchholz@halstenbach.de
- ericb@gobosoft.com
- genepi@sympatico.ca
- kwaxer@aha.ru
- sparker@eiffel.ie
- xavier@halstenbach.com
- saunders@wchat.on.ca
- steinman@sco.edu
- Ulrich Windl (by email)
- Don't mind (happy either way)
- todd.king@nexthr.com
is_equal (other: like Current): BOOLEAN -- Do both strings have the same character sequence? -- (Redefined from GENERAL.) require -- from GENERAL other_not_void: other /= Void ensure -- from GENERAL consistent: standard_is_equal (other) implies Result; same_type: Result implies same_type (other); symmetric: Result implies other.is_equal (Current) ensure then definition: Result = (same_type (other) and then count = other.count and then (count > 0 implies (item (1) = other.item (1) and substring (2, count).is_equal (other.substring (2, count)))))
- Accept the proposal
- wagner@ti.uni-trier.de
- peter@deakin.edu.au
- joachim.durchholz@halstenbach.de
- jeff.clark@metaphasetech.com
- icalvo@iname.com
- sparker@eiffel.ie
- ericb@gobosoft.com
- manus@eiffel.com
- richieb@netlabs.net
- saunders@wchat.on.ca
copy (other: like Current) -- Reinitialize by copying the characters of other. -- (This is also used by clone.) -- (From GENERAL.) require -- from GENERAL other_not_void: other /= Void type_identity: same_type (other) ensure -- from GENERAL is_equal: is_equal (other)
- Accept the proposal
- jweirich@one.net
- peter@deakin.edu.au
- manus@eiffel.com
- saunders@wchat.on.ca
- franck.arnaud@omgroup.com
- kwaxer@aha.ru
- ericb@gobosoft.com
- joachim.durchholz@halstenbach.de
- todd.king@nexthr.com
- steinman@sco.edu
- jeff.clark@metaphasetech.com
- sparker@eiffel.ie
- xavier@halstenbach.com
is_empty: BOOLEAN -- Is string empty? ensure definition: Result = (count = 0)
- Accept the proposal
- manus@eiffel.com
- jeff.clark@metaphasetech.com
- xavier@halstenbach.com
- franck.arnaud@omgroup.com
- jweirich@one.net
- ericb@gobosoft.com
- todd.king@nexthr.com
- genepi@sympatico.ca
- saunders@wchat.on.ca
- jcm@rh.edu
- peter@deakin.edu.au
- kwaxer@aha.ru
- sparker@eiffel.ie
hash_code: INTEGER -- Hash code value (vendor dependent hashing function). ensure -- from HASHABLE good_hash_value: Result >= 0
- Accept the proposal
- jeff.clark@metaphasetech.com
- xavier@halstenbach.com
- franck.arnaud@omgroup.com
- jweirich@one.net
- ericb@gobosoft.com
- manus@eiffel.com
- todd.king@nexthr.com
- genepi@sympatico.ca
- jcm@rh.edu
- peter@deakin.edu.au
- kwaxer@aha.ru
- sparker@eiffel.ie
out: STRING -- New string containing terse printable representation -- of current object. ensure out_not_void: Result /= Void same_items: Result.same_type (Current) implies Result.is_equal (Current)
- Accept this proposal
- jweirich@one.net
- sparker@eiffel.ie
- ericb@gobosoft.com
- jcm@rh.edu
- saunders@wchat.on.ca
- jeff.clark@metaphasetech.com
- peter@deakin.edu.au
- wagner@ti.uni-trier.de
- Dave Martin (by email)
- Alexander Kogtenkov (by email)
- Don't mind (happy either way)
- joachim.durchholz@halstenbach.de
new_string: Result /= Current
- Strongly accept this proposal
- wagner@ti.uni-trier.de
- Dave Martin (by email)
- Accept this proposal
- ericb@gobosoft.com
- jeff.clark@metaphasetech.com
- peter@deakin.edu.au
- Alexander Kogtenkov (by email)
- Reject this proposal
- jweirich@one.net
- sparker@eiffel.ie
- joachim.durchholz@halstenbach.de
- jcm@rh.edu
- saunders@wchat.on.ca
- Prefer 'fill'
- jweirich@one.net
- kwaxer@aha.ru
- Prefer 'fill_with'
- steinman@sco.edu
- ericb@gobosoft.com
- todd.king@nexthr.com
- saunders@wchat.on.ca
- joachim.durchholz@halstenbach.de
- peter@deakin.edu.au
- manus@eiffel.com
- gmc333@my-deja.com
- Strongly prefer 'fill_with'
- jeff.clark@metaphasetech.com
- wagner@ti.uni-trier.de
- Don't mind (happy either way)
- colnet@loria.fr
- Strongly prefer "0"
- wagner@ti.uni-trier.de
- todd.king@nexthr.com
- jeff.clark@metaphasetech.com
- saunders@wchat.on.ca
- joachim.durchholz@halstenbach.de
- Prefer "0"
- sparker@eiffel.ie
- franck.arnaud@omgroup.com
- nozone@sbox.tu-graz.ac.at
- xxiii@cyberdude.com
- kwaxer@aha.ru
- Prefer "count + 1"
- ericb@gobosoft.com
- jcm@rh.edu
- Don't mind (happy either way)
- icalvo@iname.com
- jweirich@one.net
- peter@deakin.edu.au
- gmc333@my-deja.com
- Strongly accept the proposal
- wagner@ti.uni-trier.de
- Accept the proposal
- franck@nenie.org
- sparker@eiffel.ie
- saunders@wchat.on.ca
- xxiii@cyberdude.com
- ericb@gobosoft.com
- jweirich@one.net
- peter@deakin.edu.au
- gmc333@my-deja.com
- Reject the proposal
- joachim.durchholz@halstenbach.de
- todd.king@nexthr.com
- manus@eiffel.com
- Accept the proposal
- wagner@ti.uni-trier.de
- saunders@wchat.on.ca
- jeff.clark@metaphasetech.com
- jweirich@one.net
- ericb@gobosoft.com
- peter@deakin.edu.au
- xxiii@cyberdude.com
- todd.king@nexthr.com
- Simon Parker (by email)
- Accept the proposal
- wagner@ti.uni-trier.de
- saunders@wchat.on.ca
- jeff.clark@metaphasetech.com
- jweirich@one.net
- ericb@gobosoft.com
- peter@deakin.edu.au
- xxiii@cyberdude.com
- Simon Parker (by email)
- Don't mind (happy either way)
- todd.king@nexthr.com
- Accept the proposal
- wagner@ti.uni-trier.de
- saunders@wchat.on.ca
- jeff.clark@metaphasetech.com
- jweirich@one.net
- ericb@gobosoft.com
- peter@deakin.edu.au
- xxiii@cyberdude.com
- Simon Parker (by email)
- Don't mind (happy either way)
- todd.king@nexthr.com
- Accept the proposal
- jcm@rh.edu
- ericb@gobosoft.com
- sparker@eiffel.ie
- nozone@sbox.tu-graz.ac.at
- icalvo@iname.com
- franck@nenie.org
- Strongly accept the proposal
- genepi@sympatico.ca
- saunders@wchat.on.ca
- arno.wagner@acm.org
- Don't mind (happy either way)
- manus@eiffel.com
- todd.king@nexthr.com
- Reject the proposal
- xxiii@cyberdude.com
- peter@deakin.edu.au
- kwaxer@aha.ru
- Ulrich Windl (by email)
- Strongly accept the proposal
- icalvo@iname.com
- Accept the proposal
- saunders@wchat.on.ca
- manus@eiffel.com
- peter@deakin.edu.au
- ericb@gobosoft.com
- kwaxer@aha.ru
- arno.wagner@acm.org
- sparker@eiffel.ie
- Accept the proposal
- saunders@wchat.on.ca
- manus@eiffel.com
- sparker@eiffel.ie
- icalvo@iname.com
- ericb@gobosoft.com
- peter@deakin.edu.au
- xxiii@cyberdude.com
- kwaxer@aha.ru
- jcm@rh.edu
- todd.king@nexthr.com
- arno.wagner@acm.org
- Accept the proposal
- ericb@gobosoft.com
- saunders@wchat.on.ca
- kwaxer@aha.ru
- jcm@rh.edu
- todd.king@nexthr.com
- icalvo@iname.com
- manus@eiffel.com
- xavier@halstenbach.com
- franck@nenie.org
- Peter Horan (by email)
- Accept the proposal
- manus@eiffel.com
- arno.wagner@acm.org
- franck@nenie.org
- jweirich@one.net
- ericb@gobosoft.com
- saunders@wchat.on.ca
- xavier@halstenbach.com
- peter@deakin.edu.au
- kwaxer@aha.ru
- sparker@eiffel.ie
- icalvo@iname.com
- Accept the proposal
- manus@eiffel.com
- arno.wagner@acm.org
- franck@nenie.org
- jweirich@one.net
- ericb@gobosoft.com
- saunders@wchat.on.ca
- xavier@halstenbach.com
- peter@deakin.edu.au
- kwaxer@aha.ru
- sparker@eiffel.ie
- icalvo@iname.com
- Strongly accept the proposal
- jeff.clark@metaphasetech.com
- Accept the proposal
- icalvo@iname.com
- todd.king@nexthr.com
- saunders@wchat.on.ca
- arno.wagner@acm.org
- Ulrich Windl (by email)
- Reject the proposal
- kwaxer@aha.ru
- xavier@halstenbach.com
- jweirich@one.net
- Strongly reject the proposal
- sparker@eiffel.ie
- Don't mind (happy either way)
- ericb@gobosoft.com
- manus@eiffel.com
- Abstain (not happy either way)
- peter@deakin.edu.au
- franck@nenie.org
- Strongly accept the proposal
- arno.wagner@acm.org
- Accept the proposal
- jweirich@one.net
- jeff.clark@metaphasetech.com
- todd.king@nexthr.com
- ericb@gobosoft.com
- sparker@eiffel.ie
- saunders@wchat.on.ca
- franck@nenie.org
- peter@deakin.edu.au
- Don't mind (happy either way)
- kwaxer@aha.ru
- manus@eiffel.com
- Strongly accept the proposal
- arno.wagner@acm.org
- usander@online.de
- Accept the proposal
- jeff.clark@metaphasetech.com
- kwaxer@aha.ru
- franck@nenie.org
- saunders@wchat.on.ca
- icalvo@iname.com
- todd.king@nexthr.com
- manus@eiffel.com
- peter@deakin.edu.au
- beleg@mailru.com
- Ulrich Windl (by email)
- Don't mind (happy either way)
- ericb@gobosoft.com
- Strongly accept the proposal
- franck@nenie.org
- Accept the proposal
- jcm@rh.edu
- peter@deakin.edu.au
- icalvo@iname.com
- kwaxer@aha.ru
- arno.wagner@acm.org
- todd.king@nexthr.com
- Reject the proposal
- usander@online.de
- Don't mind (happy either way)
- manus@eiffel.com
- beleg@mailru.com
- saunders@wchat.on.ca
- jweirich@one.net
- ericb@gobosoft.com
- Abstain (not happy either way)
- jeff.clark@metaphasetech.com
- Strongly accept the proposal
- usander@online.de
- Accept the proposal
- arno.wagner@acm.org
- chcouder@club-internet.fr
- xavier@halstenbach.com
- richieb@netlabs.net
- saunders@wchat.on.ca
- ericb@gobosoft.com
- sparker@eiffel.ie
- gmc333@my-deja.com
- franck@nenie.org
- Don't mind (happy either way)
- kwaxer@aha.ru
- Strongly prefer "compatible with current"
- saunders@wchat.on.ca
- gmc333@my-deja.com
- Prefer "compatible with current"
- sparker@eiffel.ie
- Prefer "improved design"
- franck@nenie.org
- beleg@mailru.com
- colnet@loria.fr
- peter@deakin.edu.au
- nick.leaton@csfb.com
- ericb@gobosoft.com
- kwaxer@aha.ru
- xavier@halstenbach.com
- Strongly prefer "improved design"
- johan.boule@online.fr
- arno.wagner@acm.org
- Don't mind (happy either way)
- chcouder@mail.club-internet.fr
(A2) A range check is not included in 'is_integer', but is included in an additional feature (e.g. 'represents_integer' or 'is_convertible_to_integer')
(A3) There is no range check within class STRING
(B1) Applying 'to_integer' to an out-of-range STRING is forbidden by the precondition of 'to_integer'
(B2) Applying 'to_integer' to an out-of-range STRING will cause an exception to be raised
Any "A" option can be combined with any "B" option.
A1B1 Franck Arnaud
A1B1 Arno Wagner
A1B1 Eric Bezault
A1B1 Alexander Kogtenkov
A1B1 Christian Couder
A1B1 Xavier LeVourch
A1B1 Uwe Sander
A2B1 Ulrich Windl
A2B1 Peter Horan
A3B1 Greg Compestine
A3B1 Chris Saunders
A3B2 Simon Parker
- Accept this proposal
- franck@nenie.org
- sparker@eiffel.ie
- ericb@gobosoft.com
- kwaxer@aha.ru
- arno.wagner@acm.org
- usander@online.de
- peter@deakin.edu.au
- Chris Saunders (by email)
- Reject this proposal
- manus@eiffel.com
10 FEBRUARY 2001 VERSION:
to_integer: INTEGER
-- Integer value;
-- for example, when applied to "123",
will yield 123
require
represents_an_integer:
is_integer
ensure
single_digit:
count = 1 implies
result = ("0123456789").index_of(item(1), 1) - 1
minus_sign_followed_by_single_digit:
count = 2 and item(1) = '-' implies
result = -substring(2, 2).to_integer
plus_sign_followed_by_single_digit:
count = 2 and item(1) = '+' implies
result = substring(2, 2).to_integer
recurse_to_reduce_length:
count > 2 or count = 2 and not(("+-").has(item(1))) implies
result // 10 = substring(1, count - 1).to_integer and
(result \\ 10).abs = substring(count, count).to_integer
The PREVIOUS version of 'to_integer' looks like this:
to_integer: INTEGER
-- Integer value;
-- for example, when applied to "123",
will yield 123
require
represents_an_integer:
is_integer
The difference between the previous version and the proposed new
version is that a rigorous postcondition has been added.
Refine feature 'to_integer' according to the 5 FEBRUARY 2001 version.
- Strongly accept the proposal
- usander@online.de
- Accept the proposal
- manus@eiffel.com
- sparker@eiffel.ie
- saunderscj2000@yahoo.com
- gmc333@my-deja.com
- kwaxer@aha.ru
- franck@nenie.org
- arno.wagner@acm.org
- xavier@halstenbach.com
- chcouder@club-internet.fr
- ericb@gobosoft.com
- peter@deakin.edu.au