SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2405.11403 · ACL · 2024

MapCoder: Multi-Agent Code Generation for Competitive Problem Solving

Md. Rizwan Parvez, Md. Ashraful Islam, Mohammed Eunus Ali

arXiv · PDF · Open in the Atlas

Code that ran

6 of 10 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 6 have no contract verdict; 0 failures of our instrument; 4 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/2405.11403.json · badge: /api/ran/2405.11403.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
Luoji-zju/Agents4PLC_release community (classifier label)
classifier basis not recorded on the link
6 ran · 4 no recorded run
FunctionStatusWhere it lives
create_log_directory Ran
ran on a synthesized input
Luoji-zju/Agents4PLC_release/LLM4PLC_reproduce/run_efficiency.py
code served (permissive licence) · get_code("de3a0618a914e97e")
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 1, 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 os
import time
import tempfile

# Create a temporary directory to use as base_dir instead of the hardcoded path
temp_base_dir = tempfile.mkdtemp()

ARGS = {
    'spec_path': '/path/to/spec_file.txt',
    'base_dir': temp_base_dir
}
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 tuple, ndim 1, 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
generate_nl_description Ran
ran on a synthesized input
Luoji-zju/Agents4PLC_release/src/plcverif.py
code served (permissive licence) · get_code("464c0c08fefdf90c")
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

# Based on the function signature and body, we need:
# 1. pattern_id: a string key that exists in the descriptions dict
# 2. pattern_params: a dict with numeric keys (as strings) mapping to condition strings

ARGS = {
    'pattern_id': 'pattern-implication',
    'pattern_params': {
        '1': 'instance.in < instance.tmp',
        '2': 'instance.Q = FALSE AND instance.WIN = 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 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
input_with_timeout Ran
ran on a synthesized input
Luoji-zju/Agents4PLC_release/LLM4PLC_reproduce/run_efficiency_v2.py
code served (permissive licence) · get_code("b4ae4f09792713f2")
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

ARGS = {
    'prompt': 'Enter something: ',
    'timeout': 3,
    'default': ''
}
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
list_to_json_string Ran
ran on a synthesized input
Luoji-zju/Agents4PLC_release/src/tools.py
code served (permissive licence) · get_code("b20bd1bc19f9f7df")
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 json

# The function expects a list of dictionaries to be converted to JSON
# Let's create a valid property_list with various data types that json.dumps can handle

property_list = [
    {
        "id": 1,
        "name": "Property A",
        "price": 150000.50,
        "available": True,
        "tags": ["modern", "spacious"]
    },
    {
        "id": 2,
        "name": "Property B",
        "price": 200000.75,
        "available": False,
        "tags": ["vintage", "cozy"]
    },
    {
        "id": 3,
        "name": "Property C",
        "price": None,
        "available": True,
        "tags": []
    }
]

ARGS = {
    "property_list": property_list
}
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 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
rusty_compiler Ran
ran on a synthesized input
Luoji-zju/Agents4PLC_release/src/compiler.py
code served (permissive licence) · get_code("f8a97b7fd226ab76")
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 tempfile
import os

# Create a temporary Rust file for testing
temp_dir = tempfile.mkdtemp()
rust_file = os.path.join(temp_dir, "test.pl")

# Write a simple valid PLC file (or invalid, depending on what we want to test)
with open(rust_file, 'w') as f:
    f.write("// Simple test file\n")

ARGS = {
    'file_dir': rust_file
}
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 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
safe_repr Ran
ran on a synthesized input
Luoji-zju/Agents4PLC_release/src/tools.py
code served (permissive licence) · get_code("e00def812098236a")
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.

from langchain_core.messages import BaseMessage, AIMessage, HumanMessage
import json

# Test with different types of data
test_string = "Hello, world!"
test_dict = {"key": "value", "nested": {"inner": 42}}
test_list = [1, 2, 3, "four"]
test_tuple = (10, 20, 30)
test_ai_message = AIMessage(content="This is an AI response")
test_human_message = HumanMessage(content="This is a human question")
test_complex_obj = type('CustomObj', (), {'__repr__': lambda self: '<CustomObj instance>'})()

ARGS = {
    "data": test_string
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
langchain_core — 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
input_with_timeout Not yet run
unverified (harvested, no recorded run)
Luoji-zju/Agents4PLC_release/LLM4PLC_reproduce/run_efficiency.py
code served (permissive licence) · get_code("fe740cfb7327d8b2")
How it ran

no invocation recorded.

nuXmv_model_checker Not yet run
unverified (harvested, no recorded run)
Luoji-zju/Agents4PLC_release/LLM4PLC_reproduce/run_efficiency.py
code served (permissive licence) · get_code("848bf700245e1978")
How it ran

no invocation recorded.

nuXmv_model_checker Not yet run
unverified (harvested, no recorded run)
Luoji-zju/Agents4PLC_release/LLM4PLC_reproduce/run_efficiency_v2.py
code served (permissive licence) · get_code("d76fc1eb310fdfa3")
How it ran

no invocation recorded.

plcverif_call Not yet run
unverified (harvested, no recorded run)
Luoji-zju/Agents4PLC_release/src/plcverif.py
code served (permissive licence) · get_code("a632c1e691ea6a16")
How it ran

no invocation recorded.

Also present in other papers' code

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

Code synthesis, which requires a deep understanding of complex natural language (NL) problem descriptions, generation of code instructions for complex algorithms and data structures, and the successful execution of comprehensive unit tests, presents a significant challenge. Thus, while large language models (LLMs) demonstrate impressive proficiency in natural language processing (NLP), their performance in code generation tasks remains limited. In this paper, we introduce a new approach to code generation tasks leveraging the multi-agent prompting that uniquely replicates the full cycle of program synthesis as observed in human developers. Our framework, MapCoder, consists of four LLM agents specifically designed to emulate the stages of this cycle: recalling relevant examples, planning, code generation, and debugging. After conducting thorough experiments, with multiple LLMs ablations and analyses across eight challenging competitive problem-solving and program synthesis benchmarks-MapCoder showcases remarkable code generation capabilities, achieving their new state-of-the-art (pass@1) results-(HumanEval 93.9%, MBPP 83.1%, APPS 22.0%, CodeContests 28.5%, and xCodeEval 45.3%). Moreover, our method consistently delivers superior performance across various programming languages and varying problem difficulties. We open-source our framework at https://github.com/ Md-Ashraful-Pramanik/MapCoder. Dynamic Traversal Block (Elaborated View) Failed in sample I/O Failed in sample I/O max turn done back to planner agent Problem Write a python code for descending order sorting. The program will take an array and return a new array sorted in the reverse order. [1,2,3] -> [3,2,1] P l a n 2 P l a n 1 Plan k 0

For agents

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

get_harvested_code_for_paper("2405.11403")
get_code_for_paper("2405.11403")
have("2405.11403")

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

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

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

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

Connect an agent — have() is free.