{"id":13714105,"url":"https://github.com/wouterbeek/prolog_library_collection","last_synced_at":"2025-06-27T21:36:47.013Z","repository":{"id":8067414,"uuid":"9479682","full_name":"wouterbeek/prolog_library_collection","owner":"wouterbeek","description":"A collection of Prolog libraries.","archived":false,"fork":false,"pushed_at":"2021-05-03T06:24:02.000Z","size":8636,"stargazers_count":83,"open_issues_count":0,"forks_count":13,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-05-23T04:34:07.341Z","etag":null,"topics":["prolog","swi-prolog"],"latest_commit_sha":null,"homepage":"","language":"Prolog","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wouterbeek.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-04-16T18:34:42.000Z","updated_at":"2024-02-06T13:27:42.000Z","dependencies_parsed_at":"2022-08-26T19:10:14.130Z","dependency_job_id":null,"html_url":"https://github.com/wouterbeek/prolog_library_collection","commit_stats":null,"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"purl":"pkg:github/wouterbeek/prolog_library_collection","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wouterbeek%2Fprolog_library_collection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wouterbeek%2Fprolog_library_collection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wouterbeek%2Fprolog_library_collection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wouterbeek%2Fprolog_library_collection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wouterbeek","download_url":"https://codeload.github.com/wouterbeek/prolog_library_collection/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wouterbeek%2Fprolog_library_collection/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262337154,"owners_count":23296031,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["prolog","swi-prolog"],"created_at":"2024-08-02T23:01:52.348Z","updated_at":"2025-06-27T21:36:46.983Z","avatar_url":"https://github.com/wouterbeek.png","language":"Prolog","funding_links":[],"categories":["Prolog"],"sub_categories":[],"readme":"# Prolog-Library-Collection\n\nA collection of Prolog libraries that have proven useful in various\nprojects.  These libraries are intended to extend the functionality\nthat is already available in the\n[SWI-Prolog](https://www.swi-prolog.org) standard libraries.\n\n## Dependencies\n\nInstall [SWI-Prolog](https://www.swi-prolog.org).\n\n## Installation\n\nInstall this library:\n\n```sh\nswipl -g 'pack_install(prolog_library_collection)' -t halt\n```\n\n## Use\n\nOnce installed, modules from this library are loaded as follows:\n\n```pl\n:- [library(atom_ext)].\n```\n\n## Module overview\n\n### Module `archive_ext`\n\nThis module extends the standard library `archive`:\n\n  - `archive_extension(?Extension:atom)`\n\n    Succeeds if `Extension` is a default file name extension for an\n    archive filter or format, as declared in library [[media_type]].\n\n  - `archive_media_type(?MediaType:media)`\n\n    Succeeds if `MediaType` is the Media Type of an archive filter or\n    format.\n\n  - `archive_open(+In:stream, -Archive:blob)`\n\n    Opens an archive over all supported and sensible archive filters\n    and formats.  This specifically excludes format `mtree`, which is\n    a plain text format that is almost never used yet leads to many\n    false positives in practice.\n\n### Module `assoc_ext`\n\nThis module extends the standard library `assoc`:\n\n  - `merge_assoc(+New:assoc, +Old:assoc, -Merge:assoc)`\n\n    Merges two assocs into a new one.  If the same key exists in `New`\n    and `Old`, the format replaces the latter in `Merge`.  These\n    semantics are inspired by those of the standard library predicate\n    `merge_options/3` in library `option`.\n\n  - `transpose_assoc(+Assoc:assoc, -Transposed:assoc)`\n\n    Turns an assoc of (key,value) pairs into one with(value,key)\n    pairs.\n\n### Module `atom_ext`\n\nThis module provides additional support for working with atoms:\n\n  - `atom_capitalize(+Original:atom, ?Capitalized:atom)`\n\n    Succeeds if `Capitalized` is a copt of `Orginal` where the first\n    character is in upper case (if applicable).\n\n  - `atom_ellipsis(+Original:atom, ?MaxLength:between(2,inf), ?Ellipsed:atom)`\n\n    Succeeds if `Ellipsed` is like `Original`, but has ellipsis\n    applied in order to have `MaxLength`.\n\n  - `atom_postfix(+Original:atom, ?PostFix:atom)`\n  - `atom_postfix(+Original:atom, ?Length:nonneg, ?PostFix:atom)`\n\n    Succeeds if `Postfix` is a postfix of `Original` consisting of\n    `Length` characters.\n\n\n  - `atom_prefix(+Original:atom, ?PostFix:atom)`\n  - `atom_prefix(+Original:atom, ?Length:nonneg, ?PostFix:atom)`\n\n    Succeeds if `Prefix` is a prefix of `Original` consisting of\n    `Length` characters.\n\n  - `atom_strip(+Original:atom, ?Stripped:atom)`\n  - `atom_strip(+Original:atom, +Strip:list(char), ?Stripped:atom)`\n\n    Succeeds if `Stripped` is a copy of `Original` where leading and\n    trailing characters in `Strip` have been removed.\n\n  - `atom_terminator(+Original:atom, +Terminator:atom, ?Terminated:atom)`\n\n    Succeeds if `Terminated` is a copy of `Original` which is ensured\n    to end with the `Terminator` character.\n\n  - `atom_truncate(+Original:atom, +MaxLenhgt:noneng, ?Truncated:atom)`\n\n    Like `atom_prefix/3`, but the `Truncated` atom is the `Original`\n    atom in case `MaxLength` exceeds the `Original` atom length.\n\n### `call_ext`\n\nmeta-predicates\n\n### `closure`\n\n### `code_ext`\n\nThis module extends support for working with character-denoting\nnumeric codes:\n\n   - `put_codes(+Codes:list(code))`\n   - `put_codes(+Out:stream, +Codes:list(code))`\n\n### `conf_ext`\n\nThis module introduces a generic way for dealing with external\nconfiguration files:\n\n   - `cli_arguments(-Args:list(opt)) is det.`\n   - `conf_json(-Conf:dict) is det.`\n\n### `counter`\n\n### `csv_ext`\n\nStreamed processing of CSV files.\n\n### `date_time`\n\n### `dcg`\n\nDefinite Clause Grammars\n\nIn directory `/dcg` you will find a collection of Definite Clause\nGrammar (DCG) modules.\n\n### `dcg/dcg_abnf`\n\nAdvanced Bauckus-Naur Form (ABNF)\n\nWhile DCGs are nice, they can be a bit verbose for expressing common\nrepetition patterns.  To make DCGs that include repetitions less\nverbose, this module implements *variable repetition* as defined in\n[[https://tools.ietf.org/html/rfc5234][RFC 5234: Augmented BNF for\nSyntax Specifications: ABNF]].\n\n#### A simple example\n\nSuppose we want to parse sentences, which are non-empty sequences of\nwords:\n\n```pl\nsentence1([H|T]) --\u003e\n  word(H),\n  sentece2(T).\n\nsentence2([H|T]) --\u003e\n  word(H),\n  sentence2(T)\nsentence2([]) --\u003e \"\".\n```\n\nWhen this module is loaded, the same can be written as follows:\n\n```pl\nsentence(L) --\u003e\n  +(word, L).\n```\n\n#### definition\n\n##### variable repetition\n\nVariable repetition is a metasyntactic construct which states that at\nleast `M` and at most `N` occurrences of `:Dcg_0` must be processed:\n\n```pl\n'm*n'(?M:nonneg, ?N:nonneg, :Dcg_0)//\n```\n\n##### specific repetition\n\nSpecific repetition is a metasyntactic construct which states that\nexactly `N` occurrences of `Dcg_0` must be processed:\n\n```pl\n'#'(?N:nonneg, :Dcg_0)//\n```\n\nSpecific repetition is a special case of [[variable repetition]],\nbecause `#(N, Dcg_0)` is the same as `'m*n'(N, N, Dcg_0)`.\n\n##### Kleene\n\nKleene star is a metasyntactic construct which states that zero or\nmore occurrences of `Dcg_0` must be processed:\n\n```pl\n*(?N:nonneg, :Dcg_0)//\n```\n\nKleene star is a special case of [[variable repetition]], because\n`*(N, Dcg_0)` is the same as `'m*n'(_, _, Dcg_0)`.\n\n##### Kleene sum\n\nKleene sum is a metasyntactic construct which states that one or more\noccurrences of `Dcg_0` must be processed:\n\n```pl\n+(?N:nonneg, :Dcg_0)//\n```\n\nKleene sum is a special case of [[variable repetition]], because `+(N,\nDcg_0)` is the same as `'m*n'(1, _, Dcg_0)`.\n\n##### optional sequence\n\nOptional sequence is a metasyntactic construct which states that\n`Dcg_0` should either be processed once or not at all:\n\n```pl\n?(:Dcg_0)//\n```\n\nOptional sequence is a special case of [[variable repetition]],\nbecause `?(Dcg_0)` is the same as `'m*n'(0, 1, Dcg_0)`.\n\n|  DCG                      |  Meaning                                            |  Name               |\n| ------------------------- | --------------------------------------------------- | ------------------- |\n| `#(?N, :Dcg_0)//`         | Process `Dcg_0` exactly `N` times.                  | specific repetition |\n| `*(:Dcg_0)//`             | Process `Dcg_0` 0 or more times.                    | Kleene star         |\n| `'*n'(?N, :Dcg_0)//`      | Process `Dcg_0` at most `N` times.                  |                     |\n| `+(:Dcg_0)//`             | Process `Dcg_0` 1 or more times.                    | Kleene sum          |\n| `?(:Dcg_0)//`             | Process `Dcg_0` 0 or 1 times.                       | optional sequence   |\n| `'m*'(?M, :Dcg_0)//`      | Process `Dcg_0` at least `M` times.                 |                     |\n| `'m*n'(?M, ?N, :Dcg_0)//` | Process `Dcg_0` at least `M` and at most `N` times. | variable repetition |\n\nIt contains the following modules:\n\n|  Type   |  Definition                                                                                                        |\n| ------- | ------------------------------------------------------------------------------------------------------------------ |\n| `media` | A compound term of the form `media(Super:atom/Sub:atom,Parameters:list(opt))`                                      |\n| `opt`   | A unary compound term whose predicate letter is an option name and whose argument is a corresponding option value. |\n\n### `dcg/dcg_ext`\n\n### `debug_ext`\n\n### `default`\n\n### `dict`\n\nDictionaries.\n\n### `dlist`\n\nDifference lists.\n\n### `file_ext`\n\nHandling files and directories.\n\n### `graph/gml`\n\n### `graph/graph_ext`\n\n### `graph/jgf`\n\n### `hash_ext`\n\n### `http/http_client2`\n\n### `http/http_generic`\n\n### `http/http_pagination`\n\n### `http/http_resource`\n\n### `http/http_server`\n\n### `json_ext`\n\nThis module provides extended JSON support on top of the standard\nlibrary `http/json`:\n\n   - `json_load(+File:atom, -Structure:dict) is det.`\n\n   - `json_save(+File:atom, +Structure:dict) is det.`\n\n### `list_ext`\n\n### `math_ext`\n\n### `media_type`\n\n### `nlp/nlp_lang`\n\n### `os_ext`\n\nRunning external processes, streaming to/from external processes.\n\n### `pagination`\n\n### `pair_ext`\n\n### `pp`\n\n### `pure`\n\n### `sort_ext`\n\n### `stream_ext`\n\nSupport for recoding, unpacking, sorting, and hasing streams.\n\n### `string_ext`\n\n### `task`\n\n### `term_ext`\n\n### `thread_ext`\n\n### `uri_ext`\n\nConstructing/decomposing URIs.\n\n### `xml_ext`\n\nThis module allows Prolog goals to be called on a stream that encodes\nan XML DOM:\n\n   - `call_on_xml(+In:stream, +Names:list(atom), :Goal_1) is det.`\n\nThe following predicates allow the encoding of an XML file or stream\nto be determined:\n\n   - `xml_encoding(+In:stream, -Encoding:atom) is semidet.`\n   - `xml_file_encoding(+File:atom, -Encoding:atom) is semidet.`\n\n### `xsd`\n\nSupport for XML Schema 1.1 Part 2: Datatypes.\n\n  - `xsd_date_time/3` for translating between XSD date/time\n    representations and date/time representations as supported by\n    [[https://github.com/wouterbeek/Prolog-Library-Collection][Prolog-Library-Collection]].\n\n  - `xsd_date_time_type/1` for checking/enumerating the XSD date/time\n    datatype IRIs.\n\n  - `xsd_encode_string//0` a DCG rule for encoding strings of\n    characters according to the restrictions of the XSD string\n    datatype.\n\n  - `xsd_numeric_type/1` enumerates XSD numeric datatype IRIs.\n\n  - `xsd_strict_subtype/2` and `xsd:subtype/2` allow the hierarchy of\n    XSD datatype IRIs to be queried.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwouterbeek%2Fprolog_library_collection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwouterbeek%2Fprolog_library_collection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwouterbeek%2Fprolog_library_collection/lists"}