GA>      !"#$%&'()*+,-./0123456789:; < =  Safe-Inferred!2-dimensional rewriting function !1-dimensional rewriting function CEvery 1-dim parser has one symbol, every 2-dim parser two symbols. AIn a production with parsers p1 to pn, each parser has a number, C1 to n. Each symbol of a parser also has a number, 1 or 2, as only Htwo dimensions are supported now. Both numbers form a unique identifier !for each symbol in a production.  Example: f  < a ~~~ b ~~~ c > r /a and c shall have dimension 1, b dimension 2. 4Then a has id (1,1), b has ids (2,1) and (2,2), and 3c has (3,1). Applying a rewriting function of type  or  =to the list of ids produces a permutation of those, possibly split up in two dimensions. E.g., [(1,1),(2,1),(2,2),(3,1)] gets ([(2,1),(3,1)] ,[(2,2),(1,1)]) *if the rewriting function is: r [a,b1,b2,c] = ([b1,c],[b2,a]). <Convenience rewriting function for one or more dim1 symbols 3Convenience rewriting function for one dim2 symbol  Safe-Inferred2Static information about yield sizes of a parser. 6 For supporting dimensions > 2, this type has to be A expanded with more constructors, or redesigned to be generic. 2To support higher dimensions, a subword is a list 3 of indices. Valid list lengths are 2n with n>0.  The input sequence +Subword of the input sequence to be parsed Parsing results >       > Safe-Inferred ?@ABCDEFGHIJKLMNOPQ  ?@ABCDEFGHIJKLMNOPQ Safe-Inferred0Two-dimensional tabulation for one-dim. parsers 0Two-dimensional tabulation for one-dim. parsers 1Four-dimensional tabulation for two-dim. parsers !1Four-dimensional tabulation for two-dim. parsers  ! ! ! ! Safe-Inferred"CTurns an input sequence into an array for use with a 1-dim parser. . Typically, this prepares the input for the $ function. #ETurns two input sequences into an array for use with a 2-dim parser. . Typically, this prepares the input for the % function. $/Convenience function for parsing a given input 8 using a 1-dim parser, usually the start nonterminal. %4Convenience function for parsing a given input pair 8 using a 2-dim parser, usually the start nonterminal. "#$%"#$%"#$%"#$% Safe-Inferred'2Tree of subwords. Every path in a tree represents B a sequence of subwords for a corresponding sequence of parsers  in a production. &rewriting function 0yield size info for each parser of a production 1subword for which subwords should be constructed *constructed subwords, represented as tree '(&'('(&&'( Safe-Inferred)HFilters are not part of ADP-MCFL, but are sometimes used in RNA folding Gto skip parses where subwords are too long, e.g. restricting loop size ,to 30. It is included here for convenience. R+Explicitly specify yield size of a parser. .1Explicitly specify yield size of a 1-dim parser. /1Explicitly specify yield size of a 2-dim parser. )*+S,T-R./0rewriting function U1V2W3 )*+,-./0123 ,-*+012)3./)*+S,T-R./0U1V2W3 Safe-Inferred4*Maps each parser symbol to its yield size D (remember: a 2-dim parser has 2 symbols in a rewriting function) 5min and max yield size 456789:456789:678954:456789:  Safe-Inferred,  !"#$%)*+,-./0123 None;;;; NoneX6List of parser symbols and a start and end index over ( which subwords shall be constructed. 1 Note: RangeDesc means Range Description. I don't like ' that name very much, but haven't found a good alternative. Y6Searches for the given SymbolID in a list of RangeDesc's @ and returns its index in the RangeDesc where it was found. Z;Returns the yield size of the symbol at the given index in  the given RangeDesc. [Hcalculates the combined yield size of all symbols left of the given one \Icalculates the combined yield size of all symbols right of the given one X]^Y_`abcdefgZ[\X]^Y_`abcdefgZ[\X]^Y_`abcdefgZ[\ None<=hijklm<=<=<=hijklm NonenonoNonep  !"#$%&'()*+,-./01234556789:;<=>?@ABCDEFG H I JKLMNOPQRSTUVWXYZ[\]^_`abcd e f g h i j k l m n o p q r s t u v w x y z { |}adp-multi-0.2.2ADP.Multi.Rewriting.ModelADP.Multi.ParserADP.Multi.ElementaryParsersADP.Multi.TabulationADP.Multi.HelpersADP.Multi.RewritingADP.Multi.CombinatorsADP.Multi.Rewriting.YieldSize ADP.DebugADP.Multi.Rewriting.Explicit ADP.Multi.All ADP.Multi.Rewriting.RangesHelperADP.Multi.Rewriting.CombinatorsADP.Multi.Rewriting.AllDim2Dim1SymbolIDid1id2 ParseabletoParser RichParser ParserInfo ParserInfo2 minYield2 maxYield2 ParserInfo1minYieldmaxYieldParserSubwordEPSstringstring2empty1empty2anycharanychar2 anycharExceptcharchar2 charLeftOnly charRightOnlytable1'table1table2'table2mk mkTwoTrackaxiom axiomTwoTrackSubwordConstructionAlgorithm SubwordTreeFilter Rewritable>>><<<~~~ yieldSize1 yieldSize2rewrite|||...with YieldSizeMap YieldSizeYieldAnalysisAlgorithmdetermineYieldSize1determineYieldSize2 combineYieldsbuildYieldSizeMaptraceconstructSubwords1constructSubwords2$fParseable(,)abstring'string2'empty1'empty2'anychar' anychar2'anycharExcept'char'char2' charLeftOnly'charRightOnly'$fParseable(,)Char(,)$fParseable(,)Char(,)0$fParseable(,)Char(,)1$fParseableCharCharChar$fParseable(,)a(,)$fParseable[]a[]$fParseable(,)a(,)0$fParseableEPSaEPS yieldSizeevalseqDeferaltselectwith' RangeDesc findSymbol yieldSizeOfcombinedYieldSizeLeftOfcombinedYieldSizeRightOfSubword2Subword1 findSymbol1 findSymbol2constructNewRangeDescs1constructNewRangeDescs2processRangeDesc1processRangeDesc2filterEmptyRangesprocessRangeDescSingleprocessRangeDescDoubleconstructSubwordsRec calcSubwords2 calcSubwords1adjustMinYieldcalcSubwords2DependentdoCalcSubwords2Dependent$fRewritable(->)ab$fRewritable(->)ab0