Skip to content

Moose tools

Moose comes with many tools. This page lists them, grouped by the step of an analysis they help with: getting a model, exploring it, querying it, visualizing it, running specialized analyses, and extending Moose.

Each tool is marked with how you get it:

  • Default the tool is part of the default Moose image. Most tools are opened from the Moose menu of the menu bar.
  • Load the tool must be loaded first, from the Library menu, under Famix > Load additional modules.

When a tool has its own documentation, its name links to it.

Before any analysis you need a model of your system. It can be produced by a parser outside of Moose (for example VerveineJ for Java), then imported. See also Importing and exporting models.

ToolWhat it doesAvailability
Models browserThe entry point of Moose. Lists the models in the image, imports new ones, and propagates the selected model. Imports from a JSON or MSE file, from a folder of files, or from Pharo code already in the image.Default
Github ImporterSearches GitHub for a project, downloads the versions you choose, parses them with VerveineJ, and imports one model per version. Java projects only for now. Also available from the Models browser toolbar.Default
Moose NexusBuild automation and dependency management for models, similar to Maven or Gradle. Resolves the dependencies of a Java project (Maven, Gradle), runs VerveineJ, and keeps versioned models.Load
Famix Java FusionnerScripting API (FamixFusionnerJava). Merges two Java models by replacing the stub entities of one model with their full definition from another model (for example a library).Default

General-purpose tools to navigate a model, look at its entities and script on it.

ToolWhat it doesInputAvailability
MooseIDE OverviewShows all open browsers and the buses they listen to. Use it to manage buses.—Default
Moose InspectorThe Pharo inspector connected to the buses. Navigates any entity and its relations.A Moose entityDefault
Moose PlaygroundThe Pharo playground connected to the buses. Write scripts on your models. Each model of the image is available as a variable, and the last received entity as receivedEntity.AnythingDefault
NotebookA notebook mixing text cells (Microdown) and code cells, to document an analysis and export it as a report.An entity of a modelDefault
Source codeShows the source code of an entity, with highlighting.An entity with a source anchorDefault
FilesExplores the root folder of a model and shows the entities defined in each file.A model with a root folderDefault
Aggregator BrowserCollects entities propagated from several tools, then propagates them all together.EntitiesDefault
LoggerShows the history of what was propagated on each bus.—Default
SpotterThe Pharo Spotter (Shift + Enter), extended to search entities in the models.—Default

Select the entities that answer your question, and check rules on a model. See also MooseQuery and Typical queries.

ToolWhat it doesInputAvailability
Queries BrowserBuilds queries step by step, without code: filter by type, property, name, navigate relations, combine queries. Propagates the result.A group of entitiesDefault
Queries dashboardShows predefined queries that apply to a model, with their results.An entity of a modelDefault
Moose Critic BrowserDefines rules as queries and lists their violations on a model. Rules can be exported and imported.EntitiesDefault
MoTionDeclarative pattern matching on objects. Describes the shape of the entities you look for instead of writing navigation code. Scripting only.—Load

Tags let you mark entities by hand (or by script) to record what you learn during an analysis: “to remove”, “UI layer”, “checked”… Many visualizations can color entities by tag.

ToolWhat it doesInputAvailability
Tag browserCreates tags, gives them a name and a color, puts them in a hierarchy, and adds or removes tagged entities. Tags can be exported and imported.An entity of a modelDefault
ToolWhat it doesInputAvailability
Architectural mapShows the containment hierarchy of entities (packages, classes, methods…) as nested boxes, with their tags.EntitiesDefault
Distribution mapShows how a property (for example a tag) is distributed over parts of the system (for example packages).EntitiesDefault
Heat mapLike the distribution map, with entities colored by a numeric property.EntitiesDefault
System complexityShows the class hierarchies, each class drawn as a box whose size and color show metrics (attributes, methods, lines of code).A group of classesDefault
Class BlueprintShows the internal structure of one class: its methods and attributes, how they call each other, and which are dead.A classDefault
UMLDraws a UML class diagram of the received types. Found under Moose > Old browsers.TypesDefault
Layer visualizationPartitions a model into layers and shows the links between them. Each system must describe its layers by subclassing MiLayerVisualizationModel. Not in the menu.An entity of a modelDefault
ClassName DistributionShows how the words used in class names (the concepts) are distributed over class hierarchies, for Java and Pharo. Opened from the Library menu once loaded.A modelLoad
ToolWhat it doesInputAvailability
Butterfly mapShows the clients (left) and the providers (right) of a central entity, over several levels.An entityDefault
Dependency Structural MatrixShows the dependencies between entities as a matrix and highlights the cycles.Entities depending on each otherDefault
Co Usage MapShows which containers (for example methods) use which used entities (for example attributes). Useful to split a class or to find cohesive groups.A group of entitiesDefault
API BrowserShows the dependencies between two subsystems: what a client subsystem uses from a provider subsystem. Listens to two buses, one per subsystem.Methods or classes, on each busLoad
Java call graphBuilds the call graph of Java methods, solving polymorphic calls. Also loads FAST Java.Java methodsLoad
Java call graph v2Second version of the Java call graph builder. Work in progress.Java methodsLoad
ToolWhat it doesInputAvailability
Dead code browserFinds dead methods or functions, with a choice of heuristics. A first run finds the dead entities, and a recursion then adds the entities called only by dead ones.Methods or functionsDefault
Duplication browserFinds code clones and shows the duplicated fragments side by side.Entities with source codeDefault
Bulk editorScripting API (MiBulkEditor). Rewrites Java source files in bulk, for example to comment out or remove a list of dead methods.—Default
Moose SecurityFinds possible security vulnerabilities in a system, tags them and shows them. Work in progress.—Load
ToolWhat it doesInputAvailability
Entities exporterExports entities as a CSV file, with a comment per entity.EntitiesDefault
Model ReportGenerates a statistical report on a model in Markdown. You can edit it before exporting.An entity of a modelDefault
Model exportExports a whole model as JSON or MSE, from the Models browser or by script.A modelDefault

The Notebook and the Model Report (above) also produce documents you can export.

A model follows a meta-model, which depends on the language of the analyzed system. Moose includes some meta-models by default, and others can be loaded.

Meta-modelLanguageAvailability
Famix JavaJavaDefault
Famix SmalltalkPharo code, imported directly from the image.Default
MoosePyPythonLoad
Famix-FortranFortranLoad
Famix-CppC++Load
Famix-SQLSQLLoaded by script

Famix models stop at the level of methods. FAST models describe what is inside them: statements and expressions. See FAST.

Meta-modelLanguageAvailability
FAST JavaJavaLoad
FAST PharoPharoLoad
FAST PythonPython, with analyses such as control flow graphs, SSA and local resolution.Load
FAST FortranFortranLoad

Tools for people who build new meta-models, parsers or tools. See the Developers section.

ToolWhat it doesAvailability
Famix meta-model builderDefines a new meta-model by describing its entities and relations, and generates its code.Default
FameThe meta-meta-model below Famix. Also handles reading and writing models (JSON, MSE).Default
Meta BrowserBrowses a meta-model: its entities, their properties and their relations. Found under Moose > Old browsers.Default
Famix UML DocumentorScripting API (FamixUMLDocumentor). Generates a UML diagram of a meta-model, exported as PlantUML, Mermaid, LaTeX, text or Roassal.Default
MooseQueryThe query API used by all the tools: navigate containment and dependencies between entities, whatever the meta-model.Default
RoassalThe visualization engine used by the Moose visualizations. Use it to build your own.Default
PetitParserA framework to build parsers (PetitParser2).Load
SmaCCA parser generator, used for example to write importers for new languages.Load