trueagi-io / metta-wam

A Hyperon MeTTa Interpreter/Transpilier that targets the Warren Abstract Machine
8 stars 11 forks source link

Add comments for metta_convert.pl #141

Closed jazzbox35 closed 3 weeks ago

jazzbox35 commented 3 weeks ago

This was a tough one with lots of hallucinations and red herrings to attend to.

The executable code compares nicely between old and new programs, except as noted: two statements were deleted from the new program that were duplicates (it is my understanding that dup'd predicates don't do anything).

Screenshot_2024-10-03_10-12-48

TeamSPoon commented 3 weeks ago

Great job, i merged it!

I could tell this one was a PITA

And glad you converted the semidet into nondet!

This is almost always the case.. except this file

I secretly use a naming convention

is_* iz_* was_* waz_* z_* to denote the prolog predicate is intended to act like a boolean so these guys were legitimately semidet

%!  iz_exact_symbol(+N, ?P) is nondet.
%!  is_subtype(+T, +TT) is nondet.

This guy is nondet (as you corrected)

%!  expects_type(+Fn, +Nth, -Type) is nondet.

Since it can be mulitple possible Types