YES proof of /export/starexec/sandbox2/benchmark/theBenchmark.pl # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty Left Termination of the query pattern tc(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, 0 ms] (4) PiDP (5) DependencyGraphProof [EQUIVALENT, 0 ms] (6) TRUE ---------------------------------------- (0) Obligation: Clauses: p(a, b). p(b, c). tc(X, X). tc(X, Y) :- ','(p(X, Z), tc(Z, Y)). Query: tc(g,a) ---------------------------------------- (1) PrologToDTProblemTransformerProof (SOUND) Built DT problem from termination graph DT10. { "root": 1, "program": { "directives": [], "clauses": [ [ "(p (a) (b))", null ], [ "(p (b) (c))", null ], [ "(tc X X)", null ], [ "(tc X Y)", "(',' (p X Z) (tc Z Y))" ] ] }, "graph": { "nodes": { "16": { "goal": [ { "clause": -1, "scope": -1, "term": "(true)" }, { "clause": 3, "scope": 1, "term": "(tc T4 T2)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T4"], "free": [], "exprvars": [] } }, "17": { "goal": [{ "clause": 3, "scope": 1, "term": "(tc T1 T2)" }], "kb": { "nonunifying": [[ "(tc T1 T2)", "(tc X2 X2)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": ["X2"], "exprvars": [] } }, "type": "Nodes", "140": { "goal": [{ "clause": -1, "scope": -1, "term": "(',' (p T12 X16) (tc X16 T14))" }], "kb": { "nonunifying": [[ "(tc T12 T2)", "(tc X2 X2)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T12"], "free": [ "X2", "X16" ], "exprvars": [] } }, "141": { "goal": [ { "clause": 0, "scope": 3, "term": "(',' (p T12 X16) (tc X16 T14))" }, { "clause": 1, "scope": 3, "term": "(',' (p T12 X16) (tc X16 T14))" } ], "kb": { "nonunifying": [[ "(tc T12 T2)", "(tc X2 X2)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T12"], "free": [ "X2", "X16" ], "exprvars": [] } }, "152": { "goal": [{ "clause": -1, "scope": -1, "term": "(tc (b) T14)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "131": { "goal": [{ "clause": 3, "scope": 1, "term": "(tc T4 T2)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T4"], "free": [], "exprvars": [] } }, "142": { "goal": [{ "clause": 0, "scope": 3, "term": "(',' (p T12 X16) (tc X16 T14))" }], "kb": { "nonunifying": [[ "(tc T12 T2)", "(tc X2 X2)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T12"], "free": [ "X2", "X16" ], "exprvars": [] } }, "153": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "132": { "goal": [{ "clause": -1, "scope": -1, "term": "(',' (p T7 X7) (tc X7 T9))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T7"], "free": ["X7"], "exprvars": [] } }, "143": { "goal": [{ "clause": 1, "scope": 3, "term": "(',' (p T12 X16) (tc X16 T14))" }], "kb": { "nonunifying": [[ "(tc T12 T2)", "(tc X2 X2)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T12"], "free": [ "X2", "X16" ], "exprvars": [] } }, "154": { "goal": [{ "clause": -1, "scope": -1, "term": "(tc (c) T14)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "1": { "goal": [{ "clause": -1, "scope": -1, "term": "(tc T1 T2)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": [], "exprvars": [] } }, "133": { "goal": [ { "clause": 0, "scope": 2, "term": "(',' (p T7 X7) (tc X7 T9))" }, { "clause": 1, "scope": 2, "term": "(',' (p T7 X7) (tc X7 T9))" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T7"], "free": ["X7"], "exprvars": [] } }, "155": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "134": { "goal": [{ "clause": 0, "scope": 2, "term": "(',' (p T7 X7) (tc X7 T9))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T7"], "free": ["X7"], "exprvars": [] } }, "3": { "goal": [ { "clause": 2, "scope": 1, "term": "(tc T1 T2)" }, { "clause": 3, "scope": 1, "term": "(tc T1 T2)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": [], "exprvars": [] } }, "135": { "goal": [{ "clause": 1, "scope": 2, "term": "(',' (p T7 X7) (tc X7 T9))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T7"], "free": ["X7"], "exprvars": [] } }, "136": { "goal": [{ "clause": -1, "scope": -1, "term": "(tc (b) T9)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "137": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "138": { "goal": [{ "clause": -1, "scope": -1, "term": "(tc (c) T9)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "139": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } } }, "edges": [ { "from": 1, "to": 3, "label": "CASE" }, { "from": 3, "to": 16, "label": "EVAL with clause\ntc(X2, X2).\nand substitutionT1 -> T4,\nX2 -> T4,\nT2 -> T4" }, { "from": 3, "to": 17, "label": "EVAL-BACKTRACK" }, { "from": 16, "to": 131, "label": "SUCCESS" }, { "from": 17, "to": 140, "label": "ONLY EVAL with clause\ntc(X14, X15) :- ','(p(X14, X16), tc(X16, X15)).\nand substitutionT1 -> T12,\nX14 -> T12,\nT2 -> T14,\nX15 -> T14,\nT13 -> T14" }, { "from": 131, "to": 132, "label": "ONLY EVAL with clause\ntc(X5, X6) :- ','(p(X5, X7), tc(X7, X6)).\nand substitutionT4 -> T7,\nX5 -> T7,\nT2 -> T9,\nX6 -> T9,\nT8 -> T9" }, { "from": 132, "to": 133, "label": "CASE" }, { "from": 133, "to": 134, "label": "PARALLEL" }, { "from": 133, "to": 135, "label": "PARALLEL" }, { "from": 134, "to": 136, "label": "EVAL with clause\np(a, b).\nand substitutionT7 -> a,\nX7 -> b" }, { "from": 134, "to": 137, "label": "EVAL-BACKTRACK" }, { "from": 135, "to": 138, "label": "EVAL with clause\np(b, c).\nand substitutionT7 -> b,\nX7 -> c" }, { "from": 135, "to": 139, "label": "EVAL-BACKTRACK" }, { "from": 136, "to": 1, "label": "INSTANCE with matching:\nT1 -> b\nT2 -> T9" }, { "from": 138, "to": 1, "label": "INSTANCE with matching:\nT1 -> c\nT2 -> T9" }, { "from": 140, "to": 141, "label": "CASE" }, { "from": 141, "to": 142, "label": "PARALLEL" }, { "from": 141, "to": 143, "label": "PARALLEL" }, { "from": 142, "to": 152, "label": "EVAL with clause\np(a, b).\nand substitutionT12 -> a,\nX16 -> b" }, { "from": 142, "to": 153, "label": "EVAL-BACKTRACK" }, { "from": 143, "to": 154, "label": "EVAL with clause\np(b, c).\nand substitutionT12 -> b,\nX16 -> c" }, { "from": 143, "to": 155, "label": "EVAL-BACKTRACK" }, { "from": 152, "to": 1, "label": "INSTANCE with matching:\nT1 -> b\nT2 -> T14" }, { "from": 154, "to": 1, "label": "INSTANCE with matching:\nT1 -> c\nT2 -> T14" } ], "type": "Graph" } } ---------------------------------------- (2) Obligation: Triples: tcA(a, X1) :- tcA(b, X1). tcA(b, X1) :- tcA(c, X1). tcA(a, X1) :- tcA(b, X1). tcA(b, X1) :- tcA(c, X1). Clauses: tccA(X1, X1). tccA(a, X1) :- tccA(b, X1). tccA(b, X1) :- tccA(c, X1). tccA(a, X1) :- tccA(b, X1). tccA(b, X1) :- tccA(c, X1). Afs: tcA(x1, x2) = tcA(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: tcA_in_2: (b,f) Transforming TRIPLES into the following Term Rewriting System: Pi DP problem: The TRS P consists of the following rules: TCA_IN_GA(a, X1) -> U1_GA(X1, tcA_in_ga(b, X1)) TCA_IN_GA(a, X1) -> TCA_IN_GA(b, X1) TCA_IN_GA(b, X1) -> U2_GA(X1, tcA_in_ga(c, X1)) TCA_IN_GA(b, X1) -> TCA_IN_GA(c, X1) R is empty. The argument filtering Pi contains the following mapping: tcA_in_ga(x1, x2) = tcA_in_ga(x1) a = a b = b c = c TCA_IN_GA(x1, x2) = TCA_IN_GA(x1) U1_GA(x1, x2) = U1_GA(x2) U2_GA(x1, x2) = U2_GA(x2) 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: TCA_IN_GA(a, X1) -> U1_GA(X1, tcA_in_ga(b, X1)) TCA_IN_GA(a, X1) -> TCA_IN_GA(b, X1) TCA_IN_GA(b, X1) -> U2_GA(X1, tcA_in_ga(c, X1)) TCA_IN_GA(b, X1) -> TCA_IN_GA(c, X1) R is empty. The argument filtering Pi contains the following mapping: tcA_in_ga(x1, x2) = tcA_in_ga(x1) a = a b = b c = c TCA_IN_GA(x1, x2) = TCA_IN_GA(x1) U1_GA(x1, x2) = U1_GA(x2) U2_GA(x1, x2) = U2_GA(x2) We have to consider all (P,R,Pi)-chains ---------------------------------------- (5) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LOPSTR] contains 0 SCCs with 4 less nodes. ---------------------------------------- (6) TRUE