KernelHaven offers a generic infrastructure for performing different analyses on product lines. This repository contains the main infrastructure, plugins are located in separate repositories.
This archive contains the core infrastructure only. Additional plugins are needed for a useful execution.
These archives contain the infrastructure as well as all public plugins. These bundles contain more than needed to run most experiments.
- KernelHaven plus all plugins (GPLv3 and Apache License 2.0)
- KernelHaven plus only plugins available under the Apache License 2.0
The following tables lists commonly used plugins for KernelHaven. They mostly focus on analysing the Linux Kernel.
Plugin | Description | License | Download | Status |
---|---|---|---|---|
CodeBlockExtractor | A code-model extractor that extracts #ifdef blocks |
Apache License 2.0 | JAR | |
KbuildMinerExtractor | A build-model extractor for the Linux Kernel | GPLv3 | JAR | |
KconfigReaderExtractor | A variability-model extractor for the Linux Kernel | GPLv3 | JAR | |
srcMLExtractor | A code-model extractor that partially parses the C AST | GPLv3 | JAR | |
TypeChefExtractor | An old code-model extractor that parses the C AST | Apache License 2.0 | JAR | |
UndertakerExtractor | An old code-model extractor that extracts #ifdef blocks |
GPLv3 | JAR |
Plugin | Description | License | Download | Status |
---|---|---|---|---|
FeatureEffectAnalysis | Detection of presence conditions and feature effects | Apache License 2.0 | JAR | |
ConfigurationMismatchAnalysis | Detection of configuration mismatches | Apache License 2.0 | JAR | |
MetricHaven | Metric infrastructure for SPL-Metrics | Apache License 2.0 | JAR | |
UnDeadAnalyzer | Detection of dead code and unused variables of the variability model | Apache License 2.0 | JAR | |
EntityLocatorAnalysis | Finds entities in different sources, e.g. for tracing | Apache License 2.0 | JAR | |
PSS-MapperAnalysis | Identification of relations between problem and solution space artifacts | Apache License 2.0 | JAR | |
PSS-DivergenceDetectorAnalysis | Identification of unintended divergences between problem and solution space artifacts | Apache License 2.0 | JAR | |
PSS-DivergenceCorrectorAnalysis | Provision of (proposals for) corrections of unintended divergences between problem and solution space artifacts | Apache License 2.0 | JAR |
Plugin | Description | License | Download | Status |
---|---|---|---|---|
CnfUtils | SAT-Solver, CNF-Converter, Formula simplifiers, ... | Apache License 2.0 | JAR | |
CppUtils | Utilities for parsing C-preprocessor statements | Apache License 2.0 | JAR | |
DBUtils | SQLite readers and writers for extractors and analysis plugins | Apache License 2.0 | JAR | |
IncrementalAnalysesInfrastructure | Support for incremental anlyses | Apache License 2.0 | JAR | |
IOUtils | Excel readers and writers for extractors and analysis plugins | Apache License 2.0 | JAR | |
NonBooleanUtils | Utilties for preparing source trees with non-boolean variables in C preprocessor analysis | Apache License 2.0 | JAR | |
BusybootPreparation | Utilities for preparing Busybox and Coreboot source trees for KernelHaven | Apache License 2.0 | JAR |
The following image visualizes the dependencies between the plugins (open image in a new browser tab to make plugin links clickable):
Although KernelHaven can be configured to use different paths, the usual setup looks like this:
kernel_haven/
├── cache/
│ └── ...
├── log/
│ └── ...
├── output/
│ └── ...
├── plugins/
│ ├── cnfutils.jar
│ ├── kbuildminerextractor.jar
│ ├── kconfigreaderextractor.jar
│ ├── undeadanalyzer.jar
│ └── undertakerextractor.jar
├── res/
│ └── ...
├── kernel_haven.jar
└── dead_code.properties
A configuration to execute a dead code analysis on Linux with this setup looks like this:
# Linux Source Tree
source_tree = /path/to/linux-4.4
arch = x86
# Analysis
analysis.class = net.ssehub.kernel_haven.undead_analyzer.DeadCodeAnalysis
# Code Extractor
code.provider.cache.read = true
code.provider.cache.write = true
code.extractor.class = net.ssehub.kernel_haven.undertaker.UndertakerExtractor
code.extractor.threads = 4
# Build Extractor
build.provider.cache.read = true
build.provider.cache.write = true
build.extractor.class = net.ssehub.kernel_haven.kbuildminer.KbuildMinerExtractor
# Variability Extractor
variability.provider.cache.read = true
variability.provider.cache.write = true
variability.extractor.class = net.ssehub.kernel_haven.kconfigreader.KconfigReaderExtractor
# Logging
log.console = true
log.file = true
# Directories
archive.dir = .
cache_dir = cache/
log.dir = log/
output_dir = output/
plugins_dir = plugins/
resource_dir = res/
See config_template.properties
for a full list of available configuration options for the infrastructure and common plugins.
Further documentation can be found in the wiki on GitHub. A pdf version can be downloaded from here.
The main infrastructure (this project) is licensed under the Apache License 2.0. Plugins may have different licenses.
This work is partially supported by the ITEA3 project REVaMP2, funded by the BMBF (German Ministry of Research and Education) under grant 01IS16042H.
We would like to thank the following persons, who contributed to the initial version of KernelHaven: Moritz Flöter, Adam Krafczyk, Alice Schwarz, Kevin Stahr, Johannes Ude, Manuel Nedde, Malek Boukhari, and Marvin Forstreuter.