SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2607.22552 · 2026

MioFFAn: an Annotation Software for Formula Formalization with LLM Automation Capabilities

Horacio Saggion, Nicolas Sibuet, Riccardo Rossi

arXiv · PDF · Open in the Atlas

Code that ran

11 of 12 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, 1 violated it and 0 have no contract verdict; 9 failures of our instrument; 1 no recorded run), measured 2026-11-23; 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/2607.22552.json · badge: /api/ran/2607.22552.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
NicolasSR/MioFFAn canonical (classifier label)
classifier basis: census
11 ran · 1 no recorded run
FunctionStatusWhere it lives
cast_dataclass_to_dicts Ran
ran; our contract draft was wrong, not the code
NicolasSR/MioFFAn/lib/annotation.py
code served (permissive licence) · get_code("1f1be702f3d31020")
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 dict. 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 dataclasses import dataclass
import torch

torch.manual_seed(0)

@dataclass
class SampleDataclass:
    name: str
    value: int
    tensor: torch.Tensor

dict_of_dataclass = {
    "id_1": SampleDataclass(name="sample1", value=42, tensor=torch.randn(2, 4)),
    "id_2": SampleDataclass(name="sample2", value=100, tensor=torch.randn(2, 4)),
}

ARGS = {
    "dict_of_dataclass": dict_of_dataclass,
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
cast_dicts_to_dataclass Ran
ran; our contract draft was wrong, not the code
NicolasSR/MioFFAn/lib/annotation.py
code served (permissive licence) · get_code("60fbccccfa55c00e")
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 dict. 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 dataclasses import dataclass

@dataclass
class SampleDataClass:
    name: str
    value: int
    description: str = "default"

dict_of_dicts = {
    "id_1": {"name": "object_one", "value": 42},
    "id_2": {"name": "object_two", "value": 100, "description": "custom description"},
    "id_3": {"name": "object_three", "value": -5}
}

ARGS = {
    "dict_of_dicts": dict_of_dicts,
    "dataclass": SampleDataClass
}
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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
detect_errors Ran
ran, violated the contract we drafted
NicolasSR/MioFFAn/lib/ocr_utilities.py
code served (permissive licence) · get_code("b1cf15625c0f7f3a")
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

# Construct a valid std_out string that the function will parse
# The function looks for lines starting with "Error:" and counts them
std_out = """Some normal output
Error: First error message
More output
Error: Second error message
Final line
"""

ARGS = {
    'std_out': std_out
}
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
get_dict Ran
ran; our contract draft was wrong, not the code
NicolasSR/MioFFAn/llm_implementation/llm_implementations.py
code served (permissive licence) · get_code("82945a14a73e036b")
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 re

def get_dict(in_string):
    return re.search('{[\\s\\S]*}', in_string).group(0)

# The function searches for a dictionary-like string pattern (content between { and })
# It takes a single string parameter and uses re.search to find the pattern
# We need to provide a string that contains a dictionary-like structure

in_string = "some text before {key: value, nested: {inner: data}} some text after"

ARGS = {
    "in_string": in_string
}
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
get_list_of_dicts Ran
ran; our contract draft was wrong, not the code
NicolasSR/MioFFAn/llm_implementation/llm_implementations.py
code served (permissive licence) · get_code("1ef4a05f351d1b2a")
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 re

def get_list_of_dicts(in_string):
    return re.search('\\[\\s*(?:{[\\s\\S]*})\\s*\\]', in_string).group(0)

# The function takes a string parameter and searches for a pattern
# matching a list containing dictionaries. We need to provide a valid
# in_string that contains this pattern.

in_string = "some text [ { 'key': 'value' } ] more text"

ARGS = {
    "in_string": in_string
}
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
get_logger Ran
ran; our contract draft was wrong, not the code
NicolasSR/MioFFAn/lib/logger.py
code served (permissive licence) · get_code("e8f8488cc8f9d285")
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 Logger. 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 logging as log

def __set_logger(self, quiet: bool, debug: bool):
    level = log.INFO
    if quiet:
        level = log.WARN
    if debug:
        level = log.DEBUG
    handler = log.StreamHandler()
    formatter = log.Formatter('%(name)s %(levelname)s: %(message)s')
    handler.setLevel(level)
    handler.setFormatter(formatter)
    self.setLevel(level)
    self.addHandler(handler)
    self.propagate = False

def get_logger(name: str):
    log.Logger.set_logger = __set_logger
    return log.getLogger(name)

ARGS = {
    "name": "test_logger"
}
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 Logger — a Logger output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Logger 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
get_nodes_distance Ran
ran, honoured the contract we drafted
NicolasSR/MioFFAn/lib/util.py
code served (permissive licence) · get_code("c0b5c72b495923e3")
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 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.

class Element:
    def __init__(self, ancestors):
        self._ancestors = ancestors
    
    def iterancestors(self):
        return iter(self._ancestors)

# Create two elements with different ancestor chains
el1_ancestors = [1, 2, 3, 4]  # depth = 4
el2_ancestors = [1, 2]  # depth = 2

el1 = Element(el1_ancestors)
el2 = Element(el2_ancestors)

ARGS = {
    "el1": el1,
    "el2": el2
}
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 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
replace_with_unicode_name Ran
ran; our contract draft was wrong, not the code
NicolasSR/MioFFAn/llm_implementation/llm_implementations.py
code served (permissive licence) · get_code("374a87adf82a97bd")
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 re
import unicodedata

def replace_with_unicode_name(html_snippet):
    pattern = '(>)([^<]+)(<)'

    def process_content(match):
        prefix = match.group(1)
        content = match.group(2)
        suffix = match.group(3)
        new_content = ''
        for char in content:
            if ord(char) > 127:
                try:
                    full_name = unicodedata.name(char)
                    new_content += full_name
                except ValueError:
                    new_content += char
            else:
                new_content += char
        return f'{prefix}{new_content}{suffix}'
    return re.sub(pattern, process_content, html_snippet)


# Setup code
html_snippet = '<p>Hello café and résumé</p><div>Test © symbol</div>'

ARGS = {
    'html_snippet': html_snippet
}
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
sort_ids_by_dfs Ran
ran; our contract draft was wrong, not the code
NicolasSR/MioFFAn/lib/util.py
code served (permissive licence) · get_code("0a779daee5694313")
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 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.

class TreeElement:
    def __init__(self, element_id, value=None):
        self.id = element_id
        self.value = value
    
    def get(self, key):
        if key == 'id':
            return self.id
        return None


class SimpleTree:
    def __init__(self, elements):
        self.elements = elements
        self._dfs_order = []
        self._build_dfs_order()
    
    def _build_dfs_order(self):
        self._dfs_order = self.elements
    
    def iter(self):
        return iter(self._dfs_order)
    
    def get_element_by_id(self, node_id):
        for el in self.elements:
            if el.get('id') == node_id:
                return el
        raise ValueError(f"Element with id {node_id} not found")


# Create tree elements with unique IDs
elem_a = TreeElement('node_1', 'value_a')
elem_b = TreeElement('node_2', 'value_b')
elem_c = TreeElement('node_3', 'value_c')
elem_d = TreeElement('node_4', 'value_d')

# Create a tree with these elements in a specific DFS order
tree = SimpleTree([elem_a, elem_b, elem_c, elem_d])

# Create an id_list in a different order than DFS
id_list = ['node_3', 'node_1', 'node_4', 'node_2']

ARGS = {
    'tree': tree,
    'id_list': id_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 list, ndim 1, dtype family float — 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
substitute_html_named_entities Ran
ran; our contract draft was wrong, not the code
NicolasSR/MioFFAn/lib/ocr_utilities.py
code served (permissive licence) · get_code("ed2b32bce116dbca")
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 re
import csv
import tempfile
import os

# Create a temporary directory and file for the HTML to LaTeX mapping
temp_dir = tempfile.mkdtemp()
map_file_path = os.path.join(temp_dir, 'map_html_named_entities_to_latex.txt')

# Create the mapping file with sample HTML entities and their LaTeX equivalents
mapping_data = [
    ['lt', 'less-than', r'\textless{}'],
    ['gt', 'greater-than', r'\textgreater{}'],
    ['amp', 'ampersand', r'\&'],
    ['quot', 'quote', r'\"'],
    ['nbsp', 'non-breaking-space', r'\ '],
]

with open(map_file_path, 'w', newline='') as f:
    writer = csv.writer(f, delimiter='\t')
    for row in mapping_data:
        writer.writerow(row)

# Monkey patch the open function to serve our test file
original_open = open
def mock_open(file_path, *args, **kwargs):
    if 'map_html_named_entities_to_latex.txt' in file_path:
        return original_open(map_file_path, *args, **kwargs)
    return original_open(file_path, *args, **kwargs)

import builtins
builtins.open = mock_open

# Create test input with HTML entities
test_input = "This is &lt;test&gt; with &amp; ampersand"

ARGS = {
    'tmp_latex_str': test_input
}
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
validate_llm_output_schema Ran
ran; our contract draft was wrong, not the code
NicolasSR/MioFFAn/lib/llm_utilities.py
code served (permissive licence) · get_code("b5837e69d54831d3")
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.

from pydantic import BaseModel
from typing import Optional, List

# Define a simple expected schema using Pydantic
class PersonSchema(BaseModel):
    name: str
    age: int
    email: Optional[str] = None
    hobbies: List[str] = []

# Test case 1: valid data that matches schema
valid_raw_data = {
    "name": "Alice",
    "age": 30,
    "email": "alice@example.com",
    "hobbies": ["reading", "coding"]
}

# Construct ARGS
ARGS = {
    "raw_data": valid_raw_data,
    "ExpectedSchema": PersonSchema
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pydantic — 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
find_lowest_common_ancestor Not yet run
unverified (harvested, no recorded run)
NicolasSR/MioFFAn/lib/util.py
code served (permissive licence) · get_code("6e63a52143ab7436")
How it ran

no invocation recorded.

Also present in other papers' code

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

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 automatic translation of mathematical expressions in scientific literature into executable symbolic code-a process we refer to as Formula Formalization-is hindered by a severe scarcity of high-quality, ground-truth datasets specialized for technical scientific domains. In this paper, we present MioFFAn, an open-source, document-centric, and customizable framework designed to facilitate rapid annotation for this task. Building upon the MioGatto architecture, we extend existing features to overcome structural limitations and pivot its scope by introducing specific functionalities for Formula Formalization, such as selection of equations of interest and aided symbolic code specification. By allowing users to configure custom taxonomies and properties for identified symbols, and compatible symbolic operators, we ensure the framework is adaptable to diverse specialized scientific fields. Furthermore, MioFFAn is designed to incorporate partial automation via Large Language Models. By defining a modular set of automated sub-tasks with strict output formats, we enable researchers to iteratively refine automation capabilities and evaluate competing strategies using standard NLP metrics. We specify the current automation methodology and perform a preliminary evaluation that demonstrates to efficacy of this human-in-the-loop approach.

For agents

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

get_harvested_code_for_paper("2607.22552")
get_code_for_paper("2607.22552")
have("2607.22552")

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

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

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

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

Connect an agent — have() is free.