{"id":15663344,"url":"https://github.com/fritzo/pomagma","last_synced_at":"2025-05-05T23:52:02.608Z","repository":{"id":3858881,"uuid":"4943857","full_name":"fritzo/pomagma","owner":"fritzo","description":"An inference engine for extensional untyped λ-calculus","archived":false,"fork":false,"pushed_at":"2023-02-10T23:17:51.000Z","size":8380,"stargazers_count":17,"open_issues_count":12,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T06:51:39.002Z","etag":null,"topics":["inference-engine","lambda-calculus","theorem-proving"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fritzo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2012-07-08T05:22:16.000Z","updated_at":"2025-03-09T00:39:55.000Z","dependencies_parsed_at":"2023-07-07T03:01:14.324Z","dependency_job_id":null,"html_url":"https://github.com/fritzo/pomagma","commit_stats":{"total_commits":1997,"total_committers":3,"mean_commits":665.6666666666666,"dds":0.001502253380070151,"last_synced_commit":"ad2bf9c12eb58190f2761608c053ac89d3ddf305"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fritzo%2Fpomagma","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fritzo%2Fpomagma/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fritzo%2Fpomagma/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fritzo%2Fpomagma/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fritzo","download_url":"https://codeload.github.com/fritzo/pomagma/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252596375,"owners_count":21773844,"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":["inference-engine","lambda-calculus","theorem-proving"],"created_at":"2024-10-03T13:36:46.206Z","updated_at":"2025-05-05T23:52:02.338Z","avatar_url":"https://github.com/fritzo.png","language":"C++","readme":"# Pomagma\n\n[![Build Status](https://travis-ci.org/fritzo/pomagma.svg?branch=master)](https://travis-ci.org/fritzo/pomagma)\n[![PyPI Version](https://badge.fury.io/py/pomagma.svg)](https://pypi.python.org/pypi/pomagma)\n\nPomagma is an inference engine for\n[extensional untyped \u0026lambda;-join-calculus](/doc/philosophy.md),\na simple model of computation in which nondeterminism gives rise to\nan elegant gradual type system.\n\nPomagma can:\n\n- simplify code fragments expressed in \u0026lambda;-join-calculus\n- validate codebases of programs and assertions\n- solve systems of inequalities and horn clauses\n- synthesize code from sketches and inequality constraints\n\nPomagma's base theory is being formally verified in the\n[Hstar project](https://github.com/fritzo/hstar).\n\nPomagma's architecture follows a client-server model,\nwhere a Python client library performs high-level syntactic tasks,\nand a shared C++ database server performs low-level inference work.\n\n- [Installing](#installing)\n- [Quick Start](#quick-start)\n- [Get An Atlas](#get-an-atlas)\n- [Using The Client Library](/doc/client.md)\n- [Developing](/doc/README.md)\n  - [Architecture](/doc/README.md#dataflow-architecture)\n  - [Organization](/doc/README.md#file-organization)\n  - [Configuring](/doc/README.md#configuring)\n  - [Testing](/doc/README.md#testing)\n  - [Benchmarking](/doc/README.md#benchmarking)\n  - [Vetting changes](/doc/README.md#vetting-changes)\n- [Philosophy](/doc/philosophy.md)\n\n## Installing\n\nThe server targets Ubuntu 14.04 and 12.04, and installs in a python virtualenv.\n\n    git clone https://github.com/fritzo/pomagma\n    cd pomagma\n    . install.sh\n    make small-test     # takes ~5 CPU minutes\n    make test           # takes ~1 CPU hour\n\nThe client library supports Python 2.7.\n\n    pip install pomagma\n\n## Quick Start\n\nStart a local analysis server with the tiny pre-built atlas\n\n    pomagma analyze             # starts server, Ctrl-C to quit\n\nThen in another terminal, start an interactive python client session\n\n    $ pomagma connect           # starts a client session, Ctrl-D to quit\n    \u003e\u003e\u003e simplify(['APP I I'])\n    [I]\n    \u003e\u003e\u003e validate(['I'])\n    [{'is_bot': False, 'is_top': False}]\n    \u003e\u003e\u003e solve('x', 'EQUAL x APP x x', max_solutions=4)\n    ['I', 'BOT', 'TOP', 'V']\n    \u003e\u003e\u003e validate_facts(['EQUAL x TOP', 'LESS x BOT'])\n    False\n\nAlternatively, connect using the Python client library\n\n    python\n    from pomagma import analyst\n    with analyst.connect() as db:\n        print db.simplify([\"APP I I\"])\n        print db.validate([\"I\"])\n        print db.solve('x', 'EQUAL x APP x x', max_solutions=4)\n        print db.validate_facts(['EQUAL x TOP', 'LESS x BOT'])\n\n## Get an Atlas\n\nPomagma reasons about large programs by approximately locating code fragments\nin an **atlas** of 10\u003csup\u003e3\u003c/sup\u003e-10\u003csup\u003e5\u003c/sup\u003e basic programs.\nThe more basic programs in an atlas,\nthe more accurate pomagma's analysis will be.\nPomagma ships with a tiny pre-built atlas of ~2000 basic programs.\n\nTo get a large pre-built atlas, put your AWS credentials in the environment and\n\n    export AWS_ACCESS_KEY_ID=...        # put your id here\n    export AWS_SECRET_ACCESS_KEY=...    # put your hey here\n    pomagma pull                        # downloads latest atlas from S3\n\nTo start building a custom atlas from scratch\n\n    pomagma make max_size=10000         # kill and restart at any time\n\nPomagma is parallelized and needs lots of memory to build a large atlas.\n\n| Atlas Size    | Compute Time | Memory Space | Storage Space |\n|---------------|--------------|--------------|---------------|\n| 1 000 atoms   | ~1 CPU hour  | ~10MB        | ~1MB          |\n| 10 000 atoms  | ~1 CPU week  | ~1GB         | ~100MB        |\n| 100 000 atoms | ~1 CPU year  | ~100GB       | ~10GB         |\n\n## License\n\nCopyright (c) 2005-2017 Fritz Obermeyer.\u003cbr/\u003e\nPomagma is licensed under the [Apache 2.0 License](/LICENSE).\n\nPomagma ships with the [Google Farmhash](https://github.com/google/farmhash)\nlibrary, licensed under the [MIT](/src/third_party/farmhash/COPYING) license.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffritzo%2Fpomagma","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffritzo%2Fpomagma","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffritzo%2Fpomagma/lists"}