`IllegalStateException: null` error in solver
The error below appears when using this version of the Calc language:
https://github.com/MetaBorgCube/metaborg-calc/releases/tag/solver-bug
Seems to be a combination of generalization (universal quantification of let-bound variable bindings) and the typing rule for
if
[[ If(e1, e2, e3) ^ (s) : ty2 ]] := [[ e1 ^ (s) : BoolT() ]], [[ e2 ^ (s) : ty2 ]], [[ e3 ^ (s) : ty3 ]], ty2 == ty3 | error $[branches should have same type] @ e2.
Submitted by Eelco Visser on 5 June 2017 at 05:4512:40 | INFO | c.ConstraintSingleFileAnalyzer - Analyzing 1 files in eclipse:///org.metaborg.lang.calc.example. 12:40 | INFO | c.ConstraintSingleFileAnalyzer - Analyzing basic/example02.calc. 12:40 | INFO | c.ConstraintSingleFileAnalyzer - Finalizing analysis of basic/example02.calc. 12:40 | INFO | c.ConstraintSingleFileAnalyzer - Finalized analysis of basic/example02.calc. 12:40 | INFO | c.ConstraintSingleFileAnalyzer - Processing messages of basic/example02.calc. 12:40 | ERROR | o.m.s.e.e.EditorUpdateJob - Failed to update editor for eclipse:///org.metaborg.lang.calc.example/basic/example02.calc java.lang.IllegalStateException: null at org.metaborg.meta.nabl2.terms.generic.TermVar.iterator(TermVar.java:31) ~[org.metaborg.meta.nabl2.java_2.3.0.20170529-093914-master.jar:na] at org.metaborg.meta.nabl2.terms.generic.TB.newListTail(TB.java:61) ~[org.metaborg.meta.nabl2.java_2.3.0.20170529-093914-master.jar:na] at org.metaborg.meta.nabl2.terms.generic.TB.newList(TB.java:56) ~[org.metaborg.meta.nabl2.java_2.3.0.20170529-093914-master.jar:na] at org.metaborg.meta.nabl2.constraints.poly.CInstantiate.pp(CInstantiate.java:47) ~[org.metaborg.meta.nabl2.java_2.3.0.20170529-093914-master.jar:na] at org.metaborg.meta.nabl2.solver.Solver.lambda$10(Solver.java:266) ~[org.metaborg.meta.nabl2.java_2.3.0.20170529-093914-master.jar:na] at org.metaborg.meta.nabl2.solver.Solver$$Lambda$452/1730063498.apply(Unknown Source) ~[na:na] at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[na:1.8.0_20] at java.util.Iterator.forEachRemaining(Iterator.java:116) ~[na:1.8.0_20] at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) ~[na:1.8.0_20] at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:512) ~[na:1.8.0_20] at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:502) ~[na:1.8.0_20] at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[na:1.8.0_20] at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:1.8.0_20] at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) ~[na:1.8.0_20] at org.metaborg.meta.nabl2.solver.Solver.unsolvedErrors(Solver.java:268) ~[org.metaborg.meta.nabl2.java_2.3.0.20170529-093914-master.jar:na] at org.metaborg.spoofax.core.analysis.constraint.ConstraintSingleFileAnalyzer.analyzeAll(ConstraintSingleFileAnalyzer.java:203) ~[org.metaborg.spoofax.core_2.3.0.20170529-093914-master.jar:na] at org.metaborg.spoofax.core.analysis.constraint.ConstraintSingleFileAnalyzer.analyzeAll(ConstraintSingleFileAnalyzer.java:1) ~[org.metaborg.spoofax.core_2.3.0.20170529-093914-master.jar:na] at org.metaborg.spoofax.core.analysis.constraint.AbstractConstraintAnalyzer.analyzeAll(AbstractConstraintAnalyzer.java:142) ~[org.metaborg.spoofax.core_2.3.0.20170529-093914-master.jar:na] at org.metaborg.spoofax.core.analysis.constraint.ConstraintSingleFileAnalyzer.analyzeAll(ConstraintSingleFileAnalyzer.java:1) ~[org.metaborg.spoofax.core_2.3.0.20170529-093914-master.jar:na] at org.metaborg.spoofax.core.analysis.constraint.AbstractConstraintAnalyzer.analyze(AbstractConstraintAnalyzer.java:93) ~[org.metaborg.spoofax.core_2.3.0.20170529-093914-master.jar:na] at org.metaborg.spoofax.core.analysis.constraint.ConstraintSingleFileAnalyzer.analyze(ConstraintSingleFileAnalyzer.java:1) ~[org.metaborg.spoofax.core_2.3.0.20170529-093914-master.jar:na] at org.metaborg.spoofax.core.analysis.constraint.AbstractConstraintAnalyzer.analyze(AbstractConstraintAnalyzer.java:1) ~[org.metaborg.spoofax.core_2.3.0.20170529-093914-master.jar:na] at org.metaborg.core.analysis.AnalysisService.analyze(AnalysisService.java:30) ~[org.metaborg.core_2.3.0.20170529-093914-master.jar:na] at org.metaborg.spoofax.core.analysis.SpoofaxAnalysisService.analyze(SpoofaxAnalysisService.java:20) ~[org.metaborg.spoofax.core_2.3.0.20170529-093914-master.jar:na] at org.metaborg.spoofax.core.analysis.SpoofaxAnalysisService.analyze(SpoofaxAnalysisService.java:1) ~[org.metaborg.spoofax.core_2.3.0.20170529-093914-master.jar:na] at org.metaborg.spoofax.eclipse.editor.EditorUpdateJob.analyze(EditorUpdateJob.java:348) ~[org.metaborg.spoofax.eclipse_2.3.0.20170529-093914-master.jar:na] at org.metaborg.spoofax.eclipse.editor.EditorUpdateJob.update(EditorUpdateJob.java:278) ~[org.metaborg.spoofax.eclipse_2.3.0.20170529-093914-master.jar:na] at org.metaborg.spoofax.eclipse.editor.EditorUpdateJob.run(EditorUpdateJob.java:137) ~[org.metaborg.spoofax.eclipse_2.3.0.20170529-093914-master.jar:na] at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) [org.eclipse.core.jobs_3.8.0.v20160509-0411.jar:na]
Issue Log
On 12 June 2017 at 18:44 Hendrik van Antwerpen commented:
This turned out to be a small bug, which should be fixed after the next build.
On 12 June 2017 at 18:44 Hendrik van Antwerpen closed this issue.
Log in to post comments