SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2010.03485 · 2020

SPPL: Probabilistic Programming with Fast Exact Symbolic Inference

arXiv · PDF · Open in the Atlas

Code that ran

10 of 30 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 10 have no contract verdict; 0 failures of our instrument; 20 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/2010.03485.json · badge: /api/ran/2010.03485.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
probcomp/sppl canonical (classifier label)
classifier basis: census
10 ran · 20 no recorded run
FunctionStatusWhere it lives
get_intersection Ran
ran on a synthesized input
probcomp/sppl/src/sym_util.py
code served (permissive licence) · get_code("91c2d76dc04929cc")
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 set. 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

torch.manual_seed(0)

# The function takes 'sets' parameter which should be a list of set-like objects
# It calls .intersection() method on the first set with the rest as arguments
# So we need to create a list of Python sets

set1 = {1, 2, 3, 4, 5}
set2 = {3, 4, 5, 6, 7}
set3 = {4, 5, 8, 9}

ARGS = {
    "sets": [set1, set2, set3]
}
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 set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set 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
get_symbols Ran
ran on a synthesized input
probcomp/sppl/src/sym_util.py
code served (permissive licence) · get_code("9dd736346426c7cd")
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 list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 sympy

# Create a simple symbolic expression
x = sympy.Symbol('x')
y = sympy.Symbol('y')
z = sympy.Symbol('z')

# Build a valid expression using the symbols
expr = x**2 + y*z + 3*x - 5

ARGS = {
    'expr': expr
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
sympy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
get_union Ran
ran on a synthesized input
probcomp/sppl/src/sym_util.py
code served (permissive licence) · get_code("72e9099e7c74f264")
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 set. 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

torch.manual_seed(0)

# The function get_union takes a parameter 'sets' which should be a list of set objects
# It calls .union(*sets[1:]) on sets[0], so we need set objects with union method

set1 = {1, 2, 3}
set2 = {3, 4, 5}
set3 = {5, 6, 7}

ARGS = {
    'sets': [set1, set2, set3]
}
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 set — a set output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a set 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
log1mexp Ran
ran on a synthesized input
probcomp/sppl/src/math_util.py
code served (permissive licence) · get_code("27e10e42bf839bd7")
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 float64, ndim 0, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 numpy

def log1mexp(x):
    if x < 0.683:
        return numpy.log(-numpy.expm1(-x))
    else:
        return numpy.log1p(-numpy.exp(-x))

# The function takes a single parameter x which should be a numeric value
# that can be compared to 0.683 and used in numpy operations
# We'll test with a value that triggers the first branch (x < 0.683)

ARGS = {
    "x": 0.5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
logdiffexp Ran
ran on a synthesized input
probcomp/sppl/src/math_util.py
code served (permissive licence) · get_code("fc9d969f9e98c935")
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 float64, ndim 0, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 numpy

def log1mexp(x):
    if x < 0.683:
        return numpy.log(-numpy.expm1(-x))
    else:
        return numpy.log1p(-numpy.exp(-x))

def allclose(values, x):
    return numpy.allclose(values, x)

def logdiffexp(a, b):
    if b < a:
        return a + log1mexp(a - b)
    if allclose(b, a):
        return -float('inf')
    raise ValueError('Negative term in logdiffexp.')

# Set up test arguments
# a and b should be negative numbers (log probabilities)
# For the first branch (b < a), we need b < a
# Both should be negative since they represent log probabilities

a_val = -0.5
b_val = -1.5

ARGS = {
    'a': a_val,
    'b': b_val
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
lognorm Ran
ran on a synthesized input
probcomp/sppl/src/math_util.py
code served (permissive licence) · get_code("bde1a9f8774489ac")
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 list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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
from scipy.special import logsumexp

torch.manual_seed(0)

# The function lognorm takes an 'array' parameter
# It calls logsumexp(array) which works with array-like inputs (lists, numpy arrays, etc.)
# Then it iterates over 'a' in array and performs arithmetic (a - M)
# So array should be a list or array-like of numeric values

array = np.array([1.5, 2.3, 0.8, -1.2])

ARGS = {
    "array": array
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
solve_poly_inequality_symbolically Ran
ran on a synthesized input
probcomp/sppl/src/poly.py
code served (permissive licence) · get_code("64354224227a0e40")
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 Interval. 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 sympy

# The function takes:
# - expr: a sympy expression (typically a polynomial)
# - b: a number (bound for the inequality)
# - strict: a boolean (whether to use < or <=)

# Create a simple polynomial expression
x = sympy.Symbol('x')
expr = x**2 - 3*x + 2  # (x-1)(x-2)

# Create a bound value
b = 1

# Create a strict flag
strict = True

ARGS = {
    'expr': expr,
    'b': b,
    'strict': strict
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
sympy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Interval — a Interval output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Interval 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
to_numeric Ran
ran on a synthesized input
probcomp/sppl/src/distributions.py
code served (permissive licence) · get_code("0ce4881dcb327b6e")
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 int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape 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

torch.manual_seed(0)

ARGS = {
    "x": 42
}
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 int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
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
unroll_if Ran
ran on a synthesized input
probcomp/sppl/src/compilers/sppl_to_python.py
code served (permissive licence) · get_code("d208d8d7f2b1fd99")
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 list. 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 ast

# Create a simple if statement AST node to test the unroll_if function
# The function expects an ast.If node and an optional current parameter

# Build a simple if statement: if x > 5: y = 10
code_str = """
if x > 5:
    y = 10
elif x > 0:
    y = 5
else:
    y = 0
"""

tree = ast.parse(code_str)
if_node = tree.body[0]

# Verify it's an If node
assert isinstance(if_node, ast.If)

ARGS = {
    "node": if_node,
    "current": None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list 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
unroll_ifexp Ran
ran on a synthesized input
probcomp/sppl/src/compilers/sppl_to_python.py
code served (permissive licence) · get_code("19622879d1647b7f")
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 If. 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 ast

# Create a simple target for assignment
target = ast.Name(id='x', ctx=ast.Store())

# Create a simple IfExp (ternary expression)
# This represents: y if condition else z
test = ast.Name(id='condition', ctx=ast.Load())
body = ast.Constant(value=10)
orelse = ast.Constant(value=20)
node = ast.IfExp(test=test, body=body, orelse=orelse)

ARGS = {
    'target': target,
    'node': node
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type If — a If output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a If 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
Range Not yet run
unverified (harvested, no recorded run)
probcomp/sppl/src/sets.py
code served (permissive licence) · get_code("baee0e05ad0248df")
How it ran

no invocation recorded.

RealsPosLoc Not yet run
unverified (harvested, no recorded run)
probcomp/sppl/src/distributions.py
code served (permissive licence) · get_code("6e0ee20904acfa0f")
How it ran

no invocation recorded.

UnitIntervalLocScale Not yet run
unverified (harvested, no recorded run)
probcomp/sppl/src/distributions.py
code served (permissive licence) · get_code("688b62b496fcee46")
How it ran

no invocation recorded.

dnf_factor Not yet run
unverified (harvested, no recorded run)
probcomp/sppl/src/dnf.py
code served (permissive licence) · get_code("ee26be05f878892c")
How it ran

no invocation recorded.

dnf_non_disjoint_clauses Not yet run
unverified (harvested, no recorded run)
probcomp/sppl/src/dnf.py
code served (permissive licence) · get_code("527f747272f3070d")
How it ran

no invocation recorded.

dnf_normalize Not yet run
unverified (harvested, no recorded run)
probcomp/sppl/src/dnf.py
code served (permissive licence) · get_code("42f22ba89a518b3d")
How it ran

no invocation recorded.

get_piecewise_domains Not yet run
unverified (harvested, no recorded run)
probcomp/sppl/src/transforms.py
code served (permissive licence) · get_code("ab9b4ef49d2c921f")
How it ran

no invocation recorded.

get_piecewise_inverse Not yet run
unverified (harvested, no recorded run)
probcomp/sppl/src/transforms.py
code served (permissive licence) · get_code("54d900c269fd0a1f")
How it ran

no invocation recorded.

get_piecewise_symbol Not yet run
unverified (harvested, no recorded run)
probcomp/sppl/src/transforms.py
code served (permissive licence) · get_code("b91a9c114c711463")
How it ran

no invocation recorded.

get_poly_symbol Not yet run
unverified (harvested, no recorded run)
probcomp/sppl/src/poly.py
code served (permissive licence) · get_code("ae73ee797e75376a")
How it ran

no invocation recorded.

memoize Not yet run
unverified (harvested, no recorded run)
probcomp/sppl/src/spe.py
code served (permissive licence) · get_code("c085361f73a1d372")
How it ran

no invocation recorded.

render_nested_lists Not yet run
unverified (harvested, no recorded run)
probcomp/sppl/src/render.py
code served (permissive licence) · get_code("48560768848f1e6a")
How it ran

no invocation recorded.

render_nested_lists_concise Not yet run
unverified (harvested, no recorded run)
probcomp/sppl/src/render.py
code served (permissive licence) · get_code("2182f8250a46727d")
How it ran

no invocation recorded.

render_sppl Not yet run
unverified (harvested, no recorded run)
probcomp/sppl/src/compilers/spe_to_sppl.py
code served (permissive licence) · get_code("9c6d19e41ad6893a")
How it ran

no invocation recorded.

render_sppl_helper Not yet run
unverified (harvested, no recorded run)
probcomp/sppl/src/compilers/spe_to_sppl.py
code served (permissive licence) · get_code("35b4a90daadad6d0")
How it ran

no invocation recorded.

solve_poly_inequality Not yet run
unverified (harvested, no recorded run)
probcomp/sppl/src/poly.py
code served (permissive licence) · get_code("8ac65d5e54f33db5")
How it ran

no invocation recorded.

spe_simplify_sum Not yet run
unverified (harvested, no recorded run)
probcomp/sppl/src/spe.py
code served (permissive licence) · get_code("09c3217e8f9121da")
How it ran

no invocation recorded.

spe_simplify_sum_leaf Not yet run
unverified (harvested, no recorded run)
probcomp/sppl/src/spe.py
code served (permissive licence) · get_code("36e896e20603b0c2")
How it ran

no invocation recorded.

union_intervals Not yet run
unverified (harvested, no recorded run)
probcomp/sppl/src/sets.py
code served (permissive licence) · get_code("a783434f7d3fbd30")
How it ran

no invocation recorded.

union_intervals_finite Not yet run
unverified (harvested, no recorded run)
probcomp/sppl/src/sets.py
code served (permissive licence) · get_code("0dc0dfe76884c4bc")
How it ran

no invocation recorded.

Also present in other papers' code

Of 30 samples lifted from this paper's linked repositories, 30 carry a function identity and 0 do not. Of the 30 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 30 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 present the Sum-Product Probabilistic Language (SPPL), a new probabilistic programming language that automatically delivers exact solutions to a broad range of probabilistic inference queries. SPPL translates probabilistic programs into sum-product expressions, a new symbolic representation and associated semantic domain that extends standard sum-product networks to support mixed-type distributions, numeric transformations, logical formulas, and pointwise and set-valued constraints. We formalize SPPL via a novel translation strategy from probabilistic programs to sum-product expressions and give sound exact algorithms for conditioning on and computing probabilities of events. SPPL imposes a collection of restrictions on probabilistic programs to ensure they can be translated into sum-product expressions, which allow the system to leverage new techniques for improving the scalability of translation and inference by automatically exploiting probabilistic structure. We implement a prototype of SPPL with a modular architecture and evaluate it on benchmarks the system targets, showing that it obtains up to 3500x speedups over state-of-the-art symbolic systems on tasks such as verifying the fairness of decision tree classifiers, smoothing hidden Markov models, conditioning transformed random variables, and computing rare event probabilities.

For agents

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

get_harvested_code_for_paper("2010.03485")
get_code_for_paper("2010.03485")
have("2010.03485")

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

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

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

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

Connect an agent — have() is free.