All errors that can occur during compilation of a Rascal program.
|
Description
in progress of being adpted to compiler
|
The following compile time (static) errors can occur in a Rascal program. They cannot be caught by the Rascal program:
-
AmbiguousFunctionReference: An ambiguous function name.
-
ArgumentMismatch: The called signature does not match any defined function.
-
Arity: The number of arguments of an operator differ from what is required.
-
DateTimeSyntax: A datetime value is syntactically incorrect.
-
IllegalQualifiedDeclaration: Qualified names cannot be declared.
-
InvalidDateTimeComparison: Attempt to compare a date with a time.
-
JavaCompilation: Compilation of generated Java code failed.
-
JavaMethodLink: Cannot link to a Java method.
-
MissingModifier: A modifier is missing in a declaration.
-
MissingReturn: A return statement is missing from a function body.
-
ModuleImport: A Rascal module could not be imported.
-
ModuleNameMismatch: Module name and file name are different.
-
NoKeywordParameters: A function that is declared without keyword parameters is called with keyword parameters.
-
NonAbstractJavaFunction: A function declared with the
javamodifier has a Rascal body. -
NonVoidTypeRequired: A type other than
voidis needed. -
NonWellformedType: A type in a declaration is not wellformed.
-
NotEnumerable: A value that cannot be enumerated is used in an enumerator.
-
PartiallyLabeledFields: In a tuple or relation all fields should have names or none at all.
-
RedeclaredField: A field name is redeclared.
-
RedeclaredType: A type with the same name has been declared before.
-
RedeclaredVariable: A variable with the same name has been declared in the same scope.
-
SyntaxError: Text in a module or entered via the command line violates the Rascal syntax.
-
UndeclaredAnnotation: An annotation is used that has not been declared.
-
UndeclaredField: A field name is used that has not been declared.
-
UndeclaredFunction: A function is called that has not been declared.
-
UndeclaredJavaMethod: Attempt to call a non-existing Java method.
-
UndeclaredKeywordParameter: A function is called with a keyword parameter that was not declared in the function’s declaration.
-
UndeclaredModule: Reference to a non-existing module.
-
UndeclaredModuleProvider: A scheme is used in a location for wich no provider has been registered.
-
UndeclaredNonTerminal: A syntax rule uses an undeclared non-terminal.
-
UndeclaredType: Use of a type that has not been declared.
-
UndeclaredVariable: Use of a variable that has not been declared.
-
UnexpectedKeywordArgumentType: The actual value of a keyword argument is not compatible with its declared type.
-
UnexpectedType: A value of a different type was expected.
-
UnguardedAppend: Append statement occurs outside a for/while statement.
-
UnguardedFail: Use of
failstatement outside a condtional context. -
UnguardedInsert: An
insertoccurs outside avisitexpression. -
UnguardedIt: The special variable
itoccurs outside a reducer expression. -
UnguardedReturn: A return statement occurs outside a function body.
-
UninitializedPatternMatch: Pattern matching has not been properly initialized.
-
UnitializedVariable: Use of a variable that has not been initialized.
-
UnsupportedOperation: Attempt to apply a operation to a value for which the operation is not defined.
-
UnsupportedPattern: A pattern is used that is not supported.
-
UnsupportedSubscript: A subscript is applied to a value that does not support it.
-
UnsupportedSubscriptArity: Wrong number of subscripts is used.
1. AmbiguousFunctionReference
An ambiguous function name
Warning: How to generate this error?
rascal>data D = d(int x);
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@66cf2387
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:675)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@66cf2387
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@66cf2387
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>data D2 = d(str x);
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@692ef762
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:675)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@692ef762
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@692ef762
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>d(3).x
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@68161abf
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalExpression(CommandExecutor.java:453)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:438)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@68161abf
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@68161abf
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>d("a").x
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@6aaa0ef7
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalExpression(CommandExecutor.java:453)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:438)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@6aaa0ef7
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@6aaa0ef7
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
2. ArgumentMismatch
The called signature does not match any defined function.
A function has a name and a signature (the names and types of its arguments). This error is reported when a call of a function cannot be associated with a function declaration.
Remedies:
-
Modify the call so that the arguments match the function declaration.
-
Write a new definition for a function with the same name, that matches the argument types in the call.
Define a function triple that multiplies its argument by 3:
rascal>int triple(int x) = 3 * x;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@27706c24
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:696)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@27706c24
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@27706c24
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
It works fine:
rascal>triple(5)
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@5bba27b5
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalExpression(CommandExecutor.java:453)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:438)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@5bba27b5
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@5bba27b5
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
Unless it is called with an argument of a wrong type:
rascal>triple([1,2,3])
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@3ba7992c
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalExpression(CommandExecutor.java:453)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:438)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@3ba7992c
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@3ba7992c
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
We can define a new version of triple function that accepts lists:
rascal>list[int] triple(list[int] L) = [3 * x | x <- L];
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@5c8d23ae
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:696)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@5c8d23ae
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@5c8d23ae
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>triple([1,2,3]);
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@1a2fe975
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:520)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@1a2fe975
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@1a2fe975
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
3. Arity
The number of arguments of an operator differ from what is required.
Various operators like composition, transitive closure and reflexive transitive closure expect binary relations or tuples as arguments.
This composition is correct:
rascal>{<1,10>, <2,20>} o {<10,100>, <20, 200>};
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@7d08017a
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:520)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@7d08017a
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@7d08017a
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
This is not, since the first argument has arity 3:
rascal>{<1,5,10>, <2,6,20>} o {<10,100>, <20, 200>};
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@5c4c0af8
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:520)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@5c4c0af8
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@5c4c0af8
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
These transitive closures are correct:
rascal>{<1,2>, <2,3>,<4,5>}+
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@c94568c
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalExpression(CommandExecutor.java:453)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:438)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@c94568c
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@c94568c
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>{<1,2>, <2,3>,<4,5>}*
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@695df8ee
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalExpression(CommandExecutor.java:453)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:438)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@695df8ee
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@695df8ee
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
But these are incorrect:
rascal>{<1,2,3>, <2,3,4>,<4,5,6>}+
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@7cbad199
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalExpression(CommandExecutor.java:453)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:438)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@7cbad199
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@7cbad199
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>{<1,2,3>, <2,3,4>,<4,5,6>}*
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@3051e5ce
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalExpression(CommandExecutor.java:453)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:438)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@3051e5ce
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@3051e5ce
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
4. DateTimeSyntax
A datetime value is syntactically incorrect.
datetime values have a rather complex format as described in datetime.
Some errors in the format are treated as syntax errors, others generate the DateTimeSyntax error.
Remedy: Fix the datetime value.
A correct datetime value:
rascal>$2013-07-15T09:15:23.123+03:00$;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@1cd99bd2
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:520)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@1cd99bd2
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@1cd99bd2
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
Certain errors, like a wrong day number (here: 40) lead to a parse error:
rascal>$2013-07-40T09:15:23.123+03:00$;
Parse error
Others, like a wrong month number (here: 15) lead to a DateTimeSyntax error:
rascal>$2010-15-15T09:15:23.123+03:00$;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@39f96781
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:520)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@39f96781
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@39f96781
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
5. IllegalQualifiedDeclaration
Qualified names cannot be declared.
When the same name is declared in different modules, a qualified name can be used to refer to a specific version of that name. This error is generated when a qualified name is used in a declaration.
Remedy: remove the qualification.
Using a qualified name gives an error:
rascal>data M::D = d();
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@56676edd
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:675)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@56676edd
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@56676edd
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
Without the qualification, this is correct:
rascal>data D = d();
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@5cd11a60
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:675)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@5cd11a60
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@5cd11a60
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
6. InvalidDateTimeComparison
Attempt to compare a date with a time.
datetime values may contain two components: date and time. Datetime values that contain both a date and a time can be compared. Dates can also be compared with dates, and times with times. This error is generated when a date is compared with a time.
Comparing dates with dates:
rascal>$2013-07-15$ < $2014-07-15$
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@14cc7e3b
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalExpression(CommandExecutor.java:453)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:438)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@14cc7e3b
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@14cc7e3b
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
Or times with times:
rascal>$T20:03:56.901+01:00$ < $T22:00:56.901+01:00$
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@7ece6088
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalExpression(CommandExecutor.java:453)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:438)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@7ece6088
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@7ece6088
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
Or datetimes with datetimes:
rascal>$2013-01-11T23:03:56.901+01:00$ < $2013-01-11T23:05:00.901+01:00$
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@412d1e21
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalExpression(CommandExecutor.java:453)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:438)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@412d1e21
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@412d1e21
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
But mixing dates and times gives errors:
rascal>$2013-07-15$ < $T20:03:56.901+01:00$
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@14db4bef
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalExpression(CommandExecutor.java:453)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:438)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@14db4bef
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@14db4bef
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
7. JavaCompilation
Compilation of generated Java code failed.
Some parts of the Rascal system generate Java code. Most notable is the parser generator. This error message is generated when the compilation of generated Java code fails.
Remedy: Contact the Rascal developers:
-
Ask a question at [Rascal Ask site](http://ask.rascal-mpl.org/questions/).
-
Read the currently open issues at the Rascal’s [issue tracker](https://github.com/cwi-swat/rascal/issues?state=open). If your problem has not yet been reported by someone else, please report it here.
8. JavaMethodLink
Cannot link to a Java method.
Rascal functions can be implemented in Java. This is the case for many functions in the standard library. This requires these elements:
-
An abstract Rascal function declaration (= a function header without a body).
-
The keyword
javashould be part of the function header. -
The function declaration is annotated (uing
javaClass) with the name of the Java class that implements this function.
This error is generated when the Java implementation cannot be found. Most likely, this is a missing or misspelled Java class name. It is also generated when the function declaration does have a body.
Remedy: Contact the Rascal developers:
-
Ask a question at [Rascal Ask site](http://ask.rascal-mpl.org/questions/).
-
Read the currently open issues at the Rascal’s [issue tracker](https://github.com/cwi-swat/rascal/issues?state=open). If your problem has not yet been reported by someone else, please report it here.
If you are an expert developer and have implemented your own extension in Java, please check your own extension code first.
This is how the size function on lists is declared in the Rascal library:
rascal>@javaClass{org.rascalmpl.library.Prelude}
>>>>>>>public java int size(list[&T] lst);
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@66778a1a
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:696)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@66778a1a
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@66778a1a
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
Misspelling the class name will generate the JavaMethodLink error:
rascal>@javaClass{org.rascalmpl.library.Preludexxx}
>>>>>>>public java int size(list[&T] lst);
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@6f0b78cc
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:696)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@6f0b78cc
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@6f0b78cc
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
The same error message is generated if the function declaration contains a body:
rascal>@javaClass{org.rascalmpl.library.Preludexxx}
>>>>>>>public java int size(list[&T] lst){
>>>>>>> return 0;
>>>>>>>}
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@216585ec
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:696)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@216585ec
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@216585ec
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
9. MissingModifier
A modifier is missing in a declaration.
Rascal functions can be implemented in Java. This is the case for many functions in the standard library. This requires these elements:
-
An abstract Rascal function declaration (= a function header without a body).
-
The keyword
javashould be part of the function header. -
The function declaration is annotated (uing
javaClass) with the name of the Java class that implements this function.
This error is generated when the java keyword is missing.
Remedy: Contact the Rascal developers:
-
Ask a question at [Rascal Ask site](http://ask.rascal-mpl.org/questions/).
-
Read the currently open issues at the Rascal’s [issue tracker](https://github.com/cwi-swat/rascal/issues?state=open). If your problem has not yet been reported by someone else, please report it here.
If you are an expert developer and have implemented your own extension in Java, please check your own extension code first.
This is how the size function on lists is declared in the Rascal library:
rascal>@javaClass{org.rascalmpl.library.Prelude}
>>>>>>>public java int size(list[&T] lst);
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@2f3cd4c0
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:696)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@2f3cd4c0
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@2f3cd4c0
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
This is what happens if the java keyword is missing:
rascal>@javaClass{org.rascalmpl.library.Prelude}
>>>>>>>public int size(list[&T] lst);
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@706013a
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:696)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@706013a
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@706013a
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
10. MissingReturn
A return statement is missing from a function body.
Functions return some value (except functions that have return type void).
This error is generated when a function body does not return a value.
Remedies:
-
Add a [Rascal:Return] statement to the function body.
-
Rewrite the function so that the function body becomes a single expression and you can use the abbreviated function format, see [$Rascal:Declarations/Function].
Here is an incorrect definition of function triple:
rascal>int triple(int x) {
>>>>>>> x * 3;
>>>>>>>}
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@69eee619
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:696)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@69eee619
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@69eee619
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>triple(5)
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@23b6ce37
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalExpression(CommandExecutor.java:453)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:438)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@23b6ce37
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@23b6ce37
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
It should look like this:
rascal>int triple(int x) {
>>>>>>> return x * 3;
>>>>>>>}
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@1fc0624a
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:696)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@1fc0624a
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@1fc0624a
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>triple(5)
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@5428517e
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalExpression(CommandExecutor.java:453)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:438)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@5428517e
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@5428517e
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
This is another solution using the abbreviated function format:
rascal>int triple(int x) = x * 3;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@2fbd0afb
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:696)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@2fbd0afb
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@2fbd0afb
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>triple(5)
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@53b5b5cc
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalExpression(CommandExecutor.java:453)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:438)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@53b5b5cc
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@53b5b5cc
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
11. ModuleImport
A Rascal module could not be imported.
Rascal programs are split up in modules. An import statement is used to include one module in another. This error indicates that a module import failed. This can be caused by
-
A misspelled name in the import statement.
-
Starting a Rascal console from the wrong directory.
Remedies:
-
Correct the mispelled name.
-
In Eclipse the safest way to execute a Rascal module is to select it in the Package Explorer, right click on it and then select
Run as Rascal Application. -
At the command line, change directory to where the toplevel module of your program is located and then execute the Rascal Shell.
Here is a correct import of the library module List:
rascal>import List;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@30765301
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalImport(CommandExecutor.java:720)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:444)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@30765301
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@30765301
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
Here is the effect of a misspelled module name (assuming that you do not have a module Lis):
rascal>import Lis;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@45083c58
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalImport(CommandExecutor.java:720)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:444)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@45083c58
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@45083c58
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
12. ModuleNameMismatch
Module name and file name are different.
A Rascal module has a name (the name that follows the module keyword) and it is stored in a file.
The (enforced) convention is that the name of the module (say MyModule) and the name of the file should be the same
(except fo the Rascal extension .rsc). Module MyModule should be stored in the file MyModule.rsc.
This error signals that this convention is violated.
Remedies:
-
Rename the module.
-
Rename the file.
13. NoKeywordParameters
A function that is declared without keyword parameters is called with keyword parameters.
Functions maybe declared with or without keyword parameters. This error is generated when a function has been declared without keyword parameters but is called with a keyword parameter.
Remedies:
-
Replace the keyword parameter in the call by a positional parameter.
-
Add a keyword parameter to the function declaration.
rascal>int incr(int x) = x + 1;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@368b6f0
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:696)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@368b6f0
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@368b6f0
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>incr(3, delta=5);
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@6e89b62e
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:520)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@6e89b62e
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@6e89b62e
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
Here is one solution:
rascal>int incr(int x, int delta=1) = x + delta;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@641fb31
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:696)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@641fb31
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@641fb31
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>incr(3, delta=5);
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@30c160f7
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:520)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@30c160f7
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@30c160f7
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
14. NonAbstractJavaFunction
A function declared with the java modifier has a Rascal body.
Rascal functions can be implemented in Java. This is the case for many functions in the standard library. This requires these elements:
-
An abstract Rascal function declaration (= a function header without a body).
-
The keyword
javashould be part of the function header. -
The function declaration is annotated (uing
javaClass) with the name of the Java class that implements this function.
This error is generated when the function does have a body.
Remedies:
-
Remove the
javakeyword. -
If this happens to a library function, contact the Rascal developers:
-
Ask a question at [Rascal Ask site](http://ask.rascal-mpl.org/questions/).
-
Read the currently open issues at the Rascal’s [issue tracker](https://github.com/cwi-swat/rascal/issues?state=open). If your problem has not yet been reported by someone else, please report it here.
-
If you are an expert developer, please check the body of the offending function first.
rascal>java int incr(int x) {}
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@32c3a03c
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:696)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@32c3a03c
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@32c3a03c
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
15. NonVoidTypeRequired
A type other than void is needed.
This error is generated when a non-void value is needed, but only void is provided. The most prominent examples are splicing for list, set, and map.
Remedy: replace the expression that computes void by an expression that computes a non-void value.
First define a dummy function that returns void:
rascal>void dummy() { return; }
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@4a9e1f84
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:696)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@4a9e1f84
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@4a9e1f84
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>[1, *dummy(), 2]
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@28bae37a
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalExpression(CommandExecutor.java:453)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:438)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@28bae37a
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@28bae37a
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>{1, *dummy(), 2}
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@522bee47
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalExpression(CommandExecutor.java:453)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:438)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@522bee47
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@522bee47
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
A solution could be:
rascal>int dummy() { return 17; }
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@bcacb72
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:696)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@bcacb72
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@bcacb72
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>[1, *dummy(), 2]
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@1efbfabc
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalExpression(CommandExecutor.java:453)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:438)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@1efbfabc
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@1efbfabc
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>{1, *dummy(), 2}
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@117820be
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalExpression(CommandExecutor.java:453)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:438)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@117820be
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@117820be
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
16. NonWellformedType
A type in a declaration is not wellformed.
Types should respect some structural rules and this error signals a violation of these rules. Examples of violations are:
-
a non-parametric type has parameters.
-
a parametric type has an incorrect number of parameters.
Remedy: correct the type.
rascal>bool[int] x;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@5e9f778b
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:655)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@5e9f778b
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@5e9f778b
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>list[int,str] l;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@6bc7f8c9
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:655)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@6bc7f8c9
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@6bc7f8c9
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>map[str, int, int] m;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@417a770f
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:655)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@417a770f
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@417a770f
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>set[int,str] s;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@394a0251
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:655)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@394a0251
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@394a0251
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
17. NotEnumerable
A value that cannot be enumerated is used in an enumerator.
An enumerator like int n ← V is used in
comprehensions to enumerate the values in V.
This error is produced when V is a value that does not support enumeration.
This is typically the case for atomic values like numbers, Booleans and Strings,
Remedy: modify the expression in the enumerator to return a value that supports enumeration.
rascal>int x <- 17
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@251a6380
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalExpression(CommandExecutor.java:453)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:438)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@251a6380
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@251a6380
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>b <- true
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@2f130e29
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalExpression(CommandExecutor.java:453)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:438)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@2f130e29
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@2f130e29
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
18. PartiallyLabeledFields
In a tuple or relation all fields should have names or none at all.
The fields in tuples and relations can optionally be labelled with a name. There are only two legal situations:
-
All fields have a label.
-
No field has a label.
This error signals the case that thei fields are partially labelled.
rascal>tuple[int n, str] T;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@760ce5a7
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:655)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@760ce5a7
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@760ce5a7
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>rel[str name, int] R;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@206d1de5
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:655)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@206d1de5
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@206d1de5
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
19. RedeclaredField
A field name is redeclared.
The definition of an algebraic data type consists of a number of constructor functions. Each constructor has named fields but the same field name may only be used in different constructors if it has the same type in all occurrences in the declaration.
Remedy: rename one of the fields in the declaration.
This is correct since all occurrences of key have type int:
rascal>data D = d1(int key) | d2(str name, int key);
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@7479adc
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:675)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@7479adc
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@7479adc
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
This is incorrect since key is used as int and as str.
rascal>data D = d1(int key) | d2(str key);
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@53990064
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:675)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@53990064
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@53990064
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
This can be corrected by choosing other names for the labels:
rascal>data D = d1(int intKey) | d2(str strKey);
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@5aea17ff
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:675)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@5aea17ff
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@5aea17ff
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
A tuple declaration with a duplicate field name also gives an error:
rascal>tuple[int x, str x] Q = <3,"abc">;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@26fffa25
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:641)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@26fffa25
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@26fffa25
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
20. RedeclaredType
A type with the same name has been declared before.
Some declarations introduce new type names. Most important are an algebraic data type and alias. This error signals that the same type name is used for incompatible purposes.
Remedy: rename one of the type names.
rascal>data D = d(int x);
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@6f24929a
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:675)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@6f24929a
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@6f24929a
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>alias D = str;
Error: Not supported construct: alias D = str;
rascal>alias D = int;
Error: Not supported construct: alias D = int;
rascal>alias D = str;
Error: Not supported construct: alias D = str;
21. RedeclaredVariable
A variable with the same name has been declared in the same scope.
Remedy: rename one of the variables.
rascal>int n = 3;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@7476be1b
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:641)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@7476be1b
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@7476be1b
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>int n = 4;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@48547a89
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:641)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@48547a89
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@48547a89
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
22. SyntaxError
Text in a module or entered via the command line violates the Rascal syntax.
This error is generated when a text is expected to be Rascal but does not comply with the Rascal syntax.
Remedy: Correct your text and check for the following:
-
All parentheses are balanced:
(…),[…],{…},<…>,/…/. -
All multi-line comments are balanced:
/…/. -
All semi-colons are present.
-
All tests in
if,for,whilestatement are surrounded by(…).
When you are completely desparate and cannot find the syntax error, the following binary search strategy may help:
-
Surround all text in the module (except the module header) with
/and/. Now your module should parse. If not the syntax error is in the module header. -
Move the upper comment symbol
/*to the middle of the file. Now there are two possibilities:-
The module parses. The top part is correct and the syntax error is in the bottom part. Move the
/*marker to the middle of the bottom part and repeat. -
The module does not parse. The syntax error is in the top part. Move the
/*marker to the middle of the top part and repeat.
-
23. UndeclaredAnnotation
An annotation is used that has not been declared.
An annotation can be used to add information to an instance of an algebraic data type. An annotation has to declared beforehand. This error is generated when an undeclared annotation is used.
Remedies:
-
Declare the annotation.
-
Use an already declared annotation.
This is correct:
rascal>data Fruit = apple(int n) | orange(int n);
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@36665ce
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:675)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@36665ce
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@36665ce
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>anno str Fruit @ quality;
Error: Not supported construct: anno str Fruit @ quality;
rascal>piece = orange(13);
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@126774e5
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:540)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@126774e5
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@126774e5
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>piece @ quality = "great";
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@32a86639
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:553)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@32a86639
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@32a86639
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
But using a wrong annotation name generates an error:
rascal>piece @ qual;
Parse error
24. UndeclaredField
A field name is used that has not been declared.
Fields of tuple (hence also of relation and listrelation) and constructors of algebraic data types may have names. This error is generated when a reference is made to an undeclared field.
Remedies:
-
Fix the field name in the reference.
-
Declare a new field as used in the reference.
Use of the undeclared field gender:
rascal>tuple[str name, int age] Jo = <"Jo", 33>;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@59c38610
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:641)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@59c38610
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@59c38610
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>Jo.gender;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@309c545f
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:520)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@309c545f
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@309c545f
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
A similar example now expressed as ADT:
rascal>data Person = person(str name, int age);
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@669187d4
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:675)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@669187d4
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@669187d4
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>jo = person("Jo", 33);
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@7b8a4e84
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:540)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@7b8a4e84
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@7b8a4e84
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>jo.gender;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@7461d40f
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:520)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@7461d40f
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@7461d40f
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
25. UndeclaredFunction
A function is called that has not been declared.
All functions, constructors and variables have to be declared before they can be used. This error is generated when this rule is violated.
Remedies for functions:
-
Declare the function.
-
Declare the function as constructor of an (existing or new) [Rascal:AlgebraicDataType].
-
Import a module that declares the function (Did you import all necessary library modules?)
Remedies for variables:
-
Declare the variable.
Calling the undeclared function triple gives an error:
rascal>triple(5)
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@46ed6286
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalExpression(CommandExecutor.java:453)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:438)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@46ed6286
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@46ed6286
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
We can remedy this by declaring the function:
rascal>int triple(int n) = 3 * n;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@7f12c19e
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:696)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@7f12c19e
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@7f12c19e
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>triple(5)
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@2523460e
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalExpression(CommandExecutor.java:453)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:438)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@2523460e
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@2523460e
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
Calling the library function size gives an error if the proper library (in this case: List) is not imported
rascal>size([20, 1, 77]);
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@52303a6d
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:520)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@52303a6d
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@52303a6d
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
The solution is:
rascal>import List;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@378d014d
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalImport(CommandExecutor.java:720)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:444)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@378d014d
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@378d014d
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>size([20, 1, 77]);
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@489768ff
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:520)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@489768ff
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@489768ff
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
Another solution is to import the complete Rascal library at once:
rascal>import Prelude;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@479ad898
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalImport(CommandExecutor.java:720)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:444)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@479ad898
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@479ad898
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>size([20, 1, 77]);
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@3eea0157
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:520)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@3eea0157
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@3eea0157
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
Using an undeclared variable gives an error:
rascal>n + 1;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@ca9eeb2
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:520)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@ca9eeb2
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@ca9eeb2
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
A variable is introduced by just assigning to it (with or without its expected type):
rascal>n = 3;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@27dbc5b3
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:540)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@27dbc5b3
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@27dbc5b3
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>n + 1;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@2fba2f34
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:520)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@2fba2f34
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@2fba2f34
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
Or equivalenty (with an expected type):
rascal>int n = 3;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@27644ba
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:641)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@27644ba
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@27644ba
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>n + 1;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@7230080
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:520)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@7230080
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@7230080
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
26. UndeclaredJavaMethod
Attempt to call a non-existing Java method.
Rascal functions can be implemented in Java. This is the case for many functions in the standard library. This requires these elements:
-
An abstract Rascal function declaration (= a function header without a body).
-
The keyword
javashould be part of the function header. -
The function declaration is annotated (uing
javaClass) with the name of the Java class that implements this function.
This error is generated when a method with the same name as the Rascal function cannot be found in the mentioned Java class. Most likely, this is a missing or misspelled function/method name.
Remedy: Contact the Rascal developers:
-
Ask a question at [Rascal Ask site](http://ask.rascal-mpl.org/questions/).
-
Read the currently open issues at the Rascal’s [issue tracker](https://github.com/cwi-swat/rascal/issues?state=open). If your problem has not yet been reported by someone else, please report it here.
If you are an expert developer and have implemented your own extension in Java, please check your own extension code first.
This is how the size function on lists is declared in the Rascal library:
rascal>@javaClass{org.rascalmpl.library.Prelude}
>>>>>>>public java int size(list[&T] lst);
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@8a477d3
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:696)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@8a477d3
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@8a477d3
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
This is the result of misspelling the function name (siz instead of size):
rascal>@javaClass{org.rascalmpl.library.Prelude}
>>>>>>>public java int siz(list[&T] lst);
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@4f354367
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:696)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@4f354367
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@4f354367
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
27. UndeclaredKeywordParameter
A function is called with a keyword parameter that was not declared in the function’s declaration.
Rascal functions may have keyword parameters. This error is generated when a function call uses an undeclared keyword parameter.
Remedies:
-
Rename the keyword parameter in the call.
-
Add a new keyword parameter to the function.
rascal>int incr(int n, int delta=1) = n + delta;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@43185851
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:696)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@43185851
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@43185851
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
Calling incr with a wrong keyword parameter gives an error:
rascal>incr(3, diff=5);
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@423bb27c
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:520)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@423bb27c
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@423bb27c
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
This can be fixed by using the correct name for the keyword parameter:
rascal>incr(3, delta=5);
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@a7dcb02
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:520)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@a7dcb02
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@a7dcb02
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
28. UndeclaredModule
Reference to a non-existing module.
This can, for example, occur in a qualified name.
Remedies:
-
Check that the offending module name is spelled correctly.
-
Create a module of that name.
Referring to the non-existing module M gives errors:
rascal>M::x = 3;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@4df58796
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:540)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@4df58796
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@4df58796
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>M::f(3);
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@77f7e13c
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:520)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@77f7e13c
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@77f7e13c
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
29. UndeclaredModuleProvider
A scheme is used in a location for wich no provider has been registered.
Locations provide very flexible ways to access files and external data sources.
There any many protocols (called schemes) that can be used (e.g., file, http, home and many others).
This error is generated when an unknown scheme is used.
Remedy: Use an existing scheme.
Misspelling the scheme for Rascal’s standard library (which is std) gives an error when the location is used:
rascal>import IO;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@2ed6e062
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalImport(CommandExecutor.java:720)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:444)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@2ed6e062
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@2ed6e062
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>readFileLines(|standard:///demo/basic/Hello.rsc|);
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@29cc4fe6
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:520)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@29cc4fe6
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@29cc4fe6
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
This is fixed by using the proper scheme name:
rascal>readFileLines(|std:///demo/basic/Hello.rsc|);
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@47f5da7d
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:520)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@47f5da7d
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@47f5da7d
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
30. UndeclaredNonTerminal
A syntax rule uses an undeclared non-terminal.
All non-terminals that occur in a syntax definition should be declared in some rule. This error is generated when this is not the case.
Remedy: declare the offending non-terminal.
Here is an example where the non-terminal Y is not declared:
rascal>import ParseTree;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@15a65922
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalImport(CommandExecutor.java:720)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:444)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@15a65922
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@15a65922
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>syntax X = "a" Y;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@7b76d206
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalImport(CommandExecutor.java:738)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:444)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@7b76d206
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@7b76d206
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>parse(#X, "ab");
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@3bb89873
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:520)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@3bb89873
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@3bb89873
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
The source location of the non-terminal is not yet available, so the error message mentions the module in which this occurs.
31. UndeclaredType
Use of a type that has not been declared.
A type has to be declared before it can be used. This error is generated when an undeclared type is used.
Remedies:
-
Rename the type name.
-
Declare the type.
-
Import a module that declares the type. (Did you import all library modules?)
Using the undeclared type myint gives an error:
rascal>myint incr(myint n) = n + 1;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@5e6bb4e7
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:696)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@5e6bb4e7
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@5e6bb4e7
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
The solkution is to first declares myint (here as an alias for int):
rascal>alias myint = int;
Error: Not supported construct: alias myint = int;
rascal>myint incr(myint n) = n + 1;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@511cc3d4
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:696)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@511cc3d4
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@511cc3d4
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>incr(3);
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@114a1945
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:520)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@114a1945
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@114a1945
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
32. UndeclaredVariable
Use of a variable that has not been declared.
A variable can only be used when it has been declared and initialized. This error is generated when this is not the case.
Remedy:
-
Rename the offending variable name into the name of an existing variable.
-
Introduce a new variable.
Here is an example where an undeclared variables occurs in list splicing:
rascal>[1, *x, 3]
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@31e1dd38
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalExpression(CommandExecutor.java:453)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:438)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@31e1dd38
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@31e1dd38
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
The remedy is here:
rascal>x = 5;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@37c1924b
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:540)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@37c1924b
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@37c1924b
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>[1, *x, 3]
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@2e1ed1c9
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalExpression(CommandExecutor.java:453)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:438)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@2e1ed1c9
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@2e1ed1c9
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
33. UnexpectedKeywordArgumentType
The actual value of a keyword argument is not compatible with its declared type.
Functions may be declared to have keyword parameters. Each keyword parameters has a type, a name and a default value. This error is generated when the declared type and the actual type of the keyword parameter are not compatible.
Remedies:
-
Change the type of the keyword parameter in the call.
-
Change the type of the keyword parameter in the function declaration.
Declare incr function with keyword parameter delta of type int:
rascal>int incr(int x, int delta = 1) = n + delta;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@252eebde
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:696)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@252eebde
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@252eebde
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
Erroneous use of delta with a string value:
rascal>incr(3, delta="more");
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@16402cba
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:520)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@16402cba
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@16402cba
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
34. UnexpectedType
A value of a different type was expected.
This error signals an incompatibility between expected type and actual type. Some of the situations in which this may occur are assert, variable, solve.
Remedy: adjust the actual type to the expected type.
Declaring variable n as int and assigning it a str value gives an error:
rascal>int n = "abc";
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@171d9526
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:641)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@171d9526
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@171d9526
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
The solution is to assign an int value to n:
rascal>int n = 123;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@58c9c425
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:641)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@58c9c425
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@58c9c425
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
An assert statement expects an argument of type bool:
rascal>assert 3;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@10169be2
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:622)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@10169be2
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@10169be2
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
35. UnguardedAppend
Append statement occurs outside a for/while statement.
The append statement can be used inside a loop statement. This error is generated when append occurs outside a loop.
Remedy: use List concatenation to append an element to a list outside a loop.
This is the typical use of append:
rascal>for(int i <- [1..5]) append i*i;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@5e58bf6
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:622)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@5e58bf6
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@5e58bf6
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
Using append outside a loop gives an error:
rascal>append 3;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@1115a75
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:622)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@1115a75
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@1115a75
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
36. UnguardedFail
Use of fail statement outside a condtional context.
A fail statement is only allowed inside conditional statements.
This error is generated when fail is used outside a conditional context.
Remedies:
-
Surround the
failstatement by a conditional conditional statement. -
Replace the
failstatement by a [Rascal:Throw] statement. -
replace the
failstatement by a [Rascal:Return] statement.
Here is a correct (albeit not very useful) use of fail where the pattern match int N := 35 acts as guard:
rascal>if(int N := 35){ if(N > 10) fail; }
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@305e4242
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:622)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@305e4242
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@305e4242
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
Any condition (non only one using pattern matching) can act as guard:
rascal>if(true) { fail; }
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@1851cc27
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:622)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@1851cc27
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@1851cc27
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
An error occurs when fail is used outside a conditional context:
rascal>fail;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@61f6bf8a
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:622)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@61f6bf8a
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@61f6bf8a
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
37. UnguardedInsert
An insert occurs outside a visit expression.
An insert statement may only occur in the action part of a pattern with action, more precisely in a case in a visit expression.
Remedies:
-
Use an auxiliary variable and list or set operations to insert the value where you want.
-
Place the insert statement inside a visit.
Here is an example of the use of insert to swap the arguments of red nodes:
Our favorite data type, colored trees:
rascal>data CTree = leaf(int n) | red(CTree left, CTree right) | green(CTree left, CTree right);
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@53ec65c4
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:675)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@53ec65c4
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@53ec65c4
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
An example tree:
rascal>CTree T = red(green(leaf(1), red(leaf(2), leaf(3))), red(leaf(4), leaf(5)));
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@3c9ab304
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:641)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@3c9ab304
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@3c9ab304
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
A visit to swap the arguments of red nodes:
rascal>visit(T){ case red(CTree l, CTree r): insert red(r,l); }
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@cf43243
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalExpression(CommandExecutor.java:453)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:438)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@cf43243
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@cf43243
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
An error occurs when insert is used outside a visit:
rascal>insert red(leaf(1), leaf(2));
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@48a54e25
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:622)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@48a54e25
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@48a54e25
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
38. UnguardedIt
The special variable it occurs outside a reducer expression.
A reducer is used to reduce all elements in a collection to a sngle value.
The special variable it represents the currently reduced value and can be modified inside the reducer.
This error is generated when it i used otuside the a reducer.
Remedies:
-
You have accidentially used a variable with the name
it; rename your variable to something else. -
Place the expression that contains
itin a reducer expression.
This is correct way to add all elements in a list:
rascal>(0 | it + n | int n <- [1,5,9] )
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@5ab159b0
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalExpression(CommandExecutor.java:453)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:438)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@5ab159b0
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@5ab159b0
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
Using it outside a reducer gives an error:
rascal>it + 3
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@4f700775
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalExpression(CommandExecutor.java:453)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:438)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@4f700775
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@4f700775
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
39. UnguardedReturn
A return statement occurs outside a function body.
A return statement is used to return a value from a function. It is an error to use it outside a function body.
rascal>int triple(int n) { return 3 * n; }
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@f02a76
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:696)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@f02a76
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@f02a76
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>triple(5);
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@69268a38
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:520)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@69268a38
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@69268a38
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
Using return outside a function body gives an error:
rascal>return 3;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@279d6b50
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:622)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@279d6b50
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@279d6b50
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
40. UninitializedPatternMatch
Pattern matching has not been properly initialized.
Pattern matching requires two ingredients:
-
One of the many patterns.
-
A non-void subject value to which the pattern is applied.
This error is generated when the subject is void.
Remedy: replace the subject by a non-void value.
here is a (contrived) example that produces this error:
rascal>void dummy() { return; }
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@3094b171
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalDeclaration(CommandExecutor.java:696)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:447)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@3094b171
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@3094b171
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>int n := dummy();
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@7c82973c
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:520)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@7c82973c
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@7c82973c
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
41. UnitializedVariable
Use of a variable that has not been initialized.
A variable has to be initialized before it can be used. This error is generated when an uninitialzed variable is used.
Remedy: assign a value to the variable before its use:
Using the uninitialized variable x gives an error:
rascal>x + 5;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@2bdf649c
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:520)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@2bdf649c
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@2bdf649c
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
This can be avoided by first initializing x:
rascal>x = 3;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@351f7831
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:540)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@351f7831
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@351f7831
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>x + 5;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@792acef2
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:520)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@792acef2
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@792acef2
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
42. UnsupportedOperation
Attempt to apply a operation to a value for which the operation is not defined.
This error is generated when an unsupported operation is applied to (a combination of) values. There can be many causes for this as illustrated below.
Remedies:
-
Change the operation to another operations that is supported on the given values.
-
Change the values so that the operation can be applied to them.
-
Rewrite the expression compleye to get the effect you intended.
rascal>L = [1,2,3];
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@5cd8745a
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:540)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@5cd8745a
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@5cd8745a
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
Division is not supported on lists:
rascal>[1, 2, 3] / 4;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@5d2361e0
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:520)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@5d2361e0
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@5d2361e0
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
Combined multiplication and assignment is not supported either:
rascal>L *= 3;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@4e89af48
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:540)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@4e89af48
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@4e89af48
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
Taking the time from a date-only value is not supported:
rascal>$2010-07-15$.justTime;
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@35a9217b
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:520)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@35a9217b
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@35a9217b
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
Calling an integer as a function is not supported:
rascal>17(3, "abc");
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@733ed0ce
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:520)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@733ed0ce
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@733ed0ce
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
43. UnsupportedPattern
A pattern is used that is not supported.
This is a case where the syntax (parser) of Rascal allows some kind of pattern, while the semantics (interpreter) does not support it (yet). To solve this issue, usually you can introduce a variable in the place of the not support pattern, and check conditions on the value "manually" later.
Warning: To Do
44. UnsupportedSubscript
A subscript is applied to a value that does not support it.
Subscription is available for values of various types including: string, node, list, map, tuple and relation. This error is generated when subscription is applied to a value for which it is not defined.
Remedies:
-
Use another operation than subscription to extract the values you want.
-
Use another type (that does support subscription) to represent your data.
Here are some correct uses of subscription:
rascal>"abc"[1];
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@4b194a68
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:520)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@4b194a68
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@4b194a68
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>[1,2,3][1];
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@1e6788ea
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:520)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@1e6788ea
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@1e6788ea
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>"f"(1,2,3)[1];
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@602eb5ce
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:520)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@602eb5ce
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@602eb5ce
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>("a":1, "b":2, "c":3)["b"]
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@293caebc
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalExpression(CommandExecutor.java:453)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:438)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@293caebc
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@293caebc
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
Here are some erroneous examples:
rascal>true[1];
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@5191ae45
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:520)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@5191ae45
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@5191ae45
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>123[1];
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@6618db1a
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:520)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@6618db1a
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@6618db1a
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>{1,2,3}[1];
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@6717cb0e
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:520)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@6717cb0e
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@6717cb0e
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
45. UnsupportedSubscriptArity
Wrong number of subscripts is used.
Subscription is available for values of various types including: string, node, list, map, tuple and relation. This error is generated when subscription is applied to a value that does support subscription but not the number of indices that are used.
Remedies: correct the number of indices used in the subscription.
rascal>[1,2,3][2,1];
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@379acb9e
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:520)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@379acb9e
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@379acb9e
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal>("a":1, "b":2, "c":3)["c", "d"];
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@2017176f
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:520)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@2017176f
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@2017176f
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more
rascal><1, 2, 3>[5,6];
An unexpected internal error occurred:
java.lang.RuntimeException: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@990c1f8
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:193)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMJVM.executeRVMFunction(RVMJVM.java:127)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.executeRVMFunction(RVMCore.java:460)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.java2rascal.RascalFunctionInvocationHandler.invoke(RascalFunctionInvocationHandler.java:85)
at com.sun.proxy.$Proxy2.compileAndMergeProgramIncremental(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.executeModule(CommandExecutor.java:361)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.evalStatement(CommandExecutor.java:520)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.repl.CommandExecutor.eval(CommandExecutor.java:441)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:75)
at org.rascalmpl.library.experiments.tutor3.Concept.preprocess(Concept.java:264)
at org.rascalmpl.library.experiments.tutor3.Onthology.<init>(Onthology.java:131)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.compileCourse(CourseCompiler.java:92)
at org.rascalmpl.library.experiments.tutor3.CourseCompiler.main(CourseCompiler.java:271)
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: Exception in CALLJAVA: org.rascalmpl.library.PreludeCompiled.remove; message: could not call Java method removejava.lang.IllegalArgumentException: java.lang.ClassCastException@990c1f8
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:454)
at lang.rascal.boot.Kernel$Compiled.IO\remove(\loc():)#618(Unknown Source)
at lang.rascal.boot.Kernel$Compiled.experiments::Compiler::Execute\compileAndMergeProgramIncremental(str():bool():adt("PathConfig",()):)#562(Unknown Source)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.executeRVMFunction(RVMonJVM.java:187)
... 12 more
Caused by: org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.InternalCompilerError: could not call Java method remove
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1126)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMonJVM.insnCALLJAVA(RVMonJVM.java:443)
... 15 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@990c1f8
at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.rascalmpl.library.experiments.Compiler.RVM.Interpreter.RVMCore.callJavaMethod(RVMCore.java:1122)
... 16 more