Skip to content

Bug fixing with LLMs - #900

Open
jodavies wants to merge 3 commits into
form-dev:masterfrom
jodavies:gpt-fix-experiments
Open

Bug fixing with LLMs#900
jodavies wants to merge 3 commits into
form-dev:masterfrom
jodavies:gpt-fix-experiments

Conversation

@jodavies

@jodavies jodavies commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

These commits are from experimenting with using an LLM (OpenAI 5.6 Sol) to fix bugs in FORM. The general procedure was to add failing test cases to the test suite, and then prompt the LLM to find and fix the bug, including information about what the bug is and what my suspicions were about it.

This fixes #103, #665, #882. For "small" bugs like these, the resulting changes are compact and easy to reason about.

I have something for #607 and #608 but it is much more complicated and the scope quickly gets out of hand. This needs some discussions about the proper behaviour, I will open a discussion about that separately.

What are your thoughts on these, and LLM bug-fixing in general? I would say that with some focussed efforts, we could use LLMs to quickly fix many of the "easier" open bugs in the Issue tracker that no one had time to have a proper look at for years. This is good for FORM users. At the same time, by fixing things in this way we don't learn as much about the codebase, which is not a good thing in the long run.

When an expression is replaced more than once in a module, maintain the
replacement chain such that the intermediate replacements can all be
cleaned up. Note that it is important that the expression name points at
the original definition for the duration of the module.

Fixes form-dev#882
Correctly handle products of vector wildcards: previously they were taken to
be index wildcards, producing malformed term data.

Fixes form-dev#665
These must check if expressions have been redefined, and follow
the redefinition chain to the most recently-defined expression.

Otherwise they act on stale redefined expressions, which are not
processed in the module.

Fixes form-dev#103
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 65.769% (+0.02%) from 65.748% — jodavies:gpt-fix-experiments into form-dev:master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Local expression redefinition

2 participants