Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up ML code #68

Merged
merged 32 commits into from
Nov 20, 2024
Merged

Clean up ML code #68

merged 32 commits into from
Nov 20, 2024

Conversation

JonasAlaif
Copy link
Collaborator

@JonasAlaif JonasAlaif commented Oct 26, 2024

Left to do:

  • Clean up code for synthetic terms, I'm thinking that all terms could be put in the same TiVec with synthetic terms wrapped in a transparent Synth<T>(T) which provides e.g. a function fn child_ids(&Synth<Term>) -> &[Synth<TermIdx>] and the parser can index fn index(&self, Synth<TermIdx>) -> &Synth<Term> (both using transmutes) and lastly there's a fn non_synth(&self, Synth<TermIdx>) -> Option<TermIdx> which unseals a Synth if the idx is lower than the last parsed idx.
  • Clean up code for ML explanation/generalisation
    • The code still needs some cleanup but that can
      be done in a separate PR. One issue where we fail to generalise is in sequences-18.log. This is due to a sequence as so:
Seq_append(SIN, [⭐ → Seq_take(⭐, SUB)])
Seq_append(SIN, Seq_take([⭐ → Seq_take(⭐, SUB)], Seq_sub([⭐ → Seq_add(Seq_sub(⭐, LEN), LEN)], LEN)))
Seq_append(SIN, Seq_take(Seq_take([⭐ → Seq_take(⭐, SUB)], Seq_sub([⭐ → Seq_add(Seq_sub(⭐, LEN), LEN)], LEN)), Seq_sub(Seq_add(SUB, LEN), LEN)))
// A simplified sequence would be
g(x, y)
g(g(x, y), z)
g(g(g(x, y), z), z)
  • Add textual explanation of MLs

@JonasAlaif JonasAlaif merged commit 9726f9a into main Nov 20, 2024
9 checks passed
@JonasAlaif JonasAlaif deleted the matching-loops branch November 20, 2024 00:32
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.

1 participant