⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.30
Server IP:
45.79.8.107
Server:
Linux localhost 5.15.0-140-generic #150-Ubuntu SMP Sat Apr 12 06:00:09 UTC 2025 x86_64
Server Software:
nginx/1.18.0
PHP Version:
8.1.2-1ubuntu2.21
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
lib
/
python3
/
dist-packages
/
automat
/
__pycache__
/
View File Name :
_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 anInputSymbolZ 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 ZoutputSymbolr 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 r. x s z#Automaton.states.
.
)r&