/export/starexec/sandbox2/solver/bin/starexec_run_standard /export/starexec/sandbox2/benchmark/theBenchmark.pl /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- YES proof of /export/starexec/sandbox2/benchmark/theBenchmark.pl # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty Left Termination of the query pattern suffix(a,g) w.r.t. the given Prolog program could successfully be proven: (0) Prolog (1) PrologToDTProblemTransformerProof [SOUND, 0 ms] (2) TRIPLES (3) TriplesToPiDPProof [SOUND, 0 ms] (4) PiDP (5) DependencyGraphProof [EQUIVALENT, 0 ms] (6) PiDP (7) PiDPToQDPProof [SOUND, 1 ms] (8) QDP (9) QDPSizeChangeProof [EQUIVALENT, 0 ms] (10) YES ---------------------------------------- (0) Obligation: Clauses: suffix(Xs, Ys) :- app(X1, Xs, Ys). app([], X, X). app(.(X, Xs), Ys, .(X, Zs)) :- app(Xs, Ys, Zs). Query: suffix(a,g) ---------------------------------------- (1) PrologToDTProblemTransformerProof (SOUND) Built DT problem from termination graph DT10. { "root": 2, "program": { "directives": [], "clauses": [ [ "(suffix Xs Ys)", "(app X1 Xs Ys)" ], [ "(app ([]) X X)", null ], [ "(app (. X Xs) Ys (. X Zs))", "(app Xs Ys Zs)" ] ] }, "graph": { "nodes": { "11": { "goal": [{ "clause": 1, "scope": 2, "term": "(app X6 T7 T6)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T6"], "free": ["X6"], "exprvars": [] } }, "33": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "12": { "goal": [{ "clause": 2, "scope": 2, "term": "(app X6 T7 T6)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T6"], "free": ["X6"], "exprvars": [] } }, "2": { "goal": [{ "clause": -1, "scope": -1, "term": "(suffix T1 T2)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T2"], "free": [], "exprvars": [] } }, "36": { "goal": [{ "clause": -1, "scope": -1, "term": "(app X29 T22 T21)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T21"], "free": ["X29"], "exprvars": [] } }, "4": { "goal": [{ "clause": 0, "scope": 1, "term": "(suffix T1 T2)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T2"], "free": [], "exprvars": [] } }, "37": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "8": { "goal": [{ "clause": -1, "scope": -1, "term": "(app X6 T7 T6)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T6"], "free": ["X6"], "exprvars": [] } }, "19": { "goal": [{ "clause": -1, "scope": -1, "term": "(true)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "9": { "goal": [ { "clause": 1, "scope": 2, "term": "(app X6 T7 T6)" }, { "clause": 2, "scope": 2, "term": "(app X6 T7 T6)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T6"], "free": ["X6"], "exprvars": [] } }, "type": "Nodes", "32": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } } }, "edges": [ { "from": 2, "to": 4, "label": "CASE" }, { "from": 4, "to": 8, "label": "ONLY EVAL with clause\nsuffix(X4, X5) :- app(X6, X4, X5).\nand substitutionT1 -> T7,\nX4 -> T7,\nT2 -> T6,\nX5 -> T6,\nT5 -> T7" }, { "from": 8, "to": 9, "label": "CASE" }, { "from": 9, "to": 11, "label": "PARALLEL" }, { "from": 9, "to": 12, "label": "PARALLEL" }, { "from": 11, "to": 19, "label": "EVAL with clause\napp([], X11, X11).\nand substitutionX6 -> [],\nT7 -> T12,\nX11 -> T12,\nT6 -> T12" }, { "from": 11, "to": 32, "label": "EVAL-BACKTRACK" }, { "from": 12, "to": 36, "label": "EVAL with clause\napp(.(X24, X25), X26, .(X24, X27)) :- app(X25, X26, X27).\nand substitutionX24 -> T20,\nX25 -> X29,\nX6 -> .(T20, X29),\nT7 -> T22,\nX26 -> T22,\nX28 -> T20,\nX27 -> T21,\nT6 -> .(T20, T21),\nT19 -> T22" }, { "from": 12, "to": 37, "label": "EVAL-BACKTRACK" }, { "from": 19, "to": 33, "label": "SUCCESS" }, { "from": 36, "to": 8, "label": "INSTANCE with matching:\nX6 -> X29\nT7 -> T22\nT6 -> T21" } ], "type": "Graph" } } ---------------------------------------- (2) Obligation: Triples: appA(.(X1, X2), X3, .(X1, X4)) :- appA(X2, X3, X4). suffixB(X1, X2) :- appA(X3, X1, X2). Clauses: appcA([], X1, X1). appcA(.(X1, X2), X3, .(X1, X4)) :- appcA(X2, X3, X4). Afs: suffixB(x1, x2) = suffixB(x2) ---------------------------------------- (3) TriplesToPiDPProof (SOUND) We use the technique of [DT09]. With regard to the inferred argument filtering the predicates were used in the following modes: suffixB_in_2: (f,b) appA_in_3: (f,f,b) Transforming TRIPLES into the following Term Rewriting System: Pi DP problem: The TRS P consists of the following rules: SUFFIXB_IN_AG(X1, X2) -> U2_AG(X1, X2, appA_in_aag(X3, X1, X2)) SUFFIXB_IN_AG(X1, X2) -> APPA_IN_AAG(X3, X1, X2) APPA_IN_AAG(.(X1, X2), X3, .(X1, X4)) -> U1_AAG(X1, X2, X3, X4, appA_in_aag(X2, X3, X4)) APPA_IN_AAG(.(X1, X2), X3, .(X1, X4)) -> APPA_IN_AAG(X2, X3, X4) R is empty. The argument filtering Pi contains the following mapping: appA_in_aag(x1, x2, x3) = appA_in_aag(x3) .(x1, x2) = .(x1, x2) SUFFIXB_IN_AG(x1, x2) = SUFFIXB_IN_AG(x2) U2_AG(x1, x2, x3) = U2_AG(x2, x3) APPA_IN_AAG(x1, x2, x3) = APPA_IN_AAG(x3) U1_AAG(x1, x2, x3, x4, x5) = U1_AAG(x1, x4, x5) We have to consider all (P,R,Pi)-chains Infinitary Constructor Rewriting Termination of PiDP implies Termination of TRIPLES ---------------------------------------- (4) Obligation: Pi DP problem: The TRS P consists of the following rules: SUFFIXB_IN_AG(X1, X2) -> U2_AG(X1, X2, appA_in_aag(X3, X1, X2)) SUFFIXB_IN_AG(X1, X2) -> APPA_IN_AAG(X3, X1, X2) APPA_IN_AAG(.(X1, X2), X3, .(X1, X4)) -> U1_AAG(X1, X2, X3, X4, appA_in_aag(X2, X3, X4)) APPA_IN_AAG(.(X1, X2), X3, .(X1, X4)) -> APPA_IN_AAG(X2, X3, X4) R is empty. The argument filtering Pi contains the following mapping: appA_in_aag(x1, x2, x3) = appA_in_aag(x3) .(x1, x2) = .(x1, x2) SUFFIXB_IN_AG(x1, x2) = SUFFIXB_IN_AG(x2) U2_AG(x1, x2, x3) = U2_AG(x2, x3) APPA_IN_AAG(x1, x2, x3) = APPA_IN_AAG(x3) U1_AAG(x1, x2, x3, x4, x5) = U1_AAG(x1, x4, x5) We have to consider all (P,R,Pi)-chains ---------------------------------------- (5) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LOPSTR] contains 1 SCC with 3 less nodes. ---------------------------------------- (6) Obligation: Pi DP problem: The TRS P consists of the following rules: APPA_IN_AAG(.(X1, X2), X3, .(X1, X4)) -> APPA_IN_AAG(X2, X3, X4) R is empty. The argument filtering Pi contains the following mapping: .(x1, x2) = .(x1, x2) APPA_IN_AAG(x1, x2, x3) = APPA_IN_AAG(x3) We have to consider all (P,R,Pi)-chains ---------------------------------------- (7) PiDPToQDPProof (SOUND) Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. ---------------------------------------- (8) Obligation: Q DP problem: The TRS P consists of the following rules: APPA_IN_AAG(.(X1, X4)) -> APPA_IN_AAG(X4) R is empty. Q is empty. We have to consider all (P,Q,R)-chains. ---------------------------------------- (9) QDPSizeChangeProof (EQUIVALENT) By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs: *APPA_IN_AAG(.(X1, X4)) -> APPA_IN_AAG(X4) The graph contains the following edges 1 > 1 ---------------------------------------- (10) YES