Atlas Shell

From AtlasWiki
Revision as of 13:54, 2 February 2015 by BenHolland (Talk | contribs)

Jump to: navigation, search

That Atlas Shell (shown below) is a Scala interpreter with the Atlas classpath and query language imports pre-configured for you. Scala is a programming language that runs in the JVM, which means that Scala and Java stacks can be freely mixed for seamless integration. If you are not familiar with Scala, one notable difference in the program syntax is that several characters such as ., (, ), and ; can be implicit. Another difference is that in Scala type declarations begin with "var" or "val" instead of the class name. While the Atlas Shell is wonderful for writing and running quick one-off queries, you could write all of your program analysis queries in Java and simply invoke the Java code from the Atlas Shell. For now let's just use the Atlas Shell to write a few quick queries.

AtlasShell.png

Step 1) Import Shell Project

To open an Atlas Shell you need to have an Atlas Shell project imported into the workspace or installed into Eclipse as a plugin. A typical setup is to have the Shell project imported into the workspace. We provide a starter Shell project for you that can be used in this tutorial as well as your own projects! For more details see the Starter Toolbox Github repository at https://github.com/EnSoftCorp/Starter-Toolbox.

On your command line change your current directory to the git folder we made in the Installing Atlas section. Next, clone a copy of the repository by running the following command on your command line.

cd <my_path>/Atlas/git
git clone https://github.com/EnSoftCorp/Starter-Toolbox.git

If you need to install Git on your system visit http://git-scm.com/downloads. Alternatively you could download a zip file of the latest StarterToolbox repository archive here https://github.com/EnSoftCorp/Starter-Toolbox/archive/master.zip.

The starter Atlas Shell project has a project you just downloaded has dependency on a Toolbox project (which we will discuss more in the next section). For this tutorial import both the Shell project (toolbox.shell) and the Toolbox project (toolbox.analysis) into the workspace.

Import the Atlas Shell and Toolbox projects into the workspace by navigating to File > Import > General > Existing Projects into Workspace and browsing to the folder containing the toolbox.shell and toolbox.analysis projects. If the projects are in a zip archive, you will want to check the Select archive file radio button, otherwise check the Select root directory radio button. Make sure the checkboxes next to both projects are selected and click Finish to import the projects into the workspace.

Step 2) Index Workspace

TODO

Step 3) Open/Reload Shell

TODO

Step 4) Running Queries

TODO

Tips and Tricks

  1. Configure shellInit.scala
  2. Command History

← Indexing Workspace | Learning Atlas | Toolbox Projects →