public class Self4Decompiler extends SelfDecompiler
| Modifier and Type | Field and Description |
|---|---|
static java.util.Map<Primitive,java.lang.String> |
BINARY_OPERATORS |
TIMEOUT| Constructor and Description |
|---|
Self4Decompiler() |
| Modifier and Type | Method and Description |
|---|---|
Vertex |
decompileExpression(Vertex expression,
Network network)
Check if the expression is bytecode and decompile.
|
Vertex |
decompileFunction(Vertex function,
Network network)
Check if the function is bytecode and decompile.
|
Vertex |
decompileState(Vertex state,
Network network)
Check if the state is bytecode and decompile.
|
void |
parseArgumentByteCode(java.lang.Object[] result,
java.io.DataInputStream dataStream,
Vertex pop,
Network network)
Parse the operation argument.
|
void |
parseArgumentsByteCode(Vertex expression,
java.io.DataInputStream dataStream,
Vertex type,
Network network)
Parse the operation arguments.
|
void |
parseArgumentsByteCode(Vertex expression,
java.io.DataInputStream dataStream,
Vertex type,
Vertex pop,
Network network)
Parse the operation arguments.
|
Vertex |
parseCaseByteCode(java.io.DataInputStream dataStream,
Network network)
Parse the CASE bytecode.
|
Vertex |
parseDoByteCode(java.io.DataInputStream dataStream,
Network network)
Parse the DO bytecode.
|
Vertex |
parseEquationByteCode(Vertex equation,
BinaryData data,
Network network)
Parse the Self2 equation from bytecode.
|
Vertex |
parseExpressionByteCode(Vertex expression,
BinaryData data,
Network network)
Parse the expression from bytecode.
|
Vertex |
parseFunctionByteCode(Vertex function,
BinaryData data,
Network network)
Parse the function from bytecode.
|
Vertex |
parseGotoByteCode(java.io.DataInputStream dataStream,
Network network)
Parse the GOTO bytecode.
|
Vertex |
parseOperatorByteCode(java.io.DataInputStream dataStream,
Network network)
Parse the operator and its arguments from bytecode.
|
Vertex |
parseOperatorByteCode(java.io.DataInputStream dataStream,
Vertex pop,
Network network)
Parse the operator and its arguments from bytecode.
|
Vertex |
parsePushByteCode(java.io.DataInputStream dataStream,
Network network)
Parse the PUSH bytecode.
|
void |
parseQuotientByteCode(Vertex state,
java.io.DataInputStream dataStream,
Network network)
Parse the GOTO bytecode.
|
Vertex |
parseReturnByteCode(java.io.DataInputStream dataStream,
Network network)
Parse the RETURN bytecode.
|
Vertex |
parseStateByteCode(java.io.DataInputStream dataStream,
Network network)
Parse the state and its cases from bytecode.
|
Vertex |
parseStateByteCode(Vertex state,
BinaryData data,
Network network)
Parse the state from bytecode.
|
void |
printArguments(Vertex expression,
Primitive type,
int start,
java.lang.String[] tokens,
boolean reverse,
boolean newLine,
boolean unravel,
boolean brackets,
java.io.Writer writer,
java.lang.String indent,
java.util.List<Vertex> variables,
java.util.List<Vertex> functions,
java.util.Set<Vertex> elements,
boolean space,
Network network)
Print the operation arguments.
|
void |
printCase(Vertex expression,
java.io.Writer writer,
java.lang.String indent,
java.util.Set<Vertex> elements,
java.util.List<Vertex> newVariables,
java.util.List<Vertex> newFunctions,
java.util.List<Vertex> newStates,
Network network)
Print the IF condition and any variables and states that it references.
|
void |
printData(Vertex vertex,
java.io.Writer writer)
Print the vertex, either a state, variable, expression, or data.
|
void |
printDo(Vertex expression,
java.io.Writer writer,
java.lang.String indent,
java.util.Set<Vertex> elements,
java.util.List<Vertex> newVariables,
java.util.List<Vertex> newFunctions,
java.util.List<Vertex> newStates,
Network network)
Print the DO operation.
|
void |
printElement(Vertex vertex,
java.io.Writer writer,
java.lang.String indent,
java.util.List<Vertex> functions,
java.util.List<Vertex> variables,
java.util.Set<Vertex> elements,
Network network)
Print the vertex, either a state, variable, expression, or data.
|
void |
printFunction(Vertex function,
java.io.Writer writer,
java.lang.String indent,
java.util.Set<Vertex> elements,
Network network)
Print the function and any functions it references that have not been printed.
|
void |
printGoto(Vertex expression,
java.io.Writer writer,
java.lang.String indent,
java.util.Set<Vertex> elements,
java.util.List<Vertex> newVariables,
java.util.List<Vertex> newFunctions,
java.util.List<Vertex> newStates,
Network network)
Print the GOTO condition and any variables and states that it references.
|
void |
printOperator(Vertex expression,
java.io.Writer writer,
java.lang.String indent,
java.util.List<Vertex> functions,
java.util.List<Vertex> variables,
java.util.Set<Vertex> elements,
Network network)
Print the expression and any expressions it references that have not been printed.
|
void |
printPush(Vertex expression,
java.io.Writer writer,
java.lang.String indent,
java.util.Set<Vertex> elements,
java.util.List<Vertex> newVariables,
java.util.List<Vertex> newFunctions,
java.util.List<Vertex> newStates,
Network network)
Print the PUSH condition and any variables and states that it references.
|
void |
printReturn(Vertex expression,
java.io.Writer writer,
java.lang.String indent,
java.util.Set<Vertex> elements,
java.util.List<Vertex> newVariables,
java.util.List<Vertex> newFunctions,
java.util.List<Vertex> newStates,
Network network)
Print the RETURN condition and any variables it references.
|
void |
printState(Vertex state,
java.io.Writer writer,
java.lang.String indent,
java.util.Set<Vertex> elements,
Network network,
long start,
long timeout)
Print the state and any referenced states or variables that have not yet been printed.
|
void |
printStateMachine(Vertex state,
java.io.Writer writer,
Network network,
long start,
long timeout)
Print the Self code for the state machine.
|
void |
printTemplate(Vertex formula,
java.io.Writer writer,
java.lang.String indent,
java.util.List<Vertex> expressions,
java.util.List<Vertex> variables,
java.util.Set<Vertex> elements,
Network network) |
void |
printVariable(Vertex variable,
java.io.Writer writer,
java.lang.String indent,
java.util.Set<Vertex> elements,
Network network)
Print the variable and any variables it references that have not been printed.
|
createUniqueFormula, createUniqueTemplate, decompileEquation, decompileStateMachine, getDecompiler, getPrintIds, printArguments, printComments, printEquation, printFormula, printGoto, printPush, printReturn, setDecompiler, setPrintIds, toStringpublic static java.util.Map<Primitive,java.lang.String> BINARY_OPERATORS
public void printStateMachine(Vertex state, java.io.Writer writer, Network network, long start, long timeout)
printStateMachine in class SelfDecompilerpublic void printState(Vertex state, java.io.Writer writer, java.lang.String indent, java.util.Set<Vertex> elements, Network network, long start, long timeout) throws java.io.IOException
printState in class SelfDecompilerjava.io.IOExceptionpublic void printData(Vertex vertex, java.io.Writer writer) throws java.io.IOException
printData in class SelfDecompilerjava.io.IOExceptionpublic void printElement(Vertex vertex, java.io.Writer writer, java.lang.String indent, java.util.List<Vertex> functions, java.util.List<Vertex> variables, java.util.Set<Vertex> elements, Network network) throws java.io.IOException
printElement in class SelfDecompilerjava.io.IOExceptionpublic void printTemplate(Vertex formula, java.io.Writer writer, java.lang.String indent, java.util.List<Vertex> expressions, java.util.List<Vertex> variables, java.util.Set<Vertex> elements, Network network) throws java.io.IOException
printTemplate in class SelfDecompilerjava.io.IOExceptionpublic void printVariable(Vertex variable, java.io.Writer writer, java.lang.String indent, java.util.Set<Vertex> elements, Network network) throws java.io.IOException
printVariable in class SelfDecompilerjava.io.IOExceptionpublic void printArguments(Vertex expression, Primitive type, int start, java.lang.String[] tokens, boolean reverse, boolean newLine, boolean unravel, boolean brackets, java.io.Writer writer, java.lang.String indent, java.util.List<Vertex> variables, java.util.List<Vertex> functions, java.util.Set<Vertex> elements, boolean space, Network network) throws java.io.IOException
java.io.IOExceptionpublic void parseArgumentsByteCode(Vertex expression, java.io.DataInputStream dataStream, Vertex type, Network network) throws java.io.IOException
parseArgumentsByteCode in class SelfDecompilerjava.io.IOExceptionpublic void parseArgumentsByteCode(Vertex expression, java.io.DataInputStream dataStream, Vertex type, Vertex pop, Network network) throws java.io.IOException
java.io.IOExceptionpublic void parseArgumentByteCode(java.lang.Object[] result,
java.io.DataInputStream dataStream,
Vertex pop,
Network network)
throws java.io.IOException
java.io.IOExceptionpublic Vertex decompileFunction(Vertex function, Network network)
decompileFunction in class SelfDecompilerpublic Vertex decompileExpression(Vertex expression, Network network)
decompileExpression in class SelfDecompilerpublic Vertex decompileState(Vertex state, Network network)
decompileState in class SelfDecompilerpublic void printFunction(Vertex function, java.io.Writer writer, java.lang.String indent, java.util.Set<Vertex> elements, Network network) throws java.io.IOException
java.io.IOExceptionpublic Vertex parseFunctionByteCode(Vertex function, BinaryData data, Network network) throws java.io.IOException
parseFunctionByteCode in class SelfDecompilerjava.io.IOExceptionpublic Vertex parseExpressionByteCode(Vertex expression, BinaryData data, Network network) throws java.io.IOException
parseExpressionByteCode in class SelfDecompilerjava.io.IOExceptionpublic Vertex parseEquationByteCode(Vertex equation, BinaryData data, Network network) throws java.io.IOException
parseEquationByteCode in class SelfDecompilerjava.io.IOExceptionpublic Vertex parseStateByteCode(Vertex state, BinaryData data, Network network) throws java.io.IOException
parseStateByteCode in class SelfDecompilerjava.io.IOExceptionpublic Vertex parseStateByteCode(java.io.DataInputStream dataStream, Network network) throws java.io.IOException
parseStateByteCode in class SelfDecompilerjava.io.IOExceptionpublic Vertex parseCaseByteCode(java.io.DataInputStream dataStream, Network network) throws java.io.IOException
parseCaseByteCode in class SelfDecompilerjava.io.IOExceptionpublic Vertex parsePushByteCode(java.io.DataInputStream dataStream, Network network) throws java.io.IOException
parsePushByteCode in class SelfDecompilerjava.io.IOExceptionpublic Vertex parseDoByteCode(java.io.DataInputStream dataStream, Network network) throws java.io.IOException
parseDoByteCode in class SelfDecompilerjava.io.IOExceptionpublic Vertex parseReturnByteCode(java.io.DataInputStream dataStream, Network network) throws java.io.IOException
parseReturnByteCode in class SelfDecompilerjava.io.IOExceptionpublic Vertex parseGotoByteCode(java.io.DataInputStream dataStream, Network network) throws java.io.IOException
parseGotoByteCode in class SelfDecompilerjava.io.IOExceptionpublic void parseQuotientByteCode(Vertex state, java.io.DataInputStream dataStream, Network network) throws java.io.IOException
parseQuotientByteCode in class SelfDecompilerjava.io.IOExceptionpublic void printOperator(Vertex expression, java.io.Writer writer, java.lang.String indent, java.util.List<Vertex> functions, java.util.List<Vertex> variables, java.util.Set<Vertex> elements, Network network) throws java.io.IOException
printOperator in class SelfDecompilerjava.io.IOExceptionpublic Vertex parseOperatorByteCode(java.io.DataInputStream dataStream, Network network) throws java.io.IOException
parseOperatorByteCode in class SelfDecompilerjava.io.IOExceptionpublic Vertex parseOperatorByteCode(java.io.DataInputStream dataStream, Vertex pop, Network network) throws java.io.IOException
java.io.IOExceptionpublic void printCase(Vertex expression, java.io.Writer writer, java.lang.String indent, java.util.Set<Vertex> elements, java.util.List<Vertex> newVariables, java.util.List<Vertex> newFunctions, java.util.List<Vertex> newStates, Network network) throws java.io.IOException
printCase in class SelfDecompilerjava.io.IOExceptionpublic void printGoto(Vertex expression, java.io.Writer writer, java.lang.String indent, java.util.Set<Vertex> elements, java.util.List<Vertex> newVariables, java.util.List<Vertex> newFunctions, java.util.List<Vertex> newStates, Network network) throws java.io.IOException
java.io.IOExceptionpublic void printPush(Vertex expression, java.io.Writer writer, java.lang.String indent, java.util.Set<Vertex> elements, java.util.List<Vertex> newVariables, java.util.List<Vertex> newFunctions, java.util.List<Vertex> newStates, Network network) throws java.io.IOException
java.io.IOExceptionpublic void printDo(Vertex expression, java.io.Writer writer, java.lang.String indent, java.util.Set<Vertex> elements, java.util.List<Vertex> newVariables, java.util.List<Vertex> newFunctions, java.util.List<Vertex> newStates, Network network) throws java.io.IOException
java.io.IOExceptionpublic void printReturn(Vertex expression, java.io.Writer writer, java.lang.String indent, java.util.Set<Vertex> elements, java.util.List<Vertex> newVariables, java.util.List<Vertex> newFunctions, java.util.List<Vertex> newStates, Network network) throws java.io.IOException
java.io.IOException