Skip to Content.
Sympa Menu

k-user - [[K-user] ] KOMPILE ERROR : String index out of range

k-user AT lists.cs.illinois.edu

Subject: K-user mailing list

List archive

[[K-user] ] KOMPILE ERROR : String index out of range


Chronological Thread 
  • From: 璟临天下 <qjq793437528 AT 163.com>
  • To: k-user <k-user AT lists.cs.illinois.edu>
  • Subject: [[K-user] ] KOMPILE ERROR : String index out of range
  • Date: Mon, 24 Sep 2018 16:57:50 +0800 (CST)
  • Authentication-results: illinois.edu; spf=none smtp.mailfrom=qjq793437528 AT 163.com; dkim=pass header.d=163.com header.s=s110527; dmarc=none

I am trying to define something in K5. And i define the configuration which only has several cells as follow:
    <package-id> .Set </package-id>      
    <next-loc> 0 </next-loc>            
    <types> .Map </types>           
    <env> .Map </env>

How to fix this problem? thanks in advance.

The log is here: kompile with " --debug --backend java"
java.lang.StringIndexOutOfBoundsException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:598)
    at java.util.concurrent.ForkJoinTask.reportException(ForkJoinTask.java:677)
    at java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:735)
    at java.util.stream.ReduceOps$ReduceOp.evaluateParallel(ReduceOps.java:714)
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233)
    at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
    at org.kframework.kompile.ResolveConfig.apply(ResolveConfig.java:82)
    at org.kframework.definition.ModuleTransformer.$anonfun$apply$1(transformers.scala:72)
    at scala.collection.concurrent.TrieMap.getOrElseUpdate(TrieMap.scala:903)
    at org.kframework.definition.ModuleTransformer.apply(transformers.scala:67)
    at org.kframework.definition.ModuleTransformer.apply(transformers.scala:63)
    at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:234)
    at scala.collection.immutable.Set$Set4.foreach(Set.scala:206)
    at scala.collection.TraversableLike.map(TraversableLike.scala:234)
    at scala.collection.TraversableLike.map$(TraversableLike.scala:227)
    at scala.collection.AbstractSet.scala$collection$SetLike$$super$map(Set.scala:47)
    at scala.collection.SetLike.map(SetLike.scala:101)
    at scala.collection.SetLike.map$(SetLike.scala:101)
    at scala.collection.AbstractSet.map(Set.scala:47)
    at org.kframework.definition.ModuleTransformer.$anonfun$apply$1(transformers.scala:68)
    at scala.collection.concurrent.TrieMap.getOrElseUpdate(TrieMap.scala:903)
    at org.kframework.definition.ModuleTransformer.apply(transformers.scala:67)
    at org.kframework.definition.ModuleTransformer.apply(transformers.scala:63)
    at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:234)
    at scala.collection.immutable.HashSet$HashSet1.foreach(HashSet.scala:320)
    at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:976)
    at scala.collection.TraversableLike.map(TraversableLike.scala:234)
    at scala.collection.TraversableLike.map$(TraversableLike.scala:227)
    at scala.collection.AbstractSet.scala$collection$SetLike$$super$map(Set.scala:47)
    at scala.collection.SetLike.map(SetLike.scala:101)
    at scala.collection.SetLike.map$(SetLike.scala:101)
    at scala.collection.AbstractSet.map(Set.scala:47)
    at org.kframework.definition.ModuleTransformer.$anonfun$apply$1(transformers.scala:68)
    at scala.collection.concurrent.TrieMap.getOrElseUpdate(TrieMap.scala:903)
    at org.kframework.definition.ModuleTransformer.apply(transformers.scala:67)
    at org.kframework.definition.ModuleTransformer.apply(transformers.scala:63)
    at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:234)
    at scala.collection.immutable.Set$Set4.foreach(Set.scala:206)
    at scala.collection.TraversableLike.map(TraversableLike.scala:234)
    at scala.collection.TraversableLike.map$(TraversableLike.scala:227)
    at scala.collection.AbstractSet.scala$collection$SetLike$$super$map(Set.scala:47)
    at scala.collection.SetLike.map(SetLike.scala:101)
    at scala.collection.SetLike.map$(SetLike.scala:101)
    at scala.collection.AbstractSet.map(Set.scala:47)
    at org.kframework.definition.ModuleTransformer.$anonfun$apply$1(transformers.scala:68)
    at scala.collection.concurrent.TrieMap.getOrElseUpdate(TrieMap.scala:903)
    at org.kframework.definition.ModuleTransformer.apply(transformers.scala:67)
    at org.kframework.definition.ModuleTransformer.apply(transformers.scala:63)
    at org.kframework.definition.DefinitionTransformer.apply(transformers.scala:106)
    at org.kframework.kompile.DefinitionParsing.resolveConfigBubbles(DefinitionParsing.java:221)
    at org.kframework.kompile.DefinitionParsing.parseDefinitionAndResolveBubbles(DefinitionParsing.java:158)
    at org.kframework.kompile.Kompile.parseDefinition(Kompile.java:122)
    at org.kframework.kompile.Kompile.run(Kompile.java:106)
    at org.kframework.kompile.KompileFrontEnd.run(KompileFrontEnd.java:70)
    at org.kframework.main.FrontEnd.main(FrontEnd.java:52)
    at org.kframework.main.Main.runApplication(Main.java:114)
    at org.kframework.main.Main.runApplication(Main.java:104)
    at org.kframework.main.Main.main(Main.java:53)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 242
    at java.lang.String.substring(String.java:1963)
    at java.lang.String.subSequence(String.java:2003)
    at org.kframework.parser.concrete2kore.kernel.Rule$WrapLabelRule.apply(Rule.java:85)
    at org.kframework.parser.concrete2kore.kernel.Rule$KListRule.apply(Rule.java:58)
    at org.kframework.parser.concrete2kore.kernel.Parser$Function.lambda$addRule$1(Parser.java:547)
    at org.kframework.parser.concrete2kore.kernel.Parser$Function.addAux(Parser.java:496)
    at org.kframework.parser.concrete2kore.kernel.Parser$Function.addRule(Parser.java:547)
    at org.kframework.parser.concrete2kore.kernel.Parser.finishStateReturn(Parser.java:707)
    at org.kframework.parser.concrete2kore.kernel.Parser.workListStep(Parser.java:668)
    at org.kframework.parser.concrete2kore.kernel.Parser.parse(Parser.java:577)
    at org.kframework.parser.concrete2kore.ParseInModule.parseStringTerm(ParseInModule.java:161)
    at org.kframework.parser.concrete2kore.ParseInModule.parseString(ParseInModule.java:122)
    at org.kframework.kompile.DefinitionParsing.performParse(DefinitionParsing.java:366)
    at org.kframework.kompile.DefinitionParsing.parseBubble(DefinitionParsing.java:347)
    at org.kframework.kompile.ResolveConfig.lambda$apply$8(ResolveConfig.java:67)
    at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:267)
    at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
    at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
    at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
    at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
    at java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:747)
    at java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:721)
    at java.util.stream.AbstractTask.compute(AbstractTask.java:316)
    at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731)
    at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
    at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
    at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
    at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
java.lang.StringIndexOutOfBoundsException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:598)
    at java.util.concurrent.ForkJoinTask.reportException(ForkJoinTask.java:677)
    at java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:735)
    at java.util.stream.ReduceOps$ReduceOp.evaluateParallel(ReduceOps.java:714)
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233)
    at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
    at org.kframework.kompile.ResolveConfig.apply(ResolveConfig.java:82)
    at org.kframework.definition.ModuleTransformer.$anonfun$apply$1(transformers.scala:72)
    at scala.collection.concurrent.TrieMap.getOrElseUpdate(TrieMap.scala:903)
    at org.kframework.definition.ModuleTransformer.apply(transformers.scala:67)
    at org.kframework.definition.ModuleTransformer.apply(transformers.scala:63)
    at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:234)
    at scala.collection.immutable.Set$Set4.foreach(Set.scala:206)
    at scala.collection.TraversableLike.map(TraversableLike.scala:234)
    at scala.collection.TraversableLike.map$(TraversableLike.scala:227)
    at scala.collection.AbstractSet.scala$collection$SetLike$$super$map(Set.scala:47)
    at scala.collection.SetLike.map(SetLike.scala:101)
    at scala.collection.SetLike.map$(SetLike.scala:101)
    at scala.collection.AbstractSet.map(Set.scala:47)
    at org.kframework.definition.ModuleTransformer.$anonfun$apply$1(transformers.scala:68)
    at scala.collection.concurrent.TrieMap.getOrElseUpdate(TrieMap.scala:903)
    at org.kframework.definition.ModuleTransformer.apply(transformers.scala:67)
    at org.kframework.definition.ModuleTransformer.apply(transformers.scala:63)
    at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:234)
    at scala.collection.immutable.HashSet$HashSet1.foreach(HashSet.scala:320)
    at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:976)
    at scala.collection.TraversableLike.map(TraversableLike.scala:234)
    at scala.collection.TraversableLike.map$(TraversableLike.scala:227)
    at scala.collection.AbstractSet.scala$collection$SetLike$$super$map(Set.scala:47)
    at scala.collection.SetLike.map(SetLike.scala:101)
    at scala.collection.SetLike.map$(SetLike.scala:101)
    at scala.collection.AbstractSet.map(Set.scala:47)
    at org.kframework.definition.ModuleTransformer.$anonfun$apply$1(transformers.scala:68)
    at scala.collection.concurrent.TrieMap.getOrElseUpdate(TrieMap.scala:903)
    at org.kframework.definition.ModuleTransformer.apply(transformers.scala:67)
    at org.kframework.definition.ModuleTransformer.apply(transformers.scala:63)
    at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:234)
    at scala.collection.immutable.Set$Set4.foreach(Set.scala:206)
    at scala.collection.TraversableLike.map(TraversableLike.scala:234)
    at scala.collection.TraversableLike.map$(TraversableLike.scala:227)
    at scala.collection.AbstractSet.scala$collection$SetLike$$super$map(Set.scala:47)
    at scala.collection.SetLike.map(SetLike.scala:101)
    at scala.collection.SetLike.map$(SetLike.scala:101)
    at scala.collection.AbstractSet.map(Set.scala:47)
    at org.kframework.definition.ModuleTransformer.$anonfun$apply$1(transformers.scala:68)
    at scala.collection.concurrent.TrieMap.getOrElseUpdate(TrieMap.scala:903)
    at org.kframework.definition.ModuleTransformer.apply(transformers.scala:67)
    at org.kframework.definition.ModuleTransformer.apply(transformers.scala:63)
    at org.kframework.definition.DefinitionTransformer.apply(transformers.scala:106)
    at org.kframework.kompile.DefinitionParsing.resolveConfigBubbles(DefinitionParsing.java:221)
    at org.kframework.kompile.DefinitionParsing.parseDefinitionAndResolveBubbles(DefinitionParsing.java:158)
    at org.kframework.kompile.Kompile.parseDefinition(Kompile.java:122)
    at org.kframework.kompile.Kompile.run(Kompile.java:106)
    at org.kframework.kompile.KompileFrontEnd.run(KompileFrontEnd.java:70)
    at org.kframework.main.FrontEnd.main(FrontEnd.java:52)
    at org.kframework.main.Main.runApplication(Main.java:114)
    at org.kframework.main.Main.runApplication(Main.java:104)
    at org.kframework.main.Main.main(Main.java:53)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 242
    at java.lang.String.substring(String.java:1963)
    at java.lang.String.subSequence(String.java:2003)
    at org.kframework.parser.concrete2kore.kernel.Rule$WrapLabelRule.apply(Rule.java:85)
    at org.kframework.parser.concrete2kore.kernel.Rule$KListRule.apply(Rule.java:58)
    at org.kframework.parser.concrete2kore.kernel.Parser$Function.lambda$addRule$1(Parser.java:547)
    at org.kframework.parser.concrete2kore.kernel.Parser$Function.addAux(Parser.java:496)
    at org.kframework.parser.concrete2kore.kernel.Parser$Function.addRule(Parser.java:547)
    at org.kframework.parser.concrete2kore.kernel.Parser.finishStateReturn(Parser.java:707)
    at org.kframework.parser.concrete2kore.kernel.Parser.workListStep(Parser.java:668)
    at org.kframework.parser.concrete2kore.kernel.Parser.parse(Parser.java:577)
    at org.kframework.parser.concrete2kore.ParseInModule.parseStringTerm(ParseInModule.java:161)
    at org.kframework.parser.concrete2kore.ParseInModule.parseString(ParseInModule.java:122)
    at org.kframework.kompile.DefinitionParsing.performParse(DefinitionParsing.java:366)
    at org.kframework.kompile.DefinitionParsing.parseBubble(DefinitionParsing.java:347)
    at org.kframework.kompile.ResolveConfig.lambda$apply$8(ResolveConfig.java:67)
    at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:267)
    at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
    at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
    at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
    at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
    at java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:747)
    at java.util.stream.ReduceOps$ReduceTask.doLeaf(ReduceOps.java:721)
    at java.util.stream.AbstractTask.compute(AbstractTask.java:316)
    at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731)
    at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
    at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
    at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
    at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
[Error] Internal: Uncaught exception thrown of type
StringIndexOutOfBoundsException.
Please rerun your program with the --debug flag to generate a stack trace, and
file a bug report at https://github.com/kframework/k/issues (null)





 




Archive powered by MHonArc 2.6.19.

Top of Page