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

Internal compiler stacktrace in code generation (java_to_string_all_element_0_0 on Chars([TP])) #24

Open
Apanatshka opened this issue Dec 13, 2021 · 0 comments
Assignees
Labels
Prio-High High priority Project-Stratego2-Lang Stratego 2 language project State-Open Type-Bug

Comments

@Apanatshka
Copy link
Contributor

Describe the bug
During compilation, when generating code, the compiler fails with a stacktrace (repeated a couple of times). It's on a java-to-string-all-element call on the term Chars([TP]).

mb.stratego.common.StrategoExceptions$ExceptionalFail: Invoking Stratego strategy 'stratego2-strj-sep-comp' failed exceptionally

Project
This is when compiling a Stratego 2 project.

Versions
Spoofax 3 0.16.16

To Reproduce

strategies
  A :: TP
  A = topdown(try(B))

  // note how B is not marked TP. When B is marked TP this bug is worked around.
  B = id

Observed behaviour
The compiler gives no remark on inserted casts, warnings or errors but fails during compilation.

Expected behaviour
An error in A that it cannot prove TP for try(B).

Additional context
The stacktrace is probably not super useful since the problem occured earlier when the bad Java AST was built, but here it is:

Caused by: org.spoofax.interpreter.core.InterpreterErrorExit: Internal error: 'with' clause failed unexpectedly in 'java-to-string-all'
	[Chars(TP)]
	stratego2_strj_sep_comp_0_0
	stratego2_strj_sep_comp_0_0
	log_timed_1_2
	xtc_input_1_0
	xtc_temp_files_1_0
	restore_always_2_0
	strj_or_die2_0_1
	strj2_0_0
	log_timed_1_2
	list_loop_1_0
	output_java_0_0
	with_1_1
	java_to_string_0_0
	java_to_string_0_0_fragment_4
	java_to_string_0_0_fragment_3
	java_to_string_0_0_fragment_2
	java_to_string_0_0_fragment_1
	java_to_string_all_0_0
	with_1_1
	map_1_0
	java_to_string_all_element_0_0
	map_1_0
	java_to_string_0_0
	java_to_string_0_0_fragment_4
	java_to_string_0_0_fragment_3
	java_to_string_0_0_fragment_2
	java_to_string_0_0_fragment_1
	java_to_string_0_0_fragment_0
	java_to_string_all_0_0
	with_1_1
	map_1_0
	java_to_string_all_element_0_0
	java_to_string_0_0
	java_to_string_0_0_fragment_4
	java_to_string_0_0_fragment_3
	java_to_string_0_0_fragment_2
	java_to_string_0_0_fragment_1
	java_to_string_0_0_fragment_0
	block_structure_string_0_0
	java_to_string_all_0_0
	with_1_1
	map_1_0
	java_to_string_all_element_0_0
	map_1_0
	java_to_string_0_0
	java_to_string_0_0_fragment_4
	java_to_string_all_0_0
	with_1_1
	map_1_0
	java_to_string_all_element_0_0
	java_to_string_0_0
	java_to_string_0_0_fragment_4
	java_to_string_0_0_fragment_3
	block_structure_string_0_0
	java_to_string_all_0_0
	with_1_1
	map_1_0
	java_to_string_all_element_0_0
	map_1_0
	java_to_string_0_0
	java_to_string_0_0_fragment_4
	java_to_string_0_0_fragment_3
	java_to_string_0_0_fragment_2
	java_to_string_all_0_0
	with_1_1
	map_1_0
	java_to_string_all_element_0_0
	java_to_string_0_0
	java_to_string_0_0_fragment_4
	java_to_string_0_0_fragment_3
	block_structure_string_0_0
	java_to_string_all_0_0
	with_1_1
	map_1_0
	java_to_string_all_element_0_0
	map_1_0
	java_to_string_0_0
	java_to_string_0_0_fragment_4
	java_to_string_0_0_fragment_3
	java_to_string_all_0_0
	with_1_1
	map_1_0
	java_to_string_all_element_0_0
	java_to_string_0_0
	java_to_string_0_0_fragment_4
	java_to_string_0_0_fragment_3
	java_to_string_0_0_fragment_2
	expr_to_string_0_0
	expr_to_string_0_0_fragment_0
	java_to_string_all_0_0
	with_1_1
	map_1_0
	java_to_string_all_element_0_0
	java_to_string_0_0
	java_to_string_0_0_fragment_4
	java_to_string_0_0_fragment_3
	java_to_string_0_0_fragment_2
	java_to_string_0_0_fragment_1
	with_1_1
	list_to_args_string_0_0
	java_to_string_all_0_0
	with_1_1
	map_1_0
	java_to_string_all_element_0_0
	map_1_0
	java_to_string_0_0
	java_to_string_0_0_fragment_4
	java_to_string_0_0_fragment_3
	java_to_string_0_0_fragment_2
	java_to_string_0_0_fragment_1
	with_1_1
	list_to_args_string_0_0
	java_to_string_all_0_0
	with_1_1
	map_1_0
	java_to_string_all_element_0_0
	map_1_0
	java_to_string_0_0
	java_to_string_0_0_fragment_4
	java_to_string_0_0_fragment_3
	java_to_string_0_0_fragment_2
	java_to_string_0_0_fragment_1
	with_1_1
	list_to_args_string_0_0
	java_to_string_all_0_0
	with_1_1
	map_1_0
	java_to_string_all_element_0_0
	map_1_0
	java_to_string_0_0
	java_to_string_0_0_fragment_4
	java_to_string_0_0_fragment_3
	java_to_string_0_0_fragment_2
	java_to_string_0_0_fragment_1
	with_1_1
	list_to_args_string_0_0
	java_to_string_all_0_0
	with_1_1
	map_1_0
	java_to_string_all_element_0_0
	map_1_0
	java_to_string_0_0
	java_to_string_0_0_fragment_4
	java_to_string_0_0_fragment_3
	java_to_string_0_0_fragment_2
	java_to_string_0_0
	java_to_string_0_0_fragment_4
	java_to_string_0_0_fragment_3
	java_to_string_0_0_fragment_2
	java_to_string_all_0_0
	with_1_1
	map_1_0
	java_to_string_all_element_0_0
	java_to_string_0_0
	java_to_string_0_0_fragment_4
	java_to_string_0_0_fragment_3
	java_to_string_0_0_fragment_2
	java_to_string_0_0_fragment_1
	java_to_string_all_0_0
	with_1_1 <==
	map_1_0
	java_to_string_all_element_0_0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Prio-High High priority Project-Stratego2-Lang Stratego 2 language project State-Open Type-Bug
Projects
None yet
Development

No branches or pull requests

1 participant