SPARTA in Eclipse

If you are developing extensions of SPARTA in Eclipse, these libraries are the most convenient to use as dependencies in your Eclipse plug-in projects. See Eclipse Prerequisites for how to set up Eclipse and make the SPARTA plug-ins available.

Warning

If you want to run SPARTA as part of a standalone Java program, see SPARTA Standalone libraries for more information.

Plug-ins

Note

All plug-in and exported package names below are abbreviated: they all start with be.kuleuven.cs.distrinet.. For example, sparta.core stands for the plug-in be.kuleuven.cs.distrinet.sparta.core, and sparta.core.model for the package be.kuleuven.cs.distrinet.sparta.core.model. All plug-ins have version 2026.1.0.

sparta.spartamodel

Contains the SPARTA meta-model and the EMF model code generated from it.

The meta-model covers all modeling concepts in SPARTA: DFD models, security and privacy solutions, data models with personal data, threat type catalogs, attacker profiles, and estimates. It is a single Ecore model, model/spartamodel.ecore, with namespace URI http://distrinet.cs.kuleuven.be/spartamodel and prefix spartamodel; the code is generated from it with EMF, using model/spartamodel.genmodel. The model folder, including spartamodel.ecore, spartamodel.genmodel and the class diagrams in spartamodel.aird, is part of the plug-in. The meta-model is explained in Advanced concepts in SPARTA, and the generated classes in Meta-model.

Changed in version 2026.1: RoleBinding.getBindsTo() returns an EList<Asset>, because a role binding can bind its role to several elements, and RoleBinding.setBindsTo(Asset) was removed (see Release notes and Development scenarios).

Exported packages: sparta.spartamodel, sparta.spartamodel.impl, sparta.spartamodel.util

sparta.spartamodel.edit

Provides the EMF.Edit item providers of the meta-model, which tell editors how to present and edit model elements (labels, icons, properties and child elements).

Changed in version 2026.1: The label of a role binding no longer ends in element, and reads ... to multiple assets when the role binding binds several elements (see Release notes).

Exported packages: sparta.spartamodel.provider

sparta.spartamodel.editor

Provides the SPARTA Model Editor (tree editor) and the SPARTA Model wizard.

The editor opens files with the extensions .sparta and .spartamodel. The wizard (“Create a new SPARTA model”) is in the wizard category “SPARTA Model Creation Wizards”. How to use the editor and the wizard is explained in SPARTA Interface.

Exported packages: sparta.spartamodel.presentation

sparta.spartamodel.tests

Serves as an empty placeholder for meta-model tests; not part of any feature.

Exported packages: sparta.spartamodel.tests

sparta.design

Contains the Sirius specification of the graphical DFD editor.

The specification is description/sparta.odesign. It defines the viewpoint DataFlowDiagram with two representations: the “Data Flow Diagram” of a DFD model, and the DecompositionDiagram of a single DFD element. The plug-in also contains a Java class sparta.design.Services for Sirius services (Java methods that the specification can call from its expressions), but in 2026.1 the specification does not use it. The class only contains template and stub code.

Exported packages: none

sparta.queries

Contains the built-in VIATRA queries that SPARTA runs on a model: the queries of the legacy key-based threat types, and the queries that collect catalogs, data types and attacker profiles for the analysis. The queries are described in Built-in queries.

Exported packages: sparta.queries

sparta.core

Provides the threat elicitation engine, the calculation of the risk for individual threats, and the classes that represent elicited threats (IThreat and its implementations). The classes are described in Threat elicitation and risk analysis; code to run the threat elicitation from your own plug-in is in Development scenarios.

Exported packages: sparta.core, sparta.core.analysis, sparta.core.analysis.risk, sparta.core.model, sparta.core.patterns

sparta.threatanalysis

Provides support for aggregated risk analyses over collections of threats, such as the total risk, the risk per threat type, and the risk per element type, based on the risk values that sparta.core calculates for individual threats. The classes are described in Aggregated risk analyses.

Exported packages: sparta.analysis

sparta.io

Exports threats to CSV, JSON, XLSX and text files, a LaTeX report, and a GitLab Code Quality report. The classes are described in Exporters. In Eclipse, the plug-in requires Sirius plug-ins, which the report uses for the DFD diagram.

Exported packages: sparta.io, sparta.io.convert, sparta.io.json, sparta.io.util

sparta.analysis

Provides the Eclipse user interface to run the threat analysis: the ThreatAnalysis and PatternSupport views and their commands.

The ThreatAnalysis view shows the threats with their risk (see Analysis results and exports), and the PatternSupport view shows problems found while parsing the patterns of threat type catalogs (see SPARTA Interface and Writing threat type patterns). Because the plug-in exports no packages, other plug-ins cannot use its classes; to run the analysis programmatically, use the Engine of sparta.core (see Threat elicitation and risk analysis).

Exported packages: none

sparta.rcp

Customizes the packaged SPARTA Eclipse Application; it contains no functionality for developers. The product is described in RCP product.

Exported packages: none

Note

Plug-in names and package names do not always match. The aggregated risk analyses are in the package sparta.analysis, but that package belongs to the plug-in sparta.threatanalysis. The plug-in sparta.analysis is the user interface and exports no packages. To use the aggregated risk analyses, your plug-in must depend on sparta.threatanalysis.

Plug-in dependencies

The graph shows the dependencies between the SPARTA plug-ins (the Require-Bundle headers of their manifests).

        flowchart LR
   analysis --> spartamodel
   analysis --> queries
   analysis --> core
   analysis --> io
   analysis --> mEditor["spartamodel.editor"]
   core --> queries
   core --> spartamodel
   io --> core
   io --> threatanalysis
   io --> spartamodel
   design --> spartamodel
   queries --> spartamodel
   threatanalysis --> core
   threatanalysis --> spartamodel
   mEditor --> mEdit["spartamodel.edit"]
   mEdit --> spartamodel
   mTests["spartamodel.tests"] --> spartamodel
    

Note

sparta.rcp is not shown: it does not require any other SPARTA plug-in, but its plugin.xml refers to the SPARTA Model wizard (sparta.spartamodel.editor) and the ThreatAnalysis view (sparta.analysis) by their IDs.

Features

The plug-ins are grouped into four Eclipse features. The SPARTA update site lists all four in the category “Threat Modeling”.

SPARTA Threat Modeling

be.kuleuven.cs.distrinet.sparta.feature

All SPARTA plug-ins (except sparta.spartamodel.tests) and the three features below. This is the feature to install for the complete SPARTA tool.

SPARTA Modeling Support

be.kuleuven.cs.distrinet.sparta.modeling.feature

sparta.spartamodel, sparta.spartamodel.edit and sparta.spartamodel.editor: creating, reading and editing SPARTA models, without graphical modeling support.

SPARTA Graphical Modeling Support

be.kuleuven.cs.distrinet.sparta.graphicalmodeling.feature

sparta.design: the graphical DFD editor. Requires Sirius.

SPARTA Threat Analysis Support

be.kuleuven.cs.distrinet.sparta.threatanalysis.feature

sparta.analysis, sparta.core, sparta.io, sparta.queries and sparta.threatanalysis: threat elicitation, risk analysis, exports, and the ThreatAnalysis and PatternSupport views. Requires the two modeling features, VIATRA, and third-party libraries such as Apache POI, Jackson and Commons Math.

Extension hooks

SPARTA does not define its own Eclipse extension points. You extend SPARTA through the extension mechanisms of EMF, Sirius and VIATRA, and through the Java API of the exported packages.

Meta-model

sparta.spartamodel registers its EMF package (namespace URI http://distrinet.cs.kuleuven.be/spartamodel, generator model model/spartamodel.genmodel) and its resource factory for .sparta and .securitydfd files. Your own Ecore models can reference the SPARTA meta-model, for example to add subclasses of SPARTA concepts. Development scenarios shows how to extend the meta-model this way.

Item providers and child creation

sparta.spartamodel.edit registers SpartaModelItemProviderAdapterFactory for the SPARTA namespace URI. The SPARTA generator model enables Extensible Provider Factory and Child Creation Extenders, so the edit plug-in of an extension can contribute new child elements (for example, a new kind of data store in a DFD model) to the SPARTA Model Editor (tree editor) and the Properties view. The graphical DFD editor is not extended this way: its palette comes from sparta.odesign, so new element kinds need their own Sirius specification (see Graphical editor below).

Graphical editor

sparta.design registers its Sirius specification through the org.eclipse.sirius.componentization extension point (component be.kuleuven.cs.distrinet.security.secdfd.design). You can provide your own Sirius viewpoint specification for SPARTA models in a separate plug-in.

Queries

sparta.queries registers the query groups be.kuleuven.cs.distrinet.sparta.queries.DFDQueries, DataQueries, AttackerProfileQueries and PatternSupport through the org.eclipse.viatra.query.runtime.queryspecification extension point. You can use the generated query classes in your own code and import their patterns in your own VQL files (see Built-in queries).

Java API

The threat elicitation engine, the risk model, the aggregated risk analyses and the exporters are described in SPARTA Java API. For example, a subclass of Threat can use its own risk model (see Threat elicitation and risk analysis).

User interface

You can refer to the ids of the SPARTA user interface elements, for example in perspective extensions or menu contributions:

Element

Id

ThreatAnalysis view

be.kuleuven.cs.distrinet.sparta.analysis.views.ThreatAnalysis

PatternSupport view

be.kuleuven.cs.distrinet.sparta.analysis.views.PatternSupport

Command “Load and Analyze Model”

be.kuleuven.cs.distrinet.sparta.analysis.loadmodel

Command “Clear Engine”

be.kuleuven.cs.distrinet.sparta.analysis.clearengine

Command “CSV Export”

be.kuleuven.cs.distrinet.sparta.analysis.csvexport

Command “Report Export”

be.kuleuven.cs.distrinet.sparta.analysis.reportExport

SPARTA Model Editor

be.kuleuven.cs.distrinet.sparta.spartamodel.presentation.SpartaModelEditorID

SPARTA Model wizard

be.kuleuven.cs.distrinet.sparta.spartamodel.presentation.SpartaModelModelWizardID

SPARTA perspective

be.kuleuven.cs.distrinet.sparta.rcp.spartaperspective

When you install the SPARTA features into an Eclipse IDE, sparta.analysis also adds the ThreatAnalysis view to the Java perspective.

RCP product

The SPARTA product is a packaged Eclipse application with all SPARTA features. Its definition is releng/be.kuleuven.cs.distrinet.sparta.product/be.kuleuven.cs.distrinet.sparta.product in the source repository, and the branding is in the sparta.rcp plug-in.

Product

The product id is be.kuleuven.cs.distrinet.sparta.rcp.product, with the name “Security and Privacy Analysis through Risk-driven Threat Assessment” and version 2026.1.0. It runs the Eclipse IDE workbench application (org.eclipse.ui.ide.workbench), so it behaves like an Eclipse IDE with SPARTA branding. Besides the SPARTA feature, it contains the Eclipse platform, EMF, Sirius, EcoreTools, and the p2 update user interface.

Platforms

The product is built for Windows (x86_64), Linux (gtk, x86_64) and macOS (cocoa, x86_64). Each archive contains the SPARTA launcher and a Java 21 runtime from Eclipse JustJ, so users do not need to install Java. See Installing SPARTA for downloading and starting the product.

Workspace

The default workspace is the folder sparta-workspace in the user’s home directory.

Perspective

The default perspective is the “SPARTA” perspective (be.kuleuven.cs.distrinet.sparta.rcp.spartaperspective). It shows the Project Explorer on the left, the ThreatAnalysis view to the right of the editor area, and the Properties and Problems views below the editors. Its File ‣ New shortcuts are the SPARTA Model wizard and the Sirius Modeling Project wizard. The perspective is described in SPARTA Interface.

Updates

The product checks for updates at every startup and reminds the user of available updates every 4 hours. It is configured with the update sites https://downloads.sparta.distrinet-research.be/updatesite/2025, https://downloads.sparta.distrinet-research.be/updatesite/2026 and https://download.eclipse.org/releases/2025-06.