rascal icon indicating copy to clipboard operation
rascal copied to clipboard

infinite recursion during type-checking of Rascal code

Open jurgenvinju opened this issue 2 years ago • 0 comments

Describe the bug

2023-07-07 11:57:10,059 [pool-2-thread-33] ERROR - org.rascalmpl.vscode.lsp.util.EvaluatorUtil Internal error during Rascal check
|lib://rascal-core/lang/rascalcore/check/ATypeUtils.rsc|(54585,24,<1269,58>,<1269,82>): |lib://rascal-core/lang/rascalcore/check/ATypeUtils.rsc|:1269,58: StackOverflow()
    at isNonTerminalType(|lib://rascal-core/lang/rascalcore/check/ATypeUtils.rsc|(54527,83,<1269,0>,<1269,83>))
    at isNonTerminalType(|lib://rascal-core/lang/rascalcore/check/ATypeUtils.rsc|(55254,68,<1279,0>,<1279,68>))
    at isSyntaxType(|lib://rascal-core/lang/rascalcore/check/ATypeUtils.rsc|(59178,64,<1363,10>,<1363,74>))
    at computeFieldType(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(19479,3282,<402,11>,<473,4>))
    at rascalGetTypeInNamelessType(|lib://rascal-core/lang/rascalcore/check/RascalConfig.rsc|(8695,52,<211,11>,<211,63>))
    at _getTypeInType(|lib://typepal/analysis/typepal/Solver.rsc|(30601,69,<820,22>,<820,91>))
    at computeFieldTypeWithADT(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(17580,86,<367,11>,<367,97>))
    at computeFieldType(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(20328,56,<423,18>,<423,74>))
    at rascalGetTypeInNamelessType(|lib://rascal-core/lang/rascalcore/check/RascalConfig.rsc|(8695,52,<211,11>,<211,63>))
    at _getTypeInType(|lib://typepal/analysis/typepal/Solver.rsc|(30601,69,<820,22>,<820,91>))
    at computeFieldTypeWithADT(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(17580,86,<367,11>,<367,97>))
    at computeFieldType(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(20328,56,<423,18>,<423,74>))
    at rascalGetTypeInNamelessType(|lib://rascal-core/lang/rascalcore/check/RascalConfig.rsc|(8695,52,<211,11>,<211,63>))
    at _getTypeInType(|lib://typepal/analysis/typepal/Solver.rsc|(30601,69,<820,22>,<820,91>))
    at computeFieldTypeWithADT(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(17580,86,<367,11>,<367,97>))
    at computeFieldType(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(20328,56,<423,18>,<423,74>))
    at rascalGetTypeInNamelessType(|lib://rascal-core/lang/rascalcore/check/RascalConfig.rsc|(8695,52,<211,11>,<211,63>))
    at _getTypeInType(|lib://typepal/analysis/typepal/Solver.rsc|(30601,69,<820,22>,<820,91>))
    at computeFieldTypeWithADT(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(17580,86,<367,11>,<367,97>))
    at computeFieldType(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(20328,56,<423,18>,<423,74>))
    at rascalGetTypeInNamelessType(|lib://rascal-core/lang/rascalcore/check/RascalConfig.rsc|(8695,52,<211,11>,<211,63>))
    at _getTypeInType(|lib://typepal/analysis/typepal/Solver.rsc|(30601,69,<820,22>,<820,91>))
    at computeFieldTypeWithADT(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(17580,86,<367,11>,<367,97>))
    at computeFieldType(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(20328,56,<423,18>,<423,74>))
    at rascalGetTypeInNamelessType(|lib://rascal-core/lang/rascalcore/check/RascalConfig.rsc|(8695,52,<211,11>,<211,63>))
    at _getTypeInType(|lib://typepal/analysis/typepal/Solver.rsc|(30601,69,<820,22>,<820,91>))
    at computeFieldTypeWithADT(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(17580,86,<367,11>,<367,97>))
    at computeFieldType(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(20328,56,<423,18>,<423,74>))
    at rascalGetTypeInNamelessType(|lib://rascal-core/lang/rascalcore/check/RascalConfig.rsc|(8695,52,<211,11>,<211,63>))
    at _getTypeInType(|lib://typepal/analysis/typepal/Solver.rsc|(30601,69,<820,22>,<820,91>))
    at computeFieldTypeWithADT(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(17580,86,<367,11>,<367,97>))
    at computeFieldType(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(20328,56,<423,18>,<423,74>))
    at rascalGetTypeInNamelessType(|lib://rascal-core/lang/rascalcore/check/RascalConfig.rsc|(8695,52,<211,11>,<211,63>))
    at _getTypeInType(|lib://typepal/analysis/typepal/Solver.rsc|(30601,69,<820,22>,<820,91>))
    at computeFieldTypeWithADT(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(17580,86,<367,11>,<367,97>))
    at computeFieldType(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(20328,56,<423,18>,<423,74>))
    at rascalGetTypeInNamelessType(|lib://rascal-core/lang/rascalcore/check/RascalConfig.rsc|(8695,52,<211,11>,<211,63>))
    at _getTypeInType(|lib://typepal/analysis/typepal/Solver.rsc|(30601,69,<820,22>,<820,91>))
    at computeFieldTypeWithADT(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(17580,86,<367,11>,<367,97>))
    at computeFieldType(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(20328,56,<423,18>,<423,74>))
    at rascalGetTypeInNamelessType(|lib://rascal-core/lang/rascalcore/check/RascalConfig.rsc|(8695,52,<211,11>,<211,63>))
    at _getTypeInType(|lib://typepal/analysis/typepal/Solver.rsc|(30601,69,<820,22>,<820,91>))
    at computeFieldTypeWithADT(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(17580,86,<367,11>,<367,97>))
    at computeFieldType(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(20328,56,<423,18>,<423,74>))
    at rascalGetTypeInNamelessType(|lib://rascal-core/lang/rascalcore/check/RascalConfig.rsc|(8695,52,<211,11>,<211,63>))
    at _getTypeInType(|lib://typepal/analysis/typepal/Solver.rsc|(30601,69,<820,22>,<820,91>))
    at computeFieldTypeWithADT(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(17580,86,<367,11>,<367,97>))
    at computeFieldType(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(20328,56,<423,18>,<423,74>))
    at rascalGetTypeInNamelessType(|lib://rascal-core/lang/rascalcore/check/RascalConfig.rsc|(8695,52,<211,11>,<211,63>))
    at _getTypeInType(|lib://typepal/analysis/typepal/Solver.rsc|(30601,69,<820,22>,<820,91>))
    at computeFieldTypeWithADT(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(17580,86,<367,11>,<367,97>))
    at computeFieldType(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(20328,56,<423,18>,<423,74>))
    at rascalGetTypeInNamelessType(|lib://rascal-core/lang/rascalcore/check/RascalConfig.rsc|(8695,52,<211,11>,<211,63>))
    at _getTypeInType(|lib://typepal/analysis/typepal/Solver.rsc|(30601,69,<820,22>,<820,91>))
    at computeFieldTypeWithADT(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(17580,86,<367,11>,<367,97>))
    at computeFieldType(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(20328,56,<423,18>,<423,74>))
    at rascalGetTypeInNamelessType(|lib://rascal-core/lang/rascalcore/check/RascalConfig.rsc|(8695,52,<211,11>,<211,63>))
    at _getTypeInType(|lib://typepal/analysis/typepal/Solver.rsc|(30601,69,<820,22>,<820,91>))
    at computeFieldTypeWithADT(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(17580,86,<367,11>,<367,97>))
    at computeFieldType(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(20328,56,<423,18>,<423,74>))
    at rascalGetTypeInNamelessType(|lib://rascal-core/lang/rascalcore/check/RascalConfig.rsc|(8695,52,<211,11>,<211,63>))
    at _getTypeInType(|lib://typepal/analysis/typepal/Solver.rsc|(30601,69,<820,22>,<820,91>))
    at computeFieldTypeWithADT(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(17580,86,<367,11>,<367,97>))
    at computeFieldType(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(20328,56,<423,18>,<423,74>))
    at rascalGetTypeInNamelessType(|lib://rascal-core/lang/rascalcore/check/RascalConfig.rsc|(8695,52,<211,11>,<211,63>))
    at _getTypeInType(|lib://typepal/analysis/typepal/Solver.rsc|(30601,69,<820,22>,<820,91>))
    at computeFieldTypeWithADT(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(17580,86,<367,11>,<367,97>))
    at computeFieldType(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(20328,56,<423,18>,<423,74>))
    at rascalGetTypeInNamelessType(|lib://rascal-core/lang/rascalcore/check/RascalConfig.rsc|(8695,52,<211,11>,<211,63>))
    at _getTypeInType(|lib://typepal/analysis/typepal/Solver.rsc|(30601,69,<820,22>,<820,91>))
    at computeFieldTypeWithADT(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(17580,86,<367,11>,<367,97>))
    at computeFieldType(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(20328,56,<423,18>,<423,74>))
    at rascalGetTypeInNamelessType(|lib://rascal-core/lang/rascalcore/check/RascalConfig.rsc|(8695,52,<211,11>,<211,63>))
    at _getTypeInType(|lib://typepal/analysis/typepal/Solver.rsc|(30601,69,<820,22>,<820,91>))
    at computeFieldTypeWithADT(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(17580,86,<367,11>,<367,97>))
    at computeFieldType(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(20328,56,<423,18>,<423,74>))
    at rascalGetTypeInNamelessType(|lib://rascal-core/lang/rascalcore/check/RascalConfig.rsc|(8695,52,<211,11>,<211,63>))
    at _getTypeInType(|lib://typepal/analysis/typepal/Solver.rsc|(30601,69,<820,22>,<820,91>))
    at computeFieldTypeWithADT(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(17580,86,<367,11>,<367,97>))
    at computeFieldType(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(20328,56,<423,18>,<423,74>))
    at rascalGetTypeInNamelessType(|lib://rascal-core/lang/rascalcore/check/RascalConfig.rsc|(8695,52,<211,11>,<211,63>))
    at _getTypeInType(|lib://typepal/analysis/typepal/Solver.rsc|(30601,69,<820,22>,<820,91>))
    at computeFieldTypeWithADT(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(17580,86,<367,11>,<367,97>))
    at computeFieldType(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(20328,56,<423,18>,<423,74>))
    at rascalGetTypeInNamelessType(|lib://rascal-core/lang/rascalcore/check/RascalConfig.rsc|(8695,52,<211,11>,<211,63>))
    at _getTypeInType(|lib://typepal/analysis/typepal/Solver.rsc|(30601,69,<820,22>,<820,91>))
    at computeFieldTypeWithADT(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(17580,86,<367,11>,<367,97>))
    at computeFieldType(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(20328,56,<423,18>,<423,74>))
    at rascalGetTypeInNamelessType(|lib://rascal-core/lang/rascalcore/check/RascalConfig.rsc|(8695,52,<211,11>,<211,63>))
    at _getTypeInType(|lib://typepal/analysis/typepal/Solver.rsc|(30601,69,<820,22>,<820,91>))
    at computeFieldTypeWithADT(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(17580,86,<367,11>,<367,97>))
    at computeFieldType(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(20328,56,<423,18>,<423,74>))
    at rascalGetTypeInNamelessType(|lib://rascal-core/lang/rascalcore/check/RascalConfig.rsc|(8695,52,<211,11>,<211,63>))
    at _getTypeInType(|lib://typepal/analysis/typepal/Solver.rsc|(30601,69,<820,22>,<820,91>))
    at computeFieldTypeWithADT(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(17580,86,<367,11>,<367,97>))
    at computeFieldType(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(20328,56,<423,18>,<423,74>))
    at rascalGetTypeInNamelessType(|lib://rascal-core/lang/rascalcore/check/RascalConfig.rsc|(8695,52,<211,11>,<211,63>))
    at _getTypeInType(|lib://typepal/analysis/typepal/Solver.rsc|(30601,69,<820,22>,<820,91>))
    at computeFieldTypeWithADT(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(17580,86,<367,11>,<367,97>))
    at computeFieldType(|lib://rascal-core/lang/rascalcore/check/ComputeType.rsc|(20328,56,<423,18>,<423,74>))
    at rascalGetTypeInNamelessType(|lib://rascal-core/lang/rascalcore/check/RascalConfig.rsc|(8695,52,<211,11>,<211,63>))
    ...

This happens in some Rascal code (on safe in the VScode extension) by @bsddemon ; who will share his code with us to debug.

jurgenvinju avatar Jul 07 '23 10:07 jurgenvinju