/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, 4 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(W))). Query: p(g,a) ---------------------------------------- (1) PrologToDTProblemTransformerProof (SOUND) Built DT problem from termination graph DT10. { "root": 11, "program": { "directives": [], "clauses": [ [ "(p X X)", null ], [ "(p (f X) (g Y))", "(',' (p (f X) (f Z)) (p Z (g W)))" ] ] }, "graph": { "nodes": { "11": { "goal": [{ "clause": -1, "scope": -1, "term": "(p T1 T2)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": [], "exprvars": [] } }, "12": { "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": [] } }, "type": "Nodes", "131": { "goal": [{ "clause": -1, "scope": -1, "term": "(',' (p (f T29) (f X26)) (p X26 (g X27)))" }], "kb": { "nonunifying": [[ "(p (f T29) T2)", "(p X2 X2)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T29"], "free": [ "X2", "X26", "X27" ], "exprvars": [] } }, "132": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "111": { "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": [] } }, "122": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "133": { "goal": [ { "clause": 0, "scope": 3, "term": "(',' (p (f T29) (f X26)) (p X26 (g X27)))" }, { "clause": 1, "scope": 3, "term": "(',' (p (f T29) (f X26)) (p X26 (g X27)))" } ], "kb": { "nonunifying": [[ "(p (f T29) T2)", "(p X2 X2)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T29"], "free": [ "X2", "X26", "X27" ], "exprvars": [] } }, "112": { "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": [] } }, "134": { "goal": [{ "clause": 0, "scope": 3, "term": "(',' (p (f T29) (f X26)) (p X26 (g X27)))" }], "kb": { "nonunifying": [[ "(p (f T29) T2)", "(p X2 X2)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T29"], "free": [ "X2", "X26", "X27" ], "exprvars": [] } }, "113": { "goal": [{ "clause": 1, "scope": 1, "term": "(p T4 T2)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T4"], "free": [], "exprvars": [] } }, "135": { "goal": [{ "clause": 1, "scope": 3, "term": "(',' (p (f T29) (f X26)) (p X26 (g X27)))" }], "kb": { "nonunifying": [[ "(p (f T29) T2)", "(p X2 X2)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T29"], "free": [ "X2", "X26", "X27" ], "exprvars": [] } }, "114": { "goal": [{ "clause": -1, "scope": -1, "term": "(',' (p (f T7) (f X7)) (p X7 (g X8)))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T7"], "free": [ "X7", "X8" ], "exprvars": [] } }, "136": { "goal": [{ "clause": -1, "scope": -1, "term": "(p T43 (g X27))" }], "kb": { "nonunifying": [[ "(p (f T43) T2)", "(p X2 X2)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T43"], "free": [ "X2", "X27" ], "exprvars": [] } }, "115": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "137": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "116": { "goal": [ { "clause": 0, "scope": 2, "term": "(',' (p (f T7) (f X7)) (p X7 (g X8)))" }, { "clause": 1, "scope": 2, "term": "(',' (p (f T7) (f X7)) (p X7 (g X8)))" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T7"], "free": [ "X7", "X8" ], "exprvars": [] } }, "117": { "goal": [{ "clause": 0, "scope": 2, "term": "(',' (p (f T7) (f X7)) (p X7 (g X8)))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T7"], "free": [ "X7", "X8" ], "exprvars": [] } }, "118": { "goal": [{ "clause": 1, "scope": 2, "term": "(',' (p (f T7) (f X7)) (p X7 (g X8)))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T7"], "free": [ "X7", "X8" ], "exprvars": [] } }, "119": { "goal": [{ "clause": -1, "scope": -1, "term": "(p T21 (g X8))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T21"], "free": ["X8"], "exprvars": [] } } }, "edges": [ { "from": 11, "to": 12, "label": "CASE" }, { "from": 12, "to": 111, "label": "EVAL with clause\np(X2, X2).\nand substitutionT1 -> T4,\nX2 -> T4,\nT2 -> T4" }, { "from": 12, "to": 112, "label": "EVAL-BACKTRACK" }, { "from": 111, "to": 113, "label": "SUCCESS" }, { "from": 112, "to": 131, "label": "EVAL with clause\np(f(X24), g(X25)) :- ','(p(f(X24), f(X26)), p(X26, g(X27))).\nand substitutionX24 -> T29,\nT1 -> f(T29),\nX25 -> T30,\nT2 -> g(T30)" }, { "from": 112, "to": 132, "label": "EVAL-BACKTRACK" }, { "from": 113, "to": 114, "label": "EVAL with clause\np(f(X5), g(X6)) :- ','(p(f(X5), f(X7)), p(X7, g(X8))).\nand substitutionX5 -> T7,\nT4 -> f(T7),\nX6 -> T8,\nT2 -> g(T8)" }, { "from": 113, "to": 115, "label": "EVAL-BACKTRACK" }, { "from": 114, "to": 116, "label": "CASE" }, { "from": 116, "to": 117, "label": "PARALLEL" }, { "from": 116, "to": 118, "label": "PARALLEL" }, { "from": 117, "to": 119, "label": "ONLY EVAL with clause\np(X17, X17).\nand substitutionT7 -> T21,\nX17 -> f(T21),\nX7 -> T21" }, { "from": 118, "to": 122, "label": "BACKTRACK\nfor clause: p(f(X), g(Y)) :- ','(p(f(X), f(Z)), p(Z, g(W)))because of non-unification" }, { "from": 119, "to": 11, "label": "INSTANCE with matching:\nT1 -> T21\nT2 -> g(X8)" }, { "from": 131, "to": 133, "label": "CASE" }, { "from": 133, "to": 134, "label": "PARALLEL" }, { "from": 133, "to": 135, "label": "PARALLEL" }, { "from": 134, "to": 136, "label": "ONLY EVAL with clause\np(X36, X36).\nand substitutionT29 -> T43,\nX36 -> f(T43),\nX26 -> T43" }, { "from": 135, "to": 137, "label": "BACKTRACK\nfor clause: p(f(X), g(Y)) :- ','(p(f(X), f(Z)), p(Z, g(W)))because of non-unification" }, { "from": 136, "to": 11, "label": "INSTANCE with matching:\nT1 -> T43\nT2 -> g(X27)" } ], "type": "Graph" } } ---------------------------------------- (2) Obligation: Triples: pA(f(X1), g(X2)) :- pA(X1, g(X3)). pA(f(X1), g(X2)) :- pA(X1, g(X3)). Clauses: pcA(X1, X1). pcA(f(X1), g(X2)) :- pcA(X1, g(X3)). pcA(f(X1), g(X2)) :- pcA(X1, g(X3)). 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(X3))) PA_IN_GA(f(X1), g(X2)) -> PA_IN_GG(X1, g(X3)) PA_IN_GG(f(X1), g(X2)) -> U1_GG(X1, X2, pA_in_gg(X1, g(X3))) PA_IN_GG(f(X1), g(X2)) -> PA_IN_GG(X1, g(X3)) 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(X3))) PA_IN_GA(f(X1), g(X2)) -> PA_IN_GG(X1, g(X3)) PA_IN_GG(f(X1), g(X2)) -> U1_GG(X1, X2, pA_in_gg(X1, g(X3))) PA_IN_GG(f(X1), g(X2)) -> PA_IN_GG(X1, g(X3)) 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(X3)) 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