GitXplorerGitXplorer
W

PyChurch

public
17 stars
5 forks
0 issues

Commits

List of commits on branch master.
Unverified
358163be1b7c6a9a960da15eadb96ca4945b71d9

Update README.md

WWuTheFWasThat committed 7 years ago
Unverified
b1c66af1ff28340ef4ddd9bb5ede639e1e047a90

update readme

WWuTheFWasThat committed 8 years ago
Unverified
dea304c78337f03a791a4f9a8774de6f204c15a7

better readme

WWuTheFWasThat committed 9 years ago
Unverified
ea12082335509e2138951e65e2cd8b092ef531d0

uncommitted stuff, gitignore

WWuTheFWasThat committed 9 years ago
Unverified
37e958dc708270180abb080744edd2cba35e108a

changed to markdown

WWuTheFWasThat committed 12 years ago
Unverified
f41edab08284c0e8972a8984201c8171e7400caa

added r[float] notation parsing

WWuTheFWasThat committed 12 years ago

README

The README file for this repository.

NOTE: This project is defunct.

If you're interested, please check out these more recent projects:

PyChurch

Read paper for details

RUNNING LOCALLY

To run a shell: python run_program.py [-e ENGINE]

To run a program: python run_program.py [-e ENGINE] [-p PROGRAM]

Flags:

ENGINE:  r = randomdb, t = traces, rt = reduced traces
PROGRAM:  The directory of some Church program.

RUN A SERVER

All servers conform to a common REST API.

To run the python server: python server.py [-e ENGINE] [-v] [-p PORT]

To run a C server: python server.py [-s BINARY] [-v] [-p PORT]

Flags:

ENGINE:  r = randomdb, t = traces, rt = reduced traces
BINARY:  The directory of some C binary
PORT: The number of some port
The -v flag toggles whether the server should print its activity

SETUP ON EC2

See ec2_setup.txt

COMPILING THE C BINARIES

You can also compile a faster version of the server by doing the following:

  1. (OPTIONAL) Open socket_server.py, and change engine_type to what you'd like.
  2. Install pypy.
  3. Run (replace the path to the pypy folder as appropriate): python /Applications/pypy/rpython/bin/rpython socket_server.py For a tracing JIT version (NOT YET READY): python /Applications/pypy/rpython/bin/rpython --opt=jit socket_server.py WARNING: This can take a long time.
  4. This should create a binary called socket_server-c. You may want to rename it

DEFINING CUSTOM XRPs

See values.py for class definition

See xrp.py for examples

Remember to set self.sample, depending on whether your XRP is a sampler or rescorer!

ADDING PRIMITIVE PROCEDURES

See directives.py for examples. (Search for "PRIMITIVE PROCEDURES".) The syntax for expressions can be found near the bottom of expressions.py (or you can simply follow the examples). Don't forget the 3rd argument must be set to 'True'.

KNOWN ISSUES

  • Propagation should use a priority queue (it is currently wrong, sometimes)
  • Traces could be more intelligent at propagating up through arguments (and then, we can use the proper XRP if)
  • Some Jenkins tests fail
  • Outermost observe shouldn't be required
  • Assumes resampling XRPs are all deterministic
  • Needs to use unsample