Package: pomagma
[![Build Status](https://travis-ci.org/fritzo/pomagma.svg?branch=master)](https://travis-ci.org/fritzo/pomagma)[![PyPI Version](https://badge.fury.io/py/pomagma.svg)](https://pypi.python.org/pypi/pomagma)# PomagmaPomagma is an inference engine for[extensional untyped &lambda;-calculus](/doc/philosophy.md).Pomagma is useful for:- simplifying code fragments expressed in pure &lambda;-join calculus- validating entire codebases of &lambda;-terms and inequalities- testing and validating systems of inequalities- solving systems of inequalitiesPomagma follows a client-server database architecturewith a Python client library backed by a C++ database server.The correctness of Pomagma's theory is being verified in the[Hstar project](https://github.com/fritzo/hstar).- [Installing](#installing)- [Quick Start](#quick-start)- [Get An Atlas](#get-an-atlas)- [Using The Client Library](/doc/client.md)- [Developing](/doc/README.md)- [Dataflow Architecture](/doc/README.md#dataflow-architecture)- [File Organization](/doc/README.md#file-organization)- [Configuring](/doc/README.md#configuring)- [Testing](/doc/README.md#testing)- [Benchmarking](/doc/README.md#benchmarking)- [Vetting changes](/doc/README.md#vetting-changes)- [Philosophy](/doc/philosophy.md)## InstallingThe server targets Ubuntu 14.04 and 12.04, and installs in a python virtualenv.git clone https://github.com/fritzo/pomagmacd pomagma. install.shmake small-test     # takes ~5 CPU minutesmake test           # takes ~1 CPU hourThe client library supports Python 2.7.pip install pomagma## Quick StartStart a local analysis server with the tiny default atlaspomagma analyze             # starts server, Ctrl-C to quitThen in another terminal, start an interactive python client session$ pomagma connect           # starts a client session, Ctrl-D to quit>>> simplify(['APP I I'])[I]>>> validate(['I'])[{'is_bot': False, 'is_top': False}]>>> solve('x', 'EQUAL x APP x x', max_solutions=4)['I', 'BOT', 'TOP', 'V'],Alternatively, connect using the Python client librarypythonfrom pomagma import analystwith analyst.connect() as db:print db.simplify(["APP I I"])print db.validate(["I"])print db.solve('x', 'EQUAL x APP x x', max_solutions=4)## Get an AtlasPomagma reasons about large programs by approximately locating code fragmentsin an **atlas** of 10<sup>3</sup>-10<sup>5</sup> basic programs.The more basic programs in an atlas,the more accurate pomagma's analysis will be.Pomagma ships with a tiny default atlas of ~2000 basic programs.To get a large prebuilt atlas, put your AWS credentials in the environment andpomagma pull                  # downloads latest atlas from S3 bucketTo start building a custom atlas from scratchpomagma make max_size=10000   # kill and restart at any timePomagma 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          || 10 000 atoms  | ~1 CPU week  | ~1GB         | ~100MB        || 100 000 atoms | ~1 CPU year  | ~100GB       | ~10GB         |## LicenseCopyright 2005-2015 Fritz Obermeyer.<br/>All code is licensed under the [Apache 2.0 License](/LICENSE).