Class PrimitiveSyntesizer
- java.lang.Object
-
- ru.ispras.microtesk.translator.antlrex.log.LogWriter
-
- ru.ispras.microtesk.translator.nml.analysis.PrimitiveSyntesizer
-
- All Implemented Interfaces:
TranslatorHandler<Ir>
public final class PrimitiveSyntesizer extends LogWriter implements TranslatorHandler<Ir>
ThePrimitiveSyntesizer
class provides facilities to analyze information on relations between operations and to synthesize on its basis the following elements:Shortcuts for leaf (have no child operations) and junction (have more than one child operations) operations that allow addressing (instantiating with all required parent operations) these operation in various contexts. A shortcut can be synthesized if there is an unambiguous way to resolve all dependencies of parent operations on the way from an entry operation to a target operation. Shortcuts are added to IR of corresponding target operations.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ROOT_ID
Name for the fake operation (OR rule) that unites all root operations described in the specification (AND rules that have no parents).
-
Constructor Summary
Constructors Constructor Description PrimitiveSyntesizer(Translator<Ir> translator)
Constructs a PrimitiveSyntesizer object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
getSourceName()
void
processIr(Ir ir)
-
Methods inherited from class ru.ispras.microtesk.translator.antlrex.log.LogWriter
reportError, reportWarning
-
-
-
-
Field Detail
-
ROOT_ID
public static final java.lang.String ROOT_ID
Name for the fake operation (OR rule) that unites all root operations described in the specification (AND rules that have no parents). This identifier is used a context name when a shortcut is addressed from the topmost level of operation nesting in test templates.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PrimitiveSyntesizer
public PrimitiveSyntesizer(Translator<Ir> translator)
Constructs a PrimitiveSyntesizer object.- Parameters:
translator
- Translator that constructed the internal representation.- Throws:
java.lang.IllegalArgumentException
- if any of the parameters equals null.
-
-
Method Detail
-
getSourceName
protected java.lang.String getSourceName()
- Overrides:
getSourceName
in classLogWriter
-
processIr
public void processIr(Ir ir)
- Specified by:
processIr
in interfaceTranslatorHandler<Ir>
-
-