Skip to main content

An inference engine for extensional lambda-calculus

Project description

# Pomagma [![Build Status](]( [![Code Quality](]( [![PyPI Version](]( [![NPM Version](](

Pomagma is an inference engine for
[extensional λ-calculus](/doc/
Pomagma's server provides code analysis services including:

* simplification of code fragments
* validation of entire codebases
* search / code completion / program refinement

Pomagma has client libraries in python and Node.js, and powers the
[Puddle]( reactive coding environment.

## Documentation

* [Philosophy](/doc/
* [Using a client API](/doc/
* [Administering a server](/doc/

## Installing

The server targets Ubuntu 12.04 and 14.04.

git clone
cd pomagma
make && make test

Client libraries support Python 2.7 and Node.js.

pip install pomagma
npm install pomagma

## Quick Start

Start a local analysis server with the tiny default atlas

python -m pomagma analyze # starts server, Ctrl-C to quit

Query the server using the python client

from pomagma import analyst
with analyst.connect() as db:
print db.simplify(["APP I I"]) # prints [I]
print db.validate(["I"]) # prints [{"is_bot": False, "is_top": False}]

or the Node.js client

var analyst = require("pomagma").analyst;
var db = analyst.connect();
console.log(db.simplify(["APP I I"])); // prints [I]
console.log(db.validate(["I"])); // prints [{"is_bot": false, "is_top": false}]

## Building a larger atlas to power deeper analysis

Pomagma reasons about large programs by comparing code fragments
to an atlas of 10<sup>3</sup>-10<sup>5</sup> basic programs.
The tiny default atlas starts with ~2000 basic programs.

Start building a bigger atlas

python -m pomagma make max_size=10000 # kill and restart at any time

Pomagma is parallelized and needs lots of memory to build a large atlas.

| Atlas Size | Compute Time | Memory Space | Storage Space |
| 1 000 atoms | ~1 CPU hour | ~10MB | ~1MB uncompressed |
| 10 000 atoms | ~1 CPU week | ~1GB | ~100MB uncompressed |
| 100 000 atoms | ~5 CPU years | ~50GB | ~10GB uncompressed |

## License

Copyright 2005-2014 Fritz Obermeyer.<br/>
All code is licensed under the [MIT license](/LICENSE) unless otherwise noted.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pomagma-0.1.7.tar.gz (51.3 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page