/export/starexec/sandbox/solver/bin/starexec_run_standard /export/starexec/sandbox/benchmark/theBenchmark.pl /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- YES proof of /export/starexec/sandbox/benchmark/theBenchmark.pl # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty Left Termination of the query pattern p(g,a) w.r.t. the given Prolog program could successfully be proven: (0) Prolog (1) PrologToDTProblemTransformerProof [SOUND, 0 ms] (2) TRIPLES (3) TriplesToPiDPProof [SOUND, 3 ms] (4) PiDP (5) DependencyGraphProof [EQUIVALENT, 0 ms] (6) PiDP (7) PiDPToQDPProof [SOUND, 0 ms] (8) QDP (9) QDPSizeChangeProof [EQUIVALENT, 0 ms] (10) YES ---------------------------------------- (0) Obligation: Clauses: p(X, X). p(f(X), g(Y)) :- ','(p(f(X), f(Z)), p(Z, g(Y))). Query: p(g,a) ---------------------------------------- (1) PrologToDTProblemTransformerProof (SOUND) Built DT problem from termination graph DT10. { "root": 60, "program": { "directives": [], "clauses": [ [ "(p X X)", null ], [ "(p (f X) (g Y))", "(',' (p (f X) (f Z)) (p Z (g Y)))" ] ] }, "graph": { "nodes": { "type": "Nodes", "122": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "123": { "goal": [{ "clause": -1, "scope": -1, "term": "(',' (p (f T30) (f X25)) (p X25 (g T32)))" }], "kb": { "nonunifying": [[ "(p (f T30) T2)", "(p X2 X2)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T30"], "free": [ "X2", "X25" ], "exprvars": [] } }, "124": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "125": { "goal": [ { "clause": 0, "scope": 3, "term": "(',' (p (f T30) (f X25)) (p X25 (g T32)))" }, { "clause": 1, "scope": 3, "term": "(',' (p (f T30) (f X25)) (p X25 (g T32)))" } ], "kb": { "nonunifying": [[ "(p (f T30) T2)", "(p X2 X2)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T30"], "free": [ "X2", "X25" ], "exprvars": [] } }, "126": { "goal": [{ "clause": 0, "scope": 3, "term": "(',' (p (f T30) (f X25)) (p X25 (g T32)))" }], "kb": { "nonunifying": [[ "(p (f T30) T2)", "(p X2 X2)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T30"], "free": [ "X2", "X25" ], "exprvars": [] } }, "127": { "goal": [{ "clause": 1, "scope": 3, "term": "(',' (p (f T30) (f X25)) (p X25 (g T32)))" }], "kb": { "nonunifying": [[ "(p (f T30) T2)", "(p X2 X2)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T30"], "free": [ "X2", "X25" ], "exprvars": [] } }, "128": { "goal": [{ "clause": -1, "scope": -1, "term": "(p T45 (g T32))" }], "kb": { "nonunifying": [[ "(p (f T45) T2)", "(p X2 X2)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T45"], "free": ["X2"], "exprvars": [] } }, "91": { "goal": [{ "clause": 0, "scope": 2, "term": "(',' (p (f T7) (f X7)) (p X7 (g T9)))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T7"], "free": ["X7"], "exprvars": [] } }, "107": { "goal": [{ "clause": -1, "scope": -1, "term": "(p T22 (g T9))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T22"], "free": [], "exprvars": [] } }, "129": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "60": { "goal": [{ "clause": -1, "scope": -1, "term": "(p T1 T2)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": [], "exprvars": [] } }, "61": { "goal": [ { "clause": 0, "scope": 1, "term": "(p T1 T2)" }, { "clause": 1, "scope": 1, "term": "(p T1 T2)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": [], "exprvars": [] } }, "94": { "goal": [{ "clause": 1, "scope": 2, "term": "(',' (p (f T7) (f X7)) (p X7 (g T9)))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T7"], "free": ["X7"], "exprvars": [] } }, "62": { "goal": [ { "clause": -1, "scope": -1, "term": "(true)" }, { "clause": 1, "scope": 1, "term": "(p T4 T2)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T4"], "free": [], "exprvars": [] } }, "84": { "goal": [{ "clause": -1, "scope": -1, "term": "(',' (p (f T7) (f X7)) (p X7 (g T9)))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T7"], "free": ["X7"], "exprvars": [] } }, "63": { "goal": [{ "clause": 1, "scope": 1, "term": "(p T1 T2)" }], "kb": { "nonunifying": [[ "(p T1 T2)", "(p X2 X2)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": ["X2"], "exprvars": [] } }, "85": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "64": { "goal": [{ "clause": 1, "scope": 1, "term": "(p T4 T2)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T4"], "free": [], "exprvars": [] } }, "86": { "goal": [ { "clause": 0, "scope": 2, "term": "(',' (p (f T7) (f X7)) (p X7 (g T9)))" }, { "clause": 1, "scope": 2, "term": "(',' (p (f T7) (f X7)) (p X7 (g T9)))" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T7"], "free": ["X7"], "exprvars": [] } } }, "edges": [ { "from": 60, "to": 61, "label": "CASE" }, { "from": 61, "to": 62, "label": "EVAL with clause\np(X2, X2).\nand substitutionT1 -> T4,\nX2 -> T4,\nT2 -> T4" }, { "from": 61, "to": 63, "label": "EVAL-BACKTRACK" }, { "from": 62, "to": 64, "label": "SUCCESS" }, { "from": 63, "to": 123, "label": "EVAL with clause\np(f(X23), g(X24)) :- ','(p(f(X23), f(X25)), p(X25, g(X24))).\nand substitutionX23 -> T30,\nT1 -> f(T30),\nX24 -> T32,\nT2 -> g(T32),\nT31 -> T32" }, { "from": 63, "to": 124, "label": "EVAL-BACKTRACK" }, { "from": 64, "to": 84, "label": "EVAL with clause\np(f(X5), g(X6)) :- ','(p(f(X5), f(X7)), p(X7, g(X6))).\nand substitutionX5 -> T7,\nT4 -> f(T7),\nX6 -> T9,\nT2 -> g(T9),\nT8 -> T9" }, { "from": 64, "to": 85, "label": "EVAL-BACKTRACK" }, { "from": 84, "to": 86, "label": "CASE" }, { "from": 86, "to": 91, "label": "PARALLEL" }, { "from": 86, "to": 94, "label": "PARALLEL" }, { "from": 91, "to": 107, "label": "ONLY EVAL with clause\np(X16, X16).\nand substitutionT7 -> T22,\nX16 -> f(T22),\nX7 -> T22" }, { "from": 94, "to": 122, "label": "BACKTRACK\nfor clause: p(f(X), g(Y)) :- ','(p(f(X), f(Z)), p(Z, g(Y)))because of non-unification" }, { "from": 107, "to": 60, "label": "INSTANCE with matching:\nT1 -> T22\nT2 -> g(T9)" }, { "from": 123, "to": 125, "label": "CASE" }, { "from": 125, "to": 126, "label": "PARALLEL" }, { "from": 125, "to": 127, "label": "PARALLEL" }, { "from": 126, "to": 128, "label": "ONLY EVAL with clause\np(X34, X34).\nand substitutionT30 -> T45,\nX34 -> f(T45),\nX25 -> T45" }, { "from": 127, "to": 129, "label": "BACKTRACK\nfor clause: p(f(X), g(Y)) :- ','(p(f(X), f(Z)), p(Z, g(Y)))because of non-unification" }, { "from": 128, "to": 60, "label": "INSTANCE with matching:\nT1 -> T45\nT2 -> g(T32)" } ], "type": "Graph" } } ---------------------------------------- (2) Obligation: Triples: pA(f(X1), g(X2)) :- pA(X1, g(X2)). pA(f(X1), g(X2)) :- pA(X1, g(X2)). Clauses: pcA(X1, X1). pcA(f(X1), g(X2)) :- pcA(X1, g(X2)). pcA(f(X1), g(X2)) :- pcA(X1, g(X2)). Afs: pA(x1, x2) = pA(x1) ---------------------------------------- (3) TriplesToPiDPProof (SOUND) We use the technique of [DT09]. With regard to the inferred argument filtering the predicates were used in the following modes: pA_in_2: (b,f) (b,b) Transforming TRIPLES into the following Term Rewriting System: Pi DP problem: The TRS P consists of the following rules: PA_IN_GA(f(X1), g(X2)) -> U1_GA(X1, X2, pA_in_gg(X1, g(X2))) PA_IN_GA(f(X1), g(X2)) -> PA_IN_GG(X1, g(X2)) PA_IN_GG(f(X1), g(X2)) -> U1_GG(X1, X2, pA_in_gg(X1, g(X2))) PA_IN_GG(f(X1), g(X2)) -> PA_IN_GG(X1, g(X2)) R is empty. The argument filtering Pi contains the following mapping: f(x1) = f(x1) pA_in_gg(x1, x2) = pA_in_gg(x1, x2) g(x1) = g PA_IN_GA(x1, x2) = PA_IN_GA(x1) U1_GA(x1, x2, x3) = U1_GA(x1, x3) PA_IN_GG(x1, x2) = PA_IN_GG(x1, x2) U1_GG(x1, x2, x3) = U1_GG(x1, x3) 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: PA_IN_GA(f(X1), g(X2)) -> U1_GA(X1, X2, pA_in_gg(X1, g(X2))) PA_IN_GA(f(X1), g(X2)) -> PA_IN_GG(X1, g(X2)) PA_IN_GG(f(X1), g(X2)) -> U1_GG(X1, X2, pA_in_gg(X1, g(X2))) PA_IN_GG(f(X1), g(X2)) -> PA_IN_GG(X1, g(X2)) R is empty. The argument filtering Pi contains the following mapping: f(x1) = f(x1) pA_in_gg(x1, x2) = pA_in_gg(x1, x2) g(x1) = g PA_IN_GA(x1, x2) = PA_IN_GA(x1) U1_GA(x1, x2, x3) = U1_GA(x1, x3) PA_IN_GG(x1, x2) = PA_IN_GG(x1, x2) U1_GG(x1, x2, x3) = U1_GG(x1, x3) 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: PA_IN_GG(f(X1), g(X2)) -> PA_IN_GG(X1, g(X2)) R is empty. The argument filtering Pi contains the following mapping: f(x1) = f(x1) g(x1) = g PA_IN_GG(x1, x2) = PA_IN_GG(x1, x2) 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: PA_IN_GG(f(X1), g) -> PA_IN_GG(X1, g) 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: *PA_IN_GG(f(X1), g) -> PA_IN_GG(X1, g) The graph contains the following edges 1 > 1, 2 >= 2 ---------------------------------------- (10) YES