Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time

KernelHaven

Build Status

KernelHaven offers a generic infrastructure for performing different analyses on product lines. This repository contains the main infrastructure, plugins are located in separate repositories.

Downloads

Core Infrastructure

This archive contains the core infrastructure only. Additional plugins are needed for a useful execution.

Bundled Releases

These archives contain the infrastructure as well as all public plugins. These bundles contain more than needed to run most experiments.

Plugins

The following tables lists commonly used plugins for KernelHaven. They mostly focus on analysing the Linux Kernel.

Extractors

Plugin Description License Download Status
CodeBlockExtractor A code-model extractor that extracts #ifdef blocks Apache License 2.0 JAR Build Status
KbuildMinerExtractor A build-model extractor for the Linux Kernel GPLv3 JAR Build Status
KconfigReaderExtractor A variability-model extractor for the Linux Kernel GPLv3 JAR Build Status
srcMLExtractor A code-model extractor that partially parses the C AST GPLv3 JAR Build Status
TypeChefExtractor An old code-model extractor that parses the C AST Apache License 2.0 JAR Build Status
UndertakerExtractor An old code-model extractor that extracts #ifdef blocks GPLv3 JAR Build Status

Analysis

Plugin Description License Download Status
FeatureEffectAnalysis Detection of presence conditions and feature effects Apache License 2.0 JAR Build Status
ConfigurationMismatchAnalysis Detection of configuration mismatches Apache License 2.0 JAR Build Status
MetricHaven Metric infrastructure for SPL-Metrics Apache License 2.0 JAR Build Status
UnDeadAnalyzer Detection of dead code and unused variables of the variability model Apache License 2.0 JAR Build Status
EntityLocatorAnalysis Finds entities in different sources, e.g. for tracing Apache License 2.0 JAR Build Status
PSS-MapperAnalysis Identification of relations between problem and solution space artifacts Apache License 2.0 JAR Build Status
PSS-DivergenceDetectorAnalysis Identification of unintended divergences between problem and solution space artifacts Apache License 2.0 JAR Build Status
PSS-DivergenceCorrectorAnalysis Provision of (proposals for) corrections of unintended divergences between problem and solution space artifacts Apache License 2.0 JAR Build Status

Utilities

Plugin Description License Download Status
CnfUtils SAT-Solver, CNF-Converter, Formula simplifiers, ... Apache License 2.0 JAR Build Status
CppUtils Utilities for parsing C-preprocessor statements Apache License 2.0 JAR Build Status
DBUtils SQLite readers and writers for extractors and analysis plugins Apache License 2.0 JAR Build Status
IncrementalAnalysesInfrastructure Support for incremental anlyses Apache License 2.0 JAR Build Status
IOUtils Excel readers and writers for extractors and analysis plugins Apache License 2.0 JAR Build Status
NonBooleanUtils Utilties for preparing source trees with non-boolean variables in C preprocessor analysis Apache License 2.0 JAR Build Status
BusybootPreparation Utilities for preparing Busybox and Coreboot source trees for KernelHaven Apache License 2.0 JAR Build Status

Dependencies

The following image visualizes the dependencies between the plugins (open image in a new browser tab to make plugin links clickable):

Plugin Dependencies

Setup

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

Further documentation can be found in the wiki on GitHub. A pdf version can be downloaded from here.

Video Tutorials

Introduction and Experiments

KernelHaven - Introduction and Experiments

ICSE 2018 Demonstration

KernelHaven - ICSE 2018 Demonstration Video

License

The main infrastructure (this project) is licensed under the Apache License 2.0. Plugins may have different licenses.

Acknowledgments

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.