Automatic generation produced by ISE Eiffel

Classes Clusters Cluster hierarchy Chart Relations Flat contracts Go to:
note description: "Partially deterministic finite state automata." class interface PDFA create make (n, i: INTEGER_32) -- Make a PDFA with n states, and i + 1 inputs. feature -- Access Ack: INTEGER_32 = 6 -- (from ASCII) Ampersand: INTEGER_32 = 38 -- (from ASCII) Back_space: INTEGER_32 = 8 -- (from ASCII) Backslash: INTEGER_32 = 92 -- (from ASCII) Bar: INTEGER_32 = 124 -- (from ASCII) Bel: INTEGER_32 = 7 -- (from ASCII) Blank: INTEGER_32 = 32 -- (from ASCII) Break: INTEGER_32 = -7 -- (from ASCII) Bs: INTEGER_32 = 8 -- (from ASCII) Buf_overflow: INTEGER_32 = -9 -- (from ASCII) Can: INTEGER_32 = 24 -- (from ASCII) Carriage_return: INTEGER_32 = 13 -- (from ASCII) Case_diff: INTEGER_32 = 32 -- `lower_a` - `upper_a` -- (from ASCII) Character_set_size: INTEGER_32 = 128 -- (from ASCII) Circumflex: INTEGER_32 = 94 -- (from ASCII) Closing_brace: INTEGER_32 = 125 -- (from ASCII) Colon: INTEGER_32 = 58 -- (from ASCII) Comma: INTEGER_32 = 44 -- (from ASCII) Commercial_at: INTEGER_32 = 64 -- (from ASCII) Cr: INTEGER_32 = 13 -- (from ASCII) Ctrl_a: INTEGER_32 = 1 -- (from ASCII) Ctrl_b: INTEGER_32 = 2 -- (from ASCII) Ctrl_backslash: INTEGER_32 = 28 -- (from ASCII) Ctrl_c: INTEGER_32 = 3 -- (from ASCII) Ctrl_circumflex: INTEGER_32 = 30 -- (from ASCII) Ctrl_d: INTEGER_32 = 4 -- (from ASCII) Ctrl_e: INTEGER_32 = 5 -- (from ASCII) Ctrl_f: INTEGER_32 = 6 -- (from ASCII) Ctrl_g: INTEGER_32 = 7 -- (from ASCII) Ctrl_h: INTEGER_32 = 8 -- (from ASCII) Ctrl_i: INTEGER_32 = 9 -- (from ASCII) Ctrl_j: INTEGER_32 = 10 -- (from ASCII) Ctrl_k: INTEGER_32 = 11 -- (from ASCII) Ctrl_l: INTEGER_32 = 12 -- (from ASCII) Ctrl_lbracket: INTEGER_32 = 27 -- (from ASCII) Ctrl_m: INTEGER_32 = 13 -- (from ASCII) Ctrl_n: INTEGER_32 = 14 -- (from ASCII) Ctrl_o: INTEGER_32 = 15 -- (from ASCII) Ctrl_p: INTEGER_32 = 16 -- (from ASCII) Ctrl_q: INTEGER_32 = 17 -- (from ASCII) Ctrl_questmark: INTEGER_32 = 127 -- (from ASCII) Ctrl_r: INTEGER_32 = 18 -- (from ASCII) Ctrl_rbracket: INTEGER_32 = 29 -- (from ASCII) Ctrl_s: INTEGER_32 = 19 -- (from ASCII) Ctrl_t: INTEGER_32 = 20 -- (from ASCII) Ctrl_u: INTEGER_32 = 21 -- (from ASCII) Ctrl_underlined: INTEGER_32 = 31 -- (from ASCII) Ctrl_v: INTEGER_32 = 22 -- (from ASCII) Ctrl_w: INTEGER_32 = 23 -- (from ASCII) Ctrl_x: INTEGER_32 = 24 -- (from ASCII) Ctrl_y: INTEGER_32 = 25 -- (from ASCII) Ctrl_z: INTEGER_32 = 26 -- (from ASCII) Dc1: INTEGER_32 = 17 -- (from ASCII) Dc2: INTEGER_32 = 18 -- (from ASCII) Dc3: INTEGER_32 = 19 -- (from ASCII) Dc4: INTEGER_32 = 20 -- (from ASCII) Del: INTEGER_32 = 127 -- (from ASCII) dfa: detachable FIXED_DFA -- DFA built by routine construct_dfa, -- which recognizes the same language. -- (from NDFA) Dle: INTEGER_32 = 16 -- (from ASCII) Dollar: INTEGER_32 = 36 -- (from ASCII) Dot: INTEGER_32 = 46 -- (from ASCII) Doublequote: INTEGER_32 = 34 -- (from ASCII) Down_arrow: INTEGER_32 = -3 -- (from ASCII) Eight: INTEGER_32 = 56 -- (from ASCII) Em: INTEGER_32 = 25 -- (from ASCII) Enq: INTEGER_32 = 5 -- (from ASCII) Eot: INTEGER_32 = 4 -- (from ASCII) Equal_sign: INTEGER_32 = 61 -- (from ASCII) Esc: INTEGER_32 = 27 -- (from ASCII) Etb: INTEGER_32 = 23 -- (from ASCII) Etx: INTEGER_32 = 3 -- (from ASCII) Exclamation: INTEGER_32 = 33 -- (from ASCII) First_printable: INTEGER_32 = 32 -- (from ASCII) Five: INTEGER_32 = 53 -- (from ASCII) Four: INTEGER_32 = 52 -- (from ASCII) Fs: INTEGER_32 = 28 -- (from ASCII) generating_type: TYPE [detachable PDFA] -- Type of current object -- (type of which it is a direct instance) -- (from ANY) ensure -- from ANY generating_type_not_void: Result /= Void generator: STRING_8 -- Name of current object's generating class -- (base class of the type of which it is a direct instance) -- (from ANY) ensure -- from ANY generator_not_void: Result /= Void generator_not_empty: not Result.is_empty Grave_accent: INTEGER_32 = 96 -- (from ASCII) Greaterthan: INTEGER_32 = 62 -- (from ASCII) greatest_input: INTEGER_32 -- Greatest input used for the transitions from state -- to state (the smallest one is zero) -- (from AUTOMATON) Gs: INTEGER_32 = 29 -- (from ASCII) has_letters: BOOLEAN -- Are there any letters among the active transitions? Home_arrow: INTEGER_32 = -6 -- (from ASCII) Ht: INTEGER_32 = 9 -- (from ASCII) Last_ascii: INTEGER_32 = 127 -- (from ASCII) Last_printable: INTEGER_32 = 126 -- (from ASCII) Lbracket: INTEGER_32 = 91 -- (from ASCII) Lcurly: INTEGER_32 = 40 -- (from ASCII) Left_arrow: INTEGER_32 = -4 -- (from ASCII) Lessthan: INTEGER_32 = 60 -- (from ASCII) Letter_layout: INTEGER_32 = 70 -- (from ASCII) Line_feed: INTEGER_32 = 10 -- (from ASCII) Lower_a: INTEGER_32 = 97 -- (from ASCII) Lower_b: INTEGER_32 = 98 -- (from ASCII) Lower_c: INTEGER_32 = 99 -- (from ASCII) Lower_d: INTEGER_32 = 100 -- (from ASCII) Lower_e: INTEGER_32 = 101 -- (from ASCII) Lower_f: INTEGER_32 = 102 -- (from ASCII) Lower_g: INTEGER_32 = 103 -- (from ASCII) Lower_h: INTEGER_32 = 104 -- (from ASCII) Lower_i: INTEGER_32 = 105 -- (from ASCII) Lower_j: INTEGER_32 = 106 -- (from ASCII) Lower_k: INTEGER_32 = 107 -- (from ASCII) Lower_l: INTEGER_32 = 108 -- (from ASCII) Lower_m: INTEGER_32 = 109 -- (from ASCII) Lower_n: INTEGER_32 = 110 -- (from ASCII) Lower_o: INTEGER_32 = 111 -- (from ASCII) Lower_p: INTEGER_32 = 112 -- (from ASCII) Lower_q: INTEGER_32 = 113 -- (from ASCII) Lower_r: INTEGER_32 = 114 -- (from ASCII) Lower_s: INTEGER_32 = 115 -- (from ASCII) Lower_t: INTEGER_32 = 116 -- (from ASCII) Lower_u: INTEGER_32 = 117 -- (from ASCII) Lower_v: INTEGER_32 = 118 -- (from ASCII) Lower_w: INTEGER_32 = 119 -- (from ASCII) Lower_x: INTEGER_32 = 120 -- (from ASCII) Lower_y: INTEGER_32 = 121 -- (from ASCII) Lower_z: INTEGER_32 = 122 -- (from ASCII) Minus: INTEGER_32 = 45 -- (from ASCII) Nak: INTEGER_32 = 21 -- (from ASCII) Nine: INTEGER_32 = 57 -- (from ASCII) Nl: INTEGER_32 = 10 -- (from ASCII) Np: INTEGER_32 = 12 -- (from ASCII) Nul: INTEGER_32 = 0 -- (from ASCII) Number_sign: INTEGER_32 = 35 -- (from ASCII) One: INTEGER_32 = 49 -- (from ASCII) Opening_brace: INTEGER_32 = 123 -- (from ASCII) Overflow: INTEGER_32 = -8 -- (from ASCII) Percent: INTEGER_32 = 37 -- (from ASCII) Plus: INTEGER_32 = 43 -- (from ASCII) Questmark: INTEGER_32 = 63 -- (from ASCII) Rbracket: INTEGER_32 = 93 -- (from ASCII) Rcurly: INTEGER_32 = 41 -- (from ASCII) Right_arrow: INTEGER_32 = -5 -- (from ASCII) Rs: INTEGER_32 = 30 -- (from ASCII) Semicolon: INTEGER_32 = 59 -- (from ASCII) Seven: INTEGER_32 = 55 -- (from ASCII) Si: INTEGER_32 = 15 -- (from ASCII) Singlequote: INTEGER_32 = 39 -- (from ASCII) Six: INTEGER_32 = 54 -- (from ASCII) Slash: INTEGER_32 = 47 -- (from ASCII) So: INTEGER_32 = 14 -- (from ASCII) Soh: INTEGER_32 = 1 -- (from ASCII) Sp: INTEGER_32 = 32 -- (from ASCII) Star: INTEGER_32 = 42 -- (from ASCII) start_number: INTEGER_32 -- Unique start state used for the beginning of -- the automaton's operation -- (from AUTOMATON) Stx: INTEGER_32 = 2 -- (from ASCII) Sub: INTEGER_32 = 26 -- (from ASCII) Syn: INTEGER_32 = 22 -- (from ASCII) Tabulation: INTEGER_32 = 9 -- (from ASCII) Three: INTEGER_32 = 51 -- (from ASCII) Tilde: INTEGER_32 = 126 -- (from ASCII) Two: INTEGER_32 = 50 -- (from ASCII) Underlined: INTEGER_32 = 95 -- (from ASCII) Up_arrow: INTEGER_32 = -2 -- (from ASCII) Upper_a: INTEGER_32 = 65 -- (from ASCII) Upper_b: INTEGER_32 = 66 -- (from ASCII) Upper_c: INTEGER_32 = 67 -- (from ASCII) Upper_d: INTEGER_32 = 68 -- (from ASCII) Upper_e: INTEGER_32 = 69 -- (from ASCII) Upper_f: INTEGER_32 = 70 -- (from ASCII) Upper_g: INTEGER_32 = 71 -- (from ASCII) Upper_h: INTEGER_32 = 72 -- (from ASCII) Upper_i: INTEGER_32 = 73 -- (from ASCII) Upper_j: INTEGER_32 = 74 -- (from ASCII) Upper_k: INTEGER_32 = 75 -- (from ASCII) Upper_l: INTEGER_32 = 76 -- (from ASCII) Upper_m: INTEGER_32 = 77 -- (from ASCII) Upper_n: INTEGER_32 = 78 -- (from ASCII) Upper_o: INTEGER_32 = 79 -- (from ASCII) Upper_p: INTEGER_32 = 80 -- (from ASCII) Upper_q: INTEGER_32 = 81 -- (from ASCII) Upper_r: INTEGER_32 = 82 -- (from ASCII) Upper_s: INTEGER_32 = 83 -- (from ASCII) Upper_t: INTEGER_32 = 84 -- (from ASCII) Upper_u: INTEGER_32 = 85 -- (from ASCII) Upper_v: INTEGER_32 = 86 -- (from ASCII) Upper_w: INTEGER_32 = 87 -- (from ASCII) Upper_x: INTEGER_32 = 88 -- (from ASCII) Upper_y: INTEGER_32 = 89 -- (from ASCII) Upper_z: INTEGER_32 = 90 -- (from ASCII) Us: INTEGER_32 = 31 -- (from ASCII) Vt: INTEGER_32 = 11 -- (from ASCII) Zero: INTEGER_32 = 48 -- (from ASCII) feature -- Measurement nb_states: INTEGER_32 -- Number of states in the automaton -- (from AUTOMATON) feature -- Comparison frozen deep_equal (a: detachable ANY; b: like arg #1): BOOLEAN -- Are a and b either both void -- or attached to isomorphic object structures? -- (from ANY) ensure -- from ANY instance_free: class shallow_implies_deep: standard_equal (a, b) implies Result both_or_none_void: (a = Void) implies (Result = (b = Void)) same_type: (Result and (a /= Void)) implies (b /= Void and then a.same_type (b)) symmetric: Result implies deep_equal (b, a) frozen equal (a: detachable ANY; b: like arg #1): BOOLEAN -- Are a and b either both void or attached -- to objects considered equal? -- (from ANY) ensure -- from ANY instance_free: class definition: Result = (a = Void and b = Void) or else ((a /= Void and b /= Void) and then a.is_equal (b)) frozen is_deep_equal alias "≡≡≡" (other: PDFA): BOOLEAN -- Are Current and other attached to isomorphic object structures? -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY shallow_implies_deep: standard_is_equal (other) implies Result same_type: Result implies same_type (other) symmetric: Result implies other.is_deep_equal (Current) is_equal (other: like Current): BOOLEAN -- Is other attached to an object considered -- equal to current object? require -- from ANY other_not_void: other /= Void ensure -- from ANY symmetric: Result implies other ~ Current consistent: standard_is_equal (other) implies Result frozen standard_equal (a: detachable ANY; b: like arg #1): BOOLEAN -- Are a and b either both void or attached to -- field-by-field identical objects of the same type? -- Always uses default object comparison criterion. -- (from ANY) ensure -- from ANY instance_free: class definition: Result = (a = Void and b = Void) or else ((a /= Void and b /= Void) and then a.standard_is_equal (b)) frozen standard_is_equal alias "" (other: PDFA): BOOLEAN -- Is other attached to an object of the same type -- as current object, and field-by-field identical to it? -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY same_type: Result implies same_type (other) symmetric: Result implies other.standard_is_equal (Current) feature -- Status report conforms_to (other: ANY): BOOLEAN -- Does type of current object conform to type -- of other (as per Eiffel: The Language, chapter 13)? -- (from ANY) require -- from ANY other_not_void: other /= Void same_type (other: ANY): BOOLEAN -- Is type of current object identical to type of other? -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY definition: Result = (conforms_to (other) and other.conforms_to (Current)) feature -- Status setting set_e_transition (source, target: INTEGER_32) -- Set epsilon transition from source to target. require -- from NDFA source_in_automaton: source >= 1 and source <= nb_states target_in_automaton: target >= 1 and target <= nb_states set_final (s, r: INTEGER_32) -- Make s the final state of regular expression r. set_letters -- Direct the active transitions to include letters. set_start (n: INTEGER_32) -- Select state n as the starting state. -- (from AUTOMATON) require -- from AUTOMATON no_other_start: start_number = 0 or start_number = n is_in_automaton: n <= nb_states and n >= 1 set_transition (source, input_doc, target: INTEGER_32) -- Set transition from source to target on input_doc. require -- from AUTOMATON True require else -- from NDFA source_in_automaton: source >= 1 and source <= nb_states target_in_automaton: target >= 1 and target <= nb_states possible_input_doc: input_doc >= 0 and input_doc <= greatest_input require else source_in_automaton: source >= 1 and source <= nb_states target_in_automaton: target >= 1 and target <= nb_states possible_input_doc: input_doc >= 0 and input_doc <= greatest_input good_successor: target = source + 1 feature -- Element change add_keyword (word: STRING_8) -- Insert word in the keyword list. include (fa: PDFA; shift: INTEGER_32) -- Copy fa with state numbers shifted -- by shift positions in the transitions. -- Do not preserve the final values. require same_inputs: greatest_input = fa.greatest_input nb_states_large_enough: nb_states >= fa.nb_states + shift put (v: like item; i: INTEGER_32) -- Replace i-th entry, if in index interval, by v. require valid_index: i >= 1 and i <= nb_states remove_case_sensitiveness -- Remove case sensitiveness. require z_possible: greatest_input >= Lower_z feature -- Removal delete_transition (source, input_doc, target: INTEGER_32) -- Delete transition from source to target on input_doc. require -- from NDFA source_in_automaton: source >= 1 and source <= nb_states target_in_automaton: target >= 1 and target <= nb_states possible_input_doc: input_doc >= 0 and input_doc <= greatest_input require else source_in_automaton: source >= 1 and source <= nb_states target_in_automaton: target >= 1 and target <= nb_states possible_input_doc: input_doc >= 0 and input_doc <= greatest_input good_successor: target = source + 1 feature -- Transformation construct_dfa -- Create an equivalent deterministic finite automaton. -- (from NDFA) require -- from NDFA start_number_designated: start_number > 0 ensure -- from NDFA sets_list_attached: sets_list /= Void set_tree_attached: set_tree /= Void feature -- Duplication copy (other: like Current) -- Update current object using fields of object attached -- to other, so as to yield equal objects. require -- from ANY other_not_void: other /= Void type_identity: same_type (other) ensure -- from ANY is_equal: Current ~ other frozen deep_copy (other: PDFA) -- Effect equivalent to that of: -- `copy` (other . `deep_twin`) -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY deep_equal: deep_equal (Current, other) frozen deep_twin: PDFA -- New object structure recursively duplicated from Current. -- (from ANY) ensure -- from ANY deep_twin_not_void: Result /= Void deep_equal: deep_equal (Current, Result) frozen standard_copy (other: PDFA) -- Copy every field of other onto corresponding field -- of current object. -- (from ANY) require -- from ANY other_not_void: other /= Void type_identity: same_type (other) ensure -- from ANY is_standard_equal: standard_is_equal (other) frozen standard_twin: PDFA -- New object field-by-field identical to other. -- Always uses default copying semantics. -- (from ANY) ensure -- from ANY standard_twin_not_void: Result /= Void equal: standard_equal (Result, Current) frozen twin: PDFA -- New object equal to Current -- `twin` calls `copy`; to change copying/twinning semantics, redefine `copy`. -- (from ANY) ensure -- from ANY twin_not_void: Result /= Void is_equal: Result ~ Current feature -- Basic operations frozen default: detachable PDFA -- Default value of object's type -- (from ANY) frozen default_pointer: POINTER -- Default value of type POINTER -- (Avoid the need to write p.`default` for -- some p of type POINTER.) -- (from ANY) ensure -- from ANY instance_free: class default_rescue -- Process exception for routines with no Rescue clause. -- (Default: do nothing.) -- (from ANY) frozen do_nothing -- Execute a null action. -- (from ANY) ensure -- from ANY instance_free: class feature -- Implementation find_e_successors (source: INTEGER_32): detachable LINKED_LIST [INTEGER_32] -- Epsilon successors of source; -- Void if no successor. require -- from NDFA source_in_automaton: source >= 1 and source <= nb_states require else source_in_automaton: source >= 1 and source <= nb_states find_successors (source, input_doc: INTEGER_32): detachable LINKED_LIST [INTEGER_32] -- Successors of source on input_doc; -- void if no successor. require -- from NDFA source_in_automaton: source >= 1 and source <= nb_states possible_input_doc: input_doc >= 0 and input_doc <= greatest_input require else source_in_automaton: source >= 1 and source <= nb_states possible_input_doc: input_doc >= 0 and input_doc <= greatest_input set_state -- This routine is deferred in NDFA, -- but is useless in PDFA. feature -- Output Io: STD_FILES -- Handle to standard file setup -- (from ANY) ensure -- from ANY instance_free: class io_not_void: Result /= Void out: STRING_8 -- New string containing terse printable representation -- of current object -- (from ANY) ensure -- from ANY out_not_void: Result /= Void print (o: detachable ANY) -- Write terse external representation of o -- on standard output. -- (from ANY) ensure -- from ANY instance_free: class frozen tagged_out: STRING_8 -- New string containing terse printable representation -- of current object -- (from ANY) ensure -- from ANY tagged_out_not_void: Result /= Void trace -- Output an internal representation -- of the current automaton. feature -- Platform Operating_environment: OPERATING_ENVIRONMENT -- Objects available from the operating system -- (from ANY) ensure -- from ANY instance_free: class operating_environment_not_void: Result /= Void invariant -- from ANY reflexive_equality: standard_is_equal (Current) reflexive_conformance: conforms_to (Current) note comment: "[ These PDFA have a very special structure. They are NDFA but for each state, only one successor is possible, if the input is different of epsilon, and this successor is the following state. For the epsilon transitions each state can have as many successors as possible. Thus, the structure is different for the epsilons transitions, which are recorded in an ARRAY [LINKED_LIST [INTEGER]], and for the others transitions, which are recorded, for each input, in a FIXED_INTEGER_SET. For the use in a regular expression context, keywords can be associated with Current. ]" date: "$Date: 2017-04-14 01:58:10 -0800 (Fri, 14 Apr 2017) $" revision: "$Revision: 100191 $" copyright: "Copyright (c) 1984-2017, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software 5949 Hollister Ave., Goleta, CA 93117 USA Telephone 805-685-1006, Fax 805-685-6869 Website http://www.eiffel.com Customer support http://support.eiffel.com ]" end -- class PDFA
Classes Clusters Cluster hierarchy Chart Relations Flat contracts Go to:

-- Generated by Eiffel Studio --
For more details: eiffel.org