<commit_before>=== Cut

neck_cut or cut, ok to insert that correctly.
get_depth a little annoying, as needs to be part of the clause prefix instructions. also complicated the assignment
of permanent registers.

=== Call

Argument to call is built on the heap, or stack.

Call is implemented as a procedure that takes the argument, and turns it into a call, that is built args on heap, assign
argument registers, call.

Is it necessary to build a complete copy of the arguments on the heap, or can an argument register be set to point into
the existing structure?

=== Unifies

Create LHS as query parameters.
Create RHS as program parameters.
No call instruction, just run the 2 together.

OR

Implement as:

=(X, X).
\=(X, Y) :- \+(X = Y).

=== Disjunction

TryMe, RetryMe, TrustMe ?

Disjunction has arity/2, but want to treat a chain of disjunctions like a series of clauses. This means that each
disjunction cannot operate in isolation. Possibly look ahead at the next functor to see if it is also a disjunction?

a ; b

try_me a trust_me b

a ; b ; c

try_me a (look ahead and see next ;) retry_me b (look ahead and see no ;) trust_me c

Look ahead will be possible, as the disjunction has been parsed as a tree beneath a single ;

  ;
a   ;
  b   c

Does this complicate permanent register assignment?<commit_msg>Adding some comments to the implementation notes.<commit_after>=== Cut

neck_cut or cut, ok to insert that correctly.
get_depth a little annoying, as needs to be part of the clause prefix instructions. also complicated the assignment
of permanent registers.

=== Call

Argument to call is built on the heap, or stack.

Call is implemented as a procedure that takes the argument, and turns it into a call, that is built args on heap, assign
argument registers, call.

Is it necessary to build a complete copy of the arguments on the heap, or can an argument register be set to point into
the existing structure?

=== Unifies

Create LHS as query parameters.
Create RHS as program parameters.
No call instruction, just run the 2 together.

OR

Implement as:

=(X, X).
\=(X, Y) :- \+(X = Y).

=== Disjunction

Does this complicate permanent register assignment? Yes, but use the same procedure to count the number of permanent
registers, just include nested conjunctive/disjunctive top-level terms in the count.

 Problems with current inline implementations:

 try_me/retry_me Saves the argument registers of the current clause. In the inline case, another clause may have been
called prior to this, in which case num_args is set wrong. Need num_args for this predicate, not any that might have
been called in between.
{'fraction_non_alphanumeric': 0.05351043643263757, 'fraction_numerical': 0.0011385199240986717, 'mean_word_length': 4.040152963671128, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3023363', 'n_tokens_mistral': 717, 'n_tokens_neox': 691, 'n_words': 424}