Known Bugs - 1.6 | ![]() ![]() |
Following is a list of known defects in Gobo Eiffel 1.6 along with eventual bug fixes or workarounds. If you find a bug which does not appear in this list yet, please send me a bug report. I will add the description of this bug here and try to provide a bug fix as soon as possible (usually within one or two days).
1.6-001 Reported by Emmanuel Stapf (11/01/01)
There is a prototype problem with the C functions getenv and putenv when compiling class KL_EXECUTION_ENVIRONMENT ($GOBO/library/kernel/spec/ise/kl_execution_environment.e) in finalized mode with ISE Eiffel 5.0. To fix this problem, delete the features c_getenv and c_putenv and replace the features variable_value and set_variable_value by:
variable_value (a_variable: STRING): STRING is -- Value of environment variable `a_variable'; -- Void if `a_variable' has not been set require a_variable_not_void: a_variable /= Void local environment: expanded EXECUTION_ENVIRONMENT do Result := environment.get (a_variable) endset_variable_value (a_variable, a_value: STRING) is -- Set environment variable `a_variable' to `a_value'. -- (This setting may fail on certain platforms.) require a_variable_not_void: a_variable /= Void a_variable_not_empty: not a_variable.is_empty a_value_not_void: a_value /= Void local environment: expanded EXECUTION_ENVIRONMENT do environment.put (a_value, a_variable) ensure -- (This setting may fail on certain platforms, hence the -- following commented postcondition.) -- variable_set: equal (variable_value (a_variable), a_value) end
1.6-002 Reported by Emmanuel Bouyer (05/02/01)
There is a bug in feature delete of class DS_LINKED_LIST ($GOBO/library/structure/list/ds_linked_list.e). The cursors are not moved off when the list is only made up of occurrences of the argument v. To fix this problem, replace feature delete by:
delete (v: G) is -- Remove all occurrences of `v'. -- (Use `equality_tester''s comparison criterion -- if not void, use `=' criterion otherwise.) -- Move all cursors `off'. -- (Performance: O(count).) local n: INTEGER a_cell, right_cell: like first_cell a_tester: like equality_tester do move_all_cursors_after if not is_empty then a_tester := equality_tester if a_tester /= Void then -- Remove all occurrences of `v' at the beginning -- of the list. from a_cell := first_cell until (a_cell = Void) or else not a_tester.test (a_cell.item, v) loop a_cell := a_cell.right n := n + 1 end if a_cell = Void then -- All items were occurrences of `v'. -- The list becomes empty. first_cell := Void last_cell := Void count := 0 else if n > 0 then -- There was some occurrences of `v' at the -- beginning of the list. Set the new first -- cell of the list accordingly. set_first_cell (a_cell) end -- Remove subsequent occurrences of `v'. right_cell := a_cell.right from until (right_cell = Void) loop if a_tester.test (right_cell.item, v) then right_cell := right_cell.right if right_cell /= Void then a_cell.put_right (right_cell) end n := n + 1 else a_cell := right_cell right_cell := a_cell.right end end if a_cell /= last_cell then -- The last items in the list were occurrences -- of `v'. Set the new last cell of the list -- accordingly. set_last_cell (a_cell) end count := count - n end else -- Use `=' as comparison criterion. -- Remove all occurrences of `v' at the beginning -- of the list. from a_cell := first_cell until (a_cell = Void) or else (a_cell.item /= v) loop a_cell := a_cell.right n := n + 1 end if a_cell = Void then -- All items were occurrences of `v'. -- The list becomes empty. first_cell := Void last_cell := Void count := 0 else if n > 0 then -- There was some occurrences of `v' at the -- beginning of the list. Set the new first -- cell of the list accordingly. set_first_cell (a_cell) end -- Remove subsequent occurrences of `v'. right_cell := a_cell.right from until (right_cell = Void) loop if right_cell.item = v then right_cell := right_cell.right if right_cell /= Void then a_cell.put_right (right_cell) end n := n + 1 else a_cell := right_cell right_cell := a_cell.right end end if a_cell /= last_cell then -- The last items in the list were occurrences -- of `v'. Set the new last cell of the list -- accordingly. set_last_cell (a_cell) end count := count - n end end end end
1.6-003 Reported by Emmanuel Bouyer (05/02/01)
There is a bug in the postcondition of features extend, force and put in class QUEUE ($GOBO/library/structure/base/queue.e). The postcondition tagged item_pushed only applies to stacks and should be removed in class QUEUE:
extend, force (v: G) is -- Add `v' to queue. require extendible: extendible deferred ensure item_inserted: has (v) one_more_occurrence: occurrences (v) = old (occurrences (v)) + 1 endput (v: G) is -- Add `v' to queue. deferred ensure then one_more_occurrence: occurrences (v) = old (occurrences (v)) + 1 end
1.6-004 Reported by Franck Arnaud (22/02/01)
There seems to be a bug in the SmallEiffel compiler when dealing with the following construct:
inspect x else do_something endBut gelex generates such construct when there is no end-of-file rules (i.e. <<EOF>>) specified. To work around this problem gelex should be modified in order to just generate:
do_somethingwhen such a case arises. To apply this patch, the routine print_eof_actions in class LX_GENERATABLE_DFA ($GOBO/library/lexical/generation/lx_generatable_dfa.e) must be replaced by:
print_eof_actions (a_file: like OUTPUT_STREAM_TYPE) is -- Print code for end-of-file actions to `a_file'. require a_file_not_void: a_file /= Void a_file_open_write: OUTPUT_STREAM_.is_open_write (a_file) local i, nb: INTEGER rule: LX_RULE actions: DS_ARRAYED_LIST [DS_PAIR [UT_COMMAND, DS_LINKED_LIST [LX_RULE]]] action: UT_COMMAND j, nb_actions: INTEGER a_pair: DS_PAIR [UT_COMMAND, DS_LINKED_LIST [LX_RULE]] rule_list: DS_LINKED_LIST [LX_RULE] rule_cursor: DS_LINKED_LIST_CURSOR [LX_RULE] do a_file.put_string ("%Tyy_execute_eof_action (yy_sc: INTEGER) is%N% %%T%T%T-- Execute EOF semantic action.%N%T%Tdo%N") if pre_eof_action_used then a_file.put_string ("%T%T%Tpre_eof_action%N") end from i := yy_eof_rules.lower nb := yy_eof_rules.upper !! actions.make (yy_eof_rules.count) until i > nb loop rule := yy_eof_rules.item (i) if rule /= Void then action := rule.action from j := 1 nb_actions := actions.count until j > nb_actions or else actions.item (j).first = action loop j := j + 1 end if j <= nb_actions then rule_list := actions.item (j).second else !! rule_list.make !! a_pair.make (action, rule_list) actions.put_last (a_pair) end rule_list.put_last (rule) end i := i + 1 end nb_actions := actions.count if nb_actions > 0 then a_file.put_string ("%T%T%Tinspect yy_sc%N") from j := 1 until j > nb_actions loop rule_list := actions.item (j).second from rule_cursor := rule_list.new_cursor rule_cursor.start rule := rule_cursor.item a_file.put_string ("when ") a_file.put_integer (rule.id) rule_cursor.forth until rule_cursor.after loop a_file.put_string (", ") a_file.put_integer (rule_cursor.item.id) rule_cursor.forth end a_file.put_string (" then%N") a_file.put_string ("--|#line ") a_file.put_integer (rule.line_nb) a_file.put_character ('%N') a_file.put_string (rule.action.out) a_file.put_character ('%N') j := j + 1 end a_file.put_string ("%T%T%Telse%N% %%T%T%T%Tterminate%N% %%T%T%Tend%N") else a_file.put_string ("%T%T%Tterminate%N") end if post_eof_action_used then a_file.put_string ("%T%T%Tpost_eof_action%N") end a_file.put_string ("%T%Tend%N") end
Copyright © 1999-2001, Eric
Bezault mailto:ericb@gobosoft.com http://www.gobosoft.com Last Updated: 24 February 2001 |
![]() ![]() ![]() ![]() |