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

MeTTaLog mishandles missing closing parenthesis #214

Closed
ngeiswei opened this issue Dec 10, 2024 · 3 comments
Closed

MeTTaLog mishandles missing closing parenthesis #214

ngeiswei opened this issue Dec 10, 2024 · 3 comments
Assignees
Labels
bug Issues that represent errors in the code Implemented-AwaitsTest

Comments

@ngeiswei
Copy link
Contributor

ngeiswei commented Dec 10, 2024

What is your problem?

MeTTaLog seems to enter infinite error message printing upon parsing a metta file with a missing closing parenthesis.

How to reproduce your problem?

Run the following MeTTa code with MeTTaLog

(A B ; <- missing closing parenthesis
!(+ 40 2)

What should it normally output?

A nice and clear message explaining that a closing parenthesis is missing.

What do you get instead?

A seemingly infinite trace of errors starting with

mettalog bug.metta
% 23,906 inferences, 0.004 CPU in 0.004 seconds (100% CPU, 6629631 Lips)

#(ugtrace #(error #(stream_error #( : 1 #( : 1 1 ) ) #(syntax_error unexpected_end_of_file "Unexpected end of file in list"))) $10000)

%~ FIlE: /home/nilg/Work/SingularityNET/ai-dsl/experimental/ai-service-composition/english-to-chinese-song/bug.metta:3 
(0)$[system] system:'$c_call_prolog'.  no(clause). 
...

What else do you have to say?

Tested on metta-wam revision 352b297

@TeamSPoon
Copy link
Collaborator

Hi @ngeiswei,

I think i fixed this.. though it prints a warning now

image

@TeamSPoon
Copy link
Collaborator

@ngeiswei, If you are satified with this (that is that you get the warning now) feel free to close this bug or suggest what would make things better

@TeamSPoon TeamSPoon assigned TeamSPoon and ngeiswei and unassigned ngeiswei and TeamSPoon Dec 11, 2024
@ngeiswei
Copy link
Contributor Author

That's perfect, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that represent errors in the code Implemented-AwaitsTest
Projects
None yet
Development

No branches or pull requests

2 participants