/export/starexec/sandbox2/solver/bin/starexec_run_standard /export/starexec/sandbox2/benchmark/theBenchmark.pl /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- YES proof of /export/starexec/sandbox2/benchmark/theBenchmark.pl # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty Left Termination of the query pattern fold(g,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) ATransformationProof [EQUIVALENT, 0 ms] (10) QDP (11) QDPSizeChangeProof [EQUIVALENT, 0 ms] (12) YES ---------------------------------------- (0) Obligation: Clauses: fold(X, [], Z) :- ','(!, eq(X, Z)). fold(X, Y, Z) :- ','(head(Y, H), ','(tail(Y, T), ','(myop(X, H, V), fold(V, T, Z)))). myop(a, b, a). head([], X1). head(.(H, X2), H). tail([], []). tail(.(X3, T), T). eq(X, X). Query: fold(g,g,a) ---------------------------------------- (1) PrologToDTProblemTransformerProof (SOUND) Built DT problem from termination graph DT10. { "root": 1, "program": { "directives": [], "clauses": [ [ "(fold X ([]) Z)", "(',' (!) (eq X Z))" ], [ "(fold X Y Z)", "(',' (head Y H) (',' (tail Y T) (',' (myop X H V) (fold V T Z))))" ], [ "(myop (a) (b) (a))", null ], [ "(head ([]) X1)", null ], [ "(head (. H X2) H)", null ], [ "(tail ([]) ([]))", null ], [ "(tail (. X3 T) T)", null ], [ "(eq X X)", null ] ] }, "graph": { "nodes": { "type": "Nodes", "282": { "goal": [ { "clause": -1, "scope": -1, "term": "(',' (!_1) (eq T6 T8))" }, { "clause": 1, "scope": 1, "term": "(fold T6 ([]) T3)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T6"], "free": [], "exprvars": [] } }, "293": { "goal": [{ "clause": -1, "scope": -1, "term": "(',' (head T16 X17) (',' (tail T16 X18) (',' (myop T15 X17 X19) (fold X19 X18 T18))))" }], "kb": { "nonunifying": [[ "(fold T15 T16 T3)", "(fold X6 ([]) X7)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T15", "T16" ], "free": [ "X6", "X7", "X17", "X18", "X19" ], "exprvars": [] } }, "284": { "goal": [{ "clause": 1, "scope": 1, "term": "(fold T1 T2 T3)" }], "kb": { "nonunifying": [[ "(fold T1 T2 T3)", "(fold X6 ([]) X7)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T1", "T2" ], "free": [ "X6", "X7" ], "exprvars": [] } }, "295": { "goal": [ { "clause": 3, "scope": 3, "term": "(',' (head T16 X17) (',' (tail T16 X18) (',' (myop T15 X17 X19) (fold X19 X18 T18))))" }, { "clause": 4, "scope": 3, "term": "(',' (head T16 X17) (',' (tail T16 X18) (',' (myop T15 X17 X19) (fold X19 X18 T18))))" } ], "kb": { "nonunifying": [[ "(fold T15 T16 T3)", "(fold X6 ([]) X7)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T15", "T16" ], "free": [ "X6", "X7", "X17", "X18", "X19" ], "exprvars": [] } }, "285": { "goal": [{ "clause": -1, "scope": -1, "term": "(eq T6 T8)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T6"], "free": [], "exprvars": [] } }, "286": { "goal": [{ "clause": 7, "scope": 2, "term": "(eq T6 T8)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T6"], "free": [], "exprvars": [] } }, "1": { "goal": [{ "clause": -1, "scope": -1, "term": "(fold T1 T2 T3)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T1", "T2" ], "free": [], "exprvars": [] } }, "287": { "goal": [{ "clause": -1, "scope": -1, "term": "(true)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "320": { "goal": [{ "clause": -1, "scope": -1, "term": "(',' (myop T15 T31 X19) (fold X19 T32 T18))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T15", "T31", "T32" ], "free": ["X19"], "exprvars": [] } }, "288": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "321": { "goal": [{ "clause": 2, "scope": 5, "term": "(',' (myop T15 T31 X19) (fold X19 T32 T18))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T15", "T31", "T32" ], "free": ["X19"], "exprvars": [] } }, "289": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "322": { "goal": [{ "clause": -1, "scope": -1, "term": "(fold (a) T32 T18)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T32"], "free": [], "exprvars": [] } }, "323": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "7": { "goal": [ { "clause": 0, "scope": 1, "term": "(fold T1 T2 T3)" }, { "clause": 1, "scope": 1, "term": "(fold T1 T2 T3)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T1", "T2" ], "free": [], "exprvars": [] } }, "315": { "goal": [{ "clause": 4, "scope": 3, "term": "(',' (head T16 X17) (',' (tail T16 X18) (',' (myop T15 X17 X19) (fold X19 X18 T18))))" }], "kb": { "nonunifying": [[ "(fold T15 T16 T3)", "(fold X6 ([]) X7)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T15", "T16" ], "free": [ "X6", "X7", "X17", "X18", "X19" ], "exprvars": [] } }, "316": { "goal": [{ "clause": -1, "scope": -1, "term": "(',' (tail (. T23 T24) X18) (',' (myop T15 T23 X19) (fold X19 X18 T18)))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T15", "T23", "T24" ], "free": [ "X18", "X19" ], "exprvars": [] } }, "317": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "318": { "goal": [ { "clause": 5, "scope": 4, "term": "(',' (tail (. T23 T24) X18) (',' (myop T15 T23 X19) (fold X19 X18 T18)))" }, { "clause": 6, "scope": 4, "term": "(',' (tail (. T23 T24) X18) (',' (myop T15 T23 X19) (fold X19 X18 T18)))" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T15", "T23", "T24" ], "free": [ "X18", "X19" ], "exprvars": [] } }, "319": { "goal": [{ "clause": 6, "scope": 4, "term": "(',' (tail (. T23 T24) X18) (',' (myop T15 T23 X19) (fold X19 X18 T18)))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T15", "T23", "T24" ], "free": [ "X18", "X19" ], "exprvars": [] } } }, "edges": [ { "from": 1, "to": 7, "label": "CASE" }, { "from": 7, "to": 282, "label": "EVAL with clause\nfold(X6, [], X7) :- ','(!_1, eq(X6, X7)).\nand substitutionT1 -> T6,\nX6 -> T6,\nT2 -> [],\nT3 -> T8,\nX7 -> T8,\nT7 -> T8" }, { "from": 7, "to": 284, "label": "EVAL-BACKTRACK" }, { "from": 282, "to": 285, "label": "CUT" }, { "from": 284, "to": 293, "label": "ONLY EVAL with clause\nfold(X14, X15, X16) :- ','(head(X15, X17), ','(tail(X15, X18), ','(myop(X14, X17, X19), fold(X19, X18, X16)))).\nand substitutionT1 -> T15,\nX14 -> T15,\nT2 -> T16,\nX15 -> T16,\nT3 -> T18,\nX16 -> T18,\nT17 -> T18" }, { "from": 285, "to": 286, "label": "CASE" }, { "from": 286, "to": 287, "label": "EVAL with clause\neq(X10, X10).\nand substitutionT6 -> T11,\nX10 -> T11,\nT8 -> T11" }, { "from": 286, "to": 288, "label": "EVAL-BACKTRACK" }, { "from": 287, "to": 289, "label": "SUCCESS" }, { "from": 293, "to": 295, "label": "CASE" }, { "from": 295, "to": 315, "label": "BACKTRACK\nfor clause: head([], X1)\nwith clash: (fold(T15, T16, T3), fold(X6, [], X7))" }, { "from": 315, "to": 316, "label": "EVAL with clause\nhead(.(X26, X27), X26).\nand substitutionX26 -> T23,\nX27 -> T24,\nT16 -> .(T23, T24),\nX17 -> T23" }, { "from": 315, "to": 317, "label": "EVAL-BACKTRACK" }, { "from": 316, "to": 318, "label": "CASE" }, { "from": 318, "to": 319, "label": "BACKTRACK\nfor clause: tail([], [])because of non-unification" }, { "from": 319, "to": 320, "label": "ONLY EVAL with clause\ntail(.(X38, X39), X39).\nand substitutionT23 -> T31,\nX38 -> T31,\nT24 -> T32,\nX39 -> T32,\nX18 -> T32" }, { "from": 320, "to": 321, "label": "CASE" }, { "from": 321, "to": 322, "label": "EVAL with clause\nmyop(a, b, a).\nand substitutionT15 -> a,\nT31 -> b,\nX19 -> a" }, { "from": 321, "to": 323, "label": "EVAL-BACKTRACK" }, { "from": 322, "to": 1, "label": "INSTANCE with matching:\nT1 -> a\nT2 -> T32\nT3 -> T18" } ], "type": "Graph" } } ---------------------------------------- (2) Obligation: Triples: foldA(a, .(b, X1), X2) :- foldA(a, X1, X2). Clauses: foldcA(X1, [], X1). foldcA(a, .(b, X1), X2) :- foldcA(a, X1, X2). Afs: foldA(x1, x2, x3) = foldA(x1, x2) ---------------------------------------- (3) TriplesToPiDPProof (SOUND) We use the technique of [DT09]. With regard to the inferred argument filtering the predicates were used in the following modes: foldA_in_3: (b,b,f) Transforming TRIPLES into the following Term Rewriting System: Pi DP problem: The TRS P consists of the following rules: FOLDA_IN_GGA(a, .(b, X1), X2) -> U1_GGA(X1, X2, foldA_in_gga(a, X1, X2)) FOLDA_IN_GGA(a, .(b, X1), X2) -> FOLDA_IN_GGA(a, X1, X2) R is empty. The argument filtering Pi contains the following mapping: foldA_in_gga(x1, x2, x3) = foldA_in_gga(x1, x2) a = a .(x1, x2) = .(x1, x2) b = b FOLDA_IN_GGA(x1, x2, x3) = FOLDA_IN_GGA(x1, x2) U1_GGA(x1, x2, x3) = U1_GGA(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: FOLDA_IN_GGA(a, .(b, X1), X2) -> U1_GGA(X1, X2, foldA_in_gga(a, X1, X2)) FOLDA_IN_GGA(a, .(b, X1), X2) -> FOLDA_IN_GGA(a, X1, X2) R is empty. The argument filtering Pi contains the following mapping: foldA_in_gga(x1, x2, x3) = foldA_in_gga(x1, x2) a = a .(x1, x2) = .(x1, x2) b = b FOLDA_IN_GGA(x1, x2, x3) = FOLDA_IN_GGA(x1, x2) U1_GGA(x1, x2, x3) = U1_GGA(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 1 less node. ---------------------------------------- (6) Obligation: Pi DP problem: The TRS P consists of the following rules: FOLDA_IN_GGA(a, .(b, X1), X2) -> FOLDA_IN_GGA(a, X1, X2) R is empty. The argument filtering Pi contains the following mapping: a = a .(x1, x2) = .(x1, x2) b = b FOLDA_IN_GGA(x1, x2, x3) = FOLDA_IN_GGA(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: FOLDA_IN_GGA(a, .(b, X1)) -> FOLDA_IN_GGA(a, X1) R is empty. Q is empty. We have to consider all (P,Q,R)-chains. ---------------------------------------- (9) ATransformationProof (EQUIVALENT) We have applied the A-Transformation [FROCOS05] to get from an applicative problem to a standard problem. ---------------------------------------- (10) Obligation: Q DP problem: The TRS P consists of the following rules: a(b(X1)) -> a(X1) R is empty. Q is empty. We have to consider all (P,Q,R)-chains. ---------------------------------------- (11) 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: *a(b(X1)) -> a(X1) The graph contains the following edges 1 > 1 ---------------------------------------- (12) YES