Skip to main content
Loading navigation

AutoGen IEC 61131-3 Code Translation & Refactoring Multi-Agent System

As industrial automation evolves into a software discipline, legacy PLC Structured Text code must be modernized and translated into testable Python/C++ control modules. Build a multi-agent system using AutoGen where a Programmer Agent and Verifier Agent collaboratively refactor legacy IEC 61131-3 logic. Success is measured by achieving 100% equivalence in automated unit test assertions.

EngineeringHosted by Vera

What you are building

Design an AutoGen multi-agent conversational team that ingests legacy PLC Structured Text (ST) and outputs verified, unit-tested software control code.

How work is evaluated

Evaluation

Evaluates logical equivalence and execution correctness of translated PLC Structured Text code.

Datasets

Public datasets, plus the private datasets you have access to.

How submissions are scored

Dimensions
2 scoring checks
Binary
2 pass or fail dimensions
Ordinal
0 scaled dimensions
Dimension 1

all_unit_tests_pass

Verifies translated code satisfies 100% of functional test assertions.

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Dimension 2

code_equivalence_rate

Percentage of test cases passing under translated code. • target: 1 • range: 0-1

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Learning goals

  • Configure AutoGen Conversational Agents (AssistantAgent and UserProxyAgent) for code refactoring.

  • Translate IEC 61131-3 Structured Text (ST) state logic into Python object-oriented classes.

  • Synthesize automated PyTest unit suites within the agent conversation loop.

  • Iteratively fix logical discrepancies identified during simulated code execution.

Resources

Dataset notes

Legacy IEC 61131-3 Structured Text routines representing conveyor control, valve sequencing, and PID loop blocks.

Challenge setup

Evaluates logical equivalence and execution correctness of translated PLC Structured Text code.

Challenge input

JSON object with st_code string and test_cases array

AutoGen

Required multi-agent framework for collaborative code translation and testing.

Evaluated output

JSON object with python_code, tests_passed, and equivalence_score

Evaluation checks
  • Verifies translated code satisfies 100% of functional test assertions.
  • Percentage of test cases passing under translated code. • target: 1 • range: 0-1
Configured evaluation evidence
  • Benchmark: PLC2CodeBench-2026
  • Code Equivalence Rate target: 100%
  • 1 public reference case
Configured runtime
  • Python execution harness
  • Python sandbox (unavailable on Versalist)

Shows the first task, up to three tools, and up to three evidence items.

View technical recipe

Configured tools

Action Space
  • AutoGen · Required
  • Microsoft AutoGen · Optional

Evaluation contract

  • all_unit_tests_pass · Weight 1
  • code_equivalence_rate · Weight 1

Metrics

  • code_equivalence_rate · Target 1

Benchmarks

  • PLC2CodeBench-2026
  • general

Reference cases

  • 1 public reference case

Workflow tasks

  1. Task 1

    Input: JSON object with st_code string and test_cases array

    Output: JSON object with python_code, tests_passed, and equivalence_score

    Execution harness: Python

Evaluation tools

  • AutoGen · Agent Framework

Recipe freeze marker

No recipe freeze time is recorded.

Frequently Asked Questions about AutoGen IEC 61131-3 Code Translation & Refactoring Multi-Agent System