/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 less(g,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) AND (9) PiDP (10) PiDPToQDPProof [EQUIVALENT, 6 ms] (11) QDP (12) QDPSizeChangeProof [EQUIVALENT, 0 ms] (13) YES (14) PiDP (15) PiDPToQDPProof [EQUIVALENT, 0 ms] (16) QDP (17) QDPSizeChangeProof [EQUIVALENT, 0 ms] (18) YES (19) PiDP (20) PiDPToQDPProof [SOUND, 0 ms] (21) QDP (22) QDPSizeChangeProof [EQUIVALENT, 0 ms] (23) YES ---------------------------------------- (0) Obligation: Clauses: less(0, Y) :- ','(!, =(Y, s(X2))). less(X, Y) :- ','(p(X, X1), ','(p(Y, Y1), less(X1, Y1))). p(0, 0). p(s(X), X). =(X, X). Query: less(g,a) ---------------------------------------- (1) BuiltinConflictTransformerProof (EQUIVALENT) Renamed defined predicates conflicting with built-in predicates [PROLOG]. ---------------------------------------- (2) Obligation: Clauses: less(0, Y) :- ','(!, user_defined_=(Y, s(X2))). less(X, Y) :- ','(p(X, X1), ','(p(Y, Y1), less(X1, Y1))). p(0, 0). p(s(X), X). user_defined_=(X, X). Query: less(g,a) ---------------------------------------- (3) PrologToDTProblemTransformerProof (SOUND) Built DT problem from termination graph DT10. { "root": 1, "program": { "directives": [], "clauses": [ [ "(less (0) Y)", "(',' (!) (user_defined_= Y (s X2)))" ], [ "(less X Y)", "(',' (p X X1) (',' (p Y Y1) (less X1 Y1)))" ], [ "(p (0) (0))", null ], [ "(p (s X) X)", null ], [ "(user_defined_= X X)", null ] ] }, "graph": { "nodes": { "36": { "goal": [{ "clause": 4, "scope": 2, "term": "(user_defined_= T5 (s X5))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": ["X5"], "exprvars": [] } }, "16": { "goal": [{ "clause": 1, "scope": 1, "term": "(less T1 T2)" }], "kb": { "nonunifying": [[ "(less T1 T2)", "(less (0) X4)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": ["X4"], "exprvars": [] } }, "17": { "goal": [{ "clause": -1, "scope": -1, "term": "(user_defined_= T5 (s X5))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": ["X5"], "exprvars": [] } }, "type": "Nodes", "250": { "goal": [{ "clause": 3, "scope": 3, "term": "(',' (p T14 X13) (',' (p T16 X14) (less X13 X14)))" }], "kb": { "nonunifying": [[ "(less T14 T2)", "(less (0) X4)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T14"], "free": [ "X4", "X13", "X14" ], "exprvars": [] } }, "240": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "251": { "goal": [{ "clause": -1, "scope": -1, "term": "(',' (p T16 X14) (less T19 X14))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T19"], "free": ["X14"], "exprvars": [] } }, "273": { "goal": [{ "clause": -1, "scope": -1, "term": "(less T19 T23)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T19"], "free": [], "exprvars": [] } }, "252": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "274": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "253": { "goal": [ { "clause": 2, "scope": 4, "term": "(',' (p T16 X14) (less T19 X14))" }, { "clause": 3, "scope": 4, "term": "(',' (p T16 X14) (less T19 X14))" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T19"], "free": ["X14"], "exprvars": [] } }, "1": { "goal": [{ "clause": -1, "scope": -1, "term": "(less T1 T2)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": [], "exprvars": [] } }, "254": { "goal": [{ "clause": 2, "scope": 4, "term": "(',' (p T16 X14) (less T19 X14))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T19"], "free": ["X14"], "exprvars": [] } }, "255": { "goal": [{ "clause": 3, "scope": 4, "term": "(',' (p T16 X14) (less T19 X14))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T19"], "free": ["X14"], "exprvars": [] } }, "256": { "goal": [{ "clause": -1, "scope": -1, "term": "(less T19 (0))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T19"], "free": [], "exprvars": [] } }, "4": { "goal": [ { "clause": 0, "scope": 1, "term": "(less T1 T2)" }, { "clause": 1, "scope": 1, "term": "(less T1 T2)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T1"], "free": [], "exprvars": [] } }, "235": { "goal": [{ "clause": -1, "scope": -1, "term": "(true)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "257": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "248": { "goal": [{ "clause": -1, "scope": -1, "term": "(',' (p T14 X13) (',' (p T16 X14) (less X13 X14)))" }], "kb": { "nonunifying": [[ "(less T14 T2)", "(less (0) X4)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T14"], "free": [ "X4", "X13", "X14" ], "exprvars": [] } }, "238": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "249": { "goal": [ { "clause": 2, "scope": 3, "term": "(',' (p T14 X13) (',' (p T16 X14) (less X13 X14)))" }, { "clause": 3, "scope": 3, "term": "(',' (p T14 X13) (',' (p T16 X14) (less X13 X14)))" } ], "kb": { "nonunifying": [[ "(less T14 T2)", "(less (0) X4)" ]], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": ["T14"], "free": [ "X4", "X13", "X14" ], "exprvars": [] } }, "8": { "goal": [ { "clause": -1, "scope": -1, "term": "(',' (!_1) (user_defined_= T5 (s X5)))" }, { "clause": 1, "scope": 1, "term": "(less (0) T2)" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": ["X5"], "exprvars": [] } } }, "edges": [ { "from": 1, "to": 4, "label": "CASE" }, { "from": 4, "to": 8, "label": "EVAL with clause\nless(0, X4) :- ','(!_1, user_defined_=(X4, s(X5))).\nand substitutionT1 -> 0,\nT2 -> T5,\nX4 -> T5,\nT4 -> T5" }, { "from": 4, "to": 16, "label": "EVAL-BACKTRACK" }, { "from": 8, "to": 17, "label": "CUT" }, { "from": 16, "to": 248, "label": "ONLY EVAL with clause\nless(X11, X12) :- ','(p(X11, X13), ','(p(X12, X14), less(X13, X14))).\nand substitutionT1 -> T14,\nX11 -> T14,\nT2 -> T16,\nX12 -> T16,\nT15 -> T16" }, { "from": 17, "to": 36, "label": "CASE" }, { "from": 36, "to": 235, "label": "EVAL with clause\nuser_defined_=(X8, X8).\nand substitutionT5 -> s(T11),\nX8 -> s(T11),\nX5 -> T11,\nT10 -> s(T11)" }, { "from": 36, "to": 238, "label": "EVAL-BACKTRACK" }, { "from": 235, "to": 240, "label": "SUCCESS" }, { "from": 248, "to": 249, "label": "CASE" }, { "from": 249, "to": 250, "label": "BACKTRACK\nfor clause: p(0, 0)\nwith clash: (less(T14, T2), less(0, X4))" }, { "from": 250, "to": 251, "label": "EVAL with clause\np(s(X17), X17).\nand substitutionX17 -> T19,\nT14 -> s(T19),\nX13 -> T19" }, { "from": 250, "to": 252, "label": "EVAL-BACKTRACK" }, { "from": 251, "to": 253, "label": "CASE" }, { "from": 253, "to": 254, "label": "PARALLEL" }, { "from": 253, "to": 255, "label": "PARALLEL" }, { "from": 254, "to": 256, "label": "EVAL with clause\np(0, 0).\nand substitutionT16 -> 0,\nX14 -> 0" }, { "from": 254, "to": 257, "label": "EVAL-BACKTRACK" }, { "from": 255, "to": 273, "label": "EVAL with clause\np(s(X25), X25).\nand substitutionX25 -> T23,\nT16 -> s(T23),\nX14 -> T23,\nT22 -> T23" }, { "from": 255, "to": 274, "label": "EVAL-BACKTRACK" }, { "from": 256, "to": 1, "label": "INSTANCE with matching:\nT1 -> T19\nT2 -> 0" }, { "from": 273, "to": 1, "label": "INSTANCE with matching:\nT1 -> T19\nT2 -> T23" } ], "type": "Graph" } } ---------------------------------------- (4) Obligation: Triples: lessA(s(X1), 0) :- lessA(X1, 0). lessA(s(X1), s(X2)) :- lessA(X1, X2). Clauses: lesscA(0, s(X1)). lesscA(s(X1), 0) :- lesscA(X1, 0). lesscA(s(X1), s(X2)) :- lesscA(X1, X2). Afs: lessA(x1, x2) = lessA(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: lessA_in_2: (b,f) (b,b) Transforming TRIPLES into the following Term Rewriting System: Pi DP problem: The TRS P consists of the following rules: LESSA_IN_GA(s(X1), 0) -> U1_GA(X1, lessA_in_gg(X1, 0)) LESSA_IN_GA(s(X1), 0) -> LESSA_IN_GG(X1, 0) LESSA_IN_GG(s(X1), 0) -> U1_GG(X1, lessA_in_gg(X1, 0)) LESSA_IN_GG(s(X1), 0) -> LESSA_IN_GG(X1, 0) LESSA_IN_GG(s(X1), s(X2)) -> U2_GG(X1, X2, lessA_in_gg(X1, X2)) LESSA_IN_GG(s(X1), s(X2)) -> LESSA_IN_GG(X1, X2) LESSA_IN_GA(s(X1), s(X2)) -> U2_GA(X1, X2, lessA_in_ga(X1, X2)) LESSA_IN_GA(s(X1), s(X2)) -> LESSA_IN_GA(X1, X2) R is empty. The argument filtering Pi contains the following mapping: lessA_in_ga(x1, x2) = lessA_in_ga(x1) s(x1) = s(x1) lessA_in_gg(x1, x2) = lessA_in_gg(x1, x2) 0 = 0 LESSA_IN_GA(x1, x2) = LESSA_IN_GA(x1) U1_GA(x1, x2) = U1_GA(x1, x2) LESSA_IN_GG(x1, x2) = LESSA_IN_GG(x1, x2) U1_GG(x1, x2) = U1_GG(x1, x2) U2_GG(x1, x2, x3) = U2_GG(x1, x2, x3) U2_GA(x1, x2, x3) = U2_GA(x1, x3) 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: LESSA_IN_GA(s(X1), 0) -> U1_GA(X1, lessA_in_gg(X1, 0)) LESSA_IN_GA(s(X1), 0) -> LESSA_IN_GG(X1, 0) LESSA_IN_GG(s(X1), 0) -> U1_GG(X1, lessA_in_gg(X1, 0)) LESSA_IN_GG(s(X1), 0) -> LESSA_IN_GG(X1, 0) LESSA_IN_GG(s(X1), s(X2)) -> U2_GG(X1, X2, lessA_in_gg(X1, X2)) LESSA_IN_GG(s(X1), s(X2)) -> LESSA_IN_GG(X1, X2) LESSA_IN_GA(s(X1), s(X2)) -> U2_GA(X1, X2, lessA_in_ga(X1, X2)) LESSA_IN_GA(s(X1), s(X2)) -> LESSA_IN_GA(X1, X2) R is empty. The argument filtering Pi contains the following mapping: lessA_in_ga(x1, x2) = lessA_in_ga(x1) s(x1) = s(x1) lessA_in_gg(x1, x2) = lessA_in_gg(x1, x2) 0 = 0 LESSA_IN_GA(x1, x2) = LESSA_IN_GA(x1) U1_GA(x1, x2) = U1_GA(x1, x2) LESSA_IN_GG(x1, x2) = LESSA_IN_GG(x1, x2) U1_GG(x1, x2) = U1_GG(x1, x2) U2_GG(x1, x2, x3) = U2_GG(x1, x2, x3) U2_GA(x1, x2, x3) = U2_GA(x1, x3) We have to consider all (P,R,Pi)-chains ---------------------------------------- (7) DependencyGraphProof (EQUIVALENT) The approximation of the Dependency Graph [LOPSTR] contains 3 SCCs with 5 less nodes. ---------------------------------------- (8) Complex Obligation (AND) ---------------------------------------- (9) Obligation: Pi DP problem: The TRS P consists of the following rules: LESSA_IN_GG(s(X1), 0) -> LESSA_IN_GG(X1, 0) R is empty. Pi is empty. We have to consider all (P,R,Pi)-chains ---------------------------------------- (10) PiDPToQDPProof (EQUIVALENT) Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. ---------------------------------------- (11) Obligation: Q DP problem: The TRS P consists of the following rules: LESSA_IN_GG(s(X1), 0) -> LESSA_IN_GG(X1, 0) R is empty. Q is empty. We have to consider all (P,Q,R)-chains. ---------------------------------------- (12) 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: *LESSA_IN_GG(s(X1), 0) -> LESSA_IN_GG(X1, 0) The graph contains the following edges 1 > 1, 2 >= 2 ---------------------------------------- (13) YES ---------------------------------------- (14) Obligation: Pi DP problem: The TRS P consists of the following rules: LESSA_IN_GG(s(X1), s(X2)) -> LESSA_IN_GG(X1, X2) R is empty. Pi is empty. We have to consider all (P,R,Pi)-chains ---------------------------------------- (15) PiDPToQDPProof (EQUIVALENT) Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. ---------------------------------------- (16) Obligation: Q DP problem: The TRS P consists of the following rules: LESSA_IN_GG(s(X1), s(X2)) -> LESSA_IN_GG(X1, X2) R is empty. Q is empty. We have to consider all (P,Q,R)-chains. ---------------------------------------- (17) 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: *LESSA_IN_GG(s(X1), s(X2)) -> LESSA_IN_GG(X1, X2) The graph contains the following edges 1 > 1, 2 > 2 ---------------------------------------- (18) YES ---------------------------------------- (19) Obligation: Pi DP problem: The TRS P consists of the following rules: LESSA_IN_GA(s(X1), s(X2)) -> LESSA_IN_GA(X1, X2) R is empty. The argument filtering Pi contains the following mapping: s(x1) = s(x1) LESSA_IN_GA(x1, x2) = LESSA_IN_GA(x1) We have to consider all (P,R,Pi)-chains ---------------------------------------- (20) PiDPToQDPProof (SOUND) Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. ---------------------------------------- (21) Obligation: Q DP problem: The TRS P consists of the following rules: LESSA_IN_GA(s(X1)) -> LESSA_IN_GA(X1) R is empty. Q is empty. We have to consider all (P,Q,R)-chains. ---------------------------------------- (22) 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: *LESSA_IN_GA(s(X1)) -> LESSA_IN_GA(X1) The graph contains the following edges 1 > 1 ---------------------------------------- (23) YES