SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1807.03168 · 2018

NAPS: Natural Program Synthesis Dataset

arXiv · PDF · Open in the Atlas

Code that ran

14 of 14 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 14 have no contract verdict; 0 failures of our instrument; 0 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/1807.03168.json · badge: /api/ran/1807.03168.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
nearai/program_synthesis community (classifier label)
classifier basis not recorded on the link
14 ran · 0 no recorded run
FunctionStatusWhere it lives
deref Ran
ran on a synthesized input
nearai/program_synthesis/program_synthesis/algolisp/dataset/code_lisp.py
code served (permissive licence) · get_code("b69ed404cffde12f")
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

torch.manual_seed(0)

# The function deref(a, idx) accesses a[idx] after bounds checking
# 'a' must be a sequence-like object with len() and indexing support
# 'idx' must be an integer

# Create a simple list as the array
a = [10, 20, 30, 40, 50]

# Create a valid index within bounds
idx = 2

ARGS = {
    'a': a,
    'idx': idx
}
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 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
dict_insert Ran
ran on a synthesized input
nearai/program_synthesis/program_synthesis/algolisp/dataset/code_lisp.py
code served (permissive licence) · get_code("e8f7da4b784fc180")
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 dict. 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)

# dict_insert takes three parameters: d (dict), key (hashable), and value (any object)
# The function simply assigns value to d[key] and returns d
# No special attributes or methods are called on any of the parameters

d = {"existing_key": "existing_value"}
key = "new_key"
value = torch.randn(2, 4)

ARGS = {
    "d": d,
    "key": key,
    "value": value,
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
evaluate_code Ran
ran on a synthesized input
nearai/program_synthesis/program_synthesis/algolisp/dataset/executor.py
code served (permissive licence) · get_code("4f400a0410389c02")
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 dict. 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)

class MockExecutionResult:
    def __init__(self, result):
        self.result = result

class MockExecutor:
    def execute(self, code, arguments, test_input):
        if "syntax_error" in code:
            raise ExecutorSyntaxException("Syntax error in code")
        if "runtime_error" in code:
            raise ExecutorRuntimeException("Runtime error in code")
        return MockExecutionResult(test_input * 2)
    
    def compare(self, expected, actual):
        if expected is None or actual is None:
            return expected == actual
        return expected == actual

class ExecutorSyntaxException(Exception):
    pass

class ExecutorRuntimeException(Exception):
    pass

code = "result = input_val * 2"

arguments = {
    "x": 5,
    "y": 10
}

tests = [
    {"input": 3, "output": 6},
    {"input": 7, "output": 14},
    {"input": 2, "output": 4}
]

executor_ = MockExecutor()

ARGS = {
    "code": code,
    "arguments": arguments,
    "tests": tests,
    "executor_": executor_
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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_arg_parser Ran
ran on a synthesized input
nearai/program_synthesis/program_synthesis/algolisp/arguments.py
code served (permissive licence) · get_code("a0a5ef0b6a4766f4")
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 ArgumentParser. 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 argparse

torch_imported = False
try:
    import torch
    import torch.nn as nn
    torch.manual_seed(0)
    torch_imported = True
except ImportError:
    pass

ARGS = {
    'title': 'Test Argument Parser',
    'mode': 'train'
}
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 ArgumentParser — a ArgumentParser output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ArgumentParser 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_attn_mask Ran
ran on a synthesized input
nearai/program_synthesis/program_synthesis/algolisp/models/base.py
code served (permissive licence) · get_code("3069133773737990")
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 Tensor, ndim 2, dtype family float, shape (2, 5) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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

torch.manual_seed(0)

# seq_lengths: a list of sequence lengths for each sample in the batch
# cuda: a boolean flag indicating whether to use CUDA tensors

seq_lengths = [3, 5]  # batch_size=2, with different sequence lengths
cuda = False

ARGS = {
    "seq_lengths": seq_lengths,
    "cuda": cuda,
}
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 Tensor, ndim 2, dtype family float, shape (2, 5) — shape (2, 5) 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
if_ Ran
ran on a synthesized input
nearai/program_synthesis/program_synthesis/algolisp/dataset/code_lisp.py
code served (permissive licence) · get_code("999857411b1c05bd")
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

torch.manual_seed(0)

# Analyze the function:
# - context: passed but not used in the function body
# - cond_: tuple where cond_[1] is asserted (must be truthy), cond_[0] is callable
# - then_: tuple where then_[0] is callable or a value, then_[1] is a boolean flag
# - else_: tuple where else_[0] is callable or a value, else_[1] is a boolean flag
# The function checks cond_[0]() and calls then_[0]() or returns then_[0] based on then_[1]
# Similarly for else_ branch

# Create simple callables that return distinct values
def cond_func():
    return True

def then_func():
    return "then_result"

def else_func():
    return "else_result"

# Build the arguments
context = {"dummy": "context_data"}

cond_ = (cond_func, True)  # cond_[1] must be truthy for assertion to pass

then_ = (then_func, True)  # then_[1] = True means call then_[0]()

else_ = (else_func, False)  # else_[1] = False means return else_[0] directly

ARGS = {
    "context": context,
    "cond_": cond_,
    "then_": then_,
    "else_": else_
}
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
is_same_code Ran
ran on a synthesized input
nearai/program_synthesis/program_synthesis/algolisp/dataset/evaluation.py
code served (permissive licence) · get_code("7f02290e00957eb3")
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 bool, ndim 0, dtype family float, 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

class Example:
    def __init__(self, code_sequence):
        self.code_sequence = code_sequence

class Result:
    def __init__(self, code_sequence=None, code_tree=None):
        self.code_sequence = code_sequence
        self.code_tree = code_tree

# Test case 1: res has code_sequence attribute that matches
example1 = Example(code_sequence="def foo(): pass")
res1 = Result(code_sequence="def foo(): pass")

# Test case 2: res has code_sequence but doesn't match
example2 = Example(code_sequence="def bar(): pass")
res2 = Result(code_sequence="def foo(): pass")

# Test case 3: res has code_tree instead (code_sequence is None)
example3 = Example(code_sequence="tree1")
res3 = Result(code_sequence=None, code_tree="tree1")

# Test case 4: res is a string (no code_sequence attribute)
example4 = Example(code_sequence="simple_code")
res4 = "simple_code"

# Use the first test case for ARGS
ARGS = {
    "example": example1,
    "res": res1
}
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 bool, ndim 0, dtype family float, 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
lengths Ran
ran on a synthesized input
nearai/program_synthesis/program_synthesis/algolisp/models/prepare_spec.py
code served (permissive licence) · get_code("374a7dbd969661c0")
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 int; 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

torch.manual_seed(0)

# The function 'lengths' takes a parameter 'lsts' which should be an iterable
# of iterables (lists, tuples, etc.). It returns a list of lengths of each.
# We need to construct a simple argument.

ARGS = {
    "lsts": [
        [1, 2, 3],
        [4, 5],
        [6, 7, 8, 9],
    ]
}
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 list, ndim 1, dtype family int — 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
lists_to_numpy Ran
ran on a synthesized input
nearai/program_synthesis/program_synthesis/algolisp/models/prepare_spec.py
code served (permissive licence) · get_code("8245ce9c69c8a728")
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 ndarray, ndim 2, dtype family int, shape (2, 3) 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 numpy as np

# Create a simple stoi (string-to-index) function
def stoi_func(element):
    """Maps elements to indices"""
    mapping = {
        'apple': 0,
        'banana': 1,
        'cherry': 2,
        'date': 3,
    }
    return mapping.get(element, 0)

# Create sample lists of strings
lsts = [
    ['apple', 'banana', 'cherry'],
    ['date', 'apple'],
]

# Define the arguments
ARGS = {
    'lsts': lsts,
    'stoi': stoi_func,
    'default_value': -1,
}
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 ndarray, ndim 2, dtype family int, shape (2, 3) — shape (2, 3) 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
load_vocab Ran
ran on a synthesized input
nearai/program_synthesis/program_synthesis/algolisp/dataset/data.py
code served (permissive licence) · get_code("711c950a814e87b1")
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 dict. 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 tempfile
import os

# Create a temporary file with vocab data in the expected format
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_file.write("apple\t1\n")
temp_file.write("banana\t2\n")
temp_file.write("cherry\t3\n")
temp_file.close()

ARGS = {
    'filename': temp_file.name,
    'mapping': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
six — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
load_vocabs Ran
ran on a synthesized input
nearai/program_synthesis/program_synthesis/algolisp/dataset/data.py
code served (permissive licence) · get_code("65328b865cae556f")
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 WordCodeVocab. 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 tempfile
import os

# Create temporary vocab files
temp_dir = tempfile.mkdtemp()

word_vocab_file = os.path.join(temp_dir, 'word_vocab.txt')
code_vocab_file = os.path.join(temp_dir, 'code_vocab.txt')

# Write word vocab file with tab-separated key-value pairs
with open(word_vocab_file, 'w') as f:
    f.write('the\t0\n')
    f.write('a\t1\n')
    f.write('hello\t2\n')
    f.write('world\t3\n')

# Write code vocab file with tab-separated key-value pairs
with open(code_vocab_file, 'w') as f:
    f.write('def\t0\n')
    f.write('class\t1\n')
    f.write('return\t2\n')
    f.write('import\t3\n')

ARGS = {
    'word_filename': word_vocab_file,
    'code_filename': code_vocab_file,
    'num_placeholders': 10,
    'mapping': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
six — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type WordCodeVocab — a WordCodeVocab output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a WordCodeVocab 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
numpy_to_tensor Ran
ran on a synthesized input
nearai/program_synthesis/program_synthesis/algolisp/models/prepare_spec.py
code served (permissive licence) · get_code("7c6ed20cfdd0acb6")
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 Tensor, ndim 2, dtype family int, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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
from torch.autograd import Variable

torch.manual_seed(0)

# Create a small numpy array to pass as 'arr'
arr = np.array([[1, 2, 3, 4], [5, 6, 7, 8]], dtype=np.int64)

# Define arguments for the function
ARGS = {
    'arr': arr,
    'cuda': False,
    'volatile': False
}
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 Tensor, ndim 2, dtype family int, shape (2, 4) — shape (2, 4) 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
parse_statement Ran
ran on a synthesized input
nearai/program_synthesis/program_synthesis/algolisp/dataset/code_lisp_parser.py
code served (permissive licence) · get_code("484ab7df7746be7c")
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 re

def parse_statement(program):
    def _parse_args(args):
        cnt = 0
        res, cur = ([], '')
        for i in range(len(args)):
            if args[i] == '(':
                cnt += 1
            elif args[i] == ')':
                cnt -= 1
            elif args[i] == ',':
                if cnt == 0:
                    if cur:
                        res.append(cur.strip())
                        cur = ''
                    continue
            cur += args[i]
        if cur:
            res.append(cur.strip())
        return res
    res = re.match('([^\\(\\)]*)\\((.*)\\)', program)
    if res:
        func, args = res.groups()
        args = _parse_args(args)
        lst = [parse_statement(arg) for arg in args]
        return [func] + lst
    return program

# The function takes a single parameter: program
# It should be a string representing a program/statement with function calls
# The function recursively parses nested function calls

# Test case 1: Simple function call with arguments
test_program_1 = "func(arg1, arg2)"

# Test case 2: Nested function calls
test_program_2 = "outer(inner(a, b), c)"

# Test case 3: Single argument
test_program_3 = "func(x)"

# Test case 4: No arguments
test_program_4 = "func()"

# Test case 5: Complex nested with multiple levels
test_program_5 = "f(g(h(x), y), z)"

ARGS = {
    "program": test_program_2
}
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
replace_pad_with_end Ran
ran on a synthesized input
nearai/program_synthesis/program_synthesis/algolisp/dataset/data.py
code served (permissive licence) · get_code("22048f44250fc46a")
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 Tensor, ndim 2, dtype family int, shape (2, 4) 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

torch.manual_seed(0)

# The function replace_pad_with_end takes a single parameter 'var'
# It expects var to be a tensor that supports:
# - .clone() method
# - indexing with == comparison (var == PAD_TOKEN)
# - assignment via indexing (var[...] = value)

# Create a small tensor with some PAD_TOKEN values
var = torch.tensor([[-1, 0, 2, 3],
                    [1, -1, 5, -1]], dtype=torch.long)

ARGS = {
    'var': var
}
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 Tensor, ndim 2, dtype family int, shape (2, 4) — shape (2, 4) 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

Also present in other papers' code

Of 14 samples lifted from this paper's linked repositories, 14 carry a function identity and 0 do not. Of the 14 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 13 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.

FunctionAlso present inEarliest-datedOthers named
replace_pad_with_end 1 other paper
1 later
2007.08095 (2020-07)
Synthesize, Execute and Debug: Learning to Repair for Neural Program Synthesis

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 a program synthesis-oriented dataset consisting of human written problem statements and solutions for these problems. The problem statements were collected via crowdsourcing and the program solutions were extracted from human-written solutions in programming competitions, accompanied by input/output examples. We propose using this dataset for the program synthesis tasks aimed for working with real user-generated data. As a baseline we present few models, with the best model achieving 8.8% accuracy, showcasing both the complexity of the dataset and large room for future research.

For agents

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

get_harvested_code_for_paper("1807.03168")
get_code_for_paper("1807.03168")
have("1807.03168")

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

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

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

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

Connect an agent — have() is free.