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.3.0 and are compiled for Java 21.
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.tests,sparta.core.tests,sparta.analysis.tests,sparta.io.testsandsparta.threatanalysis.testsContain the JUnit tests of
sparta.spartamodel,sparta.core,sparta.analysis,sparta.ioandsparta.threatanalysis, which the Maven build runs (see Building SPARTA from source); not part of any feature.Exported packages: none
sparta.designContains the Sirius specification of the graphical DFD editor and of the table editors for attacker profiles and threat type catalogs (see Table editors).
The specification is
description/sparta.odesign. It defines the viewpointDataFlowDiagramwith four representations: the “Data Flow Diagram” of a DFD model, theDecompositionDiagramof a single DFD element, and the tables “Attacker Profiles” of an attacker model and “Threat Type Catalog” of a threat type catalog. The tables are Sirius edition tables, which have one row per model element and one column per property; the Sirius table runtime that they need is part of the SPARTA Graphical Modeling Support feature (see Features). The plug-in also contains a Java classsparta.design.Serviceswith Sirius services (Java methods that the specification can call from its expressions), such ascoverageLabel()andmitigatedThreatTypeCount()for solutions and countermeasures, but in 2026.3 the specification does not use them.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, and to a LaTeX report with the data flow diagram of the model. The classes are described in Exporting results.
Exported packages:
sparta.io,sparta.io.convert,sparta.io.diagram,sparta.io.templates,sparta.io.utilsparta.analysisProvides the Eclipse user interface to run the threat analysis: the ThreatAnalysis and PatternSupport views, the SPARTA menu and toolbar with the analysis and export commands, and the context menu command Edit VQL Pattern…, which opens a dialog with syntax highlighting in which you edit the VQL text of a threat pattern.
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). The plug-in only exports the helper classes of its views; to run the analysis programmatically, use the
Engineofsparta.core(see Threat elicitation and risk analysis). It also exports the packagesparta.analysis.service, but only to its test plug-in (x-friends).Exported packages:
sparta.analysis.utilsparta.rcpCustomizes the packaged SPARTA Eclipse Application; it contains no functionality for developers. The product is described in RCP product.
Exported packages: none
sparta.welcomeContains the welcome screen of the SPARTA product, the example projects and the guided tutorial; it contains no Java code.
The welcome screen (intro
be.kuleuven.cs.distrinet.sparta.welcome.intro) is only bound to the SPARTA product, so an Eclipse IDE with the SPARTA features keeps its own welcome screen. The example wizards in the category SPARTA of create the example projectscontoso,socialnetworkandwebrtcand the starter projectsparta-tutorialof the guided tutorial; the projects are zip files in theexamplesfolder of the plug-in. The guided tutorial is the cheat sheet “Create and analyze your first model”, in the category SPARTA of .Exported packages: none
Changed in version 2026.3: The plug-in sparta.welcome was added.
sparta.io exports the packages sparta.io.diagram and sparta.io.templates and no longer the package sparta.io.json, and sparta.spartamodel.tests no longer exports a package.
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.
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).
The test plug-ins are not shown; each depends on the plug-in it tests.
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
Note
sparta.rcp and sparta.welcome are not shown: they do not require any other SPARTA plug-in.
sparta.rcp refers to the SPARTA Model wizard (sparta.spartamodel.editor) in its plugin.xml, and to the ThreatAnalysis and PatternSupport views (sparta.analysis) in its perspective class, by their IDs; sparta.welcome refers to the SPARTA Model wizard by its ID.
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.featureThe three features below and the plug-ins
sparta.rcpandsparta.welcome, so all SPARTA plug-ins except the test plug-ins. 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 and the table editors for attacker profiles and threat type catalogs. Requires Sirius. The feature also contains the plug-ins of the Sirius table runtime (org.eclipse.sirius.table.model,org.eclipse.sirius.tableandorg.eclipse.sirius.table.ui).- 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 Analysis Engine”
be.kuleuven.cs.distrinet.sparta.analysis.clearengineCommand “Export Threats to CSV”
be.kuleuven.cs.distrinet.sparta.analysis.csvexportCommand “Export Threats to XLSX”
be.kuleuven.cs.distrinet.sparta.analysis.xlsxexportCommand “Export Threat Report”
be.kuleuven.cs.distrinet.sparta.analysis.reportExportCommand “Edit VQL Pattern”
be.kuleuven.cs.distrinet.sparta.analysis.editVqlPatternSPARTA menu
be.kuleuven.cs.distrinet.sparta.analysis.menuSPARTA toolbar
be.kuleuven.cs.distrinet.sparta.analysis.toolbarSPARTA 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.spartaperspectiveWelcome screen (intro)
be.kuleuven.cs.distrinet.sparta.welcome.introExample wizards
be.kuleuven.cs.distrinet.sparta.welcome.examples.contoso,be.kuleuven.cs.distrinet.sparta.welcome.examples.socialnetwork,be.kuleuven.cs.distrinet.sparta.welcome.examples.webrtcandbe.kuleuven.cs.distrinet.sparta.welcome.examples.tutorialCheat sheet “Create and analyze your first model”
be.kuleuven.cs.distrinet.sparta.welcome.cheatsheet.firstmodel
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”, the application name “SPARTA”, and version2026.3.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. The launcher starts Java with an initial heap of 512 MB and a maximum heap of 2 GB (-Xms512m -Xmx2048m) and with-Dosgi.checkConfiguration=false. See Installing SPARTA for downloading and starting the product.- Workspace
The default workspace is the folder
sparta-workspacein the user’s home directory.- Welcome screen
When the product starts with a new workspace, it shows the welcome screen of
sparta.welcome; afterward, it is available in .- 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 and PatternSupport views stacked to the right of the editor area, and the Properties and Problems views below the editors. The classsparta.rcp.SPARTAPerspectivedefines this layout; the perspective extension inplugin.xmlcontributes the shortcuts, which are the SPARTA Model wizard and the Sirius Modeling Project wizard. The perspective is described in SPARTA Interface.- Updates
The product checks for updates once a week and reminds the user of available updates every 4 hours; these defaults are set in
plugin_customization.iniofsparta.rcp. It is configured with the update siteshttps://downloads.sparta.distrinet-research.be/updates/2026andhttps://download.eclipse.org/releases/2025-06. The launcher passes-Declipse.e4.inject.javax.warning=falseto Java, which suppresses thejavax.injectdeprecation warnings in the log.