Automate building and maintaining custom operating systems using declarative reasoning.
This repository contains Prolog code:
- context: An implementation of a Contextual Object Oriented Logic Programming paradigm for SWI-Prolog,
- eapi: A DCG Grammar for reading EAPI-8 (or earlier) compliant Gentoo ebuild information into Prolog facts and rules,
- knowledgebase: A structure to which Gentoo overlays and repositories can be registered.
- repository: A Prolog class representing a Gentoo Portage repository. Offers datalog-style querying and Git, Rsync or Webrsync syncing.
Other interesting files:
- An ebuild reader & parser,
- A prover which uses declarative reasoning to compute a Model and a logic Proof for realisation of a given ebuild,
- A planner capable of creating a build plan (Makefile) for realisation of a given ebuid proof,
- A pretty printer for build plans,
- A grapher capable of creating graphviz DOT files and interactive SVG files,
- Domain-specific rules for reasoning about ebuilds and their possible configurations,
This repository also contains some bash scripts to emulate Gentoo emerge.
The code is able to automatically generate interactive SVG graphs for all ebuilds, allowing you to walk through the Ebuild dependency graph. Dot files and corresponding SVG can be found here
The following screenshot shows a simple 'Person' class being instantiated. Private data member can be set and retrieved, but not accessed directly.
The class code:
The instance:
The following screenshot shows a Gentoo Portage repository and a Gentoo overlay being synced using git. Only the changed ebuilds have their Logic metadata updated.
In the following screenshots we show Gentoo ebuilds being read, parsed and queried using Prolog
Not available at this time.