Did you know ... | Search Documentation: |
Packs (add-ons) for SWI-Prolog |
Title: | Relational term subsumption. subsumes/2 is intended as a relational drop-in replacement for subsumes_term/2. Note that this conflicts with the deprecated predicate terms:subsumes/2. |
---|---|
Rating: | Not rated. Create the first rating! |
Latest version: | 0.4 |
SHA1 sum: | efeea89afc38587b16cdd87449dec0b06e05a3e3 |
Author: | Geoffrey Churchill <geoffrey.a.churchill@gmail.com> |
Home page: | https://github.com/GeoffChurch/subsumes |
No reviews. Create the first review!.
Version | SHA1 | #Downloads | URL |
---|---|---|---|
0.1 | 78785bce9c2facfa548294493277ac02b6940077 | 2 | http://github.com/GeoffChurch/subsumes/archive/0.1.zip |
0.2 | f5567af6e724be63e03ddd593b3277fbafa14311 | 6 | http://github.com/GeoffChurch/subsumes/archive/0.2.zip |
0.3 | 2e41eaa49814bbe221a62a5ced2f74f82a204fe5 | 3 | http://github.com/GeoffChurch/subsumes/archive/0.3.zip |
0.4 | efeea89afc38587b16cdd87449dec0b06e05a3e3 | 7 | http://github.com/GeoffChurch/subsumes/archive/0.4.zip |
Relational term subsumption for SWI-Prolog
subsumes/2 is intended as a relational drop-in replacement for subsumes_term/2. It can handle cyclic data, as well as cases where cyclic data would be induced.
?- f(X, Y) subsumes G. G = f(_A, _B), X subsumes _A, Y subsumes _B. ?- f(X) subsumes Y, Y subsumes X. % Example with induced cyclic data. X = Y, Y = f(Y). ?- X subsumes Y, X = g(_). X = g(_A), Y = g(_B), _A subsumes _B.
See the unit tests in [test/subsumes.plt
](test/subsumes.plt) for more examples.
Executing the following goal from the top-level subsumes
directory should run all the tests:
?- expand_file_name("test/**.plt", Tests), maplist(consult, Tests), run_tests.
Note that this conflicts with the deprecated terms:subsumes/2.
TODO: make ISO-compatible.
(Note to self) To publish a new version:
pack.pl
?- make_directory(potato), pack_install(subsumes, [url('http://github.com/GeoffChurch/subsumes/archive/13.17.zip'), package_directory(potato)]).
Pack contains 6 files holding a total of 9.0K bytes.