Skip to content
/ ppm Public

Prolog Package Manager (PPM): A package manager for Prolog.

License

Notifications You must be signed in to change notification settings

wouterbeek/ppm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prolog-Package-Manager (PPM)

A package manager for SWI-Prolog.

Prolog Package Manager (PPM) makes it easy to install Prolog code by using the Github service. The only requirements are that (i) the repository is open / publicly available, (ii) contains a /prolog folder with Prolog module files, and (iii) has a ppm.json file specifying its dependencies.

Instal PPM

  1. Install a recent version of SWI-Prolog.
  2. Start Prolog and call the following goal: pack_install('git://github.com/wouterbeek/Prolog-Package-Manager').

Install a package through PPM

Suppose you want to install package Prolog-Library-Collection from user wouterbeek, published at https://github.com/wouterbeek/Prolog-Library-Collection:

  1. Run SWI-Prolog and load PPM: [library(ppm)].
  2. Run ppm_install(wouterbeek, 'Prolog-Library-Collection').
  3. In order to access package modules from the Prolog library path, PPM must be loaded first (see step 1). You automate this step by adding the following line to the Prolog startup file (~~/.swiplrc~): :- use_module(library(ppm)).
  4. Package modules can now be loaded from the Prolog library path. (E.g., [library(atom_ext)]. loads a specific module from the Prolog-Library-Collection.)

Publish a package through PPM

Suppose that user foo wants to publish a package called bar:

  1. Develop the package locally in a Git-controlled directory.
  2. Make sure the direcotry contains a file called ppm.json that specifies its dependencies (if any). For example:
    {"dependencies": [
      {"user": "wouterbeek", "repo": "Prolog-Library-Collection"}
    ]}
        
  3. Start Prolog and load PPM: [library(ppm)]. (For convenience, this line can be added to the Prolog startup file: ~~/.swiplrc~)
  4. Publish a specific version of your package with the following call: ppm_publish(bar, version(0,1,0)).

About

Prolog Package Manager (PPM): A package manager for Prolog.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages