Instruction and Solution Probabilities as Heuristics for Inductive Programming

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: McDaid, Edward, McDaid, Sarah
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866913896401469440
author McDaid, Edward
McDaid, Sarah
author_facet McDaid, Edward
McDaid, Sarah
contents Instruction subsets (ISs) are heuristics that can shrink the size of the inductive programming (IP) search space by tens of orders of magnitude. Here, we extend the IS approach by introducing instruction and solution probabilities as additional heuristics. Instruction probability reflects the expectation of an instruction occurring in a solution, based on the frequency of instruction occurrence in a large code sample. The solution probability for a partial or complete program is simply the product of all constituent instruction probabilities, including duplicates. We treat the minimum solution probabilities observed in code sample program units of different sizes as solution probability thresholds. These thresholds are used to prune the search space as partial solutions are constructed, thereby eliminating any branches containing unlikely combinations of instructions. The new approach has been evaluated using a large sample of human code. We tested two formulations of instruction probability: one based on instruction occurrence across the entire code sample and another that measured the distribution separately for each IS. Our results show that both variants produce substantial further reductions in the IP search space size of up to tens of orders of magnitude, depending on solution size. In combination with IS, reductions of over 100 orders of magnitude can be achieved. We also carried out cross-validation testing to show that the heuristics should work effectively with unseen code. The approach is described and the results and some ideas for future work are discussed.
format Preprint
id arxiv_https___arxiv_org_abs_2506_13804
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Instruction and Solution Probabilities as Heuristics for Inductive Programming
McDaid, Edward
McDaid, Sarah
Software Engineering
Artificial Intelligence
D.1.2; D.3.3; F.1.1; F.3.1; F.3.3; I.2.1; I.2.2; I.2.4; I.2.5; I.2.8; I.5.3
Instruction subsets (ISs) are heuristics that can shrink the size of the inductive programming (IP) search space by tens of orders of magnitude. Here, we extend the IS approach by introducing instruction and solution probabilities as additional heuristics. Instruction probability reflects the expectation of an instruction occurring in a solution, based on the frequency of instruction occurrence in a large code sample. The solution probability for a partial or complete program is simply the product of all constituent instruction probabilities, including duplicates. We treat the minimum solution probabilities observed in code sample program units of different sizes as solution probability thresholds. These thresholds are used to prune the search space as partial solutions are constructed, thereby eliminating any branches containing unlikely combinations of instructions. The new approach has been evaluated using a large sample of human code. We tested two formulations of instruction probability: one based on instruction occurrence across the entire code sample and another that measured the distribution separately for each IS. Our results show that both variants produce substantial further reductions in the IP search space size of up to tens of orders of magnitude, depending on solution size. In combination with IS, reductions of over 100 orders of magnitude can be achieved. We also carried out cross-validation testing to show that the heuristics should work effectively with unseen code. The approach is described and the results and some ideas for future work are discussed.
title Instruction and Solution Probabilities as Heuristics for Inductive Programming
topic Software Engineering
Artificial Intelligence
D.1.2; D.3.3; F.1.1; F.3.1; F.3.3; I.2.1; I.2.2; I.2.4; I.2.5; I.2.8; I.5.3
url https://arxiv.org/abs/2506.13804