{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/exact-symbolic-inference-in-probabilistic","title":"SPPL: Probabilistic Programming with Fast Exact Symbolic Inference","arxiv_id":"2010.03485","date":"2020-10-07","proceeding":null,"authors":["Feras A. Saad","Martin C. Rinard","Vikash K. Mansinghka"],"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.","url_abs":"https://arxiv.org/abs/2010.03485v3","url_pdf":"https://arxiv.org/pdf/2010.03485v3.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"exact-symbolic-inference-in-probabilistic","repo_url":"https://github.com/probcomp/sppl","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"fairness","task_name":"Fairness"},{"task_slug":"probabilistic-programming","task_name":"Probabilistic Programming"},{"task_slug":"translation","task_name":"Translation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2010.03485","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2010.03485"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/probcomp/sppl","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"unverified":30},"by_repo_kind":{"official":{"samples":30,"ran":0,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"baee0e05ad0248df","entry":"Range","repo":"probcomp/sppl","repo_kind":"official","path":"src/sets.py","file_url":"https://github.com/probcomp/sppl/blob/HEAD/src/sets.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"baee0e05ad0248df"}},{"code_sha256_prefix":"6e0ee20904acfa0f","entry":"RealsPosLoc","repo":"probcomp/sppl","repo_kind":"official","path":"src/distributions.py","file_url":"https://github.com/probcomp/sppl/blob/HEAD/src/distributions.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"6e0ee20904acfa0f"}},{"code_sha256_prefix":"688b62b496fcee46","entry":"UnitIntervalLocScale","repo":"probcomp/sppl","repo_kind":"official","path":"src/distributions.py","file_url":"https://github.com/probcomp/sppl/blob/HEAD/src/distributions.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"688b62b496fcee46"}},{"code_sha256_prefix":"ee26be05f878892c","entry":"dnf_factor","repo":"probcomp/sppl","repo_kind":"official","path":"src/dnf.py","file_url":"https://github.com/probcomp/sppl/blob/HEAD/src/dnf.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ee26be05f878892c"}},{"code_sha256_prefix":"527f747272f3070d","entry":"dnf_non_disjoint_clauses","repo":"probcomp/sppl","repo_kind":"official","path":"src/dnf.py","file_url":"https://github.com/probcomp/sppl/blob/HEAD/src/dnf.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"527f747272f3070d"}},{"code_sha256_prefix":"42f22ba89a518b3d","entry":"dnf_normalize","repo":"probcomp/sppl","repo_kind":"official","path":"src/dnf.py","file_url":"https://github.com/probcomp/sppl/blob/HEAD/src/dnf.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"42f22ba89a518b3d"}},{"code_sha256_prefix":"91c2d76dc04929cc","entry":"get_intersection","repo":"probcomp/sppl","repo_kind":"official","path":"src/sym_util.py","file_url":"https://github.com/probcomp/sppl/blob/HEAD/src/sym_util.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"91c2d76dc04929cc"}},{"code_sha256_prefix":"ab9b4ef49d2c921f","entry":"get_piecewise_domains","repo":"probcomp/sppl","repo_kind":"official","path":"src/transforms.py","file_url":"https://github.com/probcomp/sppl/blob/HEAD/src/transforms.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ab9b4ef49d2c921f"}},{"code_sha256_prefix":"54d900c269fd0a1f","entry":"get_piecewise_inverse","repo":"probcomp/sppl","repo_kind":"official","path":"src/transforms.py","file_url":"https://github.com/probcomp/sppl/blob/HEAD/src/transforms.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"54d900c269fd0a1f"}},{"code_sha256_prefix":"b91a9c114c711463","entry":"get_piecewise_symbol","repo":"probcomp/sppl","repo_kind":"official","path":"src/transforms.py","file_url":"https://github.com/probcomp/sppl/blob/HEAD/src/transforms.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b91a9c114c711463"}},{"code_sha256_prefix":"ae73ee797e75376a","entry":"get_poly_symbol","repo":"probcomp/sppl","repo_kind":"official","path":"src/poly.py","file_url":"https://github.com/probcomp/sppl/blob/HEAD/src/poly.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ae73ee797e75376a"}},{"code_sha256_prefix":"9dd736346426c7cd","entry":"get_symbols","repo":"probcomp/sppl","repo_kind":"official","path":"src/sym_util.py","file_url":"https://github.com/probcomp/sppl/blob/HEAD/src/sym_util.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9dd736346426c7cd"}},{"code_sha256_prefix":"72e9099e7c74f264","entry":"get_union","repo":"probcomp/sppl","repo_kind":"official","path":"src/sym_util.py","file_url":"https://github.com/probcomp/sppl/blob/HEAD/src/sym_util.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"72e9099e7c74f264"}},{"code_sha256_prefix":"27e10e42bf839bd7","entry":"log1mexp","repo":"probcomp/sppl","repo_kind":"official","path":"src/math_util.py","file_url":"https://github.com/probcomp/sppl/blob/HEAD/src/math_util.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"27e10e42bf839bd7"}},{"code_sha256_prefix":"fc9d969f9e98c935","entry":"logdiffexp","repo":"probcomp/sppl","repo_kind":"official","path":"src/math_util.py","file_url":"https://github.com/probcomp/sppl/blob/HEAD/src/math_util.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"fc9d969f9e98c935"}},{"code_sha256_prefix":"bde1a9f8774489ac","entry":"lognorm","repo":"probcomp/sppl","repo_kind":"official","path":"src/math_util.py","file_url":"https://github.com/probcomp/sppl/blob/HEAD/src/math_util.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"bde1a9f8774489ac"}},{"code_sha256_prefix":"c085361f73a1d372","entry":"memoize","repo":"probcomp/sppl","repo_kind":"official","path":"src/spe.py","file_url":"https://github.com/probcomp/sppl/blob/HEAD/src/spe.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c085361f73a1d372"}},{"code_sha256_prefix":"48560768848f1e6a","entry":"render_nested_lists","repo":"probcomp/sppl","repo_kind":"official","path":"src/render.py","file_url":"https://github.com/probcomp/sppl/blob/HEAD/src/render.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"48560768848f1e6a"}},{"code_sha256_prefix":"2182f8250a46727d","entry":"render_nested_lists_concise","repo":"probcomp/sppl","repo_kind":"official","path":"src/render.py","file_url":"https://github.com/probcomp/sppl/blob/HEAD/src/render.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2182f8250a46727d"}},{"code_sha256_prefix":"9c6d19e41ad6893a","entry":"render_sppl","repo":"probcomp/sppl","repo_kind":"official","path":"src/compilers/spe_to_sppl.py","file_url":"https://github.com/probcomp/sppl/blob/HEAD/src/compilers/spe_to_sppl.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9c6d19e41ad6893a"}},{"code_sha256_prefix":"35b4a90daadad6d0","entry":"render_sppl_helper","repo":"probcomp/sppl","repo_kind":"official","path":"src/compilers/spe_to_sppl.py","file_url":"https://github.com/probcomp/sppl/blob/HEAD/src/compilers/spe_to_sppl.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"35b4a90daadad6d0"}},{"code_sha256_prefix":"8ac65d5e54f33db5","entry":"solve_poly_inequality","repo":"probcomp/sppl","repo_kind":"official","path":"src/poly.py","file_url":"https://github.com/probcomp/sppl/blob/HEAD/src/poly.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8ac65d5e54f33db5"}},{"code_sha256_prefix":"64354224227a0e40","entry":"solve_poly_inequality_symbolically","repo":"probcomp/sppl","repo_kind":"official","path":"src/poly.py","file_url":"https://github.com/probcomp/sppl/blob/HEAD/src/poly.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"64354224227a0e40"}},{"code_sha256_prefix":"09c3217e8f9121da","entry":"spe_simplify_sum","repo":"probcomp/sppl","repo_kind":"official","path":"src/spe.py","file_url":"https://github.com/probcomp/sppl/blob/HEAD/src/spe.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"09c3217e8f9121da"}},{"code_sha256_prefix":"36e896e20603b0c2","entry":"spe_simplify_sum_leaf","repo":"probcomp/sppl","repo_kind":"official","path":"src/spe.py","file_url":"https://github.com/probcomp/sppl/blob/HEAD/src/spe.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"36e896e20603b0c2"}},{"code_sha256_prefix":"0ce4881dcb327b6e","entry":"to_numeric","repo":"probcomp/sppl","repo_kind":"official","path":"src/distributions.py","file_url":"https://github.com/probcomp/sppl/blob/HEAD/src/distributions.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0ce4881dcb327b6e"}},{"code_sha256_prefix":"a783434f7d3fbd30","entry":"union_intervals","repo":"probcomp/sppl","repo_kind":"official","path":"src/sets.py","file_url":"https://github.com/probcomp/sppl/blob/HEAD/src/sets.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a783434f7d3fbd30"}},{"code_sha256_prefix":"0dc0dfe76884c4bc","entry":"union_intervals_finite","repo":"probcomp/sppl","repo_kind":"official","path":"src/sets.py","file_url":"https://github.com/probcomp/sppl/blob/HEAD/src/sets.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0dc0dfe76884c4bc"}},{"code_sha256_prefix":"d208d8d7f2b1fd99","entry":"unroll_if","repo":"probcomp/sppl","repo_kind":"official","path":"src/compilers/sppl_to_python.py","file_url":"https://github.com/probcomp/sppl/blob/HEAD/src/compilers/sppl_to_python.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d208d8d7f2b1fd99"}},{"code_sha256_prefix":"19622879d1647b7f","entry":"unroll_ifexp","repo":"probcomp/sppl","repo_kind":"official","path":"src/compilers/sppl_to_python.py","file_url":"https://github.com/probcomp/sppl/blob/HEAD/src/compilers/sppl_to_python.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"19622879d1647b7f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}