metaborg / nabl

Spoofax' Name Binding Language
Apache License 2.0
7 stars 12 forks source link

Type ascription in Statix breaks checking #80

Closed Gohla closed 3 years ago

Gohla commented 3 years ago

Bug description Using type ascription in Statix breaks checking.

Versions Spoofax version: Spoofax3 0.15.3 Statix setup: single-file

Steps to reproduce the behavior

Using type ascription as follows produces an error:

func_defOk(s1, fd@FuncDef(name, typed_vars, defcls: list(GNFV_defcl), stmts: list(Stmt))) = (s2, T) :- {argTs s3 s4}
...

func_defOk(s1, fd@FuncDefWithReturnType(name: ID, typed_vars: list(Typed_var), ret_type: Type, defcls: list(GNFV_defcl), stmts: list(Stmt))) = (s2, T) :- {argTs s3 s4 rT} 
...

removing these type ascriptions as follows fixes the error:

func_defOk(s1, fd@FuncDef(name, typed_vars, defcls, stmts)) = (s2, T) :- {argTs s3 s4}
...

func_defOk(s1, fd@FuncDefWithReturnType(name, typed_vars, ret_type, defcls, stmts)) = (s2, T) :- {argTs s3 s4 rT}
...

Observed behavior

The following error occurs when checking the Statix spec:

11:59:36.439 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |   Caused by: org.spoofax.interpreter.core.InterpreterException: Exception during evaluation: Exception in execution of primitive 'STX_compare_patterns'
11:59:36.439 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.spoofax.interpreter.core.Interpreter.evaluate(Interpreter.java:113)
11:59:36.439 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.spoofax.interpreter.core.Interpreter.invoke(Interpreter.java:80)
11:59:36.439 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.strategoxt.HybridInterpreter.invoke(HybridInterpreter.java:458)
11:59:36.439 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.stratego.common.StrategoRuntime.invokeOrNull(StrategoRuntime.java:169)
11:59:36.439 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.stratego.common.StrategoRuntime.invokeOrNull(StrategoRuntime.java:147)
11:59:36.439 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.stratego.common.StrategoRuntime.invoke(StrategoRuntime.java:56)
11:59:36.439 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.constraint.common.ConstraintAnalyzer.doAnalyze(ConstraintAnalyzer.java:383)
11:59:36.444 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.constraint.common.ConstraintAnalyzer.analyze(ConstraintAnalyzer.java:285)
11:59:36.444 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.statix.task.spoofax.StatixAnalyzeMultiWrapper.lambda$analyze$0(StatixAnalyzeMultiWrapper.java:55)
11:59:36.444 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.common.option.Option.mapThrowingOrElse(Option.java:133)
11:59:36.444 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.statix.task.spoofax.StatixAnalyzeMultiWrapper.lambda$analyze$1(StatixAnalyzeMultiWrapper.java:54)
11:59:36.444 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.common.option.Option.mapThrowingOrElse(Option.java:133)
11:59:36.444 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.common.result.Result.mapThrowingOrElse(Result.java:364)
11:59:36.444 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.statix.task.spoofax.StatixAnalyzeMultiWrapper.analyze(StatixAnalyzeMultiWrapper.java:53)
11:59:36.444 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.constraint.pie.ConstraintAnalyzeMultiTaskDef.exec(ConstraintAnalyzeMultiTaskDef.java:141)
11:59:36.444 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.constraint.pie.ConstraintAnalyzeMultiTaskDef.exec(ConstraintAnalyzeMultiTaskDef.java:27)
11:59:36.444 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.pie.api.Task.exec(Task.java:56)
11:59:36.444 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.pie.runtime.exec.TaskExecutor.execInternal(TaskExecutor.java:130)
11:59:36.444 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.pie.runtime.exec.TaskExecutor.exec(TaskExecutor.java:87)
11:59:36.444 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.pie.runtime.exec.TopDownRunner.exec(TopDownRunner.java:192)
11:59:36.444 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.pie.runtime.exec.TopDownRunner.executeOrGetExisting(TopDownRunner.java:137)
11:59:36.444 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.pie.runtime.exec.TopDownRunner.require(TopDownRunner.java:80)
11:59:36.444 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.pie.runtime.exec.ExecContextImpl.require(ExecContextImpl.java:118)
11:59:36.444 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.pie.runtime.exec.ExecContextImpl.require(ExecContextImpl.java:98)
11:59:36.444 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.statix.task.StatixCheckMulti.exec(StatixCheckMulti.java:51)
11:59:36.444 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.statix.task.StatixCheckMulti.exec(StatixCheckMulti.java:18)
11:59:36.444 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.pie.api.Task.exec(Task.java:56)
11:59:36.444 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.pie.runtime.exec.TaskExecutor.execInternal(TaskExecutor.java:130)
11:59:36.444 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.pie.runtime.exec.TaskExecutor.exec(TaskExecutor.java:87)
11:59:36.444 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.pie.runtime.exec.TopDownRunner.exec(TopDownRunner.java:192)
11:59:36.444 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.pie.runtime.exec.TopDownRunner.executeOrGetExisting(TopDownRunner.java:137)
11:59:36.444 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.pie.runtime.exec.TopDownRunner.require(TopDownRunner.java:80)
11:59:36.444 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.pie.runtime.exec.ExecContextImpl.require(ExecContextImpl.java:118)
11:59:36.444 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.pie.runtime.exec.ExecContextImpl.require(ExecContextImpl.java:98)
11:59:36.444 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.spoofax.lwb.compiler.statix.CheckStatix.lambda$exec$0(CheckStatix.java:33)
11:59:36.444 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.common.option.Option.mapOrElse(Option.java:129)
11:59:36.444 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.spoofax.lwb.compiler.statix.CheckStatix.lambda$exec$1(CheckStatix.java:32)
11:59:36.444 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.common.option.Option.mapOrElse(Option.java:129)
11:59:36.444 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.common.result.Result.mapOrElse(Result.java:356)
11:59:36.444 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.spoofax.lwb.compiler.statix.CheckStatix.exec(CheckStatix.java:31)
11:59:36.444 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.spoofax.lwb.compiler.statix.CheckStatix.exec(CheckStatix.java:13)
11:59:36.444 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.pie.api.Task.exec(Task.java:56)
11:59:36.445 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.pie.runtime.exec.TaskExecutor.execInternal(TaskExecutor.java:130)
11:59:36.445 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.pie.runtime.exec.TaskExecutor.exec(TaskExecutor.java:87)
11:59:36.445 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.pie.runtime.exec.TopDownRunner.exec(TopDownRunner.java:192)
11:59:36.445 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.pie.runtime.exec.TopDownRunner.executeOrGetExisting(TopDownRunner.java:137)
11:59:36.445 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.pie.runtime.exec.TopDownRunner.require(TopDownRunner.java:80)
11:59:36.445 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.pie.runtime.exec.ExecContextImpl.require(ExecContextImpl.java:118)
11:59:36.445 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.pie.runtime.exec.ExecContextImpl.require(ExecContextImpl.java:98)
11:59:36.445 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.spoofax.lwb.compiler.CheckLanguageSpecification.exec(CheckLanguageSpecification.java:56)
11:59:36.445 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.spoofax.lwb.compiler.CheckLanguageSpecification.exec(CheckLanguageSpecification.java:24)
11:59:36.445 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.pie.api.Task.exec(Task.java:56)
11:59:36.445 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.pie.runtime.exec.TaskExecutor.execInternal(TaskExecutor.java:130)
11:59:36.445 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.pie.runtime.exec.TaskExecutor.exec(TaskExecutor.java:87)
11:59:36.445 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.pie.runtime.exec.TopDownRunner.exec(TopDownRunner.java:192)
11:59:36.445 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.pie.runtime.exec.TopDownRunner.executeOrGetExisting(TopDownRunner.java:137)
11:59:36.445 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.pie.runtime.exec.TopDownRunner.require(TopDownRunner.java:80)
11:59:36.445 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.pie.runtime.exec.TopDownRunner.requireInitial(TopDownRunner.java:59)
11:59:36.445 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.pie.runtime.MixedSessionImpl.lambda$require$1(MixedSessionImpl.java:99)
11:59:36.445 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.pie.runtime.SessionImpl.handleException(SessionImpl.java:215)
11:59:36.445 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.pie.runtime.MixedSessionImpl.require(MixedSessionImpl.java:99)
11:59:36.445 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder.topDownBuild(SpoofaxLwbBuilder.java:162)
11:59:36.445 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder.fullBuild(SpoofaxLwbBuilder.java:131)
11:59:36.445 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder.access$000(SpoofaxLwbBuilder.java:61)
11:59:36.445 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder$1.run(SpoofaxLwbBuilder.java:86)
11:59:36.445 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2292)
11:59:36.445 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder.build(SpoofaxLwbBuilder.java:101)
11:59:36.445 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:846)
11:59:36.445 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
11:59:36.445 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:229)
11:59:36.445 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:277)
11:59:36.445 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:330)
11:59:36.445 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
11:59:36.445 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:333)
11:59:36.445 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:385)
11:59:36.445 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:406)
11:59:36.445 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.eclipse.core.internal.resources.Workspace.buildInternal(Workspace.java:515)
11:59:36.445 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:405)
11:59:36.445 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.eclipse.ui.actions.GlobalBuildAction$1.run(GlobalBuildAction.java:180)
11:59:36.445 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
11:59:36.445 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |   Caused by: org.strategoxt.lang.StrategoException: Exception in execution of primitive 'STX_compare_patterns'
11:59:36.446 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.strategoxt.lang.Context.invokePrimitive(Context.java:225)
11:59:36.446 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.strategoxt.lang.Context.invokePrimitive(Context.java:201)
11:59:36.446 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at statix.lang.trans.compare_patterns_0_0.invoke(compare_patterns_0_0.java:10)
11:59:36.446 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at statix.lang.trans.patterns_eq_0_0.invoke(patterns_eq_0_0.java:14)
11:59:36.446 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at statix.lang.trans.rule_head_cmp_1_0.invoke(rule_head_cmp_1_0.java:61)
11:59:36.446 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at statix.lang.trans.rule_pattern_cmp_0_1.invoke(rule_pattern_cmp_0_1.java:18)
11:59:36.446 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at statix.lang.trans.distinct_patterns_0_1_lifted2.invoke(distinct_patterns_0_1_lifted2.java:38)
11:59:36.446 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.strategoxt.lang.SRTS_EXT_filter_1_0.filterMaintainAnnos(SRTS_EXT_filter_1_0.java:65)
11:59:36.446 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.strategoxt.lang.SRTS_EXT_filter_1_0.filterMaintainAnnos(SRTS_EXT_filter_1_0.java:68)
11:59:36.446 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.strategoxt.lang.SRTS_EXT_filter_1_0.invoke(SRTS_EXT_filter_1_0.java:37)
11:59:36.446 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.strategoxt.lang.compat.override.performance_tweaks.filter_1_0_override.invoke(filter_1_0_override.java:21)
11:59:36.446 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at statix.lang.trans.distinct_patterns_0_1_lifted1.invoke(distinct_patterns_0_1_lifted1.java:23)
11:59:36.446 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.strategoxt.lang.SRTS_all.mapMaintainAnnos(SRTS_all.java:90)
11:59:36.446 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.strategoxt.lang.SRTS_all.invoke(SRTS_all.java:23)
11:59:36.446 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.strategoxt.lang.compat.override.performance_tweaks.map_1_0_override.invoke(map_1_0_override.java:29)
11:59:36.446 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at statix.lang.trans.distinct_patterns_0_1_lifted0.invoke(distinct_patterns_0_1_lifted0.java:18)
11:59:36.446 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.strategoxt.stratego_lib.with_1_1.invoke(with_1_1.java:31)
11:59:36.446 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at statix.lang.trans.distinct_patterns_0_1.invoke(distinct_patterns_0_1.java:27)
11:59:36.446 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at statix.lang.trans.solve_pattern_constraint_0_1_lifted4.invoke(solve_pattern_constraint_0_1_lifted4.java:12)
11:59:36.446 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.strategoxt.lang.SRTS_all.mapMaintainAnnos(SRTS_all.java:90)
11:59:36.446 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.strategoxt.lang.SRTS_all.mapMaintainAnnos(SRTS_all.java:101)
11:59:36.446 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.strategoxt.lang.SRTS_all.mapMaintainAnnos(SRTS_all.java:101)
11:59:36.446 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.strategoxt.lang.SRTS_all.mapMaintainAnnos(SRTS_all.java:101)
11:59:36.446 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.strategoxt.lang.SRTS_all.mapMaintainAnnos(SRTS_all.java:101)
11:59:36.446 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.strategoxt.lang.SRTS_all.invoke(SRTS_all.java:23)
11:59:36.446 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.strategoxt.lang.compat.override.performance_tweaks.map_1_0_override.invoke(map_1_0_override.java:29)
11:59:36.446 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at statix.lang.trans.solve_pattern_constraint_0_1.invoke(solve_pattern_constraint_0_1.java:27)
11:59:36.446 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at statix.lang.trans.detect_overlapping_rules_0_1_lifted0.invoke(detect_overlapping_rules_0_1_lifted0.java:10)
11:59:36.446 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.strategoxt.lang.SRTS_EXT_filter_1_0.filterIgnoreAnnos(SRTS_EXT_filter_1_0.java:83)
11:59:36.446 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.strategoxt.lang.SRTS_EXT_filter_1_0.invoke(SRTS_EXT_filter_1_0.java:34)
11:59:36.446 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.strategoxt.lang.compat.override.performance_tweaks.filter_1_0_override.invoke(filter_1_0_override.java:21)
11:59:36.446 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at statix.lang.trans.detect_overlapping_rules_0_1.invoke(detect_overlapping_rules_0_1.java:19)
11:59:36.446 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at statix.lang.trans.nabl2_custom_analysis_final_hook_p__0_1_lifted0.invoke(nabl2_custom_analysis_final_hook_p__0_1_lifted0.java:27)
11:59:36.447 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.strategoxt.stratego_lib.with_1_1.invoke(with_1_1.java:31)
11:59:36.447 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at statix.lang.trans.nabl2_custom_analysis_final_hook_p__0_1.invoke(nabl2_custom_analysis_final_hook_p__0_1.java:38)
11:59:36.447 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at statix.lang.trans.nabl2_custom_analysis_final_hook_0_1_lifted0.invoke(nabl2_custom_analysis_final_hook_0_1_lifted0.java:39)
11:59:36.447 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.strategoxt.stratego_lib.with_1_1.invoke(with_1_1.java:31)
11:59:36.447 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at statix.lang.trans.nabl2_custom_analysis_final_hook_0_1.invoke(nabl2_custom_analysis_final_hook_0_1.java:34)
11:59:36.447 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at statix.lang.trans.nabl2__analyze_compat_1_0_lifted6.invoke(nabl2__analyze_compat_1_0_lifted6.java:62)
11:59:36.447 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.strategoxt.stratego_lib.with_1_1.invoke(with_1_1.java:31)
11:59:36.447 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at statix.lang.trans.nabl2__analyze_compat_1_0_fragment_0.invoke(nabl2__analyze_compat_1_0_fragment_0.java:266)
11:59:36.447 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at statix.lang.trans.nabl2__analyze_compat_1_0.invoke(nabl2__analyze_compat_1_0.java:13)
11:59:36.447 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at statix.lang.trans.nabl2_analyze_1_0_lifted0.invoke(nabl2_analyze_1_0_lifted0.java:10)
11:59:36.447 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at statix.lang.trans.constraint_analysis_compat_1_0_lifted5.invoke(constraint_analysis_compat_1_0_lifted5.java:159)
11:59:36.447 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.strategoxt.stratego_lib.with_1_1.invoke(with_1_1.java:31)
11:59:36.447 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at statix.lang.trans.constraint_analysis_compat_1_0.invoke(constraint_analysis_compat_1_0.java:116)
11:59:36.447 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at statix.lang.trans.nabl2_analyze_1_0.invoke(nabl2_analyze_1_0.java:13)
11:59:36.447 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at statix.lang.trans.editor_analyze_0_0.invoke(editor_analyze_0_0.java:11)
11:59:36.447 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.strategoxt.lang.Strategy.invokeDynamic(Strategy.java:33)
11:59:36.447 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.strategoxt.lang.InteropSDefT.evaluate(InteropSDefT.java:192)
11:59:36.447 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.strategoxt.lang.InteropSDefT.evaluate(InteropSDefT.java:183)
11:59:36.447 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.strategoxt.lang.InteropSDefT$StrategyBody.evaluate(InteropSDefT.java:245)
11:59:36.447 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.spoofax.interpreter.core.Interpreter.evaluate(Interpreter.java:105)
11:59:36.447 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     ... 79 more in common with parent stacktrace
11:59:36.447 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |   Caused by: java.lang.IllegalArgumentException: Cannot match: As(Var("fd"),Op("FuncDef",[Ascribe(…,…),Ascribe(…,…)|…]))
11:59:36.448 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.nabl2.terms.matching.TermMatch$M.lambda$req$81(TermMatch.java:466)
11:59:36.448 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at java.base/java.util.Optional.orElseThrow(Optional.java:408)
11:59:36.448 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.nabl2.terms.matching.TermMatch$M.lambda$req$82(TermMatch.java:466)
11:59:36.448 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.nabl2.terms.matching.TermMatch$M.lambda$listElems$41(TermMatch.java:313)
11:59:36.448 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.nabl2.terms.Terms$1.caseList(Terms.java:38)
11:59:36.448 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.nabl2.terms.build.AConsTerm.match(AConsTerm.java:53)
11:59:36.448 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.nabl2.terms.matching.TermMatch$M.lambda$listElems$42(TermMatch.java:310)
11:59:36.448 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.nabl2.terms.matching.TermMatch$M.lambda$appl1$14(TermMatch.java:106)
11:59:36.448 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.nabl2.terms.Terms$1.caseAppl(Terms.java:34)
11:59:36.448 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.nabl2.terms.build.AAppl1Term.match(AAppl1Term.java:38)
11:59:36.448 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.nabl2.terms.matching.TermMatch$M.lambda$appl1$15(TermMatch.java:102)
11:59:36.448 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.nabl2.terms.matching.TermMatch$M.lambda$casesFix$80(TermMatch.java:447)
11:59:36.448 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.nabl2.terms.matching.TermMatch$M.lambda$appl2$18(TermMatch.java:122)
11:59:36.448 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.nabl2.terms.Terms$1.caseAppl(Terms.java:34)
11:59:36.448 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.nabl2.terms.build.AAppl2Term.match(AAppl2Term.java:36)
11:59:36.448 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.nabl2.terms.matching.TermMatch$M.lambda$appl2$19(TermMatch.java:118)
11:59:36.448 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.nabl2.terms.matching.TermMatch$IMatcher.match(TermMatch.java:515)
11:59:36.448 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.statix.spoofax.STX_compare_patterns.call(STX_compare_patterns.java:28)
11:59:36.448 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.statix.spoofax.StatixPrimitive.call(StatixPrimitive.java:91)
11:59:36.448 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at mb.statix.spoofax.StatixPrimitive.call(StatixPrimitive.java:76)
11:59:36.448 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     at org.strategoxt.lang.Context.invokePrimitive(Context.java:212)
11:59:36.448 | DEBUG | Worker-5: Building Workspace                       | mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder           |     ... 131 more in common with parent stacktrace

Expected behavior No error to occur

Additional context Can be reproduced in this Spoofax 3 project: https://gitlab.ewi.tudelft.nl/CS4200/2021-2022/student-tvandersteenho/-/tree/5e61158fdbd18240598eb284fcaee0ad848469d1 in the statics/Func_def.stx file.

AZWN commented 3 years ago

Should be fixed in bdf8fc6df6678f771cb0ca717af3f242d10e3b5e