⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.62
Server IP:
57.129.66.90
Server:
Linux vps-7f548908 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64
Server Software:
LiteSpeed
PHP Version:
8.2.27
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
lib
/
python3
/
dist-packages
/
automat
/
__pycache__
/
Edit File: _core.cpython-310.pyc
o $#[ @ sH d Z ddlmZ dZG dd deZG dd deZG dd d eZd S )zp A core state-machine abstraction. Perhaps something that could be replaced with or integrated into machinist. )chainz
c s e Zd ZdZ fddZ ZS )NoTransitionz A finite state machine in C{state} has no transition for C{symbol}. @param state: the finite state machine's state at the time of the illegal transition. @param symbol: the input symbol for which no transition exists. c s( || _ || _tt| d|| d S )Nzno transition for {} in {})statesymbolsuper Exception__init__format)selfr r __class__ //usr/lib/python3/dist-packages/automat/_core.pyr s zNoTransition.__init__)__name__ __module____qualname____doc__r __classcell__r r r r r s r c @ sb e Zd ZdZdd Zedd Zejdd Zdd Zd d Z dd Z d d Zdd Zdd Z dS ) Automatonzr A declaration of a finite state machine. Note that this is not the machine itself; it is immutable. c C s t | _t | _dS )zJ Initialize the set of transitions and the initial state. N) _NO_STATE _initialStateset_transitionsr r r r r ' s zAutomaton.__init__c C s | j S )z8 Return this automaton's initial state. )r r r r r initialState/ s zAutomaton.initialStatec C s$ | j tur td| j || _ dS )z Set this automaton's initial state. Raises a ValueError if this automaton already has an initial state. zinitial state already set to {}N)r r ValueErrorr )r r r r r r 7 s c C sP | j D ]\}}}}||kr||krtd||q| j |||t|f dS )z Add the given transition to the outputSymbol. Raise ValueError if there is already a transition with the same inState and inputSymbol. z&already have transition from {} via {}N)r r r addtuple) r inStateinputSymboloutState outputSymbols anInState anInputSymbol anOutState_r r r addTransitionE s zAutomaton.addTransitionc C s t | jS )z" All transitions. ) frozensetr r r r r allTransitionsV s zAutomaton.allTransitionsc C s dd | j D S )zG The full set of symbols acceptable to this automaton. c S s h | ]\}}}}|qS r r .0r r r outputSymbolr r r
a s z*Automaton.inputAlphabet.
.
)r r r r r inputAlphabet] s zAutomaton.inputAlphabetc C t tdd | jD S )zR The full set of symbols which can be produced by this automaton. c s s | ] \}}}}|V qd S Nr )r* r r r r! r r r
j s z+Automaton.outputAlphabet.
.
)r r from_iterabler r r r r outputAlphabete s zAutomaton.outputAlphabetc C r. )zc All valid states; "Q" in the mathematical description of a state machine. c s s | ]\}}}}||fV qd S r/ r r) r r r r0 x s z#Automaton.states.
.
)r' r r1 r r r r r statesr s zAutomaton.statesc C s@ | j D ]\}}}}||f||fkr|t|f S qt||d)zI A 2-tuple of (outState, outputSymbols) for inputSymbol. )r r )r listr )r r r r" r# r r! r r r outputForInput s zAutomaton.outputForInputN)r r r r r propertyr setterr&