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

How to increase stack size? #209

Open
vulecoff opened this issue Dec 3, 2024 · 0 comments
Open

How to increase stack size? #209

vulecoff opened this issue Dec 3, 2024 · 0 comments

Comments

@vulecoff
Copy link
Contributor

vulecoff commented Dec 3, 2024

I tried this mettalog --stack-max=1000 test.metta, where test.metta contains a single line !(import! &self m2). It gives the following error

!(import! &self m2)

#( = #(error #(type_error evaluable #( / 1000 0 )) #(context #( : system #( / < 2 ) ) $10000)) #( , #(eval_H 1000 &self (import! &self m2) $10001) #( , #(deterministic $10002) #( , #(xform_out $10001 $10003) #(nb_setarg 1 #(res $10004) $10003) ) ) ) )

^  Exit: (211) [system] sig_atomic(rtrace:restart_rtrace)
   Call: (212) [user] eval_H('1000', '&self', ['import!', '&self', m2], _3376)
   Unify: (212) [user] eval_H('1000', '&self', ['import!', '&self', m2], ['import!', '&self', m2])
^  Call: (213) [user] fast_option_value(compile, save)
^  Unify: (213) [user] fast_option_value(compile, save)
   Call: (214) [system] atom(compile)
   Exit: (214) [system] atom(compile)
   Call: (214) [system] current_prolog_flag(compile, save)
   Fail: (214) [system] current_prolog_flag(compile, save)
^  Fail: (213) [user] fast_option_value(compile, save)
   Redo: (212) [user] eval_H('1000', '&self', ['import!', '&self', m2], _3376)
   Unify: (212) [user] eval_H('1000', '&self', ['import!', '&self', m2], _3376)
^  Call: (213) [user] catch_metta_return(eval_args(=, _17450, '1000', '&self', ['import!', '&self', m2], _3376), _3376)
^  Unify: (213) [user] catch_metta_return(eval_args(=, _17450, '1000', '&self', ['import!', '&self', m2], _3376), _3376)
^  Call: (215) [user] eval_args(=, _17450, '1000', '&self', ['import!', '&self', m2], _3376)
^  Unify: (215) [user] eval_args(=, _17450, '1000', '&self', ['import!', '&self', m2], _3376)
   Call: (216) [system] var(['import!', '&self', m2])
^  Redo: (215) [user] eval_args(=, _17450, '1000', '&self', ['import!', '&self', m2], _3376)
^  Unify: (215) [user] eval_args(=, _17450, '1000', '&self', ['import!', '&self', m2], _3376)
^  Call: (217) [system] setup_call_cleanup('$notrace'(_24056, _24058), once(user:self_eval(['import!', '&self', m2])), '$restore_trace'(_24056, _24058))
^  Unify: (217) [system] setup_call_cleanup(system:'$notrace'(_24056, _24058), system:once(user:self_eval(['import!', '&self', m2])), system:'$restore_trace'(_24056, _24058))
^  Call: (218) [system] sig_atomic(system:'$notrace'(_24056, _24058))
^  Redo: (215) [user] eval_args(=, _17450, '1000', '&self', ['import!', '&self', m2], _3376)
^  Unify: (215) [user] eval_args(=, _17450, '1000', '&self', ['import!', '&self', m2], _3376)
^  Call: (217) [system] setup_call_cleanup('$notrace'(_28794, _28796), once(user:nonvar(_3376)), '$restore_trace'(_28794, _28796))
^  Unify: (217) [system] setup_call_cleanup(system:'$notrace'(_28794, _28796), system:once(user:nonvar(_3376)), system:'$restore_trace'(_28794, _28796))
^  Call: (218) [system] sig_atomic(system:'$notrace'(_28794, _28796))
^  Redo: (215) [user] eval_args(=, _17450, '1000', '&self', ['import!', '&self', m2], _3376)
^  Unify: (215) [user] eval_args(=, _17450, '1000', '&self', ['import!', '&self', m2], _3376)
^  Call: (217) [system] setup_call_cleanup('$notrace'(_33532, _33534), once(user:nonvar(_3376)), '$restore_trace'(_33532, _33534))
^  Unify: (217) [system] setup_call_cleanup(system:'$notrace'(_33532, _33534), system:once(user:nonvar(_3376)), system:'$restore_trace'(_33532, _33534))
^  Call: (218) [system] sig_atomic(system:'$notrace'(_33532, _33534))
^  Redo: (215) [user] eval_args(=, _17450, '1000', '&self', ['import!', '&self', m2], _3376)
^  Unify: (215) [user] eval_args(=, _17450, '1000', '&self', ['import!', '&self', m2], _3376)
   Call: (216) [system] ['&self', m2]==[]
^  Redo: (215) [user] eval_args(=, _17450, '1000', '&self', ['import!', '&self', m2], _3376)
^  Unify: (215) [user] eval_args(=, _17450, '1000', '&self', ['import!', '&self', m2], _3376)
   Call: (216) [system] atom(=)
   Exit: (216) [system] atom(=)
   Call: (216) [system] (=)\==(=)
^  Redo: (215) [user] eval_args(=, _17450, '1000', '&self', ['import!', '&self', m2], _3376)
^  Unify: (215) [user] eval_args(=, _17450, '1000', '&self', ['import!', '&self', m2], _3376)
^  Call: (216) [user] self_eval(['import!', '&self', m2])
^  Unify: (216) [user] self_eval(['import!', '&self', m2])
^  Call: (218) [system] setup_call_cleanup('$notrace'(_47598, _47600), once(user:self_eval0(['import!', '&self', m2])), '$restore_trace'(_47598, _47600))
^  Unify: (218) [system] setup_call_cleanup(system:'$notrace'(_47598, _47600), system:once(user:self_eval0(['import!', '&self', m2])), system:'$restore_trace'(_47598, _47600))
^  Call: (219) [system] sig_atomic(system:'$notrace'(_47598, _47600))
^  Fail: (216) [user] self_eval(['import!', '&self', m2])
^  Redo: (215) [user] eval_args(=, _17450, '1000', '&self', ['import!', '&self', m2], _3376)
^  Unify: (215) [user] eval_args(=, _17450, '1000', '&self', ['import!', '&self', m2], _3376)
^  Call: (216) [user] eval_00(=, _17450, '1000', '&self', ['import!', '&self', m2], _3376)
^  Unify: (216) [user] eval_00(=, _17450, '1000', '&self', ['import!', '&self', m2], _3376)
^  Call: (217) [user] self_eval(['import!', '&self', m2])
^  Unify: (217) [user] self_eval(['import!', '&self', m2])
^  Call: (219) [system] setup_call_cleanup('$notrace'(_56996, _56998), once(user:self_eval0(['import!', '&self', m2])), '$restore_trace'(_56996, _56998))
^  Unify: (219) [system] setup_call_cleanup(system:'$notrace'(_56996, _56998), system:once(user:self_eval0(['import!', '&self', m2])), system:'$restore_trace'(_56996, _56998))
^  Call: (220) [system] sig_atomic(system:'$notrace'(_56996, _56998))
^  Fail: (217) [user] self_eval(['import!', '&self', m2])
^  Redo: (216) [user] eval_00(=, _17450, '1000', '&self', ['import!', '&self', m2], _3376)
^  Unify: (216) [user] eval_00(=, _17450, '1000', '&self', ['import!', '&self', m2], _3376)
^  Call: (217) [user] eval_01(=, _17450, '1000', '&self', ['import!', '&self', m2], _3376)
^  Unify: (217) [user] eval_01(=, _17450, '1000', '&self', ['import!', '&self', m2], _3376)
   Call: (218) [system] ['import!', '&self', m2]\==[empty]
   Exit: (218) [system] ['import!', '&self', m2]\==[empty]
^  Call: (218) [user] if_t(('1000'<1, trace_on_overflow), debug(metta(eval_args)))
^  Unify: (218) [user] if_t(('1000'<1, trace_on_overflow), debug(metta(eval_args)))
   Call: (220) [system] '1000'<1
% Got exception type_error(evaluable,'1000'/0) (Ctx0=system:< / 2, Catcher=system:'<meta-call>'/1)
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

No branches or pull requests

1 participant