SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2210.02875 · ICLR · 2023

Binding Language Models in Symbolic Languages

Caiming Xiong, Luke Zettlemoyer, Tao Yu, Dragomir Radev, Noah Smith, Zhoujun Cheng, Tianbao Xie, Peng Shi, Chengzu Li, ♠ Rahul, Yushi Hu, Mari Ostendorf

arXiv · PDF · Open in the Atlas

Code that ran

2 of 3 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 1 failure of our instrument; 1 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/2210.02875.json · badge: /api/ran/2210.02875.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
xlang-ai/binder community
Papers with Code archive
2 ran · 1 no recorded run
FunctionStatusWhere it lives
convert_type Ran
ran, honoured the contract we drafted
xlang-ai/binder/nsql/parser.py
code served (permissive licence) · get_code("68dd94239e84d0ba")
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) 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)

def convert_type(value):
    try:
        return eval(value)
    except Exception as e:
        return value

# The function takes a single parameter 'value' which is passed to eval()
# eval() expects a string containing a Python expression
# We'll test with a simple string that can be evaluated

ARGS = {
    "value": "42"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
get_cfg_tree Ran
ran; our contract draft was wrong, not the code
xlang-ai/binder/nsql/parser.py
code served (permissive licence) · get_code("59b8d272e4121f4a")
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) and returned TreeNode. 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
from typing import List

class TreeNode(object):

    def __init__(self, name=None, father=None):
        self.name: str = name
        self.rename: str = name
        self.father: TreeNode = father
        self.children: List = []
        self.produced_col_name_s = None

    def __eq__(self, other):
        return self.rename == other.rename

    def __hash__(self):
        return hash(self.rename)

    def set_name(self, name):
        self.name = name
        self.rename = name

    def add_child(self, child):
        self.children.append(child)
        child.father = self

    def rename_father_col(self, col_idx: int, col_prefix: str='col_'):
        new_col_name = '{}{}'.format(col_prefix, col_idx)
        self.father.rename = self.father.rename.replace(self.name, '{}'.format(new_col_name))
        self.produced_col_name_s = [new_col_name]

    def rename_father_val(self, val_names):
        if len(val_names) == 1:
            val_name = val_names[0]
            new_val_equals_str = "'{}'".format(val_name) if isinstance(convert_type(val_name), str) else '{}'.format(val_name)
        else:
            new_val_equals_str = '({})'.format(', '.join(["'{}'".format(val_name) for val_name in val_names]))
        self.father.rename = self.father.rename.replace(self.name, new_val_equals_str)

def convert_type(value):
    try:
        return eval(value)
    except Exception as e:
        return value

def get_cfg_tree(nsql: str):
    """
    Parse QA() into a tree for execution guiding.
    @param nsql:
    @return:
    """
    stack: List = []
    expression_stack: List = []
    current_tree_node = TreeNode(name=nsql)
    for idx in range(len(nsql)):
        if nsql[idx] == '(':
            stack.append(idx)
            if idx > 1 and nsql[idx - 2:idx + 1] == 'QA(' and (idx - 2 != 0):
                tree_node = TreeNode()
                current_tree_node.add_child(tree_node)
                expression_stack.append(current_tree_node)
                current_tree_node = tree_node
        elif nsql[idx] == ')':
            left_clause_idx = stack.pop()
            if idx > 1 and nsql[left_clause_idx - 2:left_clause_idx + 1] == 'QA(' and (left_clause_idx - 2 != 0):
                nsql_span = nsql[left_clause_idx - 2:idx + 1]
                current_tree_node.set_name(nsql_span)
                current_tree_node = expression_stack.pop()
    return current_tree_node


ARGS = {
    "nsql": "SELECT QA(column1) FROM table1"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type TreeNode — a TreeNode output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a TreeNode 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
TreeNode Not yet run
unverified (harvested, no recorded run)
xlang-ai/binder/nsql/parser.py
code served (permissive licence) · get_code("a2bdae85fa671acc")
How it ran

no invocation recorded.

Also present in other papers' code

Of 3 samples lifted from this paper's linked repositories, 3 carry a function identity and 0 do not. Of the 3 distinct functions with an identity, 2 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 2 later) and 1 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
convert_type
brick of this paper's assembly: helper
1 other paper
1 later
2407.05952 (2024-07)
H-STAR: LLM-driven Hybrid SQL-Text Adaptive Reasoning on Tables
get_cfg_tree
brick of this paper's assembly: entry
1 other paper
1 later
2407.05952 (2024-07)
H-STAR: LLM-driven Hybrid SQL-Text Adaptive Reasoning on Tables

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

Though end-to-end neural approaches have recently been dominating NLP tasks in both performance and ease-of-use, they lack interpretability and robustness. We propose BINDER, a training-free neural-symbolic framework that maps the task input to a program, which (1) allows binding a unified API of language model (LM) functionalities to a programming language (e.g., SQL, Python) to extend its grammar coverage and thus tackle more diverse questions, (2) adopts an LM as both the program parser and the underlying model called by the API during execution, and (3) requires only a few in-context exemplar annotations. Specifically, we employ GPT-3 Codex as the LM. In the parsing stage, with only a few incontext exemplars, Codex is able to identify the part of the task input that cannot be answerable by the original programming language, correctly generate API calls to prompt Codex to solve the unanswerable part, and identify where to place the API calls while being compatible with the original grammar. In the execution stage, Codex can perform versatile functionalities (e.g., commonsense QA, information extraction) given proper prompts in the API calls. BINDER achieves state-of-the-art results on WIKITABLEQUESTIONS and TABFACT datasets, with explicit output programs that benefit human debugging. Note that previous best systems are all finetuned on tens of thousands of task-specific samples, while BINDER only uses dozens of annotations as in-context exemplars without any training. Our code is available at https://github.com/hkunlp/binder 1 .

For agents

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

get_harvested_code_for_paper("2210.02875")
get_code_for_paper("2210.02875")
have("2210.02875")

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

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

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

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

Connect an agent — have() is free.