YES proof of /export/starexec/sandbox2/benchmark/theBenchmark.pl # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty Left Termination of the query pattern p(a) w.r.t. the given Prolog program could successfully be proven: (0) Prolog (1) PrologToIRSwTTransformerProof [SOUND, 0 ms] (2) TRUE ---------------------------------------- (0) Obligation: Clauses: p(.(A, [])) :- l(.(A, [])). r(1). l([]). l(.(H, T)) :- ','(r(H), l(T)). Query: p(a) ---------------------------------------- (1) PrologToIRSwTTransformerProof (SOUND) Transformed Prolog program to IRSwT according to method in Master Thesis of A. Weinert { "root": 2, "program": { "directives": [], "clauses": [ [ "(p (. A ([])))", "(l (. A ([])))" ], [ "(r (1))", null ], [ "(l ([]))", null ], [ "(l (. H T))", "(',' (r H) (l T))" ] ] }, "graph": { "nodes": { "45": { "goal": [{ "clause": -1, "scope": -1, "term": "(',' (r T10) (l ([])))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "47": { "goal": [{ "clause": 1, "scope": 3, "term": "(',' (r T10) (l ([])))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "39": { "goal": [{ "clause": -1, "scope": -1, "term": "(l (. T5 ([])))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "type": "Nodes", "122": { "goal": [{ "clause": 2, "scope": 4, "term": "(l ([]))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "2": { "goal": [{ "clause": -1, "scope": -1, "term": "(p T1)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "123": { "goal": [{ "clause": 3, "scope": 4, "term": "(l ([]))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "124": { "goal": [{ "clause": -1, "scope": -1, "term": "(true)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "4": { "goal": [{ "clause": 0, "scope": 1, "term": "(p T1)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "125": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "126": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "50": { "goal": [{ "clause": -1, "scope": -1, "term": "(l ([]))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "40": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "51": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "41": { "goal": [ { "clause": 2, "scope": 2, "term": "(l (. T5 ([])))" }, { "clause": 3, "scope": 2, "term": "(l (. T5 ([])))" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "42": { "goal": [{ "clause": 3, "scope": 2, "term": "(l (. T5 ([])))" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "54": { "goal": [ { "clause": 2, "scope": 4, "term": "(l ([]))" }, { "clause": 3, "scope": 4, "term": "(l ([]))" } ], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } } }, "edges": [ { "from": 2, "to": 4, "label": "CASE" }, { "from": 4, "to": 39, "label": "EVAL with clause\np(.(X3, [])) :- l(.(X3, [])).\nand substitutionX3 -> T5,\nT1 -> .(T5, []),\nT4 -> T5" }, { "from": 4, "to": 40, "label": "EVAL-BACKTRACK" }, { "from": 39, "to": 41, "label": "CASE" }, { "from": 41, "to": 42, "label": "BACKTRACK\nfor clause: l([])because of non-unification" }, { "from": 42, "to": 45, "label": "ONLY EVAL with clause\nl(.(X8, X9)) :- ','(r(X8), l(X9)).\nand substitutionT5 -> T10,\nX8 -> T10,\nX9 -> [],\nT9 -> T10" }, { "from": 45, "to": 47, "label": "CASE" }, { "from": 47, "to": 50, "label": "EVAL with clause\nr(1).\nand substitutionT10 -> 1" }, { "from": 47, "to": 51, "label": "EVAL-BACKTRACK" }, { "from": 50, "to": 54, "label": "CASE" }, { "from": 54, "to": 122, "label": "PARALLEL" }, { "from": 54, "to": 123, "label": "PARALLEL" }, { "from": 122, "to": 124, "label": "ONLY EVAL with clause\nl([]).\nand substitution" }, { "from": 123, "to": 126, "label": "BACKTRACK\nfor clause: l(.(H, T)) :- ','(r(H), l(T))because of non-unification" }, { "from": 124, "to": 125, "label": "SUCCESS" } ], "type": "Graph" } } ---------------------------------------- (2) TRUE