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.0.0.
sparta.spartamodelContains 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 URIhttp://distrinet.cs.kuleuven.be/spartamodeland prefixspartamodel; the code is generated from it with EMF, usingmodel/spartamodel.genmodel. Themodelfolder, includingspartamodel.ecore,spartamodel.genmodeland the class diagrams inspartamodel.aird, is part of the plug-in. The meta-model is explained in Advanced concepts in SPARTA, and the generated classes in Meta-model.Exported packages:
sparta.spartamodel,sparta.spartamodel.impl,sparta.spartamodel.utilsparta.spartamodel.editProvides 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).
Exported packages:
sparta.spartamodel.providersparta.spartamodel.editorProvides the SPARTA Model Editor (tree editor) and the SPARTA Model wizard.
The editor opens files with the extensions
.spartaand.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.presentationsparta.spartamodel.testsServes as an empty placeholder for meta-model tests; not part of any feature.
Exported packages:
sparta.spartamodel.testssparta.designContains the Sirius specification of the graphical DFD editor.
The specification is
description/sparta.odesign. It defines the viewpointDataFlowDiagramwith two representations: the “Data Flow Diagram” of a DFD model, and theDecompositionDiagramof a single DFD element. The plug-in also contains a Java classsparta.design.Servicesfor Sirius services (Java methods that the specification can call from its expressions), but in 2026.0 the specification does not use it. The class only contains template and stub code.Exported packages: none
sparta.queriesContains 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.queriessparta.coreProvides the threat elicitation engine, the calculation of the risk for individual threats, and the classes that represent elicited threats (
IThreatand 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.patternssparta.threatanalysisProvides 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.corecalculates for individual threats. The classes are described in Aggregated risk analyses.Exported packages:
sparta.analysissparta.ioExports 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.utilsparta.analysisProvides 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
Engineofsparta.core(see Threat elicitation and risk analysis).Exported packages: none
sparta.rcpCustomizes 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.featureAll 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.featuresparta.spartamodel,sparta.spartamodel.editandsparta.spartamodel.editor: creating, reading and editing SPARTA models, without graphical modeling support.- SPARTA Graphical Modeling Support
be.kuleuven.cs.distrinet.sparta.graphicalmodeling.featuresparta.design: the graphical DFD editor. Requires Sirius.- SPARTA Threat Analysis Support
be.kuleuven.cs.distrinet.sparta.threatanalysis.featuresparta.analysis,sparta.core,sparta.io,sparta.queriesandsparta.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.spartamodelregisters its EMF package (namespace URIhttp://distrinet.cs.kuleuven.be/spartamodel, generator modelmodel/spartamodel.genmodel) and its resource factory for.spartaand.securitydfdfiles. 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.editregistersSpartaModelItemProviderAdapterFactoryfor the SPARTA namespace URI. The SPARTA generator model enablesExtensible Provider FactoryandChild 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 fromsparta.odesign, so new element kinds need their own Sirius specification (see Graphical editor below).- Graphical editor
sparta.designregisters its Sirius specification through theorg.eclipse.sirius.componentizationextension point (componentbe.kuleuven.cs.distrinet.security.secdfd.design). You can provide your own Sirius viewpoint specification for SPARTA models in a separate plug-in.- Queries
sparta.queriesregisters the query groupsbe.kuleuven.cs.distrinet.sparta.queries.DFDQueries,DataQueries,AttackerProfileQueriesandPatternSupportthrough theorg.eclipse.viatra.query.runtime.queryspecificationextension 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
Threatcan 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.ThreatAnalysisPatternSupport view
be.kuleuven.cs.distrinet.sparta.analysis.views.PatternSupportCommand “Load and Analyze Model”
be.kuleuven.cs.distrinet.sparta.analysis.loadmodelCommand “Clear Engine”
be.kuleuven.cs.distrinet.sparta.analysis.clearengineCommand “CSV Export”
be.kuleuven.cs.distrinet.sparta.analysis.csvexportCommand “Report Export”
be.kuleuven.cs.distrinet.sparta.analysis.reportExportSPARTA Model Editor
be.kuleuven.cs.distrinet.sparta.spartamodel.presentation.SpartaModelEditorIDSPARTA Model wizard
be.kuleuven.cs.distrinet.sparta.spartamodel.presentation.SpartaModelModelWizardIDSPARTA 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 version2026.0.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 theSPARTAlauncher 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-workspacein 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 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/2026andhttps://download.eclipse.org/releases/2025-06.