Skip to main content

A source code mutation/transformation framework

Project description

logo-title-banner

HELIX

code-style-image

A source code mutation/transformation framework.

Description

HELIX defines three major primitives:

Blueprints

Core project layouts including templated boilerplate and methods for generating and building artifacts from a set of Components and Transforms.

Components

Small, configurable pieces of source code that represent a specific implementation of a specific functionality along with associated metadata.

Transforms

Modifications of either source code or a built artifact along with associated metadata.

Blueprints are configured with a collection of Components to include and Transforms to apply and then built to generate build artifacts.

Installation

Install HELIX from PyPI with pip, run:

pip install helix

Dependencies

Some Blueprints, Components, and Transforms include additional, non-python dependencies that must be installed separately. These can be installed automatically (if supported) with the dependencies command. For example, to install dependencies for the upx Transform, run:

helix dependencies transform upx

To install all dependencies for all installed Blueprints, Components, and Transforms, run:

helix dependencies all

Note: some Blueprints, Components, and Transforms include dependencies which must be manually installed. Using the dependencies command for these will instead list the dependencies that must be installed manually.

Usage

To list currently installed parts of HELIX:

helix list

To generate a single build, use the build command. For example, to generate a build using the cmake-cpp blueprint, with the configuration-example component (setting the second_word parameter to foo), and apply the strip transform (on supported platforms), writing output files to ./example:

helix build blueprint cmake-cpp ./example \
    -c configuration-example:second_word=foo \
    -t strip

The build command also supports loading a configuration from a JSON file and HELIX is fairly scriptable. See the examples/ directory or take a look at the full documentation for more.

Contributing

HELIX is designed to be easily extensible via entry points. Blueprints, Components, and Transforms simply need to conform to their respective abstract base classes and be exposed under their respective entry point (see the Getting Started section of the documentation for more details and a tutorial). External Blueprints, Components, and Transforms that are correctly exposed are usable in all normal HELIX commands.

Development

To set up a development environment, first clone this repo. Next, it is useful to install HELIX in editable mode with extras for development and testing:

pip install -e .[development,testing]

When developing new components it can be helpful to use HELIX's build command in verbose mode so that you can see compiler and linker output and correct any errors you may encounter:

helix build blueprint cmake-cpp novel-component -c novel-component -v

Documentation

To build the full HELIX documentation, after installing HELIX with development extras enabled, from the docs/ directory, run:

make html

Or other supported Sphinx output formats.

Testing

You can expose tests for your Components and Transforms by adding a subclass of helix.tests.UnitTestCase to the entrypoint helix.tests. Some useful testing mixins are provided in helix/tests.py and for some examples see the tests referenced in setup.py.

To test the HELIX interfaces and utilities, run:

helix test system

To test Components, Blueprints, and Transforms, run:

helix test unit

Disclaimer

DISTRIBUTION STATEMENT A. Approved for public release: distribution unlimited.

© 2021 Massachusetts Institute of Technology

  • Subject to FAR 52.227-11 – Patent Rights – Ownership by the Contractor (May 2014)
  • SPDX-License-Identifier: MIT

This material is based upon work supported by the Department of Defense under Air Force Contract No. FA8721-05-C-0002 and/or FA8702-15-D-0001. Any opinions, findings, conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the Department of Defense.

MIT License

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

helix-1.1.1.r1.tar.gz (41.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

helix-1.1.1.r1-py3-none-any.whl (64.3 kB view details)

Uploaded Python 3

File details

Details for the file helix-1.1.1.r1.tar.gz.

File metadata

  • Download URL: helix-1.1.1.r1.tar.gz
  • Upload date:
  • Size: 41.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.10

File hashes

Hashes for helix-1.1.1.r1.tar.gz
Algorithm Hash digest
SHA256 ac88463f16285e390cc4698785f1711de33655c6c2a35d34ab48dcf298078a6e
MD5 dcc2c86397f4b77ffe279c8412a56e32
BLAKE2b-256 88a74e984eae853810ad5c167caf1beba7313295a8cced694740b2fa3e8b0dea

See more details on using hashes here.

File details

Details for the file helix-1.1.1.r1-py3-none-any.whl.

File metadata

  • Download URL: helix-1.1.1.r1-py3-none-any.whl
  • Upload date:
  • Size: 64.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.10

File hashes

Hashes for helix-1.1.1.r1-py3-none-any.whl
Algorithm Hash digest
SHA256 43d0f8e35e43abbfb38a0e269c6bc9f1d6053eec8910fbbb7df52307f8400b86
MD5 12118e0c51340c78500ca42d656d87a9
BLAKE2b-256 159389d1d1551f061b67b47728c6a2b2c3b2d2cb6518e9f2a53082ed2e525f6c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page