/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 len(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) PiDP (7) PiDPToQDPProof [SOUND, 0 ms] (8) QDP (9) QDPSizeChangeProof [EQUIVALENT, 0 ms] (10) YES ---------------------------------------- (0) Obligation: Clauses: len([], X) :- ','(!, eq(X, 0)). len(Xs, s(N)) :- ','(tail(Xs, Ys), len(Ys, N)). tail([], []). tail(.(X, Xs), Xs). eq(X, X). Query: len(g,a) ---------------------------------------- (1) PrologToDTProblemTransformerProof (SOUND) Built DT problem from termination graph DT10. { "root": 1, "program": { "directives": [], "clauses": [ [ "(len ([]) X)", "(',' (!) (eq X (0)))" ], [ "(len Xs (s N))", "(',' (tail Xs Ys) (len Ys N))" ], [ "(tail ([]) ([]))", null ], [ "(tail (. X Xs) Xs)", null ], [ "(eq X X)", null ] ] }, "graph": { "nodes": { "77": { "goal": [{ "clause": 4, "scope": 2, "term": "(eq T5 (0))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "88": { "goal": [{ "clause": -1, "scope": -1, "term": "(',' (tail T11 X10) (len X10 T13))" }], "kb": { "nonunifying": [[ "(len T11 T2)", "(len ([]) X2)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T11"], "free": [ "X2", "X10" ], "exprvars": [] } }, "79": { "goal": [{ "clause": -1, "scope": -1, "term": "(true)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "type": "Nodes", "1": { "goal": [{ "clause": -1, "scope": -1, "term": "(len T1 T2)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": [], "exprvars": [] } }, "5": { "goal": [ { "clause": 0, "scope": 1, "term": "(len T1 T2)" }, { "clause": 1, "scope": 1, "term": "(len T1 T2)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": [], "exprvars": [] } }, "90": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "80": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "91": { "goal": [ { "clause": 2, "scope": 3, "term": "(',' (tail T11 X10) (len X10 T13))" }, { "clause": 3, "scope": 3, "term": "(',' (tail T11 X10) (len X10 T13))" } ], "kb": { "nonunifying": [[ "(len T11 T2)", "(len ([]) X2)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T11"], "free": [ "X2", "X10" ], "exprvars": [] } }, "81": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "92": { "goal": [{ "clause": 3, "scope": 3, "term": "(',' (tail T11 X10) (len X10 T13))" }], "kb": { "nonunifying": [[ "(len T11 T2)", "(len ([]) X2)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T11"], "free": [ "X2", "X10" ], "exprvars": [] } }, "93": { "goal": [{ "clause": -1, "scope": -1, "term": "(len T19 T13)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T19"], "free": [], "exprvars": [] } }, "94": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "74": { "goal": [ { "clause": -1, "scope": -1, "term": "(',' (!_1) (eq T5 (0)))" }, { "clause": 1, "scope": 1, "term": "(len ([]) T2)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "75": { "goal": [{ "clause": 1, "scope": 1, "term": "(len T1 T2)" }], "kb": { "nonunifying": [[ "(len T1 T2)", "(len ([]) X2)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": ["X2"], "exprvars": [] } }, "76": { "goal": [{ "clause": -1, "scope": -1, "term": "(eq T5 (0))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } } }, "edges": [ { "from": 1, "to": 5, "label": "CASE" }, { "from": 5, "to": 74, "label": "EVAL with clause\nlen([], X2) :- ','(!_1, eq(X2, 0)).\nand substitutionT1 -> [],\nT2 -> T5,\nX2 -> T5,\nT4 -> T5" }, { "from": 5, "to": 75, "label": "EVAL-BACKTRACK" }, { "from": 74, "to": 76, "label": "CUT" }, { "from": 75, "to": 88, "label": "EVAL with clause\nlen(X8, s(X9)) :- ','(tail(X8, X10), len(X10, X9)).\nand substitutionT1 -> T11,\nX8 -> T11,\nX9 -> T13,\nT2 -> s(T13),\nT12 -> T13" }, { "from": 75, "to": 90, "label": "EVAL-BACKTRACK" }, { "from": 76, "to": 77, "label": "CASE" }, { "from": 77, "to": 79, "label": "EVAL with clause\neq(X5, X5).\nand substitutionT5 -> 0,\nX5 -> 0,\nT8 -> 0" }, { "from": 77, "to": 80, "label": "EVAL-BACKTRACK" }, { "from": 79, "to": 81, "label": "SUCCESS" }, { "from": 88, "to": 91, "label": "CASE" }, { "from": 91, "to": 92, "label": "BACKTRACK\nfor clause: tail([], [])\nwith clash: (len(T11, T2), len([], X2))" }, { "from": 92, "to": 93, "label": "EVAL with clause\ntail(.(X15, X16), X16).\nand substitutionX15 -> T18,\nX16 -> T19,\nT11 -> .(T18, T19),\nX10 -> T19" }, { "from": 92, "to": 94, "label": "EVAL-BACKTRACK" }, { "from": 93, "to": 1, "label": "INSTANCE with matching:\nT1 -> T19\nT2 -> T13" } ], "type": "Graph" } } ---------------------------------------- (2) Obligation: Triples: lenA(.(X1, X2), s(X3)) :- lenA(X2, X3). Clauses: lencA([], 0). lencA(.(X1, X2), s(X3)) :- lencA(X2, X3). Afs: lenA(x1, x2) = lenA(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: lenA_in_2: (b,f) Transforming TRIPLES into the following Term Rewriting System: Pi DP problem: The TRS P consists of the following rules: LENA_IN_GA(.(X1, X2), s(X3)) -> U1_GA(X1, X2, X3, lenA_in_ga(X2, X3)) LENA_IN_GA(.(X1, X2), s(X3)) -> LENA_IN_GA(X2, X3) R is empty. The argument filtering Pi contains the following mapping: lenA_in_ga(x1, x2) = lenA_in_ga(x1) .(x1, x2) = .(x1, x2) s(x1) = s(x1) LENA_IN_GA(x1, x2) = LENA_IN_GA(x1) U1_GA(x1, x2, x3, x4) = U1_GA(x1, x2, x4) 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: LENA_IN_GA(.(X1, X2), s(X3)) -> U1_GA(X1, X2, X3, lenA_in_ga(X2, X3)) LENA_IN_GA(.(X1, X2), s(X3)) -> LENA_IN_GA(X2, X3) R is empty. The argument filtering Pi contains the following mapping: lenA_in_ga(x1, x2) = lenA_in_ga(x1) .(x1, x2) = .(x1, x2) s(x1) = s(x1) LENA_IN_GA(x1, x2) = LENA_IN_GA(x1) U1_GA(x1, x2, x3, x4) = U1_GA(x1, x2, x4) We have to consider all (P,R,Pi)-chains ---------------------------------------- (5) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LOPSTR] contains 1 SCC with 1 less node. ---------------------------------------- (6) Obligation: Pi DP problem: The TRS P consists of the following rules: LENA_IN_GA(.(X1, X2), s(X3)) -> LENA_IN_GA(X2, X3) R is empty. The argument filtering Pi contains the following mapping: .(x1, x2) = .(x1, x2) s(x1) = s(x1) LENA_IN_GA(x1, x2) = LENA_IN_GA(x1) 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: LENA_IN_GA(.(X1, X2)) -> LENA_IN_GA(X2) 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: *LENA_IN_GA(.(X1, X2)) -> LENA_IN_GA(X2) The graph contains the following edges 1 > 1 ---------------------------------------- (10) YES