Class Template


  • public final class Template
    extends java.lang.Object
    Template builds a test template's representation and passes it for further processing.
    • Method Detail

      • getUnusedBlocks

        public java.util.Set<Block> getUnusedBlocks()
      • getAddressForLabel

        public java.math.BigInteger getAddressForLabel​(java.lang.String label)
      • beginPreSection

        public void beginPreSection()
      • endPreSection

        public void endPreSection()
      • beginPostSection

        public void beginPostSection()
      • endPostSection

        public void endPostSection()
      • beginMainSection

        public void beginMainSection()
      • endMainSection

        public void endMainSection()
      • addLabel

        public void addLabel​(java.lang.String name,
                             boolean global)
      • addWeakLabel

        public void addWeakLabel​(java.lang.String name)
      • addNumericLabel

        public void addNumericLabel​(int index)
      • newNumericLabelRef

        public LabelValue newNumericLabelRef​(int index,
                                             boolean forward)
      • addOutput

        public void addOutput​(Output output)
      • setCallText

        public void setCallText​(java.lang.String text)
      • setRootOperation

        public void setRootOperation​(Primitive rootOperation,
                                     Where where)
      • endBuildingCall

        public void endBuildingCall()
      • newOperationBuilder

        public PrimitiveBuilder newOperationBuilder​(java.lang.String name)
      • newAddressingModeBuilder

        public PrimitiveBuilder newAddressingModeBuilder​(java.lang.String name)
      • newRandom

        public RandomValue newRandom​(java.math.BigInteger from,
                                     java.math.BigInteger to)
      • newRandom

        public RandomValue newRandom​(ru.ispras.fortress.randomizer.Variate<?> variate)
      • newVariateBuilder

        public ru.ispras.fortress.randomizer.VariateBuilder<?> newVariateBuilder()
      • addAllocatorAction

        public void addAllocatorAction​(Primitive primitive,
                                       java.lang.String kind,
                                       boolean value,
                                       boolean applyToAll)
      • newAllocationData

        public AllocationData<Value> newAllocationData​(Where where,
                                                       Allocator allocator,
                                                       java.util.List<Primitive> retain,
                                                       java.util.List<Primitive> exclude,
                                                       int track,
                                                       java.util.Map<java.lang.Object,​java.lang.Object> readAfterRate,
                                                       java.util.Map<java.lang.Object,​java.lang.Object> writeAfterRate,
                                                       boolean reserved)
      • newOutput

        public OutputBuilder newOutput​(java.lang.String kind,
                                       java.lang.String format)
      • setDefaultSituation

        public void setDefaultSituation​(java.lang.String name,
                                        Situation situation)
      • setDefaultSituation

        public void setDefaultSituation​(java.lang.String name,
                                        ru.ispras.fortress.randomizer.Variate<Situation> situation)
      • getDefaultSituation

        public ru.ispras.fortress.randomizer.Variate<Situation> getDefaultSituation​(java.lang.String name)
      • addBlockConstraint

        public void addBlockConstraint​(Situation constraint)
      • beginPreparator

        public PreparatorBuilder beginPreparator​(java.lang.String targetName,
                                                 boolean isComparator)
      • endPreparator

        public void endPreparator()
      • beginPreparatorVariant

        public void beginPreparatorVariant​(java.lang.String name,
                                           java.math.BigInteger bias)
      • endPreparatorVariant

        public void endPreparatorVariant()
      • newLazy

        public LazyValue newLazy​(int start,
                                 int end)
      • getPreparatorTarget

        public Primitive getPreparatorTarget()
      • addPreparatorCall

        public void addPreparatorCall​(Primitive targetMode,
                                      java.math.BigInteger value,
                                      java.lang.String preparatorName,
                                      java.lang.String variantName)
      • addPreparatorCall

        public void addPreparatorCall​(Primitive targetMode,
                                      Value value,
                                      java.lang.String preparatorName,
                                      java.lang.String variantName)
      • beginStreamPreparator

        public StreamPreparatorBuilder beginStreamPreparator​(java.lang.String dataModeName,
                                                             java.lang.String indexModeName)
      • endStreamPreparator

        public void endStreamPreparator()
      • getDataSource

        public Primitive getDataSource()
      • getIndexSource

        public Primitive getIndexSource()
      • getStartLabel

        public LabelValue getStartLabel()
      • beginStreamInitMethod

        public void beginStreamInitMethod()
      • beginStreamReadMethod

        public void beginStreamReadMethod()
      • beginStreamWriteMethod

        public void beginStreamWriteMethod()
      • endStreamMethod

        public void endStreamMethod()
      • addStream

        public void addStream​(java.lang.String startLabelName,
                              Primitive dataSource,
                              Primitive indexSource,
                              int length)
      • newMapBuilder

        public MapBuilder newMapBuilder()
      • endBufferPreparator

        public void endBufferPreparator()
      • endMemoryPreparator

        public void endMemoryPreparator()
      • newAddressReference

        public LazyValue newAddressReference​(int level)
      • newAddressReference

        public LazyValue newAddressReference​(int level,
                                             int start,
                                             int end)
      • newEntryReference

        public LazyValue newEntryReference​(int level)
      • newEntryReference

        public LazyValue newEntryReference​(int level,
                                           int start,
                                           int end)
      • newEntryFieldReference

        public LazyValue newEntryFieldReference​(int level,
                                                java.lang.String fieldId)
      • newEntryFieldReference

        public LazyValue newEntryFieldReference​(int level,
                                                java.lang.String fieldId,
                                                int start,
                                                int end)
      • newAddressingModeBuilderForGroup

        public PrimitiveBuilder newAddressingModeBuilderForGroup​(java.lang.String name)
      • chooseMetaOperationFromGroup

        public MetaOperation chooseMetaOperationFromGroup​(java.lang.String name)
      • defineGroup

        public void defineGroup​(java.lang.String name,
                                ru.ispras.fortress.randomizer.Variate<java.lang.String> variate)
      • endExceptionHandler

        public void endExceptionHandler()
      • beginData

        public DataSectionBuilder beginData​(boolean isGlobalArgument,
                                            boolean isSeparateFile)
      • endData

        public void endData()
      • generateData

        public void generateData​(java.math.BigInteger address,
                                 java.lang.String labelName,
                                 java.lang.String typeId,
                                 int length,
                                 java.lang.String method,
                                 boolean isSeparateFile)
      • addDirective

        public void addDirective​(Directive directive,
                                 Where where)
      • beginSection

        public void beginSection​(Where where,
                                 java.lang.String name,
                                 java.lang.String prefix,
                                 java.math.BigInteger pa,
                                 java.math.BigInteger va,
                                 java.lang.String args,
                                 boolean file)
      • beginSectionText

        public void beginSectionText​(Where where,
                                     java.lang.String prefix,
                                     java.math.BigInteger pa,
                                     java.math.BigInteger va,
                                     java.lang.String args)
      • beginSectionData

        public void beginSectionData​(Where where,
                                     java.lang.String prefix,
                                     java.math.BigInteger pa,
                                     java.math.BigInteger va,
                                     java.lang.String args)
      • endSection

        public void endSection()
      • beginAttributes

        public void beginAttributes​(MapBuilder builder)
      • endAttributes

        public void endAttributes()
      • beginPrologue

        public void beginPrologue()
      • endPrologue

        public void endPrologue()
      • beginEpilogue

        public void beginEpilogue()
      • endEpilogue

        public void endEpilogue()
      • where

        public Where where​(java.lang.String file,
                           int line)