/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: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty Left Termination of the query pattern map(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: p(X, Y). map(.(X, Xs), .(Y, Ys)) :- ','(p(X, Y), map(Xs, Ys)). map([], []). Query: map(g,a) ---------------------------------------- (1) PrologToDTProblemTransformerProof (SOUND) Built DT problem from termination graph DT10. { "root": 3, "program": { "directives": [], "clauses": [ [ "(p X Y)", null ], [ "(map (. X Xs) (. Y Ys))", "(',' (p X Y) (map Xs Ys))" ], [ "(map ([]) ([]))", null ] ] }, "graph": { "nodes": { "89": { "goal": [ { "clause": 1, "scope": 1, "term": "(map T1 T2)" }, { "clause": 2, "scope": 1, "term": "(map T1 T2)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": [], "exprvars": [] } }, "160": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "type": "Nodes", "150": { "goal": [{ "clause": 2, "scope": 1, "term": "(map (. T7 T8) T2)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T7", "T8" ], "free": [], "exprvars": [] } }, "143": { "goal": [ { "clause": -1, "scope": -1, "term": "(',' (p T7 T11) (map T8 T12))" }, { "clause": 2, "scope": 1, "term": "(map (. T7 T8) T2)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T7", "T8" ], "free": [], "exprvars": [] } }, "144": { "goal": [{ "clause": 2, "scope": 1, "term": "(map T1 T2)" }], "kb": { "nonunifying": [[ "(map T1 T2)", "(map (. X5 X6) (. X7 X8))" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": [ "X5", "X6", "X7", "X8" ], "exprvars": [] } }, "155": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "145": { "goal": [ { "clause": 0, "scope": 2, "term": "(',' (p T7 T11) (map T8 T12))" }, { "clause": -1, "scope": 2, "term": null }, { "clause": 2, "scope": 1, "term": "(map (. T7 T8) T2)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T7", "T8" ], "free": [], "exprvars": [] } }, "3": { "goal": [{ "clause": -1, "scope": -1, "term": "(map T1 T2)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": [], "exprvars": [] } }, "147": { "goal": [{ "clause": 0, "scope": 2, "term": "(',' (p T7 T11) (map T8 T12))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T7", "T8" ], "free": [], "exprvars": [] } }, "158": { "goal": [{ "clause": -1, "scope": -1, "term": "(true)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "148": { "goal": [ { "clause": -1, "scope": 2, "term": null }, { "clause": 2, "scope": 1, "term": "(map (. T7 T8) T2)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [ "T7", "T8" ], "free": [], "exprvars": [] } }, "159": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "149": { "goal": [{ "clause": -1, "scope": -1, "term": "(map T8 T33)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T8"], "free": [], "exprvars": [] } } }, "edges": [ { "from": 3, "to": 89, "label": "CASE" }, { "from": 89, "to": 143, "label": "EVAL with clause\nmap(.(X5, X6), .(X7, X8)) :- ','(p(X5, X7), map(X6, X8)).\nand substitutionX5 -> T7,\nX6 -> T8,\nT1 -> .(T7, T8),\nX7 -> T11,\nX8 -> T12,\nT2 -> .(T11, T12),\nT9 -> T11,\nT10 -> T12" }, { "from": 89, "to": 144, "label": "EVAL-BACKTRACK" }, { "from": 143, "to": 145, "label": "CASE" }, { "from": 144, "to": 158, "label": "EVAL with clause\nmap([], []).\nand substitutionT1 -> [],\nT2 -> []" }, { "from": 144, "to": 159, "label": "EVAL-BACKTRACK" }, { "from": 145, "to": 147, "label": "PARALLEL" }, { "from": 145, "to": 148, "label": "PARALLEL" }, { "from": 147, "to": 149, "label": "ONLY EVAL with clause\np(X25, X26).\nand substitutionT7 -> T31,\nX25 -> T31,\nT11 -> T32,\nX26 -> T32,\nT12 -> T33" }, { "from": 148, "to": 150, "label": "FAILURE" }, { "from": 149, "to": 3, "label": "INSTANCE with matching:\nT1 -> T8\nT2 -> T33" }, { "from": 150, "to": 155, "label": "BACKTRACK\nfor clause: map([], [])because of non-unification" }, { "from": 158, "to": 160, "label": "SUCCESS" } ], "type": "Graph" } } ---------------------------------------- (2) Obligation: Triples: mapA(.(X1, X2), .(X3, X4)) :- mapA(X2, X4). Clauses: mapcA(.(X1, X2), .(X3, X4)) :- mapcA(X2, X4). mapcA([], []). Afs: mapA(x1, x2) = mapA(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: mapA_in_2: (b,f) Transforming TRIPLES into the following Term Rewriting System: Pi DP problem: The TRS P consists of the following rules: MAPA_IN_GA(.(X1, X2), .(X3, X4)) -> U1_GA(X1, X2, X3, X4, mapA_in_ga(X2, X4)) MAPA_IN_GA(.(X1, X2), .(X3, X4)) -> MAPA_IN_GA(X2, X4) R is empty. The argument filtering Pi contains the following mapping: mapA_in_ga(x1, x2) = mapA_in_ga(x1) .(x1, x2) = .(x2) MAPA_IN_GA(x1, x2) = MAPA_IN_GA(x1) U1_GA(x1, x2, x3, x4, x5) = U1_GA(x2, x5) 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: MAPA_IN_GA(.(X1, X2), .(X3, X4)) -> U1_GA(X1, X2, X3, X4, mapA_in_ga(X2, X4)) MAPA_IN_GA(.(X1, X2), .(X3, X4)) -> MAPA_IN_GA(X2, X4) R is empty. The argument filtering Pi contains the following mapping: mapA_in_ga(x1, x2) = mapA_in_ga(x1) .(x1, x2) = .(x2) MAPA_IN_GA(x1, x2) = MAPA_IN_GA(x1) U1_GA(x1, x2, x3, x4, x5) = U1_GA(x2, x5) 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: MAPA_IN_GA(.(X1, X2), .(X3, X4)) -> MAPA_IN_GA(X2, X4) R is empty. The argument filtering Pi contains the following mapping: .(x1, x2) = .(x2) MAPA_IN_GA(x1, x2) = MAPA_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: MAPA_IN_GA(.(X2)) -> MAPA_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: *MAPA_IN_GA(.(X2)) -> MAPA_IN_GA(X2) The graph contains the following edges 1 > 1 ---------------------------------------- (10) YES