SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1903.02482 · 2019

LF-PPL: A Low-Level First Order Probabilistic Programming Language for Non-Differentiable Models

arXiv · PDF · Open in the Atlas

Code that ran

2 of 9 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 0 failures of our instrument; 7 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/1903.02482.json · badge: /api/ran/1903.02482.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
bradleygramhansen/PyLFPPL canonical (classifier label)
classifier basis: census
2 ran · 7 no recorded run
FunctionStatusWhere it lives
namespace_from_module Ran
ran on a synthesized input
bradleygramhansen/PyLFPPL/pyppl/ppl_namespaces.py
code served (permissive licence) · get_code("0c2279cae59cda27")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
from importlib import import_module

torch.manual_seed(0)

# The function takes a module_name string and imports it, then returns
# the module's __name__ and a list of non-private attributes from dir()
# We need to provide a valid module name that can be imported

ARGS = {
    "module_name": "torch"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
union Ran
ran on a synthesized input
bradleygramhansen/PyLFPPL/pyppl/ppl_branch_scopes.py
code served (permissive licence) · get_code("de1fbd013c9806de")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

# Define stand-in classes for AST nodes
class AstUnary:
    def __init__(self, value=None):
        self.value = value

class AstBinary:
    def __init__(self, left, right):
        self.left = left
        self.right = right

# Define helper functions that are used in union()
def is_boolean_true(val):
    if isinstance(val, bool):
        return val
    if isinstance(val, (int, float)):
        return val != 0
    return False

def is_negation_of(test0, test1):
    # Simple check: return True if one is clearly negation of other
    if test0 is None or test1 is None:
        return False
    # For this test, we'll say they're negations if they're both AstUnary
    # but with different values
    if isinstance(test0, AstUnary) and isinstance(test1, AstUnary):
        return test0.value != test1.value
    return False

def makeIf(test, val0, val1):
    return {"condition": test, "true_value": val0, "false_value": val1}

# Create test data for single item case
single_item = [
    (None, "result_value_1")
]

# Create test data for two items case with matching values
two_items_matching = [
    (None, "same_value"),
    (True, "same_value")
]

# Create test data for two items case with negation
test_unary_1 = AstUnary(value=1)
test_unary_2 = AstUnary(value=2)
two_items_negation = [
    (test_unary_1, "value_1"),
    (test_unary_2, "value_2")
]

# Define ARGS - test with single item case (simplest valid path)
ARGS = {
    "items": single_item
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
create_network_graph Not yet run
unverified (harvested, no recorded run)
bradleygramhansen/PyLFPPL/pyppl/utils/core.py
code served (permissive licence) · get_code("fa928806c1ee8ba5")
How it ran

no invocation recorded.

display_graph Not yet run
unverified (harvested, no recorded run)
bradleygramhansen/PyLFPPL/pyppl/utils/core.py
code served (permissive licence) · get_code("052d494e54b4a79d")
How it ran

no invocation recorded.

makeDef Not yet run
unverified (harvested, no recorded run)
bradleygramhansen/PyLFPPL/pyppl/ppl_ast.py
code served (permissive licence) · get_code("1077abb2857dc411")
How it ran

no invocation recorded.

makeFor Not yet run
unverified (harvested, no recorded run)
bradleygramhansen/PyLFPPL/pyppl/ppl_ast.py
code served (permissive licence) · get_code("4d98a356f82b3225")
How it ran

no invocation recorded.

makeIf Not yet run
unverified (harvested, no recorded run)
bradleygramhansen/PyLFPPL/pyppl/ppl_ast.py
code served (permissive licence) · get_code("5523890ab53d8cb0")
How it ran

no invocation recorded.

parse Not yet run
unverified (harvested, no recorded run)
bradleygramhansen/PyLFPPL/pyppl/parser.py
code served (permissive licence) · get_code("09856c92b626bf2f")
How it ran

no invocation recorded.

parse_from_file Not yet run
unverified (harvested, no recorded run)
bradleygramhansen/PyLFPPL/pyppl/parser.py
code served (permissive licence) · get_code("535c0bbb19e8578b")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 9 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

We develop a new Low-level, First-order Probabilistic Programming Language (LF-PPL) suited for models containing a mix of continuous, discrete, and/or piecewise-continuous variables. The key success of this language and its compilation scheme is in its ability to automatically distinguish parameters the density function is discontinuous with respect to, while further providing runtime checks for boundary crossings. This enables the introduction of new inference engines that are able to exploit gradient information, while remaining efficient for models which are not everywhere differentiable. We demonstrate this ability by incorporating a discontinuous Hamiltonian Monte Carlo (DHMC) inference engine that is able to deliver automated and efficient inference for non-differentiable models. Our system is backed up by a mathematical formalism that ensures that any model expressed in this language has a density with measure zero discontinuities to maintain the validity of the inference engine.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("1903.02482")
get_code_for_paper("1903.02482")
have("1903.02482")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/1903.02482.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/1903.02482.svg)](https://syntology.ai/paper/1903.02482)

Connect an agent — have() is free.