translate_code
Translate code between programming languages, then automatically verify equivalence by running both versions on the same test inputs and comparing output.
Instructions
Port code from source language to target, then VERIFY equivalence.
An LLM translates; the executor runs BOTH versions on the same test inputs
and compares stdout. Accepted only if outputs match (one retry feeding the
diff back). Returns translated_code + per-input verification. Example:
source='python3', target='go', code='import sys
n=int(sys.stdin.readline()) print(n*2)'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| source | Yes | ||
| target | Yes | ||
| test_inputs | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||