The interactive RascalShell
The RascalShell is an interactive console — or if you prefer a Command Line Interface (CLI) or Read Eval Print Loop (REPL) — for entering and executing Rascal expressions, statements and declarations.
In addition, several RascalShell commands and features are available to support the user:
-
Read Eval Print Loop (REPL): The Rascal Read Eval Print Loop (REPL).
-
Commands: RascalShell commands.
-
Command Completion: Context-dependent command completion.
-
Command History: Use the command history.
-
Keyboard Shortcuts: Keybord shortcuts.
1. Read Eval Print Loop (REPL)
The Rascal Read Eval Print Loop (REPL)
RascalShell is first and foremost an interactive console to execute Rascal code, be it declarations, statements or expressions.
Rascal code can be a trivial expression
rascal>1+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@5426a35
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@5426a35
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@5426a35
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 a more complex list comprehension:
rascal>[ n * n | int n <- [0..10] ]
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@78252c3f
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@78252c3f
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@78252c3f
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 importing a file and using a function declared in it:
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@2e4b9731
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@2e4b9731
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@2e4b9731
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([ n * n | int n <- [0..10] ])
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@6a1761f0
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@6a1761f0
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@6a1761f0
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 use is to declare variables
rascal>int x = 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@70cbbb97
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@70cbbb97
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@70cbbb97
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 y = 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@469068ec
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@469068ec
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@469068ec
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
and use them later on:
rascal>x * 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@21d79881
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@21d79881
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@21d79881
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 is quite demanding as far as the proper placement of semicolons (;)
is concerned.
The RascalShell is more permissive but at the end of a statement
there is still one required.
2. Commands
RascalShell commands
The RascalShell provides several built-in commands:
-
Apropos Command: Get help and search documentation, results shown in console.
-
Break Command: Manage breakpoints.
-
Clear Command: Clear all break points.
-
Declarations Command: Show all declarations in current RascalShell session.
-
Help Command: Get help and search Rascal documentation, results shown in a browser.
-
Modules Command: Show all modules that have been imported in the current RascalShell session.
-
Quit Command: Quit the RascalShell.
-
Set Command: Set parameters that control options of RascalShell.
-
Test Command: Run tests.
-
Undeclare Command: Remove declarations from the current RascalShell session.
-
Unimport Command: Remove imported modules from the current RascalShell session.
2.1. Apropos Command
Get help and search documentation, results shown in console.
-
apropos -
apropos Topics
Rascal provides a help system as described in Getting Help.
The apropos command is similar to Help Command,
but results are only shown in the RascalShell console
(no browser window is opened).
2.2. Break Command
Manage breakpoints.
-
break -
break FunctionName -
break FunctionName Lino
The Rascal system includes an interactive debugger that allows setting break points, step-by-step execution and more. Break points are identified by their break point number as determined by the order in which they were created.
The first form, lists all current break points.
The second and third form, set a break point for a specific function or line in a function.
2.3. Clear Command
Clear all break points.
clear
Removes all break points.
2.4. Declarations Command
Show all declarations in current RascalShell session.
declarations
All declarations entered during the current session are shown. Also see Undeclare Command to remove a declaration.
rascal>real pi = 3.14;
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@413f8ebd
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@413f8ebd
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@413f8ebd
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 D = d1(int n) | d2(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@3b3cac99
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@3b3cac99
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@3b3cac99
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>declarations
2.5. Help Command
Get help and search Rascal documentation, results shown in a browser.
-
help -
help Topics
Rascal provides a help system as described in Getting Help.
In the first form, the list of RascalShell commands is printed.
In the second form, the search results for Topics are shown in a browser window.
Use Apropos Command, to get help results shown in the console.
2.6. Modules Command
Show all modules that have been imported in the current RascalShell session.
modules
All modules that have been imported during the current session are shown. Also see Unimport Command to remove an imported module.
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@4e2eb6a8
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@4e2eb6a8
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@4e2eb6a8
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>import Set;
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@7c773709
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@7c773709
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@7c773709
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>modules
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@7407bbd8
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@7407bbd8
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@7407bbd8
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.7. Quit Command
Quit the RascalShell.
-
quit -
Ctrl+d or Eof
Typing quit or Ctrl+d will end the execution of the RascalShell.
2.8. Set Command
Set parameters that control options of RascalShell.
-
set -
set Option TrueOrFalse
RascalShell provides a number of options to control its behaviour.
The set command manages their value.
In the first form, the list of current settings is printed.
In the second form a specific option is set to true or false.
The options are:
-
profile: record execution times while executing subsequent Rascal code and print the results after each RascalShell command. -
trace: while executing Rascal code, print a trace of all function calls. -
coverage: record which code is executed while executing subsequent Rascal code and print the results after each RascalShell command.
Turn trace on and execute a function:
rascal>import demo::basic::Factorial;
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@584be53c
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@584be53c
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@584be53c
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 trace true
trace set to true
rascal>fac(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@1481988f
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@1481988f
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@1481988f
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
Turn trace off and execute the same function:
rascal>set trace false
trace set to false
rascal>fac(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@7fefc1a5
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@7fefc1a5
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@7fefc1a5
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 set command is completely unrelated to Rascal’s built-in set type.
2.9. Test Command
Run tests.
-
test -
test Modules
Run Rascal tests.
In the first form, the tests in all currently imported modules are executed.
In the second form, the tests in the given list of Modules are executed.
Execute the tests in an imported module:
rascal>import demo::basic::Factorial;
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@24431fd2
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@24431fd2
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@24431fd2
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>test
No tests to execute; import modules with tests or give list of modules with tests
Execute the tests in the Integers module in the Rascal test suite:
rascal>test lang::rascal::tests::basic::Integers
[red]##NoSuchField("results")##
2.10. Undeclare Command
Remove declarations from the current RascalShell session.
-
undeclare Name1 Name2 … -
undeclare
When one or more names are given, the corresponding declared entities will be removed from the current session.
When no names are given, all declarations will be removed from the current session.
Also see Declarations Command to list all declarations.
First declare variable pi and data type D and check that the declarations command lists them:
rascal>real pi = 3.14;
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@5713865b
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@5713865b
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@5713865b
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 D = d1(int n) | d2(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@6a180fa7
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@6a180fa7
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@6a180fa7
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>declarations
Now remove the declaration for D and verify that it has indeed been removed:
rascal>undeclare D
No declaration for D found
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@2ea4d656
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.evalShellCommand(CommandExecutor.java:939)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:73)
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@2ea4d656
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)
... 11 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)
... 14 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@2ea4d656
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)
... 15 more
rascal>declarations
2.11. Unimport Command
Remove imported modules from the current RascalShell session.
-
unimport Module1 Module2 … -
unimport
When one or more module names are given, they are removed from the list of imported modules.
When no module names are given, all imported modules are removed from the list of imported modules.
Also see Modules Command to list all currently imported modules.
Import the modules List and 'Set` and check that the modules command lists them:
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@35687e26
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@35687e26
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@35687e26
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>import Set;
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@5f096266
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@5f096266
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@5f096266
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>modules
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@679757b0
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@679757b0
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@679757b0
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
Now remove the import of module List and verify that it has indeed been removed:
rascal>unimport List
No import List found
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@6fc2bd67
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.evalShellCommand(CommandExecutor.java:917)
at org.rascalmpl.library.experiments.tutor3.TutorCommandExecutor.evalPrint(TutorCommandExecutor.java:73)
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@6fc2bd67
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)
... 11 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)
... 14 more
Caused by: java.lang.IllegalArgumentException: java.lang.ClassCastException@6fc2bd67
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)
... 15 more
rascal>modules
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@37fc24f4
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@37fc24f4
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@37fc24f4
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. Command Completion
Context-dependent command completion.
RascalShell provides context-dependent command completion. Typing Tab autocompletes from the current cursor position and will show all possible completions (or will directly add the completion when this is unique).
4. Command History
Use the command history.
RascalShell provides a history of previously entered commands. This can be accessed as follows:
↑ |
Show previous command in history; Type Return to execute it. |
↓ |
Next command in history; Type Return to execute it. |
Ctrl+r |
(After search text) Search backward in history. |
Ctrl+s |
(After search text) Forward search in history |
rascal>a = 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@207c03e5
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@207c03e5
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@207c03e5
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 = 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@35db70d7
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@35db70d7
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@35db70d7
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>c = 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@97083b8
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@97083b8
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@97083b8
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
Typing ↑ will then show the text (not followed by Return!):
rascal>c = 3;
Typing Return will reexecute c = 3.
Typing the letter a (the search text in this example) followed by Ctrl+r will show the text:
(reverse-i-search)`a': a = 3;
And again, typing Return will reexecute a = 3.
5. Keyboard Shortcuts
Keybord shortcuts.
When handling console input, RascalShell supports a subset of the shortcuts provided by GNU Readline
Some convenient shortcuts are:
Ctrl+a |
Move cursor to begin of line. |
Ctrl+d |
EOF marker, closes the current RascalShell (equivalent to the
command ( |
Ctrl+e |
Move cursor to end of line. |
Ctrl+k |
Kill remainder of line after cursor. |
Ctrl+l |
Clear screen. |