KtG      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~          !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFNone9;T !"#$%&'() !"#$)('&% !"#$ !"#$%&'()Safe *+,-./0123456 *+,-./012343 01/.,-2 4 +* *+,-./0123456Safe5GHI78JKL9M:NOPQR;ST<UVWXYZ[\]^_`abcdefghijklmnopqrstu789:;<7;:98<5GHI78JKL9M:NOPQR;ST<UVWXYZ[\]^_`abcdefghijklmnopqrstuSafe=>?@ABCDEFGHIJ =>?@ABCDEFGHICDEF=>?@ABGHIJ=>?@ABCDEFGHIJSafe0 X all positionsYnon-variable positionsZvariable positions["leaf positions (= nullary symbols)`3compute new symbol at position, giving the positionajcompute new symbol from *reverse* position and previous symbol this is more efficient (no reverse needed)dwarning: don't check arityg in preorder l:list of variables (each occurs once, unspecified ordering)m1list of variables (in pre-order, with duplicates)PQRSTUVWXYZ[\]^_`abcdefghijklmnPQRSTUVWXYZ[\]^_`abcdefghijklmQRSTnPUVWXYZ[\]^_`abcdefghijklmPQRSTUVWXYZ[\]^_`abcdefghijklmnSafe}3value is meaningless if the system has no variablesrstuvwxyz{|}~rstuvwxyz{|}~rstuvwxyz{|}~r stuvwxyz{|}~Safe0legacy stuff (used in matchbox)this is modelled after +https://www.lri.fr/~marche/tpdb/format.htmlexample: "(AC plus)""better keep order in signature (?)"if True, write comma between rulesaccording to XTC specshould be Text>e=>?@ABCDEFGHIPQRSTUVWXYZ[\]^_`abcdefghijklm>None9:;FIXME: move to separate module SafeMsuccess iff term consists of unary symbols and the lowest node is a variable NoneTNoney=>?@ABCDEFGHIPQRSTUVWXYZ[\]^_`abcdefghijklm Safe1if input is SRS, reverse lhs and rhs of each rule Safe5"compute the DP transformed system.  Safevview variables as symbols)will only bind variables in the left side-naive implementation (worst case exponential)wvxwvxSafeThis function keeps only those parts of the input term which cannot be reduced, even if the term is instantiated. All other parts are replaced by fresh variables. Def 4.4 in Uhttp://cl-informatik.uibk.ac.at/users/griff/publications/Sternagel-Thiemann-RTA10.pdfSafe:                 Safe9;Tpthis is super-ugly: a parenthesized, possibly nested, possibly comma-separated, list of identifiers or strings6warning: by definition, {}[] may appear in identifiers !"#$%& &%$#"!  !"#$%&None'~first argument is file name, second argument is file contents. first arg. is needed to pick the proper parser (SRS, TRS, XTC)''''None(read input from file with given name. can have extension .srs, .trs, .xml. unknown extension is considered as .xml, because of Phttp://starexec.forumotion.com/t60-restore-file-extension-for-renamed-benchmarks()*+,()*+,()*+,()*+,None()*+,Safe-wDP problems for strongly connected components, topologically sorted, with CyclicComponents in Right, others in Left..'edges of the estimated dependency graph-./0-./0-./0-./0Safe Safe1%DANGER: this ignores the CE condition2<computes the least closed set of usable rules, cf. Def 4.5 Uhttp://cl-informatik.uibk.ac.at/users/griff/publications/Sternagel-Thiemann-RTA10.pdf12345123451234512345None/0ATYit seems the degree must always be given in CPF, although the category spec also allows POLY Ehttp://cl-informatik.uibk.ac.at/users/georg/cbr/competition/rules.phpthis is actually not true, since instead of copying from XTC, CPF format repeats the definition of TRS, and it's a different one (relative rules are extra)6789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~6789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\^]_`abcdefhgijklmnopqrstuvwxyz{|}~|}~z{wxystuvnopqrijklmdefghabc\]^_`TUVWXYZ[PQRSMNOIJKLDEFGHBC@A;<=>?6789:)6789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~None 09:;T&    !"#$%&'()*+,-./0  & 0/.-,+*)( '&%$#"!  &    !"#$%&'()*+,-./0NoneT1[dangerous: not all constructor arguments will be set. the function produces something likeCertificationProblem { input = CertificationProblemInput , proof = TrsTerminationProof undefined } 123456789:;<=>?@ABCD123456789:;<=>?@ABCD123456789:;<=>?@ABCD123456789:;<=>?@ABCDNone  123456789:;<=>?@ABCDNone[EFEFEFEFy !"#$%&'()*+,-./01123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVW=XYZZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                         !"#$%&'()*+,-./0123456789::;<=>?@ABCDEFGHHIJKLLMNOPPQRSTUVWXYZ[\]^_`abcdefghijklmnopkcqqrstuvwxyz{|}~~      !"#$%&'()*+,-./0123456789:;R<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghi j k lm!tpdb-1.3.3-3MDSxF9RUnAKsR997ih9NP TPDB.PrettyTPDB.XmlTPDB.Xml.PrettyTPDB.Data.RuleTPDB.Data.TermTPDB.Data.Attributes TPDB.Data TPDB.Data.Xml TPDB.Convert TPDB.XTC.Read TPDB.MirrorTPDB.DP.Transform TPDB.DP.Unify TPDB.DP.TCapTPDB.Plain.WriteTPDB.Plain.ReadTPDB.Input.MemoryTPDB.Input.File TPDB.DP.GraphTPDB.DP.UsableTPDB.CPF.Proof.TypeTPDB.CPF.Proof.WriteTPDB.CPF.Proof.ReadTPDB.CPF.Proof.UtilTPDB.XTC TPDB.InputTPDB.DPTPDB.CPF.Proof.Xml-wl-pprint-text-1.1.0.4-DNIR7vi5nu8CLEkyclu4LiText.PrettyPrint.Leijen.Text displayIO renderCompactnestemptycommaenclosebracketsanglesbraces<> punctuate prettyListprettyPrettyDoc SimpleDocXReadxreadCParser unCParserContentsmkelrmkel nospaceStringescape must_succeedwraperrmsgorelsemanyelementelement0strip xfromstringcomplaininfo$fXReada$fMonadCParser$fApplicativeCParser$fFunctorCParser $fHTypeablet$$<+>vcathcatvsephsepfsepsepparensrendertext$fPrettyEither $fPretty(,,,)documentprolog doctypedeclcontentcpRulelhsrhsrelationtopRelationStrictWeakEqualstrictweakequal $fFunctorRule $fEqRelation $fOrdRelation$fShowRelation$fEqRule $fOrdRulePositionTermVarNodevmap positionssizedepthpossymposvarposleafpossubtermsstrict_subterms isSubtermOfisStrictSubtermOfpmaprpmappeek peek_symbol poke_symbolpokepokessymslsymslsymsvarsisvarlvarsvoccs $fFunctorTerm$fEqTerm $fOrdTerm $fShowTerm Attributessize_of_signature max_aritytotal_term_size max_term_sizemax_term_depth left_linear right_linearlinear max_var_count max_var_depthcompute_attributes safe_maximumvarcount varcount_term$fPrettyAttributes$fShowAttributesSESTES StarttermStartterm_Constructor_basedStartterm_FullTheoryACAC TheorydeclProperty EquationsStrategyFull Innermost OutermostType Termination ComplexityProblemtype_trsstrategyfull_signature startterm attributesSRSTRSRS signaturerulesseparateReplacementmap SignatureHigherOrderSignatureFuncsymfs_namefs_arity fs_theoryfs_replacementmap Identifier_identifier_hashnamearitymk strict_rules weak_rules equal_rules mknullarymkunaryfrom_strict_rules with_rules $fFunctorRS$fEqRS$fShowIdentifier$fHashableIdentifier$fEqIdentifier$fOrdIdentifier$fShowReplacementmap $fShowType$fShowStrategy $fEqTheory $fOrdTheory $fReadTheory $fShowTheory $fShowFuncsym$fShowSignature$fShowStarttermno_sharp_name_HACKsharp_name_HACK$fXmlContentRule$fHTypeableRule$fXmlContentTerm$fXmlContentIdentifiersrs2trsconvert_srs_ruletrs2srsconvert_trs_ruleunspinespineatTaggetTermgetVar getFunApp gotoChildgetChild getProblemgetType getStrategy getStarttermgetTRS getSignaturegetFOSignaturegetHOSignature getFuncsymgetReadgetRulesgetRule readProblemsreadProblemsBSmirrorMarkedOriginal Auxiliary isOriginalisMarkedmark_topdefineddp$fPrettyMarked$fHashableMarked $fShowMarked $fEqMarked $fOrdMarked$fGenericMarkedunifiesmatchmgutimesapplytcap fresh_varwalk PrettyTerm prettyTerm$fPrettyProblem $fPrettyRS$fPrettyTermTerm$fPrettyTerm[] $fPrettyRule $fPrettyTerm$fPrettyIdentifier DeclarationVar_DeclarationTheory_DeclarationStrategy_DeclarationRules_DeclarationUnknown_DeclarationReaderreadersrslexer declarationanylistrepair_signature_srsmake_srsrepair_signature_trsmake_trsrepair_variables $fReaderRS $fReaderRS0 $fReaderRule $fReaderTerm $fReader[]$fReaderIdentifiergetgetEget_trsgetE_trsget_srs componentsedgeschecksysrestrictusablefixpointrequiredneededArgumentFilterEntry afeSymbolafeArity afeFilterPrecedenceEntrypeSymbolpeArity pePrecedence PathOrderToExotictoExoticExoticMinus_Infinite E_Integer E_Rational Plus_Infinite CoefficientVectorMatrixCoefficient_CoefficientLabel LblNumber LblSymbolSymbolSymNameSymSharpSymLabel ArithFunction AFNatural AFVariableAFSum AFProductAFMinAFMax AFIfEqual PolynomialSumProductPolynomial_CoefficientPolynomial_VariableValue InterpretsymbolvalueDomainNaturals RationalsArcticTropicalInterpretation_TypeMatrix_Interpretationdomain dimensionstrictDimensionInterpretationinterpretation_type interpretsRedPairRPInterpretation RPPathOrderOrderingConstraintProof OCPRedPairDepGraphComponent dgcRealSccdgcDps dgcDpProofDpProofPIsEmpty RedPairProc DepGraphProc SemLabProc UnlabProcrppOrderingConstraintProofrppDpsrppUsableRules rppDpProofslpModelslpDpsslpTrs slpDpProofulpDpsulpTrs ulpDpProofModel FiniteModelTransition_LhsTransition_SymbolTransition_Epsilon tr_symbol tr_height tr_arguments Transitiontransition_lhstransition_rhsState TreeAutomatonta_finalStatesta_transitions Criterion CompatibilityClosedTreeAutomatoncta_treeAutomaton cta_criterion Bounds_TypeRoofMatchTrsTerminationProofRIsEmpty RuleRemovalDpTransSemlabUnlabStringReversalBoundsrr_orderingConstraintProoftrsTerminationProof dptrans_dps markedSymbolsdptrans_dpProofmodel bounds_type bounds_boundbounds_finalStatesbounds_closedTreeAutomatonTrsNonterminationProofTrsNonterminationProofFIXMEComplexityClassComplexityClassPolynomialdegreeComplexityMeasureDerivationalComplexityRuntimeComplexityComplexityProofComplexityProofFIXMEDPSProofRelativeTerminationProofRelativeNonterminationProofCertificationProblemInputTrsInputComplexityInput trsinput_trscomplexityMeasurecomplexityClassToolversionOrigin ProofOrigintoolCertificationProbleminput cpfVersionprooforigin ignoredOrigin$fEqCoefficient$fEqDPS$fEqTool $fEqOrigin$fEqComplexityProof$fEqComplexityMeasure$fEqComplexityClass$fEqCertificationProblemInput$fEqTrsNonterminationProof$fEqBounds_Type $fEqCriterion $fEqState $fEqDomain$fEqInterpretation_Type$fEqArithFunction $fEqLabel $fEqSymbol$fEqTransition_Lhs$fEqTransition$fEqTreeAutomaton$fEqClosedTreeAutomaton$fEqPolynomial $fEqValue $fEqInterpret$fEqInterpretation $fEqModel $fEqExotic$fEqPrecedenceEntry$fEqArgumentFilterEntry $fEqPathOrder $fEqRedPair$fEqOrderingConstraintProof $fEqDpProof$fEqDepGraphComponent$fEqTrsTerminationProof $fEqProof$fEqCertificationProblemtox symbolize$fXmlContentArgumentFilterEntry$fXmlContentPrecedenceEntry$fXmlContentPathOrder$fXmlContentLabel$fXmlContentSymbol$fXmlContentExotic$fXmlContentCoefficient$fXmlContentArithFunction$fXmlContentPolynomial$fXmlContentValue$fXmlContentInterpret$fXmlContentRatio$fXmlContentDomain$fXmlContentInterpretation_Type$fXmlContentInterpretation$fXmlContentRedPair#$fXmlContentOrderingConstraintProof$fXmlContentDepGraphComponent$fXmlContentDpProof$fXmlContentModel$fXmlContentTransition_Lhs$fXmlContentTransition$fXmlContentTreeAutomaton$fXmlContentCriterion$fXmlContentClosedTreeAutomaton$fXmlContentState$fXmlContentBounds_Type$fXmlContentTrsTerminationProof$fXmlContentDPS$fXmlContentProof$fXmlContentRS%$fXmlContentCertificationProblemInput$fXmlContentTool$fXmlContentOrigin $fXmlContentCertificationProblemreadCPreadCP_with_tracelevelgetCPgetInputgetTerminationInputgetComplexityInputgetComplexityMeasuregetComplexityClass getTrsInputgetTrs getTrsWithgetProofgetDummyfromMarkedIdentifier sortVariableseithermaybexmldeclmiscsddecl markupdeclisText carryelem carrycontent spancontent attribute elementdecl contentspecmodifiermixed attlistdeclattdefatttype tokenizedtypeenumeratedtype notationtype enumeration defaultdecl reference entityrefcharref entitydeclgedeclpedecl entitydefpedef externalid ndatadecl notationdeclpublicid encodingdeclnmtokenattvalue entityvalueev pubidliteral systemliteralchardatacdsectqnamecontainsDoubleQuotepack Substitutionunpack