YES
proof of /hpcwork/ff862203/termcomp26/benchmarks/QPhYK.pl
# AProVE Commit ID: 23a904c96b029b0a549cde0d0d17dbccf967db59 jckassing 20260626 unpublished dirty


Left Termination of the query pattern

at(a,a)

w.r.t. the given Prolog program could successfully be proven:

(0) Prolog
(1) PrologToIRSwTTransformerProof [SOUND, 0 ms]
(2) TRUE


----------------------------------------

(0)
Obligation:
Clauses:

at(X, fido) :- ','(at(X, mary), near(X)).
at(ta, mary).
at(jm, mary).
near(jm).


Query: at(a,a)
----------------------------------------

(1) PrologToIRSwTTransformerProof (SOUND)
Transformed Prolog program to IRSwT according to method in Master Thesis of A. Weinert

{
    "root": 5,
    "program": {
        "directives": [],
        "clauses": [
            [
                "(at X (fido))",
                "(',' (at X (mary)) (near X))"
            ],
            [
                "(at (ta) (mary))",
                null
            ],
            [
                "(at (jm) (mary))",
                null
            ],
            [
                "(near (jm))",
                null
            ]
        ]
    },
    "graph": {
        "nodes": {
            "44": {
                "goal": [{
                    "clause": 0,
                    "scope": 1,
                    "term": "(at T1 T2)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "45": {
                "goal": [
                    {
                        "clause": 1,
                        "scope": 1,
                        "term": "(at T1 T2)"
                    },
                    {
                        "clause": 2,
                        "scope": 1,
                        "term": "(at T1 T2)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "170": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(true)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "171": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "type": "Nodes",
            "150": {
                "goal": [{
                    "clause": 1,
                    "scope": 2,
                    "term": "(at T8 (mary))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "172": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "151": {
                "goal": [{
                    "clause": 2,
                    "scope": 2,
                    "term": "(at T8 (mary))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "173": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(true)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "152": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(true)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "174": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "153": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "175": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "154": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "155": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(true)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "156": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "157": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "158": {
                "goal": [{
                    "clause": 3,
                    "scope": 3,
                    "term": "(near T10)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T10"],
                    "free": [],
                    "exprvars": []
                }
            },
            "159": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(true)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "160": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "161": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "162": {
                "goal": [{
                    "clause": 1,
                    "scope": 1,
                    "term": "(at T1 T2)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "163": {
                "goal": [{
                    "clause": 2,
                    "scope": 1,
                    "term": "(at T1 T2)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "144": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(',' (at T8 (mary)) (near T8))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "145": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "146": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(at T8 (mary))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "147": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(near T10)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T10"],
                    "free": [],
                    "exprvars": []
                }
            },
            "5": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(at T1 T2)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "148": {
                "goal": [
                    {
                        "clause": 0,
                        "scope": 2,
                        "term": "(at T8 (mary))"
                    },
                    {
                        "clause": 1,
                        "scope": 2,
                        "term": "(at T8 (mary))"
                    },
                    {
                        "clause": 2,
                        "scope": 2,
                        "term": "(at T8 (mary))"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "149": {
                "goal": [
                    {
                        "clause": 1,
                        "scope": 2,
                        "term": "(at T8 (mary))"
                    },
                    {
                        "clause": 2,
                        "scope": 2,
                        "term": "(at T8 (mary))"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "43": {
                "goal": [
                    {
                        "clause": 0,
                        "scope": 1,
                        "term": "(at T1 T2)"
                    },
                    {
                        "clause": 1,
                        "scope": 1,
                        "term": "(at T1 T2)"
                    },
                    {
                        "clause": 2,
                        "scope": 1,
                        "term": "(at T1 T2)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            }
        },
        "edges": [
            {
                "from": 5,
                "to": 43,
                "label": "CASE"
            },
            {
                "from": 43,
                "to": 44,
                "label": "PARALLEL"
            },
            {
                "from": 43,
                "to": 45,
                "label": "PARALLEL"
            },
            {
                "from": 44,
                "to": 144,
                "label": "EVAL with clause\nat(X5, fido) :- ','(at(X5, mary), near(X5)).\nand substitutionT1 -> T8,\nX5 -> T8,\nT2 -> fido,\nT7 -> T8"
            },
            {
                "from": 44,
                "to": 145,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 45,
                "to": 162,
                "label": "PARALLEL"
            },
            {
                "from": 45,
                "to": 163,
                "label": "PARALLEL"
            },
            {
                "from": 144,
                "to": 146,
                "label": "SPLIT 1"
            },
            {
                "from": 144,
                "to": 147,
                "label": "SPLIT 2\nnew knowledge:\nT10 is ground\nreplacements:T8 -> T10"
            },
            {
                "from": 146,
                "to": 148,
                "label": "CASE"
            },
            {
                "from": 147,
                "to": 158,
                "label": "CASE"
            },
            {
                "from": 148,
                "to": 149,
                "label": "BACKTRACK\nfor clause: at(X, fido) :- ','(at(X, mary), near(X))because of non-unification"
            },
            {
                "from": 149,
                "to": 150,
                "label": "PARALLEL"
            },
            {
                "from": 149,
                "to": 151,
                "label": "PARALLEL"
            },
            {
                "from": 150,
                "to": 152,
                "label": "EVAL with clause\nat(ta, mary).\nand substitutionT8 -> ta"
            },
            {
                "from": 150,
                "to": 153,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 151,
                "to": 155,
                "label": "EVAL with clause\nat(jm, mary).\nand substitutionT8 -> jm"
            },
            {
                "from": 151,
                "to": 156,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 152,
                "to": 154,
                "label": "SUCCESS"
            },
            {
                "from": 155,
                "to": 157,
                "label": "SUCCESS"
            },
            {
                "from": 158,
                "to": 159,
                "label": "EVAL with clause\nnear(jm).\nand substitutionT10 -> jm"
            },
            {
                "from": 158,
                "to": 160,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 159,
                "to": 161,
                "label": "SUCCESS"
            },
            {
                "from": 162,
                "to": 170,
                "label": "EVAL with clause\nat(ta, mary).\nand substitutionT1 -> ta,\nT2 -> mary"
            },
            {
                "from": 162,
                "to": 171,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 163,
                "to": 173,
                "label": "EVAL with clause\nat(jm, mary).\nand substitutionT1 -> jm,\nT2 -> mary"
            },
            {
                "from": 163,
                "to": 174,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 170,
                "to": 172,
                "label": "SUCCESS"
            },
            {
                "from": 173,
                "to": 175,
                "label": "SUCCESS"
            }
        ],
        "type": "Graph"
    }
}

----------------------------------------

(2)
TRUE
