- Type Parameters:
I- input symbol type
- All Superinterfaces:
Alphabet<I>,ArrayWritable<I>,Collection<I>,Comparator<I>,IntFunction<I>,Iterable<I>,ToIntFunction<I>,VPAlphabet<I>
- All Known Implementing Classes:
DefaultProceduralInputAlphabet
A specialized version of a
VPAlphabet that is tailored towards procedural systems. Specifically, it only
supports a single return symbol.-
Nested Class Summary
Nested classes/interfaces inherited from interface net.automatalib.alphabet.VPAlphabet
VPAlphabet.SymbolType -
Method Summary
Modifier and TypeMethodDescriptionReplaces all occurrences ofcall symbolsininputwith an embedded terminating sequence provided byterminatingSequences.default intfindCallIndex(List<I> input, int idx) Returns the index of the call symbol of the procedure currently executing the symbol at posidx.default intfindCallIndex(Word<I> input, int idx) default intfindReturnIndex(List<I> input, int idx) Returns the index of the return symbol of the procedure that is about to execute the symbol at posidx(i.e. before input[idx] has been executed).default intfindReturnIndex(Word<I> input, int idx) default IReturns the single return symbol.Replaces all well-matched occurrences of procedural invocations ininputwith the single respectivecall symbol.A generalization ofproject(Word, int)which applies the transformation to the input word as well as an output word (in a symbol-wise fashion).Methods inherited from interface net.automatalib.alphabet.Alphabet
apply, applyAsInt, asGrowingAlphabetOrThrowException, compare, containsSymbol, getSymbol, getSymbolIndex, translateFrom, writeToArrayMethods inherited from interface net.automatalib.common.smartcollection.ArrayWritable
sizeMethods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray, toArrayMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongMethods inherited from interface net.automatalib.alphabet.VPAlphabet
callReturnBalance, getCallAlphabet, getCallSymbol, getCallSymbolIndex, getInternalAlphabet, getInternalSymbol, getInternalSymbolIndex, getNumCalls, getNumInternals, getNumReturns, getReturnAlphabet, getReturnSymbol, getReturnSymbolIndex, getSymbolType, isCallMatched, isCallSymbol, isInternalSymbol, isReturnMatched, isReturnSymbol, isWellMatched, longestWellMatchedPrefix, longestWellMatchedSuffix
-
Method Details
-
getProceduralAlphabet
- Returns:
- the procedural alphabet
-
getReturnSymbol
Returns the single return symbol.- Returns:
- the single return symbol
-
findCallIndex
- Parameters:
input- the input wordidx- the index of the currently executing symbol for which the call index should be determined.- Returns:
- the index of the respective call symbol or
-1if this index doesn't exist - See Also:
-
findCallIndex
Returns the index of the call symbol of the procedure currently executing the symbol at posidx.- Parameters:
input- the input sequenceidx- the index of the currently executing symbol for which the call index should be determined.- Returns:
- the index of the call symbol or
-1if this index doesn't exist oridxhas invalid range
-
findReturnIndex
- Parameters:
input- the input wordidx- the index of the symbol that is about to be executed by the current procedure for which the return symbol should be determined.- Returns:
- the index of the return symbol or
-1if this index doesn't exist oridxhas invalid range - See Also:
-
findReturnIndex
Returns the index of the return symbol of the procedure that is about to execute the symbol at posidx(i.e. before input[idx] has been executed).- Parameters:
input- the input sequenceidx- the index of the symbol that is about to be executed by the current procedure for which the return symbol should be determined.- Returns:
- the index of the return symbol or
-1if this index doesn't exist
-
expand
Replaces all occurrences ofcall symbolsininputwith an embedded terminating sequence provided byterminatingSequences.- Parameters:
input- the input sequence to analyzeterminatingSequences- a mapping of terminating sequence- Returns:
- a transformed word where all occurrences of
calls symbolshave been replaced with embedded terminating sequences.
-
project
Replaces all well-matched occurrences of procedural invocations ininputwith the single respectivecall symbol.- Parameters:
input- the input word to analyzeidx- the index frominputwill be analyzed- Returns:
- a transformed word where all well-matched occurrences of procedural invocations have been replaced with
the single respective
call symbols.
-
project
A generalization ofproject(Word, int)which applies the transformation to the input word as well as an output word (in a symbol-wise fashion).- Type Parameters:
O- output symbol type- Parameters:
input- the input word to analyzeoutput- the output word to transform as wellidx- the index frominputwill be analyzed- Returns:
- a pair of transformed words where all well-matched occurrences of procedural invocations have been
replaced with the single respective
call symbol/ call symbol output. - See Also:
-