/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 map(a) w.r.t. the given Prolog program could successfully be proven: (0) Prolog (1) PrologToIRSwTTransformerProof [SOUND, 0 ms] (2) TRUE ---------------------------------------- (0) Obligation: Clauses: color_map([], X1). color_map(.(Region, Regions), Colors) :- ','(color_region(Region, Colors), color_map(Regions, Colors)). color_region(region(X2, Color, Neighbors), Colors) :- ','(select(Color, Colors, Colors1), subset(Neighbors, Colors1)). select(X, .(X, Xs), Xs). select(X, .(Y, Xs), .(Y, Zs)) :- select(X, Xs, Zs). subset([], X3). subset(.(X, Xs), Ys) :- ','(member(X, Ys), subset(Xs, Ys)). member(X, .(X, X4)). member(X, .(X5, Xs)) :- member(X, Xs). map(.(region(belize, Belize, .(Guatemala, [])), .(region(guatemala, Guatemala, .(Belize, .(El_Salvador, .(Honduras, [])))), .(region(el_salvador, El_Salvador, .(Guatemala, .(Honduras, []))), .(region(honduras, Honduras, .(Guatemala, .(El_Salvador, .(Nicaragua, [])))), .(region(nicaragua, Nicaragua, .(Honduras, .(Costa_rica, []))), .(region(costa_rica, Costa_rica, .(Nicaragua, .(Panama, []))), .(region(panama, Panama, .(Costa_rica, [])), [])))))))). query :- ','(map(X), color_map(X, .(red, .(blue, .(green, []))))). Query: map(a) ---------------------------------------- (1) PrologToIRSwTTransformerProof (SOUND) Transformed Prolog program to IRSwT according to method in Master Thesis of A. Weinert { "root": 2, "program": { "directives": [], "clauses": [ [ "(color_map ([]) X1)", null ], [ "(color_map (. Region Regions) Colors)", "(',' (color_region Region Colors) (color_map Regions Colors))" ], [ "(color_region (region X2 Color Neighbors) Colors)", "(',' (select Color Colors Colors1) (subset Neighbors Colors1))" ], [ "(select X (. X Xs) Xs)", null ], [ "(select X (. Y Xs) (. Y Zs))", "(select X Xs Zs)" ], [ "(subset ([]) X3)", null ], [ "(subset (. X Xs) Ys)", "(',' (member X Ys) (subset Xs Ys))" ], [ "(member X (. X X4))", null ], [ "(member X (. X5 Xs))", "(member X Xs)" ], [ "(map (. (region (belize) Belize (. Guatemala ([]))) (. (region (guatemala) Guatemala (. Belize (. El_Salvador (. Honduras ([]))))) (. (region (el_salvador) El_Salvador (. Guatemala (. Honduras ([])))) (. (region (honduras) Honduras (. Guatemala (. El_Salvador (. Nicaragua ([]))))) (. (region (nicaragua) Nicaragua (. Honduras (. Costa_rica ([])))) (. (region (costa_rica) Costa_rica (. Nicaragua (. Panama ([])))) (. (region (panama) Panama (. Costa_rica ([]))) ([])))))))))", null ], [ "(query)", "(',' (map X) (color_map X (. (red) (. (blue) (. (green) ([]))))))" ] ] }, "graph": { "nodes": { "2": { "goal": [{ "clause": -1, "scope": -1, "term": "(map T1)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "245": { "goal": [{ "clause": 9, "scope": 1, "term": "(map T1)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "322": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "304": { "goal": [{ "clause": -1, "scope": -1, "term": "(true)" }], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "327": { "goal": [], "kb": { "nonunifying": [], "intvars": {}, "arithmetic": { "type": "PlainIntegerRelationState", "relations": [] }, "ground": [], "free": [], "exprvars": [] } }, "type": "Nodes" }, "edges": [ { "from": 2, "to": 245, "label": "CASE" }, { "from": 245, "to": 304, "label": "EVAL with clause\nmap(.(region(belize, X20, .(X21, [])), .(region(guatemala, X21, .(X20, .(X22, .(X23, [])))), .(region(el_salvador, X22, .(X21, .(X23, []))), .(region(honduras, X23, .(X21, .(X22, .(X24, [])))), .(region(nicaragua, X24, .(X23, .(X25, []))), .(region(costa_rica, X25, .(X24, .(X26, []))), .(region(panama, X26, .(X25, [])), [])))))))).\nand substitutionX20 -> T16,\nX21 -> T17,\nX22 -> T18,\nX23 -> T19,\nX24 -> T20,\nX25 -> T21,\nX26 -> T22,\nT1 -> .(region(belize, T16, .(T17, [])), .(region(guatemala, T17, .(T16, .(T18, .(T19, [])))), .(region(el_salvador, T18, .(T17, .(T19, []))), .(region(honduras, T19, .(T17, .(T18, .(T20, [])))), .(region(nicaragua, T20, .(T19, .(T21, []))), .(region(costa_rica, T21, .(T20, .(T22, []))), .(region(panama, T22, .(T21, [])), [])))))))" }, { "from": 245, "to": 322, "label": "EVAL-BACKTRACK" }, { "from": 304, "to": 327, "label": "SUCCESS" } ], "type": "Graph" } } ---------------------------------------- (2) TRUE