alcides / aeon

Aeon programming language
https://alcides.github.io/aeon/
8 stars 3 forks source link

Synthesizer ERROR's #19

Closed eduardo-imadeira closed 6 months ago

eduardo-imadeira commented 9 months ago

running the follwoing examples:

python aeon examples/PSB2/annotations/bouncing_balls_annotations.ae --log INFO WARNINGS TYPECHECKER SYNTH_TYPE SYNTHESIZER ERROR -f 

python aeon examples/PSB2/annotations/dice_game_annotations.ae --log INFO WARNINGS TYPECHECKER SYNTH_TYPE SYNTHESIZER ERROR -f

python aeon examples/PSB2/annotations/gcd_annotations.ae --log INFO WARNINGS TYPECHECKER SYNTH_TYPE SYNTHESIZER ERROR -f

python aeon examples/PSB2/annotations/snow_day_annotations.ae --log INFO WARNINGS TYPECHECKER SYNTH_TYPE SYNTHESIZER ERROR -f

python aeon examples/sugar/synthesis_proposal.ae --log INFO WARNINGS TYPECHECKER SYNTH_TYPE SYNTHESIZER ERROR -f

and analysing the log files, the most common errors are:

SYNTH_TYPE | aeon.typechecking.typeinfer:synth:262 - ('Unhandled:', <aeon.core.terms.If object at 0x124faf2d0>)
SYNTH_TYPE | aeon.typechecking.typeinfer:synth:263 - ('Unhandled:', <class 'aeon.core.terms.If'>)

This is a new error:

 SYNTHESIZER | aeon.synthesis_grammar.synthesizer:evaluator:96 - Failed in the fitness function: operands could not be broadcast together with shapes (200,) (200,3) 

and

SYNTHESIZER | aeon.synthesis_grammar.synthesizer:evaluator:96 - Failed in the fitness function: sort mismatch

I believe that the last error will be solved by adding the MetaHandlers to our grammar, because the refinements are what is raising this error

the log files for the examples above: bouncing_balls_annotations.ae_2023-11-30 09:15:36.182157.log dice_game_annotations.ae_2023-11-30 09:18:50.250942.log gcd_annotations.ae_2023-11-30 09:18:54.597519.log square_digit_annotations.ae_2023-11-30 09:19:38.045659.log synthesis_proposal.ae_2023-11-30 09:19:43.910071.log

alcides commented 9 months ago

The second to last error is unrelated to Aeon. It is caused by using numpy shapes that do not operate well with each other. In that case, we need to rethink what functions should be available in the context. (We have plenty examples of this in GeneticEngine classification)

alcides commented 7 months ago

Was there any progress made regarding the numpy shapes?