SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1910.13445 · 2019

G2SAT: Learning to Generate SAT Formulas

arXiv · PDF · Open in the Atlas

Code that ran

7 of 8 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 7 have no contract verdict; 0 failures 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/1910.13445.json · badge: /api/ran/1910.13445.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
JiaxuanYou/G2SAT community (classifier label)
classifier basis not recorded on the link
7 ran · 1 no recorded run
FunctionStatusWhere it lives
cut_inner_edge Ran
ran on a synthesized input
JiaxuanYou/G2SAT/eval/conversion.py
code served (permissive licence) · get_code("96246363ffb91375")
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 2, 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
import numpy as np

torch.manual_seed(0)

# Analyze the function:
# - mat: a 2D list/array that supports indexing with [i][j] and len()
# - partite: an integer used for slicing operations
# The function modifies mat in-place and returns it

# Create a small 2D matrix (list of lists) to work with
# Using a 6x6 matrix with partite=2
# This will zero out:
# - Top-left 2x2 block (i,j in range(2))
# - Bottom-right 4x4 block (offset by partite=2, so indices [2:6][2:6])

mat = [
    [1, 2, 3, 4, 5, 6],
    [7, 8, 9, 10, 11, 12],
    [13, 14, 15, 16, 17, 18],
    [19, 20, 21, 22, 23, 24],
    [25, 26, 27, 28, 29, 30],
    [31, 32, 33, 34, 35, 36]
]

partite = 2

ARGS = {
    "mat": mat,
    "partite": partite
}
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 list, ndim 2, 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
file_to_mat Ran
ran on a synthesized input
JiaxuanYou/G2SAT/eval/conversion.py
code served (permissive licence) · get_code("1c4a68f9e16f2a14")
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 2, 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 tempfile
import os

# Create a temporary file with test data
temp_file = tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.txt')
temp_filename = temp_file.name

# Write test data in comma-separated format
temp_file.write("1, 2, 3\n")
temp_file.write("4, 5, 6\n")
temp_file.write("7, 8, 9\n")
temp_file.close()

ARGS = {
    'filename': temp_filename
}
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, ndim 2, 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
get_cl_string Ran
ran on a synthesized input
JiaxuanYou/G2SAT/eval/evaluate_graphs.py
code served (permissive licence) · get_code("81c614caaa5d943d")
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

torch.manual_seed(0)

ARGS = {
    'clause': [3, 1, 2, 5, 4]
}
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 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
load_graph_list Ran
ran on a synthesized input
JiaxuanYou/G2SAT/utils.py
code served (permissive licence) · get_code("b9da0b2402f6baed")
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 pickle
import networkx as nx
import tempfile
import os

# Create a temporary file with pickled graph data
temp_fd, temp_path = tempfile.mkstemp(suffix='.pkl')
os.close(temp_fd)

try:
    # Prepare graph data: list of tuples containing (nodes, edges, par1, par2)
    graphs_info = [
        (
            [0, 1, 2, 3],  # nodes
            [(0, 1), (1, 2), (2, 3)],  # edges
            [0, 1],  # nodes_par1
            [2, 3]   # nodes_par2
        ),
        (
            [4, 5, 6],
            [(4, 5), (5, 6)],
            [4],
            [5, 6]
        )
    ]
    
    # Write the pickled data to temp file
    with open(temp_path, 'wb') as f:
        pickle.dump(graphs_info, f)
    
    # Define arguments for both test cases
    ARGS = {
        'fname': temp_path,
        'has_par': False
    }
    
finally:
    # Note: We keep the temp file for the function to use
    pass
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx — 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
load_graphs_lcg Ran
ran on a synthesized input
JiaxuanYou/G2SAT/data.py
code served (permissive licence) · get_code("57dbfd2e5f060dbb")
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 tuple, ndim 2, 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 tempfile
import os
import csv
import networkx as nx

# Create temporary directories for testing
temp_data_dir = tempfile.mkdtemp() + '/'
temp_stats_dir = tempfile.mkdtemp() + '/'

# Create a sample stats CSV file
stats_csv_path = temp_stats_dir + 'lcg_stats.csv'
with open(stats_csv_path, 'w', newline='') as f:
    writer = csv.writer(f)
    writer.writerow(['test_graph_1', '3', '2'])
    writer.writerow(['test_graph_2', '2', '1'])

# Create sample edge list files
# For test_graph_1: n_var=3, n_clause=2, so total nodes = 3*2 + 2 = 8
graph1 = nx.Graph()
graph1.add_edges_from([('1', '2'), ('2', '3'), ('3', '4'), ('5', '6')])
edge_file1 = temp_data_dir + 'test_graph_1_lcg_edge.txt'
nx.write_edgelist(graph1, edge_file1)

# For test_graph_2: n_var=2, n_clause=1, so total nodes = 2*2 + 1 = 5
graph2 = nx.Graph()
graph2.add_edges_from([('1', '2'), ('2', '3'), ('4', '5')])
edge_file2 = temp_data_dir + 'test_graph_2_lcg_edge.txt'
nx.write_edgelist(graph2, edge_file2)

ARGS = {
    'data_dir': temp_data_dir,
    'stats_dir': temp_stats_dir,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, dtype family float — a tuple 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
no_unit_clause Ran
ran on a synthesized input
JiaxuanYou/G2SAT/eval/evaluate_graphs.py
code served (permissive licence) · get_code("df87a442dc485388")
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

torch.manual_seed(0)

# The function iterates through 'formula' and checks if any line has length 1
# A formula is expected to be an iterable of iterables (lines with clauses)
# We'll create a list of lists representing a SAT formula where each inner list is a clause

# Test case 1: Formula with no unit clauses (all clauses have length > 1)
formula_no_units = [
    [1, 2],
    [3, 4],
    [-1, -2, 3]
]

ARGS = {
    "formula": formula_no_units
}
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
to_int_matrix Ran
ran on a synthesized input
JiaxuanYou/G2SAT/eval/evaluate_graphs.py
code served (permissive licence) · get_code("c373ad51777dcac3")
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 2, 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 takes a formula parameter and expects it to be a list of strings
# Each string contains space-separated values, and the function splits them and converts to int
# The [:-1] at the end removes the last element from each converted list

formula = [
    "1 2 3 4 5",
    "10 20 30 40 50"
]

ARGS = {
    "formula": formula
}
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 2, 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
load_graphs Not yet run
unverified (harvested, no recorded run)
JiaxuanYou/G2SAT/eval/conversion.py
code served (permissive licence) · get_code("ff29d7ef03eb44d6")
How it ran

no invocation recorded.

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 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 8 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

The Boolean Satisfiability (SAT) problem is the canonical NP-complete problem and is fundamental to computer science, with a wide array of applications in planning, verification, and theorem proving. Developing and evaluating practical SAT solvers relies on extensive empirical testing on a set of real-world benchmark formulas. However, the availability of such real-world SAT formulas is limited. While these benchmark formulas can be augmented with synthetically generated ones, existing approaches for doing so are heavily hand-crafted and fail to simultaneously capture a wide range of characteristics exhibited by real-world SAT instances. In this work, we present G2SAT, the first deep generative framework that learns to generate SAT formulas from a given set of input formulas. Our key insight is that SAT formulas can be transformed into latent bipartite graph representations which we model using a specialized deep generative neural network. We show that G2SAT can generate SAT formulas that closely resemble given real-world SAT instances, as measured by both graph metrics and SAT solver behavior. Further, we show that our synthetic SAT formulas could be used to improve SAT solver performance on real-world benchmarks, which opens up new opportunities for the continued development of SAT solvers and a deeper understanding of their performance.

For agents

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

get_harvested_code_for_paper("1910.13445")
get_code_for_paper("1910.13445")
have("1910.13445")

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

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

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

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

Connect an agent — have() is free.