YES proof of /export/starexec/sandbox2/benchmark/theBenchmark.pl # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 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) TRUE ---------------------------------------- (0) Obligation: Clauses: p(X, Z) :- ','(q(X, Y), p(Y, Z)). p(X, X). q(a, b). Query: p(g,a) ---------------------------------------- (1) PrologToDTProblemTransformerProof (SOUND) Built DT problem from termination graph DT10. { "root": 1, "program": { "directives": [], "clauses": [ [ "(p X Z)", "(',' (q X Y) (p Y Z))" ], [ "(p X X)", null ], [ "(q (a) (b))", null ] ] }, "graph": { "nodes": { "44": { "goal": [{ "clause": -1, "scope": -1, "term": "(true)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "12": { "goal": [ { "clause": 2, "scope": 2, "term": "(',' (q T5 X5) (p X5 T7))" }, { "clause": -1, "scope": 2, "term": null }, { "clause": 1, "scope": 1, "term": "(p T5 T2)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T5"], "free": ["X5"], "exprvars": [] } }, "45": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "13": { "goal": [{ "clause": 2, "scope": 2, "term": "(',' (q T5 X5) (p X5 T7))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T5"], "free": ["X5"], "exprvars": [] } }, "46": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "14": { "goal": [ { "clause": -1, "scope": 2, "term": null }, { "clause": 1, "scope": 1, "term": "(p T5 T2)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T5"], "free": [], "exprvars": [] } }, "15": { "goal": [{ "clause": -1, "scope": -1, "term": "(p (b) T7)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "16": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "type": "Nodes", "1": { "goal": [{ "clause": -1, "scope": -1, "term": "(p T1 T2)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": [], "exprvars": [] } }, "2": { "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": [] } }, "9": { "goal": [ { "clause": -1, "scope": -1, "term": "(',' (q T5 X5) (p X5 T7))" }, { "clause": 1, "scope": 1, "term": "(p T5 T2)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T5"], "free": ["X5"], "exprvars": [] } }, "43": { "goal": [{ "clause": 1, "scope": 1, "term": "(p T5 T2)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T5"], "free": [], "exprvars": [] } } }, "edges": [ { "from": 1, "to": 2, "label": "CASE" }, { "from": 2, "to": 9, "label": "ONLY EVAL with clause\np(X3, X4) :- ','(q(X3, X5), p(X5, X4)).\nand substitutionT1 -> T5,\nX3 -> T5,\nT2 -> T7,\nX4 -> T7,\nT6 -> T7" }, { "from": 9, "to": 12, "label": "CASE" }, { "from": 12, "to": 13, "label": "PARALLEL" }, { "from": 12, "to": 14, "label": "PARALLEL" }, { "from": 13, "to": 15, "label": "EVAL with clause\nq(a, b).\nand substitutionT5 -> a,\nX5 -> b" }, { "from": 13, "to": 16, "label": "EVAL-BACKTRACK" }, { "from": 14, "to": 43, "label": "FAILURE" }, { "from": 15, "to": 1, "label": "INSTANCE with matching:\nT1 -> b\nT2 -> T7" }, { "from": 43, "to": 44, "label": "EVAL with clause\np(X11, X11).\nand substitutionT5 -> T11,\nX11 -> T11,\nT2 -> T11" }, { "from": 43, "to": 45, "label": "EVAL-BACKTRACK" }, { "from": 44, "to": 46, "label": "SUCCESS" } ], "type": "Graph" } } ---------------------------------------- (2) Obligation: Triples: pA(a, X1) :- pA(b, X1). Clauses: pcA(a, X1) :- pcA(b, X1). pcA(X1, X1). 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) Transforming TRIPLES into the following Term Rewriting System: Pi DP problem: The TRS P consists of the following rules: PA_IN_GA(a, X1) -> U1_GA(X1, pA_in_ga(b, X1)) PA_IN_GA(a, X1) -> PA_IN_GA(b, X1) R is empty. The argument filtering Pi contains the following mapping: pA_in_ga(x1, x2) = pA_in_ga(x1) a = a b = b PA_IN_GA(x1, x2) = PA_IN_GA(x1) U1_GA(x1, x2) = U1_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: PA_IN_GA(a, X1) -> U1_GA(X1, pA_in_ga(b, X1)) PA_IN_GA(a, X1) -> PA_IN_GA(b, X1) R is empty. The argument filtering Pi contains the following mapping: pA_in_ga(x1, x2) = pA_in_ga(x1) a = a b = b PA_IN_GA(x1, x2) = PA_IN_GA(x1) U1_GA(x1, x2) = U1_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 2 less nodes. ---------------------------------------- (6) TRUE