Programming-by-Example (PBE) is the paradigm of program synthesis specified via input-output pairs. It is commonly used because examples are easy to provide and collect from the environment. A popular optimization for enumerative synthesis with examples is Observational Equivalence (OE), which groups programs into equivalence classes according to their evaluation on example inputs. Current formulations of OE, however, are severely limited by the assumption that the synthesizer’s target language contains only pure components with no side-effects, either enforcing this in their target language, or ignoring it, leading to an incorrect enumeration. This limits their ability to use realistic component sets. We address this limitation by borrowing from Separation Logic, which can compositionally reason about heap mutations. We reformulate PBE using a restricted Separation Logic: Concrete Heap Separation Logic (CHSL), transforming the search for programs into a proof search in CHSL. This lets us perform bottom-up enumerative synthesis without the need for expert-provided annotations or domain-specific inferences, but with three key advantages: we (i) preserve correctness in the presence of memory-mutating operations, (ii) compact the search space by representing many concrete programs as one under CHSL, and (iii) perform a provably correct OE-reduction. We present SObEq (Side-effects in OBservational EQuivalence), a bottom-up enumerative algorithm that, given a PBE task, searches for its CHSL derivation. The SObEq algorithm is proved correct with no purity assumptions: we show it is guaranteed to lose no solutions. We also evaluate our implementation of SObEq on benchmarks from the literature and online sources, and show that it produces high-quality results quickly.
@Article{ferdowsi_et_al:DARTS.11.2.2, author = {Ferdowsi, Kasra and Peleg, Hila}, title = {{Bottom-Up Synthesis of Memory Mutations with Separation Logic (Artifact)}}, pages = {2:1--2:3}, journal = {Dagstuhl Artifacts Series}, ISSN = {2509-8195}, year = {2025}, volume = {11}, number = {2}, editor = {Ferdowsi, Kasra and Peleg, Hila}, publisher = {Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik}, address = {Dagstuhl, Germany}, URL = {https://drops.dagstuhl.de/entities/document/10.4230/DARTS.11.2.2}, URN = {urn:nbn:de:0030-drops-233455}, doi = {10.4230/DARTS.11.2.2}, annote = {Keywords: Program synthesis, observational equivalence} }
78d047d62b3cf6970b1bfa0f2442a022
(Get MD5 Sum)
The artifact has been evaluated as described in the ECOOP 2025 Call for Artifacts and the ACM Artifact Review and Badging Policy.
Feedback for Dagstuhl Publishing