/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 append(g,a,a) w.r.t. the given Prolog program could successfully be proven: (0) Prolog (1) BuiltinConflictTransformerProof [EQUIVALENT, 0 ms] (2) Prolog (3) PrologToDTProblemTransformerProof [SOUND, 0 ms] (4) TRIPLES (5) TriplesToPiDPProof [SOUND, 0 ms] (6) PiDP (7) DependencyGraphProof [EQUIVALENT, 0 ms] (8) PiDP (9) PiDPToQDPProof [SOUND, 0 ms] (10) QDP (11) QDPSizeChangeProof [EQUIVALENT, 0 ms] (12) YES ---------------------------------------- (0) Obligation: Clauses: append(X, Y, Z) :- ','(=(X, []), ','(!, =(Y, Z))). append(X, Y, Z) :- ','(=(X, .(H, Xs)), ','(!, ','(=(Z, .(H, Zs)), append(Xs, Y, Zs)))). =(X, X). Query: append(g,a,a) ---------------------------------------- (1) BuiltinConflictTransformerProof (EQUIVALENT) Renamed defined predicates conflicting with built-in predicates [PROLOG]. ---------------------------------------- (2) Obligation: Clauses: append(X, Y, Z) :- ','(user_defined_=(X, []), ','(!, user_defined_=(Y, Z))). append(X, Y, Z) :- ','(user_defined_=(X, .(H, Xs)), ','(!, ','(user_defined_=(Z, .(H, Zs)), append(Xs, Y, Zs)))). user_defined_=(X, X). Query: append(g,a,a) ---------------------------------------- (3) PrologToDTProblemTransformerProof (SOUND) Built DT problem from termination graph DT10. { "root": 1, "program": { "directives": [], "clauses": [ [ "(append X Y Z)", "(',' (user_defined_= X ([])) (',' (!) (user_defined_= Y Z)))" ], [ "(append X Y Z)", "(',' (user_defined_= X (. H Xs)) (',' (!) (',' (user_defined_= Z (. H Zs)) (append Xs Y Zs))))" ], [ "(user_defined_= X X)", null ] ] }, "graph": { "nodes": { "35": { "goal": [ { "clause": 2, "scope": 2, "term": "(',' (user_defined_= T7 ([])) (',' (!_1) (user_defined_= T10 T11)))" }, { "clause": -1, "scope": 2, "term": null }, { "clause": 1, "scope": 1, "term": "(append T7 T2 T3)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T7"], "free": [], "exprvars": [] } }, "25": { "goal": [ { "clause": -1, "scope": -1, "term": "(',' (user_defined_= T7 ([])) (',' (!_1) (user_defined_= T10 T11)))" }, { "clause": 1, "scope": 1, "term": "(append T7 T2 T3)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T7"], "free": [], "exprvars": [] } }, "type": "Nodes", "150": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "161": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "151": { "goal": [{ "clause": -1, "scope": -1, "term": "(',' (user_defined_= T29 (. T38 X27)) (append T39 T30 X27))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T38", "T39" ], "free": ["X27"], "exprvars": [] } }, "141": { "goal": [{ "clause": -1, "scope": -1, "term": "(',' (user_defined_= T26 (. X25 X26)) (',' (!_1) (',' (user_defined_= T29 (. X25 X27)) (append X26 T30 X27))))" }], "kb": { "nonunifying": [[ "(user_defined_= T26 ([]))", "(user_defined_= X9 X9)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T26"], "free": [ "X9", "X25", "X26", "X27" ], "exprvars": [] } }, "152": { "goal": [{ "clause": 2, "scope": 5, "term": "(',' (user_defined_= T29 (. T38 X27)) (append T39 T30 X27))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T38", "T39" ], "free": ["X27"], "exprvars": [] } }, "142": { "goal": [{ "clause": 2, "scope": 4, "term": "(',' (user_defined_= T26 (. X25 X26)) (',' (!_1) (',' (user_defined_= T29 (. X25 X27)) (append X26 T30 X27))))" }], "kb": { "nonunifying": [[ "(user_defined_= T26 ([]))", "(user_defined_= X9 X9)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T26"], "free": [ "X9", "X25", "X26", "X27" ], "exprvars": [] } }, "1": { "goal": [{ "clause": -1, "scope": -1, "term": "(append T1 T2 T3)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": [], "exprvars": [] } }, "100": { "goal": [{ "clause": -1, "scope": -1, "term": "(user_defined_= T10 T11)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "101": { "goal": [{ "clause": 2, "scope": 3, "term": "(user_defined_= T10 T11)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "3": { "goal": [ { "clause": 0, "scope": 1, "term": "(append T1 T2 T3)" }, { "clause": 1, "scope": 1, "term": "(append T1 T2 T3)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": [], "exprvars": [] } }, "102": { "goal": [{ "clause": -1, "scope": -1, "term": "(true)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "157": { "goal": [{ "clause": -1, "scope": -1, "term": "(append T39 T51 T52)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T39"], "free": [], "exprvars": [] } }, "103": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "147": { "goal": [{ "clause": -1, "scope": -1, "term": "(',' (!_1) (',' (user_defined_= T29 (. T38 X27)) (append T39 T30 X27)))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T38", "T39" ], "free": ["X27"], "exprvars": [] } }, "104": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "105": { "goal": [{ "clause": 1, "scope": 1, "term": "(append T7 T2 T3)" }], "kb": { "nonunifying": [[ "(user_defined_= T7 ([]))", "(user_defined_= X9 X9)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T7"], "free": ["X9"], "exprvars": [] } }, "74": { "goal": [ { "clause": -1, "scope": -1, "term": "(',' (!_1) (user_defined_= T10 T11))" }, { "clause": -1, "scope": 2, "term": null }, { "clause": 1, "scope": 1, "term": "(append ([]) T2 T3)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "85": { "goal": [ { "clause": -1, "scope": 2, "term": null }, { "clause": 1, "scope": 1, "term": "(append T7 T2 T3)" } ], "kb": { "nonunifying": [[ "(user_defined_= T7 ([]))", "(user_defined_= X9 X9)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T7"], "free": ["X9"], "exprvars": [] } } }, "edges": [ { "from": 1, "to": 3, "label": "CASE" }, { "from": 3, "to": 25, "label": "ONLY EVAL with clause\nappend(X4, X5, X6) :- ','(user_defined_=(X4, []), ','(!_1, user_defined_=(X5, X6))).\nand substitutionT1 -> T7,\nX4 -> T7,\nT2 -> T10,\nX5 -> T10,\nT3 -> T11,\nX6 -> T11,\nT8 -> T10,\nT9 -> T11" }, { "from": 25, "to": 35, "label": "CASE" }, { "from": 35, "to": 74, "label": "EVAL with clause\nuser_defined_=(X9, X9).\nand substitutionT7 -> [],\nX9 -> [],\nT14 -> []" }, { "from": 35, "to": 85, "label": "EVAL-BACKTRACK" }, { "from": 74, "to": 100, "label": "CUT" }, { "from": 85, "to": 105, "label": "FAILURE" }, { "from": 100, "to": 101, "label": "CASE" }, { "from": 101, "to": 102, "label": "EVAL with clause\nuser_defined_=(X12, X12).\nand substitutionT10 -> T17,\nX12 -> T17,\nT11 -> T17" }, { "from": 101, "to": 103, "label": "EVAL-BACKTRACK" }, { "from": 102, "to": 104, "label": "SUCCESS" }, { "from": 105, "to": 141, "label": "ONLY EVAL with clause\nappend(X22, X23, X24) :- ','(user_defined_=(X22, .(X25, X26)), ','(!_1, ','(user_defined_=(X24, .(X25, X27)), append(X26, X23, X27)))).\nand substitutionT7 -> T26,\nX22 -> T26,\nT2 -> T30,\nX23 -> T30,\nT3 -> T29,\nX24 -> T29,\nT28 -> T29,\nT27 -> T30" }, { "from": 141, "to": 142, "label": "CASE" }, { "from": 142, "to": 147, "label": "EVAL with clause\nuser_defined_=(X30, X30).\nand substitutionT26 -> .(T38, T39),\nX30 -> .(T38, T39),\nX25 -> T38,\nX26 -> T39,\nT37 -> .(T38, T39)" }, { "from": 142, "to": 150, "label": "EVAL-BACKTRACK" }, { "from": 147, "to": 151, "label": "CUT" }, { "from": 151, "to": 152, "label": "CASE" }, { "from": 152, "to": 157, "label": "EVAL with clause\nuser_defined_=(X37, X37).\nand substitutionT29 -> .(T49, T52),\nX37 -> .(T49, T52),\nT38 -> T49,\nX27 -> T52,\nT48 -> .(T49, T52),\nT30 -> T51,\nT50 -> T52" }, { "from": 152, "to": 161, "label": "EVAL-BACKTRACK" }, { "from": 157, "to": 1, "label": "INSTANCE with matching:\nT1 -> T39\nT2 -> T51\nT3 -> T52" } ], "type": "Graph" } } ---------------------------------------- (4) Obligation: Triples: appendA(.(X1, X2), X3, .(X1, X4)) :- appendA(X2, X3, X4). Clauses: appendcA([], X1, X1). appendcA(.(X1, X2), X3, .(X1, X4)) :- appendcA(X2, X3, X4). Afs: appendA(x1, x2, x3) = appendA(x1) ---------------------------------------- (5) TriplesToPiDPProof (SOUND) We use the technique of [DT09]. With regard to the inferred argument filtering the predicates were used in the following modes: appendA_in_3: (b,f,f) Transforming TRIPLES into the following Term Rewriting System: Pi DP problem: The TRS P consists of the following rules: APPENDA_IN_GAA(.(X1, X2), X3, .(X1, X4)) -> U1_GAA(X1, X2, X3, X4, appendA_in_gaa(X2, X3, X4)) APPENDA_IN_GAA(.(X1, X2), X3, .(X1, X4)) -> APPENDA_IN_GAA(X2, X3, X4) R is empty. The argument filtering Pi contains the following mapping: appendA_in_gaa(x1, x2, x3) = appendA_in_gaa(x1) .(x1, x2) = .(x1, x2) APPENDA_IN_GAA(x1, x2, x3) = APPENDA_IN_GAA(x1) U1_GAA(x1, x2, x3, x4, x5) = U1_GAA(x1, x2, x5) We have to consider all (P,R,Pi)-chains Infinitary Constructor Rewriting Termination of PiDP implies Termination of TRIPLES ---------------------------------------- (6) Obligation: Pi DP problem: The TRS P consists of the following rules: APPENDA_IN_GAA(.(X1, X2), X3, .(X1, X4)) -> U1_GAA(X1, X2, X3, X4, appendA_in_gaa(X2, X3, X4)) APPENDA_IN_GAA(.(X1, X2), X3, .(X1, X4)) -> APPENDA_IN_GAA(X2, X3, X4) R is empty. The argument filtering Pi contains the following mapping: appendA_in_gaa(x1, x2, x3) = appendA_in_gaa(x1) .(x1, x2) = .(x1, x2) APPENDA_IN_GAA(x1, x2, x3) = APPENDA_IN_GAA(x1) U1_GAA(x1, x2, x3, x4, x5) = U1_GAA(x1, x2, x5) We have to consider all (P,R,Pi)-chains ---------------------------------------- (7) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LOPSTR] contains 1 SCC with 1 less node. ---------------------------------------- (8) Obligation: Pi DP problem: The TRS P consists of the following rules: APPENDA_IN_GAA(.(X1, X2), X3, .(X1, X4)) -> APPENDA_IN_GAA(X2, X3, X4) R is empty. The argument filtering Pi contains the following mapping: .(x1, x2) = .(x1, x2) APPENDA_IN_GAA(x1, x2, x3) = APPENDA_IN_GAA(x1) We have to consider all (P,R,Pi)-chains ---------------------------------------- (9) PiDPToQDPProof (SOUND) Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. ---------------------------------------- (10) Obligation: Q DP problem: The TRS P consists of the following rules: APPENDA_IN_GAA(.(X1, X2)) -> APPENDA_IN_GAA(X2) 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: *APPENDA_IN_GAA(.(X1, X2)) -> APPENDA_IN_GAA(X2) The graph contains the following edges 1 > 1 ---------------------------------------- (12) YES