Full Code of GrammaTech/gtirb for AI

master eb6a7af1bb97 cached
357 files
2.2 MB
603.4k tokens
2877 symbols
1 requests
Download .txt
Showing preview only (2,412K chars total). Download the full file or copy to clipboard to get everything.
Repository: GrammaTech/gtirb
Branch: master
Commit: eb6a7af1bb97
Files: 357
Total size: 2.2 MB

Directory structure:
gitextract_07t2irr6/

├── .ci/
│   ├── Dockerfile.static
│   ├── Dockerfile.ubuntu20
│   ├── Dockerfile.ubuntu22
│   ├── Dockerfile.ubuntu24
│   ├── PKGBUILD
│   ├── adjust-coverage-paths.py
│   ├── build.py
│   ├── gitlab-ci.yml
│   ├── pre-commit
│   ├── test-install-all.sh
│   ├── test-install-static.sh
│   ├── test-install.cpp
│   ├── test-install.lisp
│   ├── test-install.py
│   └── test-interop.sh
├── .clang-format
├── .clang-tidy
├── .cmake-format.yaml
├── .dockerignore
├── .flake8
├── .github/
│   └── workflows/
│       └── actions.yml
├── .gitignore
├── .gtirb.tex
├── .isort.cfg
├── .lisp-format
├── .pre-commit-config.yaml
├── AlignOf.cmake
├── AuxData.md
├── CHANGELOG.md
├── CMakeLists.googletest
├── CMakeLists.txt
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── FAQ.md
├── LICENSE.txt
├── Macros.cmake
├── PROTOBUF.md
├── README.md
├── cl/
│   ├── CMakeLists.txt
│   ├── README.md
│   ├── dot.lisp
│   ├── gtirb.asd
│   ├── gtirb.lisp
│   ├── package.lisp
│   ├── ranged.lisp
│   ├── test.lisp
│   ├── update.lisp
│   ├── utility.lisp
│   ├── validate.lisp
│   └── version.lisp
├── conanfile.py
├── cpack-config.cmake
├── doc/
│   ├── CFG-Edges.md
│   ├── CMakeLists.txt
│   ├── binary-representation.md
│   ├── cl/
│   │   ├── CMakeLists.txt
│   │   └── write-documentation.lisp
│   ├── cpp/
│   │   ├── CMakeLists.txt
│   │   ├── Doxyfile.in
│   │   ├── DoxygenLayout.xml
│   │   └── README.md
│   ├── dot/
│   │   └── gtirb.dot
│   ├── examples/
│   │   ├── CMakeLists.txt
│   │   ├── api-walkthrough.cpp
│   │   ├── cfg-paths.cpp
│   │   ├── cfg-paths.lisp
│   │   ├── cfg-paths.py
│   │   ├── cfgpaths.java
│   │   ├── data-symbols.cpp
│   │   ├── data-symbols.lisp
│   │   ├── data-symbols.py
│   │   ├── datasymbols.java
│   │   ├── functions.cpp
│   │   ├── jumps.cpp
│   │   ├── show-cfg.lisp
│   │   ├── show-cfg.py
│   │   └── stack-stamp.md
│   ├── general/
│   │   ├── AuxDataContainer.md
│   │   ├── Block.md
│   │   ├── ByteBlock.md
│   │   ├── ByteInterval.md
│   │   ├── CFG.md
│   │   ├── CMakeLists.txt
│   │   ├── COMPONENTS.md
│   │   ├── CfgEdge.md
│   │   ├── CfgEdgeLabel.md
│   │   ├── CfgNode.md
│   │   ├── CodeBlock.md
│   │   ├── DataBlock.md
│   │   ├── Doxyfile.in
│   │   ├── DoxygenLayout.xml
│   │   ├── IR.md
│   │   ├── Module.md
│   │   ├── Node.md
│   │   ├── ProxyBlock.md
│   │   ├── Section.md
│   │   ├── SymAddrAddr.md
│   │   ├── SymAddrConst.md
│   │   ├── Symbol.md
│   │   ├── SymbolicExpression.md
│   │   ├── Version.md
│   │   ├── examples.dox
│   │   └── images.dox
│   ├── java/
│   │   └── CMakeLists.txt
│   ├── preprocmd.py
│   └── python/
│       ├── CMakeLists.txt
│       └── conf.py
├── gtirbConfig.cmake.in
├── include/
│   └── gtirb/
│       ├── Addr.hpp
│       ├── Allocator.hpp
│       ├── AuxData.hpp
│       ├── AuxDataContainer.hpp
│       ├── AuxDataSchema.hpp
│       ├── ByteInterval.hpp
│       ├── CFG.hpp
│       ├── Casting.hpp
│       ├── CfgNode.hpp
│       ├── CodeBlock.hpp
│       ├── Context.hpp
│       ├── DataBlock.hpp
│       ├── DecodeMode.hpp
│       ├── ErrorOr.hpp
│       ├── Export.hpp
│       ├── IR.hpp
│       ├── Module.hpp
│       ├── Node.hpp
│       ├── Observer.hpp
│       ├── Offset.hpp
│       ├── ProxyBlock.hpp
│       ├── Section.hpp
│       ├── Symbol.hpp
│       ├── SymbolicExpression.hpp
│       ├── Utility.hpp
│       ├── gtirb.hpp
│       └── version.h.in
├── java/
│   ├── .gitignore
│   ├── CMakeLists.txt
│   ├── Version.java.in
│   ├── build.gradle
│   ├── com/
│   │   └── grammatech/
│   │       └── gtirb/
│   │           ├── AuxDataContainer.java
│   │           ├── AuxDataSchema.java
│   │           ├── AuxDataSchemas.java
│   │           ├── ByteBlock.java
│   │           ├── ByteInterval.java
│   │           ├── CFG.java
│   │           ├── CfiDirective.java
│   │           ├── CodeBlock.java
│   │           ├── DataBlock.java
│   │           ├── Edge.java
│   │           ├── ElfSymbolInfoTuple.java
│   │           ├── ElfSymbolVersionsTable.java
│   │           ├── IR.java
│   │           ├── Module.java
│   │           ├── Node.java
│   │           ├── Offset.java
│   │           ├── PeExportEntry.java
│   │           ├── PeImportEntry.java
│   │           ├── PeResourceEntry.java
│   │           ├── ProbFuncName.java
│   │           ├── ProxyBlock.java
│   │           ├── Section.java
│   │           ├── SectionPropertyTuple.java
│   │           ├── SymAddrAddr.java
│   │           ├── SymAddrConst.java
│   │           ├── Symbol.java
│   │           ├── SymbolicExpression.java
│   │           ├── TreeListItem.java
│   │           ├── TreeListUtils.java
│   │           ├── TypeTableEntry.java
│   │           ├── Util.java
│   │           ├── auxdatacodec/
│   │           │   ├── BoolCodec.java
│   │           │   ├── ByteCodec.java
│   │           │   ├── Codec.java
│   │           │   ├── FloatCodec.java
│   │           │   ├── IntegerCodec.java
│   │           │   ├── ListCodec.java
│   │           │   ├── LongCodec.java
│   │           │   ├── MapCodec.java
│   │           │   ├── OffsetCodec.java
│   │           │   ├── SetCodec.java
│   │           │   ├── ShortCodec.java
│   │           │   ├── StringCodec.java
│   │           │   ├── Tuple1Codec.java
│   │           │   ├── Tuple2Codec.java
│   │           │   ├── Tuple3Codec.java
│   │           │   ├── Tuple4Codec.java
│   │           │   ├── Tuple5Codec.java
│   │           │   ├── UuidCodec.java
│   │           │   ├── Variant11Codec.java
│   │           │   ├── Variant2Codec.java
│   │           │   └── Variant3Codec.java
│   │           ├── tuple/
│   │           │   ├── Tuple1.java
│   │           │   ├── Tuple2.java
│   │           │   ├── Tuple3.java
│   │           │   ├── Tuple4.java
│   │           │   └── Tuple5.java
│   │           └── variant/
│   │               ├── Token.java
│   │               ├── Variant11.java
│   │               ├── Variant2.java
│   │               └── Variant3.java
│   ├── pom.xml.in
│   ├── settings.gradle
│   └── tests/
│       ├── TestAuxData.java
│       ├── TestByteIntervals.java
│       ├── TestIrSanity.java
│       ├── TestModules.java
│       ├── TestSections.java
│       ├── TestSymbolicExpressions.java
│       ├── TestSymbols.java
│       ├── TestTuple.java
│       └── TestVariant.java
├── proto/
│   ├── AuxData.proto
│   ├── ByteInterval.proto
│   ├── CFG.proto
│   ├── CMakeLists.txt
│   ├── CodeBlock.proto
│   ├── DataBlock.proto
│   ├── IR.proto
│   ├── Module.proto
│   ├── Offset.proto
│   ├── ProxyBlock.proto
│   ├── Section.proto
│   ├── Symbol.proto
│   ├── SymbolicExpression.proto
│   └── v0/
│       ├── AuxData.proto
│       ├── AuxDataContainer.proto
│       ├── Block.proto
│       ├── ByteMap.proto
│       ├── CFG.proto
│       ├── CMakeLists.txt
│       ├── DataObject.proto
│       ├── IR.proto
│       ├── ImageByteMap.proto
│       ├── Module.proto
│       ├── Offset.proto
│       ├── ProxyBlock.proto
│       ├── Section.proto
│       ├── Symbol.proto
│       └── SymbolicExpression.proto
├── python/
│   ├── CMakeLists.txt
│   ├── README.md
│   ├── gtirb/
│   │   ├── __init__.py
│   │   ├── auxdata.py
│   │   ├── block.py
│   │   ├── byteinterval.py
│   │   ├── cfg.py
│   │   ├── ir.py
│   │   ├── lazyintervaltree.py
│   │   ├── module.py
│   │   ├── node.py
│   │   ├── offset.py
│   │   ├── proto/
│   │   │   └── __init__.py
│   │   ├── section.py
│   │   ├── serialization.py
│   │   ├── symbol.py
│   │   ├── symbolicexpression.py
│   │   └── util.py
│   ├── mypy.ini.in
│   ├── pyproject.toml.in
│   ├── requirements-dev.txt
│   ├── requirements-mypy.txt
│   ├── stubs/
│   │   ├── README.md
│   │   ├── intervaltree/
│   │   │   ├── __init__.pyi
│   │   │   ├── interval.pyi
│   │   │   └── intervaltree.pyi
│   │   ├── networkx/
│   │   │   ├── __init__.pyi
│   │   │   └── classes/
│   │   │       ├── __init__.pyi
│   │   │       └── multidigraph.pyi
│   │   └── sortedcontainers/
│   │       ├── __init__.pyi
│   │       └── sorteddict.pyi
│   ├── tests/
│   │   ├── hello.gtirb
│   │   ├── helpers.py
│   │   ├── test_auxdata.py
│   │   ├── test_block.py
│   │   ├── test_blocks_at.py
│   │   ├── test_blocks_at_offset.py
│   │   ├── test_blocks_on.py
│   │   ├── test_blocks_on_offset.py
│   │   ├── test_byte_intervals_at.py
│   │   ├── test_byte_intervals_on.py
│   │   ├── test_cfg.py
│   │   ├── test_deep_eq.py
│   │   ├── test_ir.py
│   │   ├── test_module.py
│   │   ├── test_node_from_uuid.py
│   │   ├── test_properties.py
│   │   ├── test_repr.py
│   │   ├── test_section.py
│   │   ├── test_serialization.py
│   │   ├── test_symbolic_expression.py
│   │   ├── test_symbolic_expressions_at.py
│   │   └── test_wrapper.py
│   ├── tox.ini
│   └── version.py.in
├── resources/
│   └── windows_version_resource.rc.in
├── src/
│   ├── AuxData.cpp
│   ├── AuxDataContainer.cpp
│   ├── ByteInterval.cpp
│   ├── CFG.cpp
│   ├── CFGSerialization.hpp
│   ├── CMakeLists.txt
│   ├── CodeBlock.cpp
│   ├── Context.cpp
│   ├── DataBlock.cpp
│   ├── ErrorOr.cpp
│   ├── IR.cpp
│   ├── Module.cpp
│   ├── Node.cpp
│   ├── Offset.cpp
│   ├── ProxyBlock.cpp
│   ├── Section.cpp
│   ├── Serialization.cpp
│   ├── Serialization.hpp
│   ├── Symbol.cpp
│   ├── SymbolicExpression.cpp
│   ├── SymbolicExpressionSerialization.hpp
│   ├── Utility.cpp
│   ├── gtirb/
│   │   └── proto/
│   │       └── CMakeLists.txt
│   └── test/
│       ├── Addr.test.cpp
│       ├── Allocator.test.cpp
│       ├── AuxData.test.cpp
│       ├── AuxDataContainer.test.cpp
│       ├── AuxDataContainerSchema.hpp
│       ├── AuxDataSchemaRegistration.test.cpp
│       ├── ByteInterval.test.cpp
│       ├── CFG.test.cpp
│       ├── CMakeLists.txt
│       ├── CodeBlock.test.cpp
│       ├── DataBlock.test.cpp
│       ├── IR.test.cpp
│       ├── Main.test.cpp
│       ├── Main.test.hpp
│       ├── MergeSortedIterator.test.cpp
│       ├── Module.test.cpp
│       ├── Node.test.cpp
│       ├── Offset.test.cpp
│       ├── PrepDeathTest.hpp
│       ├── PrepTestGTIRB.cpp
│       ├── ProxyBlock.test.cpp
│       ├── Section.test.cpp
│       ├── SerializationTestHarness.hpp
│       ├── Symbol.test.cpp
│       ├── SymbolicExpression.test.cpp
│       ├── TestHelpers.hpp
│       ├── TypedNodeTest.cpp
│       ├── UtilsDeprecatedGlobals.test.cpp
│       ├── UtilsUsingGtirbNamespace.test.cpp
│       ├── config-test.h.in
│       ├── runtests.cmake
│       ├── testInputBinary/
│       │   ├── CMakeLists.txt
│       │   └── TestInputBinary.cpp
│       └── testInterop/
│           ├── CMakeLists.txt
│           ├── test_floats.cpp
│           ├── test_floats.py
│           ├── test_variants.cpp
│           └── test_variants.py
└── version.txt

================================================
FILE CONTENTS
================================================

================================================
FILE: .ci/Dockerfile.static
================================================
FROM ubuntu:20.04

ARG BOOST_VERSION=1_68_0

SHELL ["/bin/bash", "-c"]

# Install apt packages
RUN export DEBIAN_FRONTEND=noninteractive
RUN ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime
RUN apt-get -y update && \
    apt-get -y install \
        autoconf \
        build-essential \
        clang \
        clang-format \
        cmake \
        curl \
        git \
        libprotobuf-dev \
        libprotoc-dev \
        libtool \
        protobuf-compiler \
        unzip \
        wget \
        software-properties-common
RUN TARBALL=boost_${BOOST_VERSION}.tar.bz2 && \
    curl -L https://archives.boost.io/release/1.68.0/source/${TARBALL} \
        -o /tmp/${TARBALL} --fail && \
    tar xf /tmp/${TARBALL} --one-top-level=/tmp && \
    cd /tmp/boost_${BOOST_VERSION} && \
    ./bootstrap.sh --prefix=/usr/local && \
    ./b2 include=/usr/include/python3.8 link=static install && \
    cd / && \
    rm -rf /tmp/${TARBALL} /tmp/boost_${BOOST_VERSION}


================================================
FILE: .ci/Dockerfile.ubuntu20
================================================
FROM ubuntu:20.04

# Install apt packages
ENV VIRTUAL_ENV=/opt/venv
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN apt-get -y update && \
    DEBIAN_FRONTEND=noninteractive \
    apt-get -y install \
        autoconf \
        build-essential \
        clang \
        clang-format \
        cmake \
        curl \
        default-jdk \
        doxygen \
        elpa-paredit \
        emacs-nox \
        git \
        graphviz \
        libprotobuf-dev \
        libprotoc-dev \
        libtool \
        libboost-dev \
        maven \
        protobuf-compiler \
        python3 \
        python3-pip \
        python3-setuptools \
        python3-venv \
        wget \
        software-properties-common \
        sbcl \
        slime && \
    python3 -m venv $VIRTUAL_ENV && \
    python3 -m pip install --upgrade pip

# The default version of maven from the ubuntu repositories contains a bug that
# causes warnings about illegal reflective accesses. The build on apache's
# website fixes this bug, so we use that build instead.
RUN wget https://archive.apache.org/dist/maven/maven-3/3.9.3/binaries/apache-maven-3.9.3-bin.tar.gz -P /tmp
RUN tar xf /tmp/apache-maven-*.tar.gz -C /opt
RUN update-alternatives --install /usr/bin/mvn mvn /opt/apache-maven-3.9.3/bin/mvn 392

# Install python dependencies
COPY python/requirements-dev.txt /tmp/requirements-dev.txt
RUN pip3 install -r /tmp/requirements-dev.txt


================================================
FILE: .ci/Dockerfile.ubuntu22
================================================
FROM ubuntu:22.04

ENV VIRTUAL_ENV=/opt/venv
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN apt-get -y update && \
    DEBIAN_FRONTEND=noninteractive \
    apt-get -y install \
        autoconf \
        build-essential \
        clang \
        clang-format \
        cmake \
        curl \
        default-jdk \
        doxygen \
        elpa-paredit \
        emacs-nox \
        git \
        graphviz \
        libprotobuf-dev \
        libprotoc-dev \
        libtool \
        libboost-dev \
        maven \
        protobuf-compiler \
        python3 \
        python3-pip \
        python3-setuptools \
        python3-venv \
        wget \
        software-properties-common \
        sbcl \
        slime && \
    python3 -m venv $VIRTUAL_ENV && \
    python3 -m pip install --upgrade pip

COPY python/requirements-dev.txt /tmp/requirements-dev.txt
RUN pip3 install -r /tmp/requirements-dev.txt


================================================
FILE: .ci/Dockerfile.ubuntu24
================================================
FROM ubuntu:24.04

ENV VIRTUAL_ENV=/opt/venv
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN apt-get -y update && \
    DEBIAN_FRONTEND=noninteractive \
    apt-get -y install \
        autoconf \
        build-essential \
        clang \
        clang-format \
        cmake \
        curl \
        default-jdk \
        doxygen \
        elpa-paredit \
        emacs-nox \
        git \
        graphviz \
        libprotobuf-dev \
        libprotoc-dev \
        libtool \
        libboost-dev \
        # As of 24.04.1 LTS, the clang package depends on libstdc++-13-dev but
        # appears to be compiled for libstdc++-14-dev, which we need to install
        # explicitly here.
        libstdc++-14-dev \
        maven \
        protobuf-compiler \
        python3 \
        python3-pip \
        python3-setuptools \
        python3-venv \
        wget \
        software-properties-common \
        sbcl \
        slime && \
    python3 -m venv $VIRTUAL_ENV && \
    python3 -m pip install --upgrade pip

COPY python/requirements-dev.txt /tmp/requirements-dev.txt
RUN pip3 install -r /tmp/requirements-dev.txt


================================================
FILE: .ci/PKGBUILD
================================================
# Contributor: Eric Schulte <eschulte@grammatech.com>
# Maintainer: Eric Schulte <eschulte@grammatech.com>
_srcname=gtirb
pkgname=gtirb-git
pkgver=v1.4.7.r0.gb3094954
pkgrel=1
pkgdesc="GrammaTech Intermediate Representation for Binaries"
arch=('x86_64')
url="https://github.com/grammatech/gtirb"
license=('MIT')
depends=('protobuf' 'python-networkx')
makedepends=('git' 'cmake' 'python' 'doxygen' 'graphviz' 'boost')
provides=('gtirb')
source=('git://github.com/grammatech/gtirb.git')
sha512sums=('SKIP')

pkgver() {
  cd "$_srcname"
  git describe --long --tags --exclude "gt/*" | sed 's/\([^-]*-g\)/r\1/;s/[-:/ ]/./g'
}

build() {
    cd "$_srcname/"
    cmake . -Bbuild -DCMAKE_INSTALL_PREFIX=/usr -DGTIRB_CL_API=OFF \
      -DCMAKE_BUILD_TYPE=${BUILD_TYPE-RelWithDebInfo} \
      -DCMAKE_CXX_COMPILER=${COMPILER-g++}
    cmake --build build --target all doc
}

package() {
  cd "$_srcname/"
  make -Cbuild DESTDIR="$pkgdir" install
  mkdir -p "$pkgdir"/usr/share/doc/$_srcname
  cp -R build/doc/html/ "$pkgdir"/usr/share/doc/$_srcname
}


================================================
FILE: .ci/adjust-coverage-paths.py
================================================
#!/usr/bin/env python3

import os
from argparse import ArgumentParser
from pathlib import Path
from xml.etree import ElementTree

parser = ArgumentParser(
    description="""
    Adjusts the source paths in coverage.xml to satisfy GitLab's expectations.
    Specifically, it removes the build tree prefix from the sources and
    replaces it with the source tree prefix. These prefixes are determined via
    command-line arguments or CI environment variables.
    """
)
parser.add_argument(
    "coverage",
    metavar="coverage.xml",
    type=Path,
    help="path of cobertura coverage file to fix",
)
group = parser.add_mutually_exclusive_group(required=True)
group.add_argument(
    "-i", "--in-place", action="store_true", help="rewrite coverage in place"
)
group.add_argument(
    "-o", "--output", metavar="file", help="write modified coverage to file"
)
parser.add_argument(
    "--source-dir",
    metavar="path",
    default=os.environ.get("CI_PROJECT_DIR"),
    help="root of the GTIRB repository",
)
parser.add_argument(
    "--build-dir",
    metavar="path",
    type=Path,
    help="path where coverage was run (default coverage.xml parent directory)",
)
args = parser.parse_args()

if args.source_dir is None:
    parser.error("either --source-dir or CI_PROJECT_DIR is required")
args.source_dir = Path(args.source_dir).resolve()

if args.build_dir is None:
    args.build_dir = args.coverage.parent
args.build_dir = args.build_dir.resolve()

et = ElementTree.parse(args.coverage)
for source in et.iter("source"):
    if source.text:
        relpath = Path(source.text).relative_to(args.build_dir)
        fixed = str(Path(args.source_dir, relpath))
        print("mapping", source.text, "to", fixed)
        source.text = fixed

if args.output:
    et.write(args.output)
else:
    et.write(args.coverage)


================================================
FILE: .ci/build.py
================================================
#!/usr/bin/env python
import subprocess
import sys

import conanfile


def run_conan(args):
    cmd = ["conan"] + args
    print("running: %s" % " ".join(cmd))
    sys.stdout.flush()
    subprocess.check_call(cmd)


def build(argv):
    props = conanfile.Properties()
    run_conan(["create", ".", props.conan_ref] + argv)
    archived_channels = props.archived_channels
    if props.conan_channel in archived_channels:
        run_conan(
            ["upload", props.conan_recipe, "--all", "--remote", "gitlab"]
        )
    else:
        print(
            "Conan channel not archived. Update archived_branches in "
            "conanfile.py to get archival."
        )
        print("archived channels: ")
        print(*archived_channels, sep=", ")
        print("channel built: " + props.conan_channel)


if __name__ == "__main__":
    build(sys.argv[1:])


================================================
FILE: .ci/gitlab-ci.yml
================================================
variables:
  # The IMAGE_TAG is derived from the branch name so that if a branch modifies
  # the CI images, it builds and runs using the new images without conflicting
  # with master.
  IMAGE_TAG: "$CI_COMMIT_REF_SLUG"
  GIT_SUBMODULE_STRATEGY: recursive
  EXTRA_INDEX_URL: https://__token__:$GL_PKG_API_TOKEN@git.grammatech.com/api/v4/projects/1587/packages/pypi/simple
  # The follow two variables are used by the package-uploader.
  PROJECT_ID: $CI_PROJECT_ID
  PIPELINE_ID: $CI_PIPELINE_ID
  CONAN_PASSWORD: $CI_JOB_TOKEN
  CONAN_VERSION: "1.59"
  # Limit build parallelism to avoid overwhelming CI servers.
  MAKE_JOBS: 8

stages:
  - build-images
  - prebuild
  - build
  - build-installers
  - test-setup
  - test-packages1
  - test-packages2
  - deploy
  - deploy-apt
  - upload

default:
  tags: [shared]

.build-ci-image: &build-ci-image
  stage: build-images
  image:
    name: quay.io/buildah/stable
  script:
    # Configure authentication credentials for GitLab
    - buildah login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
    - buildah login -u "$DOCKERHUB_USERNAME" -p "$DOCKERHUB_PASSWORD" https://index.docker.io/v1/
    # Build our image (using a cache if available)
    - >-
      buildah build
      -f "$CI_PROJECT_DIR/$DOCKERFILE_PATH"
      --cache-from "$DOCKER_REGISTRY/$CI_PROJECT_PATH/$IMAGE_NAME/cache"
      --cache-to "$DOCKER_REGISTRY/$CI_PROJECT_PATH/$IMAGE_NAME/cache"
      --layers
      --tag "$DOCKER_REGISTRY/$CI_PROJECT_PATH/$IMAGE_NAME:$IMAGE_TAG"
      "$CI_PROJECT_DIR"
    # Push to our internal registry
    - buildah push "$DOCKER_REGISTRY/$CI_PROJECT_PATH/$IMAGE_NAME:$IMAGE_TAG"
    # If we're on the master branch, also push the latest tag.
    - >-
      if [ "$CI_COMMIT_BRANCH" = "$CI_DEFAULT_BRANCH" ]; then
        buildah push "$DOCKER_REGISTRY/$CI_PROJECT_PATH/$IMAGE_NAME:$IMAGE_TAG" \
            "$DOCKER_REGISTRY/$CI_PROJECT_PATH/$IMAGE_NAME:latest"
      fi

build-ci-image-ubuntu20:
  <<: *build-ci-image
  variables:
    DOCKERFILE_PATH: .ci/Dockerfile.ubuntu20
    IMAGE_NAME: ubuntu20

build-ci-image-ubuntu22:
  <<: *build-ci-image
  variables:
    DOCKERFILE_PATH: .ci/Dockerfile.ubuntu22
    IMAGE_NAME: ubuntu22

build-ci-image-ubuntu24:
  <<: *build-ci-image
  variables:
    DOCKERFILE_PATH: .ci/Dockerfile.ubuntu24
    IMAGE_NAME: ubuntu24

build-ci-image-static:
  <<: *build-ci-image
  variables:
    DOCKERFILE_PATH: .ci/Dockerfile.static
    IMAGE_NAME: static

check-format:
  stage: prebuild
  image: $DOCKER_REGISTRY/rewriting/gtirb/ubuntu20:$IMAGE_TAG
  script:
    - |+
      pre-commit run --all-files --show-diff-on-failure || ( (cat <<EOF
      ================================================================================
      If this stage fails, the formatting of your changes may be incorrect.
      To automatically format your files, install pre-commit:
          pip3 install pre-commit
          pre-commit install
      pre-commit will now automatically format any files before commit.
      To fix any misformatted files, run:
          pre-commit run --all-files
      And then commit any changes.
      More information regarding pre-commit can be found at https://pre-commit.com.

      NOTE FOR PROJECTS WITH C/C++ CODE:
      pre-commit will by default use the correct version of every formatting tool
      EXCEPT FOR clang-format. You need to ensure the version of clang-format you
      use is EXACTLY version 10.0.0. This is available in Ubuntu 20 by default.

      See also:
          https://git.grammatech.com/research/meta/-/wikis/infrastructure/infrastructure#running-ci-jobs-locally-for-debugging
          http://otsego.grammatech.com/u4/Videos/2020-09-11-Lunchtime-Seminar/
      ================================================================================
      EOF
      ) && exit 1)

build-docs:
  stage: build
  image: $DOCKER_REGISTRY/rewriting/gtirb/ubuntu24:$IMAGE_TAG
  artifacts:
    name: "$CI_COMMIT_REF_NAME-$CI_JOB_NAME"
    paths:
      - html
  script:
    - pip install -r python/requirements-dev.txt -r python/requirements-mypy.txt
    - cmake -Bbuild . -DGTIRB_ENABLE_TESTS=OFF
    - cd build
    - pip install ./python/
    - make doc
    - mv doc/html ..

.build-template: &build
  stage: build
  image: $DOCKER_REGISTRY/rewriting/gtirb/$IMAGE_NAME:$IMAGE_TAG
  artifacts:
    name: "$CI_COMMIT_REF_NAME-$CI_JOB_NAME"
    paths:
      - build
  script:
    - mkdir build
    - cd build
    - RELEASE_VERSION=OFF
    - '[[ ! $CI_COMMIT_REF_NAME =~ ^release-.* ]] || RELEASE_VERSION=ON'
    - >
      cmake ../
      -DCMAKE_BUILD_TYPE=$BUILD_TYPE
      -DCMAKE_CXX_COMPILER=${CXX_COMPILER:-g++}
      -DCPACK_DEBIAN_PACKAGE_RELEASE="$(lsb_release -sc)"
      -DENABLE_CODE_COVERAGE=${ENABLE_CODE_COVERAGE:-OFF}
      -DGTIRB_BUILD_SHARED_LIBS=${GTIRB_BUILD_SHARED_LIBS:-ON}
      -DGTIRB_PACKAGE_POLICY=$PACKAGE_POLICY
      -DGTIRB_RELEASE_VERSION=$RELEASE_VERSION
      -DGTIRB_STRIP_DEBUG_SYMBOLS=On
      -DGTIRB_CL_API=${GTIRB_CL_API:-OFF}
      -DGTIRB_CXX_API=${GTIRB_CXX_API:-OFF}
      -DGTIRB_JAVA_API=${GTIRB_JAVA_API:-OFF}
      -DGTIRB_PY_API=${GTIRB_PY_API:-OFF}
    - make -j${MAKE_JOBS}
    - ctest --output-on-failure

build-ubuntu20-gcc:
  variables:
    IMAGE_NAME: 'ubuntu20'
    GTIRB_CXX_API: 'ON'
    CXX_COMPILER: 'g++'
    CPACK_GENERATOR: 'DEB'
    BUILD_TYPE: 'RelWithDebInfo'
    PACKAGE_POLICY: "unix"
  <<: *build

build-ubuntu22-gcc:
  variables:
    IMAGE_NAME: 'ubuntu22'
    GTIRB_CXX_API: 'ON'
    CXX_COMPILER: 'g++'
    CPACK_GENERATOR: 'DEB'
    BUILD_TYPE: 'RelWithDebInfo'
    PACKAGE_POLICY: "unix"
  <<: *build

build-ubuntu24-gcc:
  variables:
    IMAGE_NAME: 'ubuntu24'
    GTIRB_CXX_API: 'ON'
    CXX_COMPILER: 'g++'
    CPACK_GENERATOR: 'DEB'
    BUILD_TYPE: 'RelWithDebInfo'
    PACKAGE_POLICY: "unix"
  <<: *build

build-ubuntu24-gcc-debug:
  variables:
    IMAGE_NAME: 'ubuntu24'
    GTIRB_CXX_API: 'ON'
    CXX_COMPILER: 'g++'
    BUILD_TYPE: 'Debug'
    PACKAGE_POLICY: "unix"
  <<: *build

build-ubuntu24-clang-debug:
  variables:
    IMAGE_NAME: 'ubuntu24'
    GTIRB_CXX_API: 'ON'
    CXX_COMPILER: 'clang++'
    BUILD_TYPE: 'Debug'
    PACKAGE_POLICY: "unix"
  <<: *build

build-static:
  variables:
    IMAGE_NAME: 'static'
    GTIRB_CXX_API: 'ON'
    CXX_COMPILER: 'g++'
    BUILD_TYPE: 'RelWithDebInfo'
    GTIRB_BUILD_SHARED_LIBS: 'OFF'
  <<: *build

build-java:
  variables:
    IMAGE_NAME: 'ubuntu24'
    GTIRB_JAVA_API: 'ON'
  <<: *build

build-lisp:
  variables:
    IMAGE_NAME: 'ubuntu20'
    GTIRB_CL_API: 'ON'
  <<: *build

build-ubuntu20-python:
  variables:
    IMAGE_NAME: 'ubuntu20'
    GTIRB_PY_API: 'ON'
  <<: *build

build-ubuntu24-python:
  variables:
    IMAGE_NAME: 'ubuntu24'
    GTIRB_PY_API: 'ON'
  <<: *build

generate-coverage:
  variables:
    IMAGE_NAME: 'ubuntu24'
    BUILD_TYPE: 'Debug'
    CXX_COMPILER: 'g++'
    ENABLE_CODE_COVERAGE: 'ON'
    GTIRB_CXX_API: 'ON'
    GTIRB_PY_API: 'ON'
  artifacts:
    # Upload coverage reports and source for report-coverage-* jobs to use.
    paths:
      - build/**/*.gcno
      - build/**/*.gcda
      - build/python/.coverage*
      - build/**/*.py
      - build/**/*.h
      - build/**/*.cc
      - build/**/*.cpp
  before_script:
    - pip install "gcovr>=8.6" coverage
  <<: *build

# > If there is more than one matched line in the job output, the last line is used
# https://docs.gitlab.com/ee/ci/yaml/index.html#coverage
# We output the two coverage numbers in separate jobs(report-coverage-*) so
# that both can be reported to GitLab.
report-coverage-cpp:
  stage: build
  needs: [generate-coverage]
  image: $DOCKER_REGISTRY/rewriting/gtirb/ubuntu24:$IMAGE_TAG
  coverage: '/^TOTAL.*\s+(\d+\%)$/'
  script:
    - pip install "gcovr>=8.6"
    - cd build
    - gcovr --exclude=googletest-src --exclude=doc --exclude=..*/proto --exclude=..*/test --root ..

report-coverage-py:
  stage: build
  needs: [generate-coverage]
  image: $DOCKER_REGISTRY/rewriting/gtirb/ubuntu24:$IMAGE_TAG
  coverage: '/^TOTAL.*\s+(\d+\%)$/'
  artifacts:
    reports:
      coverage_report:
        coverage_format: cobertura
        path: build/python/coverage.xml
  script:
    - pip install -r python/requirements-dev.txt
    - cd build/python
    - tox run -e report
    - ../../.ci/adjust-coverage-paths.py --in-place coverage.xml --build-dir ..


# The build artifact timestamps may be out-of-date relative to the newly cloned
# repository for later jobs. These commands will update the timestamps to bring
# them up to date without actually building much. This is significantly faster
# than rebuilding out-of-date files in the later jobs.
.update-artifact-timestamps: &update-artifact-timestamps
  - make -C build --touch

python-wheel:
  stage: build-installers
  needs: [build-ubuntu24-python]
  image: $DOCKER_REGISTRY/rewriting/gtirb/ubuntu24:$IMAGE_TAG
  artifacts:
    name: "$CI_COMMIT_REF_NAME-$CI_JOB_NAME"
    paths:
      - gtirb-*-py*-none-any.whl
  script:
    - *update-artifact-timestamps
    - pip3 wheel --no-deps build/python

python-wheel-unstable:
  stage: build-installers
  needs: [python-wheel]
  image: $DOCKER_REGISTRY/rewriting/gtirb/ubuntu24:$IMAGE_TAG
  rules:
    - if: '$CI_COMMIT_BRANCH == "master"'
  artifacts:
    name: "$CI_COMMIT_REF_NAME-$CI_JOB_NAME"
    paths:
      - gtirb-unstable-py3-none-any.whl
  script:
    - cp gtirb-*-py*-none-any.whl ./gtirb-unstable-py3-none-any.whl

test-capstone-example:
  stage: test-packages1
  image: $DOCKER_REGISTRY/rewriting/gtirb/ubuntu24:$IMAGE_TAG
  needs: ['build-ubuntu24-gcc']
  script:
    - *update-artifact-timestamps
    - cd build
    - '[[ ! -f bin/ex-jumps ]]'
    - apt-get install -y libcapstone-dev
    - cmake ..
    - make -j${MAKE_JOBS}
    - '[[ -f bin/ex-jumps ]]'

test-default-install:
  stage: test-packages1
  image: $DOCKER_REGISTRY/rewriting/gtirb/$IMAGE_NAME:$IMAGE_TAG
  variables:
    IMAGE_NAME: 'ubuntu24'
    COMPILER: 'g++-9'
  needs: ['build-ubuntu24-gcc']
  script:
    - *update-artifact-timestamps
    - make -C build install && rm -rf build
    - LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH .ci/test-install-all.sh

test-default-install-static:
  stage: test-packages1
  image: $DOCKER_REGISTRY/rewriting/gtirb/static:$IMAGE_TAG
  needs: ['build-static']
  script:
    - *update-artifact-timestamps
    - '[ -e build/lib/libgtirb.a ]'
    - '[ ! -e build/lib/libgtirb.so ]'
    - make -C build install
    - rm -rf build
    - LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH .ci/test-install-static.sh

test-install-different-prefix:
  stage: test-packages1
  image: $DOCKER_REGISTRY/rewriting/gtirb/$IMAGE_NAME:$IMAGE_TAG
  variables:
    IMAGE_NAME: 'ubuntu24'
    COMPILER: 'g++-9'
  needs: ['build-ubuntu24-gcc']
  script:
    - *update-artifact-timestamps
    - cmake . -B build -DCMAKE_INSTALL_PREFIX=/tmp/prefix
    - make -C build install
    - rm -rf build
    - >
      CPPFLAGS=-I/tmp/prefix/include
      LDFLAGS=-L/tmp/prefix/lib
      LD_LIBRARY_PATH=/tmp/prefix/lib
      .ci/test-install-all.sh

test-install-with-destdir:
  stage: test-packages1
  image: $DOCKER_REGISTRY/rewriting/gtirb/$IMAGE_NAME:$IMAGE_TAG
  variables:
    IMAGE_NAME: 'ubuntu24'
    COMPILER: 'g++-9'
  needs: ['build-ubuntu24-gcc']
  script:
    - *update-artifact-timestamps
    - DESTDIR=/tmp/destdir make -C ./build install
    - >
      CPPFLAGS=-I/tmp/destdir/usr/local/include
      LDFLAGS=-L/tmp/destdir/usr/local/lib
      LD_LIBRARY_PATH=/tmp/destdir/usr/local/lib
      .ci/test-install-all.sh

test-interop:
  stage: test-packages1
  needs: ['build-ubuntu24-gcc', 'python-wheel']
  image: ${DOCKER_REGISTRY}/rewriting/gtirb/ubuntu24:$IMAGE_TAG
  script:
    - *update-artifact-timestamps
    - pip3 install gtirb-*-py*-none-any.whl
    - .ci/test-interop.sh

.conan-linux: &conan-linux
  stage: deploy
  needs: [check-format]
  image: $DOCKER_REGISTRY/rewriting/gtirb/$IMAGE_NAME:$IMAGE_TAG
  script:
    - python3 -m pip install --upgrade conan~=$CONAN_VERSION
    - conan profile new default --detect
    - conan profile update settings.compiler.libcxx=libstdc++11 default
    - conan remote add gitlab ${CI_API_V4_URL}/packages/conan
    - conan user ci_user -r gitlab -p
    - export PYTHONPATH="$(pwd)"
    - python3 .ci/build.py

conan-linux-gcc9:
  variables:
    IMAGE_NAME: ubuntu20
  <<: *conan-linux

conan-linux-gcc11:
  variables:
    IMAGE_NAME: ubuntu22
  <<: *conan-linux

.conan-windows: &conan-windows
  stage: deploy
  needs: [check-format]
  tags: [ddisasm-windows]
  artifacts:
    name: "$CI_COMMIT_REF_NAME-$CI_JOB_NAME"
    paths:
      - gtirb*.zip
  script:
    # Setting CI_PROJECT_DIR to $(pwd) because CI doesn't properly set CI_PROJECT_DIR with VirtualBox runners.
    - export CI_PROJECT_DIR=`cygpath -w $(pwd)`
    # Initialize
    - systeminfo
    - python -m pip install --upgrade conan~=$CONAN_VERSION
    - export PYTHONPATH=$CI_PROJECT_DIR
    # Setup Remote and Authenticate
    - conan remote add gitlab ${CI_API_V4_URL}/packages/conan
    - conan user ci_user -r gitlab -p
    # Build
    - export GTIRB_DISABLE_PARALLEL_BUILD=1
    - python .ci/build.py -s build_type=$BUILD_TYPE
    # Install
      # Python print() on Windows returns CRLF and will cause issues in CI - use "print('string', end='')" when outputting from python.
    - export PKG_INSTALL_NAME=`python -c "import conanfile; print(conanfile.Properties().conan_recipe, end='')"`
    - conan install $PKG_INSTALL_NAME -g deploy --build=missing --install-folder="./packages"
    # Package
    - export PKG_NAME=`conan inspect . --raw name`
    - export PKG_VERSION=`conan inspect . --raw version`
    - export PKG_ARCH=`uname -m`
    - cd ./packages
      # Library Package
    - export PKG_FILENAME="${CI_PROJECT_DIR}\\${PKG_NAME}-${PKG_VERSION}.win10.${PKG_ARCH}.zip"
    - export PKG_MANIFEST=(
        "gtirb/bin/gtirb.dll"
        "gtirb/licenses/LICENSE.txt"
      )
    - zip -r $PKG_FILENAME ${PKG_MANIFEST[@]}
      # Development Package
    - export PKG_FILENAME_DEV="${CI_PROJECT_DIR}\\${PKG_NAME}-dev-${PKG_VERSION}.win10.${PKG_ARCH}.zip"
    - export PKG_MANIFEST_DEV=(
        "${PKG_MANIFEST[@]}"
        "gtirb/lib/gtirb.lib"
        "gtirb/include/gtirb"
      )
    - zip -r $PKG_FILENAME_DEV ${PKG_MANIFEST_DEV[@]}

conan-windows-debug:
  variables:
    BUILD_TYPE: Debug
  <<: *conan-windows

conan-windows-release:
  variables:
    BUILD_TYPE: Release
  <<: *conan-windows

conan-windows-32:
  stage: deploy
  tags: [ddisasm-windows]
  needs: []
  variables:
    ARCHITECTURE: x64
  script:
    - systeminfo
    - export PATH="C:\\Program Files\\Python38;$PATH"
    - export PYTHONPATH="$(cygpath -w $(pwd))"
    # Install conan
    - python -m pip install --upgrade conan~=$CONAN_VERSION
    # Setup Remote and Authenticate
    - conan remote add gitlab ${CI_API_V4_URL}/packages/conan
    - conan user ci_user -r gitlab -p
    # The boost options disable building boost with libiconv.  This is important, because we can't get the package to build with --build=libiconv.
    - CI_PROJECT_DIR=$(cygpath -w $(pwd)) python .ci/build.py -s arch=x86 -s compiler.runtime=MT --build=protobuf -o protobuf:with_zlib=False --build=gtirb --build=boost -o boost:zlib=False -o boost:bzip2=False -o boost:without_locale=True -o boost:without_log=True --build=missing

external-pypi:
  stage: deploy
  needs: [build-ubuntu24-gcc, python-wheel]
  image: $DOCKER_REGISTRY/rewriting/gtirb/ubuntu24:$IMAGE_TAG
  rules:
    - if: '$CI_COMMIT_REF_NAME =~ /^release-.*/'
  script:
    - pip3 install twine wheel setuptools pkginfo --upgrade
    - pip3 install gtirb-*-py*-none-any.whl
    - GTIRB_VERSION=$(python3 -c "import gtirb; print(gtirb.__version__)")
    # We won't be releasing our dev packages externally, so fail if this is a
    # .dev package.
    - if [[ "$GTIRB_VERSION" =~ \.dev[[:digit:]]*(\+.*)?$ ]]; then exit 1; fi
    - twine check gtirb-*-py*-none-any.whl
    - twine upload gtirb-*-py*-none-any.whl -u __token__ -p $PYPI_API_KEY

# On master, we only upload and overwrite `.dev` versions of the python
# package.  Non-.dev versions should only be uploaded on versioned
# release-.* branches.  This is so the versioning of our python packages
# coincides with that of our conan packages, where dev packages are
# produced from master, and stable, versioned packages are produced
# on release-.* branches.
internal-pypi:
  stage: deploy
  needs: [build-ubuntu24-gcc, python-wheel]
  image: python:3.9
  rules:
    - if: '$CI_COMMIT_BRANCH == "master"'
    - if: '$CI_COMMIT_REF_NAME =~ /^release-.*/'
  script:
    - pip3 install twine wheel setuptools pkginfo --upgrade
    - wget https://git.grammatech.com/research/templates/python-module/raw/master/.pypirc
    - sed "s/password = <access token>/password = $GL_PKG_API_TOKEN/" .pypirc > ~/.pypirc
    - pip3 install gtirb-*-py*-none-any.whl
    - NEW_VERSION=$(python3 -c "import gtirb; print(gtirb.__version__)")
    - if [[ "$NEW_VERSION" =~ \.dev[[:digit:]]*(\+.*)?$ && "$CI_COMMIT_REF_NAME" =~ ^release-.* ]]; then exit 1; fi
    - if [[ "$CI_COMMIT_BRANCH" == "master" ]]; then
        if [[ ! "$NEW_VERSION" =~ \.dev[[:digit:]]*$ ]]; then
          echo "[ERROR] Only .dev versions can be uploaded from the master branch.";
          exit 1;
        fi;
        if pip3 install --extra-index-url=$EXTRA_INDEX_URL "gtirb>$NEW_VERSION" 2>/dev/null; then
          echo "[ERROR] The package version being published on master should always be >= the version in the repository.";
          exit 1;
        fi;
        wget https://git.grammatech.com/research/templates/python-module/raw/master/delete_remote_packages.py;
        python3 delete_remote_packages.py $GL_PKG_API_TOKEN gtirb-*-py*-none-any.whl;
      fi
    - twine check gtirb-*-py*-none-any.whl
    - twine upload --verbose --repository repypi gtirb-*-py*-none-any.whl

# Apt packaging related jobs
.build-ubuntu-packages: &build-ubuntu-packages
  stage: build-installers
  artifacts:
    name: "$CI_COMMIT_REF_NAME-$CI_JOB_NAME"
    paths:
      - build
  script:
    - pip3 install setuptools wheel --upgrade
    - cd build
    - cpack -G "DEB" -D CPACK_GTIRB_PACKAGE=debian-lib;
    - cpack -G "DEB" -D CPACK_GTIRB_PACKAGE=debian-dev;
    - cpack -G "DEB" -D CPACK_GTIRB_PACKAGE=debian-debug;

build-ubuntu20-packages:
  needs: [build-ubuntu20-gcc]
  image: $DOCKER_REGISTRY/rewriting/gtirb/ubuntu20:$IMAGE_TAG
  <<: *build-ubuntu-packages

build-ubuntu22-packages:
  needs: [build-ubuntu22-gcc]
  image: $DOCKER_REGISTRY/rewriting/gtirb/ubuntu22:$IMAGE_TAG
  <<: *build-ubuntu-packages

build-ubuntu24-packages:
  needs: [build-ubuntu24-gcc]
  image: $DOCKER_REGISTRY/rewriting/gtirb/ubuntu24:$IMAGE_TAG
  <<: *build-ubuntu-packages

.setup-test-apt-repo: &setup-test-apt-repo
  stage: test-setup
  artifacts:
    name: "$CI_COMMIT_REF_NAME-$CI_JOB_NAME"
    paths:
      - apt-repo
  script:
    - mkdir apt-repo
    - cp build/*.deb apt-repo
    - cd apt-repo && dpkg-scanpackages . /dev/null > Packages


.test-ubuntu-libgtirb-dev: &test-ubuntu-libgtirb-dev
  stage: test-packages1
  artifacts:
    name: "$CI_COMMIT_REF_NAME-$CI_JOB_NAME"
    paths:
      - test-install
  script:
    - echo -e "\ndeb [trusted=yes] file:$(pwd)/apt-repo ./\n" >> /etc/apt/sources.list
    - cat /etc/apt/sources.list
    - 'TEST_PKG_NAME=$(dpkg --info apt-repo/libgtirb-dev_*.deb | sed -n "s/Package: //p")'
    - apt-get update -y && apt-get install -y --allow-unauthenticated $TEST_PKG_NAME
    - cp .ci/test-install.cpp ./
    - g++ test-install.cpp -std=c++17 -o test-install -lgtirb -lstdc++
    - ./test-install

.test-ubuntu-libgtirb: &test-ubuntu-libgtirb
  stage: test-packages2
  script:
    - echo -e "\ndeb [trusted=yes] file:$(pwd)/apt-repo ./\n" >> /etc/apt/sources.list
    - 'TEST_PKG_NAME=$(dpkg --info apt-repo/libgtirb_*.deb | sed -n "s/Package: //p")'
    - apt-get update -y && apt-get install -y --allow-unauthenticated $TEST_PKG_NAME
    - ./test-install

.test-ubuntu-libgtirb-dbg: &test-ubuntu-libgtirb-dbg
  stage: test-packages1
  script:
    - echo -e "\ndeb [trusted=yes] file:$(pwd)/apt-repo ./\n" >> /etc/apt/sources.list
    - 'TEST_PKG_NAME=$(dpkg --info apt-repo/libgtirb-dbg_*.deb | sed -n "s/Package: //p")'
    - apt-get update -y && apt-get install -y --allow-unauthenticated $TEST_PKG_NAME
    - '[ -f /usr/lib/debug/.build-id/$(readelf -n /usr/lib/libgtirb.so | grep ''Build ID: '' | cut -d":" -f2 | sed -E ''s/ ([a-f0-9]{2,})([a-f0-9]{30,})/\1\/\2/g'').debug ];'

setup-ubuntu20-test-apt-repo:
  image: $DOCKER_REGISTRY/rewriting/gtirb/ubuntu20:$IMAGE_TAG
  needs: [build-ubuntu20-packages]
  <<: *setup-test-apt-repo

setup-ubuntu22-test-apt-repo:
  image: $DOCKER_REGISTRY/rewriting/gtirb/ubuntu22:$IMAGE_TAG
  needs: [build-ubuntu22-packages]
  <<: *setup-test-apt-repo

setup-ubuntu24-test-apt-repo:
  image: $DOCKER_REGISTRY/rewriting/gtirb/ubuntu24:$IMAGE_TAG
  needs: [build-ubuntu24-packages]
  <<: *setup-test-apt-repo

test-ubuntu20-libgtirb-dev:
  image: $DOCKER_REGISTRY/rewriting/gtirb/ubuntu20:$IMAGE_TAG
  needs: [setup-ubuntu20-test-apt-repo]
  <<: *test-ubuntu-libgtirb-dev

test-ubuntu22-libgtirb-dev:
  image: $DOCKER_REGISTRY/rewriting/gtirb/ubuntu22:$IMAGE_TAG
  needs: [setup-ubuntu22-test-apt-repo]
  <<: *test-ubuntu-libgtirb-dev

test-ubuntu24-libgtirb-dev:
  image: $DOCKER_REGISTRY/rewriting/gtirb/ubuntu24:$IMAGE_TAG
  needs: [setup-ubuntu24-test-apt-repo]
  <<: *test-ubuntu-libgtirb-dev

test-ubuntu20-libgtirb-dbg:
  image: $DOCKER_REGISTRY/rewriting/gtirb/ubuntu20:$IMAGE_TAG
  needs: [setup-ubuntu20-test-apt-repo]
  <<: *test-ubuntu-libgtirb-dbg

test-ubuntu22-libgtirb-dbg:
  image: $DOCKER_REGISTRY/rewriting/gtirb/ubuntu22:$IMAGE_TAG
  needs: [setup-ubuntu22-test-apt-repo]
  <<: *test-ubuntu-libgtirb-dbg

test-ubuntu24-libgtirb-dbg:
  image: $DOCKER_REGISTRY/rewriting/gtirb/ubuntu24:$IMAGE_TAG
  needs: [setup-ubuntu24-test-apt-repo]
  <<: *test-ubuntu-libgtirb-dbg

test-ubuntu20-libgtirb:
  image: $DOCKER_REGISTRY/rewriting/gtirb/ubuntu20:$IMAGE_TAG
  needs: [setup-ubuntu20-test-apt-repo,test-ubuntu20-libgtirb-dev]
  <<: *test-ubuntu-libgtirb

test-ubuntu22-libgtirb:
  image: $DOCKER_REGISTRY/rewriting/gtirb/ubuntu22:$IMAGE_TAG
  needs: [setup-ubuntu22-test-apt-repo,test-ubuntu22-libgtirb-dev]
  <<: *test-ubuntu-libgtirb

test-ubuntu24-libgtirb:
  image: $DOCKER_REGISTRY/rewriting/gtirb/ubuntu24:$IMAGE_TAG
  needs: [setup-ubuntu24-test-apt-repo,test-ubuntu24-libgtirb-dev]
  <<: *test-ubuntu-libgtirb

.debian-installer: &debian-installer
  stage: deploy
  artifacts:
    name: "$CI_COMMIT_REF_NAME-$CI_JOB_NAME"
    paths:
      - '*gtirb*.deb'
  script:
    - cp build/*gtirb*.deb ./

debian-installer-ubuntu20:
  image: $DOCKER_REGISTRY/rewriting/gtirb/ubuntu20:$IMAGE_TAG
  needs: [test-ubuntu20-libgtirb, build-ubuntu20-packages]
  <<: *debian-installer

.apt-upload: &apt-upload
  stage: deploy-apt
  trigger:
    project: rewriting/utility/package-uploader
    strategy: depend

apt-public-ubuntu20-unstable:
  <<: *apt-upload
  rules:
    - if: '$CI_COMMIT_BRANCH == "master"'
  variables:
    JOB_NAME: debian-installer-ubuntu20
    APT_REPO: public
    APT_REPO_CODENAMES: focal
    APT_REPO_COMPONENT: unstable

apt-public-ubuntu20-stable:
  <<: *apt-upload
  rules:
    - if: '$CI_COMMIT_REF_NAME =~ /^release-.*/'
  variables:
    JOB_NAME: debian-installer-ubuntu20
    APT_REPO: public
    APT_REPO_CODENAMES: focal
    APT_REPO_COMPONENT: stable

apt-internal-ubuntu20-unstable:
  <<: *apt-upload
  rules:
    - if: '$CI_COMMIT_BRANCH == "master"'
  variables:
    JOB_NAME: debian-installer-ubuntu20
    APT_REPO: internal
    APT_REPO_CODENAMES: focal
    APT_REPO_COMPONENT: unstable

apt-internal-ubuntu20-stable:
  <<: *apt-upload
  rules:
    - if: '$CI_COMMIT_REF_NAME =~ /^release-.*/'
  variables:
    JOB_NAME: debian-installer-ubuntu20
    APT_REPO: internal
    APT_REPO_CODENAMES: focal
    APT_REPO_COMPONENT: stable

maven-central-upload:
  stage: deploy
  needs: [build-java]
  trigger:
    project: rewriting/utility/package-uploader
    strategy: depend
  rules:
    - if: '$CI_COMMIT_REF_NAME == "master"'
    - if: '$CI_COMMIT_REF_NAME =~ /^release-.*/'
  variables:
    JOB_NAME: build-java
    JAVA_POM_SUBDIR: ./build/java

.windows-upload: &windows-upload
  stage: upload
  trigger:
    project: rewriting/utility/package-uploader
    strategy: depend
  needs: [conan-windows-release]

windows-upload-public:
  <<: *windows-upload
  rules:
    - if: '$CI_COMMIT_REF_NAME =~ /^release-.*/'
    - if: '$CI_COMMIT_REF_NAME == "master"'
  variables:
    JOB_NAME: conan-windows-release
    FILESERVER: public
    FILESERVER_SUBDIR_NAME: windows-release

windows-upload-internal:
  <<: *windows-upload
  rules:
    - if: '$CI_COMMIT_REF_NAME =~ /^release-.*/'
    - if: '$CI_COMMIT_REF_NAME == "master"'
  variables:
    JOB_NAME: conan-windows-release
    FILESERVER: internal
    FILESERVER_SUBDIR_NAME: windows-release

wheel-upload-public:
  stage: upload
  trigger:
    project: rewriting/utility/package-uploader
    strategy: depend
  needs: [python-wheel-unstable]
  rules:
    - if: '$CI_COMMIT_REF_NAME == "master"'
  variables:
    JOB_NAME: python-wheel-unstable
    FILESERVER: public
    FILESERVER_SUBDIR_NAME: python


================================================
FILE: .ci/pre-commit
================================================
#!/bin/bash
OUTPUT=$(git clang-format --diff)
if [ "${OUTPUT}" == "no modified files to format" ] ||
   [ "${OUTPUT}" == "clang-format did not modify any files" ];then
    exit 0
else
    echo "Run git clang-format, then commit."
    exit 1
fi


================================================
FILE: .ci/test-install-all.sh
================================================
#!/bin/sh -e

set -o xtrace
set -o nounset
set -o errexit

builddir=$(pwd)
workdir=`mktemp -d`
trap 'cd / ; rm -rf $workdir' EXIT
cd $workdir

# Compile and run a C++ file that links to libgtirb
cp $builddir/.ci/test-install.cpp ./
make CXXFLAGS=-std=c++17 LDLIBS=-lgtirb test-install
./test-install


================================================
FILE: .ci/test-install-static.sh
================================================
#!/bin/sh -e

set -o xtrace
set -o nounset
set -o errexit

builddir=$(pwd)
workdir=`mktemp -d`
trap 'cd / ; rm -rf $workdir' EXIT
cd $workdir

# Compile and run a C++ file that links to libgtirb statically
cp $builddir/.ci/test-install.cpp ./
make 'CXXFLAGS=-std=c++17' 'LDLIBS=-lgtirb -lgtirb_proto -lprotobuf -lpthread' test-install
./test-install


================================================
FILE: .ci/test-install.cpp
================================================
#include <gtirb/gtirb.hpp>
#include <cstdio>
#include <fstream>

int main() {
  auto filename = std::tmpnam(nullptr);
  std::ofstream ofs{filename, std::ios_base::binary};
  auto ctx1 = gtirb::Context();
  auto ir1 = gtirb::IR::Create(ctx1);
  ir1->save(ofs);
  ofs.close();
  std::ifstream ifs{filename, std::ios_base::binary};
  auto ctx2 = gtirb::Context();
  if (auto ir2 = gtirb::IR::load(ctx2, ifs)) {

    return ir2.get()->modules().empty() ? 0 : 1;
  };
  return 1;
}


================================================
FILE: .ci/test-install.lisp
================================================
(in-package :gtirb)

(uiop/stream:with-temporary-file (:pathname path :keep nil)
  (let ((it (make-instance 'gtirb))
        (test-string "Something."))
    (push (cons "test" (make-instance 'aux-data)) (aux-data it))
    (setf (aux-data-type (cdar (aux-data it))) :string
          (aux-data-data (cdar (aux-data it))) test-string)
    (write-gtirb it path)
    (assert (string= (aux-data-data (cdar (aux-data (read-gtirb path))))
                     test-string)
            (path) "AuxData in GTIRB at ~s holds ~s." path test-string)))


================================================
FILE: .ci/test-install.py
================================================
import sys
import tempfile

import gtirb

filename = tempfile.mktemp()
ir = gtirb.IR()
ir.save_protobuf(filename)
ir = gtirb.IR.load_protobuf(filename)
sys.exit(len(ir.modules))


================================================
FILE: .ci/test-interop.sh
================================================
#!/bin/bash
set -e
cd build

failures=0

check() {
    local creator=$1
    local auxdata=$2
    local consumer=$3
    shift 3

    if "$@" ; then
        echo $creator $auxdata AuxData work in $consumer
    else
        failures=$(( failures + 1))
    fi
}

### floating-point compatiblity test

bin/test_floats -w floats_cpp.gtirb
python3 src/test/testInterop/test_floats.py -w floats_py.gtirb

check python float c++ \
    bin/test_floats -r floats_py.gtirb
check c++ float python \
    python3 src/test/testInterop/test_floats.py -r floats_cpp.gtirb

rm floats_{cpp,py}.gtirb

### variant compatibility test

bin/test_variants -w variants_cpp.gtirb
python3 src/test/testInterop/test_variants.py -w variants_py.gtirb

check c++ variant python \
    python3 src/test/testInterop/test_variants.py -r variants_cpp.gtirb
check python variant c++ \
    bin/test_variants -r variants_py.gtirb

rm variants_{cpp,py}.gtirb

test $failures = 0


================================================
FILE: .clang-format
================================================
---
Language:        Cpp
# BasedOnStyle:  LLVM
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlinesLeft: false
AlignOperands:   true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: false
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
  AfterClass:      false
  AfterControlStatement: false
  AfterEnum:       false
  AfterFunction:   false
  AfterNamespace:  false
  AfterObjCDeclaration: false
  AfterStruct:     false
  AfterUnion:      false
  BeforeCatch:     false
  BeforeElse:      false
  IndentBraces:    false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Attach
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit:     80
CommentPragmas:  '^ IWYU pragma:'
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat:   false
ExperimentalAutoDetectBinPacking: false
ForEachMacros:   [ foreach, Q_FOREACH, BOOST_FOREACH ]
# IncludeBlocks: Regroup
IncludeCategories:
  - Regex:           '^".*"'
    Priority:        1
  - Regex:           '^<gtirb/.*'
    Priority:        2
  - Regex:           '^<proto/.*'
    Priority:        2
#IncludeIsMainRegex: '([-_](test|unittest))?$'
IndentCaseLabels: false
IndentWidth:     2
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd:   ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Left
ReflowComments:  true
SortIncludes:    true
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles:  false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard:        Cpp11
TabWidth:        8
UseTab:          Never
---
Language:        Proto
---
Language:        Java
IndentWidth:     4
...


================================================
FILE: .clang-tidy
================================================
---
Checks:          '-*,clang-analyzer-*,bugprone*,modernize*,performance*,-modernize-pass-by-value,-modernize-use-auto,-modernize-use-using,-performance-unnecessary-value-param,-modernize-use-trailing-return-type'
WarningsAsErrors: ''
HeaderFilterRegex: ''
AnalyzeTemporaryDtors: false
FormatStyle:     none
...


================================================
FILE: .cmake-format.yaml
================================================
# disable splitting of arguments based on the sheer number of them;
# prefer to split by line length
max_subargs_per_line: 9999
# layout parens in CMake like how we layout brackets in C++
dangle_parens: true
# match the case of intrinsics as used through most of the codebase previosly
command_case: lower
keyword_case: upper
# try autosort (disable this if it causes bugs)
autosort: true


================================================
FILE: .dockerignore
================================================
.git/
.ci/


================================================
FILE: .flake8
================================================
# Black feels free to violate some rules because they're PEP8 extensions and
# not PEP8 itself. So we must ignore:
#   E203: Whitespace before ':': Black does "a[b : c]"; flake8 wants "a[b:c]".
#   W503: Line break occurred before a binary operator: Black puts operators in front of lines, flake8 wants them after.
# more detail is available at https://black.readthedocs.io/en/stable/the_black_code_style.html.

[flake8]
ignore = E203,W503

# Ignore unused variables in tests, which tend to come up when building gtirb.
per-file-ignores =
  python/tests/*:F841


================================================
FILE: .github/workflows/actions.yml
================================================
name: GTIRB Docs
on: [push]

jobs:
  docker:
    runs-on: ubuntu-latest
    permissions:
      packages: write
    strategy:
      matrix:
        os: [focal]
        include:
          - os: focal
            file_suffix: ubuntu20
    outputs:
      image_tag: ${{ steps.vars.outputs.image_tag }}
      image_path: ${{ steps.vars.outputs.image_path }}
    steps:
        # We must generate output variables here in order to ensure the
        # reference is lowercase, even if the repository reference is not
        # (e.g., because of the organization "GrammaTech").
        # For the tag, we replace forward slashes with hyphens and use the tag
        # the "latest" for the "master" branch.
        # We'd like to just generate the environment variables, but the `env`
        # context is not available in the "jobs.<id>.container" field, despite
        # what the Context Availability documentation says. See:
        # https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability
      - id: vars
        run: |
          export IMAGE_TAG=$([ "${{ github.ref_name }}" == "master" ] && echo latest || echo ${{ github.ref_name }} | sed -e "s/\//-/g")
          echo "image_tag=$IMAGE_TAG" >> $GITHUB_ENV
          echo "image_tag=$IMAGE_TAG" >> $GITHUB_OUTPUT
          export IMAGE_PATH=$(echo ghcr.io/${{ github.repository }}/ | awk '{print tolower($0)}')
          echo "image_path=$IMAGE_PATH" >> $GITHUB_ENV
          echo "image_path=$IMAGE_PATH" >> $GITHUB_OUTPUT
      - uses: actions/checkout@master
      - name: Build image
        env:
          image_reference: ${{ env.image_path }}${{ matrix.os }}
        run: |
          buildah login -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} ghcr.io
          buildah build \
              -f .ci/Dockerfile.${{ matrix.file_suffix }} \
              --cache-from ${{ env.image_reference }}-cache \
              --cache-to ${{ env.image_reference }}-cache \
              --layers \
              --tag ${{ env.image_reference }}:${{ env.image_tag }}
          buildah push ${{ env.image_reference }}:${{ env.image_tag }}

  docs:
    runs-on: ubuntu-latest
    permissions:
      packages: read
    strategy:
      matrix:
        os: [focal]
    needs: docker
    container: ${{ needs.docker.outputs.image_path }}${{ matrix.os }}:${{ needs.docker.outputs.image_tag }}
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Generate documentation
        run: |
          cmake -DGTIRB_ENABLE_TESTS=OFF -B build .
          cd build/python
          pip install -e '.[doc]'
          cd ..
          cmake ..
          make doc
          mv doc/html ../public
      - name: Upload GitHub Pages artifact
        uses: actions/upload-pages-artifact@v3
        with:
          path: public

  deploy-pages:
    needs: docs
    if: github.ref == 'refs/heads/master'
    permissions:
      pages: write
      id-token: write

    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}

    runs-on: ubuntu-latest
    steps:
      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@v4


================================================
FILE: .gitignore
================================================
*~
*.fasl
*.o
*.out
*.pc
out.gtir
CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
Makefile
cmake_install.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake
build/
build-doc/
bin/
doc/html/
googletest-download/
googletest-src/
gsl-download/
gsl-src/
include/gsl/
include/proto/
wiki/
scratch.lisp
/include/gtirb/version.h
/java/com/grammatech/gtirb/proto/
.mypy_cache/
__pycache__/
.vscode/

.gtirb.pdf


================================================
FILE: .gtirb.tex
================================================
\begin{tikzpicture}%% Caption: GrammaTech IR for Binaries is a data structure that implicitly represents binary structures required for modification.  Elements postifxed with "(1)" are singleton in any IR instance every other structure can appear in multiple.  Every elements is assigned a Universal Unique Identifier (UUID) which can be used to reference the element from an AuxData table.  AuxData tables hold open-ended analysis results.
  %% #fig:gtirb
  [
    object/.style = {draw},
    owner/.style = {thick},
    owner-many/.style = {-triangle 90 reversed,thick},
    reference/.style = {owner, dashed, ->},
  ]
  \node[object, ] (ir) {IR (1)};
  \node[object, below right=1em and 2em of ir, text width=6.25em] (ad0) {AuxData};
  \node[below=0.25em of ad0.south] (ad1) {ID1 \& DATA1};
  \node[below=0em of ad1] (ad2) {ID2 \& DATA2};
  \node[below=0em of ad2] (ad3) {ID3 \& DATA3};
  \node[below=0em of ad3] (ad4) {\ldots{}};
  \node[fit={(ad1) (ad4)}, draw, thick, dotted, inner sep=0.25em] (auxdata) {};
  \node[right=2em of auxdata] (anything) {{\em any UUID}};
  \node[object, above right=4.5em and 2em of ir] (cfg) {CFG (1)};
  \node[object, right=4em of cfg, text width=5em] (edges) {Edges};

  \node[object, right=4em of ir, text width=6em] (modules) {Modules};
  \node[object, below right=1em and 4em of modules, text width=6em] (symbols) {Symbols};

  \node[object, right=4em of modules, text width=6em] (sections) {Sections};

  \node[object, right=2em of sections, text width=8em] (byteintervals) {ByteIntervals};

  \node[object, above=2em of byteintervals, text width=8em] (proxies) {Proxy blocks};
  \node[object, right=2.5em of proxies, text width=7em] (codeblocks) {Code Blocks};
  \node[object, below=0.5em of codeblocks, text width=7em] (datablocks) {Data Blocks};
  \node[fit={(proxies) (codeblocks)}, draw, thick, dotted] (edgeblocks) {};
  \node[] at (edges -| proxies) (eblocks) {Edge Blocks};
  \node[fit={(codeblocks) (datablocks)}, draw, thick, dotted, inner sep=0.75em] (byteblocks) {};
  \node[] at (eblocks -| byteblocks) (bblocks) {Byte Blocks};

  \node[object, below right=1em and 2.5em of byteintervals, text width=10.5em] (symexpr) {SymbolicExpressions};

  %% References
  \draw[reference] (edges.east) |- (eblocks);
  \draw[reference] (edges.east) -| ++(2,1) -| (bblocks.north);
  \draw[reference] (symbols.east) -| ++(2,-1) -| (symexpr.south);
  \draw[reference] (auxdata) -- (anything);

  %% Ownership
  \draw[owner-many] (ir) -- (modules);
  \draw[owner] (ir) -- ++(1.0,0) |- (cfg);
  \draw[owner-many] (ir) -- ++(1.0,0) |- (ad0);
  \draw[owner-many] (cfg) -- (edges);
  \draw[owner-many] (modules) -- ++(1.5,0) |- (symbols);
  \draw[owner-many] (modules) -- (sections);
  \draw[owner-many] (modules) -- ++(1.5,0) |- (edgeblocks);
  \draw[owner-many] (modules.south) -- (ad0.north-|modules.south);
  \draw[owner-many] (sections) -- (byteintervals);
  \draw[owner-many] (byteintervals) -- ++(1.75,0) |- (symexpr);
  \draw[owner-many] (byteintervals) -- ++(1.75,0) |- (bblocks);

  %% Local Variables:
  %% mode: latex
  %% end:
\end{tikzpicture}


================================================
FILE: .isort.cfg
================================================
# Settings are chosen to be compatible with black:
#   https://black.readthedocs.io/en/stable/the_black_code_style.html#how-black-wraps-lines
# For details on each setting:
#   https://github.com/timothycrosley/isort/wiki/isort-Settings
[settings]
line_length=79
multi_line_output=3
include_trailing_comma=true
force_grid_wrap=0


================================================
FILE: .lisp-format
================================================
;;;; -*- emacs-lisp -*-
;;;;
;;;; For information about how to use lisp-format see it's
;;;; documentation, which is available in a comment at the top of the
;;;; lisp-format script or, equivalently, in the README available at:
;;;;
;;;;     https://github.com/eschulte/lisp-format
;;;;
(mapc (lambda (dir) (add-to-list 'load-path dir))
      (apply #'append
             (mapcar
              (lambda (pkg-glob)
                (cl-loop for path in
                   (directory-files
                    ;; Use quicklisp if the user has it setup.
                    (if (getenv "QUICK_LISP")
                        (concat (getenv "QUICK_LISP") "/dists/quicklisp/software/")
                      ;; Search for the site-lisp path in load-path
                      (add-to-list 'load-path "/usr/share/emacs25/site-lisp/elpa/")
                      (add-to-list 'load-path "/usr/share/emacs/site-lisp/elpa/")
                      (cl-loop for path in load-path
                         if (and (string-match-p "site-lisp" path)
                                 (file-expand-wildcards (concat (file-name-as-directory path) "slime*")))
                         do (cl-return path)))
                    t pkg-glob)
                   if (file-directory-p path) collect path))
              (list "slime*" "paredit*"))))

(defun verbose-require (package)
  (unless (ignore-errors (require package))
    (message "Failed to load the package '%S'." package)
    (message "Ensure %s is installed locally, and then edit your" package)
    (message "\"~/.lisp-formatrc\" file adding %s to your load path.\n" package)
    (message "    (add-to-list 'load-path </path/to/%s.el>)\n" package)
    ;; After printing the messages require again to trigger the error.
    (require package)))
(verbose-require 'slime)
(verbose-require 'paredit)

(set-default 'indent-tabs-mode nil)
(pushnew 'untabify *lisp-format-fixers*)

(defun fix-trailing-parens (start end &optional _arg)
  "Use `paredit-close-parenthesis' to fix trailing parens."
  (interactive (if current-prefix-arg
                   (list (point-min) (point-max) current-prefix-arg)
                 (list (region-beginning) (region-end) nil)))
  (let ((c (current-column)))
    (save-excursion
      (save-restriction
        (narrow-to-region (point-min) end)
        (goto-char start)
        (while (re-search-forward "^ *)" nil t)
        (forward-char -1)
        (paredit-close-parenthesis))))
  (move-to-column c)))
(pushnew 'fix-trailing-parens *lisp-format-fixers*)

;;; Syntax table extension for curry-compose-reader-macros
(modify-syntax-entry ?\[ "(]" lisp-mode-syntax-table)
(modify-syntax-entry ?\] ")[" lisp-mode-syntax-table)
(modify-syntax-entry ?\{ "(}" lisp-mode-syntax-table)
(modify-syntax-entry ?\} "){" lisp-mode-syntax-table)
(modify-syntax-entry ?\« "(»" lisp-mode-syntax-table)
(modify-syntax-entry ?\» ")«" lisp-mode-syntax-table)

;;; Specify indentation levels for specific functions.
(mapc (lambda (pair) (put (first pair) 'lisp-indent-function (second pair)))
      '((make-instance 1)
        (if-let 1)
        (if-let* 1)
        (when-let 1)
        (when-let* 1)
        (defixture 1)
        (lambda-bind 1)
        (signals 1)
        (match 1)
        (start-case 1)
        (define-proto-backed-class 4)
        (register-groups-bind 2)))

(defun define-feature-lisp-indent
    (path state indent-point sexp-column normal-indent)
  "Indentation function called by `lisp-indent-function' for define-feature."
  ;; (message "CALLED: %S"
  ;;          (list 'define-feature-lisp-indent
  ;;                path state indent-point sexp-column normal-indent))
  (cond
   ((equalp path '(2)) 2)   ; Doc string for enclosing define-feature.
   ((equalp path '(3)) 2)   ; Extractor function definition.
   ((equalp path '(3 2)) 4) ; Doc string for extractor.
   ((equalp path '(4)) 2)   ; Merge function definition.
   (t nil)))                ; Otherwise do the default.
(put 'define-feature 'lisp-indent-function 'define-feature-lisp-indent)


================================================
FILE: .pre-commit-config.yaml
================================================
repos:
  - repo: https://github.com/psf/black
    rev: 22.3.0
    hooks:
      - id: black
        args: ["--line-length", "79"]
      - id: black
        name: black (.pyi)
        args: ["--line-length", "79"]
        types: [pyi]
  - repo: local
    hooks:
      - id: clang-format
        name: clang-format
        language: system
        files: \.(c|h|cpp|hpp|proto|java)$
        entry: clang-format -i
  - repo: https://github.com/eschulte/lisp-format
    rev: master
    hooks:
      - id: lisp-format
        name: lisp-format
        args: [-style=file]
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v2.4.0
    hooks:
      - id: end-of-file-fixer
      - id: trailing-whitespace
        args: ["--chars"," \t"]
      - id: check-merge-conflict
      - id: check-yaml
        args: [--allow-multiple-documents]
      - id: debug-statements
      - id: mixed-line-ending
  - repo: https://github.com/iconmaster5326/cmake-format-pre-commit-hook
    rev: v0.6.2
    hooks:
      - id: cmake-format
        exclude: build
  - repo: https://github.com/timothycrosley/isort
    rev: 5.13.2
    hooks:
      - id: isort
        files: \.py$
  - repo: https://github.com/PyCQA/flake8
    rev: 7.1.0
    hooks:
      - id: flake8


================================================
FILE: AlignOf.cmake
================================================
macro(ALIGNOF TYPE LANG NAME)
  if(NOT ALIGNOF_${NAME})
    #
    # Try to compile and run a foo grogram. The alignment result will be stored
    # in ALIGNOF_${CHECK_TYPE}
    #

    set(INCLUDE_HEADERS
        "#include <stddef.h>
			#include <stdio.h>
			#include <stdlib.h>"
    )

    foreach(File ${CMAKE_REQUIRED_INCLUDES})
      set(INCLUDE_HEADERS "${INCLUDE_HEADERS}\n#include <${File}>\n")
    endforeach()

    set(INCLUDE_HEADERS "${INCLUDE_HEADERS}\n#include <stdint.h>\n")

    file(
      WRITE
      "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/c_get_${NAME}_alignment.${LANG}"
      "${INCLUDE_HEADERS}
			int main(){
				char diff;
				struct foo {char a; ${TYPE} b;};
				struct foo *p = (struct foo *) malloc(sizeof(struct foo));
				diff = ((char *)&p->b) - ((char *)&p->a);
				return diff;
			}"
    )

    try_run(
      ALIGNOF_${NAME}
      COMPILE_RESULT
      "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/"
      "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/c_get_${NAME}_alignment.${LANG}"
      COMPILE_OUTPUT_VARIABLE "ALIGNOF_${NAME}_COMPILE_VAR"
    )

    if(NOT COMPILE_RESULT)
      message(
        FATAL_ERROR
          "Check alignment of ${TYPE} in ${LANG}: compilation failed: ${ALIGNOF_${NAME}_COMPILE_VAR}"
      )
    else()
      message(
        STATUS "Check alignment of ${TYPE} in ${LANG}: ${ALIGNOF_${NAME}}"
      )
    endif()
  endif()
endmacro()


================================================
FILE: AuxData.md
================================================
Standard AuxData Schemata
=========================

The \ref AUXDATA_GROUP class provides generic storage for
application-specific data. This allows data to be attached to either
the IR or Module classes in GTIRB.

We specify a small number of standard gtirb::AuxData schemata to
support interoperability. These are listed below, in two sets:

- [Sanctioned](#sanctioned-auxdata-tables) Recommended for GTIRB
  users. Individual schemata are unlikely to change in future,
  although the set of Sanctioned schemata may grow.

- [Provisional](#provisional-auxdata-tables) Under consideration for
  'sanctioned' status.

For example, if you want to store alignment requirements for blocks
and data objects, you can use an [alignment](#alignment) table.

```c++
// Leverage definitions for the sanctioned AuxData tables.
#include <gtirb/AuxDataSchema.hpp>

// Define your own custom AuxData tables.
// By convention, we put these in the namespace gtirb::schema.
//
// Note that if the custom type requires custom serialization, a
// specialization of the auxdata_traits template also has to be
// provided. We provide default specializations for many standard
// types.
namespace gtirb {
namespace schema {
struct MyAuxDataFoo {
  static constexpr const char* Name = "foo";
  typedef Foo Type;
};
}
}

using namespace gtirb;
using namespace schema;

// Register AuxData types before using GTIRB.
void call_me_from_main()
{
  AuxDataContainer::registerAuxDataType<Alignment>();
  AuxDataContainer::registerAuxDataType<MyAuxDataFoo>();
}

void do_stuff_with_gtirb()
{
  Context C;
  IR& ir = *IR::Create(C);
  ir.addModule(Module::Create(C));
  Module& module = *ir.modules_begin();

  // Attach an empty alignment table to the internal representation
  module.addAuxData<Alignment>(std::map<UUID, uint64_t>{});

  //...

  // Create a new block
  Section* section = module.addSection(C, ".text");
  ByteInterval* interval = section->addByteInterval(C, Addr(400), 1000);
  CodeBlock* b1 = interval->addBlock<CodeBlock>(C, 64, 6);

  // Record that the block should be aligned to 8-byte boundaries.
  // First fetch the map AuxData.
  auto* align_map = module.getAuxData<Alignment>();

  // Check for null if you don't know that the module definitely has
  // an existing Alignment AuxData attached.
  if (align_map)
    (*align_map)[b1->getUUID()] = 8;

  // Attach a custom "Foo" object.
  // Note that AuxData uses a move reference
  Foo my_foo = BuildAFoo();
  module.addAuxData<MyAuxDataFoo>(std::move(my_foo));

  // Subsequently access the Foo table through the AuxData interface.
  module.getAuxData<MyAuxDataFoo>()->some_member_function();
}
```


## Sanctioned AuxData Tables

The following are the sanctioned AuxData table schemata.


| Label                                     | Type                                               |
|-------------------------------------------|----------------------------------------------------|
| [`"elfDynamicInit"`](#elfDynamicInit)     | ```gtirb::UUID```                                  |
| [`"elfDynamicFini"`](#elfDynamicFini)     | ```gtirb::UUID```                                  |
| [`"elfSoname"`](#elfSoname)               | ```std::string```                                  |
| [`"elfStackExec"`](#elfStackExec)         | ```bool```                                         |
| [`"elfStackSize"`](#elfStackSize)         | ```uint64_t```                                     |
| [`"functionBlocks"`](#functionblocks)     | ```std::map<gtirb::UUID, std::set<gtirb::UUID>>``` |
| [`"functionEntries"`](#functionentries)   | ```std::map<gtirb::UUID, std::set<gtirb::UUID>>``` |
| [`"functionNames"`](#functionnames)       | ```std::map<gtirb::UUID, gtirb::UUID>```           |
| [`"types"`](#types)                       | ```std::map<gtirb::UUID, std::string>```           |
| [`"alignment"`](#alignment)               | ```std::map<gtirb::UUID, uint64_t>```              |
| [`"comments"`](#comments)                 | ```std::map<gtirb::Offset, std::string>```         |
| [`"symbolForwarding"`](#symbolforwarding) | ```std::map<gtirb::UUID, gtirb::UUID>```           |
| [`"padding"`](#padding)                   | ```std::map<gtirb::Offset, uint64_t>```            |


### elfDynamicInit

| <!-- --> | <!-- -->                                           |
|----------|----------------------------------------------------|
| Label    | ```"elfDynamicInit"```                             |
| Type     | ```gtirb::UUID```                                  |
| Value    |  CodeBlock UUID                                    |
| AttachedTo | gtirb::Module |
| Note     | The CodeBlock to which a DT_INIT entry in an ELF file's .dynamic section refers. |

### elfDynamicFini

| <!-- --> | <!-- -->                                           |
|----------|----------------------------------------------------|
| Label    | ```"elfDynamicFini"```                             |
| Type     | ```gtirb::UUID```                                  |
| Value    |  CodeBlock UUID                                    |
| AttachedTo | gtirb::Module |
| Note     | The CodeBlock to which a DT_FINI entry in an ELF file's .dynamic section refers. |

### elfSoname

| <!-- --> | <!-- -->                                           |
|----------|----------------------------------------------------|
| Label    | ```"elfSoname"```                                  |
| Type     | ```std::string```                                  |
| Value    | The SONAME of a library.                           |
| AttachedTo | gtirb::Module |
| Note     | The string value which the DT_SONAME entry in an ELF file's .dynamic section contains. |

### elfStackExec

| <!-- --> | <!-- -->                                           |
|----------|----------------------------------------------------|
| Label    | ```"elfStackExec"```                               |
| Type     | ```bool```                                         |
| Value    | Stack executable flag specified by PT_GNU_STACK segment in ELF files. |
| AttachedTo | gtirb::Module |

### elfStackSize

| <!-- --> | <!-- -->                                           |
|----------|----------------------------------------------------|
| Label    | ```"elfStackSize"```                               |
| Type     | ```uint64_t```                                     |
| Value    | The size of the PT_GNU_STACK segment in ELF files, which may influence the runtime stack size in certain environments. |
| AttachedTo | gtirb::Module |

### functionBlocks

| <!-- --> | <!-- -->                                           |
|----------|----------------------------------------------------|
| Label    | ```"functionBlocks"```                             |
| Type     | ```std::map<gtirb::UUID, std::set<gtirb::UUID>>``` |
| Key      | Function UUID.                                     |
| Value    | The set of UUIDs of all the blocks (gtirb::CodeBlock) in the function. |
| AttachedTo | gtirb::Module |
| Note     | This table identifies all of the gtirb::CodeBlocks that belong to each function. These do not necessarily have to be contiguous in the address space. Note that there is no function notion in the core GTIRB IR. A function's UUID is just a unique identifier that is consistently used across all function-related AuxData tables. |


### functionEntries

| <!-- --> | <!-- -->                                           |
|----------|----------------------------------------------------|
| Label    | ```"functionEntries"```                            |
| Type     | ```std::map<gtirb::UUID, std::set<gtirb::UUID>>``` |
| Key      | Function UUID.                                     |
| Value    | The set of UUIDs of all the entry blocks (gtirb::CodeBlock) for the function. |
| AttachedTo | gtirb::Module |
| Note     | This table identifies all gtirb::CodeBlocks that represent entry points to each function. A single function may have more than one entry point. Note that there is no function notion in the core GTIRB IR. A function's UUID is just a unique identifier that is consistently used across all function-related AuxData tables. |


### functionNames

| <!-- --> | <!-- -->                                                            |
|----------|---------------------------------------------------------------------|
| Label    | ```"functionNames"```                                               |
| Type     | ```std::map<gtirb::UUID, gtirb::UUID>```                            |
| Key      | Function UUID.                                                      |
| Value    | The UUID of a gtrb::Symbol whose `name` field contains the name of the function. |
| AttachedTo | gtirb::Module |
| Note     | There may be more than one gtirb::Symbol associated with the address(es) corresponding to the entry point(s) of a function. This table identifies a canonical gtirb::Symbol to be used for each function. Note that there is no function notion in the core GTIRB IR. A function's UUID is just a unique identifier that is consistently used across all function-related AuxData tables. |


### types

| <!-- --> | <!-- -->                                |
|----------|-----------------------------------------|
| Label    | ```"types"```                           |
| Type     | ```std::map<gtirb::UUID,std::string>``` |
| Key      | The gtirb::UUID of a gtirb::DataBlock. |
| Value    | The type of the data, expressed as a std::string containing a C++ type specifier. |
| AttachedTo | gtirb::Module |
| Note     | An entry in this table indicates that the given gtirb::DataBlock contains content that exhibits the given C++ type. |


### alignment

| <!-- --> | <!-- -->                                                  |
|----------|-----------------------------------------------------------|
| Label    | ```"alignment"```                                         |
| Type     | ```std::map<gtirb::UUID, uint64_t>```                     |
| Key      | The gtirb::UUID of a gtirb::CodeBlock, gtirb::DataBlock, or gtirb::Section. |
| Value    | Alignment requirements for the block/data object/section. |
| AttachedTo | gtirb::Module |
| Note     |  An entry in this table indicates that the given object's address is required to be evenly divisible by the alignment value. Typically the alignment value is a power of 2. |


### comments

| <!-- --> | <!-- -->                                   |
|----------|--------------------------------------------|
| Label    | ```"comments"```                           |
| Type     | ```std::map<gtirb::Offset, std::string>``` |
| Key      | The gtirb::Offset of a comment.            |
| Value    | A comment string relevant to the specified offset in the specified GTIRB entry. |
| AttachedTo | gtirb::Module |
| Note     | The gtirb::Offset refers to the UUID of an entity in memory and a byte offset within that entity to indicate the point at which the comment applies. Comments can contain arbitrary content and are likely generated by analysis tools. They often do not (but may) represent comments present in the original source code of the binary. |


### symbolForwarding

| <!-- --> | <!-- -->                                     |
|----------|----------------------------------------------|
| Label    | ```"symbolForwarding"```                     |
| Type     | ```std::map<gtirb::UUID,gtirb::UUID>```      |
| Key      | The gtirb::UUID of the "from" gtirb::Symbol. |
| Value    | The gtirb::UUID of the "to" gtirb::Symbol.   |
| AttachedTo | gtirb::Module |
| Note     | This table is intended to support cross-module references. A "from" symbol in one gtirb::Module may be dynamically bound at runtime to the "to" symbol in another gtirb::Module, thereby modeling dynamic library runtime linkage. |


### padding

| <!-- --> | <!-- -->                                       |
|----------|------------------------------------------------|
| Label    | ```"padding"```                                |
| Type     | ```std::map<gtirb::Offset, uint64_t>```        |
| Key      | The gtirb::Offset at which padding is present. |
| Value    | The length of the padding, in bytes.           |
| AttachedTo | gtirb::Module |
| Note     | Padding here may be 0's or it may be valid instructions. An entry in this table indicates that an analysis has determined that at the given gtirb::Offset (UUID of an entity in memory and byte offset into that entity) and length of bytes indicated constitute content that is unused by the program and is only present to ensure alignment of neighboring objects. Note: some disassemblers may still create a gtirb::CodeBlock or gtirb::DataBlock for the same portion of address space that a padding entry covers. |


## Provisional AuxData Tables

The following are the provisional AuxData table schemata.


| Label                                                       | Type                                                                                                         |
|-------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------|
| [`"binaryType"`](#binarytype)                               | ```std::vector<std::string>```                                                                               |
| [`"cfiDirectives"`](#cfidirectives)                         | ```std::map<gtirb::Offset, std::vector<std::tuple<std::string, std::vector<int64_t>, gtirb::UUID>>>```       |
| [`"elfSymbolInfo"`](#elfsymbolinfo)                         | ```std::map<gtirb::UUID, std::tuple<uint64_t, std::string, std::string, std::string, uint64_t>>```           |
| [`"elfSymbolVersions"`](#elfsymbolversions)                 | ```std::tuple<std::map<uint16_t, std::tuple<std::vector<std::string>, uint16_t>>, std::map<std::string, std::map<uint16_t, std::string>>, std::map<gtirb::UUID, std::tuple<uint16_t, bool>>>```           |
| [`"encodings"`](#encodings)                                 | ```std::map<gtirb::UUID, std::string>```                                                                     |
| [`"functionNameProbabilities"`](#functionnameprobabilities) | ```std::map<std::string, std::map<gtirb::UUID, std::vector<std::tuple<std::string, std::string, float>>>>``` |
| [`"includedLibraryNames"`](#includedlibrarynames)           | ```std::map<gtirb::UUID, std::string>```                                                                     |
| [`"includedLibraryVersions"`](#includedlibraryversions)     | ```std::map<gtirb::UUID, std::string>```                                                                     |
| [`"libraries"`](#libraries)                                 | ```std::vector<std::string>```                                                                               |
| [`"libraryPaths"`](#librarypaths)                           | ```std::vector<std::string>```                                                                               |
| [`"peExportEntries"`](#peexportentries)                     | ```std::vector<std::tuple<uint64_t, int64_t, std::string>>```                                                |
| [`"peExportedSymbols"`](#peexportedsymbols)                 | ```std::vector<gtirb::UUID>```                                                                               |
| [`"peImportEntries"`](#peimportentries)                     | ```std::vector<std::tuple<uint64_t, int64_t, std::string, std::string>>```                                   |
| [`"peImportedSymbols"`](#peimportedsymbols)                 | ```std::vector<gtirb::UUID>```                                                                               |
| [`"peResource"`](#peresource)                               | ```std::vector<std::tuple<std::vector<uint8_t>, gtirb::Offset, uint64_t>>```                                 |
| [`"profile"`](#profile)                                     | ```std::map<gtirb::UUID, uint64_t>```                                                                        |
| [`"prototypeTable"`](#prototypetable)                       | ```std::map<gtirb::UUID, gtirb::UUID>```                                                                     |
| [`"sccs"`](#sccs)                                           | ```std::map<gtirb::UUID, int64_t>```                                                                         |
| [`"sectionProperties"`](#sectionproperties)           | ```std::map<gtirb::UUID, std::tuple<uint64_t, uint64_t>>>>```                                                |
| [`"symbolicExpressionSizes"`](#symbolicexpressionsizes)     | ```std::map<gtirb::Offset, uint64_t>```                                                                      |
| [`"typeTable"`](#typetable)                                 | ```std::map<gtirb::UUID, std::variant<uint64_t, std::tuple<uint8_t>, std::tuple<int8_t, uint64_t>, uint64_t, uint64_t, std::tuple<gtirb::UUID, std::vector<gtirb::UUID>>, gtirb::UUID, std::tuple<gtirb::UUID, uint64_t>, tuple<uint64_t, std::vector<tuple<uint64_t, gtirb::UUID>>>, std::tuple<uint8_t>, gtirb::UUID>>``` |


### encodings

| <!-- --> | <!-- -->                                       |
|----------|------------------------------------------------|
| Label    | ```"encodings"```                                |
| Type     | ```std::map<gtirb::UUID, std::string>```        |
| Key      | The gtirb::UUID of a data object. |
| Value    | The encoding of the data object.           |
| AttachedTo | gtirb::Module |
| Note     | Map from (typed) data objects to the encoding of the data,  expressed as a std::string containing an assembler encoding specifier: "string", "uleb128" or "sleb128". |


### elfSymbolVersions

| <!-- --> | <!-- -->                                       |
|----------|------------------------------------------------|
| Label    | ```"elfSymbolVersions"```                                |
| Type     | ```std::tuple<std::map<uint16_t, std::tuple<std::vector<std::string>, uint16_t>>, std::map<std::string, std::map<uint16_t, std::string>>, std::map<gtirb::UUID, std::tuple<uint16_t, bool>>>```        |
| Key      | The gtirb::UUID of a section. |
| Value    | The tuple with the ELF section types and flag.           |
| AttachedTo | gtirb::Module |
| Note     | Tuple with symbol version definitions, needed symbol versions, and a mapping of symbol UUIDs to symbol versions. Symbol version definitions are  `ElfSymDefs = std::map<SymbolVersionId, std::tuple<std::vector<std::string>>, uint16_t>`, a map from symbol version identifiers version definitions. These correspond to `ELFxx_Verdef` entries in the ELF section `.gnu.version_d`. The values in the map are tuples containing the list of versions strings and the verdef flags. The verdef flag may be `VER_FLG_BASE` (0x1), which indicates that the given version definiton is the file itself, and must not be used for matching a symbol. The first element of the list is the version itself, the subsequent elements are predecessor versions. The needed symbol versions are `ElfSymVerNeeded = std::map<std::string, std::map<SymbolVersionId, std::string>>`, a map from dynamic library names to the symbol versions that they need. For each library, we have a map from version identifiers to version strings. Finally, symbol UUIDs are mapped to symbol versions as `ElfSymbolVersionsEntries = std::map<gtirb::UUID, std::tuple<SymbolVersionId,bool>>`, where the `bool` represents the `HIDDEN` attribute. Symbol version identifiers are `SymbolVersionId = uint16_t` integers. |


### cfiDirectives

| <!-- --> | <!-- -->                                       |
|----------|------------------------------------------------|
| Label    | ```"cfiDirectives"```                                |
| Type     | ```std::map<gtirb::Offset, std::vector<std::tuple<std::string, std::vector<int64_t>, gtirb::UUID>>>```        |
| Key      | The gtirb::Offset of a cfi directive. |
| Value    | cfi directive contains: a string describing the directive, a vector  of numeric arguments, and an optional symbolic argument (represented with the UUID of the symbol           |
| AttachedTo | gtirb::Module |
| Note     | Map from Offsets to  vector of cfi directives. A cfi directive contains: a string describing the directive, a vector  of numeric arguments, and an optional symbolic argument (represented with the UUID of the symbol). |


### elfSymbolInfo

| <!-- --> | <!-- -->                                       |
|----------|------------------------------------------------|
| Label    | ```"elfSymbolInfo"```                                |
| Type     | ```std::map<gtirb::UUID, std::tuple<uint64_t, std::string, std::string, std::string, uint64_t>>```        |
| Key      | The gtirb::UUID of a symbol. |
| Value    | The type, binding, and visibility categories of the symbol.           |
| AttachedTo | gtirb::Module |
| Note     | On ELF targets only: Map from symbols to their type, binding, and visibility categories. |


### libraries

| <!-- --> | <!-- -->                                       |
|----------|------------------------------------------------|
| Label    | ```"libraries"```                                |
| Type     | ```std::vector<std::string>```        |
| Value    | The name of a library.           |
| AttachedTo | gtirb::Module |
| Note     | Names of the external libraries that are needed dynamically at run time. |


### libraryPaths

| <!-- --> | <!-- -->                                       |
|----------|------------------------------------------------|
| Label    | ```"libraryPaths"```                                |
| Type     | ```std::vector<std::string>```        |
| Value    | A path contained in the rpath of the binary.           |
| AttachedTo | gtirb::Module |
| Note     | Paths contained in the rpath of the binary. |


### binaryType

| <!-- --> | <!-- -->                                       |
|----------|------------------------------------------------|
| Label    | ```"binaryType"```                                |
| Type     | ```std::vector<std::string>```        |
| Value    | A binary type descriptor.           |
| AttachedTo | gtirb::Module |
| Note     | A set of binary type descriptors e.g. for ELF whether the binary is PIE "DYN" or not, "EXEC". PE binaries have additional descriptors, "DLL" or "EXE, and subsystem descriptor, e.g. WINDOWS_GUI or WINDOWS_CUI. |


### SCCs

| <!-- --> | <!-- -->                                       |
|----------|------------------------------------------------|
| Label    | ```"SCCs"```                                |
| Type     | ```std::map<gtirb::UUID, int64_t>```        |
| Key      | The gtirb::UUID of a block |
| Value    | The intra-procedural SCC identifier of the block.           |
| AttachedTo | gtirb::Module |
| Note     | The intra-procedural SCC identifier of each block. |


### symbolicExpressionSizes

| <!-- --> | <!-- -->                                       |
|----------|------------------------------------------------|
| Label    | ```"symbolicExpressionSizes"```                                |
| Type     | ```std::map<gtirb::Offset, uint64_t>```        |
| Key      | The gtirb::Offset of a symbolic expression. |
| Value    | The size of the expression, in bytes.           |
| AttachedTo | gtirb::Module |
| Note     | Map from an Offset of a symbolic expression in a ByteInterval to its extent, a size in bytes. |


### peImportEntries

| <!-- --> | <!-- -->                                       |
|----------|------------------------------------------------|
| Label    | ```"peImportEntries"```                                |
| Type     | ```std::vector<std::tuple<uint64_t, int64_t, std::string, std::string>>```        |
| Value    | A tuples containing details of an imported function.          |
| AttachedTo | gtirb::Module |
| Note     | List of tuples detailing an imported function address, ordinal, function name, and library names for PE. |


### peExportEntries

| <!-- --> | <!-- -->                                       |
|----------|------------------------------------------------|
| Label    | ```"peExportEntries"```                                |
| Type     | ```std::vector<std::tuple<uint64_t, int64_t, std::string>>```        |
| Value    | A tuples containing details of an exported function.          |
| AttachedTo | gtirb::Module |
| Note     | List of tuples detailing an exported address, ordinal, and name for PE. |


### peImportedSymbols

| <!-- --> | <!-- -->                                       |
|----------|------------------------------------------------|
| Label    | ```"peImportedSymbols"```                                |
| Type     | ```std::vector<gtirb::UUID>```        |
| Value    | gtirb::UUID of an imported symbol.           |
| AttachedTo | gtirb::Module |
| Note     | UUIDs of the imported symbols for PE. |


### peExportedSymbols

| <!-- --> | <!-- -->                                       |
|----------|------------------------------------------------|
| Label    | ```"peExportedSymbols"```                                |
| Type     | ```std::vector<gtirb::UUID>```        |
| Value    | gtirb::UUID of an exported symbol.           |
| AttachedTo | gtirb::Module |
| Note     | UUIDs of the exported symbols for PE. |


### peResource

| <!-- --> | <!-- -->                                       |
|----------|------------------------------------------------|
| Label    | ```"peResource"```                                |
| Type     | ```std::vector<std::tuple<std::vector<uint8_t>, gtirb::Offset, uint64_t>>```        |
| Value    | A resource header, data length, and data pointer.           |
| AttachedTo | gtirb::Module |
| Note     | List of PE resources. A resource header, data length, and data pointer. |

### profile

| <!-- --> | <!-- -->                                                 |
|----------|----------------------------------------------------------|
| Label    | ```"profile"```                                          |
| Type     | ```std::map<gtirb:UUID,uint64_t>```                      |
| Key      | The gtirb::UUID of a gtirb::CodeBlock.                   |
| Value    | The number of times that block was executed.             |
| AttachedTo | gtirb::Module                                          |
| Notes    | An entry in this table describes how many times a code block was executed. Blocks that are not present in this aux data table should be assumed to have a value of 0, indicating that they were not executed. |

### functionNameProbabilities

| <!-- -->   | <!-- -->                                                                                                                                                                                                                                |
|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Label      | ```"functionNameProbabilities"```                                                                                                                                                                                                       |
| Type       | ```std::map<std::string, std::map<gtirb::UUID, std::vector<std::tuple<std::string, std::string, float>>>>```                                                                                                                            |
| Key        | Name of the tool that made the predictions.                                                                                                                                                                                             |
| Value      | Map from function UUID to a list of weighted predictions.  Each prediction is a tuple of <function name, binary name, score> where the score's meaning is tool dependent. Several existing tools use the convention that higher score is a better match and values ranging from 0.0 to 1.0.                                                      |
| AttachedTo | gtirb::Module                                                                                                                                                                                                                           |
| Notes      | Used to collect results from tools that identify functions and their source libraries.  Source library information is tracked in [includedLibraryNames](#includedlibrarynames) and [includedlibraryVersions](#includedlibraryversions). |


### includedLibraryNames

| <!-- -->   | <!-- -->                                 |
|------------|------------------------------------------|
| Label      | ```"includedLibraryNames"```             |
| Type       | ```std::map<gtirb::UUID, std::string>``` |
| Key        | Included library UUID.                   |
| Value      | The name of the library.                 |
| AttachedTo | gtirb::Module                            |
| Notes      | Names of libraries that are included in an executable (i.e., their code is intermingled with the executable code). |


### includedlibraryVersions

| <!-- -->   | <!-- -->                                                                                                              |
|------------|-----------------------------------------------------------------------------------------------------------------------|
| Label      | ```"includedLibraryVersions"```                                                                                       |
| Type       | ```std::map<gtirb::UUID, std::string>```                                                                              |
| Key        | Included library UUID.                                                                                                |
| Value      | Version string for the included library.                                                                              |
| AttachedTo | gtirb::Module                                                                                                         |
| Notes      | Versions of libraries that are included in an executable (i.e., their code is intermingled with the executable code). |


### sectionProperties

| <!-- --> | <!-- -->                                       |
|----------|------------------------------------------------|
| Label    | ```"sectionProperties"```                                |
| Type     | ```std::map<gtirb::UUID, std::tuple<uint64_t, uint64_t>>>>```        |
| Key      | The gtirb::UUID of a section. |
| Value    | The tuple with the ELF section types and flag.           |
| AttachedTo | gtirb::Module |
| Note     | Map from section UUIDs to tuples with the ELF section types and flags. |


### typeTable

| <!-- -->   | <!-- -->                                                                                                                                                                                                                                                                                                                    |
|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Label      | ```"typeTable"```                                                                                                                                                                                                                                                                                                          |
| Type       | ```std::map<gtirb::UUID, std::variant<uint64_t, std::tuple<uint8_t>, std::tuple<int8_t, uint64_t>, uint64_t, uint64_t, std::tuple<gtirb::UUID, std::vector<gtirb::UUID>>, gtirb::UUID, std::tuple<gtirb::UUID, uint64_t>, tuple<uint64_t, std::vector<tuple<uint64_t, gtirb::UUID>>>, std::tuple<uint8_t>, gtirb::UUID>>``` |
| Key        | UUID of the type object                                                                                                                                                                                                                                                                                                     |
| Value      | Variant of the object type, where the variants field each represent: Unknown, Bool, Int, Char, Float, Function, Pointer, Array, Struct, Void, Alias, in that order.                                                                                                                                                         |
| AttachedTo | gtirb::Module                                                                                                                                                                                                                                                                                                               |
| Notes      | Contains structured type information about objects in the variant. Some empty tuples have been replaced with ```std::tuple<uint8_t>``` which is default-initialized to zero since some GTIRB implementations cannot store a 0-length tuple. The corresponding semantics of each type's variant field is the following:<br>- **Unknown**: ```uint64_t``` - Size of the unknown type<br>- **Bool**: ```std::tuple<uint8_t>``` - default initialized to zero<br>- **Int**: ```std::tuple<int8_t, uint64_t>``` - A tuple of signedness (1 for signed, 0 for unsigned) and width of int<br>- **Char**: ```uint64_t``` - Size of the character<br>- **Float**: ```uint64_t``` - size of the floating point number<br>- **Function**: ```std::tuple<gtirb::UUID, std::vector<gtirb::UUID>>``` - A tuple of return type UUID, and a list of parameter type UUIDs<br>- **Pointer**: ```gtirb::UUID``` - UUID of pointed-to type<br>- **Array**: ```std::tuple<gtirb::UUID, uint64_t>``` - A tuple of UUID of the elements of the array, and the number of element sin that array<br>- **Alias**: ```gtirb::UUID``` - The type being aliased (note this is effectively a `typedef`)<br>- **Struct**: ```tuple<uint64_t, std::vector<std::tuple<uint64_t, gtirb::UUID>>>``` - A tuple of the size of the structure in total, and a vector of its fields. Each field is represented as a tuple of the offset at which the field is located, and the UUID of the type of that field.<br>- **Void**: ```std::tuple<uint8_t>``` - default initialized to zero |

### prototypeTable


| <!-- -->   | <!-- -->                                   |
|------------|--------------------------------------------|
| Label      | ```"prototypeTable"```                     |
| Type       | ```std::map<gtirb::UUID, gtirb::UUID>```   |
| Key        | UUID of the function                       |
| Value      | UUID of the function type in the typeTable |
| AttachedTo | gtirb::Module                              |
| Notes      | Maps functions' UUIDs to their associated typeTable entry for the purpose of giving them prototypes. NOTE: The associated type table entry **must** be a Function type object. |


================================================
FILE: CHANGELOG.md
================================================
# 2.3.2 (Unreleased)

# 2.3.1

* Fix auxdata table `elfSectionProperties` to `sectionProperties` in the java api
  to match the cpp and python api
* Switched to use tox for testing the python API.

# 2.3.0

* Fixed a compatibility problem in the Python API that prevented using recent
  releases of protobuf. The Python API on PyPI now requires protobuf 4.21.1 or
  newer.
* Building the Python API now requires protobuf compiler version 3.19 or later
  for the generated definitions to be compatible with recent protobuf packages.
  The API can still be built with older protobuf compilers, but the result will
  not be compatible with recent protobuf packages.
* Added support in the C++ API for deserializing set AuxData into unordered_sets.
* Fixed issue causing compile errors when building with Boost 1.86+.
* Building the C++ API now requires Boost 1.68 or later.
* Fixed an obscure build error caused by a missing protobuf compiler. CMake now
  explicitly checks for the protobuf compiler before generating build files.

# 2.2.0

* Move the following utility functions into the `gtirb` namespace:
  `alignAddr`, `alignmentAdjustment`, `BumpPtrAllocator`, `isPowerOf2_64`,
  `SpecificBumpPtrAllocator`, `cast`, `cast_or_null`, `dyn_cast`,
  `dyn_cast_or_null`, `isa`. For backwards compatibility, these functions
  remain available, but deprecated, in the global namespace unless
  `GTIRB_WRAP_UTILS_IN_NAMESPACE` is defined.

# 2.1.0

* Stop generating debian metapackages and packages with the version attached
  to the package name. Updates in the apt-repository now support multiple
  package versions and upgrading `gtirb` with `apt-get upgrade`.
* Fix performance issue when checking references of ProxyBlocks in Python API.
* Add elfSoname AuxData definition
* ByteInterval's blocks' sort order is now thoroughly defined: offset, size,
  kind, decode mode, and UUID. Adjusting these properties during iteration may
  cause blocks to be skipped or visited twice.
* Added ByteInterval methods to the Python API to look up blocks by offset on.

# 2.0.0

* The Java API has been substantially reworked. Including:
  * Most of the core API classes now have a more polished interface.
  * The API for handling AuxData has been completely redesigned.
  * New testing infrastructure based on JUnit5 has been added.
  * More extensive test cases have been added.
* Add elfStackExec and elfStackSize AuxData definitions
* Add `IR.modules_named` helper method to Python API.
* Add `IR.findModules(String name)` helper method to Java API.

# 1.12.0

* Add elfDynamicInit and elfDynamicFini AuxData definitions

# 1.11.0

Note that this release, due to changes to the protobuf definitions of symbolic
expression attributes, is backwards-incompatible with previous GTIRB files.

* Replace symbolic expression attributes with composable labels.

# 1.10.9

* Added support for bool values in AuxData.
* Added elfSymbolVersions provisional AuxData definition.
* The GTIRB file format has changed to include a prefix containing a "magic"
  identifier and the GTIRB protobuf version number to allow easier id of
  GTIRB files. The change is not backwards compatible. Newer versions of
  GTIRB will not be able to load older GTIRB files.
* Converted the decode mode from an arbitrary integer into a ProtoBuf enum.
  This obviously breaks compatibility with older GTIRB files.

# 1.10.8

* Ubuntu 18 and gcc7 are no longer supported.


# 1.10.7

* Added support for floating-point numbers in AuxData.
* Disabled testing the Python API using `setup.py test`. The tests can still be
  run using ctest or Python's unittest module.
* Improved the performance of the Python API's ByteBlock.references property.
* Fixed a pair of bugs in C++ support for variants in AuxData

# 1.10.6

* Added type annotations to python API and made them available in package.
* Removed install-python target.

# 1.10.5

* Added various symbolic expression attributes.
* Updated Java API

# 1.10.4

* Removed SymStackConst support
* Added variant (union) support for AuxData
* Removed address and size from modules
* Modified Module::findSections(string) to return a range instead of iterator
* Added IR::findSection(string) to C++ API

# 1.10.3

* Added offset helpers to Python API
* Better support for `std::byte` when working with `ByteInterval`
* Fixed a bug which manifested when serializing a big-endian IR

# 1.10.2

* Updated "address" iteration order to compare size if addresses are the same
  and UUIDs if addresses and sizes are the same so that it can be used to
  store objects in ordered containers.
* Fixed some bugs where modifying an object's address or size would cause
  findNodeOn to return incorrect results.
* Improved performance of findNodeOn and findNodeAt queries.

# 1.10.1

* Added module-level endianess flag, for use in archtectures with multiple
  possible endians for its code blocks.
* Introduce iteration helpers cfgPredecessors and cfgSuccessors.

# 1.9.0

* Introduce attributes for symbolic expressions to the core IR.
* Reduce asymptotic complexity of iterating over blocks in a large number of
  byte intervals.
* Fixed bug where searching for blocks by address could return incorrect matches.
* Fixed bug where `ByteInterval::addBlock` would refuse to move an existing
  block to a new offset if it was already present.

# 1.8.5

* Make Python Offset objects immutable and make Offsets equivalent when they
  refer to the same displacement from the same element.

# 1.8.4

* Fix bug where Symbol iteration could get out of order when symbols refer to
  blocks in byte intervals that are relocated.

# 1.8.3

* Fix bug that didn't add CodeBlocks to the CFG if the CodeBlocks were added to
  a ByteInterval before it was added to the IR.

# 1.8.2

* The C++ API build no longer generates a `libgtirb.so.1` symlink. This has the
  effect of requiring clients to link against the full version number (e.g.,
  `libgtirb.so.1.8.2`) to ensure ABI compatibility while we continue to make
  rapid improvements to the library.

# 1.5.0

* In the Python API:
  * Removed `Node.from_uuid` and added `get_by_uuid` to `IR`s.
    This changes UUID lookup from a global cache to a per-IR cache;
    this means you can now have two IRs exist that share UUIDs but have
    different contents, for example.
  * Added convienience properties to all node types to find the parent nodes
    they belong to.

# 1.4.6

* Implement std::hash for Addr objects.

# 1.4.5

* Explicitly disable copy and move constructors for the Node class hierarchy in
  C++. This avoids a class of errors where nodes cannot be found by
  Node::getByUUID.

# 1.4.4

* Build/install libgtirb.so.1 symlink on linux.

# 1.4.3
* Remove the python-egg cmake target, add the python-wheel cmake target

# 1.4.2

* Don't use __declspec(dllimport) on Windows.

# 1.4.1

* Add ISA enums for PPC64, ARM64, MIPS32, and MIPS64.

# 1.3.2

* Access functions for converting to/from protobuf are no longer public in the C++ API.
* The proto library is no longer dllexported.
* GTIRB_EXPORT_API no longer uses dllimport on the client side.

# 1.3.1

* No longer installs Python files by default. Added a new 'install-python'
  target to install Python files.

# 1.3.0

* Added a new field to symbols, `at_end`, which allows symbols to point to the end
  of their referents as well as the beginning.

# 1.2.1

* Moved protobuf definitions into gtirb.proto package (gtirb::proto namespace
  in C++).
* Installing the Python API now respects CMAKE_INSTALL_PREFIX and DESTDIR with
  their usual semantics.

# 1.2.0

* AuxData and AuxDataContainer in the C++ API have been reworked to provide cleaner type safety.
  * AuxData is now retrieved directly from an AuxDataContainer using
	a schema class that specifies both the name of the AuxData object
	as well as its type.
  * Schemata for AuxData types must be registered at process startup
    before GTIRB objects are constructed or unserialized.

# 1.1.1

* Fixed a bug where changing the address of a block caused lookups of symbol
  by address to fail in some cases.

# 1.1.0

* Added a new API for accessing GTIRB, written in Java. This API is not yet
  released, and as such, has missing features, is not yet documented, and may
  change at any time. For more information, look at the contents of the `java`
  directory.

# 1.0.0

This is a major backwards-incompatible release.  The protobuf
specification has changed significantly resulting in protobuf version
1 which is now tracked in `version.txt` in the base of this
repository.  (The original protobuf version was version 0.)  The
changes in this release are primarily intended to enable *binary
rewriting* use cases on GTIRB.  Other changes to the protobuf
specification are for more general cleanup, simplification, and
clarification.  In addition, a new Common Lisp GTIRB API is now
included along with the C++ and Python APIs.  A list of specific
changes follows.  Complete documentation of all new objects and
structures is provided in the GTIRB manual.

* A `version` field is now present on GTIRB IR instances.  The value
  of this field is now `1`.  The old value of `0` is the protobuf
  default for a missing field.
* The control flow graph (CFG) is now a child of the IR instead of
  living under a specific module.  This means that a multi-module IR
  now has a single pan-module CFG.
* The `Block` object has been renamed to `CodeBlock` and the
  `DataObject` to `DataBlock`.
* A new object has been added to the GTIRB `Section`s named
  `ByteInterval`s.  This replaces the `ByteMap` in the previous GTIRB
  version.  A `ByteInterval` has:
  * An *optional* fixed address indicating its location in memory.
    Without an address the location of the `ByteInterval` is not
    specified allowing it to float to enable easier binary rewriting.
  * A `size` specifying the extend of the `ByteInterval` in memory.
    If this size is larger than the contents of the `ByteInterval`
    then the extension of the `ByteInterval` in memory beyond the end
    of the contents is un-allocated.
  * A byte vector named `contents` holding the contents of the `ByteInterval`.
  * A map from offsets to symbolic expressions.
  * A list of blocks holding `CodeBlock`s and `DataBlock`s.
* The `address` field has been removed from `Block`s.
* The `address` and `size` fields have been removed from `Section`s.
* An offset from the start of their `ByteInterval` have been added to blocks.
* The following fields have been removed from `Module`s:
  * `image_byte_map`
  * `symbolic_operands`
  * `blocks` and
  * `data`.
* An entry point stored as a `CodeBlock` has been added to `Module`s.
* A list of `ByteIntervals` has been added to `Section`s.
* The `ISAID` enumeration on module is renamed to `ISA`.
* Instead of an `AuxDataContainer` object we now hold a
  `map<string, AuxData>` on modules and IRs.
* The following GTIRB enumerations are modified: `ISA`, `FileFormat`,
  `SymbolKind`, and `SectionFlag`.  The goals of these modifications
  is to simplify the enumerations and ensure that all included options
  are both necessary and orthogonal.
* Sections now include have `SectionFlag`s to store common properties
  such as `readable`, `writeable`, or `executable`.

# 0.3.0

* You can now enable and disable the building of certain APIs when calling CMake,
  via the following flags:
  * `GTIRB_CXX_API` to control the building of the C++ API, on by default
  * `GTIRB_PY_API` to control the building of the Python API, on by default if `python3` is installed on your system
* The following changes have been made to the Python API:
  * `Serialization.decode` can now take a `bytes` object
    in addition to a `BytesIO` object.
  * If an unknwon type is encountered while decoding `AuxData`,
    it will be placed in `data` as a `bytes`-like object
    instead of throwing a `DecodeError`.
    Unknown data decoded this way can be then encoded again.
    It is still an error to encode unknown types of auxdata
    not in the manner described above.
* ImageByteMap::setData() has been extended to support arbitrary iterator types.
* We now build documentation for the Python API using
  [Sphinx](https://www.sphinx-doc.org/en/master/). To generate all
  documentation locally, call `make doc` after calling `cmake`; this will
  generate both C++ and Python API documentation. To only make one or the
  other, call `make doxy` or `make sphinx`, respectively.
  * Making the Sphinx documentation will require the following Python packages:
    ```bash
    pip3 install sphinx sphinx-autodoc-typehints
    ```

# 0.2.0

* Added a new Python API, meant to be a high-level wrapper over the
  Protobuf-generated one. To make use of it, add the `python` folder
  from your build directory to your `PYTHONPATH`. The package is named `gtirb`.
* CMake now won't automatically download and install its dependencies,
  so that the user has control over which versions are in use.
  The version requirements for Boost and Protobuf are listed in `README.md`.
* Updated the sanctioned AuxData definitions.
* Fix for build issue when using Boost 1.71.0.

# 0.1.1

* Initial public release.


================================================
FILE: CMakeLists.googletest
================================================
cmake_minimum_required(VERSION 2.8.2)

project(googletest-download NONE)

include(ExternalProject)
externalproject_add(
  googletest
  GIT_REPOSITORY https://github.com/google/googletest.git
  GIT_TAG v1.15.2
  SOURCE_DIR "${CMAKE_BINARY_DIR}/googletest-src"
  BINARY_DIR "${CMAKE_BINARY_DIR}/googletest-build"
  CONFIGURE_COMMAND ""
  BUILD_COMMAND ""
  INSTALL_COMMAND ""
  TEST_COMMAND ""
)


================================================
FILE: CMakeLists.txt
================================================
#
# Cmake Configuration
#

# Need 3.10 to support CXX_STANDARD=17 and protobuf::protoc
cmake_minimum_required(VERSION 3.10.0)

# The version.txt file is the official record of the version number. We use the
# contents of that file to set the project version for use in other CMake files.
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/version.txt" ver)

string(REGEX MATCH "VERSION_MAJOR ([0-9]*)" _ ${ver})
set(GTIRB_MAJOR_VERSION ${CMAKE_MATCH_1})

string(REGEX MATCH "VERSION_MINOR ([0-9]*)" _ ${ver})
set(GTIRB_MINOR_VERSION ${CMAKE_MATCH_1})

string(REGEX MATCH "VERSION_PATCH ([0-9]*)" _ ${ver})
set(GTIRB_PATCH_VERSION ${CMAKE_MATCH_1})

string(REGEX MATCH "VERSION_PROTOBUF ([0-9]*)" _ ${ver})
set(GTIRB_PROTOBUF_VERSION ${CMAKE_MATCH_1})

cmake_policy(SET CMP0048 NEW)
project(
  GTIRB
  VERSION "${GTIRB_MAJOR_VERSION}.${GTIRB_MINOR_VERSION}.${GTIRB_PATCH_VERSION}"
)
set(PACKAGE_BRANCH master)

include(CheckFunctionExists)
include(CheckCXXSourceCompiles)
include(CheckIncludeFile)
include(Macros.cmake)
include(AlignOf.cmake)
include(CMakePackageConfigHelpers)

option(ENABLE_CONAN "Use Conan to inject dependencies" OFF)

if(ENABLE_CONAN)
  set(CONAN_SYSTEM_INCLUDES ON)
  include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
  conan_basic_setup()
endif()

# ---------------------------------------------------------------------------
# Build options
# ---------------------------------------------------------------------------

set(GTIRB_MSVC_PARALLEL_COMPILE_JOBS
    "0"
    CACHE
      STRING
      "Number of parallel compiler jobs used for Visual Studio compiles. 0 means use all processors. Default is 0."
)

option(GTIRB_ENABLE_TESTS "Enable building and running unit tests." ON)
option(GTIRB_ENABLE_MYPY "Enable checking python types with mypy." ON)

# This just sets the builtin BUILD_SHARED_LIBS, but if defaults to ON instead of
# OFF.
option(GTIRB_BUILD_SHARED_LIBS "Build shared libraries." ON)
if(GTIRB_BUILD_SHARED_LIBS)
  set(BUILD_SHARED_LIBS ON)
else()
  set(BUILD_SHARED_LIBS OFF)
endif()
if(UNIX AND NOT BUILD_SHARED_LIBS)
  # Find only static libraries
  set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
  add_compile_options(-static)
endif()

enable_testing()

# Set ENABEL_CODE_COVERAGE to default off, unless you want to test c++ coverage
option(ENABLE_CODE_COVERAGE
       "Build with instrumentation for collecting code coverage" OFF
)

if(ENABLE_CODE_COVERAGE)
  if(${CMAKE_CXX_COMPILER_ID} STREQUAL GNU OR ${CMAKE_CXX_COMPILER_ID} STREQUAL
                                              Clang
  )
    add_compile_options(--coverage)
    link_libraries(--coverage)
  else()
    message(FATAL_ERROR "no support for code coverage on this target")
  endif()
endif()

# Whether or not to run clang-tidy (if present)
option(GTIRB_RUN_CLANG_TIDY "Enable running of clang-tidy." ON)

# Define the cache variables for the API options.
option(GTIRB_CXX_API "Whether or not the C++ API is built." ON)
option(GTIRB_PY_API "Whether or not the Python API is built." ON)
option(GTIRB_CL_API "Whether or not the Common Lisp API is built." ON)
option(GTIRB_JAVA_API "Whether or not the Java API is built." ON)

# Determine whether or not to strip debug symbols and set the build-id. This is
# only really needed when we are building ubuntu *-dbg packages
option(GTIRB_STRIP_DEBUG_SYMBOLS
       "Whether or not to strip debug symbols and set the build-id." OFF
)

option(
  GTIRB_RELEASE_VERSION
  "Whether or not to build package versions without dev/SNAPSHOT suffixes.  Applies to the python and java APIs."
  OFF
)

# Determine whether or not the APIs are REALLY built or not.
# === C++ ===
set(CXX_API ${GTIRB_CXX_API})

# === Python ===
set(PY_API ${GTIRB_PY_API})
if(GTIRB_PY_API)
  gtirb_find_python()

  if(PYTHON)
    set(PYTHON_MINIMUM_VERSION "3.6")
    if("${Python3_VERSION}" VERSION_LESS "${PYTHON_MINIMUM_VERSION}")
      message(
        WARNING
          "${PYTHON} --version is ${Python3_VERSION}, which is less than the minimum required, ${PYTHON_MINIMUM_VERSION}; disabling building of API."
      )
      set(PY_API OFF)
    endif()
  else()
    message(
      WARNING
        "Python interpreter not found; disabling building of Python API.
If this is in error, try giving -DPYTHON=... to CMake to specify what program to use."
    )
    set(PY_API OFF)
  endif()
endif()

# === Common Lisp ===
# TODO: test the CL API on other CL interpreters and search for those in
# addition to SBCL when looking for a default CL interpeter
set(CL_API ${GTIRB_CL_API})
if(GTIRB_CL_API)
  find_program(LISP "sbcl")
  set(QUICKLISP
      "$ENV{HOME}/quicklisp"
      CACHE STRING "The Quicklisp installation to use."
  )
  set(LISP_MINIMUM_VERSION "1.4.5")

  if(NOT LISP)
    message(
      WARNING
        "Lisp interpreter not found; disabling building of Lisp API.
If this is in error, try giving -DLISP=... to CMake to specify what program to use."
    )
    set(CL_API OFF)
  elseif(NOT EXISTS "${QUICKLISP}")
    message(
      WARNING
        "Quicklisp installation not found; disabling building of Lisp API.
If this is in error, try giving -DQUICKLISP=... to CMake to specify what directory to use."
    )
    set(CL_API OFF)
  else()
    execute_process(COMMAND "${LISP}" "--version" OUTPUT_VARIABLE LISP_VERSION)
    string(REPLACE "SBCL" "" LISP_VERSION "${LISP_VERSION}")
    string(REPLACE ".debian" "" LISP_VERSION "${LISP_VERSION}")

    if("${LISP_VERSION}" VERSION_LESS "${LISP_VERSION}")
      message(
        WARNING
          "${LISP} --version is ${LISP_VERSION}, which is less then the minimum required, ${LISP_MINIMUM_VERSION}; disabling building of API."
      )
      set(CL_API OFF)
    endif()
  endif()
endif()

# === Java ===
set(JAVA_API ${GTIRB_JAVA_API})
if(GTIRB_JAVA_API)
  find_package(Java 1.8.0 COMPONENTS Development)
  if(NOT JAVA_FOUND)
    message(WARNING "Java 8 compiler not found; disabling building of Java API.
If this is in error, try setting the environment variable $JAVA_HOME."
    )
    set(JAVA_API OFF)
  else()
    find_program(MVN mvn)
    if(NOT MVN)
      message(
        WARNING
          "Maven not found; disabling building of Java API. If this is in "
          "error, try setting -DMVN=<path-to-maven> on the CMake command-line"
      )
      set(JAVA_API OFF)
    endif()
  endif()
endif()

# Documentation options.
option(GTIRB_DOCUMENTATION "Whether or not documentation is built." ON)

# ---------------------------------------------------------------------------
# Global settings
# ---------------------------------------------------------------------------

set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/src)
if(WIN32)
  set(CMAKE_DEBUG_POSTFIX
      "d"
      CACHE STRING "add a postfix, usually d on windows"
  )
endif()
set(CMAKE_RELEASE_POSTFIX
    ""
    CACHE STRING "add a postfix, usually empty on windows"
)
set(CMAKE_RELWITHDEBINFO_POSTFIX
    ""
    CACHE STRING "add a postfix, usually empty on windows"
)
set(CMAKE_MINSIZEREL_POSTFIX
    ""
    CACHE STRING "add a postfix, usually empty on windows"
)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

if(CXX_API)
  # Use C++17
  set(CMAKE_CXX_STANDARD 17)
  # Error if it's not available
  set(CMAKE_CXX_STANDARD_REQUIRED ON)

  # Specifically check for gcc-7 or later. gcc-5 is installed on many systems
  # and will accept -std=c++17, but does not fully support the standard.
  if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
    if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "7.0.0")
      message(FATAL_ERROR "gcc 7 or later is required to build gtirb")
    endif()
  endif()

  set(CMAKE_CXX_VISIBILITY_PRESET hidden)

  #
  # Global Options (Compile / Link)
  #
  add_compile_options(-DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION)

  # MSVC-specific Options
  if(${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC)
    if(NOT GTIRB_MSVC_PARALLEL_COMPILE_JOBS STREQUAL "1")
      if(GTIRB_MSVC_PARALLEL_COMPILE_JOBS STREQUAL "0")
        add_compile_options(-MP)
        message(STATUS "Parallel compilation enabled")
      else()
        add_compile_options(-MP${GTIRB_MSVC_PARALLEL_COMPILE_JOBS})
        message(
          STATUS
            "Parallel compilation with ${GTIRB_MSVC_PARALLEL_COMPILE_JOBS} jobs"
        )
      endif()
    else()
      message(STATUS "Parallel compilation disabled")
    endif()

    add_compile_options(-D_CRT_SECURE_NO_WARNINGS)
    add_compile_options(-D_MBCS)
    add_compile_options(-D_SCL_SECURE_NO_WARNINGS)
    # We need to add both so that there is not a mismatch between Win32 SDK
    # headers (which use UNICODE) and C Standard Library headers (which use
    # _UNICODE).
    add_compile_options(-D_UNICODE)
    add_compile_options(-DUNICODE)
    add_compile_options(-D_WIN32)
    # Disable macro definitions for min and max that conflict with the STL.
    add_compile_options(-DNOMINMAX)
    # Enable RTTI. FIXME: stop using typeid so we can disable this and add -fno-
    # rtti to the Clang/GCC compiler options.
    add_compile_options(-GR)
    # Enable exceptions, which are basically required because of our reliance on
    # boost.
    add_compile_options(-EHsc)
    # Enabled a sensible warning level and treat all warnings as errors.
    add_compile_options(-W4)
    add_compile_options(-WX)

    # Enable bigobj support, otherwise IR.cpp and Module.cpp will refuse to
    # compile due to execeeding the number of sections allowed in an object
    # file. FIXME: we should not have that many template instantiations.
    add_compile_options(-bigobj)

    add_compile_options(-sdl) # Enable extra security checks
    add_compile_options(-permissive-) # Disable permissive mode

    add_compile_options(-wd4996) # VC8: Deprecated libc functions.
    # This is a warning about a change in behavior from old versions of visual
    # c++.  We want the new (standard-compliant) behavior, so we don't want the
    # warning.  The warning is that using an array in a class initializer list
    # will cause its elements to be default initialized.
    add_compile_options(-wd4351)
    add_compile_options(-wd4146) # unary minus operator applied to unsigned
                                 # type, result still unsigned

    # C4505: 'google::protobuf::internal::MapField<...>::ContainsMapKey':
    # unreferenced local function has been removed
    add_compile_options(-wd4505)

    # C4267: protobuf-generated headers, at least w/ protobuf 3.9.1, trigger
    # MSVC's "conversion from 'size_t' to 'int', possible loss of data" warning.
    add_compile_options(-wd4267)

    # Release target options
    add_compile_options($<$<CONFIG:Release>:-GL>) # Enable whole program
                                                  # optimization
    add_link_options($<$<CONFIG:Release>:-ltcg>) # Enable link-time code
                                                 # generation
  elseif((${CMAKE_CXX_COMPILER_ID} STREQUAL GNU) OR (${CMAKE_CXX_COMPILER_ID}
                                                     STREQUAL Clang)
  )
    add_compile_options(-Wall -Wextra -Wpointer-arith -Wshadow -Werror)
    add_compile_options(-fPIC)
  endif()
endif()

# ---------------------------------------------------------------------------
# Boost
# ---------------------------------------------------------------------------
if(CXX_API)
  find_package(Boost 1.68 REQUIRED)

  add_compile_options(-DBOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE)
  add_compile_options(-DBOOST_SYSTEM_NO_DEPRECATED)

  # Boost versions 1.70.0+ may use Boost's provided CMake support rather than
  # CMake's internal Boost support. The former uses "Boost::boost" and so on,
  # while the latter uses "Boost_BOOST" and so on. This normalizes the two cases
  # to use Boost_INCLUDE_DIRS and Boost_LIBRARIES.
  if(TARGET Boost::headers)
    get_target_property(
      Boost_INCLUDE_DIRS Boost::headers INTERFACE_INCLUDE_DIRECTORIES
    )
  endif()

  include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
endif()

# ---------------------------------------------------------------------------
# Google Test Application
# ---------------------------------------------------------------------------
if(GTIRB_ENABLE_TESTS AND CXX_API)
  # Pull in Google Test
  # https://github.com/google/googletest/tree/master/googletest#incorporating-
  # into-an-existing-cmake-project

  # Download and unpack googletest at configure time
  configure_file(CMakeLists.googletest googletest-download/CMakeLists.txt)

  execute_process(
    COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" .
    RESULT_VARIABLE result
    WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/googletest-download"
  )

  if(result)
    message(WARNING "CMake step for googletest failed: ${result}")
  endif()

  execute_process(
    COMMAND "${CMAKE_COMMAND}" --build .
    RESULT_VARIABLE result
    WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/googletest-download"
  )

  if(result)
    message(WARNING "Build step for googletest failed: ${result}")
  endif()

  # Prevent overriding the parent project's compiler/linker settings on Windows
  set(gtest_force_shared_crt
      ON
      CACHE BOOL "" FORCE
  )

  # Add googletest directly to our build. This defines the gtest and gtest_main
  # targets.
  add_subdirectory(
    "${CMAKE_BINARY_DIR}/googletest-src" "${CMAKE_BINARY_DIR}/googletest-build"
    EXCLUDE_FROM_ALL
  )

  include_directories("${gtest_SOURCE_DIR}/include")
endif()

# ---------------------------------------------------------------------------
# JUnit Test Application
# ---------------------------------------------------------------------------
if(GTIRB_ENABLE_TESTS AND JAVA_API)
  include(ExternalProject)
  externalproject_add(
    junit
    PREFIX ${CMAKE_BINARY_DIR}/junit
    URL "https://repo1.maven.org/maven2/org/junit/platform/junit-platform-console-standalone/1.10.0/junit-platform-console-standalone-1.10.0.jar"
    CONFIGURE_COMMAND ""
    BUILD_COMMAND ""
    INSTALL_COMMAND ""
    TEST_COMMAND ""
    DOWNLOAD_NO_EXTRACT ON
  )

  set(JUNIT_STANDALONE_JAR
      ${CMAKE_BINARY_DIR}/junit/src/junit-platform-console-standalone-1.10.0.jar
  )
endif()

# ---------------------------------------------------------------------------
# protobuf
# ---------------------------------------------------------------------------
if(CL_API)
  find_package(Protobuf 3.7.0 REQUIRED)
else()
  find_package(Protobuf 3.0.0 REQUIRED)
endif()
if(NOT Protobuf_PROTOC_EXECUTABLE)
  # find_package only fails if the protobuf libraries or headers cannot be
  # found. It does not treat failing to find the protobuf compiler as an error,
  # so we do that explicitly here.
  message(
    FATAL_ERROR
      "Could not find Protobuf compiler 'protoc'. Please make sure the "
      "Protobuf compiler is installed."
  )
endif()

if(Protobuf_VERSION VERSION_LESS 3.2)
  add_definitions(-DPROTOBUF_SET_BYTES_LIMIT)
endif()

if(NOT BUILD_SHARED_LIBS)
  set(Protobuf_USE_STATIC_LIBS ON)
endif()
include_directories(SYSTEM ${PROTOBUF_INCLUDE_DIRS})

add_subdirectory(proto)

# ---------------------------------------------------------------------------
# gtirb sources
# ---------------------------------------------------------------------------
if(CXX_API)
  add_subdirectory(src)
endif()

if(PY_API)
  add_subdirectory(python)
endif()

if(CL_API)
  add_subdirectory(cl)
endif()

if(JAVA_API)
  add_subdirectory(java)
endif()

if(GTIRB_DOCUMENTATION)
  add_subdirectory(doc)
endif()

# ---------------------------------------------------------------------------
# Export config for use by other CMake projects
# ---------------------------------------------------------------------------

if(CXX_API)
  # --- For direct use from the build directory/cmake registry ---
  # This exports the targets
  export(TARGETS gtirb gtirb_proto
         FILE "${CMAKE_CURRENT_BINARY_DIR}/gtirbTargets.cmake"
  )
  # This is the main config file that find_package will look for.
  configure_file(
    "${CMAKE_CURRENT_LIST_DIR}/gtirbConfig.cmake.in"
    "${CMAKE_CURRENT_BINARY_DIR}/gtirbConfig.cmake" @ONLY
  )
  # Add the build directory to the user CMake registry, so find_package can
  # locate it automatically.
  export(PACKAGE gtirb)

  # --- For the installed copy ---
  # Main config file for find_package, includes the targets file and defines the
  # check_gtirb_branch function.
  if(NOT DEFINED PACKAGE_BRANCH)
    set(PACKAGE_BRANCH "No package branch specified")
  endif()
  # FIXME: The installed version of gtirbConfig currently contains the
  # check_gtirb_branch function, which requires users to explicitly call it. We
  # ought to move this functionality to gtirbConfig-version, so that checking
  # the gtirb version also checks the branch, requiring users to opt-out of the
  # branch check, rather than opt-in by calling check_gtirb_branch. See: GitLab
  # issue #93
  configure_file(
    "${CMAKE_CURRENT_LIST_DIR}/gtirbConfig.cmake.in"
    "${CMAKE_CURRENT_BINARY_DIR}/export/gtirbConfig.cmake" @ONLY
  )

  # In this mode, find_package also seems to require a version file
  set(version_file "${CMAKE_CURRENT_BINARY_DIR}/gtirbConfig-version.cmake")
  write_basic_package_version_file(
    ${version_file}
    VERSION ${GTIRB_VERSION}
    COMPATIBILITY AnyNewerVersion
  )

  # Copy the config files to the install location
  install(
    FILES ${CMAKE_CURRENT_BINARY_DIR}/export/gtirbConfig.cmake ${version_file}
    DESTINATION lib/gtirb
    COMPONENT cmake_config
  )
  # This exports the targets to the install location.
  install(
    EXPORT gtirbTargets
    COMPONENT cmake_target
    DESTINATION lib/gtirb
  )
endif()

# ---------------------------------------------------------------------------
# Package policy enforcement
# ---------------------------------------------------------------------------

if(GTIRB_PACKAGE_POLICY)
  set(PACKAGE_POLICY ${GTIRB_PACKAGE_POLICY})
elseif(ENABLE_CONAN OR WIN32)
  set(PACKAGE_POLICY conan)
else()
  set(PACKAGE_POLICY unix)
endif()

if(PACKAGE_POLICY STREQUAL "unix")

  # Provides copyright file for Unix packages.
  install(
    FILES ${CMAKE_SOURCE_DIR}/LICENSE.txt
    COMPONENT license
    DESTINATION share/doc/gtirb
    RENAME copyright
  )

elseif(PACKAGE_POLICY STREQUAL "conan")

  # Provides LICENSE.txt for Conan packages
  install(
    FILES ${CMAKE_SOURCE_DIR}/LICENSE.txt
    COMPONENT license
    DESTINATION licenses
  )

endif()

# ---------------------------------------------------------------------------
# Package generation with cpack
# ---------------------------------------------------------------------------
set(CPACK_PROJECT_CONFIG_FILE ${CMAKE_CURRENT_SOURCE_DIR}/cpack-config.cmake)

set(CMAKE_PROJECT_HOMEPAGE_URL https://github.com/GrammaTech/gtirb)
set(CPACK_PACKAGE_VERSION_MAJOR ${GTIRB_MAJOR_VERSION})
set(CPACK_PACKAGE_VERSION_MINOR ${GTIRB_MINOR_VERSION})
set(CPACK_PACKAGE_VERSION_PATCH ${GTIRB_PATCH_VERSION})
set(CPACK_PACKAGE_VENDOR "GrammaTech Inc.")
set(CPACK_PACKAGE_CONTACT gtirb@grammatech.com)
set(CPACK_PACKAGE_DESCRIPTION_FILE ${CMAKE_CURRENT_SOURCE_DIR}/README.md)
set(CPACK_PACKAGE_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.md)
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY
    "The GrammaTech Intermediate Representation for Binaries (GTIRB) is a machine code analysis and rewriting data structure."
)
set(CPACK_DEBIAN_PACKAGE_SECTION devel)

string(REGEX MATCH "([^\.]+)\.([^\.]+)\.([^\.]+)" PROTOBUF_VERSION_MATCH
             ${Protobuf_VERSION}
)
set(PROTOBUF_MAJOR_VERSION ${CMAKE_MATCH_1})
set(PROTOBUF_MINOR_VERSION ${CMAKE_MATCH_2})
set(PROTOBUF_PATCH_VERSION ${CMAKE_MATCH_3})
math(EXPR NEXT_PROTOBUF_PATCH "${PROTOBUF_PATCH_VERSION}+1")
set(CPACK_PROTOBUF_VERSION_UPPER_BOUND
    "${PROTOBUF_MAJOR_VERSION}.${PROTOBUF_MINOR_VERSION}.${NEXT_PROTOBUF_PATCH}"
)
set(CPACK_PROTOBUF_VERSION_LOWER_BOUND "${Protobuf_VERSION}")
set(CPACK_GTIRB_VERSION "${GTIRB_VERSION}")
set(CPACK_SOURCE_DIR ${CMAKE_SOURCE_DIR})

include(CPack)

# ---------------------------------------------------------------------------
# Report APIs and features built
# ---------------------------------------------------------------------------

message("APIs to be built:")
message("    C++     ${CXX_API}")
message("    Python  ${PY_API}")
message("    Lisp    ${CL_API}")
message("    Java    ${JAVA_API}")


================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
  advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
  address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
  professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies within all project spaces, and it also applies when
an individual is representing the project or its community in public spaces.
Examples of representing a project or community include using an official
project e-mail address, posting via an official social media account, or acting
as an appointed representative at an online or offline event. Representation of
a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at gtirb-conduct@grammatech.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq


================================================
FILE: CONTRIBUTING.md
================================================
Contributing
============


## Code of Conduct

Please read the [GTIRB Code of Conduct](CODE_OF_CONDUCT.md).

## General Guidelines

- Text files may not have trailing whitespace.

- Text files must end with a trailing newline.

- All tests should be able to run and pass.
  This can be checked by running `make check` on your build directory
  after running `cmake`.

- All CMake files shall be formatted with
  [cmake-format](https://pypi.org/project/cmake-format/).  A
  `.cmake-format` file is provided in the root directory for the
  project, and a pass through this tool is included as part of our
  `pre-commit` configuration (see below for details).

- The GTIRB version saved in `version.txt` uses
  [semantic versioning](https://semver.org)

- We also track a Protobuf version number in `version.txt` (as
  `VERSION_PROTOBUF`).  This number is incremented whenever our
  protobuf files (under `proto/` in the GTIRB repository) are changed
  in any way that affects the serialized protobuf -- even if the
  change could potentially be backwards compatible because of the way
  protobuf gracefully handles unknown new fields.

- We ask that all contributors complete our Contributor License
  Agreement (CLA), which can be found at
  [GrammaTech-CLA-GTIRB.pdf](./GrammaTech-CLA-GTIRB.pdf), and email
  the completed form to `CLA@GrammaTech.com`.  Under this agreement
  contributors retain the copyright to their work but grants
  GrammaTech unlimited license to the work.

### pre-commit

In general, code must follow a unified format. To make compliance with
this format easier, we recommend the use of
[`pre-commit`](https://pre-commit.com/) with the provided
configuration file, `.pre-commit-config.yaml`, to manage formatting.
To use `pre-commit`:

1. If `pre-commit` is not already installed on your system, install it
   now with [`pip`](https://pypi.org/project/pip/).
   ```shell
      pip3 install pre-commit
   ```
2. If [`clang-format`](https://clang.llvm.org/docs/ClangFormat.html)
   is not already installed on your system, install it now.
3. Install the formatters as a pre-commit hook. In the gtirb root directory:
   ```shell
    pre-commit install
   ```
   If you prefer to run `pre-commit` manually instead, run this before all commits:
   ```shell
   pre-commit run
   ```

## C++ Code Requirements

- All code shall be formatted with [clang-format](https://clang.llvm.org/docs/ClangFormat.html).
  A `.clang-format` is provided in the root directory for the project,
  and a pass through this tool is included as part of our `pre-commit` configuration.

- Code should generally follow the C++ Core Guidelines recommendations.

- Code should generally allow for thread safety.
	- No static variables.
	- No globals
	- Free functions should not maintain state.
	- Use caution when using iterators to guard against invalidation.

- Maintain const-correctness.

- Use UpperCamelCase for type names.

- Use UpperCamelCase for enum members.

- Use UpperCamelCase for variable and class members.

- Use lowerCamelCase for function and method names.

- Avoid `using namespace std`

- Use `auto` when the deduced type is explicitly spelled out in the
  initialization or if the deduced type is an abstract type
  alias.  Always explicitly specify type qualifiers, pointers, and
  references.  E.g.,
  ```cpp
  const auto *Ptr = dynamic_cast<const Foo *>(SomePtr);
  auto Val = static_cast<unsigned>(SomeValue);
  for (auto Iter = SomeContainer.begin(), End = SomeContainer.end(); Iter != End; ++Iter) {}
  ```

- Use `auto` to make code more readable, but prefer `auto &` or `auto *`
  to avoid unexpected copies.

- `#include` as little as possible to reduce compile times. Use
  forward declarations of classes when possible to avoid including
  their definitions.

- Do not introduce variables to the code that would require a client
  to dllimport them. Export.hpp does not setup dllimport declarations
  for clients. For example, do not add static function-local variables
  in inline functions in header files.

## Build Performance Tips

Some tips to keep in mind to not needlessly regress build performance when
working with GTIRB:

- Do not include a protobuf header from within a .hpp file unless you need the
  enum values from protobuf. A forward declare + include in the .cpp file is
  sufficient and cuts out 100s of transitive headers to parse.
- CFG.hpp and ByteInterval.hpp are the most expensive headers you can possibly
  include. Avoid including these whenever humanly possible (getting rid of 2
  includes of CFG.hpp cut out ~2500 transitive header includes).
- Boost headers are extremely heavy to parse, try to push as much of their
  inclusions down into a .cpp file as possible. For instance, including boost's
  endian header requires ~200 transitive headers by itself. Things like the
  boost containers are considerably more expensive. This is what contributes to
  ByteInterval and CFG being so expensive to include. Be wary when adding
  includes to boost headers or adding new boost dependencies.
- Do not blindly trust the output from tools like include what you use; they
  sometimes do silly things like include a header file when a forward declare is
  sufficient. When adding an include to a .hpp file, try hard to avoid adding
  the include.

### Testing Development

- All code you care about should be tested.
- Any code you don't care about should be removed.
- C++ code should be tested on Linux using GCC and Clang, and on Windows using Visual Studio.
- Code testing is done via Google Test.
- Test names are prefixed with the type of test they are (`Unit_`, `System_`, `Integration_`).
- No unit test should take more than 0.5 seconds.

## Building under Windows

Most of the build issues on Windows arise from having to define the location of
many dependencies.

### Troubleshooting
- When using a batch file to call `cmake`, make sure to quote all paths and
  escape all backshlases in paths.  i.e. `-DCMAKE_PREFIX_PATH="c:\\Program
Files\\capstone"` and do not leave a trailing backslash on paths.
- Use `-Dprotobuf_DEBUG=ON` for protobuf related build issues in general.
- `'../src/gtirb/proto/protobuf::protoc', needed by
  'src/gtirb/proto/AuxData.pb.h', missing and no known rule to make it`
  - due to missing or unusable protoc protobuf compiler.  You may need to define
    `-Dprotobuf_EXECUTABLE="<path to protoc.exe>"`, or check that the
CMAKE_PREFIX_PATH has a path to the protobuf dir (resulting from `ninja install`
after building).
- `CMAKE_PREFIX_PATH` is not additive.  If you set it again, it will silently
  overwrite prior settings.  Add to the one definition, separtaing with
semi-colons.

## Python Code Requirements

- Code must be [PEP8](https://www.python.org/dev/peps/pep-0008/) compliant.
  To check for PEP8 compliance, [flake8](https://pypi.org/project/flake8/) is recommended,
  and included as part of our `pre-commit` configuration.

- All code must be formatted with [Black](https://pypi.org/project/black/)
  (set to line lengths of 79, for PEP8 compliance).
  A pass through this tool is included as part of our `pre-commit` configuration.

- The Python API should be made to run on all versions of Python 3.

- Use `UpperCamelCase` for type names, `UPPER_CASE` for constant names,
  and `snake_case` for other identifier names.

### Testing Development

- All code you care about should be tested.
- Any code you don't care about should be removed.
- Code testing is done via the built-in `unittest` framework.
- Code testing uses [`tox`](https://tox.wiki/en/stable/) and
  [`pytest`](https://docs.pytest.org/en/stable/) to simplify testing supported
  configurations.
- No unit test should take more than 0.5 seconds.

## Documentation

The GTIRB documentation consists of complete documentation for all
components of the GTIRB API, along with examples and other usage
information.


### Building Documentation

At minimum, you will need [CMake](https://cmake.org/) and
[Doxygen](http://www.doxygen.nl/). To build the documentation:

1. Create and change to a temporary build directory. We will refer to
   this directory as `build`.

   ```bash
   > mkdir build
   > cd build
   ```

2. Build the documentation.

   ```bash
   build> cmake <PATH_TO_GTIRB> [<api_options>]
   build> cmake --build . --target doc
   ```

3. Open the documentation home page `build/doc/html/index.html`
   in your browser.


The `<api_options>` are as follows

- `-DGTIRB_CXX_API=OFF` : do not generate C++ API documentation.

  If this option is not specified, `cmake` will attempt to generate
  C++ API documentation, failing (along with the documentation build
  as a whole) if [Doxygen](http://www.doxygen.nl/) is not available.


- `-DGTIRB_CL_API=OFF` : do not generate Common Lisp API documentation.

  If this option is not specified, `cmake` will attempt to generate
  Common Lisp API documentation if and only if it can locate a
  SBCL/Quicklisp installation, failing if
  [simpler-documentation-template
  (SDT)](https://github.com/eschulte/simpler-documentation-template)
  is not available.

- `-DGTIRB_PY_API=OFF` : do not generate Python API documentation.

  If this option is not specified, `cmake` will attempt to generate
  Python API documentation if and only if it can locate a Python
  installation, failing if [Sphinx](https://www.sphinx-doc.org/en/master/),
  [sphinx-autodoc-typehints](https://pypi.org/project/sphinx-autodoc-typehints/),
  or the Python API dependencies are not available.


### Contributing Markdown Documentation

To add a new markdown document to the documentation:

1. Create the new document as a child of `/doc`.
   - File names start with `gtirb`.
   - File extension is `.md`.
   - Use github markdown syntax.
   - Wrap your markdown documents at 80 columns.

2. Edit `/doc/general/Doxyfile.in` to add the basename of your new markdown
   document to the `INPUT` rule setting.

3. Edit `/doc/general/CMakeLists.txt` to add your new markdown document
   to  `MDFILES_IN`. Ordering is not important.

4. Integrate your new markdown document into the documentation, either
   by linking to it from an existing page or by updating
   `/doc/general/DoxygenLayout.xml` to add an entry to the **More Information**
   tab.

5. [Build the documentation](#building-documentation) and check that
   your new page is present and rendered correctly.
   - If it is not rendered correctly, you may need to add a new
     preprocessing step to `doc/general/preprocmd.py` to rewrite the
     corresponding github-style markdown into something Doxygen
     can handle correctly.

### Graphviz

- File names start with `gtirb`.
- The color palette is `black`, `lightblue`, `cornflowerblue`, and `coral`.
- Render `.dot` files to the same file name with a `.png` extension.
	* Example: `dot -Tpng gtirbScope.dot > gtirbScope.png`
- Use the `arial` font.

### Python

For the Python API, [Sphinx](https://www.sphinx-doc.org/en/master/)
and [related plugins](https://pypi.org/project/sphinx-autodoc-typehints/)
are required. To install these via [pip](https://pip.pypa.io/en/stable/), run:

```bash
pip3 install sphinx sphinx-autodoc-typehints
```

You will also need all the dependencies of the GTIRB Python API
itself. If you haven't already installed the Python API (and don't
want to do so now) you can install just its dependencies as follows.

```bash
cd <PATH_TO_GTIRB>/build/python
python3 setup.py egg_info
pip3 install -r gtirb.egg-info/requires.txt
```

### Common Lisp

For the Common Lisp API, [simpler-documentation-template (SDT)](https://github.com/eschulte/simpler-documentation-template)
is required. This package should automatically be downloaded via the build process;
see `cl/README.md` for details on how to prepare the Common Lisp API.


================================================
FILE: FAQ.md
================================================
Frequently Asked Questions
--------------------------

- [I get compiler errors when I try to compile programs using GTIRB. How can I make them go away?](#compiler-errors)

- [Linking error with "undefined reference" to gtirb::](#linking-error-with-undefined-reference-to-gtirb)

#### Compiler Errors

__Q: I get compiler errors when I try to compile programs using GTIRB. How can I make them go away?__

A: GTIRB requires C++17, including the C++17 standard library. If your
compiler does not use C++17 by default, you will need to explicitly
specify it when compiling programs that use GTIRB.

For example:
```
g++ --std=c++17 my_gtirb_program.cpp -lgtirb -o my_gtirb_program
```


#### Linking error with "undefined reference" to gtirb

__Q: I get linker errors when I try to compile and link programs using GTIRB. How can I make them go away?__

A: This isn't GTIRB specific, but if you place the `-lgtirb` on your
compilation line *before* the source file the linker will sometimes
throw away the symbols from the GTIRB library which it doesn't think
it needs (and if it hasn't read your source yet it won't think it
needs much).  So if for example,

```
g++ --std=c++17 -lgtirb my_gtirb_program.cpp
```

doesn't work for you, then try this instead.

```
g++ --std=c++17 my_gtirb_program.cpp -lgtirb
```


================================================
FILE: LICENSE.txt
================================================
==============================================================================
GTIRB is under the MIT License:
==============================================================================

MIT License

Copyright (c) 2018 GrammaTech, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

==============================================================================
Software from third parties included in GTIRB:
==============================================================================

GTIRB contains third party software which is under different license terms.
All such code will be identified clearly using at least one of two mechanisms:

1) It will be in a separate directory tree with its own `LICENSE.txt` or
   `LICENSE` file at the top containing the specific license and restrictions
   which apply to that software, or
2) It will contain specific license and restriction terms at the top of every
   file.

==============================================================================
Apache License v2.0 with LLVM Exceptions:
==============================================================================

                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

    TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

    1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

    2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

    3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

    4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

    5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

    6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

    7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

    8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

    9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

    END OF TERMS AND CONDITIONS

    APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

    Copyright [yyyy] [name of copyright owner]

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.


---- LLVM Exceptions to the Apache 2.0 License ----

As an exception, if, as a result of your compiling your source code, portions
of this Software are embedded into an Object form of such source code, you
may redistribute such embedded portions in such Object form without complying
with the conditions of Sections 4(a), 4(b) and 4(d) of the License.

In addition, if you combine or link compiled forms of this Software with
software that is licensed under the GPLv2 ("Combined Software") and if a
court of competent jurisdiction determines that the patent provision (Section
3), the indemnity provision (Section 9) or other Section of the License
conflicts with the conditions of the GPLv2, you may retroactively and
prospectively choose to deem waived or otherwise exclude such Section(s) of
the License, but only in their entirety and only with respect to the Combined
Software.

==============================================================================
University of Illinois Open Source License:
==============================================================================
University of Illinois/NCSA
Open Source License

Copyright (c) 2003-2019 University of Illinois at Urbana-Champaign.
All rights reserved.

Developed by:

    LLVM Team

    University of Illinois at Urbana-Champaign

    http://llvm.org

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal with
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

    * Redistributions of source code must retain the above copyright notice,
      this list of conditions and the following disclaimers.

    * Redistributions in binary form must reproduce the above copyright notice,
      this list of conditions and the following disclaimers in the
      documentation and/or other materials provided with the distribution.

    * Neither the names of the LLVM Team, University of Illinois at
      Urbana-Champaign, nor the names of its contributors may be used to
      endorse or promote products derived from this Software without specific
      prior written permission.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
SOFTWARE.


================================================
FILE: Macros.cmake
================================================
macro(IMPL_GTIRB_ADD_LINKER_FLAG flag)
  if(NOT ${CMAKE_EXE_LINKER_FLAGS} MATCHES "(${flag}.*)")
    set(CMAKE_EXE_LINKER_FLAGS
        "${CMAKE_EXE_LINKER_FLAGS} ${flag}"
        CACHE STRING "Linker Flags" FORCE
    )
  endif()

  if(NOT ${CMAKE_SHARED_LINKER_FLAGS} MATCHES "(${flag}.*)")
    set(CMAKE_SHARED_LINKER_FLAGS
        "${CMAKE_SHARED_LINKER_FLAGS} ${flag}"
        CACHE STRING "Linker Flags" FORCE
    )
  endif()
endmacro()

macro(GTIRB_ADD_MSVC_LINKER_FLAG flag)
  if(MSVC)
    impl_gtirb_add_linker_flag(${flag})
  endif()
endmacro()

macro(GTIRB_ADD_GCC_LINKER_FLAG flag)
  if(CMAKE_COMPILER_IS_GNUCXX)
    impl_gtirb_add_linker_flag(${flag})
  endif()
endmacro()

macro(GTIRB_ADD_CLANG_LINKER_FLAG flag)
  if(${CMAKE_CXX_COMPILER_ID} STREQUAL Clang)
    impl_gtirb_add_linker_flag(${flag})
  endif()
endmacro()

macro(GTIRB_ADD_LIBRARY)
  add_library(
    ${PROJECT_NAME} ${${PROJECT_NAME}_H} ${${PROJECT_NAME}_SRC}
                    ${${PROJECT_NAME}_PROTO}
  )

  set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "gtirb")
endmacro()

macro(GTIRB_ADD_LIBRARY_STATIC)
  add_library(
    ${PROJECT_NAME} STATIC ${${PROJECT_NAME}_H} ${${PROJECT_NAME}_SRC}
  )

  set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "gtirb")
endmacro()

macro(GTIRB_ADD_LIBRARY_HEADERONLY)
  add_library(${PROJECT_NAME} INTERFACE)
  target_include_directories(
    ${PROJECT_NAME} INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}
  )
endmacro()

macro(GTIRB_ADD_EXECUTABLE)
  add_executable(${PROJECT_NAME} ${${PROJECT_NAME}_H} ${${PROJECT_NAME}_SRC})
  set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "gtirb/applications")
endmacro()

macro(GTIRB_ADD_EXECUTABLE_GTEST)
  add_executable(${PROJECT_NAME} ${${PROJECT_NAME}_H} ${${PROJECT_NAME}_SRC})

  add_test(NAME ${PROJECT_NAME} COMMAND ${PROJECT_NAME})
  set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "gtirb/test")
endmacro()

macro(GTIRB_GET_ALL_SUBDIRS result curdir)
  file(
    GLOB children
    RELATIVE ${curdir}
    ${curdir}/*
  )
  set(dirlist "")
  foreach(child ${children})
    if(IS_DIRECTORY ${curdir}/${child})
      list(APPEND dirlist ${child})
    endif()
  endforeach()
  set(${result} ${dirlist})
endmacro()

macro(GTIRB_ADD_ALL_SUBDIRS)
  gtirb_get_all_subdirs(SUBDIRS ${CMAKE_CURRENT_SOURCE_DIR})
  foreach(subdir ${SUBDIRS})
    add_subdirectory(${subdir})
  endforeach()
endmacro()

# Provide a vaguely consistent interface to find a Python 3 interpreter. Just
# use FindPython3 if it exists, but fall back to looking for the interpreter
# program if we have to.
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.12")
  macro(GTIRB_FIND_PYTHON)
    find_package(Python3 REQUIRED COMPONENTS Interpreter)
    if(Python3_EXECUTABLE)
      set(PYTHON ${Python3_EXECUTABLE})
    endif()
  endmacro()
else()
  macro(GTIRB_FIND_PYTHON)
    find_program(PYTHON NAMES python3 python py)
    if(PYTHON)
      execute_process(
        COMMAND "${PYTHON}" --version OUTPUT_VARIABLE Python3_VERSION
      )
      string(REPLACE "Python " "" Python3_VERSION "${Python3_VERSION}")
      if("${Python3_VERSION}" VERSION_LESS 3)
        unset(PYTHON)
        unset(Python3_VERSION)
      endif()
    endif()
  endmacro()
endif()


================================================
FILE: PROTOBUF.md
================================================
Using Serialized GTIRB Data
===========================

> Note that for language with GTIRB APIs (at least C++, Python, Common
> Lisp) using the GTIRB API is preferrable to manipulating protobuf
> directly.

GTIRB uses a serialized format that consists of an 8-byte signature
followed by serialized [protobuf](https://github.com/google/protobuf/wiki)
data. The protobuf data allows for exploration and manipulation in the
language of your choice.
The [Google protocol buffers](https://developers.google.com/protocol-buffers/)
homepage lists the languages in which protocol buffers can be used directly;
users of other languages can convert the protobuf-formatted data to
JSON format and then use the JSON data in their applications. In the
future we intend to define a standard JSON schema for GTIRB.

The 8-byte signature that prefixes the protobuf data includes both
GTIRB's magic number and the version fot GTIRB's protobuf specification
that is in use. The layout is as follows:

 - Bytes 0-4 contain the ASCII characters: `GTIRB`.
 - Bytes 5-6 are considered reserved for future use and should be 0.
 - Byte 7 contains the GTIRB protobuf spec version in use.

Directory `gtirb/src/proto` contains the protocol buffer message type
definitions for GTIRB. You can inspect these `.proto` files to
determine the structure of the various GTIRB message types. The
top-level message type is `IR`.


- [General Guidelines](#general-guidelines)
- [Python Applications](#python-applications)
- [Java Applications](#java-applications)


# General Guidelines

If you have not used protocol buffers before, there are several useful
resources available at
https://developers.google.com/protocol-buffers/, including an
installation guide and a tutorial.

In general, writing an application to use GTIRB data in protocol
buffer format will involve the following steps.

1. Install the protocol buffer compiler (`protoc`) from
   https://github.com/protocolbuffers/protobuf/releases, if you
   haven't already done so.

2. Install any required protocol buffer library or libraries for the
   programming language you are using.

3. Invoke the protocol buffer compiler on the `.proto` files in
   `gtirb/src/proto/` to generate code in the language you wish to use.

4. Write your application, importing/including the file or files you
   generated in step 3.

The [Protocol Buffers API
Reference](https://developers.google.com/protocol-buffers/docs/reference/overview)
provides language-specific instructions for the various supported
programming languages, along with links to information for cases where
support is provided by third-party plug-ins.


# Python Applications

To create a Python application that uses serialized GTIRB data, do the
following.

1. Install the protocol buffer compiler (`protoc`).

2. Install the Python protobuf library, if you haven't already done so.

       $ pip install protobuf

3. Generate Python message definitions in a dedicated directory (for
   example, `python/`).

       $ mkdir -p python
       $ for f in src/proto/*.proto; do
            protoc -Isrc/proto --python_out=python $f
         done

   This will create a number of files with names of the form
   `<bn>_pb2.py` in the `python/` subdirectory of your working
   directory: one for each `<bn>.proto` in src/proto/, including
   `IR_pb2.py`.

4. Write your application. Make sure that it imports `IR_pb2`, or the
   parts of it that you require.

5. Run your application, making sure that the directory containing
   your message definitions is in the `PYTHONPATH`.

## Python Examples

Directory `gtirb/doc/examples` contains several example Python scripts
that use protocol buffers to explore serialized GTIRB data.
- [cfg-paths.py](doc/examples/cfg-paths.py)
- [data-symbols.py](doc/examples/data-symbols.py)


# Java Applications


To create a Java application that uses serialized GTIRB data, do the
following.

1. Install the protocol buffer compiler (`protoc`).

2. Download the `protobuf` Java runtime from
   [https://mvnrepository.com/artifact/com.google.protobuf/protobuf-java](https://mvnrepository.com/artifact/com.google.protobuf/protobuf-java)
   and save it somewhere suitable.

3. Generate Java message definitions in a dedicated directory (for example,
   `java/`).

       $ mkdir -p java
       $ for f in src/proto/*.proto; do
            protoc -Isrc/proto --java_out=java $f
         done

   This will create a subdirectory `java/proto/', containing a number
   of files with names of the form `<bn>OuterClass.java`: one for each
   `<bn>.proto` in `src/proto/`.

4. Compile the Java message definitions, making sure the `protobuf`
   Java runtime `.jar` file is in your `CLASSPATH`.

     $ mkdir -p java/classfiles
     $ CLASSPATH=<path/to/protobuf_jar> \
       javac -d java/classfiles java/proto/*.java

   (If you want to build a `.jar` file to combine all these
   `.class` files, do so at this stage.)

5. Write your application. Make sure that it imports all the classes
   you need from the `proto` package.

6. Compile and run your application, making sure that your CLASSPATH
   contains both the `protobuf` Java runtime `.jar` file and the
   location of the your compiled message definition classes.


## Java Examples

Directory `gtirb/doc/examples` contains several example Java programs
that use protocol buffers to explore serialized GTIRB data.

- [datasymbols.java](doc/examples/datasymbols.java)


================================================
FILE: README.md
================================================
# GTIRB

The GrammaTech Intermediate Representation for Binaries (GTIRB) is a
machine code analysis and rewriting data structure.  It is intended to
facilitate the communication of binary IR between programs performing
binary disassembly, analysis, transformation, and pretty printing.
GTIRB is modeled on LLVM-IR, and seeks to serve a similar
functionality of encouraging communication and interoperability
between tools.

The remainder of this file describes various aspects of GTIRB:
- [Structure](#structure)
- [Installing](#installing)
- [Building](#building)
- [Usage](#usage)

# Structure

GTIRB has the following structure.  Solid lines denote inheritance.
Dotted lines denote reference by UUID.

![GTIRB Data Structure](.gtirb.svg)

## IR

An instance of GTIRB may include multiple modules (`Module`) which
represent loadable objects such as executables or libraries, an
inter-procedural control flow graph (`IPCFG`), and Auxiliary Data tables
(`AuxData`) which can hold arbitrary analysis results in user-defined
formats which can easily reference other elements of the IR.  Each
module holds information such as symbols (`Symbol`) and sections which
themselves hold the actual bytes and data and code blocks of the
module.  The CFG consists of basic blocks (`Block`) and control flow
edges between these blocks.  Each data or code block references a
range of bytes in a byte interval (`ByteInterval`).  A section may
hold one large byte interval holding all blocks---if the relative
positions of blocks in that section are defined---or may hold one byte
interval per block---if the relative positions of blocks is not
defined, e.g. for the code blocks in the `.text` section during
program rewriting.  Each symbol holds a pointer to the block or datum
it references.


## Instructions

GTIRB explicitly does NOT represent instructions or instruction
semantics but does provide symbolic operand information and access to
the bytes.  There are many *intermediate languages* (IL)s for
representation of instruction semantics (e.g., [BAP][]'s [BIL][],
[Angr][]'s [Vex][], or [Ghidra][]'s P-code).  GTIRB works with these
or any other IL by storing instructions generally and efficiently as
*raw machine-code bytes* and separately storing the symbolic and
control flow information.  The popular [Capstone][]/[Keystone][]
decoder/encoder provide an excellent option to read and write
instructions from/to GTIRB's machine-code byte representation without
committing to any particular semantic IL.  By supporting multiple ILs
and separate storage of analysis results in auxiliary data tables
GTIRB enables collaboration between independent binary analysis and
rewriting teams and tools.

[BAP]: https://github.com/BinaryAnalysisPlatform/bap
[BIL]: https://github.com/BinaryAnalysisPlatform/bil/releases/download/v0.1/bil.pdf
[Angr]: http://angr.io
[Vex]: https://github.com/angr/pyvex
[Ghidra]: https://www.nsa.gov/resources/everyone/ghidra/
[Capstone]: https://www.capstone-engine.org
[Keystone]: https://www.keystone-engine.org


## Auxiliary Data

GTIRB provides for the sharing of additional information,
e.g. analysis results, in the form of `AuxData` objects.  These can
store maps and vectors of basic GTIRB types in a portable way. The
[GTIRB manual][] describes the structure for common types of auxiliary
data such as function boundary information, type information, or
results of common analyses in [Standard AuxData Schemata][].

[GTIRB manual]: https://grammatech.github.io/gtirb/
[Standard AuxData Schemata]: https://grammatech.github.io/gtirb/md__aux_data.html


## UUIDs

Every element of GTIRB---e.g., modules (`Module`), symbols (`Symbol`),
and blocks (`Block`)---has a universally unique identifier (UUID).
UUIDs allow both first-class IR components and AuxData tables to
reference elements of the IR.

Instructions and symbolic operands can be addressed by the class
`Offset` which encapsulates a UUID (that refers to the instruction's
block) and an offset.


# Installing

Packages currently exist for easily installing GTIRB (and attendant
tooling including the [ddisasm][] disassembler and [gtirb-pprinter][]
pretty printer) on Windows, and Ubuntu 20. See below for
instructions. Additionally, a public Docker image exists at
[grammatech/ddisasm][] with all of these tools installed. GTIRB is
versioned with Major.Minor.Patch versioning where Major version
increments will require significant source changes but should be very
rare, Minor version increments may require small source changes, and
Patch version increments shouldn't break any downstream builds. We do
not yet provide ABI compatibility across any version changes.

[ddisasm]: https://github.com/GrammaTech/ddisasm
[gtirb-pprinter]: https://github.com/GrammaTech/gtirb-pprinter
[grammatech/ddisasm]: https://hub.docker.com/r/grammatech/ddisasm


## Python API

The latest stable GTIRB Python API may be installed from PyPI using pip:

```sh
pip install gtirb
```

The latest unstable version of the Python API can be installed from a
prebuilt wheel:

```sh
pip install https://download.grammatech.com/gtirb/files/python/gtirb-0.dev-py3-none-any.whl
```

It is critical that the choice of a `stable` or `unstable` package matches the
installed ddisasm and gtirb-pprinter packages.

## Windows

Windows releases are packaged as .zip files and are available at
https://download.grammatech.com/gtirb/files/windows-release/.

## Ubuntu

Packages for Ubuntu 20 are available in the GTIRB apt repository and may
be installed per the following instructions.

First, add GrammaTech's APT key.
```sh
wget -O - https://download.grammatech.com/gtirb/files/apt-repo/conf/apt.gpg.key | apt-key add -
```

Next update your sources.list file.
```sh
echo "deb [arch=amd64] https://download.grammatech.com/gtirb/files/apt-repo [distribution] [component]"| sudo tee -a /etc/apt/sources.list
```
Where:
- `[distribution]` is `focal` (currently, only Ubuntu 20 packages are available)
- `[component]` is either `stable`, which holds the last versioned release, or
`unstable`, which holds the HEAD of the repository.

Finally update your package database and install the core GTIRB tools:
```sh
sudo apt-get update
sudo apt-get install gtirb-pprinter ddisasm
```

**Warning**:  Stable versions gtirb-2.0.0, gtirb-pprinter-2.1.0, ddisasm-1.8.0
and OLDER rely on metapackages which cause conflicts if you try `apt-get upgrade`
(see https://github.com/GrammaTech/gtirb/issues/63).  In this case,
uninstall and reinstall the packages you got from the GTIRB repository.  You
may need to use `dpkg --remove` to remove the metapackages (e.g. `ddisasm`)
before removing the concrete versioned packages (e.g. `ddisasm-1.5.1`).
NEWER stable versions no longer rely on metapackages and can be upgraded
without problems.

# Building

GTIRB's C++ API should successfully build in 64-bits with GCC, Clang,
and Visual Studio compilers supporting at least C++17.  GTIRB uses
CMake which must be installed with at least version 3.10.

The common build process looks like this:
```sh
mkdir build
cd build
# Note: You may wish to add some -D arguments to the next command. See below.
cmake <path/to/gtirb>
cmake --build .
# Run the test suite.
ctest
```

For customizing the GTIRB build, you can get a list of customization options by
navigating to your build directory and running:

```sh
cmake -LH
```

## Requirements

To build and install GTIRB, the following requirements should be installed:

- [CMake][], version 3.10.0 or higher.
   - Ubuntu 18 provides this version via the APT package `cmake`.
   - Ubuntu 16 and earlier provide out of date versions; build from
     source on those versions.
- [Protobuf][], version
  3.0.0 or later.
  - Ubuntu 18 provides this version via the APT packages
    `libprotobuf-dev` and `protobuf-compiler`.
  - Ubuntu 16 and earlier provide out of date versions; build from
    source on those versions.
- Boost [(non-standard Ubuntu package from launchpad.net)][], version 1.68 or later.
  - Ubuntu 18 only has version 1.65 in the standard repository.  See Ubuntu instructions above.

[CMake]: https://cmake.org/
[Protobuf]: https://developers.google.com/protocol-buffers/
[(non-standard Ubuntu package from launchpad.net)]: https://launchpad.net/~mhier/+archive/ubuntu/libboost-latest


# Usage

GTIRB is designed to be serialized using [Google protocol buffers][]
(i.e., [protobuf][]), enabling [easy and efficient use from any
programming language](#using-serialized-gtirb-data).

GTIRB may also be used through a dedicated API implemented in multiple
languages. The APIs provide efficient data structures suitable for use
by binary analysis and rewriting applications; see
[below](#gtirb-api-implementations) for details.

[Google protocol buffers]: https://developers.google.com/protocol-buffers/
[protobuf]: https://github.com/google/protobuf/wiki


## Using Serialized GTIRB Data

GTIRB uses a serialized format that consists of an 8-byte signature
followed by serialized [protobuf][] data. The protobuf data allows
for exploration and manipulation in the language of your choice.
The [Google protocol buffers][] homepage lists the languages in which
protocol buffers can be used directly; users of other languages can
convert the protobuf-formatted data to JSON format and then use the
JSON data in their applications.

The `proto` directory in this repository contains the protocol buffer
message type definitions for GTIRB. You can inspect these `.proto`
files to determine the structure of the various GTIRB message
types. The top-level message type is `IR`.

For more details, see [Using Serialized GTIRB Data](PROTOBUF.md).


## GTIRB API Implementations

The GTIRB API is currently available in C++, Python, and Common Lisp.
There is a *partial* Java API which is not ready for external use.
For language-independent API information, see [GTIRB
Components](doc/general/ComponentsIndex.md). For information about the
different API implementations, see:

  - [C++ API](doc/cpp/README.md)
  - [Python API](python/README.md)
  - [Common Lisp API](cl/README.md)
  - Java API **incomplete**


================================================
FILE: cl/CMakeLists.txt
================================================
file(GLOB CL_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.lisp
     ${CMAKE_CURRENT_SOURCE_DIR}/*.asd
)

set(CL_EXECUTABLE_STEMS dot update)

foreach(CL_EXECUTABLE_STEM ${CL_EXECUTABLE_STEMS})
  set(CL_EXECUTABLE ${CMAKE_CURRENT_BINARY_DIR}/gtirb-${CL_EXECUTABLE_STEM})
  list(APPEND CL_EXECUTABLES ${CL_EXECUTABLE})

  add_custom_command(
    OUTPUT ${CL_EXECUTABLE}
    DEPENDS ${CL_SOURCES} ${PROTO_FILES}
    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
    COMMAND
      ${LISP} --noinform --dynamic-space-size 16384 --no-userinit --no-sysinit
      --disable-debugger --load ${QUICKLISP}/setup.lisp --eval
      "(asdf:initialize-source-registry `(:source-registry (:tree \"${CMAKE_CURRENT_SOURCE_DIR}\") :inherit-configuration))"
      --eval "(ql:quickload :gtirb/${CL_EXECUTABLE_STEM})" --eval
      "(setf uiop/image::*lisp-interaction* nil)" --eval
      "(asdf:make :gtirb/run-${CL_EXECUTABLE_STEM} :type :program :monolithic t)"
      --eval "(uiop/image:quit)"
    COMMAND ${CMAKE_COMMAND} -E copy gtirb-${CL_EXECUTABLE_STEM}
            ${CMAKE_CURRENT_BINARY_DIR}
    COMMAND ${CMAKE_COMMAND} -E remove gtirb-${CL_EXECUTABLE_STEM}
    VERBATIM
  )
endforeach(CL_EXECUTABLE_STEM)

add_custom_target(clgtirb ALL DEPENDS ${CL_EXECUTABLES})

if(GTIRB_ENABLE_TESTS)
  add_test(
    NAME testgtirbcl
    COMMAND
      ${LISP} --noinform --dynamic-space-size 16384 --no-userinit --no-sysinit
      --disable-debugger --load "${QUICKLISP}/setup.lisp" --eval
      "(asdf:initialize-source-registry `(:source-registry (:tree \"${CMAKE_CURRENT_SOURCE_DIR}\") :inherit-configuration))"
      --eval "(ql:quickload :gtirb/test)" --eval "(gtirb/test:batch-test)"
    WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/"
  )
endif()


================================================
FILE: cl/README.md
================================================
Common Lisp library for GTIRB
=============================

The Common Lisp API for GrammaTech's IR for Binaries (GTIRB).  GTIRB
is a data structure designed to support the analysis and rewriting of
binary executables.  There are a number of tools that produce, process
and consume GTIRB.  See the following for more information on GTIRB:
- [https://github.com/grammatech/gtirb](https://github.com/grammatech/gtirb) the main GTIRB source repository.
- [https://grammatech.github.io/gtirb/](https://grammatech.github.io/gtirb/) the GTIRB manual repository.
- [https://arxiv.org/abs/1907.02859](https://arxiv.org/abs/1907.02859) a white-paper describing the design goals of GTIRB.
- [https://github.com/grammatech/ddisasm](https://github.com/grammatech/ddisasm) a very high performance reassembleable disassembler producing GTIRB.
- [https://github.com/grammatech/gtirb-pprinter](https://github.com/grammatech/gtirb-pprinter) a pretty printer from GTIRB to assembler.

## Requirements and Installation
Hopefully, eventually, it will be possible to install everything by
(1) installing
[Protobuf](https://developers.google.com/protocol-buffers/), version
3.7.0 or later, and then (2) installing this Common Lisp GTIRB library
with QuickLisp `(ql:quickload :gtirb)`.

We're a ways away from that currently.  So after you've installed
Protobuf, you should clone and install the Common Lisp `PROTOBUF`
package manually according to the instructions at
[https://github.com/brown/protobuf](https://github.com/brown/protobuf)
ensuring that the `protoc-gen-lisp` executable has been built and is
on your path.  At that point you should be able to load the GTIRB
package.

## Usage
The Common Lisp API attempts to provide access to the underlying GTIRB
data-structure described above in idiomatic common lisp.  The main
Protobuf data structures are wrapped in CLOS objects.  All fields are
modifiable with `setf`.  Invariant are maintained automatically by the
API, e.g. using `:around` methods.

In some cases accessors are provided beyond the fields directly
present in the Protobuf.  For example, every GTIRB element has a UUID
(which supports referencing elements from AuxData tables).  The Common
Lisp API provides uniform access to any element through the `get-uuid`
method which operates similarly to `gethash` only it may be called on
any top-level GTIRB `IR` object (which itself maintains a hash of
every contained element by UUID).

The GTIRB CFG is represented as a graph using the Common Lisp graph
library from
[https://github.com/eschulte/graph](https://github.com/eschulte/graph).
This simple representation should promote easy exploration and
modification of the control flow graph, and the many graph analysis
functions defined in that library may be directly applied to the CFG.
Every node of the graph holds the UUID for a code block.

The bytes of any code and data block may be accessed by calling the
`bytes` method, which provides directly access to the bytes of the
block's `byte-interval`.

### Example Usage
See the test suite for a large number of basic usage examples.
However, the following gives a simple usage example.

1.  From the command-line.  Use the datalog disassembler `ddisasm` to
    disassemble the `ls` executable into a GTIRB instance.

        ddisasm --ir $(which ls) /tmp/ls.gtirb

2.  From the Common Lisp REPL.  Load the GTIRB API, and then load the
    GTIRB instance created in step (1) into a common lisp GTIRB object.

        (ql:quickload :gtirb)
        (use-package :gtirb)
        (defparameter ls (read-gtirb "/tmp/ls.gtirb"))

3.  At this point you can explore the CFG, perform analyses, or even
    modify the contents of the GTIRB object.  Results of analyses may
    be saved into new AuxData tables which become part of the GTIRB
    object for later use by other sessions or by other tools
    potentially written in other languages.

        ;; Do stuff with the GTIRB, maybe make changes.

4.  Finally, the resulting GTIRB object may be written back to the
    file system.

        (write-gtirb ls "/tmp/ls-modified.gtirb")

5.  At the command line.  A new executable may be created from the
    modified gtirb file using the `gtirb-pprinter`.

        gtirb-pprinter --ir /tmp/ls-modified.gtirb --binary /tmp/ls-modified


================================================
FILE: cl/dot.lisp
================================================
(defpackage :gtirb/dot
  (:use :common-lisp :alexandria :graph :graph/dot :gtirb
        :command-line-arguments
        :named-readtables :curry-compose-reader-macros)
  (:import-from :uiop :nest)
  (:import-from :uiop/image :quit)
  (:shadowing-import-from :proto-v0 :ir)
  (:shadowing-import-from :gtirb :symbol)
  (:export :to-dot :to-dot-file))
(in-package :gtirb/dot)
(in-readtable :curry-compose-reader-macros)

(defun dot-edge-label (graph edge)
  (let ((obj (edge-value graph edge)))
    (format nil "\"~a[~:[U~;C~]:~:[I~;D~]]\""
            (edge-type obj) (conditional obj) (direct obj))))

(defmethod to-dot ((obj gtirb) &rest rest)
  "Write the CFG of MODULE to the Graphviz graphing language."
  (apply #'to-dot (cfg obj)
         :edge-attrs (list (cons :label {dot-edge-label (cfg obj)}))
         rest))

(eval-when (:compile-toplevel :load-toplevel :execute)
  (defparameter +udpate-args+
    '((("help" #\h #\?) :type boolean :optional t
       :documentation "display help output"))))

;;; NOTE: When Quicklisp updates graph to the latest this can be removed.
(defmethod to-dot-file
    ((object t) path &key attributes node-attrs edge-attrs
                       subgraphs ranks)
  (with-open-file (out path :direction :output :if-exists :supersede)
    (to-dot object :stream out :attributes attributes :node-attrs node-attrs
            :edge-attrs edge-attrs :subgraphs subgraphs :ranks ranks)))

(define-command dot (gtirb-file dot-file &spec +udpate-args+)
  "Write first GTIRB module in GTIRB-FILE to DOT-FILE." ""
  (when help (show-help-for-dot) (quit))
  (to-dot-file (read-gtirb gtirb-file) dot-file))


================================================
FILE: cl/gtirb.asd
================================================
(defsystem "gtirb"
    :name "gtirb"
    :author "GrammaTech"
    :licence "MIT"
    :description "Common Lisp library for GTIRB"
    :long-description "A Common Lisp front end to the GrammaTech
  Intermediate Representation for Bianries (GTIRB).  GTIRB is
  serialized using Google's protocol buffers.  This library wraps the
  raw protocol buffer serialization with a more Lispy interface."
    :depends-on (:gtirb/gtirb)
    :class :package-inferred-system
    :defsystem-depends-on (:asdf-package-system :protobuf)
    :in-order-to ((test-op (load-op "gtirb/test")))
    :perform (test-op (o c) (symbol-call :gtirb/test '#:test)))

(defsystem "proto-v0"
    :name "proto-v0"
    :description "Common Lisp interface to (old V0) GTIRB protobuf files"
    :author "GrammaTech"
    :license "MIT"
    :defsystem-depends-on (:protobuf)
    :components
    ((:static-file "README.md")
     ;; See the protobuf defsystem extension for how the gtirb.proto
     ;; file is loaded into Lisp.  https://github.com/brown/protobuf
     (:module proto
              :pathname "../proto/v0/"
              :components
              ((:protobuf-source-file "AuxDataContainer")
               (:protobuf-source-file "CFG")
               (:protobuf-source-file "Section")
               (:protobuf-source-file "Offset")
               (:protobuf-source-file "IR")
               (:protobuf-source-file "ByteMap")
               (:protobuf-source-file "ProxyBlock")
               (:protobuf-source-file "AuxData")
               (:protobuf-source-file "Module")
               (:protobuf-source-file "DataObject")
               (:protobuf-source-file "ImageByteMap")
               (:protobuf-source-file "SymbolicExpression")
               (:protobuf-source-file "Symbol")
               (:protobuf-source-file "Block")))))

(defsystem "proto"
    :name "proto"
    :description "Common Lisp interface to GTIRB protobuf files"
    :author "GrammaTech"
    :license "MIT"
    :defsystem-depends-on (:protobuf)
    :components
    ((:static-file "README.md")
     ;; See the protobuf defsystem extension for how the gtirb.proto
     ;; file is loaded into Lisp.  https://github.com/brown/protobuf
     (:module proto
              :pathname "../proto"
              :components
              ((:protobuf-source-file "AuxData")
               (:protobuf-source-file "ByteInterval")
               (:protobuf-source-file "CFG")
               (:protobuf-source-file "CodeBlock")
               (:protobuf-source-file "Offset")
               (:protobuf-source-file "DataBlock")
               (:protobuf-source-file "IR")
               (:protobuf-source-file "Module")
               (:protobuf-source-file "ProxyBlock")
               (:protobuf-source-file "Section")
               (:protobuf-source-file "Symbol")
               (:protobuf-source-file "SymbolicExpression")))))

(defsystem "gtirb/run-validate"
    :author "GrammaTech"
    :licence "MIT"
    :description "Validate a GTIRB instance."
    :depends-on (gtirb/validate)
    :build-operation "asdf:program-op"
    :build-pathname "gtirb-validate"
    :entry-point "gtirb/validate::run-validate-file")

(defsystem "gtirb/run-update"
    :author "GrammaTech"
    :licence "MIT"
    :description "Convert between GTIRB protobuf versions."
    :depends-on (gtirb/update)
    :build-operation "asdf:program-op"
    :build-pathname "gtirb-update"
    :entry-point "gtirb/update::run-update")

(defsystem "gtirb/run-dot"
    :author "GrammaTech"
    :licence "MIT"
    :description "Write GTIRB to a dot graph."
    :depends-on (gtirb/dot)
    :build-operation "asdf:program-op"
    :build-pathname "gtirb-dot"
    :entry-point "gtirb/dot::run-dot")

(register-system-packages "proto" '(:gtirb.proto))
(register-system-packages "cl-interval" '(:interval))


================================================
FILE: cl/gtirb.lisp
================================================
(defpackage :gtirb/gtirb
  (:nicknames :gtirb)
  (:use :common-lisp :alexandria :cl-ppcre :graph :trivia
        :trivial-utf-8
        :ieee-floats
        :gtirb/ranged
        :gtirb/utility
        :gtirb/version
        :named-readtables :curry-compose-reader-macros)
  (:shadow :symbol)
  (:import-from :gtirb.proto)
  (:import-from :trivial-package-local-nicknames :add-package-local-nickname)
  (:import-from :uiop :nest)
  (:import-from :cl-intbytes
                :int->octets
                :octets->int
                :octets->uint)
  (:export :read-gtirb
           :write-gtirb
           :is-equal-p
           :*is-equal-p-verbose-p*
           :gtirb-node
           :get-uuid
           :remove-uuid
           :at-address
           :on-address
           :address-range
           :uuid
           :update-proto
;;; Classes and fields.
           :gtirb
           :ir
           :cfg
           :version
           ;; Module
           :module
           :name
           :binary-path
           :isa
           :file-format
           :byte-order
           :preferred-addr
           :rebase-delta
           :symbols
           :proxies
           :sections
           :aux-data
           :entry-point
           ;; Symbol
           :symbol
           :value
           :payload
           :at-end
           ;; Section
           :section
           :byte-intervals
           :flags
           ;; Byte-Interval
           :byte-interval
           :blocks
           :addressp
           :address
           :contents
           :size
           :truncate-contents
           :ignore
           ;; Symbolic expressions
           :symbolic-expressions
           :sym-addr-const
           :sym-addr-addr
           :scale
           :*preserve-symbolic-expressions*
           ;; Block
           :gtirb-block
           :gtirb-byte-block
           :code-block
           :data-block
           :decode-mode
           :bytes
           :offset
           ;; Edge-Label
           :edge-label
           :conditional
           :direct
           :edge-type
           ;; Aux-Data
           :aux-data-type
           :aux-data-data
           ;; gtirb
           :modules))
(in-package :gtirb/gtirb)
(in-readtable :curry-compose-reader-macros)

(eval-when (:compile-toplevel :load-toplevel :execute)
  (add-package-local-nickname :proto :gtirb.proto))

(defgeneric read-gtirb (source)
  (:documentation "Read a protobuf serialized GTIRB instance from SOURCE.")
  (:method ((path t))
    (make-instance 'gtirb :proto (read-proto 'proto:ir path))))

(defmethod read-gtirb :around (source)
  "Check the protobuf version."
  (let ((gtirb (call-next-method)))
    (unless (= protobuf-version (proto:version (proto gtirb)))
      (warn "Protobuf version mismatch version ~a from ~a isn't expected ~a"
            (proto:version (proto gtirb)) source protobuf-version))
    gtirb))

(defun write-gtirb (gtirb path)
  "Write a GTIRB IR object to PATH."
  (update-proto gtirb)
  (write-proto (proto gtirb) path))


;;;; Class utilities.
(defvar *is-equal-p-verbose-p* nil
  "Compare equality verbosely in the `is-equal-p' function.
This may be useful to print contextual information when an equality
comparison fails for a large object with many nested objects.")

(defvar *is-equal-p-verbose-output-buffer* nil
  "Buffer to hold output of is-equal-p verbose failure messages.")

(defvar *is-equal-p-verbose-output-length* 10
  "Maximum length of output to show of `*is-equal-p-verbose-output-buffer*'.")

(defmacro compare-or-verbose (comparison left right &rest flags)
  `(or (,comparison ,left ,right ,@flags)
       (prog1 nil
         (when *is-equal-p-verbose-p*
           (push (format nil "NOT ~S" (list ',comparison ,left ,right))
                 *is-equal-p-verbose-output-buffer*)))))

(defun is-equal-p (left right)
  "Return t if LEFT and RIGHT are equal.
Recursively descend into any sub-structure.  Custom recursive equality
predicates are defined for common Common Lisp data structures as well
as all GTIRB structures."
  (let ((*is-equal-p-verbose-output-buffer* nil))
    (let ((equalp (is-equal-p-internal left right)))
      (prog1 equalp
        (when (and (not equalp) *is-equal-p-verbose-p*)
          (format t "~{~S~%~}"
                  (subseq *is-equal-p-verbose-output-buffer*
                          0 *is-equal-p-verbose-output-length*)))))))

(defmethod is-equal-p-internal :around ((left t) (right t))
  (let ((equalp (call-next-method)))
    (when equalp (setf *is-equal-p-verbose-output-buffer* nil))
    equalp))

(defgeneric is-equal-p-internal (left right)
  (:documentation "Internal function called by `is-equal-p'.")
  (:method ((left t) (right t))
    (compare-or-verbose equalp left right))
  (:method ((left number) (right number))
    (compare-or-verbose = left right))
  (:method ((left cl:symbol) (right cl:symbol))
    (compare-or-verbose eql left right))
  (:method ((left string) (right string))
    (compare-or-verbose string= left right))
  (:method ((left cons) (right cons))
    (if (and (proper-list-p left) (proper-list-p right))
        (compare-or-verbose set-equal left right :test #'is-equal-p-internal)
        (and (compare-or-verbose is-equal-p-internal (car left) (car right))
             (compare-or-verbose is-equal-p-internal (cdr left) (cdr right)))))
  (:method ((left hash-table) (right hash-table))
    (compare-or-verbose set-equal
                        (hash-table-alist left) (hash-table-alist right)
                        :test #'is-equal-p-internal))
  (:method ((left graph:digraph) (right graph:digraph))
    (and (compare-or-verbose set-equal (graph:nodes left) (graph:nodes right)
                             :test #'is-equal-p-internal)
         (compare-or-verbose set-equal (graph:edges-w-values left)
                             (graph:edges-w-values right)
                             :test #'is-equal-p-internal))))

(defclass gtirb-node () ()
  (:documentation "Objects with a UUID contained in a GTIRB instance."))

(defclass proto-backed (gtirb-node) ()
  (:documentation "Objects which may be serialized to/from protobuf."))

(defgeneric uuid (object)
  (:documentation "Return the UUID for OBJECT as an integer.")
  (:method ((obj proto-backed)) (uuid-to-integer (proto:uuid (proto obj)))))

(defgeneric get-uuid (uuid object)
  (:documentation "Get the referent of UUID in OBJECT."))

(defgeneric remove-uuid (uuid object)
  (:documentation "Remove the entry for UUID from OBJECT."))

(defgeneric (setf get-uuid) (new uuid object)
  (:documentation "Register REFERENT behind UUID in OBJECT."))

(defgeneric insert-address (object item start-address &optional end-address)
  (:documentation
   "Insert ITEM into OBJECT between START-ADDRESS and END-ADDRESS."))

(defgeneric delete-address (object item start-address &optional end-address)
  (:documentation
   "Delete ITEM from OBJECT between START-ADDRESS and END-ADDRESS."))

(defgeneric at-address (object address)
  (:documentation
   "Find all objects in OBJECT starting at ADDRESS."))

(defgeneric on-address (object start-address &optional end-address)
  (:documentation
   "Find all objects in OBJECT between START-ADDRESS and END-ADDRESS."))

(defgeneric set-parent-uuid (new uuid object)
  (:documentation "Set UUID to NEW in OBJECT's parent."))

(defgeneric update-proto (proto-backed-object)
  (:documentation
   "Update and return the `proto' field of PROTO-BACKED-OBJECT.
This will ensure that any changes made to PROTO-BACKED-OBJECT outside
of its protocol buffer, e.g. any slots initialized using the
:from-proto option to `define-proto-backed-class', are synchronized
against the object's protocol buffer.")
  (:method ((proto-backed-object proto-backed))
    (proto proto-backed-object)))

(defgeneric address-range (proto-backed-object)
  (:documentation
   "Return any address range of the PROTO-BACKED-OBJECT GTIRB object."))

(defmacro define-proto-backed-class ((class proto-class) super-classes
                                     slot-specifiers proto-fields
                                     &rest options)
  "Define a Common Lisp class backed by a protobuf class.
SLOT-SPECIFIERS is as in `defclass' with the addition of optional
:to-proto and :from-proto fields, which may take protobuf
serialization functions, and :skip-equal-p f
Download .txt
gitextract_07t2irr6/

├── .ci/
│   ├── Dockerfile.static
│   ├── Dockerfile.ubuntu20
│   ├── Dockerfile.ubuntu22
│   ├── Dockerfile.ubuntu24
│   ├── PKGBUILD
│   ├── adjust-coverage-paths.py
│   ├── build.py
│   ├── gitlab-ci.yml
│   ├── pre-commit
│   ├── test-install-all.sh
│   ├── test-install-static.sh
│   ├── test-install.cpp
│   ├── test-install.lisp
│   ├── test-install.py
│   └── test-interop.sh
├── .clang-format
├── .clang-tidy
├── .cmake-format.yaml
├── .dockerignore
├── .flake8
├── .github/
│   └── workflows/
│       └── actions.yml
├── .gitignore
├── .gtirb.tex
├── .isort.cfg
├── .lisp-format
├── .pre-commit-config.yaml
├── AlignOf.cmake
├── AuxData.md
├── CHANGELOG.md
├── CMakeLists.googletest
├── CMakeLists.txt
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── FAQ.md
├── LICENSE.txt
├── Macros.cmake
├── PROTOBUF.md
├── README.md
├── cl/
│   ├── CMakeLists.txt
│   ├── README.md
│   ├── dot.lisp
│   ├── gtirb.asd
│   ├── gtirb.lisp
│   ├── package.lisp
│   ├── ranged.lisp
│   ├── test.lisp
│   ├── update.lisp
│   ├── utility.lisp
│   ├── validate.lisp
│   └── version.lisp
├── conanfile.py
├── cpack-config.cmake
├── doc/
│   ├── CFG-Edges.md
│   ├── CMakeLists.txt
│   ├── binary-representation.md
│   ├── cl/
│   │   ├── CMakeLists.txt
│   │   └── write-documentation.lisp
│   ├── cpp/
│   │   ├── CMakeLists.txt
│   │   ├── Doxyfile.in
│   │   ├── DoxygenLayout.xml
│   │   └── README.md
│   ├── dot/
│   │   └── gtirb.dot
│   ├── examples/
│   │   ├── CMakeLists.txt
│   │   ├── api-walkthrough.cpp
│   │   ├── cfg-paths.cpp
│   │   ├── cfg-paths.lisp
│   │   ├── cfg-paths.py
│   │   ├── cfgpaths.java
│   │   ├── data-symbols.cpp
│   │   ├── data-symbols.lisp
│   │   ├── data-symbols.py
│   │   ├── datasymbols.java
│   │   ├── functions.cpp
│   │   ├── jumps.cpp
│   │   ├── show-cfg.lisp
│   │   ├── show-cfg.py
│   │   └── stack-stamp.md
│   ├── general/
│   │   ├── AuxDataContainer.md
│   │   ├── Block.md
│   │   ├── ByteBlock.md
│   │   ├── ByteInterval.md
│   │   ├── CFG.md
│   │   ├── CMakeLists.txt
│   │   ├── COMPONENTS.md
│   │   ├── CfgEdge.md
│   │   ├── CfgEdgeLabel.md
│   │   ├── CfgNode.md
│   │   ├── CodeBlock.md
│   │   ├── DataBlock.md
│   │   ├── Doxyfile.in
│   │   ├── DoxygenLayout.xml
│   │   ├── IR.md
│   │   ├── Module.md
│   │   ├── Node.md
│   │   ├── ProxyBlock.md
│   │   ├── Section.md
│   │   ├── SymAddrAddr.md
│   │   ├── SymAddrConst.md
│   │   ├── Symbol.md
│   │   ├── SymbolicExpression.md
│   │   ├── Version.md
│   │   ├── examples.dox
│   │   └── images.dox
│   ├── java/
│   │   └── CMakeLists.txt
│   ├── preprocmd.py
│   └── python/
│       ├── CMakeLists.txt
│       └── conf.py
├── gtirbConfig.cmake.in
├── include/
│   └── gtirb/
│       ├── Addr.hpp
│       ├── Allocator.hpp
│       ├── AuxData.hpp
│       ├── AuxDataContainer.hpp
│       ├── AuxDataSchema.hpp
│       ├── ByteInterval.hpp
│       ├── CFG.hpp
│       ├── Casting.hpp
│       ├── CfgNode.hpp
│       ├── CodeBlock.hpp
│       ├── Context.hpp
│       ├── DataBlock.hpp
│       ├── DecodeMode.hpp
│       ├── ErrorOr.hpp
│       ├── Export.hpp
│       ├── IR.hpp
│       ├── Module.hpp
│       ├── Node.hpp
│       ├── Observer.hpp
│       ├── Offset.hpp
│       ├── ProxyBlock.hpp
│       ├── Section.hpp
│       ├── Symbol.hpp
│       ├── SymbolicExpression.hpp
│       ├── Utility.hpp
│       ├── gtirb.hpp
│       └── version.h.in
├── java/
│   ├── .gitignore
│   ├── CMakeLists.txt
│   ├── Version.java.in
│   ├── build.gradle
│   ├── com/
│   │   └── grammatech/
│   │       └── gtirb/
│   │           ├── AuxDataContainer.java
│   │           ├── AuxDataSchema.java
│   │           ├── AuxDataSchemas.java
│   │           ├── ByteBlock.java
│   │           ├── ByteInterval.java
│   │           ├── CFG.java
│   │           ├── CfiDirective.java
│   │           ├── CodeBlock.java
│   │           ├── DataBlock.java
│   │           ├── Edge.java
│   │           ├── ElfSymbolInfoTuple.java
│   │           ├── ElfSymbolVersionsTable.java
│   │           ├── IR.java
│   │           ├── Module.java
│   │           ├── Node.java
│   │           ├── Offset.java
│   │           ├── PeExportEntry.java
│   │           ├── PeImportEntry.java
│   │           ├── PeResourceEntry.java
│   │           ├── ProbFuncName.java
│   │           ├── ProxyBlock.java
│   │           ├── Section.java
│   │           ├── SectionPropertyTuple.java
│   │           ├── SymAddrAddr.java
│   │           ├── SymAddrConst.java
│   │           ├── Symbol.java
│   │           ├── SymbolicExpression.java
│   │           ├── TreeListItem.java
│   │           ├── TreeListUtils.java
│   │           ├── TypeTableEntry.java
│   │           ├── Util.java
│   │           ├── auxdatacodec/
│   │           │   ├── BoolCodec.java
│   │           │   ├── ByteCodec.java
│   │           │   ├── Codec.java
│   │           │   ├── FloatCodec.java
│   │           │   ├── IntegerCodec.java
│   │           │   ├── ListCodec.java
│   │           │   ├── LongCodec.java
│   │           │   ├── MapCodec.java
│   │           │   ├── OffsetCodec.java
│   │           │   ├── SetCodec.java
│   │           │   ├── ShortCodec.java
│   │           │   ├── StringCodec.java
│   │           │   ├── Tuple1Codec.java
│   │           │   ├── Tuple2Codec.java
│   │           │   ├── Tuple3Codec.java
│   │           │   ├── Tuple4Codec.java
│   │           │   ├── Tuple5Codec.java
│   │           │   ├── UuidCodec.java
│   │           │   ├── Variant11Codec.java
│   │           │   ├── Variant2Codec.java
│   │           │   └── Variant3Codec.java
│   │           ├── tuple/
│   │           │   ├── Tuple1.java
│   │           │   ├── Tuple2.java
│   │           │   ├── Tuple3.java
│   │           │   ├── Tuple4.java
│   │           │   └── Tuple5.java
│   │           └── variant/
│   │               ├── Token.java
│   │               ├── Variant11.java
│   │               ├── Variant2.java
│   │               └── Variant3.java
│   ├── pom.xml.in
│   ├── settings.gradle
│   └── tests/
│       ├── TestAuxData.java
│       ├── TestByteIntervals.java
│       ├── TestIrSanity.java
│       ├── TestModules.java
│       ├── TestSections.java
│       ├── TestSymbolicExpressions.java
│       ├── TestSymbols.java
│       ├── TestTuple.java
│       └── TestVariant.java
├── proto/
│   ├── AuxData.proto
│   ├── ByteInterval.proto
│   ├── CFG.proto
│   ├── CMakeLists.txt
│   ├── CodeBlock.proto
│   ├── DataBlock.proto
│   ├── IR.proto
│   ├── Module.proto
│   ├── Offset.proto
│   ├── ProxyBlock.proto
│   ├── Section.proto
│   ├── Symbol.proto
│   ├── SymbolicExpression.proto
│   └── v0/
│       ├── AuxData.proto
│       ├── AuxDataContainer.proto
│       ├── Block.proto
│       ├── ByteMap.proto
│       ├── CFG.proto
│       ├── CMakeLists.txt
│       ├── DataObject.proto
│       ├── IR.proto
│       ├── ImageByteMap.proto
│       ├── Module.proto
│       ├── Offset.proto
│       ├── ProxyBlock.proto
│       ├── Section.proto
│       ├── Symbol.proto
│       └── SymbolicExpression.proto
├── python/
│   ├── CMakeLists.txt
│   ├── README.md
│   ├── gtirb/
│   │   ├── __init__.py
│   │   ├── auxdata.py
│   │   ├── block.py
│   │   ├── byteinterval.py
│   │   ├── cfg.py
│   │   ├── ir.py
│   │   ├── lazyintervaltree.py
│   │   ├── module.py
│   │   ├── node.py
│   │   ├── offset.py
│   │   ├── proto/
│   │   │   └── __init__.py
│   │   ├── section.py
│   │   ├── serialization.py
│   │   ├── symbol.py
│   │   ├── symbolicexpression.py
│   │   └── util.py
│   ├── mypy.ini.in
│   ├── pyproject.toml.in
│   ├── requirements-dev.txt
│   ├── requirements-mypy.txt
│   ├── stubs/
│   │   ├── README.md
│   │   ├── intervaltree/
│   │   │   ├── __init__.pyi
│   │   │   ├── interval.pyi
│   │   │   └── intervaltree.pyi
│   │   ├── networkx/
│   │   │   ├── __init__.pyi
│   │   │   └── classes/
│   │   │       ├── __init__.pyi
│   │   │       └── multidigraph.pyi
│   │   └── sortedcontainers/
│   │       ├── __init__.pyi
│   │       └── sorteddict.pyi
│   ├── tests/
│   │   ├── hello.gtirb
│   │   ├── helpers.py
│   │   ├── test_auxdata.py
│   │   ├── test_block.py
│   │   ├── test_blocks_at.py
│   │   ├── test_blocks_at_offset.py
│   │   ├── test_blocks_on.py
│   │   ├── test_blocks_on_offset.py
│   │   ├── test_byte_intervals_at.py
│   │   ├── test_byte_intervals_on.py
│   │   ├── test_cfg.py
│   │   ├── test_deep_eq.py
│   │   ├── test_ir.py
│   │   ├── test_module.py
│   │   ├── test_node_from_uuid.py
│   │   ├── test_properties.py
│   │   ├── test_repr.py
│   │   ├── test_section.py
│   │   ├── test_serialization.py
│   │   ├── test_symbolic_expression.py
│   │   ├── test_symbolic_expressions_at.py
│   │   └── test_wrapper.py
│   ├── tox.ini
│   └── version.py.in
├── resources/
│   └── windows_version_resource.rc.in
├── src/
│   ├── AuxData.cpp
│   ├── AuxDataContainer.cpp
│   ├── ByteInterval.cpp
│   ├── CFG.cpp
│   ├── CFGSerialization.hpp
│   ├── CMakeLists.txt
│   ├── CodeBlock.cpp
│   ├── Context.cpp
│   ├── DataBlock.cpp
│   ├── ErrorOr.cpp
│   ├── IR.cpp
│   ├── Module.cpp
│   ├── Node.cpp
│   ├── Offset.cpp
│   ├── ProxyBlock.cpp
│   ├── Section.cpp
│   ├── Serialization.cpp
│   ├── Serialization.hpp
│   ├── Symbol.cpp
│   ├── SymbolicExpression.cpp
│   ├── SymbolicExpressionSerialization.hpp
│   ├── Utility.cpp
│   ├── gtirb/
│   │   └── proto/
│   │       └── CMakeLists.txt
│   └── test/
│       ├── Addr.test.cpp
│       ├── Allocator.test.cpp
│       ├── AuxData.test.cpp
│       ├── AuxDataContainer.test.cpp
│       ├── AuxDataContainerSchema.hpp
│       ├── AuxDataSchemaRegistration.test.cpp
│       ├── ByteInterval.test.cpp
│       ├── CFG.test.cpp
│       ├── CMakeLists.txt
│       ├── CodeBlock.test.cpp
│       ├── DataBlock.test.cpp
│       ├── IR.test.cpp
│       ├── Main.test.cpp
│       ├── Main.test.hpp
│       ├── MergeSortedIterator.test.cpp
│       ├── Module.test.cpp
│       ├── Node.test.cpp
│       ├── Offset.test.cpp
│       ├── PrepDeathTest.hpp
│       ├── PrepTestGTIRB.cpp
│       ├── ProxyBlock.test.cpp
│       ├── Section.test.cpp
│       ├── SerializationTestHarness.hpp
│       ├── Symbol.test.cpp
│       ├── SymbolicExpression.test.cpp
│       ├── TestHelpers.hpp
│       ├── TypedNodeTest.cpp
│       ├── UtilsDeprecatedGlobals.test.cpp
│       ├── UtilsUsingGtirbNamespace.test.cpp
│       ├── config-test.h.in
│       ├── runtests.cmake
│       ├── testInputBinary/
│       │   ├── CMakeLists.txt
│       │   └── TestInputBinary.cpp
│       └── testInterop/
│           ├── CMakeLists.txt
│           ├── test_floats.cpp
│           ├── test_floats.py
│           ├── test_variants.cpp
│           └── test_variants.py
└── version.txt
Download .txt
Showing preview only (238K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (2877 symbols across 196 files)

FILE: .ci/build.py
  function run_conan (line 8) | def run_conan(args):
  function build (line 15) | def build(argv):

FILE: .ci/test-install.cpp
  function main (line 5) | int main() {

FILE: conanfile.py
  function get_gtirb_version (line 9) | def get_gtirb_version():
  function branch_to_channel (line 34) | def branch_to_channel(branch):
  class Properties (line 41) | class Properties:
    method version (line 47) | def version(self):
    method version (line 53) | def version(self, ver):
    method description (line 57) | def description(self):
    method url (line 61) | def url(self):
    method conan_channel (line 65) | def conan_channel(self):
    method archived_channels (line 73) | def archived_channels(self):
    method conan_ref (line 85) | def conan_ref(self):
    method conan_recipe (line 90) | def conan_recipe(self):
  class GtirbConan (line 94) | class GtirbConan(Properties, ConanFile):
    method configure (line 104) | def configure(self):
    method build_requirements (line 113) | def build_requirements(self):
    method build (line 117) | def build(self):
    method build_cmake (line 126) | def build_cmake(self):
    method package (line 170) | def package(self):
    method package_info (line 173) | def package_info(self):
    method package_id (line 176) | def package_id(self):

FILE: doc/examples/api-walkthrough.cpp
  function main (line 8) | int main() {

FILE: doc/examples/cfg-paths.cpp
  class PrintPathsVisitor (line 25) | class PrintPathsVisitor {
    method PrintPathsVisitor (line 29) | PrintPathsVisitor(const CFG& G, const CodeBlock& B)
    method visit (line 32) | void visit(Vertex V) {
  function main (line 67) | int main(int argc, char** argv) {

FILE: doc/examples/cfgpaths.java
  class cfgpaths (line 60) | class cfgpaths {
    method printPath (line 67) | static void printPath(Stack<Long> path) {
    method printPathsRec (line 79) | static int printPathsRec(ByteString src, ByteString targ,
    method printPaths (line 108) | static void printPaths(Block source, Block target, CFG cfg) {
    method findBlockByAddr (line 129) | static Block findBlockByAddr(Long addr, CFG cfg) {
    method main (line 138) | public static void main(String[] args) {

FILE: doc/examples/data-symbols.cpp
  function main (line 19) | int main(int argc, char** argv) {

FILE: doc/examples/datasymbols.java
  class datasymbols (line 57) | class datasymbols {
    method main (line 59) | public static void main(String[] args) {

FILE: doc/examples/functions.cpp
  function register_aux_data_types (line 21) | void register_aux_data_types() {
  function main (line 27) | int main(int argc, char** argv) {

FILE: doc/examples/jumps.cpp
  function main (line 20) | int main(int argc, char** argv) {

FILE: doc/preprocmd.py
  function anchor_page_headings (line 15) | def anchor_page_headings(pagetxt):
  function makePyApiLink (line 51) | def makePyApiLink(pymatch):
  function makeDoxyExampleLink (line 67) | def makeDoxyExampleLink(exname, linktext, pathadj):

FILE: include/gtirb/Addr.hpp
  type gtirb (line 28) | namespace gtirb {
    function Addr (line 37) | class GTIRB_EXPORT_API Addr {
    function AddrRange (line 205) | class GTIRB_EXPORT_API AddrRange {
    function asOptionalSize (line 255) | std::optional<uint64_t> inline asOptionalSize(uint64_t X) {
    function asOptionalSize (line 260) | std::optional<uint64_t> inline asOptionalSize(std::optional<uint64_t> ...
    function addressRange (line 275) | std::optional<AddrRange> addressRange(const T& Object) {
    function addressLimit (line 294) | std::optional<Addr> addressLimit(const T& Object) {
    function containsAddr (line 314) | bool containsAddr(const T& Object, Addr Ea) {
  type std (line 359) | namespace std {
    type hash<gtirb::Addr> (line 362) | struct hash<gtirb::Addr> {

FILE: include/gtirb/Allocator.hpp
  type gtirb (line 43) | namespace gtirb {
    type allocator (line 48) | namespace allocator {
      function GTIRB_DEPRECATED_UTILS (line 56) | GTIRB_DEPRECATED_UTILS inline uint64_t NextPowerOf2(uint64_t A) {
      function GTIRB_DEPRECATED_UTILS (line 70) | GTIRB_DEPRECATED_UTILS constexpr inline bool isPowerOf2_64(uint64_t ...
      function GTIRB_DEPRECATED_UTILS (line 81) | GTIRB_DEPRECATED_UTILS inline uintptr_t alignAddr(const void* Addr,
      function GTIRB_DEPRECATED_UTILS (line 96) | GTIRB_DEPRECATED_UTILS inline size_t alignmentAdjustment(const void*...
      function BumpPtrAllocatorImpl (line 112) | class GTIRB_DEPRECATED_UTILS BumpPtrAllocatorImpl {
      function SpecificBumpPtrAllocator (line 299) | class GTIRB_DEPRECATED_UTILS SpecificBumpPtrAllocator {
  type S (line 390) | struct S {

FILE: include/gtirb/AuxData.hpp
  type gtirb (line 40) | namespace gtirb {
    type proto (line 41) | namespace proto {
      class AuxData (line 42) | class AuxData
    class Context (line 44) | class Context
    type is_sequence (line 110) | struct is_sequence : std::false_type {}
    type is_sequence<std::vector<T>> (line 113) | struct is_sequence<std::vector<T>> : std::true_type {}
    type is_sequence<std::list<T>> (line 114) | struct is_sequence<std::list<T>> : std::true_type {}
    type is_sequence<std::deque<T>> (line 115) | struct is_sequence<std::deque<T>> : std::true_type {}
    type is_mapping (line 123) | struct is_mapping : std::false_type {}
    type is_mapping<std::map<T, U>> (line 126) | struct is_mapping<std::map<T, U>> : std::true_type {}
    type is_mapping<std::unordered_map<T, U>> (line 128) | struct is_mapping<std::unordered_map<T, U>> : std::true_type {}
    type is_mapping<std::multimap<T, U>> (line 132) | struct is_mapping<std::multimap<T, U>> : std::false_type {}
    type is_mapping<std::unordered_multimap<T, U>> (line 134) | struct is_mapping<std::unordered_multimap<T, U>> : std::false_type {}
    type is_set (line 142) | struct is_set : std::false_type {}
    type is_tuple (line 160) | struct is_tuple : std::false_type {}
    class ToByteRange (line 169) | class ToByteRange {
      method ToByteRange (line 171) | explicit ToByteRange(std::string& Bytes) : It(std::back_inserter(Byt...
      method write (line 173) | void write(std::byte Byte) { *It = static_cast<char>(Byte); }
    class FromByteRange (line 180) | class FromByteRange {
      method FromByteRange (line 182) | explicit FromByteRange(const std::string& Bytes)
      method read (line 185) | bool read(std::byte& Byte) {
      method remainingBytesToRead (line 194) | uint64_t remainingBytesToRead() const {
    type auxdata_traits (line 211) | struct auxdata_traits {
      method toBytes (line 216) | static void toBytes(const T& Object, ToByteRange& TBR) = delete;
      method fromBytes (line 224) | static bool fromBytes(T& Object, FromByteRange& FBR) = delete;
      method type_name (line 232) | static std::string type_name() = delete;
    type TypeId (line 236) | struct TypeId {}
    type is_endian_type (line 239) | struct is_endian_type
    type default_serialization (line 244) | struct default_serialization {}
    type default_serialization<
    T, typename std::enable_if_t<is_endian_type<T>::value ||
                                 std::is_floating_point<T>::value ||
                                 std::is_same<T, bool>::value>> (line 248) | struct default_serialization<
      method toBytes (line 252) | static void toBytes(const T& object, ToByteRange& TBR) {
      method fromBytes (line 268) | static bool fromBytes(T& object, FromByteRange& FBR) {
    type auxdata_traits<std::byte> (line 293) | struct auxdata_traits<std::byte> : default_serialization<std::byte> {
      method type_name (line 294) | static std::string type_name() { return "byte"; }
      method toBytes (line 296) | static void toBytes(std::byte object, ToByteRange& TBR) { TBR.write(...
      method fromBytes (line 298) | static bool fromBytes(std::byte& object, FromByteRange& FBR) {
    type auxdata_traits<Addr> (line 303) | struct auxdata_traits<Addr> : default_serialization<Addr> {
      method type_name (line 304) | static std::string type_name() { return "Addr"; }
    type auxdata_traits<UUID> (line 307) | struct auxdata_traits<UUID> : default_serialization<UUID> {
      method type_name (line 308) | static std::string type_name() { return "UUID"; }
    type auxdata_traits<T, typename std::enable_if_t<std::is_integral<T>::value &&
                                                   std::is_signed<T>::value>> (line 312) | struct auxdata_traits<T, typename std::enable_if_t<std::is_integral<T>...
      method type_name (line 315) | static std::string type_name() {
    type auxdata_traits<T, typename std::enable_if_t<std::is_integral<T>::value &&
                                                   std::is_unsigned<T>::value>> (line 321) | struct auxdata_traits<T, typename std::enable_if_t<std::is_integral<T>...
      method type_name (line 324) | static std::string type_name() {
    type auxdata_traits<bool> (line 329) | struct auxdata_traits<bool> : default_serialization<bool> {
      method type_name (line 330) | static std::string type_name() { return "bool"; }
    type auxdata_traits<float> (line 333) | struct auxdata_traits<float> : default_serialization<float> {
      method type_name (line 334) | static std::string type_name() { return "float"; }
    type auxdata_traits<double> (line 337) | struct auxdata_traits<double> : default_serialization<double> {
      method type_name (line 338) | static std::string type_name() { return "double"; }
    type auxdata_traits<std::string> (line 341) | struct auxdata_traits<std::string> {
      method type_name (line 342) | static std::string type_name() { return "string"; }
      method toBytes (line 344) | static void toBytes(const std::string& Object, ToByteRange& TBR) {
      method fromBytes (line 350) | static bool fromBytes(std::string& Object, FromByteRange& FBR) {
    type auxdata_traits<Offset> (line 369) | struct auxdata_traits<Offset> {
      method type_name (line 370) | static std::string type_name() { return "Offset"; }
      method toBytes (line 372) | static void toBytes(const Offset& Object, ToByteRange& TBR) {
      method fromBytes (line 377) | static bool fromBytes(Offset& Object, FromByteRange& FBR) {
    type auxdata_traits<T, typename std::enable_if_t<is_sequence<T>::value>> (line 385) | struct auxdata_traits<T, typename std::enable_if_t<is_sequence<T>::val...
      method type_name (line 386) | static std::string type_name() {
      method toBytes (line 390) | static void toBytes(const T& Object, ToByteRange& TBR) {
      method fromBytes (line 397) | static bool fromBytes(T& Object, FromByteRange& FBR) {
    type auxdata_traits<T, typename std::enable_if_t<is_set<T>::value>> (line 417) | struct auxdata_traits<T, typename std::enable_if_t<is_set<T>::value>> {
      method type_name (line 418) | static std::string type_name() {
      method toBytes (line 422) | static void toBytes(const T& Object, ToByteRange& TBR) {
      method fromBytes (line 428) | static bool fromBytes(T& Object, FromByteRange& FBR) {
    type auxdata_traits<T, typename std::enable_if_t<is_mapping<T>::value>> (line 448) | struct auxdata_traits<T, typename std::enable_if_t<is_mapping<T>::valu...
      method type_name (line 449) | static std::string type_name() {
      method toBytes (line 454) | static void toBytes(const T& Object, ToByteRange& TBR) {
      method fromBytes (line 462) | static bool fromBytes(T& Object, FromByteRange& FBR) {
    type tuple_traits (line 549) | struct tuple_traits {}
    function static_for (line 567) | constexpr void static_for(Func&& f, std::integer_sequence<size_t, Is.....
    type auxdata_traits<T, typename std::enable_if_t<is_tuple<T>::value>> (line 572) | struct auxdata_traits<T, typename std::enable_if_t<is_tuple<T>::value>>
      method toBytes (line 574) | static void toBytes(const T& Object, ToByteRange& TBR) {
      method fromBytes (line 584) | static bool fromBytes(T& Object, FromByteRange& FBR) {
    type TypeId<T> (line 601) | struct TypeId<T> {
      method value (line 602) | static std::string value() { return auxdata_traits<T>::type_name(); }
    function AuxData (line 613) | class GTIRB_EXPORT_API AuxData {
    class AuxDataImpl (line 699) | class AuxDataImpl : public AuxData {
      method AuxDataImpl (line 701) | AuxDataImpl() = default;
      method AuxDataImpl (line 702) | AuxDataImpl(typename Schema::Type&& Val) : Object(std::move(Val)){}
      method staticGetApiTypeId (line 705) | static std::size_t staticGetApiTypeId() {
      method getApiTypeId (line 710) | virtual std::size_t getApiTypeId() const override {
      method fromProtobuf (line 717) | static std::unique_ptr<AuxData> fromProtobuf(const MessageType& Mess...
      method toProtobuf (line 741) | virtual void toProtobuf(MessageType* Message) const override {
      method save (line 754) | void save(std::ostream& Out) const { AuxData::save(Out); }
      method load (line 757) | static std::unique_ptr<AuxDataImpl> load([[maybe_unused]] Context& C,
  type is_set<std::set<Args...>> (line 144) | struct is_set<std::set<Args...>> : std::true_type {}
  type is_set<std::unordered_set<Args...>> (line 146) | struct is_set<std::unordered_set<Args...>> : std::true_type {}
  type is_set<std::multiset<Args...>> (line 150) | struct is_set<std::multiset<Args...>> : std::false_type {}
  type is_set<std::unordered_multiset<Args...>> (line 152) | struct is_set<std::unordered_multiset<Args...>> : std::false_type {}
  type is_tuple<std::tuple<Args...>> (line 163) | struct is_tuple<std::tuple<Args...>> : std::true_type {}
  type is_tuple<std::pair<Args...>> (line 166) | struct is_tuple<std::pair<Args...>> : std::true_type {}
  type auxdata_traits<std::variant<Args...>> (line 487) | struct auxdata_traits<std::variant<Args...>> {
    method type_name (line 490) | static std::string type_name() {
    method expand_type (line 495) | static std::optional<std::variant<Args...>> expand_type(uint64_t i) {
    method toBytes (line 505) | static void toBytes(const T& Object, ToByteRange& TBR) {
    method fromBytes (line 517) | static bool fromBytes(T& Object, FromByteRange& FBR) {
  type tuple_traits<std::tuple<Ts...>> (line 550) | struct tuple_traits<std::tuple<Ts...>> {
    method type_name (line 553) | static std::string type_name() {
  type tuple_traits<std::pair<Ts...>> (line 558) | struct tuple_traits<std::pair<Ts...>> {
    method type_name (line 561) | static std::string type_name() {
  type TypeId<T, Ts...> (line 605) | struct TypeId<T, Ts...> {
    method value (line 606) | static std::string value() {

FILE: include/gtirb/AuxDataContainer.hpp
  type gtirb (line 28) | namespace gtirb {
    type proto (line 30) | namespace proto {
      class IR (line 31) | class IR
      class Module (line 32) | class Module
    type message_has_aux_data_container (line 36) | struct message_has_aux_data_container {
    type message_has_aux_data_container<proto::IR> (line 39) | struct message_has_aux_data_container<proto::IR> {
    type message_has_aux_data_container<proto::Module> (line 42) | struct message_has_aux_data_container<proto::Module> {
    function AuxDataContainer (line 56) | class GTIRB_EXPORT_API AuxDataContainer : public Node {

FILE: include/gtirb/AuxDataSchema.hpp
  type gtirb (line 32) | namespace gtirb {
    type schema (line 33) | namespace schema {
      type FunctionBlocks (line 36) | struct FunctionBlocks {
      type FunctionEntries (line 42) | struct FunctionEntries {
      type FunctionNames (line 48) | struct FunctionNames {
      type Types (line 54) | struct Types {
      type Alignment (line 60) | struct Alignment {
      type Comments (line 66) | struct Comments {
      type SymbolForwarding (line 72) | struct SymbolForwarding {
      type Padding (line 78) | struct Padding {
      type ElfDynamicInit (line 85) | struct ElfDynamicInit {
      type ElfDynamicFini (line 92) | struct ElfDynamicFini {
      type ElfSoname (line 99) | struct ElfSoname {
      type ElfStackExec (line 106) | struct ElfStackExec {
      type ElfStackSize (line 113) | struct ElfStackSize {
    type provisional_schema (line 120) | namespace provisional_schema {
      type Profile (line 123) | struct Profile {
      type ElfSymbolVersions (line 151) | struct ElfSymbolVersions {

FILE: include/gtirb/ByteInterval.hpp
  type gtirb (line 52) | namespace gtirb {
    type proto (line 53) | namespace proto {
      class ByteInterval (line 54) | class ByteInterval
    class Section (line 57) | class Section
    class CodeBlock (line 58) | class CodeBlock
    class DataBlock (line 59) | class DataBlock
    class ByteIntervalObserver (line 60) | class ByteIntervalObserver
    class ErrorOr (line 62) | class ErrorOr
    function CodeBlockObserver (line 68) | class GTIRB_EXPORT_API CodeBlockObserver {
    function DataBlockObserver (line 94) | class GTIRB_EXPORT_API DataBlockObserver {
    function ByteInterval (line 124) | class GTIRB_EXPORT_API ByteInterval : public Node {
    function ByteInterval (line 271) | static ByteInterval* Create(Context& C, uint64_t Size,
    function ByteInterval (line 285) | static ByteInterval* Create(Context& C, std::optional<Addr> Address,
    function ByteInterval (line 306) | static ByteInterval* Create(Context& C, InputIterator Begin,
    function ByteInterval (line 331) | static ByteInterval* Create(Context& C, std::optional<Addr> Address,
    function Section (line 341) | Section* getSection() { return Parent; }
    function Section (line 343) | const Section* getSection() const { return Parent; }
    function getAddress (line 352) | std::optional<Addr> getAddress() const { return Address; }
    function block_iterator (line 394) | block_iterator blocks_begin() { return block_iterator(Blocks.begin()); }
    function const_block_iterator (line 396) | const_block_iterator blocks_begin() const {
    function block_iterator (line 400) | block_iterator blocks_end() { return block_iterator(Blocks.end()); }
    function const_block_iterator (line 403) | const_block_iterator blocks_end() const {
    function block_range (line 407) | block_range blocks() {
    function const_block_range (line 411) | const_block_range blocks() const {
    function block_subrange (line 421) | block_subrange findBlocksOnOffset(uint64_t Off) {
    function const_block_subrange (line 434) | const_block_subrange findBlocksOnOffset(uint64_t Off) const {
    function block_subrange (line 448) | block_subrange findBlocksOn(Addr A) {
    function const_block_subrange (line 462) | const_block_subrange findBlocksOn(Addr A) const {
    function block_range (line 475) | block_range findBlocksAtOffset(uint64_t Off) {
    function block_range (line 488) | block_range findBlocksAtOffset(uint64_t Low, uint64_t High) {
    function block_range (line 502) | block_range findBlocksAt(Addr A) {
    function block_range (line 517) | block_range findBlocksAt(Addr Low, Addr High) {
    function const_block_range (line 532) | const_block_range findBlocksAtOffset(uint64_t Off) const {
    function const_block_range (line 545) | const_block_range findBlocksAtOffset(uint64_t Low, uint64_t High) const {
    function const_block_range (line 559) | const_block_range findBlocksAt(Addr A) const {
    function const_block_range (line 574) | const_block_range findBlocksAt(Addr Low, Addr High) const {
    function code_block_iterator (line 634) | code_block_iterator code_blocks_begin() {
    function const_code_block_iterator (line 639) | const_code_block_iterator code_blocks_begin() const {
    function code_block_iterator (line 645) | code_block_iterator code_blocks_end() {
    function const_code_block_iterator (line 651) | const_code_block_iterator code_blocks_end() const {
    function code_block_range (line 656) | code_block_range code_blocks() {
    function const_code_block_range (line 661) | const_code_block_range code_blocks() const {
    function code_block_subrange (line 670) | code_block_subrange findCodeBlocksOnOffset(uint64_t Off) {
    function const_code_block_subrange (line 686) | const_code_block_subrange findCodeBlocksOnOffset(uint64_t Off) const {
    function code_block_subrange (line 703) | code_block_subrange findCodeBlocksOn(Addr A) {
    function const_code_block_subrange (line 716) | const_code_block_subrange findCodeBlocksOn(Addr A) const {
    function code_block_range (line 728) | code_block_range findCodeBlocksAtOffset(uint64_t Off) {
    function code_block_range (line 743) | code_block_range findCodeBlocksAtOffset(uint64_t Low, uint64_t High) {
    function code_block_range (line 757) | code_block_range findCodeBlocksAt(Addr A) {
    function code_block_range (line 771) | code_block_range findCodeBlocksAt(Addr Low, Addr High) {
    function const_code_block_range (line 785) | const_code_block_range findCodeBlocksAtOffset(uint64_t Off) const {
    function const_code_block_range (line 800) | const_code_block_range findCodeBlocksAtOffset(uint64_t Low,
    function const_code_block_range (line 817) | const_code_block_range findCodeBlocksAt(Addr A) const {
    function const_code_block_range (line 831) | const_code_block_range findCodeBlocksAt(Addr Low, Addr High) const {
    function data_block_iterator (line 891) | data_block_iterator data_blocks_begin() {
    function const_data_block_iterator (line 896) | const_data_block_iterator data_blocks_begin() const {
    function data_block_iterator (line 902) | data_block_iterator data_blocks_end() {
    function const_data_block_iterator (line 908) | const_data_block_iterator data_blocks_end() const {
    function data_block_range (line 913) | data_block_range data_blocks() {
    function const_data_block_range (line 918) | const_data_block_range data_blocks() const {
    function data_block_subrange (line 927) | data_block_subrange findDataBlocksOnOffset(uint64_t Off) {
    function const_data_block_subrange (line 943) | const_data_block_subrange findDataBlocksOnOffset(uint64_t Off) const {
    function data_block_subrange (line 960) | data_block_subrange findDataBlocksOn(Addr A) {
    function const_data_block_subrange (line 973) | const_data_block_subrange findDataBlocksOn(Addr A) const {
    function data_block_range (line 985) | data_block_range findDataBlocksAtOffset(uint64_t Off) {
    function data_block_range (line 1000) | data_block_range findDataBlocksAtOffset(uint64_t Low, uint64_t High) {
    function data_block_range (line 1014) | data_block_range findDataBlocksAt(Addr A) {
    function data_block_range (line 1028) | data_block_range findDataBlocksAt(Addr Low, Addr High) {
    function const_data_block_range (line 1042) | const_data_block_range findDataBlocksAtOffset(uint64_t Off) const {
    function const_data_block_range (line 1057) | const_data_block_range findDataBlocksAtOffset(uint64_t Low,
    function const_data_block_range (line 1074) | const_data_block_range findDataBlocksAt(Addr A) const {
    function const_data_block_range (line 1088) | const_data_block_range findDataBlocksAt(Addr Low, Addr High) const {
    function ByteIntervalType (line 1116) | ByteIntervalType* getByteInterval() { return BI; }
    function ByteIntervalType (line 1119) | const ByteIntervalType* getByteInterval() const { return BI; }
    function getOffset (line 1122) | uint64_t getOffset() const { return Off; }
    function SymbolicExpression (line 1126) | const SymbolicExpression& getSymbolicExpression() const { return SE; }
    type AddressLess (line 1138) | struct AddressLess {
      method key_type (line 1140) | static key_type
    class SymExprPairToElement (line 1167) | class SymExprPairToElement {
      method SymExprPairToElement (line 1173) | explicit SymExprPairToElement(ByteIntervalType BI_) : BI{BI_} {}
      method SymExprElementType (line 1175) | SymExprElementType
    function symbolic_expression_iterator (line 1215) | symbolic_expression_iterator symbolic_expressions_begin() {
    function const_symbolic_expression_iterator (line 1221) | const_symbolic_expression_iterator symbolic_expressions_begin() const {
    function symbolic_expression_iterator (line 1228) | symbolic_expression_iterator symbolic_expressions_end() {
    function const_symbolic_expression_iterator (line 1235) | const_symbolic_expression_iterator symbolic_expressions_end() const {
    function symbolic_expression_range (line 1242) | symbolic_expression_range symbolic_expressions() {
    function const_symbolic_expression_range (line 1248) | const_symbolic_expression_range symbolic_expressions() const {
    function symbolic_expression_range (line 1264) | symbolic_expression_range findSymbolicExpressionsAtOffset(uint64_t Off) {
    function symbolic_expression_range (line 1282) | symbolic_expression_range findSymbolicExpressionsAtOffset(uint64_t Low,
    function symbolic_expression_range (line 1304) | symbolic_expression_range findSymbolicExpressionsAt(Addr A) {
    function symbolic_expression_range (line 1320) | symbolic_expression_range findSymbolicExpressionsAt(Addr Low, Addr Hig...
    function const_symbolic_expression_range (line 1339) | const_symbolic_expression_range
    function const_symbolic_expression_range (line 1359) | const_symbolic_expression_range
    function const_symbolic_expression_range (line 1381) | const_symbolic_expression_range findSymbolicExpressionsAt(Addr A) const {
    function const_symbolic_expression_range (line 1397) | const_symbolic_expression_range findSymbolicExpressionsAt(Addr Low,
    function BlockType (line 1453) | BlockType* addBlock(Context& C, uint64_t O, Args&&... A) {
    function SymbolicExpression (line 1470) | SymbolicExpression& addSymbolicExpression(uint64_t Off,
    function SymbolicExpression (line 1485) | SymbolicExpression& addSymbolicExpression(uint64_t Off, Args... A) {
    function removeSymbolicExpression (line 1498) | bool removeSymbolicExpression(uint64_t Off) {
    function SymbolicExpression (line 1510) | SymbolicExpression* getSymbolicExpression(uint64_t Off) {
    function SymbolicExpression (line 1524) | const SymbolicExpression* getSymbolicExpression(uint64_t Off) const {
    function getSize (line 1545) | uint64_t getSize() const { return Size; }
    function getInitializedSize (line 1568) | uint64_t getInitializedSize() const { return Bytes.size(); }
    function setInitializedSize (line 1584) | void setInitializedSize(uint64_t S) {
  function endian_flip (line 1603) | static inline std::enable_if_t<sizeof(T) == 1, T>
  class BytesReference (line 1617) | class BytesReference {
    method BytesReference (line 1619) | BytesReference(ByteIntervalType* BI_, size_t I_,
  class BytesBaseIterator (line 1695) | class BytesBaseIterator
    method BytesBaseIterator (line 1702) | BytesBaseIterator(ByteIntervalType* BI_, size_t I_,
    method BytesBaseIterator (line 1716) | BytesBaseIterator() = default;
    method reference (line 1719) | reference dereference() const {
    method equal (line 1724) | bool equal(const self& other) const {
    method increment (line 1728) | void increment() {
    method decrement (line 1733) | void decrement() {
    method advance (line 1738) | void advance(typename self::difference_type n) {
    method distance_to (line 1743) | typename self::difference_type distance_to(const self& other) const {
  function bytes_begin (line 1793) | bytes_iterator<T> bytes_begin() {
  function bytes_begin (line 1805) | bytes_iterator<T>
  function bytes_end (line 1815) | bytes_iterator<T> bytes_end() {
  function bytes_end (line 1827) | bytes_iterator<T>
  function bytes (line 1837) | bytes_range<T> bytes() {
  function bytes (line 1849) | bytes_range<T>
  function bytes_begin (line 1860) | const_bytes_iterator<T> bytes_begin() const {
  function bytes_begin (line 1872) | const_bytes_iterator<T> bytes_begin(
  function bytes_end (line 1882) | const_bytes_iterator<T> bytes_end() const {
  function bytes_end (line 1894) | const_bytes_iterator<T> bytes_end(
  function bytes (line 1904) | const_bytes_range<T> bytes() const {
  function bytes (line 1916) | const_bytes_range<T>
  function BytesIterator (line 1980) | BytesIterator insertSingleByte(
  function insertBytes (line 2014) | bytes_iterator<T> insertBytes(bytes_iterator<T> Pos, const T& X) {
  function insertBytes (line 2031) | const_bytes_iterator<T> insertBytes(
  function insertBytes (line 2051) | bytes_iterator<T> insertBytes(
  function insertBytes (line 2072) | const_bytes_iterator<T> insertBytes(const const_bytes_iterator<T> Pos,
  function insertBytes (line 2090) | bytes_iterator<T> insertBytes(bytes_iterator<T> Pos, InputIterator Begin,
  function insertBytes (line 2111) | const_bytes_iterator<T> insertBytes(
  function insertBytes (line 2134) | bytes_iterator<T> insertBytes(
  function eraseBytes (line 2152) | const_bytes_iterator<T> eraseBytes(const const_bytes_iterator<T> Begin,
  function T (line 2184) | T* rawBytes() {
  function T (line 2198) | const T* rawBytes() const {
  function classof (line 2203) | static bool classof(const Node* N) {
  function ByteInterval (line 2222) | ByteInterval(Context& C, std::optional<Addr> A, uint64_t S, uint64_t Ini...
  function ByteInterval (line 2230) | ByteInterval(Context& C, std::optional<Addr> A, uint64_t S, uint64_t Ini...
  function setParent (line 2237) | void setParent(Section* S, ByteIntervalObserver* O) {
  function ByteInterval (line 2243) | static ByteInterval* Create(Context& C, std::optional<Addr> Address,
  function ByteIntervalObserver (line 2324) | class GTIRB_EXPORT_API ByteIntervalObserver {

FILE: include/gtirb/CFG.hpp
  type gtirb (line 35) | namespace gtirb {
    class CfgNode (line 36) | class CfgNode
    class CodeBlock (line 37) | class CodeBlock
    type ConditionalEdge (line 49) | enum class ConditionalEdge : bool {
    type DirectEdge (line 60) | enum class DirectEdge : bool { IsIndirect, IsDirect }
    type EdgeType (line 66) | enum class EdgeType { Branch, Call, Fallthrough, Return, Syscall, Sysr...
    type CfgBuilder (line 84) | struct CfgBuilder {
    class cfg_node_iter_base (line 107) | class cfg_node_iter_base
      method cfg_node_iter_base (line 112) | cfg_node_iter_base() = default;
      method cfg_node_iter_base (line 113) | cfg_node_iter_base(const CFG& cfg_, CFG::vertex_iterator& it_)
      method cfg_node_iter_base (line 117) | cfg_node_iter_base(const cfg_node_iter_base&) = default;
      method cfg_node_iter_base (line 118) | cfg_node_iter_base(cfg_node_iter_base&&) = default;
      method cfg_node_iter_base (line 119) | cfg_node_iter_base& operator=(const cfg_node_iter_base&) = default;
      method cfg_node_iter_base (line 120) | cfg_node_iter_base& operator=(cfg_node_iter_base&&) = default;
      method increment (line 125) | void increment() { ++it; }
      method decrement (line 126) | void decrement() { --it; }
      method distance_to (line 128) | std::ptrdiff_t distance_to(const cfg_node_iter_base& other) const {
      method equal (line 132) | bool equal(const cfg_node_iter_base& other) const { return it == oth...
    type downcast (line 142) | struct downcast {
    type not_null (line 148) | struct not_null {
    class cfg_node_cast_iter (line 162) | class cfg_node_cast_iter
      method cfg_node_cast_iter (line 170) | cfg_node_cast_iter() : parent() {}
      method cfg_node_cast_iter (line 172) | cfg_node_cast_iter(const CFG& g, CFG::vertex_iterator& first,
      method cfg_node_cast_iter (line 178) | cfg_node_cast_iter(const cfg_node_cast_iter<OtherT>& other) : parent...
    type CfgPredecessorTraits (line 320) | struct CfgPredecessorTraits {
      method CfgNode (line 322) | static CfgNode* getNode(const CFG::edge_descriptor& EDesc, const CFG...
      method getEdges (line 325) | static std::pair<edge_iterator, edge_iterator>
    type CfgSuccessorTraits (line 334) | struct CfgSuccessorTraits {
      method CfgNode (line 336) | static CfgNode* getNode(const CFG::edge_descriptor& EDesc, const CFG...
      method getEdges (line 339) | static std::pair<edge_iterator, edge_iterator>
    type EdgeDescrToNodeLabel (line 351) | struct EdgeDescrToNodeLabel {
      method EdgeDescrToNodeLabel (line 359) | EdgeDescrToNodeLabel() = default;
      method EdgeDescrToNodeLabel (line 360) | EdgeDescrToNodeLabel(const CFG* G) : Cfg(G) {}
      method EdgeDescrToNodeLabel (line 363) | EdgeDescrToNodeLabel(const EdgeDescrToNodeLabel<Traits, CfgNode*>& Rhs)
    function cfgEdgeIters (line 388) | auto cfgEdgeIters(const CFG& G, const CfgNode* N) {
    function cfg_predecessors_range (line 437) | inline cfg_predecessors_range cfgPredecessors(CFG& G, const CfgNode* N) {
    function const_cfg_predecessors_range (line 440) | inline const_cfg_predecessors_range cfgPredecessors(const CFG& G,
    function cfg_successors_range (line 457) | inline cfg_successors_range cfgSuccessors(CFG& G, const CfgNode* N) {
    function const_cfg_successors_range (line 460) | inline const_cfg_successors_range cfgSuccessors(const CFG& G,

FILE: include/gtirb/Casting.hpp
  type gtirb (line 37) | namespace gtirb {
    type casting (line 42) | namespace casting {
      type simplify_type (line 238) | struct simplify_type {
        method SimpleType (line 242) | static SimpleType& getSimplifiedValue(From& Val) { return Val; }
      type isa_impl (line 250) | struct isa_impl {
        method doit (line 251) | static inline bool doit(const From& Val) { return To::classof(&Val...
      type isa_impl<
    To, From, typename std::enable_if<std::is_base_of<To, From>::value>::type> (line 258) | struct isa_impl<
        method doit (line 260) | static inline bool doit(const From&) { return true; }
      type isa_impl_cl (line 265) | struct isa_impl_cl {
        method doit (line 266) | static inline bool doit(const From& Val) {
      type isa_impl_cl<To, const From> (line 273) | struct isa_impl_cl<To, const From> {
        method doit (line 274) | static inline bool doit(const From& Val) {
      type isa_impl_cl<To, From*> (line 281) | struct isa_impl_cl<To, From*> {
        method doit (line 282) | static inline bool doit(const From* Val) {
      type isa_impl_cl<To, From* const> (line 290) | struct isa_impl_cl<To, From* const> {
        method doit (line 291) | static inline bool doit(const From* Val) {
      type isa_impl_cl<To, const From*> (line 299) | struct isa_impl_cl<To, const From*> {
        method doit (line 300) | static inline bool doit(const From* Val) {
      type isa_impl_cl<To, const From* const> (line 309) | struct isa_impl_cl<To, const From* const> {
        method doit (line 310) | static inline bool doit(const From* Val) {
      type isa_impl_wrap (line 319) | struct isa_impl_wrap {
        method doit (line 322) | static bool doit(const From& Val) {
      type isa_impl_wrap<To, FromTy, FromTy> (line 332) | struct isa_impl_wrap<To, FromTy, FromTy> {
        method doit (line 334) | static bool doit(const FromTy& Val) {
      function GTIRB_DEPRECATED_UTILS (line 346) | GTIRB_DEPRECATED_UTILS [[nodiscard]] inline bool isa(const Y& Val) {
      type cast_retty (line 355) | struct cast_retty
      type cast_retty_impl (line 361) | struct cast_retty_impl {
      type cast_retty_impl<To, const From> (line 364) | struct cast_retty_impl<To, const From> {
      type cast_retty_impl<To, From*> (line 368) | struct cast_retty_impl<To, From*> {
      type cast_retty_impl<To, const From*> (line 372) | struct cast_retty_impl<To, const From*> {
      type cast_retty_impl<To, const From* const> (line 376) | struct cast_retty_impl<To, const From* const> {
      type cast_retty_wrap (line 382) | struct cast_retty_wrap {
      type cast_retty_wrap<To, FromTy, FromTy> (line 389) | struct cast_retty_wrap<To, FromTy, FromTy> {
      type cast_retty (line 394) | struct cast_retty {
      type cast_convert_val (line 404) | struct cast_convert_val {
        method doit (line 406) | static typename cast_retty<To, From>::ret_type doit(From& Val) {
      type cast_convert_val<To, FromTy, FromTy> (line 413) | struct cast_convert_val<To, FromTy, FromTy> {
        method doit (line 415) | static typename cast_retty<To, FromTy>::ret_type doit(const FromTy...
      type is_simple_type (line 424) | struct is_simple_type {
      function GTIRB_DEPRECATED_UTILS (line 438) | GTIRB_DEPRECATED_UTILS inline
      function GTIRB_DEPRECATED_UTILS (line 448) | GTIRB_DEPRECATED_UTILS inline typename cast_retty<X, Y>::ret_type ca...
      function GTIRB_DEPRECATED_UTILS (line 455) | GTIRB_DEPRECATED_UTILS inline typename cast_retty<X, Y*>::ret_type
      function GTIRB_DEPRECATED_UTILS (line 466) | GTIRB_DEPRECATED_UTILS [[nodiscard]] inline
      function GTIRB_DEPRECATED_UTILS (line 477) | GTIRB_DEPRECATED_UTILS [[nodiscard]] inline
      function GTIRB_DEPRECATED_UTILS (line 488) | GTIRB_DEPRECATED_UTILS [[nodiscard]] inline typename cast_retty<X, Y...
      function GTIRB_DEPRECATED_UTILS (line 505) | GTIRB_DEPRECATED_UTILS [[nodiscard]] inline
      function GTIRB_DEPRECATED_UTILS (line 513) | GTIRB_DEPRECATED_UTILS [[nodiscard]] inline typename cast_retty<X, Y...
      function GTIRB_DEPRECATED_UTILS (line 519) | GTIRB_DEPRECATED_UTILS [[nodiscard]] inline typename cast_retty<X, Y...
      function GTIRB_DEPRECATED_UTILS (line 528) | GTIRB_DEPRECATED_UTILS [[nodiscard]] inline
      function GTIRB_DEPRECATED_UTILS (line 536) | GTIRB_DEPRECATED_UTILS [[nodiscard]] inline
      function GTIRB_DEPRECATED_UTILS (line 544) | GTIRB_DEPRECATED_UTILS [[nodiscard]] inline typename cast_retty<X, Y...

FILE: include/gtirb/CfgNode.hpp
  type gtirb (line 25) | namespace gtirb {
    function CfgNode (line 30) | class GTIRB_EXPORT_API CfgNode : public Node {
    function classofKind (line 34) | static bool classofKind(Kind K) {
    function CfgNode (line 40) | CfgNode(Context& C, Kind Knd, const UUID& U) : Node(C, Knd, U) {}

FILE: include/gtirb/CodeBlock.hpp
  type gtirb (line 36) | namespace gtirb {
    class ErrorOr (line 37) | class ErrorOr
    type proto (line 39) | namespace proto {
      class CodeBlock (line 40) | class CodeBlock
    function CodeBlock (line 47) | class GTIRB_EXPORT_API CodeBlock : public CfgNode {
    function CodeBlock (line 61) | static CodeBlock* Create(Context& C, uint64_t Size,
    function ByteInterval (line 67) | ByteInterval* getByteInterval() { return Parent; }
    function ByteInterval (line 69) | const ByteInterval* getByteInterval() const { return Parent; }
    function getSize (line 77) | uint64_t getSize() const { return Size; }
    function getDecodeMode (line 85) | gtirb::DecodeMode getDecodeMode() const { return this->DecodeMode; }
    function setSize (line 101) | void setSize(uint64_t S) {
    function setDecodeMode (line 117) | void setDecodeMode(gtirb::DecodeMode DM) {
    function bytes_begin (line 160) | bytes_iterator<T> bytes_begin() {
    function bytes_begin (line 176) | bytes_iterator<T>
    function bytes_end (line 190) | bytes_iterator<T> bytes_end() {
    function bytes_end (line 206) | bytes_iterator<T>
    function bytes (line 220) | bytes_range<T> bytes() {
    function bytes (line 236) | bytes_range<T>
    function bytes_begin (line 251) | const_bytes_iterator<T> bytes_begin() const {
    function bytes_begin (line 267) | const_bytes_iterator<T> bytes_begin(
    function bytes_end (line 281) | const_bytes_iterator<T> bytes_end() const {
    function bytes_end (line 297) | const_bytes_iterator<T> bytes_end(
    function bytes (line 311) | const_bytes_range<T> bytes() const {
    function bytes (line 327) | const_bytes_range<T>
    function T (line 350) | T* rawBytes() {
    function T (line 370) | const T* rawBytes() const {
    function classof (line 377) | static bool classof(const Node* N) { return N->getKind() == Kind::Code...
    function CodeBlock (line 382) | CodeBlock(Context& C, uint64_t S, gtirb::DecodeMode DMode)
    function CodeBlock (line 384) | CodeBlock(Context& C, uint64_t S, gtirb::DecodeMode DMode, const UUID& U)
    function setParent (line 387) | void setParent(ByteInterval* BI, CodeBlockObserver* O) {
    function CodeBlock (line 392) | static CodeBlock* Create(Context& C, uint64_t Size, gtirb::DecodeMode ...

FILE: include/gtirb/Context.hpp
  type gtirb (line 30) | namespace gtirb {
    class Node (line 39) | class Node
    class CfgNode (line 40) | class CfgNode
    class ByteInterval (line 41) | class ByteInterval
    class CodeBlock (line 42) | class CodeBlock
    class DataBlock (line 43) | class DataBlock
    class IR (line 44) | class IR
    class Module (line 45) | class Module
    class ProxyBlock (line 46) | class ProxyBlock
    class Section (line 47) | class Section
    class Symbol (line 48) | class Symbol
    function Context (line 64) | class GTIRB_EXPORT_API Context {

FILE: include/gtirb/DataBlock.hpp
  type gtirb (line 29) | namespace gtirb {
    type proto (line 30) | namespace proto {
      class DataBlock (line 31) | class DataBlock
    class ErrorOr (line 34) | class ErrorOr
    function DataBlock (line 44) | class GTIRB_EXPORT_API DataBlock : public Node {
    function DataBlock (line 65) | static DataBlock* Create(Context& C, uint64_t Size) {
    function ByteInterval (line 70) | ByteInterval* getByteInterval() { return Parent; }
    function ByteInterval (line 72) | const ByteInterval* getByteInterval() const { return Parent; }
    function getSize (line 78) | uint64_t getSize() const { return Size; }
    function setSize (line 94) | void setSize(uint64_t S) {
    function bytes_begin (line 136) | bytes_iterator<T> bytes_begin() {
    function bytes_begin (line 152) | bytes_iterator<T>
    function bytes_end (line 166) | bytes_iterator<T> bytes_end() {
    function bytes_end (line 182) | bytes_iterator<T>
    function bytes (line 196) | bytes_range<T> bytes() {
    function bytes (line 212) | bytes_range<T>
    function bytes_begin (line 227) | const_bytes_iterator<T> bytes_begin() const {
    function bytes_begin (line 243) | const_bytes_iterator<T> bytes_begin(
    function bytes_end (line 257) | const_bytes_iterator<T> bytes_end() const {
    function bytes_end (line 273) | const_bytes_iterator<T> bytes_end(
    function bytes (line 287) | const_bytes_range<T> bytes() const {
    function bytes (line 303) | const_bytes_range<T>
    function T (line 326) | T* rawBytes() {
    function T (line 346) | const T* rawBytes() const {
    function classof (line 353) | static bool classof(const Node* N) { return N->getKind() == Kind::Data...
    function setParent (line 361) | void setParent(ByteInterval* BI, DataBlockObserver* O) {

FILE: include/gtirb/DecodeMode.hpp
  type gtirb (line 21) | namespace gtirb {
    type DecodeMode (line 26) | enum class DecodeMode : uint8_t {

FILE: include/gtirb/ErrorOr.hpp
  type gtirb (line 32) | namespace gtirb {
    function ErrorInfo (line 36) | struct GTIRB_EXPORT_API ErrorInfo {
    class ErrorOr (line 81) | class ErrorOr {
      method ErrorOr (line 99) | ErrorOr(E ErrorCode, const std::string& Msg = "",
      method ErrorOr (line 107) | ErrorOr(std::error_code EC, const std::string& Msg = "") : HasError(...
      method ErrorOr (line 111) | ErrorOr(const ErrorInfo& EI) : HasError(true) {
      method ErrorOr (line 116) | ErrorOr(OtherT&& Val,
      method ErrorOr (line 122) | ErrorOr(const ErrorOr& Other) { copyConstruct(Other); }
      method ErrorOr (line 125) | ErrorOr(const ErrorOr<OtherT>& Other,
      method ErrorOr (line 131) | explicit ErrorOr(
      method ErrorOr (line 138) | ErrorOr(ErrorOr&& Other) { moveConstruct(std::move(Other)); }
      method ErrorOr (line 141) | ErrorOr(ErrorOr<OtherT>&& Other,
      method ErrorOr (line 149) | explicit ErrorOr(
      method ErrorOr (line 155) | ErrorOr& operator=(const ErrorOr& Other) {
      method ErrorOr (line 160) | ErrorOr& operator=(ErrorOr&& Other) {
      method reference (line 173) | reference get() { return *getStorage(); }
      method const_reference (line 174) | const_reference get() const { return const_cast<ErrorOr<T>*>(this)->...
      method ErrorInfo (line 176) | ErrorInfo getError() const {
      method pointer (line 180) | pointer operator->() { return toPointer(getStorage()); }
      method const_pointer (line 182) | const_pointer operator->() const { return toPointer(getStorage()); }
      method reference (line 184) | reference operator*() { return *getStorage(); }
      method const_reference (line 186) | const_reference operator*() const { return *getStorage(); }
      method copyConstruct (line 189) | void copyConstruct(const ErrorOr<OtherT>& Other) {
      method compareThisIfSameType (line 202) | static bool compareThisIfSameType(const T1& a, const T1& b) {
      method compareThisIfSameType (line 207) | static bool compareThisIfSameType(const T1&, const T2&) {
      method copyAssign (line 211) | void copyAssign(const ErrorOr<OtherT>& Other) {
      method moveConstruct (line 219) | void moveConstruct(ErrorOr<OtherT>&& Other) {
      method moveAssign (line 231) | void moveAssign(ErrorOr<OtherT>&& Other) {
      method pointer (line 239) | pointer toPointer(pointer Val) { return Val; }
      method const_pointer (line 241) | const_pointer toPointer(const_pointer Val) const { return Val; }
      method pointer (line 243) | pointer toPointer(wrap* Val) { return &Val->get(); }
      method const_pointer (line 245) | const_pointer toPointer(const wrap* Val) const { return &Val->get(); }
      method storage_type (line 247) | storage_type* getStorage() {
      method storage_type (line 252) | const storage_type* getStorage() const {
      method ErrorInfo (line 257) | ErrorInfo* getErrorStorage() {
      method ErrorInfo (line 262) | const ErrorInfo* getErrorStorage() const {

FILE: include/gtirb/IR.hpp
  type gtirb (line 38) | namespace gtirb {
    type proto (line 39) | namespace proto {
      class IR (line 40) | class IR
    function AuxDataContainer (line 76) | class GTIRB_EXPORT_API IR : public AuxDataContainer {
    function CFG (line 108) | const CFG& getCFG() const { return Cfg; }
    function CFG (line 114) | CFG& getCFG() { return Cfg; }
    function module_iterator (line 131) | module_iterator modules_begin() { return Modules.begin(); }
    function module_iterator (line 133) | module_iterator modules_end() { return Modules.end(); }
    function const_module_iterator (line 135) | const_module_iterator modules_begin() const { return Modules.begin(); }
    function const_module_iterator (line 138) | const_module_iterator modules_end() const { return Modules.end(); }
    function module_range (line 152) | module_range modules() {
    function const_module_range (line 156) | const_module_range modules() const {
    function removeModule (line 192) | bool removeModule(Module* M) {
    function Module (line 207) | Module* addModule(Module* M) {
    function Module (line 227) | Module* addModule(Context& C, Args... A) {
    function module_name_range (line 237) | module_name_range findModules(const std::string& N) {
    function const_module_name_range (line 248) | const_module_name_range findModules(const std::string& N) const {
    type load_error (line 273) | enum class load_error {
    function proxy_block_iterator (line 318) | proxy_block_iterator proxy_blocks_begin() {
    function proxy_block_iterator (line 328) | proxy_block_iterator proxy_blocks_end() { return proxy_block_iterator(...
    function proxy_block_range (line 331) | proxy_block_range proxy_blocks() {
    function const_proxy_block_iterator (line 336) | const_proxy_block_iterator proxy_blocks_begin() const {
    function const_proxy_block_iterator (line 346) | const_proxy_block_iterator proxy_blocks_end() const {
    function const_proxy_block_range (line 351) | const_proxy_block_range proxy_blocks() const {
    function symbol_iterator (line 380) | symbol_iterator symbols_begin() {
    function symbol_iterator (line 389) | symbol_iterator symbols_end() { return symbol_iterator(); }
    function symbol_range (line 392) | symbol_range symbols() {
    function const_symbol_iterator (line 397) | const_symbol_iterator symbols_begin() const {
    function const_symbol_iterator (line 406) | const_symbol_iterator symbols_end() const { return const_symbol_iterat...
    function const_symbol_range (line 409) | const_symbol_range symbols() const {
    function section_iterator (line 447) | section_iterator sections_begin() {
    function section_iterator (line 456) | section_iterator sections_end() { return section_iterator(); }
    function section_range (line 459) | section_range sections() {
    function const_section_iterator (line 464) | const_section_iterator sections_begin() const {
    function const_section_iterator (line 473) | const_section_iterator sections_end() const {
    function const_section_range (line 478) | const_section_range sections() const {
    function section_subrange (line 487) | section_subrange findSectionsOn(Addr A) {
    function const_section_subrange (line 502) | const_section_subrange findSectionsOn(Addr A) const {
    function section_range (line 517) | section_range findSectionsAt(Addr A) {
    function section_range (line 533) | section_range findSectionsAt(Addr Low, Addr High) {
    function const_section_range (line 548) | const_section_range findSectionsAt(Addr A) const {
    function const_section_range (line 564) | const_section_range findSectionsAt(Addr Low, Addr High) const {
    function section_name_range (line 580) | section_name_range findSections(const std::string& X) {
    function const_section_name_range (line 595) | const_section_name_range findSections(const std::string& X) const {
    function byte_interval_iterator (line 630) | byte_interval_iterator byte_intervals_begin() {
    function byte_interval_iterator (line 640) | byte_interval_iterator byte_intervals_end() {
    function byte_interval_range (line 645) | byte_interval_range byte_intervals() {
    function const_byte_interval_iterator (line 651) | const_byte_interval_iterator byte_intervals_begin() const {
    function const_byte_interval_iterator (line 661) | const_byte_interval_iterator byte_intervals_end() const {
    function const_byte_interval_range (line 666) | const_byte_interval_range byte_intervals() const {
    function byte_interval_subrange (line 678) | byte_interval_subrange findByteIntervalsOn(Addr A) {
    function const_byte_interval_subrange (line 695) | const_byte_interval_subrange findByteIntervalsOn(Addr A) const {
    function byte_interval_range (line 710) | byte_interval_range findByteIntervalsAt(Addr A) {
    function byte_interval_range (line 727) | byte_interval_range findByteIntervalsAt(Addr Low, Addr High) {
    function const_byte_interval_range (line 744) | const_byte_interval_range findByteIntervalsAt(Addr A) const {
    function const_byte_interval_range (line 761) | const_byte_interval_range findByteIntervalsAt(Addr Low, Addr High) con...
    function block_iterator (line 814) | block_iterator blocks_begin() {
    function block_iterator (line 823) | block_iterator blocks_end() { return block_iterator(); }
    function block_range (line 826) | block_range blocks() {
    function const_block_iterator (line 831) | const_block_iterator blocks_begin() const {
    function const_block_iterator (line 840) | const_block_iterator blocks_end() const { return const_block_iterator(...
    function const_block_range (line 843) | const_block_range blocks() const {
    function block_subrange (line 854) | block_subrange findBlocksOn(Addr A) {
    function const_block_subrange (line 871) | const_block_subrange findBlocksOn(Addr A) const {
    function block_range (line 887) | block_range findBlocksAt(Addr A) {
    function block_range (line 903) | block_range findBlocksAt(Addr Low, Addr High) {
    function const_block_range (line 919) | const_block_range findBlocksAt(Addr A) const {
    function const_block_range (line 936) | const_block_range findBlocksAt(Addr Low, Addr High) const {
    function code_block_iterator (line 991) | code_block_iterator code_blocks_begin() {
    function code_block_iterator (line 1001) | code_block_iterator code_blocks_end() { return code_block_iterator(); }
    function code_block_range (line 1004) | code_block_range code_blocks() {
    function const_code_block_iterator (line 1009) | const_code_block_iterator code_blocks_begin() const {
    function const_code_block_iterator (line 1019) | const_code_block_iterator code_blocks_end() const {
    function const_code_block_range (line 1024) | const_code_block_range code_blocks() const {
    function code_block_subrange (line 1034) | code_block_subrange findCodeBlocksOn(Addr A) {
    function const_code_block_subrange (line 1050) | const_code_block_subrange findCodeBlocksOn(Addr A) const {
    function code_block_range (line 1065) | code_block_range findCodeBlocksAt(Addr A) {
    function code_block_range (line 1081) | code_block_range findCodeBlocksAt(Addr Low, Addr High) {
    function const_code_block_range (line 1097) | const_code_block_range findCodeBlocksAt(Addr A) const {
    function const_code_block_range (line 1113) | const_code_block_range findCodeBlocksAt(Addr Low, Addr High) const {
    function data_block_iterator (line 1168) | data_block_iterator data_blocks_begin() {
    function data_block_iterator (line 1178) | data_block_iterator data_blocks_end() { return data_block_iterator(); }
    function data_block_range (line 1181) | data_block_range data_blocks() {
    function const_data_block_iterator (line 1186) | const_data_block_iterator data_blocks_begin() const {
    function const_data_block_iterator (line 1196) | const_data_block_iterator data_blocks_end() const {
    function const_data_block_range (line 1201) | const_data_block_range data_blocks() const {
    function data_block_subrange (line 1211) | data_block_subrange findDataBlocksOn(Addr A) {
    function const_data_block_subrange (line 1227) | const_data_block_subrange findDataBlocksOn(Addr A) const {
    function data_block_range (line 1242) | data_block_range findDataBlocksAt(Addr A) {
    function data_block_range (line 1258) | data_block_range findDataBlocksAt(Addr Low, Addr High) {
    function const_data_block_range (line 1274) | const_data_block_range findDataBlocksAt(Addr A) const {
    function const_data_block_range (line 1290) | const_data_block_range findDataBlocksAt(Addr Low, Addr High) const {
    function symbolic_expression_iterator (line 1331) | symbolic_expression_iterator symbolic_expressions_begin() {
    function symbolic_expression_iterator (line 1341) | symbolic_expression_iterator symbolic_expressions_end() {
    function symbolic_expression_range (line 1346) | symbolic_expression_range symbolic_expressions() {
    function const_symbolic_expression_iterator (line 1352) | const_symbolic_expression_iterator symbolic_expressions_begin() const {
    function const_symbolic_expression_iterator (line 1364) | const_symbolic_expression_iterator symbolic_expressions_end() const {
    function const_symbolic_expression_range (line 1369) | const_symbolic_expression_range symbolic_expressions() const {
    function symbolic_expression_range (line 1380) | symbolic_expression_range findSymbolicExpressionsAt(Addr A) {
    function symbolic_expression_range (line 1398) | symbolic_expression_range findSymbolicExpressionsAt(Addr Low, Addr Hig...
    function const_symbolic_expression_range (line 1414) | const_symbolic_expression_range findSymbolicExpressionsAt(Addr A) const {
    function const_symbolic_expression_range (line 1432) | const_symbolic_expression_range findSymbolicExpressionsAt(Addr Low,
    function classof (line 1448) | static bool classof(const Node* N) { return N->getKind() == Kind::IR; }
    function getVersion (line 1455) | uint32_t getVersion() const { return Version; }
    function setVersion (line 1463) | void setVersion(uint32_t V) { Version = V; }
  function make_error_code (line 1502) | inline std::error_code make_error_code(gtirb::IR::load_error e) {
  type std (line 1508) | namespace std {
    type is_error_code_enum<gtirb::IR::load_error> (line 1510) | struct is_error_code_enum<gtirb::IR::load_error> : std::true_type {}

FILE: include/gtirb/Module.hpp
  type gtirb (line 48) | namespace gtirb {
    class ByteInterval (line 49) | class ByteInterval
    class IR (line 50) | class IR
    class ModuleObserver (line 51) | class ModuleObserver
    class ErrorOr (line 53) | class ErrorOr
    type FileFormat (line 58) | enum class FileFormat : uint8_t {
    type ISA (line 75) | enum class ISA : uint8_t {
    type ByteOrder (line 97) | enum class ByteOrder : uint8_t {
    function AuxDataContainer (line 107) | class GTIRB_EXPORT_API Module : public AuxDataContainer {
    function IR (line 180) | const IR* getIR() const { return Parent; }
    function IR (line 182) | IR* getIR() { return Parent; }
    function setBinaryPath (line 190) | void setBinaryPath(const std::string& X) { BinaryPath = X; }
    function setFileFormat (line 201) | void setFileFormat(gtirb::FileFormat X) { this->FileFormat = X; }
    function getFileFormat (line 207) | gtirb::FileFormat getFileFormat() const { return this->FileFormat; }
    function setRebaseDelta (line 216) | void setRebaseDelta(int64_t X) { RebaseDelta = X; }
    function getRebaseDelta (line 223) | int64_t getRebaseDelta() const { return RebaseDelta; }
    function setPreferredAddr (line 231) | void setPreferredAddr(gtirb::Addr X) { PreferredAddr = X; }
    function getPreferredAddr (line 237) | gtirb::Addr getPreferredAddr() const { return PreferredAddr; }
    function isRelocated (line 247) | bool isRelocated() const { return RebaseDelta != 0; }
    function setISA (line 252) | void setISA(gtirb::ISA X) { Isa = X; }
    function getISA (line 257) | gtirb::ISA getISA() const { return Isa; }
    function setByteOrder (line 262) | void setByteOrder(gtirb::ByteOrder X) { ByteOrder = X; }
    function getByteOrder (line 267) | gtirb::ByteOrder getByteOrder() const { return ByteOrder; }
    function CodeBlock (line 270) | const CodeBlock* getEntryPoint() const { return EntryPoint; }
    function CodeBlock (line 272) | CodeBlock* getEntryPoint() { return EntryPoint; }
    function setEntryPoint (line 277) | void setEntryPoint(CodeBlock* CB) { EntryPoint = CB; }
    function proxy_block_iterator (line 295) | proxy_block_iterator proxy_blocks_begin() {
    function const_proxy_block_iterator (line 299) | const_proxy_block_iterator proxy_blocks_begin() const {
    function proxy_block_iterator (line 303) | proxy_block_iterator proxy_blocks_end() {
    function const_proxy_block_iterator (line 308) | const_proxy_block_iterator proxy_blocks_end() const {
    function proxy_block_range (line 312) | proxy_block_range proxy_blocks() {
    function const_proxy_block_range (line 316) | const_proxy_block_range proxy_blocks() const {
    function ProxyBlock (line 347) | ProxyBlock* addProxyBlock(Context& C, Args&&... A) {
    function symbol_iterator (line 453) | symbol_iterator symbols_begin() {
    function const_symbol_iterator (line 457) | const_symbol_iterator symbols_begin() const {
    function symbol_iterator (line 461) | symbol_iterator symbols_end() {
    function const_symbol_iterator (line 466) | const_symbol_iterator symbols_end() const {
    function symbol_range (line 470) | symbol_range symbols() {
    function const_symbol_range (line 474) | const_symbol_range symbols() const {
    function symbol_name_iterator (line 479) | symbol_name_iterator symbols_by_name_begin() {
    function const_symbol_name_iterator (line 483) | const_symbol_name_iterator symbols_by_name_begin() const {
    function symbol_name_iterator (line 488) | symbol_name_iterator symbols_by_name_end() {
    function const_symbol_name_iterator (line 493) | const_symbol_name_iterator symbols_by_name_end() const {
    function symbol_name_range (line 497) | symbol_name_range symbols_by_name() {
    function const_symbol_name_range (line 503) | const_symbol_name_range symbols_by_name() const {
    function symbol_addr_iterator (line 509) | symbol_addr_iterator symbols_by_addr_begin() {
    function const_symbol_addr_iterator (line 513) | const_symbol_addr_iterator symbols_by_addr_begin() const {
    function symbol_addr_iterator (line 518) | symbol_addr_iterator symbols_by_addr_end() {
    function const_symbol_addr_iterator (line 523) | const_symbol_addr_iterator symbols_by_addr_end() const {
    function symbol_addr_range (line 527) | symbol_addr_range symbols_by_addr() {
    function const_symbol_addr_range (line 533) | const_symbol_addr_range symbols_by_addr() const {
    function removeSymbol (line 545) | bool removeSymbol(Symbol* S) {
    function Symbol (line 558) | Symbol* addSymbol(Symbol* S) {
    function Symbol (line 572) | Symbol* addSymbol(Context& C, Args... A) {
    function symbol_name_range (line 582) | symbol_name_range findSymbols(const std::string& N) {
    function const_symbol_name_range (line 593) | const_symbol_name_range findSymbols(const std::string& N) const {
    function symbol_addr_range (line 604) | symbol_addr_range findSymbols(Addr X) {
    function const_symbol_addr_range (line 615) | const_symbol_addr_range findSymbols(Addr X) const {
    function symbol_addr_range (line 627) | symbol_addr_range findSymbols(Addr Lower, Addr Upper) {
    function const_symbol_addr_range (line 640) | const_symbol_addr_range findSymbols(Addr Lower, Addr Upper) const {
    function symbol_ref_range (line 652) | symbol_ref_range findSymbols(const Node& Referent) {
    function const_symbol_ref_range (line 662) | const_symbol_ref_range findSymbols(const Node& Referent) const {
    function section_iterator (line 729) | section_iterator sections_begin() { return Sections.begin(); }
    function const_section_iterator (line 731) | const_section_iterator sections_begin() const { return Sections.begin(...
    function section_name_iterator (line 733) | section_name_iterator sections_by_name_begin() {
    function const_section_name_iterator (line 737) | const_section_name_iterator sections_by_name_begin() const {
    function section_iterator (line 741) | section_iterator sections_end() { return Sections.end(); }
    function const_section_iterator (line 744) | const_section_iterator sections_end() const { return Sections.end(); }
    function section_name_iterator (line 746) | section_name_iterator sections_by_name_end() {
    function const_section_name_iterator (line 751) | const_section_name_iterator sections_by_name_end() const {
    function section_range (line 755) | section_range sections() {
    function const_section_range (line 759) | const_section_range sections() const {
    function Section (line 789) | Section* addSection(Context& C, Args&&... A) {
    function section_subrange (line 804) | section_subrange findSectionsOn(Addr X) {
    function const_section_subrange (line 816) | const_section_subrange findSectionsOn(Addr X) const {
    function section_range (line 828) | section_range findSectionsAt(Addr A) {
    function section_range (line 840) | section_range findSectionsAt(Addr Low, Addr High) {
    function const_section_range (line 852) | const_section_range findSectionsAt(Addr A) const {
    function const_section_range (line 864) | const_section_range findSectionsAt(Addr Low, Addr High) const {
    function section_name_range (line 877) | section_name_range findSections(const std::string& X) {
    function const_section_name_range (line 888) | const_section_name_range findSections(const std::string& X) const {
    function byte_interval_iterator (line 920) | byte_interval_iterator byte_intervals_begin() {
    function byte_interval_iterator (line 930) | byte_interval_iterator byte_intervals_end() {
    function byte_interval_range (line 935) | byte_interval_range byte_intervals() {
    function const_byte_interval_iterator (line 941) | const_byte_interval_iterator byte_intervals_begin() const {
    function const_byte_interval_iterator (line 951) | const_byte_interval_iterator byte_intervals_end() const {
    function const_byte_interval_range (line 956) | const_byte_interval_range byte_intervals() const {
    function byte_interval_subrange (line 967) | byte_interval_subrange findByteIntervalsOn(Addr A) {
    function const_byte_interval_subrange (line 984) | const_byte_interval_subrange findByteIntervalsOn(Addr A) const {
    function byte_interval_range (line 1000) | byte_interval_range findByteIntervalsAt(Addr A) {
    function byte_interval_range (line 1018) | byte_interval_range findByteIntervalsAt(Addr Low, Addr High) {
    function const_byte_interval_range (line 1033) | const_byte_interval_range findByteIntervalsAt(Addr A) const {
    function const_byte_interval_range (line 1051) | const_byte_interval_range findByteIntervalsAt(Addr Low, Addr High) con...
    function block_iterator (line 1101) | block_iterator blocks_begin() {
    function block_iterator (line 1110) | block_iterator blocks_end() { return block_iterator(); }
    function block_range (line 1113) | block_range blocks() {
    function const_block_iterator (line 1118) | const_block_iterator blocks_begin() const {
    function const_block_iterator (line 1127) | const_block_iterator blocks_end() const { return const_block_iterator(...
    function const_block_range (line 1130) | const_block_range blocks() const {
    function block_subrange (line 1141) | block_subrange findBlocksOn(Addr A) {
    function const_block_subrange (line 1159) | const_block_subrange findBlocksOn(Addr A) const {
    function block_range (line 1176) | block_range findBlocksAt(Addr A) {
    function block_range (line 1193) | block_range findBlocksAt(Addr Low, Addr High) {
    function const_block_range (line 1208) | const_block_range findBlocksAt(Addr A) const {
    function const_block_range (line 1226) | const_block_range findBlocksAt(Addr Low, Addr High) const {
  function code_block_iterator (line 1303) | code_block_iterator code_blocks_end() { return code_block_iterator(); }
  function code_block_range (line 1306) | code_block_range code_blocks() {
  function const_code_block_iterator (line 1311) | const_code_block_iterator code_blocks_begin() const {
  function const_code_block_iterator (line 1321) | const_code_block_iterator code_blocks_end() const {
  function const_code_block_range (line 1326) | const_code_block_range code_blocks() const {
  function code_block_subrange (line 1336) | code_block_subrange findCodeBlocksOn(Addr A) {
  function const_code_block_subrange (line 1353) | const_code_block_subrange findCodeBlocksOn(Addr A) const {
  function code_block_range (line 1369) | code_block_range findCodeBlocksAt(Addr A) {
  function code_block_range (line 1386) | code_block_range findCodeBlocksAt(Addr Low, Addr High) {
  function const_code_block_range (line 1400) | const_code_block_range findCodeBlocksAt(Addr A) const {
  function const_code_block_range (line 1417) | const_code_block_range findCodeBlocksAt(Addr Low, Addr High) const {
  function data_block_iterator (line 1471) | data_block_iterator data_blocks_begin() {
  function data_block_iterator (line 1481) | data_block_iterator data_blocks_end() { return data_block_iterator(); }
  function data_block_range (line 1484) | data_block_range data_blocks() {
  function const_data_block_iterator (line 1489) | const_data_block_iterator data_blocks_begin() const {
  function const_data_block_iterator (line 1499) | const_data_block_iterator data_blocks_end() const {
  function const_data_block_range (line 1504) | const_data_block_range data_blocks() const {
  function data_block_subrange (line 1514) | data_block_subrange findDataBlocksOn(Addr A) {
  function const_data_block_subrange (line 1531) | const_data_block_subrange findDataBlocksOn(Addr A) const {
  function data_block_range (line 1547) | data_block_range findDataBlocksAt(Addr A) {
  function data_block_range (line 1564) | data_block_range findDataBlocksAt(Addr Low, Addr High) {
  function const_data_block_range (line 1578) | const_data_block_range findDataBlocksAt(Addr A) const {
  function const_data_block_range (line 1595) | const_data_block_range findDataBlocksAt(Addr Low, Addr High) const {
  function symbolic_expression_iterator (line 1634) | symbolic_expression_iterator symbolic_expressions_begin() {
  function symbolic_expression_iterator (line 1644) | symbolic_expression_iterator symbolic_expressions_end() {
  function symbolic_expression_range (line 1649) | symbolic_expression_range symbolic_expressions() {
  function const_symbolic_expression_iterator (line 1655) | const_symbolic_expression_iterator symbolic_expressions_begin() const {
  function const_symbolic_expression_iterator (line 1667) | const_symbolic_expression_iterator symbolic_expressions_end() const {
  function const_symbolic_expression_range (line 1672) | const_symbolic_expression_range symbolic_expressions() const {
  function symbolic_expression_range (line 1683) | symbolic_expression_range findSymbolicExpressionsAt(Addr A) {
  function symbolic_expression_range (line 1701) | symbolic_expression_range findSymbolicExpressionsAt(Addr Low, Addr High) {
  function const_symbolic_expression_range (line 1718) | const_symbolic_expression_range findSymbolicExpressionsAt(Addr A) const {
  function const_symbolic_expression_range (line 1736) | const_symbolic_expression_range findSymbolicExpressionsAt(Addr Low,
  function classof (line 1752) | static bool classof(const Node* N) { return N->getKind() == Kind::Module; }
  function setParent (line 1789) | void setParent(IR* I, ModuleObserver* O) {
  function ModuleObserver (line 1824) | class GTIRB_EXPORT_API ModuleObserver {

FILE: include/gtirb/Node.hpp
  type gtirb (line 27) | namespace gtirb {
    class Node (line 28) | class Node
    function Node (line 39) | class GTIRB_EXPORT_API Node {

FILE: include/gtirb/Observer.hpp
  type gtirb (line 18) | namespace gtirb {
    type ChangeStatus (line 19) | enum class ChangeStatus {

FILE: include/gtirb/Offset.hpp
  type gtirb (line 24) | namespace gtirb {
    type proto (line 25) | namespace proto {
      class Offset (line 26) | class Offset
    function Offset (line 32) | struct GTIRB_EXPORT_API Offset {
  type std (line 111) | namespace std {
    type hash<gtirb::Offset> (line 114) | struct hash<gtirb::Offset> {

FILE: include/gtirb/ProxyBlock.hpp
  type gtirb (line 26) | namespace gtirb {
    type proto (line 27) | namespace proto {
      class ProxyBlock (line 28) | class ProxyBlock
    class ErrorOr (line 31) | class ErrorOr
    class Module (line 32) | class Module
    function ProxyBlock (line 49) | class GTIRB_EXPORT_API ProxyBlock : public CfgNode {
    function Module (line 57) | Module* getModule() { return Parent; }
    function Module (line 59) | const Module* getModule() const { return Parent; }
    function classof (line 61) | static bool classof(const Node* N) {
    function ProxyBlock (line 68) | ProxyBlock(Context& C, const UUID& U) : CfgNode(C, Kind::ProxyBlock, U...
    function ProxyBlock (line 70) | static ProxyBlock* Create(Context& C, const UUID& U) {
    function setModule (line 74) | void setModule(Module* M) { Parent = M; }

FILE: include/gtirb/Section.hpp
  type gtirb (line 42) | namespace gtirb {
    class Module (line 43) | class Module
    class SectionObserver (line 44) | class SectionObserver
    class ErrorOr (line 45) | class ErrorOr
    type SectionFlag (line 50) | enum class SectionFlag : uint8_t {
    function Section (line 66) | class GTIRB_EXPORT_API Section : public Node {
    function Section (line 104) | static Section* Create(Context& C, const std::string& Name) {
    function Module (line 115) | Module* getModule() { return Parent; }
    function Module (line 117) | const Module* getModule() const { return Parent; }
    function addFlag (line 127) | void addFlag(SectionFlag F) { Flags.insert(F); }
    function addFlags (line 132) | void addFlags(Fs... F) { (addFlag(F), ...); }
    function removeFlag (line 137) | void removeFlag(SectionFlag F) { Flags.erase(F); }
    function isFlagSet (line 143) | bool isFlagSet(SectionFlag F) const {
    function const_section_flag_iterator (line 154) | const_section_flag_iterator flags_begin() const { return Flags.begin(); }
    function const_section_flag_iterator (line 157) | const_section_flag_iterator flags_end() const { return Flags.end(); }
    function const_section_flag_range (line 159) | const_section_flag_range flags() const {
    function byte_interval_iterator (line 184) | byte_interval_iterator byte_intervals_begin() {
    function const_byte_interval_iterator (line 188) | const_byte_interval_iterator byte_intervals_begin() const {
    function byte_interval_iterator (line 193) | byte_interval_iterator byte_intervals_end() { return ByteIntervals.end...
    function const_byte_interval_iterator (line 196) | const_byte_interval_iterator byte_intervals_end() const {
    function byte_interval_range (line 200) | byte_interval_range byte_intervals() {
    function const_byte_interval_range (line 206) | const_byte_interval_range byte_intervals() const {
    function byte_interval_subrange (line 218) | byte_interval_subrange findByteIntervalsOn(Addr A) {
    function const_byte_interval_subrange (line 234) | const_byte_interval_subrange findByteIntervalsOn(Addr A) const {
    function byte_interval_range (line 248) | byte_interval_range findByteIntervalsAt(Addr A) {
    function byte_interval_range (line 261) | byte_interval_range findByteIntervalsAt(Addr Low, Addr High) {
    function const_byte_interval_range (line 276) | const_byte_interval_range findByteIntervalsAt(Addr A) const {
    function const_byte_interval_range (line 290) | const_byte_interval_range findByteIntervalsAt(Addr Low, Addr High) con...
    function getAddress (line 309) | std::optional<Addr> getAddress() const {
    function getSize (line 325) | std::optional<uint64_t> getSize() const {
    function ByteInterval (line 353) | ByteInterval* addByteInterval(Context& C, Args&&... A) {
    function block_iterator (line 404) | block_iterator blocks_begin() {
    function block_iterator (line 413) | block_iterator blocks_end() { return block_iterator(); }
    function block_range (line 416) | block_range blocks() {
    function const_block_iterator (line 421) | const_block_iterator blocks_begin() const {
    function const_block_iterator (line 430) | const_block_iterator blocks_end() const { return const_block_iterator(...
    function const_block_range (line 433) | const_block_range blocks() const {
    function block_subrange (line 444) | block_subrange findBlocksOn(Addr A) {
    function const_block_subrange (line 462) | const_block_subrange findBlocksOn(Addr A) const {
    function block_range (line 479) | block_range findBlocksAt(Addr A) {
    function block_range (line 497) | block_range findBlocksAt(Addr Low, Addr High) {
    function const_block_range (line 512) | const_block_range findBlocksAt(Addr A) const {
    function const_block_range (line 530) | const_block_range findBlocksAt(Addr Low, Addr High) const {
  function code_block_iterator (line 602) | code_block_iterator code_blocks_end() { return code_block_iterator(); }
  function code_block_range (line 605) | code_block_range code_blocks() {
  function const_code_block_iterator (line 610) | const_code_block_iterator code_blocks_begin() const {
  function const_code_block_iterator (line 622) | const_code_block_iterator code_blocks_end() const {
  function const_code_block_range (line 627) | const_code_block_range code_blocks() const {
  function code_block_subrange (line 637) | code_block_subrange findCodeBlocksOn(Addr A) {
  function const_code_block_subrange (line 654) | const_code_block_subrange findCodeBlocksOn(Addr A) const {
  function code_block_range (line 670) | code_block_range findCodeBlocksAt(Addr A) {
  function code_block_range (line 687) | code_block_range findCodeBlocksAt(Addr Low, Addr High) {
  function const_code_block_range (line 701) | const_code_block_range findCodeBlocksAt(Addr A) const {
  function const_code_block_range (line 718) | const_code_block_range findCodeBlocksAt(Addr Low, Addr High) const {
  function data_block_iterator (line 767) | data_block_iterator data_blocks_begin() {
  function data_block_iterator (line 777) | data_block_iterator data_blocks_end() { return data_block_iterator(); }
  function data_block_range (line 780) | data_block_range data_blocks() {
  function const_data_block_iterator (line 785) | const_data_block_iterator data_blocks_begin() const {
  function const_data_block_iterator (line 797) | const_data_block_iterator data_blocks_end() const {
  function const_data_block_range (line 802) | const_data_block_range data_blocks() const {
  function data_block_subrange (line 812) | data_block_subrange findDataBlocksOn(Addr A) {
  function const_data_block_subrange (line 829) | const_data_block_subrange findDataBlocksOn(Addr A) const {
  function data_block_range (line 845) | data_block_range findDataBlocksAt(Addr A) {
  function data_block_range (line 862) | data_block_range findDataBlocksAt(Addr Low, Addr High) {
  function const_data_block_range (line 876) | const_data_block_range findDataBlocksAt(Addr A) const {
  function const_data_block_range (line 893) | const_data_block_range findDataBlocksAt(Addr Low, Addr High) const {
  function symbolic_expression_iterator (line 927) | symbolic_expression_iterator symbolic_expressions_begin() {
  function symbolic_expression_iterator (line 939) | symbolic_expression_iterator symbolic_expressions_end() {
  function symbolic_expression_range (line 944) | symbolic_expression_range symbolic_expressions() {
  function const_symbolic_expression_iterator (line 950) | const_symbolic_expression_iterator symbolic_expressions_begin() const {
  function const_symbolic_expression_iterator (line 962) | const_symbolic_expression_iterator symbolic_expressions_end() const {
  function const_symbolic_expression_range (line 967) | const_symbolic_expression_range symbolic_expressions() const {
  function symbolic_expression_range (line 978) | symbolic_expression_range findSymbolicExpressionsAt(Addr A) {
  function symbolic_expression_range (line 996) | symbolic_expression_range findSymbolicExpressionsAt(Addr Low, Addr High) {
  function const_symbolic_expression_range (line 1014) | const_symbolic_expression_range findSymbolicExpressionsAt(Addr A) const {
  function const_symbolic_expression_range (line 1034) | const_symbolic_expression_range findSymbolicExpressionsAt(Addr Low,
  function classof (line 1048) | static bool classof(const Node* N) { return N->getKind() == Kind::Sectio...
  function setParent (line 1074) | void setParent(Module* M, SectionObserver* O) {
  function SectionObserver (line 1115) | class GTIRB_EXPORT_API SectionObserver {

FILE: include/gtirb/Symbol.hpp
  type gtirb (line 31) | namespace gtirb {
    type proto (line 32) | namespace proto {
      class Symbol (line 33) | class Symbol
    class ErrorOr (line 36) | class ErrorOr
    class Module (line 37) | class Module
    class SymbolObserver (line 38) | class SymbolObserver
    function Symbol (line 43) | class GTIRB_EXPORT_API Symbol : public Node {
    function SymbolObserver (line 412) | class GTIRB_EXPORT_API SymbolObserver {

FILE: include/gtirb/SymbolicExpression.hpp
  type gtirb (line 33) | namespace gtirb {
    class Symbol (line 34) | class Symbol
    type SymAttribute (line 47) | enum class SymAttribute : uint16_t {
    type SymAddrConst (line 129) | struct SymAddrConst {
    type SymAddrAddr (line 147) | struct SymAddrAddr {
  type std (line 173) | namespace std {
    type hash<gtirb::SymAddrConst> (line 174) | struct hash<gtirb::SymAddrConst> {
      method result_type (line 178) | result_type operator()(const argument_type& Obj) const noexcept {
    type hash<gtirb::SymAddrAddr> (line 185) | struct hash<gtirb::SymAddrAddr> {
      method result_type (line 189) | result_type operator()(const argument_type& Obj) const noexcept {
      method comb (line 198) | void comb(result_type& One, result_type Two) const noexcept {

FILE: include/gtirb/Utility.hpp
  type gtirb (line 33) | namespace gtirb {
    class MergeSortedIterator (line 54) | class MergeSortedIterator
      method MergeSortedIterator (line 65) | MergeSortedIterator() = default;
      method MergeSortedIterator (line 79) | MergeSortedIterator(
      method MergeSortedIterator (line 93) | explicit MergeSortedIterator(RangeIteratorRange RangeRange) {
      method MergeSortedIterator (line 111) | MergeSortedIterator(RangeIterator Begin, RangeIterator End)
      method dereference (line 115) | typename std::iterator_traits<ForwardIterator>::reference
      method equal (line 121) | bool equal(const MergeSortedIterator<ForwardIterator, Compare>& Othe...
      method increment (line 125) | void increment() {
      method rangeGreaterThan (line 148) | static bool rangeGreaterThan(const RangeType& R1, const RangeType& R...
    function AddressLess (line 171) | struct GTIRB_EXPORT_API AddressLess {
    function BlockAddressLess (line 221) | struct GTIRB_EXPORT_API BlockAddressLess {
    function BlockOffsetPairLess (line 232) | struct GTIRB_EXPORT_API BlockOffsetPairLess {
    type ArbitraryLess (line 243) | struct ArbitraryLess {
    type NodeToChildRange (line 258) | struct NodeToChildRange {
    type FindNodesAt (line 407) | struct FindNodesAt {
      method FindNodesAt (line 410) | FindNodesAt(Addr A_) : A{A_} {}
    type FindNodes (line 426) | struct FindNodes {
      method FindNodes (line 429) | FindNodes(std::string X_) : X{X_} {}
    type FindNodesBetween (line 446) | struct FindNodesBetween {
      method FindNodesBetween (line 449) | FindNodesBetween(Addr Low_, Addr High_) : Low{Low_}, High{High_} {}

FILE: java/com/grammatech/gtirb/AuxDataContainer.java
  class AuxDataContainer (line 32) | public abstract class AuxDataContainer extends Node {
    class AuxData (line 37) | public static class AuxData {
      method AuxData (line 57) | AuxData(String name, AuxDataOuterClass.AuxData protoAuxData) {
      method AuxData (line 70) | <T> AuxData(AuxDataSchema<T> schema, T value) {
      method getName (line 83) | public String getName() { return this.name; }
      method getTypeName (line 90) | public String getTypeName() { return this.typeName; }
      method getDecodedData (line 98) | public <T> T getDecodedData(AuxDataSchema<T> sch) throws IOException {
      method toProtobuf (line 133) | AuxDataOuterClass.AuxData.Builder toProtobuf() {
    method AuxDataContainer (line 168) | AuxDataContainer(ByteString protoUuid,
    method AuxDataContainer (line 182) | AuxDataContainer() {
    method getAuxData (line 194) | public <T> Optional<T> getAuxData(AuxDataSchema<T> schema) {
    method putAuxData (line 218) | public <T> void putAuxData(AuxDataSchema<T> schema, T data) {
    method removeAuxData (line 230) | public boolean removeAuxData(AuxDataSchema<?> schema) {
    method removeAuxData (line 244) | public boolean removeAuxData(String name) {
    method clearAuxData (line 252) | public void clearAuxData() { this.auxDataMap.clear(); }
    method getAuxDataMap (line 260) | public Map<String, AuxData> getAuxDataMap() {

FILE: java/com/grammatech/gtirb/AuxDataSchema.java
  class AuxDataSchema (line 12) | public final class AuxDataSchema<T> {
    method AuxDataSchema (line 23) | public AuxDataSchema(String name, Codec<T> codec) {
    method getName (line 31) | public String getName() { return this.name; }
    method getCodec (line 36) | public Codec<T> getCodec() { return this.codec; }

FILE: java/com/grammatech/gtirb/AuxDataSchemas.java
  class AuxDataSchemas (line 33) | public class AuxDataSchemas {

FILE: java/com/grammatech/gtirb/ByteBlock.java
  class ByteBlock (line 26) | public abstract class ByteBlock extends Node implements TreeListItem {
    method ByteBlock (line 38) | ByteBlock(ByteString protoUuid, ByteIntervalOuterClass.Block protoBlock,
    method ByteBlock (line 51) | public ByteBlock(long size, long offset) {
    method getSize (line 63) | public long getSize() { return this.size; }
    method setSize (line 71) | public long setSize(long newSize) {
    method getOffset (line 82) | public long getOffset() { return this.offset; }
    method getIndex (line 92) | public long getIndex() { return this.offset; }
    method getAddress (line 100) | public OptionalLong getAddress() {
    method getByteInterval (line 115) | public Optional<ByteInterval> getByteInterval() {
    method setByteInterval (line 124) | void setByteInterval(Optional<ByteInterval> byteInterval) {
    method toProtobuf (line 135) | ByteIntervalOuterClass.Block.Builder toProtobuf() {

FILE: java/com/grammatech/gtirb/ByteInterval.java
  class ByteInterval (line 44) | public final class ByteInterval extends Node implements TreeListItem {
    method ByteInterval (line 59) | private ByteInterval(ByteIntervalOuterClass.ByteInterval protoByteInte...
    method ByteInterval (line 121) | public ByteInterval(byte[] bytes, long address) {
    method ByteInterval (line 135) | public ByteInterval(long size) {
    method ByteInterval (line 145) | public ByteInterval() {
    method getAddress (line 156) | public OptionalLong getAddress() { return this.address; }
    method setAddress (line 163) | public void setAddress(long address) {
    method clearAddress (line 170) | public void clearAddress() { this.address = OptionalLong.empty(); }
    method hasAddress (line 178) | public boolean hasAddress() { return address.isPresent(); }
    method getBlockList (line 186) | public List<ByteBlock> getBlockList() {
    method getSize (line 199) | public long getSize() { return this.size; }
    method setSize (line 209) | public void setSize(long size) {
    method getBytes (line 222) | public byte[] getBytes() { return this.bytes; }
    method setBytes (line 229) | public void setBytes(byte[] bytes) {
    method getInitializedSize (line 241) | public long getInitializedSize() {
    method getSection (line 253) | public Optional<Section> getSection() { return this.section; }
    method setSection (line 261) | void setSection(Optional<Section> section) { this.section = section; }
    method getIndex (line 271) | public long getIndex() { return this.address.orElse(0); }
    method getItemsIntersectingAddress (line 311) | private <T extends TreeListItem> List<T>
    method getItemsIntersectingAddressRange (line 327) | private <T extends TreeListItem> List<T>
    method getItemsAtStartAddress (line 350) | private <T extends TreeListItem> List<T>
    method getItemsAtStartAddressRange (line 365) | private <T extends TreeListItem> List<T>
    method insertByteBlock (line 397) | public List<ByteBlock> insertByteBlock(ByteBlock block) {
    method removeByteBlock (line 417) | public boolean removeByteBlock(ByteBlock block) {
    method findBlocksAtOffset (line 451) | public List<ByteBlock> findBlocksAtOffset(long offset) {
    method byteBlockIterator (line 461) | public Iterator<ByteBlock> byteBlockIterator() {
    method findCodeBlocksOn (line 479) | public List<CodeBlock> findCodeBlocksOn(long address) {
    method findCodeBlocksOn (line 505) | public List<CodeBlock> findCodeBlocksOn(long startAddress,
    method findCodeBlocksAt (line 528) | public List<CodeBlock> findCodeBlocksAt(long address) {
    method findCodeBlocksAt (line 554) | public List<CodeBlock> findCodeBlocksAt(long startAddress,
    method findDataBlocksOn (line 582) | public List<DataBlock> findDataBlocksOn(long address) {
    method findDataBlocksOn (line 608) | public List<DataBlock> findDataBlocksOn(long startAddress,
    method findDataBlocksAt (line 631) | public List<DataBlock> findDataBlocksAt(long address) {
    method findDataBlocksAt (line 656) | public List<DataBlock> findDataBlocksAt(long startAddress,
    method insertSymbolicExpression (line 685) | public void
    method removeSymbolicExpression (line 699) | public boolean removeSymbolicExpression(long offset) {
    method symbolicExpressionIterator (line 711) | public Iterator<Map.Entry<Long, SymbolicExpression>>
    method findSymbolicExpressionAt (line 726) | public SymbolicExpression findSymbolicExpressionAt(long address) {
    method findSymbolicExpressionsAt (line 742) | public Iterator<Map.Entry<Long, SymbolicExpression>>
    method fromProtobuf (line 765) | static ByteInterval
    method toProtobuf (line 776) | public ByteIntervalOuterClass.ByteInterval.Builder toProtobuf() {

FILE: java/com/grammatech/gtirb/CFG.java
  class CFG (line 26) | public class CFG {
    method CFG (line 35) | public CFG(CFGOuterClass.CFG protoCfg) throws IOException {
    method CFG (line 54) | public CFG(List<Edge> edgeList, List<byte[]> verticeList) {
    method getEdgeList (line 64) | public List<Edge> getEdgeList() { return this.edgeList; }
    method setEdgeList (line 71) | public void setEdgeList(List<Edge> edgeList) { this.edgeList = edgeLis...
    method getVerticeList (line 78) | public List<byte[]> getVerticeList() { return this.verticeList; }
    method setVerticeList (line 85) | public void setVerticeList(List<byte[]> verticeList) {
    method fromProtobuf (line 102) | public static CFG fromProtobuf(CFGOuterClass.CFG protoCFG)
    method toProtobuf (line 112) | public CFGOuterClass.CFG.Builder toProtobuf() {

FILE: java/com/grammatech/gtirb/CfiDirective.java
  class CfiDirective (line 10) | public class CfiDirective extends Tuple3<String, List<Long>, UUID> {
    method CfiDirective (line 19) | public CfiDirective(String name, List<Long> args, UUID symbolUuid) {
    method getName (line 26) | public String getName() { return this.get0(); }
    method getArgs (line 31) | public List<Long> getArgs() { return this.get1(); }
    method getSymbolUuid (line 37) | public UUID getSymbolUuid() { return this.get2(); }

FILE: java/com/grammatech/gtirb/CodeBlock.java
  class CodeBlock (line 25) | public class CodeBlock extends ByteBlock {
    type DecodeMode (line 29) | public enum DecodeMode {
    method CodeBlock (line 40) | private CodeBlock(ByteString protoUuid,
    method CodeBlock (line 54) | public CodeBlock(long size, long offset, DecodeMode decodeMode) {
    method getDecodeMode (line 64) | public DecodeMode getDecodeMode() { return decodeMode; }
    method setDecodeMode (line 71) | public void setDecodeMode(DecodeMode decodeMode) {
    method fromProtobuf (line 80) | static CodeBlock fromProtobuf(ByteIntervalOuterClass.Block protoBlock)
    method toProtobuf (line 98) | @Override

FILE: java/com/grammatech/gtirb/DataBlock.java
  class DataBlock (line 25) | public class DataBlock extends ByteBlock {
    method DataBlock (line 31) | private DataBlock(ByteString protoUuid,
    method DataBlock (line 40) | public DataBlock(long size, long offset) { super(size, offset); }
    method fromProtobuf (line 47) | static DataBlock fromProtobuf(ByteIntervalOuterClass.Block protoBlock)
    method toProtobuf (line 65) | @Override

FILE: java/com/grammatech/gtirb/Edge.java
  class Edge (line 25) | public class Edge {
    type EdgeType (line 30) | public enum EdgeType {
    method Edge (line 50) | public Edge(CFGOuterClass.Edge protoEdge) throws IOException {
    method Edge (line 71) | public Edge(UUID sourceUuid, UUID targetUuid, EdgeType edgeType,
    method getSourceUuid (line 85) | public UUID getSourceUuid() { return this.sourceUuid; }
    method setSourceUuid (line 92) | public void setSourceUuid(UUID sourceUuid) { this.sourceUuid = sourceU...
    method getTargetUuid (line 99) | public UUID getTargetUuid() { return this.targetUuid; }
    method setTargetUuid (line 106) | public void setTargetUuid(UUID targetUuid) { this.targetUuid = targetU...
    method getEdgeType (line 113) | public EdgeType getEdgeType() { return this.edgeType; }
    method setEdgeType (line 120) | public void setEdgeType(EdgeType edgeType) { this.edgeType = edgeType; }
    method isConditional (line 127) | public boolean isConditional() { return this.edgeLabelConditional; }
    method setEdgeLabelConditional (line 134) | public void setEdgeLabelConditional(boolean conditional) {
    method isDirect (line 143) | public boolean isDirect() { return this.edgeLabelDirect; }
    method setEdgeLabelDirect (line 150) | public void setEdgeLabelDirect(boolean direct) {
    method fromProtobuf (line 160) | public static Edge fromProtobuf(CFGOuterClass.Edge protoEdge)
    method toProtobuf (line 170) | public CFGOuterClass.Edge.Builder toProtobuf() {

FILE: java/com/grammatech/gtirb/ElfSymbolInfoTuple.java
  class ElfSymbolInfoTuple (line 8) | public class ElfSymbolInfoTuple
    method ElfSymbolInfoTuple (line 19) | public ElfSymbolInfoTuple(Long size, String type, String binding,
    method getSize (line 27) | public Long getSize() { return this.get0(); }
    method getType (line 32) | public String getType() { return this.get1(); }
    method getBinding (line 37) | public String getBinding() { return this.get2(); }
    method getVisibility (line 42) | public String getVisibility() { return this.get3(); }
    method getSecIndex (line 47) | public Long getSecIndex() { return this.get4(); }

FILE: java/com/grammatech/gtirb/ElfSymbolVersionsTable.java
  class ElfSymbolVersionsTable (line 12) | public class ElfSymbolVersionsTable
    class SymVerDef (line 20) | public static class SymVerDef extends Tuple2<List<String>, Short> {
      method SymVerDef (line 27) | public SymVerDef(List<String> versions, Short verdef) {
      method getVersions (line 34) | public List<String> getVersions() { return this.get0(); }
      method getVerdef (line 39) | public Short getVerdef() { return this.get1(); }
    class SymVerEntry (line 45) | public static class SymVerEntry extends Tuple2<Short, Boolean> {
      method SymVerEntry (line 52) | public SymVerEntry(Short verId, Boolean hidden) {
      method getVerId (line 59) | public Short getVerId() { return this.get0(); }
      method isHidden (line 64) | public Boolean isHidden() { return this.get1(); }
    method ElfSymbolVersionsTable (line 75) | public ElfSymbolVersionsTable(
    method getSymVerDefMap (line 85) | public Map<Short, ElfSymbolVersionsTable.SymVerDef> getSymVerDefMap() {
    method getVerNeededMap (line 92) | public Map<String, Map<Short, String>> getVerNeededMap() {
    method getSymVerEntriesMap (line 99) | public Map<UUID, ElfSymbolVersionsTable.SymVerEntry> getSymVerEntriesM...

FILE: java/com/grammatech/gtirb/IR.java
  class IR (line 38) | public class IR extends AuxDataContainer {
    method IR (line 51) | public IR() {
    method IR (line 60) | private IR(IROuterClass.IR protoIr) throws IOException {
    method loadProtobuf (line 69) | private static IR loadProtobuf(IROuterClass.IR protoIr) throws IOExcep...
    method loadFile (line 91) | public static IR loadFile(InputStream fileIn) {
    method loadFile (line 133) | public static IR loadFile(String fileInName) {
    method getModules (line 150) | public List<Module> getModules() {
    method findModules (line 160) | public List<Module> findModules(String name) {
    method addModule (line 175) | public void addModule(Module module) {
    method addModules (line 185) | public void addModules(List<Module> modules) {
    method removeModule (line 197) | public boolean removeModule(Module module) {
    method getCfg (line 211) | public CFG getCfg() { return this.cfg; }
    method setCfg (line 218) | public void setCfg(CFG cfg) { this.cfg = cfg; }
    method getVersion (line 225) | public int getVersion() { return this.version; }
    method setVersion (line 232) | public void setVersion(int version) { this.version = version; }
    method toProtobuf (line 239) | public IROuterClass.IR.Builder toProtobuf() {
    method saveFile (line 258) | public void saveFile(OutputStream fileOut) throws IOException {
    method saveFile (line 271) | public void saveFile(String fileOutName) throws IOException {

FILE: java/com/grammatech/gtirb/Module.java
  class Module (line 35) | public class Module extends AuxDataContainer {
    type FileFormat (line 40) | public enum FileFormat {
    type ISA (line 55) | public enum ISA {
    type ByteOrder (line 71) | public enum ByteOrder { ByteOrder_Undefined, BigEndian, LittleEndian }
    method Module (line 90) | Module(ModuleOuterClass.Module protoModule) throws IOException {
    method Module (line 125) | public Module(String binaryPath, long preferredAddr, long rebaseDelta,
    method Module (line 153) | public Module(String binaryPath, long preferredAddr, long rebaseDelta,
    method getIr (line 175) | public Optional<IR> getIr() { return this.ir; }
    method setIr (line 183) | void setIr(Optional<IR> ir) { this.ir = ir; }
    method getBinaryPath (line 190) | public String getBinaryPath() { return this.binaryPath; }
    method setBinaryPath (line 201) | public void setBinaryPath(String binaryPath) {
    method getPreferredAddr (line 210) | public long getPreferredAddr() { return this.preferredAddr; }
    method setPreferredAddr (line 217) | public void setPreferredAddr(long preferredAddr) {
    method getRebaseDelta (line 227) | public long getRebaseDelta() { return this.rebaseDelta; }
    method setRebaseDelta (line 235) | public void setRebaseDelta(long rebaseDelta) {
    method getFileFormat (line 245) | public FileFormat getFileFormat() { return this.fileFormat; }
    method setFileFormat (line 252) | public void setFileFormat(FileFormat fileFormat) {
    method getIsa (line 261) | public ISA getIsa() { return this.isa; }
    method setIsa (line 268) | public void setIsa(ISA isa) { this.isa = isa; }
    method getName (line 275) | public String getName() { return this.name; }
    method setName (line 282) | public void setName(String name) { this.name = name; }
    method getSections (line 290) | public List<Section> getSections() {
    method setSections (line 303) | private void setSections(List<Section> sectionList) {
    method addSection (line 320) | public void addSection(Section section) {
    method removeSection (line 332) | public boolean removeSection(Section section) {
    method getSymbols (line 348) | public List<Symbol> getSymbols() {
    method addSymbol (line 357) | public void addSymbol(Symbol symbol) {
    method removeSymbol (line 369) | public boolean removeSymbol(Symbol symbol) {
    method setSymbols (line 384) | private void setSymbols(List<Symbol> symbolList) {
    method getProxyBlocks (line 398) | public List<ProxyBlock> getProxyBlocks() {
    method addProxyBlock (line 408) | public void addProxyBlock(ProxyBlock proxyBlock) {
    method removeProxyBlock (line 421) | public boolean removeProxyBlock(ProxyBlock proxyBlock) {
    method setProxyBlocks (line 436) | private void setProxyBlocks(List<ProxyBlock> proxyBlockList) {
    method getEntryPoint (line 450) | public CodeBlock getEntryPoint() { return entryPoint; }
    method setEntryPoint (line 457) | public void setEntryPoint(CodeBlock entryCodeBlock) {
    method getByteOrder (line 466) | public ByteOrder getByteOrder() { return this.byteOrder; }
    method setByteOrder (line 473) | public void setByteOrder(ByteOrder byteOrder) {
    method initializeSectionList (line 485) | private void
    method initializeSymbolList (line 504) | private void
    method initializeProxyBlockList (line 523) | private void initializeProxyBlockList(
    method findSectionsOn (line 544) | public List<Section> findSectionsOn(long address) {
    method findSectionsOn (line 560) | public List<Section> findSectionsOn(long startAddress, long endAddress) {
    method findSectionsAt (line 572) | public List<Section> findSectionsAt(long address) {
    method findSectionsAt (line 586) | public List<Section> findSectionsAt(long startAddress, long endAddress) {
    method fromProtobuf (line 597) | static Module fromProtobuf(ModuleOuterClass.Module protoModule)
    method toProtobuf (line 607) | ModuleOuterClass.Module.Builder toProtobuf() {

FILE: java/com/grammatech/gtirb/Node.java
  class Node (line 24) | public class Node {
    method Node (line 32) | public Node() { this(UUID.randomUUID()); }
    method Node (line 37) | public Node(UUID uuid) {
    method getByUuid (line 47) | public static Node getByUuid(UUID uuid) {
    method getByUuid (line 59) | public static <T extends Node> T getByUuid(UUID uuid, Class<T> type) {
    method getUuid (line 75) | public UUID getUuid() { return uuid; }

FILE: java/com/grammatech/gtirb/Offset.java
  class Offset (line 23) | public class Offset {
    method Offset (line 35) | public Offset(UUID elementId, long displacement) {
    method getElementId (line 45) | public UUID getElementId() { return this.elementId; }
    method getDisplacement (line 52) | public long getDisplacement() { return this.displacement; }
    method equals (line 54) | @Override

FILE: java/com/grammatech/gtirb/PeExportEntry.java
  class PeExportEntry (line 8) | public class PeExportEntry extends Tuple3<Long, Long, String> {
    method PeExportEntry (line 16) | public PeExportEntry(Long address, Long ordinal, String name) {
    method getAddress (line 23) | public Long getAddress() { return this.get0(); }
    method getOrdinal (line 28) | public Long getOrdinal() { return this.get1(); }
    method getName (line 33) | public String getName() { return this.get2(); }

FILE: java/com/grammatech/gtirb/PeImportEntry.java
  class PeImportEntry (line 8) | public class PeImportEntry extends Tuple4<Long, Long, String, String> {
    method PeImportEntry (line 17) | public PeImportEntry(Long address, Long ordinal, String funcName,
    method getAddress (line 25) | public Long getAddress() { return this.get0(); }
    method getOrdinal (line 30) | public Long getOrdinal() { return this.get1(); }
    method getFuncName (line 35) | public String getFuncName() { return this.get2(); }
    method getLibName (line 40) | public String getLibName() { return this.get3(); }

FILE: java/com/grammatech/gtirb/PeResourceEntry.java
  class PeResourceEntry (line 10) | public class PeResourceEntry extends Tuple3<List<Byte>, Offset, Long> {
    method PeResourceEntry (line 18) | public PeResourceEntry(List<Byte> header, Offset offset, Long size) {
    method getHeader (line 25) | public List<Byte> getHeader() { return this.get0(); }
    method getOffset (line 30) | public Offset getOffset() { return this.get1(); }
    method getSize (line 35) | public Long getSize() { return this.get2(); }

FILE: java/com/grammatech/gtirb/ProbFuncName.java
  class ProbFuncName (line 8) | public class ProbFuncName extends Tuple3<String, String, Float> {
    method ProbFuncName (line 17) | public ProbFuncName(String name, String binaryName, Float prob) {
    method getName (line 24) | public String getName() { return this.get0(); }
    method getBinaryName (line 29) | public String getBinaryName() { return this.get1(); }
    method getProbability (line 34) | public Float getProbability() { return this.get2(); }

FILE: java/com/grammatech/gtirb/ProxyBlock.java
  class ProxyBlock (line 26) | public class ProxyBlock extends Node {
    method ProxyBlock (line 35) | private ProxyBlock(ProxyBlockOuterClass.ProxyBlock protoProxyBlock)
    method ProxyBlock (line 44) | public ProxyBlock() {
    method ProxyBlock (line 49) | public ProxyBlock(UUID uuid) {
    method getModule (line 60) | public Optional<Module> getModule() { return this.module; }
    method setModule (line 68) | void setModule(Optional<Module> module) { this.module = module; }
    method fromProtobuf (line 78) | static ProxyBlock
    method toProtobuf (line 89) | ProxyBlockOuterClass.ProxyBlock.Builder toProtobuf() {

FILE: java/com/grammatech/gtirb/Section.java
  class Section (line 36) | public class Section extends Node implements TreeListItem {
    type SectionFlag (line 41) | public enum SectionFlag {
    method Section (line 60) | private Section(SectionOuterClass.Section protoSection) throws IOExcep...
    method Section (line 90) | public Section(String name, Set<SectionFlag> flags,
    method getModule (line 111) | public Optional<Module> getModule() { return this.module; }
    method setModule (line 119) | public void setModule(Optional<Module> module) { this.module = module; }
    method getName (line 126) | public String getName() { return this.name; }
    method setName (line 133) | public void setName(String name) { this.name = name; }
    method getByteIntervalIterator (line 141) | private Iterator<ByteInterval> getByteIntervalIterator() {
    method getByteIntervals (line 153) | public List<ByteInterval> getByteIntervals() {
    method addByteInterval (line 166) | public void addByteInterval(ByteInterval byteInterval) {
    method removeByteInterval (line 178) | public boolean removeByteInterval(ByteInterval byteInterval) {
    method getSectionFlags (line 194) | public Set<SectionFlag> getSectionFlags() {
    method addSectionFlag (line 204) | public void addSectionFlag(SectionFlag sectionFlag) {
    method removeSectionFlag (line 216) | public boolean removeSectionFlag(SectionFlag sectionFlag) {
    method getSize (line 233) | public long getSize() {
    method getAddress (line 280) | public OptionalLong getAddress() {
    method getIndex (line 311) | public long getIndex() { return this.getAddress().orElse(0); }
    method findByteIntervalsOn (line 320) | public List<ByteInterval> findByteIntervalsOn(long address) {
    method findByteIntervalsOn (line 335) | public List<ByteInterval> findByteIntervalsOn(long startAddress,
    method findByteIntervalsAt (line 348) | public List<ByteInterval> findByteIntervalsAt(long address) {
    method findByteIntervalsAt (line 363) | public List<ByteInterval> findByteIntervalsAt(long startAddress,
    method fromProtobuf (line 374) | static Section fromProtobuf(SectionOuterClass.Section protoSection)
    method toProtobuf (line 384) | SectionOuterClass.Section.Builder toProtobuf() {

FILE: java/com/grammatech/gtirb/SectionPropertyTuple.java
  class SectionPropertyTuple (line 8) | public class SectionPropertyTuple extends Tuple2<Long, Long> {
    method SectionPropertyTuple (line 15) | public SectionPropertyTuple(Long type, Long flags) { super(type, flags...
    method getType (line 22) | public Long getType() { return this.get0(); }
    method getFlags (line 29) | public Long getFlags() { return this.get1(); }

FILE: java/com/grammatech/gtirb/SymAddrAddr.java
  class SymAddrAddr (line 28) | public class SymAddrAddr extends SymbolicExpression {
    method SymAddrAddr (line 41) | public SymAddrAddr(
    method SymAddrAddr (line 63) | public SymAddrAddr(long offset, long scale, UUID symbol1_uuid,
    method getSymbol1Uuid (line 77) | public UUID getSymbol1Uuid() { return symbol1_uuid; }
    method setSymbol1Uuid (line 85) | public void setSymbol1Uuid(UUID symbol_uuid) {
    method getSymbol2Uuid (line 94) | public UUID getSymbol2Uuid() { return symbol2_uuid; }
    method setSymbol2Uuid (line 102) | public void setSymbol2Uuid(UUID symbol_uuid) {
    method getScale (line 111) | public long getScale() { return scale; }
    method setScale (line 118) | public void setScale(long scale) { this.scale = scale; }
    method getOffset (line 124) | public long getOffset() { return this.offset; }
    method setOffset (line 130) | public void setOffset(long offset) { this.offset = offset; }
    method fromProtobuf (line 139) | public static SymAddrAddr fromProtobuf(
    method toProtobuf (line 150) | @Override

FILE: java/com/grammatech/gtirb/SymAddrConst.java
  class SymAddrConst (line 26) | public class SymAddrConst extends SymbolicExpression {
    method SymAddrConst (line 36) | public SymAddrConst(
    method SymAddrConst (line 53) | public SymAddrConst(long offset, UUID symbol_uuid,
    method getSymbolUuid (line 65) | public UUID getSymbolUuid() { return symbol_uuid; }
    method setSymbolUuid (line 73) | public void setSymbolUuid(UUID symbol_uuid) {
    method getOffset (line 81) | public long getOffset() { return this.offset; }
    method setOffset (line 87) | public void setOffset(long offset) { this.offset = offset; }
    method fromProtobuf (line 96) | public static SymAddrConst fromProtobuf(
    method toProtobuf (line 107) | @Override

FILE: java/com/grammatech/gtirb/Symbol.java
  class Symbol (line 30) | public class Symbol extends Node {
    type PayloadType (line 35) | public enum PayloadType { REFERENT, VALUE, NONE }
    method Symbol (line 48) | private Symbol(SymbolOuterClass.Symbol protoSymbol) throws IOException {
    method Symbol (line 76) | public Symbol(String name, UUID referentUuid) {
    method Symbol (line 91) | public Symbol(String name, long value) {
    method Symbol (line 105) | public Symbol(String name) {
    method getModule (line 121) | public Optional<Module> getModule() { return this.module; }
    method setModule (line 129) | public void setModule(Optional<Module> module) { this.module = module; }
    method getName (line 136) | public String getName() { return name; }
    method setName (line 143) | public void setName(String name) { this.name = name; }
    method getReferent (line 150) | public Node getReferent() {
    method getReferentUuid (line 162) | public Optional<UUID> getReferentUuid() {
    method setReferentUuid (line 175) | public void setReferentUuid(UUID uuid) {
    method getValue (line 185) | public OptionalLong getValue() {
    method setValue (line 196) | public void setValue(long value) {
    method getPayloadType (line 206) | public PayloadType getPayloadType() { return this.payloadType; }
    method isAtEnd (line 213) | public boolean isAtEnd() { return this.atEnd; }
    method setAtEnd (line 220) | public void setAtEnd(boolean atEnd) { this.atEnd = atEnd; }
    method fromProtobuf (line 228) | static Symbol fromProtobuf(SymbolOuterClass.Symbol protoSymbol)
    method toProtobuf (line 238) | SymbolOuterClass.Symbol.Builder toProtobuf() {

FILE: java/com/grammatech/gtirb/SymbolicExpression.java
  class SymbolicExpression (line 29) | public class SymbolicExpression {
    type AttributeFlag (line 37) | public enum AttributeFlag {
      method AttributeFlag (line 108) | AttributeFlag(int value) { this.value = value; }
      method value (line 110) | public int value() { return this.value; }
      method fromInteger (line 112) | public static AttributeFlag fromInteger(int value) {
      method initMap (line 116) | private static Map<Integer, AttributeFlag> initMap() {
    method SymbolicExpression (line 134) | protected SymbolicExpression(
    method SymbolicExpression (line 156) | protected SymbolicExpression(Set<AttributeFlag> attributeFlags) {
    method getAttributeFlags (line 169) | public Set<AttributeFlag> getAttributeFlags() {
    method addAttributeFlag (line 179) | public void addAttributeFlag(AttributeFlag attributeFlag) {
    method removeAttributeFlag (line 191) | public boolean removeAttributeFlag(AttributeFlag attributeFlag) {
    method getUnknownAttributeFlags (line 201) | public Set<Integer> getUnknownAttributeFlags() {
    method addUnknownFlag (line 211) | public void addUnknownFlag(Integer unknownFlag) {
    method removeUnknownFlag (line 223) | public boolean removeUnknownFlag(Integer unknownFlag) {
    method fromProtobuf (line 234) | public static SymbolicExpression fromProtobuf(
    method toProtobuf (line 247) | public SymbolicExpressionOuterClass.SymbolicExpression.Builder

FILE: java/com/grammatech/gtirb/TreeListItem.java
  type TreeListItem (line 20) | public interface TreeListItem {
    method getIndex (line 29) | long getIndex();
    method getSize (line 38) | long getSize();

FILE: java/com/grammatech/gtirb/TreeListUtils.java
  class TreeListUtils (line 32) | public class TreeListUtils<Type> implements Iterable<Type> {
    method TreeListUtils (line 36) | public TreeListUtils(TreeMap<Long, List<Type>> treeMap) {
    method insertItem (line 47) | public static <T extends TreeListItem> List<T>
    method removeItem (line 67) | public static <T extends TreeListItem> List<T>
    method getItemsIntersectingIndex (line 95) | public static <T extends TreeListItem> List<T>
    method getItemsIntersectingIndexRange (line 126) | public static <T extends TreeListItem> List<T>
    method getItemsAtStartIndex (line 166) | public static <T extends TreeListItem> List<T>
    method getItemsAtStartIndexRange (line 183) | public static <T extends TreeListItem> List<T>
    method iterator (line 209) | @Override

FILE: java/com/grammatech/gtirb/TypeTableEntry.java
  class TypeTableEntry (line 14) | public class TypeTableEntry
    class BoolType (line 23) | public static class BoolType extends Tuple1<Byte> {
      method BoolType (line 29) | public BoolType(Byte b) { super((byte)0); }
    class IntType (line 35) | public static class IntType extends Tuple2<Byte, Long> {
      method IntType (line 43) | public IntType(Byte signedness, Long width) {
      method isSigned (line 50) | public boolean isSigned() { return this.get0() == 1; }
      method getWidth (line 55) | public Long getWidth() { return this.get1(); }
    class FunctionType (line 61) | public static class FunctionType extends Tuple2<UUID, List<UUID>> {
      method FunctionType (line 68) | public FunctionType(UUID returnType, List<UUID> paramTypes) {
      method getReturnType (line 75) | public UUID getReturnType() { return this.get0(); }
      method getParamTypes (line 80) | public List<UUID> getParamTypes() { return this.get1(); }
    class ArrayType (line 86) | public static class ArrayType extends Tuple2<UUID, Long> {
      method ArrayType (line 93) | public ArrayType(UUID elemType, Long size) { super(elemType, size); }
      method getElemType (line 98) | public UUID getElemType() { return this.get0(); }
      method getSize (line 103) | public Long getSize() { return this.get1(); }
    class StructField (line 109) | public static class StructField extends Tuple2<Long, UUID> {
      method StructField (line 116) | public StructField(Long offset, UUID type) { super(offset, type); }
      method getOffset (line 121) | public Long getOffset() { return this.get0(); }
      method getType (line 126) | public UUID getType() { return this.get1(); }
    class StructType (line 132) | public static class StructType extends Tuple2<Long, List<StructField>> {
      method StructType (line 139) | public StructType(Long size, List<StructField> fields) {
      method getSize (line 146) | public Long getSize() { return this.get0(); }
      method getFields (line 151) | public List<StructField> getFields() { return this.get1(); }
    class VoidType (line 157) | public static class VoidType extends Tuple1<Byte> {
      method VoidType (line 163) | public VoidType(Byte b) { super((byte)0); }
    method TypeTableEntry (line 167) | private TypeTableEntry(Token.T0 tok, Long v) { super(tok, v); }
    method TypeTableEntry (line 168) | private TypeTableEntry(Token.T1 tok, BoolType v) { super(tok, v); }
    method TypeTableEntry (line 169) | private TypeTableEntry(Token.T2 tok, IntType v) { super(tok, v); }
    method TypeTableEntry (line 170) | private TypeTableEntry(Token.T3 tok, Long v) { super(tok, v); }
    method TypeTableEntry (line 171) | private TypeTableEntry(Token.T4 tok, Long v) { super(tok, v); }
    method TypeTableEntry (line 172) | private TypeTableEntry(Token.T5 tok, FunctionType v) { super(tok, v); }
    method TypeTableEntry (line 173) | private TypeTableEntry(Token.T6 tok, UUID v) { super(tok, v); }
    method TypeTableEntry (line 174) | private TypeTableEntry(Token.T7 tok, ArrayType v) { super(tok, v); }
    method TypeTableEntry (line 175) | private TypeTableEntry(Token.T8 tok, UUID v) { super(tok, v); }
    method TypeTableEntry (line 176) | private TypeTableEntry(Token.T9 tok, StructType v) { super(tok, v); }
    method TypeTableEntry (line 177) | private TypeTableEntry(Token.T10 tok, VoidType v) { super(tok, v); }
    method getSizeIfUnknown (line 182) | public Optional<Long> getSizeIfUnknown() { return this.get0(); }
    method isBool (line 187) | public boolean isBool() { return this.get1().isPresent(); }
    method getAsInt (line 192) | public Optional<IntType> getAsInt() { return this.get2(); }
    method getSizeIfChar (line 197) | public Optional<Long> getSizeIfChar() { return this.get3(); }
    method getSizeIfFloat (line 202) | public Optional<Long> getSizeIfFloat() { return this.get4(); }
    method getAsFunction (line 207) | public Optional<FunctionType> getAsFunction() { return this.get5(); }
    method getUuidIfPointer (line 212) | public Optional<UUID> getUuidIfPointer() { return this.get6(); }
    method getAsArray (line 217) | public Optional<ArrayType> getAsArray() { return this.get7(); }
    method getUuidIfAlias (line 222) | public Optional<UUID> getUuidIfAlias() { return this.get8(); }
    method getAsStruct (line 227) | public Optional<StructType> getAsStruct() { return this.get9(); }
    method isVoid (line 232) | public boolean isVoid() { return this.get10().isPresent(); }
    method makeUnknown (line 237) | public static TypeTableEntry makeUnknown(Long size) {
    method makeBool (line 244) | public static TypeTableEntry makeBool(BoolType boolType) {
    method makeInt (line 251) | public static TypeTableEntry makeInt(IntType intType) {
    method makeChar (line 258) | public static TypeTableEntry makeChar(Long size) {
    method makeFloat (line 265) | public static TypeTableEntry makeFloat(Long size) {
    method makeFunction (line 272) | public static TypeTableEntry makeFunction(FunctionType funcType) {
    method makePointer (line 279) | public static TypeTableEntry makePointer(UUID pointedToType) {
    method makeArray (line 286) | public static TypeTableEntry makeArray(ArrayType arrType) {
    method makeAlias (line 293) | public static TypeTableEntry makeAlias(UUID aliasedType) {
    method makeStruct (line 300) | public static TypeTableEntry makeStruct(StructType structType) {
    method makeVoid (line 307) | public static TypeTableEntry makeVoid(VoidType voidType) {

FILE: java/com/grammatech/gtirb/Util.java
  class Util (line 30) | public class Util {
    method byteArrayToUUID (line 41) | public static UUID byteArrayToUUID(byte[] b)
    method readUUID (line 57) | public static UUID readUUID(InputStream in) throws IOException {
    method byteStringToUuid (line 78) | public static UUID
    method uuidToByteArray (line 99) | public static byte[] uuidToByteArray(UUID uuid) {
    method writeUUID (line 113) | public static void writeUUID(OutputStream out, UUID uuid)
    method uuidToByteString (line 125) | public static com.google.protobuf.ByteString uuidToByteString(UUID uui...

FILE: java/com/grammatech/gtirb/auxdatacodec/BoolCodec.java
  class BoolCodec (line 25) | public class BoolCodec implements Codec<Boolean> {
    method getTypeName (line 27) | public String getTypeName() { return "bool"; }
    method decode (line 29) | public Boolean decode(InputStream in) throws IOException {
    method encode (line 38) | public void encode(OutputStream out, Boolean val) throws IOException {

FILE: java/com/grammatech/gtirb/auxdatacodec/ByteCodec.java
  class ByteCodec (line 8) | public class ByteCodec implements Codec<Byte> {
    method ByteCodec (line 12) | private ByteCodec(String tn) { this.typeName = tn; }
    method getTypeName (line 14) | public String getTypeName() { return this.typeName; }
    method decode (line 16) | public Byte decode(InputStream in) throws IOException {
    method encode (line 24) | public void encode(OutputStream out, Byte val) throws IOException {

FILE: java/com/grammatech/gtirb/auxdatacodec/Codec.java
  type Codec (line 24) | public interface Codec<T> {
    method getTypeName (line 31) | public String getTypeName();
    method decode (line 39) | public T decode(InputStream in) throws IOException;
    method encode (line 47) | public void encode(OutputStream out, T val) throws IOException;

FILE: java/com/grammatech/gtirb/auxdatacodec/FloatCodec.java
  class FloatCodec (line 24) | public class FloatCodec implements Codec<Float> {
    method getTypeName (line 26) | public String getTypeName() { return "float"; }
    method decode (line 28) | public Float decode(InputStream in) throws IOException {
    method encode (line 38) | public void encode(OutputStream out, Float val) throws IOException {

FILE: java/com/grammatech/gtirb/auxdatacodec/IntegerCodec.java
  class IntegerCodec (line 24) | public class IntegerCodec implements Codec<Integer> {
    method IntegerCodec (line 28) | private IntegerCodec(String tn) { this.typeName = tn; }
    method getTypeName (line 30) | public String getTypeName() { return this.typeName; }
    method decode (line 32) | public Integer decode(InputStream in) throws IOException {
    method encode (line 43) | public void encode(OutputStream out, Integer val) throws IOException {

FILE: java/com/grammatech/gtirb/auxdatacodec/ListCodec.java
  class ListCodec (line 23) | public class ListCodec<T> implements Codec<List<T>> {
    method ListCodec (line 27) | public ListCodec(Codec<T> tc, Supplier<List<T>> s) {
    method getTypeName (line 32) | public String getTypeName() {
    method decode (line 36) | public List<T> decode(InputStream in) throws IOException {
    method encode (line 45) | public void encode(OutputStream out, List<T> al) throws IOException {

FILE: java/com/grammatech/gtirb/auxdatacodec/LongCodec.java
  class LongCodec (line 24) | public class LongCodec implements Codec<Long> {
    method LongCodec (line 28) | private LongCodec(String tn) { this.typeName = tn; }
    method getTypeName (line 30) | public String getTypeName() { return this.typeName; }
    method decodeStatic (line 32) | public static long decodeStatic(InputStream in) throws IOException {
    method decode (line 42) | public Long decode(InputStream in) throws IOException {
    method encodeStatic (line 46) | public static void encodeStatic(OutputStream out, long val)
    method encode (line 55) | public void encode(OutputStream out, Long val) throws IOException {

FILE: java/com/grammatech/gtirb/auxdatacodec/MapCodec.java
  class MapCodec (line 23) | public class MapCodec<K, V> implements Codec<Map<K, V>> {
    method MapCodec (line 28) | public MapCodec(Codec<K> kc, Codec<V> vc, Supplier<Map<K, V>> s) {
    method getTypeName (line 34) | public String getTypeName() {
    method decode (line 39) | public Map<K, V> decode(InputStream in) throws IOException {
    method encode (line 54) | public void encode(OutputStream out, Map<K, V> map) throws IOException {

FILE: java/com/grammatech/gtirb/auxdatacodec/OffsetCodec.java
  class OffsetCodec (line 23) | public class OffsetCodec implements Codec<Offset> {
    method getTypeName (line 25) | public String getTypeName() { return "Offset"; }
    method decode (line 27) | public Offset decode(InputStream in) throws IOException {
    method encode (line 33) | public void encode(OutputStream out, Offset val) throws IOException {

FILE: java/com/grammatech/gtirb/auxdatacodec/SetCodec.java
  class SetCodec (line 23) | public class SetCodec<T> implements Codec<Set<T>> {
    method SetCodec (line 27) | public SetCodec(Codec<T> tc, Supplier<Set<T>> s) {
    method getTypeName (line 32) | public String getTypeName() {
    method decode (line 36) | public Set<T> decode(InputStream in) throws IOException {
    method encode (line 50) | public void encode(OutputStream out, Set<T> set) throws IOException {

FILE: java/com/grammatech/gtirb/auxdatacodec/ShortCodec.java
  class ShortCodec (line 10) | public class ShortCodec implements Codec<Short> {
    method ShortCodec (line 14) | private ShortCodec(String tn) { this.typeName = tn; }
    method getTypeName (line 16) | public String getTypeName() { return this.typeName; }
    method decode (line 18) | public Short decode(InputStream in) throws IOException {
    method encode (line 28) | public void encode(OutputStream out, Short val) throws IOException {

FILE: java/com/grammatech/gtirb/auxdatacodec/StringCodec.java
  class StringCodec (line 26) | public class StringCodec implements Codec<String> {
    method getTypeName (line 28) | public String getTypeName() { return "string"; }
    method decode (line 30) | public String decode(InputStream in) throws IOException {
    method encode (line 44) | public void encode(OutputStream out, String val) throws IOException {

FILE: java/com/grammatech/gtirb/auxdatacodec/Tuple1Codec.java
  class Tuple1Codec (line 8) | public class Tuple1Codec<T extends Tuple1<A>, A> implements Codec<T> {
    type Tuple1Maker (line 13) | public interface Tuple1Maker<T, A> { public T make(A a); }
      method make (line 13) | public T make(A a);
    method Tuple1Codec (line 15) | public Tuple1Codec(Codec<A> ac, Tuple1Maker<T, A> maker) {
    method getTypeName (line 20) | public String getTypeName() {
    method decode (line 24) | public T decode(InputStream in) throws IOException {
    method encode (line 29) | public void encode(OutputStream out, T val) throws IOException {

FILE: java/com/grammatech/gtirb/auxdatacodec/Tuple2Codec.java
  class Tuple2Codec (line 22) | public class Tuple2Codec<T extends Tuple2<A, B>, A, B> implements Codec<...
    type Tuple2Maker (line 28) | public interface Tuple2Maker<T, A, B> { public T make(A a, B b); }
      method make (line 28) | public T make(A a, B b);
    method Tuple2Codec (line 30) | public Tuple2Codec(Codec<A> ac, Codec<B> bc, Tuple2Maker<T, A, B> make...
    method getTypeName (line 36) | public String getTypeName() {
    method decode (line 41) | public T decode(InputStream in) throws IOException {
    method encode (line 47) | public void encode(OutputStream out, T val) throws IOException {

FILE: java/com/grammatech/gtirb/auxdatacodec/Tuple3Codec.java
  class Tuple3Codec (line 22) | public class Tuple3Codec<T extends Tuple3<A, B, C>, A, B, C>
    type Tuple3Maker (line 30) | public interface Tuple3Maker<T, A, B, C> { public T make(A a, B b, C c...
      method make (line 30) | public T make(A a, B b, C c);
    method Tuple3Codec (line 32) | public Tuple3Codec(Codec<A> ac, Codec<B> bc, Codec<C> cc,
    method getTypeName (line 40) | public String getTypeName() {
    method decode (line 45) | public T decode(InputStream in) throws IOException {
    method encode (line 52) | public void encode(OutputStream out, T val) throws IOException {

FILE: java/com/grammatech/gtirb/auxdatacodec/Tuple4Codec.java
  class Tuple4Codec (line 22) | public class Tuple4Codec<T extends Tuple4<A, B, C, D>, A, B, C, D>
    type Tuple4Maker (line 31) | public interface Tuple4Maker<T, A, B, C, D> {
      method make (line 32) | public T make(A a, B b, C c, D d);
    method Tuple4Codec (line 35) | public Tuple4Codec(Codec<A> ac, Codec<B> bc, Codec<C> cc, Codec<D> dc,
    method getTypeName (line 44) | public String getTypeName() {
    method decode (line 49) | public T decode(InputStream in) throws IOException {
    method encode (line 57) | public void encode(OutputStream out, T val) throws IOException {

FILE: java/com/grammatech/gtirb/auxdatacodec/Tuple5Codec.java
  class Tuple5Codec (line 22) | public class Tuple5Codec<T extends Tuple5<A, B, C, D, E>, A, B, C, D, E>
    type Tuple5Maker (line 32) | public interface Tuple5Maker<T, A, B, C, D, E> {
      method make (line 33) | public T make(A a, B b, C c, D d, E e);
    method Tuple5Codec (line 36) | public Tuple5Codec(Codec<A> ac, Codec<B> bc, Codec<C> cc, Codec<D> dc,
    method getTypeName (line 46) | public String getTypeName() {
    method decode (line 52) | public T decode(InputStream in) throws IOException {
    method encode (line 61) | public void encode(OutputStream out, T val) throws IOException {

FILE: java/com/grammatech/gtirb/auxdatacodec/UuidCodec.java
  class UuidCodec (line 23) | public class UuidCodec implements Codec<UUID> {
    method getTypeName (line 25) | public String getTypeName() { return "UUID"; }
    method decodeStatic (line 27) | public static UUID decodeStatic(InputStream in) throws IOException {
    method decode (line 31) | public UUID decode(InputStream in) throws IOException {
    method encodeStatic (line 35) | public static void encodeStatic(OutputStream out, UUID val)
    method encode (line 40) | public void encode(OutputStream out, UUID val) throws IOException {

FILE: java/com/grammatech/gtirb/auxdatacodec/Variant11Codec.java
  class Variant11Codec (line 11) | public class Variant11Codec<
    type Variant11Maker (line 38) | public interface Variant11Maker<T, X> { public T make(X x); }
      method make (line 38) | public T make(X x);
    method Variant11Codec (line 77) | public Variant11Codec(
    method getTypeName (line 110) | public String getTypeName() {
    method decode (line 119) | public T decode(InputStream in) throws IOException {
    method encode (line 170) | public void encode(OutputStream out, T val) throws IOException {

FILE: java/com/grammatech/gtirb/auxdatacodec/Variant2Codec.java
  class Variant2Codec (line 11) | public class Variant2Codec<T extends Variant2<A, B>, A, B> implements Co...
    type Variant2Maker (line 18) | public interface Variant2Maker<T, X> { public T make(X x); }
      method make (line 18) | public T make(X x);
    method Variant2Codec (line 30) | public Variant2Codec(Codec<A> ac, Codec<B> bc, Variant2Maker<T, A> aMa...
    method getTypeName (line 38) | public String getTypeName() {
    method decode (line 43) | public T decode(InputStream in) throws IOException {
    method encode (line 58) | public void encode(OutputStream out, T val) throws IOException {

FILE: java/com/grammatech/gtirb/auxdatacodec/Variant3Codec.java
  class Variant3Codec (line 11) | public class Variant3Codec<T extends Variant3<A, B, C>, A, B, C>
    type Variant3Maker (line 21) | public interface Variant3Maker<T, X> { public T make(X a); }
      method make (line 21) | public T make(X a);
    method Variant3Codec (line 36) | public Variant3Codec(Codec<A> ac, Codec<B> bc, Codec<C> cc,
    method getTypeName (line 47) | public String getTypeName() {
    method decode (line 52) | public T decode(InputStream in) throws IOException {
    method encode (line 71) | public void encode(OutputStream out, T val) throws IOException {

FILE: java/com/grammatech/gtirb/tuple/Tuple1.java
  class Tuple1 (line 9) | public abstract class Tuple1<A> {
    method Tuple1 (line 18) | protected Tuple1(A first) { this.first = first; }
    method get0 (line 25) | public A get0() { return this.first; }
    method equals (line 32) | @Override

FILE: java/com/grammatech/gtirb/tuple/Tuple2.java
  class Tuple2 (line 23) | public abstract class Tuple2<A, B> {
    method Tuple2 (line 34) | protected Tuple2(A first, B second) {
    method get0 (line 44) | public A get0() { return this.first; }
    method get1 (line 51) | public B get1() { return this.second; }
    method equals (line 58) | @Override

FILE: java/com/grammatech/gtirb/tuple/Tuple3.java
  class Tuple3 (line 23) | public abstract class Tuple3<A, B, C> {
    method Tuple3 (line 36) | protected Tuple3(A first, B second, C third) {
    method get0 (line 47) | public A get0() { return this.first; }
    method get1 (line 54) | public B get1() { return this.second; }
    method get2 (line 61) | public C get2() { return this.third; }
    method equals (line 68) | @Override

FILE: java/com/grammatech/gtirb/tuple/Tuple4.java
  class Tuple4 (line 23) | public abstract class Tuple4<A, B, C, D> {
    method Tuple4 (line 38) | protected Tuple4(A first, B second, C third, D fourth) {
    method get0 (line 50) | public A get0() { return this.first; }
    method get1 (line 57) | public B get1() { return this.second; }
    method get2 (line 64) | public C get2() { return this.third; }
    method get3 (line 71) | public D get3() { return this.fourth; }
    method equals (line 78) | @Override

FILE: java/com/grammatech/gtirb/tuple/Tuple5.java
  class Tuple5 (line 23) | public abstract class Tuple5<A, B, C, D, E> {
    method Tuple5 (line 40) | protected Tuple5(A first, B second, C third, D fourth, E fifth) {
    method get0 (line 53) | public A get0() { return this.first; }
    method get1 (line 60) | public B get1() { return this.second; }
    method get2 (line 67) | public C get2() { return this.third; }
    method get3 (line 74) | public D get3() { return this.fourth; }
    method get4 (line 81) | public E get4() { return this.fifth; }
    method equals (line 88) | @Override

FILE: java/com/grammatech/gtirb/variant/Token.java
  class Token (line 10) | public class Token {
    class T0 (line 11) | public static class T0 {}
    class T1 (line 12) | public static class T1 {}
    class T2 (line 13) | public static class T2 {}
    class T3 (line 14) | public static class T3 {}
    class T4 (line 15) | public static class T4 {}
    class T5 (line 16) | public static class T5 {}
    class T6 (line 17) | public static class T6 {}
    class T7 (line 18) | public static class T7 {}
    class T8 (line 19) | public static class T8 {}
    class T9 (line 20) | public static class T9 {}
    class T10 (line 21) | public static class T10 {}

FILE: java/com/grammatech/gtirb/variant/Variant11.java
  class Variant11 (line 12) | public abstract class Variant11<A, B, C, D, E, F, G, H, I, J, K> {
    method Variant11 (line 23) | protected Variant11(Token.T0 tok, A o) {
    method Variant11 (line 35) | protected Variant11(Token.T1 tok, B o) {
    method Variant11 (line 47) | protected Variant11(Token.T2 tok, C o) {
    method Variant11 (line 59) | protected Variant11(Token.T3 tok, D o) {
    method Variant11 (line 71) | protected Variant11(Token.T4 tok, E o) {
    method Variant11 (line 83) | protected Variant11(Token.T5 tok, F o) {
    method Variant11 (line 95) | protected Variant11(Token.T6 tok, G o) {
    method Variant11 (line 107) | protected Variant11(Token.T7 tok, H o) {
    method Variant11 (line 119) | protected Variant11(Token.T8 tok, I o) {
    method Variant11 (line 131) | protected Variant11(Token.T9 tok, J o) {
    method Variant11 (line 143) | protected Variant11(Token.T10 tok, K o) {
    method getIndex (line 153) | public int getIndex() { return this.index; }
    method get0 (line 162) | public Optional<A> get0() {
    method get1 (line 178) | public Optional<B> get1() {
    method get2 (line 194) | public Optional<C> get2() {
    method get3 (line 210) | public Optional<D> get3() {
    method get4 (line 227) | public Optional<E> get4() {
    method get5 (line 243) | public Optional<F> get5() {
    method get6 (line 259) | public Optional<G> get6() {
    method get7 (line 275) | public Optional<H> get7() {
    method get8 (line 291) | public Optional<I> get8() {
    method get9 (line 307) | public Optional<J> get9() {
    method get10 (line 323) | public Optional<K> get10() {
    method set0 (line 338) | public void set0(A o) {
    method set1 (line 349) | public void set1(B o) {
    method set2 (line 360) | public void set2(C o) {
    method set3 (line 371) | public void set3(D o) {
    method set4 (line 382) | public void set4(E o) {
    method set5 (line 393) | public void set5(F o) {
    method set6 (line 404) | public void set6(G o) {
    method set7 (line 415) | public void set7(H o) {
    method set8 (line 426) | public void set8(I o) {
    method set9 (line 437) | public void set9(J o) {
    method set10 (line 448) | public void set10(K o) {
    method equals (line 458) | @Override

FILE: java/com/grammatech/gtirb/variant/Variant2.java
  class Variant2 (line 12) | public abstract class Variant2<A, B> {
    method Variant2 (line 23) | protected Variant2(Token.T0 tok, A o) {
    method Variant2 (line 35) | protected Variant2(Token.T1 tok, B o) {
    method getIndex (line 45) | public int getIndex() { return this.index; }
    method get0 (line 54) | public Optional<A> get0() {
    method get1 (line 70) | public Optional<B> get1() {
    method set0 (line 85) | public void set0(A o) {
    method set1 (line 96) | public void set1(B o) {
    method equals (line 106) | @Override

FILE: java/com/grammatech/gtirb/variant/Variant3.java
  class Variant3 (line 12) | public abstract class Variant3<A, B, C> {
    method Variant3 (line 23) | protected Variant3(Token.T0 tok, A o) {
    method Variant3 (line 35) | protected Variant3(Token.T1 tok, B o) {
    method Variant3 (line 47) | protected Variant3(Token.T2 tok, C o) {
    method getIndex (line 57) | public int getIndex() { return this.index; }
    method get0 (line 66) | public Optional<A> get0() {
    method get1 (line 82) | public Optional<B> get1() {
    method get2 (line 98) | public Optional<C> get2() {
    method set0 (line 113) | public void set0(A o) {
    method set1 (line 124) | public void set1(B o) {
    method set2 (line 135) | public void set2(C o) {
    method equals (line 145) | @Override

FILE: java/tests/TestAuxData.java
  class FooSingle (line 62) | class FooSingle extends Tuple1<String> {
    method FooSingle (line 63) | public FooSingle(String s) { super(s); }
  class FooPair (line 66) | class FooPair extends Tuple2<String, Long> {
    method FooPair (line 67) | public FooPair(String s, Long l) { super(s, l); }
  class FooTriple (line 70) | class FooTriple extends Tuple3<String, Long, Float> {
    method FooTriple (line 71) | public FooTriple(String s, Long l, Float f) { super(s, l, f); }
  class FooQuadruple (line 74) | class FooQuadruple extends Tuple4<String, Long, Float, Boolean> {
    method FooQuadruple (line 75) | public FooQuadruple(String s, Long l, Float f, Boolean b) {
  class FooQuintuple (line 80) | class FooQuintuple extends Tuple5<String, Long, Float, Boolean, Integer> {
    method FooQuintuple (line 81) | public FooQuintuple(String s, Long l, Float f, Boolean b, Integer i) {
  class FooVariant2 (line 86) | class FooVariant2 extends Variant2<Long, Float> {
    method FooVariant2 (line 87) | private FooVariant2(Token.T0 tok, Long l) { super(tok, l); }
    method FooVariant2 (line 88) | private FooVariant2(Token.T1 tok, Float f) { super(tok, f); }
    method ofLong (line 89) | public static FooVariant2 ofLong(Long l) {
    method ofFloat (line 92) | public static FooVariant2 ofFloat(Float f) {
  class FooVariant3 (line 97) | class FooVariant3 extends Variant3<Long, Float, Boolean> {
    method FooVariant3 (line 98) | private FooVariant3(Token.T0 tok, Long l) { super(tok, l); }
    method FooVariant3 (line 99) | private FooVariant3(Token.T1 tok, Float f) { super(tok, f); }
    method FooVariant3 (line 100) | private FooVariant3(Token.T2 tok, Boolean b) { super(tok, b); }
    method ofLong (line 101) | public static FooVariant3 ofLong(Long l) {
    method ofFloat (line 104) | public static FooVariant3 ofFloat(Float f) {
    method ofBoolean (line 107) | public static FooVariant3 ofBoolean(Boolean b) {
  class FooVariant11 (line 112) | class FooVariant11
    method FooVariant11 (line 115) | private FooVariant11(Token.T0 tok, Long l) { super(tok, l); }
    method FooVariant11 (line 116) | private FooVariant11(Token.T1 tok, Float f) { super(tok, f); }
    method FooVariant11 (line 117) | private FooVariant11(Token.T2 tok, Boolean b) { super(tok, b); }
    method FooVariant11 (line 118) | private FooVariant11(Token.T3 tok, Integer i) { super(tok, i); }
    method FooVariant11 (line 119) | private FooVariant11(Token.T4 tok, String s) { super(tok, s); }
    method FooVariant11 (line 120) | private FooVariant11(Token.T5 tok, Long l) { super(tok, l); }
    method FooVariant11 (line 121) | private FooVariant11(Token.T6 tok, Float f) { super(tok, f); }
    method FooVariant11 (line 122) | private FooVariant11(Token.T7 tok, Boolean b) { super(tok, b); }
    method FooVariant11 (line 123) | private FooVariant11(Token.T8 tok, Integer i) { super(tok, i); }
    method FooVariant11 (line 124) | private FooVariant11(Token.T9 tok, String s) { super(tok, s); }
    method FooVariant11 (line 125) | private FooVariant11(Token.T10 tok, Offset o) { super(tok, o); }
    method ofLong1 (line 126) | public static FooVariant11 ofLong1(Long l) {
    method ofFloat1 (line 129) | public static FooVariant11 ofFloat1(Float f) {
    method ofBoolean1 (line 132) | public static FooVariant11 ofBoolean1(Boolean b) {
    method ofInteger1 (line 135) | public static FooVariant11 ofInteger1(Integer i) {
    method ofString1 (line 138) | public static FooVariant11 ofString1(String s) {
    method ofLong2 (line 141) | public static FooVariant11 ofLong2(Long l) {
    method ofFloat2 (line 144) | public static FooVariant11 ofFloat2(Float f) {
    method ofBoolean2 (line 147) | public static FooVariant11 ofBoolean2(Boolean b) {
    method ofInteger2 (line 150) | public static FooVariant11 ofInteger2(Integer i) {
    method ofString2 (line 153) | public static FooVariant11 ofString2(String s) {
    method ofOffset (line 156) | public static FooVariant11 ofOffset(Offset o) {
  class TestAuxData (line 161) | public class TestAuxData {
    method argProviderForTestCodec (line 163) | private static Stream<Arguments> argProviderForTestCodec() {
    method testCodec (line 290) | @ParameterizedTest(name = "Test codec for protobuf type: {0}")
    method testAuxDataDecodeEncode (line 302) | @Test
    method testRemoveAuxData (line 346) | @Test
    method testClearAuxData (line 372) | @Test
    method testGetAuxDataMap (line 389) | @Test

FILE: java/tests/TestByteIntervals.java
  class TestByteIntervals (line 12) | public class TestByteIntervals {
    method testByteIntervalSaveAndLoad (line 14) | @Test
    method testByteIntervalTruncation (line 65) | @Test
    method testIterators (line 85) | @Test
    method testBlockRetrieval (line 125) | @Test

FILE: java/tests/TestIrSanity.java
  class TestIrSanity (line 15) | public class TestIrSanity {
    method testCreateSaveAndLoad (line 17) | @Test
    method testIrSetAndGet (line 55) | @Test
    method testNonGtirbContents (line 93) | @Test
    method testWrongVersion (line 105) | @Test
    method testCorruptedProtobuf (line 123) | @Test
    method testAddAndRemoveModules (line 142) | @Test
    method testIrFindModules (line 167) | @Test

FILE: java/tests/TestModules.java
  class TestModules (line 15) | public class TestModules {
    method testModuleSaveAndLoad (line 17) | @Test
    method testModuleSetAndGet (line 73) | @Test
    method testAddAndRemoveSections (line 114) | @Test
    method testAddAndRemoveSymbols (line 151) | @Test
    method testAddAndRemoveProxyBlocks (line 182) | @Test
    method testModuleFindSections (line 211) | @Test

FILE: java/tests/TestSections.java
  class TestSections (line 11) | public class TestSections {
    method testSectionSaveAndLoad (line 13) | @Test
    method testSectionSetAndGet (line 68) | @Test
    method testSectionWithIntervalAddresses (line 93) | @Test
    method testSectionNoAddressIntervals (line 134) | @Test
    method testAddAndRemoveFlags (line 158) | @Test
    method testAddAndRemoveByteIntervals (line 180) | @Test

FILE: java/tests/TestSymbolicExpressions.java
  class TestSymbolicExpressions (line 15) | class TestSymbolicExpressions {
    method testUnknownAttributes (line 18) | @Test
    method testSexprSetAndGet (line 59) | @Test

FILE: java/tests/TestSymbols.java
  class TestSymbols (line 11) | public class TestSymbols {
    method testSymbolSaveAndLoad (line 13) | @Test
    method testSymbolSetAndGet (line 81) | @Test

FILE: java/tests/TestTuple.java
  class BarSingle (line 12) | class BarSingle extends Tuple1<String> {
    method BarSingle (line 13) | public BarSingle(String s) { super(s); }
    method getString (line 14) | public String getString() { return this.get0(); }
  class BarPair (line 17) | class BarPair extends Tuple2<String, Long> {
    method BarPair (line 18) | public BarPair(String s, Long l) { super(s, l); }
    method getString (line 19) | public String getString() { return this.get0(); }
    method getLong (line 20) | public Long getLong() { return this.get1(); }
  class BarTriple (line 23) | class BarTriple extends Tuple3<String, Long, Float> {
    method BarTriple (line 24) | public BarTriple(String s, Long l, Float f) { super(s, l, f); }
    method getString (line 25) | public String getString() { return this.get0(); }
    method getLong (line 26) | public Long getLong() { return this.get1(); }
    method getFloat (line 27) | public Float getFloat() { return this.get2(); }
  class BarQuadruple (line 30) | class BarQuadruple extends Tuple4<String, Long, Float, Boolean> {
    method BarQuadruple (line 31) | public BarQuadruple(String s, Long l, Float f, Boolean b) {
    method getString (line 34) | public String getString() { return this.get0(); }
    method getLong (line 35) | public Long getLong() { return this.get1(); }
    method getFloat (line 36) | public Float getFloat() { return this.get2(); }
    method getBoolean (line 37) | public Boolean getBoolean() { return this.get3(); }
  class BarQuintuple (line 40) | class BarQuintuple extends Tuple5<String, Long, Float, Boolean, Integer> {
    method BarQuintuple (line 41) | public BarQuintuple(String s, Long l, Float f, Boolean b, Integer i) {
    method getString (line 44) | public String getString() { return this.get0(); }
    method getLong (line 45) | public Long getLong() { return this.get1(); }
    method getFloat (line 46) | public Float getFloat() { return this.get2(); }
    method getBoolean (line 47) | public Boolean getBoolean() { return this.get3(); }
    method getInteger (line 48) | public Integer getInteger() { return this.get4(); }
  class TestTuple (line 51) | public class TestTuple {
    method testTuple1 (line 52) | @Test
    method testTuple2 (line 62) | @Test
    method testTuple3 (line 75) | @Test
    method testTuple4 (line 91) | @Test
    method testTuple5 (line 110) | @Test

FILE: java/tests/TestVariant.java
  class BarVariant2 (line 14) | class BarVariant2 extends Variant2<Long, Float> {
    method BarVariant2 (line 15) | private BarVariant2(Token.T0 tok, Long l) { super(tok, l); }
    method BarVariant2 (line 16) | private BarVariant2(Token.T1 tok, Float f) { super(tok, f); }
    method getLong (line 17) | public Optional<Long> getLong() { return this.get0(); }
    method getFloat (line 18) | public Optional<Float> getFloat() { return this.get1(); }
    method setLong (line 19) | public void setLong(Long l) { this.set0(l); }
    method setFloat (line 20) | public void setFloat(Float f) { this.set1(f); }
    method ofLong (line 21) | public static BarVariant2 ofLong(Long l) {
    method ofFloat (line 24) | public static BarVariant2 ofFloat(Float f) {
  class BarVariant3 (line 29) | class BarVariant3 extends Variant3<Long, Float, Boolean> {
    method BarVariant3 (line 30) | private BarVariant3(Token.T0 tok, Long l) { super(tok, l); }
    method BarVariant3 (line 31) | private BarVariant3(Token.T1 tok, Float f) { super(tok, f); }
    method BarVariant3 (line 32) | private BarVariant3(Token.T2 tok, Boolean b) { super(tok, b); }
    method getLong (line 33) | public Optional<Long> getLong() { return this.get0(); }
    method getFloat (line 34) | public Optional<Float> getFloat() { return this.get1(); }
    method getBoolean (line 35) | public Optional<Boolean> getBoolean() { return this.get2(); }
    method setLong (line 36) | public void setLong(Long l) { this.set0(l); }
    method setFloat (line 37) | public void setFloat(Float f) { this.set1(f); }
    method setBoolean (line 38) | public void setBoolean(Boolean b) { this.set2(b); }
    method ofLong (line 39) | public static BarVariant3 ofLong(Long l) {
    method ofFloat (line 42) | public static BarVariant3 ofFloat(Float f) {
    method ofBoolean (line 45) | public static BarVariant3 ofBoolean(Boolean b) {
  class BarVariant11 (line 50) | class BarVariant11
    method BarVariant11 (line 53) | private BarVariant11(Token.T0 tok, Long l) { super(tok, l); }
    method BarVariant11 (line 54) | private BarVariant11(Token.T1 tok, Float f) { super(tok, f); }
    method BarVariant11 (line 55) | private BarVariant11(Token.T2 tok, Boolean b) { super(tok, b); }
    method BarVariant11 (line 56) | private BarVariant11(Token.T3 tok, Integer i) { super(tok, i); }
    method BarVariant11 (line 57) | private BarVariant11(Token.T4 tok, String s) { super(tok, s); }
    method BarVariant11 (line 58) | private BarVariant11(Token.T5 tok, Long l) { super(tok, l); }
    method BarVariant11 (line 59) | private BarVariant11(Token.T6 tok, Float f) { super(tok, f); }
    method BarVariant11 (line 60) | private BarVariant11(Token.T7 tok, Boolean b) { super(tok, b); }
    method BarVariant11 (line 61) | private BarVariant11(Token.T8 tok, Integer i) { super(tok, i); }
    method BarVariant11 (line 62) | private BarVariant11(Token.T9 tok, String s) { super(tok, s); }
    method BarVariant11 (line 63) | private BarVariant11(Token.T10 tok, Offset o) { super(tok, o); }
    method getLong1 (line 64) | public Optional<Long> getLong1() { return this.get0(); }
    method getFloat1 (line 65) | public Optional<Float> getFloat1() { return this.get1(); }
    method getBoolean1 (line 66) | public Optional<Boolean> getBoolean1() { return this.get2(); }
    method getInteger1 (line 67) | public Optional<Integer> getInteger1() { return this.get3(); }
    method getString1 (line 68) | public Optional<String> getString1() { return this.get4(); }
    method getLong2 (line 69) | public Optional<Long> getLong2() { return this.get5(); }
    method getFloat2 (line 70) | public Optional<Float> getFloat2() { return this.get6(); }
    method getBoolean2 (line 71) | public Optional<Boolean> getBoolean2() { return this.get7(); }
    method getInteger2 (line 72) | public Optional<Integer> getInteger2() { return this.get8(); }
    method getString2 (line 73) | public Optional<String> getString2() { return this.get9(); }
    method getOffset (line 74) | public Optional<Offset> getOffset() { return this.get10(); }
    method setLong1 (line 75) | public void setLong1(Long l) { this.set0(l); }
    method setFloat1 (line 76) | public void setFloat1(Float f) { this.set1(f); }
    method setBoolean1 (line 77) | public void setBoolean1(Boolean b) { this.set2(b); }
    method setInteger1 (line 78) | public void setInteger1(Integer i) { this.set3(i); }
    method setString1 (line 79) | public void setString1(String s) { this.set4(s); }
    method setLong2 (line 80) | public void setLong2(Long l) { this.set5(l); }
    method setFloat2 (line 81) | public void setFloat2(Float f) { this.set6(f); }
    method setBoolean2 (line 82) | public void setBoolean2(Boolean b) { this.set7(b); }
    method setInteger2 (line 83) | public void setInteger2(Integer i) { this.set8(i); }
    method setString2 (line 84) | public void setString2(String s) { this.set9(s); }
    method setOffset (line 85) | public void setOffset(Offset o) { this.set10(o); }
    method ofLong1 (line 86) | public static BarVariant11 ofLong1(Long l) {
    method ofFloat1 (line 89) | public static BarVariant11 ofFloat1(Float f) {
    method ofBoolean1 (line 92) | public static BarVariant11 ofBoolean1(Boolean b) {
    method ofInteger1 (line 95) | public static BarVariant11 ofInteger1(Integer i) {
    method ofString1 (line 98) | public static BarVariant11 ofString1(String s) {
    method ofLong2 (line 101) | public static BarVariant11 ofLong2(Long l) {
    method ofFloat2 (line 104) | public static BarVariant11 ofFloat2(Float f) {
    method ofBoolean2 (line 107) | public static BarVariant11 ofBoolean2(Boolean b) {
    method ofInteger2 (line 110) | public static BarVariant11 ofInteger2(Integer i) {
    method ofString2 (line 113) | public static BarVariant11 ofString2(String s) {
    method ofOffset (line 116) | public static BarVariant11 ofOffset(Offset o) {
  class TestVariant (line 121) | public class TestVariant {
    method testVariant2 (line 122) | @Test
    method testVariant3 (line 140) | @Test
    method testVariant11 (line 171) | @Test

FILE: python/gtirb/auxdata.py
  class _LazyDataContainer (line 17) | class _LazyDataContainer:
    method __init__ (line 24) | def __init__(
    method get_data (line 34) | def get_data(self) -> object:
    method get_raw_data (line 46) | def get_raw_data(self) -> bytes:
  class AuxData (line 52) | class AuxData:
    method __init__ (line 76) | def __init__(
    method data (line 98) | def data(self) -> Any:  # type: ignore[misc]
    method data (line 105) | def data(self, value: object) -> None:
    method _from_protobuf (line 110) | def _from_protobuf(
    method _to_protobuf (line 132) | def _to_protobuf(self) -> AuxData_pb2.AuxData:
    method __repr__ (line 149) | def __repr__(self) -> str:
  class AuxDataContainer (line 158) | class AuxDataContainer(Node):
    method __init__ (line 167) | def __init__(
    method _read_protobuf_aux_data (line 184) | def _read_protobuf_aux_data(
    method _write_protobuf_aux_data (line 202) | def _write_protobuf_aux_data(
    method deep_eq (line 216) | def deep_eq(self, other: object) -> bool:

FILE: python/gtirb/block.py
  class Block (line 19) | class Block(Node):
    method module (line 25) | def module(self) -> typing.Optional["Module"]:
    method references (line 31) | def references(self) -> typing.Iterator["Symbol"]:
    method _add_to_uuid_cache (line 41) | def _add_to_uuid_cache(self, cache: typing.Dict[UUID, Node]) -> None:
    method _remove_from_uuid_cache (line 46) | def _remove_from_uuid_cache(self, cache: typing.Dict[UUID, Node]) -> N...
  class ByteBlock (line 52) | class ByteBlock(Block):
    method __init__ (line 65) | def __init__(
    method byte_interval (line 91) | def byte_interval(self) -> typing.Optional["ByteInterval"]:
    method byte_interval (line 97) | def byte_interval(self, value: typing.Optional["ByteInterval"]) -> None:
    method deep_eq (line 103) | def deep_eq(self, other: object) -> bool:
    method contents (line 114) | def contents(self) -> bytes:
    method address (line 124) | def address(self) -> typing.Optional[int]:
    method section (line 132) | def section(self) -> typing.Optional["Section"]:
    method module (line 140) | def module(self) -> typing.Optional["Module"]:
    method ir (line 148) | def ir(self) -> typing.Optional["IR"]:
    method contains_offset (line 155) | def contains_offset(self, offset: int) -> bool:
    method contains_address (line 159) | def contains_address(self, address: int) -> bool:
  class CfgNode (line 171) | class CfgNode(Block):
    method incoming_edges (line 175) | def incoming_edges(self) -> typing.Iterable["Edge"]:
    method outgoing_edges (line 181) | def outgoing_edges(self) -> typing.Iterable["Edge"]:
  class DataBlock (line 187) | class DataBlock(ByteBlock):
    method __init__ (line 190) | def __init__(
    method _decode_protobuf (line 213) | def _decode_protobuf(
    method _to_protobuf (line 225) | def _to_protobuf(self) -> DataBlock_pb2.DataBlock:
    method __repr__ (line 231) | def __repr__(self) -> str:
  class CodeBlock (line 241) | class CodeBlock(ByteBlock, CfgNode):
    class DecodeMode (line 252) | class DecodeMode(Enum):
    method __init__ (line 261) | def __init__(
    method _decode_protobuf (line 290) | def _decode_protobuf(
    method _to_protobuf (line 306) | def _to_protobuf(self) -> CodeBlock_pb2.CodeBlock:
    method deep_eq (line 313) | def deep_eq(self, other: object) -> bool:
    method __repr__ (line 319) | def __repr__(self) -> str:
    method incoming_edges (line 335) | def incoming_edges(self) -> typing.Iterator["Edge"]:
    method outgoing_edges (line 342) | def outgoing_edges(self) -> typing.Iterator["Edge"]:
  class ProxyBlock (line 349) | class ProxyBlock(CfgNode):
    method __init__ (line 364) | def __init__(
    method _decode_protobuf (line 376) | def _decode_protobuf(
    method _to_protobuf (line 388) | def _to_protobuf(self) -> ProxyBlock_pb2.ProxyBlock:
    method deep_eq (line 393) | def deep_eq(self, other: object) -> bool:
    method __repr__ (line 399) | def __repr__(self) -> str:
    method module (line 403) | def module(self) -> typing.Optional["Module"]:
    method module (line 407) | def module(self, value: typing.Optional["Module"]) -> None:
    method incoming_edges (line 414) | def incoming_edges(self) -> typing.Iterator["Edge"]:
    method outgoing_edges (line 421) | def outgoing_edges(self) -> typing.Iterator["Edge"]:
    method ir (line 428) | def ir(self) -> typing.Optional["IR"]:

FILE: python/gtirb/byteinterval.py
  class ByteInterval (line 36) | class ByteInterval(Node):
    class _BlockSet (line 66) | class _BlockSet(SetWrapper[ByteBlock]):
      method __init__ (line 67) | def __init__(
      method add (line 74) | def add(self, v: ByteBlock) -> None:
      method update (line 79) | def update(self, *iterables: typing.Iterable[ByteBlock]) -> None:
      method discard (line 92) | def discard(self, v: ByteBlock) -> None:
    class _SymbolicExprDict (line 101) | class _SymbolicExprDict(DictWrapper[int, SymbolicExpression]):
      method __init__ (line 102) | def __init__(
      method __repr__ (line 115) | def __repr__(self) -> str:
    method __init__ (line 129) | def __init__(
    method _index_add_multiple (line 187) | def _index_add_multiple(
    method _index_add (line 195) | def _index_add(self, block: ByteBlock) -> None:
    method _index_discard (line 198) | def _index_discard(self, block: ByteBlock) -> None:
    method initialized_size (line 202) | def initialized_size(self) -> int:
    method initialized_size (line 218) | def initialized_size(self, value: int) -> None:
    method _decode_protobuf (line 225) | def _decode_protobuf(
    method _decode_symbolic_expressions (line 267) | def _decode_symbolic_expressions(self, ir: "IR") -> None:
    method _to_protobuf (line 302) | def _to_protobuf(self) -> ByteInterval_pb2.ByteInterval:
    method section (line 353) | def section(self) -> typing.Optional["Section"]:
    method section (line 359) | def section(self, value: typing.Optional["Section"]) -> None:
    method symbolic_expressions (line 366) | def symbolic_expressions(
    method symbolic_expressions (line 372) | def symbolic_expressions(
    method deep_eq (line 378) | def deep_eq(self, other: object) -> bool:
    method __repr__ (line 411) | def __repr__(self) -> str:
    method byte_blocks_on (line 431) | def byte_blocks_on(
    method byte_blocks_at (line 447) | def byte_blocks_at(
    method code_blocks_on (line 463) | def code_blocks_on(
    method code_blocks_at (line 476) | def code_blocks_at(
    method data_blocks_on (line 489) | def data_blocks_on(
    method data_blocks_at (line 502) | def data_blocks_at(
    method byte_blocks_on_offset (line 515) | def byte_blocks_on_offset(
    method byte_blocks_at_offset (line 528) | def byte_blocks_at_offset(
    method code_blocks_on_offset (line 541) | def code_blocks_on_offset(
    method code_blocks_at_offset (line 556) | def code_blocks_at_offset(
    method data_blocks_on_offset (line 571) | def data_blocks_on_offset(
    method data_blocks_at_offset (line 586) | def data_blocks_at_offset(
    method symbolic_expressions_at (line 601) | def symbolic_expressions_at(
    method symbolic_expressions_at_offset (line 624) | def symbolic_expressions_at_offset(
    method _add_to_uuid_cache (line 645) | def _add_to_uuid_cache(self, cache: typing.Dict[UUID, Node]) -> None:
    method _remove_from_uuid_cache (line 652) | def _remove_from_uuid_cache(self, cache: typing.Dict[UUID, Node]) -> N...
    method module (line 660) | def module(self) -> typing.Optional["Module"]:
    method ir (line 667) | def ir(self) -> typing.Optional["IR"]:

FILE: python/gtirb/cfg.py
  class EdgeType (line 24) | class EdgeType(Enum):
  class EdgeLabel (line 78) | class EdgeLabel(NamedTuple):
    method __repr__ (line 102) | def __repr__(self) -> str:
  class Edge (line 112) | class Edge(
    method __new__ (line 132) | def __new__(
  class CFG (line 144) | class CFG(MutableSet[Edge]):
    method __init__ (line 162) | def __init__(self, edges: Optional[Iterable[Edge]] = None):
    method _edge_key (line 169) | def _edge_key(self, edge: Edge) -> Optional[Hashable]:
    method __contains__ (line 178) | def __contains__(self, edge: object) -> bool:
    method __iter__ (line 181) | def __iter__(self) -> Iterator[Edge]:
    method __len__ (line 185) | def __len__(self) -> int:
    method update (line 188) | def update(self, edges: Iterable[Edge]) -> None:
    method add (line 192) | def add(self, edge: Edge) -> None:
    method clear (line 196) | def clear(self) -> None:
    method discard (line 199) | def discard(self, edge: Edge) -> None:
    method out_edges (line 204) | def out_edges(self, node: CfgNode) -> Iterator[Edge]:
    method in_edges (line 209) | def in_edges(self, node: CfgNode) -> Iterator[Edge]:
    method _from_protobuf (line 215) | def _from_protobuf(
    method _to_protobuf (line 247) | def _to_protobuf(self) -> Iterable[CFG_pb2.Edge]:
    method nx (line 260) | def nx(self) -> MultiDiGraph:  # type: ignore[type-arg]
    method deep_eq (line 263) | def deep_eq(self, other: "CFG") -> bool:
    method __repr__ (line 302) | def __repr__(self) -> str:

FILE: python/gtirb/ir.py
  class IR (line 38) | class IR(AuxDataContainer):
    class _ModuleList (line 46) | class _ModuleList(ListWrapper[Module]):
      method __init__ (line 47) | def __init__(self, node: "IR", *args: typing.Iterable[Module]):
      method _remove (line 51) | def _remove(self, v: Module) -> None:
      method _add (line 55) | def _add(self, v: Module) -> None:
    method __init__ (line 61) | def __init__(
    method _decode_protobuf (line 93) | def _decode_protobuf(
    method _to_protobuf (line 113) | def _to_protobuf(self) -> IR_pb2.IR:
    method deep_eq (line 125) | def deep_eq(self, other: object) -> bool:
    method load_protobuf_file (line 139) | def load_protobuf_file(protobuf_file: typing.BinaryIO) -> "IR":
    method load_protobuf (line 175) | def load_protobuf(
    method save_protobuf_file (line 186) | def save_protobuf_file(self, protobuf_file: typing.BinaryIO) -> None:
    method save_protobuf (line 199) | def save_protobuf(
    method __repr__ (line 210) | def __repr__(self) -> str:
    method proxy_blocks (line 221) | def proxy_blocks(self) -> typing.Iterator[ProxyBlock]:
    method sections (line 227) | def sections(self) -> typing.Iterator[Section]:
    method symbols (line 233) | def symbols(self) -> typing.Iterator[Symbol]:
    method byte_intervals (line 239) | def byte_intervals(self) -> typing.Iterator[ByteInterval]:
    method byte_blocks (line 247) | def byte_blocks(self) -> typing.Iterator[ByteBlock]:
    method code_blocks (line 255) | def code_blocks(self) -> typing.Iterator[CodeBlock]:
    method data_blocks (line 263) | def data_blocks(self) -> typing.Iterator[DataBlock]:
    method cfg_nodes (line 271) | def cfg_nodes(self) -> typing.Iterator[CfgNode]:
    method modules_named (line 276) | def modules_named(self, name: str) -> typing.Iterator[Module]:
    method sections_on (line 280) | def sections_on(
    method sections_at (line 291) | def sections_at(
    method byte_intervals_on (line 302) | def byte_intervals_on(
    method byte_intervals_at (line 315) | def byte_intervals_at(
    method byte_blocks_on (line 328) | def byte_blocks_on(
    method byte_blocks_at (line 341) | def byte_blocks_at(
    method code_blocks_on (line 354) | def code_blocks_on(
    method code_blocks_at (line 367) | def code_blocks_at(
    method data_blocks_on (line 380) | def data_blocks_on(
    method data_blocks_at (line 393) | def data_blocks_at(
    method symbolic_expressions_at (line 406) | def symbolic_expressions_at(
    method get_by_uuid (line 419) | def get_by_uuid(self, uuid: UUID) -> typing.Optional[Node]:

FILE: python/gtirb/lazyintervaltree.py
  class _EventType (line 33) | class _EventType(enum.Enum):
  class IntervalBuilder (line 40) | class IntervalBuilder(Protocol[_Kco, _V]):
    method __call__ (line 46) | def __call__(self, node: _V) -> Optional["Interval[_Kco, _V]"]:
  class LazyIntervalTree (line 50) | class LazyIntervalTree(Generic[_K, _V]):
    method __init__ (line 66) | def __init__(
    method add (line 81) | def add(self, value: _V) -> None:
    method discard (line 87) | def discard(self, value: _V) -> None:
    method get (line 96) | def get(self) -> "IntervalTree[_K, _V]":

FILE: python/gtirb/module.py
  class Module (line 32) | class Module(AuxDataContainer):
    class FileFormat (line 58) | class FileFormat(Enum):
    class ISA (line 95) | class ISA(Enum):
    class ByteOrder (line 136) | class ByteOrder(Enum):
    class _NodeSet (line 148) | class _NodeSet(SetWrapper[_T]):
      method __init__ (line 149) | def __init__(
      method add (line 156) | def add(self, v: _T) -> None:
      method discard (line 165) | def discard(self, v: _T) -> None:
    method __init__ (line 174) | def __init__(
    method _decode_protobuf (line 243) | def _decode_protobuf(
    method _to_protobuf (line 298) | def _to_protobuf(self) -> Module_pb2.Module:
    method deep_eq (line 316) | def deep_eq(self, other: object) -> bool:
    method __repr__ (line 352) | def __repr__(self) -> str:
    method _index_add (line 370) | def _index_add(
    method _index_discard (line 378) | def _index_discard(
    method symbols_named (line 393) | def symbols_named(self, name: str) -> typing.Iterator[Symbol]:
    method ir (line 400) | def ir(self) -> typing.Optional["IR"]:
    method ir (line 406) | def ir(self, value: typing.Optional["IR"]) -> None:
    method byte_intervals (line 413) | def byte_intervals(self) -> typing.Iterator[ByteInterval]:
    method byte_blocks (line 421) | def byte_blocks(self) -> typing.Iterator[ByteBlock]:
    method code_blocks (line 429) | def code_blocks(self) -> typing.Iterator[CodeBlock]:
    method data_blocks (line 437) | def data_blocks(self) -> typing.Iterator[DataBlock]:
    method cfg_nodes (line 445) | def cfg_nodes(self) -> typing.Iterator[CfgNode]:
    method sections_on (line 450) | def sections_on(
    method sections_at (line 461) | def sections_at(
    method byte_intervals_on (line 472) | def byte_intervals_on(
    method byte_intervals_at (line 485) | def byte_intervals_at(
    method byte_blocks_on (line 498) | def byte_blocks_on(
    method byte_blocks_at (line 511) | def byte_blocks_at(
    method code_blocks_on (line 524) | def code_blocks_on(
    method code_blocks_at (line 537) | def code_blocks_at(
    method data_blocks_on (line 550) | def data_blocks_on(
    method data_blocks_at (line 563) | def data_blocks_at(
    method symbolic_expressions_at (line 576) | def symbolic_expressions_at(
    method _add_to_uuid_cache (line 589) | def _add_to_uuid_cache(self, cache: typing.Dict[UUID, Node]) -> None:
    method _remove_from_uuid_cache (line 600) | def _remove_from_uuid_cache(self, cache: typing.Dict[UUID, Node]) -> N...

FILE: python/gtirb/node.py
  class _NodeMessage (line 17) | class _NodeMessage(typing_extensions.Protocol):
  class Node (line 21) | class Node:
    method __init__ (line 27) | def __init__(self, uuid: typing.Optional[UUID] = None) -> None:
    method _decode_protobuf (line 39) | def _decode_protobuf(
    method _from_protobuf (line 55) | def _from_protobuf(
    method _to_protobuf (line 81) | def _to_protobuf(self) -> Message:
    method deep_eq (line 88) | def deep_eq(self, other: object) -> bool:

FILE: python/gtirb/offset.py
  class Offset (line 13) | class Offset(
    method _from_protobuf (line 29) | def _from_protobuf(
    method _to_protobuf (line 46) | def _to_protobuf(self) -> Offset_pb2.Offset:

FILE: python/gtirb/section.py
  class Section (line 24) | class Section(Node):
    class Flag (line 35) | class Flag(Enum):
    class _ByteIntervalSet (line 59) | class _ByteIntervalSet(SetWrapper[ByteInterval]):
      method __init__ (line 60) | def __init__(
      method add (line 66) | def add(self, v: ByteInterval) -> None:
      method discard (line 75) | def discard(self, v: ByteInterval) -> None:
    method __init__ (line 84) | def __init__(
    method _index_add (line 120) | def _index_add(self, byte_interval: ByteInterval) -> None:
    method _index_discard (line 123) | def _index_discard(self, byte_interval: ByteInterval) -> None:
    method _decode_protobuf (line 127) | def _decode_protobuf(
    method _to_protobuf (line 147) | def _to_protobuf(self) -> Section_pb2.Section:
    method deep_eq (line 159) | def deep_eq(self, other: object) -> bool:
    method __repr__ (line 177) | def __repr__(self) -> str:
    method module (line 193) | def module(self) -> typing.Optional["Module"]:
    method module (line 199) | def module(self, value: typing.Optional["Module"]) -> None:
    method byte_blocks (line 206) | def byte_blocks(self) -> typing.Iterator[ByteBlock]:
    method code_blocks (line 214) | def code_blocks(self) -> typing.Iterator[CodeBlock]:
    method data_blocks (line 220) | def data_blocks(self) -> typing.Iterator[DataBlock]:
    method address (line 226) | def address(self) -> typing.Optional[int]:
    method size (line 245) | def size(self) -> typing.Optional[int]:
    method byte_intervals_on (line 263) | def byte_intervals_on(
    method byte_intervals_at (line 274) | def byte_intervals_at(
    method byte_blocks_on (line 285) | def byte_blocks_on(
    method byte_blocks_at (line 297) | def byte_blocks_at(
    method code_blocks_on (line 309) | def code_blocks_on(
    method code_blocks_at (line 324) | def code_blocks_at(
    method data_blocks_on (line 339) | def data_blocks_on(
    method data_blocks_at (line 354) | def data_blocks_at(
    method symbolic_expressions_at (line 369) | def symbolic_expressions_at(
    method _add_to_uuid_cache (line 383) | def _add_to_uuid_cache(self, cache: typing.Dict[UUID, Node]) -> None:
    method _remove_from_uuid_cache (line 390) | def _remove_from_uuid_cache(self, cache: typing.Dict[UUID, Node]) -> N...
    method ir (line 398) | def ir(self) -> typing.Optional["IR"]:

FILE: python/gtirb/serialization.py
  class CodecError (line 27) | class CodecError(Exception):
  class DecodeError (line 31) | class DecodeError(CodecError):
  class EncodeError (line 35) | class EncodeError(CodecError):
  class TypeNameError (line 39) | class TypeNameError(EncodeError):
    method __init__ (line 42) | def __init__(self, hint: str) -> None:
  class UnknownCodecError (line 46) | class UnknownCodecError(CodecError):
    method __init__ (line 53) | def __init__(self, name: str) -> None:
  class SubtypeTree (line 57) | class SubtypeTree:
    method __init__ (line 74) | def __init__(self, name: str, subtypes: Sequence["SubtypeTree"]) -> None:
    method __eq__ (line 78) | def __eq__(self, other: object) -> bool:
  class Variant (line 86) | class Variant:
    method __init__ (line 90) | def __init__(self, index: int, val: Any):  # type: ignore[misc]
    method __eq__ (line 94) | def __eq__(self, other: object) -> bool:
  class Codec (line 100) | class Codec:
    method decode (line 104) | def decode(
    method encode (line 124) | def encode(
  class MappingCodec (line 143) | class MappingCodec(Codec):
    method decode (line 147) | def decode(
    method encode (line 169) | def encode(
  class OffsetCodec (line 190) | class OffsetCodec(Codec):
    method decode (line 196) | def decode(
    method encode (line 211) | def encode(
  class SequenceCodec (line 226) | class SequenceCodec(Codec):
    method decode (line 230) | def decode(
    method encode (line 250) | def encode(
  class SetCodec (line 268) | class SetCodec(Codec):
    method decode (line 272) | def decode(
    method encode (line 292) | def encode(
  class TupleCodec (line 310) | class TupleCodec(Codec):
    method decode (line 314) | def decode(
    method encode (line 331) | def encode(
  class StringCodec (line 346) | class StringCodec(Codec):
    method decode (line 350) | def decode(
    method encode (line 363) | def encode(
  class BoolCodec (line 378) | class BoolCodec(Codec):
    method decode (line 382) | def decode(
    method encode (line 394) | def encode(
  class IntegerCodec (line 408) | class IntegerCodec(Codec):
    method decode (line 416) | def decode(
    method encode (line 431) | def encode(
  class Uint64Codec (line 448) | class Uint64Codec(IntegerCodec):
  class Uint32Codec (line 456) | class Uint32Codec(IntegerCodec):
  class Uint16Codec (line 464) | class Uint16Codec(IntegerCodec):
  class Uint8Codec (line 472) | class Uint8Codec(IntegerCodec):
  class Int64Codec (line 480) | class Int64Codec(IntegerCodec):
  class Int32Codec (line 488) | class Int32Codec(IntegerCodec):
  class Int16Codec (line 496) | class Int16Codec(IntegerCodec):
  class Int8Codec (line 504) | class Int8Codec(IntegerCodec):
  class FloatCodec (line 512) | class FloatCodec(Codec):
    method decode (line 520) | def decode(
    method encode (line 536) | def encode(
  class Float32Codec (line 552) | class Float32Codec(FloatCodec):
  class Float64Codec (line 558) | class Float64Codec(FloatCodec):
  class UUIDCodec (line 564) | class UUIDCodec(Codec):
    method decode (line 573) | def decode(
    method encode (line 587) | def encode(
  class VariantCodec (line 604) | class VariantCodec(Codec):
    method decode (line 613) | def decode(
    method encode (line 629) | def encode(
  class UnknownData (line 645) | class UnknownData(bytes):
  class Serialization (line 652) | class Serialization:
    method __init__ (line 674) | def __init__(self) -> None:
    method _decode_tree (line 702) | def _decode_tree(
    method _encode_tree (line 725) | def _encode_tree(
    method _parse_type (line 743) | def _parse_type(type_name: str) -> SubtypeTree:
    method decode (line 824) | def decode(
    method encode (line 854) | def encode(self, out: BinaryIO, val: object, type_name: str) -> None:

FILE: python/gtirb/symbol.py
  class Symbol (line 19) | class Symbol(Node):
    method __init__ (line 32) | def __init__(
    method value (line 61) | def value(self) -> typing.Optional[int]:
    method value (line 71) | def value(self, value: typing.Optional[int]) -> None:
    method referent (line 75) | def referent(self) -> typing.Optional[Block]:
    method referent (line 85) | def referent(self, referent: typing.Optional[Block]) -> None:
    method _decode_protobuf (line 89) | def _decode_protobuf(
    method _to_protobuf (line 113) | def _to_protobuf(self) -> Symbol_pb2.Symbol:
    method deep_eq (line 124) | def deep_eq(self, other: object) -> bool:
    method __repr__ (line 142) | def __repr__(self) -> str:
    method module (line 153) | def module(self) -> typing.Optional["Module"]:
    method module (line 157) | def module(self, value: typing.Optional["Module"]) -> None:
    method _add_to_uuid_cache (line 163) | def _add_to_uuid_cache(self, cache: typing.Dict[UUID, Node]) -> None:
    method _remove_from_uuid_cache (line 168) | def _remove_from_uuid_cache(self, cache: typing.Dict[UUID, Node]) -> N...
    method ir (line 174) | def ir(self) -> typing.Optional["IR"]:

FILE: python/gtirb/symbolicexpression.py
  class SymbolicExpression (line 18) | class SymbolicExpression:
    class Attribute (line 21) | class Attribute(Enum):
      method __repr__ (line 92) | def __repr__(self) -> str:
      method __int__ (line 95) | def __int__(self) -> int:
    method __init__ (line 98) | def __init__(
    method symbols (line 105) | def symbols(self) -> typing.Iterable[Symbol]:
    method deep_eq (line 112) | def deep_eq(self, other: object) -> bool:
    method _attributes_repr (line 115) | def _attributes_repr(self) -> str:
  class SymAddrAddr (line 122) | class SymAddrAddr(SymbolicExpression):
    method __init__ (line 132) | def __init__(
    method _from_protobuf (line 155) | def _from_protobuf(
    method _to_protobuf (line 176) | def _to_protobuf(self) -> SymbolicExpression_pb2.SymAddrAddr:
    method __eq__ (line 184) | def __eq__(self, other: object) -> bool:
    method __hash__ (line 195) | def __hash__(self) -> int:
    method __repr__ (line 200) | def __repr__(self) -> str:
    method deep_eq (line 217) | def deep_eq(self, other: object) -> bool:
    method symbols (line 230) | def symbols(self) -> typing.Iterable[Symbol]:
  class SymAddrConst (line 235) | class SymAddrConst(SymbolicExpression):
    method __init__ (line 242) | def __init__(
    method _from_protobuf (line 259) | def _from_protobuf(
    method _to_protobuf (line 272) | def _to_protobuf(self) -> SymbolicExpression_pb2.SymAddrConst:
    method __eq__ (line 279) | def __eq__(self, other: object) -> bool:
    method __hash__ (line 288) | def __hash__(self) -> int:
    method __repr__ (line 291) | def __repr__(self) -> str:
    method deep_eq (line 304) | def deep_eq(self, other: object) -> bool:
    method symbols (line 315) | def symbols(self) -> typing.Iterable[Symbol]:

FILE: python/gtirb/util.py
  class GtirbError (line 26) | class GtirbError(Exception):
  class DeserializationError (line 30) | class DeserializationError(GtirbError):
  class _SymbolicExpressionContainer (line 34) | class _SymbolicExpressionContainer(typing_extensions.Protocol[T_cov]):
    method symbolic_expressions_at (line 37) | def symbolic_expressions_at(
  class ListWrapper (line 43) | class ListWrapper(typing.MutableSequence[T]):
    method __init__ (line 44) | def __init__(self, *args: typing.Iterable[T]):
    method _add (line 50) | def _add(self, value: T) -> None:
    method _remove (line 53) | def _remove(self, value: T) -> None:
    method __getitem__ (line 58) | def __getitem__(self, i: int) -> T:
    method __getitem__ (line 62) | def __getitem__(self, i: slice) -> typing.MutableSequence[T]:
    method __getitem__ (line 65) | def __getitem__(
    method __setitem__ (line 71) | def __setitem__(self, i: typing_extensions.SupportsIndex, v: T) -> None:
    method __setitem__ (line 75) | def __setitem__(self, i: slice, v: typing.Iterable[T]) -> None:
    method __setitem__ (line 78) | def __setitem__(
    method __delitem__ (line 102) | def __delitem__(self, i: int) -> None:
    method __delitem__ (line 106) | def __delitem__(self, i: slice) -> None:
    method __delitem__ (line 109) | def __delitem__(self, i: typing.Union[int, slice]) -> None:
    method __len__ (line 119) | def __len__(self) -> int:
    method insert (line 122) | def insert(self, i: int, v: T) -> None:
    method append (line 129) | def append(self, v: T) -> None:
    method remove (line 132) | def remove(self, v: T) -> None:
    method extend (line 137) | def extend(self, other: typing.Iterable[T]) -> None:
    method __str__ (line 142) | def __str__(self) -> str:
    method __repr__ (line 145) | def __repr__(self) -> str:
  class SetWrapper (line 159) | class SetWrapper(typing.MutableSet[T]):
    method __init__ (line 160) | def __init__(self, *args: typing.Iterable[T]):
    method __contains__ (line 167) | def __contains__(self, v: object) -> bool:
    method __iter__ (line 170) | def __iter__(self) -> typing.Iterator[T]:
    method __len__ (line 173) | def __len__(self) -> int:
    method add (line 176) | def add(self, v: T) -> None:
    method discard (line 179) | def discard(self, v: T) -> None:
    method __or__ (line 187) | def __or__(
    method __ior__ (line 200) | def __ior__(  # type: ignore
    method pop (line 207) | def pop(self) -> T:
    method clear (line 218) | def clear(self) -> None:
    method update (line 223) | def update(self, *others: typing.Iterable[T]) -> None:
    method __str__ (line 228) | def __str__(self) -> str:
    method __repr__ (line 231) | def __repr__(self) -> str:
  class DictWrapper (line 235) | class DictWrapper(typing.MutableMapping[K, V]):
    method __init__ (line 236) | def __init__(self, *args: DictLike[K, V]):
    method __getitem__ (line 245) | def __getitem__(self, i: K) -> V:
    method __setitem__ (line 248) | def __setitem__(self, i: K, v: V) -> None:
    method __delitem__ (line 251) | def __delitem__(self, i: K) -> None:
    method __iter__ (line 254) | def __iter__(self) -> typing.Iterator[K]:
    method __len__ (line 257) | def __len__(self) -> int:
    method __str__ (line 261) | def __str__(self) -> str:
    method __repr__ (line 264) | def __repr__(self) -> str:
  class IndexedContainer (line 272) | class IndexedContainer(typing_extensions.Protocol[T_contra]):
    method _index_discard (line 275) | def _index_discard(self, instance: T_contra) -> None:
    method _index_add (line 278) | def _index_add(self, instance: T_contra) -> None:
  class ParentGetter (line 282) | class ParentGetter(typing_extensions.Protocol[T_contra]):
    method __call__ (line 285) | def __call__(
  class _IndexedAttribute (line 291) | class _IndexedAttribute(typing.Generic[AttributeT]):
    class Descriptor (line 304) | class Descriptor(typing.Generic[InstanceT]):
      method __init__ (line 310) | def __init__(self, parent_getter: ParentGetter[InstanceT]):
      method __get__ (line 313) | def __get__(
      method __set__ (line 320) | def __set__(self, instance: InstanceT, value: AttributeT) -> None:
      method __delete__ (line 329) | def __delete__(self, instance: InstanceT) -> None:
      method __set_name__ (line 332) | def __set_name__(self, owner: InstanceT, name: str) -> None:
    method __call__ (line 336) | def __call__(self, parent_getter: ParentGetter[InstanceT]) -> AttributeT:
  function get_desired_range (line 351) | def get_desired_range(addrs: typing.Union[int, range]) -> range:
  class AddrRange (line 358) | class AddrRange(typing_extensions.Protocol):
    method address (line 366) | def address(self) -> typing.Optional[int]:
    method size (line 370) | def size(self) -> typing.Optional[int]:
  function nodes_on (line 379) | def nodes_on(
  function nodes_at (line 397) | def nodes_at(
  function _address_interval (line 408) | def _address_interval(
  class OffsetRange (line 426) | class OffsetRange(typing_extensions.Protocol):
    method offset (line 430) | def offset(self) -> int:
    method size (line 434) | def size(self) -> int:
  function _offset_interval (line 441) | def _offset_interval(
  function _nodes_on_interval_tree_impl (line 452) | def _nodes_on_interval_tree_impl(
  function _nodes_on_interval_tree (line 493) | def _nodes_on_interval_tree(
  function _nodes_on_interval_tree_offset (line 511) | def _nodes_on_interval_tree_offset(
  function _nodes_at_interval_tree_impl (line 526) | def _nodes_at_interval_tree_impl(
  function _nodes_at_interval_tree (line 557) | def _nodes_at_interval_tree(
  function _nodes_at_interval_tree_offset (line 575) | def _nodes_at_interval_tree_offset(
  function symbolic_expressions_at (line 590) | def symbolic_expressions_at(

FILE: python/stubs/intervaltree/interval.pyi
  class Interval (line 6) | class Interval(Generic[PointT, DataT]):
    method __init__ (line 10) | def __init__(self, begin: PointT, end: PointT, data: DataT): ...
    method length (line 11) | def length(self) -> PointT: ...

FILE: python/stubs/intervaltree/intervaltree.pyi
  class IntervalTree (line 8) | class IntervalTree(MutableSet[Interval[PointT, DataT]]):
    method __init__ (line 9) | def __init__(
    method __contains__ (line 12) | def __contains__(self, item: object) -> bool: ...
    method __iter__ (line 13) | def __iter__(self) -> Iterator[Interval[PointT, DataT]]: ...
    method __len__ (line 14) | def __len__(self) -> int: ...
    method add (line 15) | def add(self, interval: Interval[PointT, DataT]) -> None: ...
    method discard (line 16) | def discard(self, interval: Interval[PointT, DataT]) -> None: ...
    method begin (line 17) | def begin(self) -> PointT: ...
    method span (line 18) | def span(self) -> PointT: ...
    method overlap (line 20) | def overlap(
    method overlap (line 24) | def overlap(

FILE: python/stubs/networkx/classes/multidigraph.pyi
  class MultiDiGraph (line 16) | class MultiDiGraph(Generic[NodeT, KeyT, DataT]):
    method __contains__ (line 17) | def __contains__(self, n: object) -> bool: ...
    method __getitem__ (line 18) | def __getitem__(
    method add_edge (line 21) | def add_edge(
    method remove_edge (line 24) | def remove_edge(
    method number_of_edges (line 27) | def number_of_edges(
    method clear (line 30) | def clear(self) -> None: ...
    method edges (line 37) | def edges(
    method edges (line 43) | def edges(
    method out_edges (line 50) | def out_edges(
    method in_edges (line 57) | def in_edges(

FILE: python/stubs/sortedcontainers/sorteddict.pyi
  class SortedDict (line 6) | class SortedDict(MutableMapping[K, V]):
    method __delitem__ (line 7) | def __delitem__(self, key: K) -> None: ...
    method __getitem__ (line 8) | def __getitem__(self, key: K) -> V: ...
    method __iter__ (line 9) | def __iter__(self) -> Iterator[K]: ...
    method __len__ (line 10) | def __len__(self) -> int: ...
    method __setitem__ (line 11) | def __setitem__(self, key: K, value: V) -> None: ...
    method irange (line 12) | def irange(

FILE: python/tests/helpers.py
  class SearchScope (line 7) | class SearchScope(enum.Enum):
    method select (line 13) | def select(self, ir, m, s, bi):
  function parameterize_one (line 29) | def parameterize_one(name, values):
  function create_interval_etc (line 49) | def create_interval_etc(address, size):

FILE: python/tests/test_auxdata.py
  class AuxDataTest (line 7) | class AuxDataTest(unittest.TestCase):
    method setUp (line 8) | def setUp(self):
    method test_lazy (line 12) | def test_lazy(self):
    method test_lazy_never_deserialized (line 30) | def test_lazy_never_deserialized(self):

FILE: python/tests/test_block.py
  class BlockTest (line 8) | class BlockTest(unittest.TestCase):
    method test_contains_offset (line 9) | def test_contains_offset(self):
    method test_contains_address (line 14) | def test_contains_address(self):
    method test_block_references (line 22) | def test_block_references(self):

FILE: python/tests/test_blocks_at.py
  class BlocksAtTests (line 10) | class BlocksAtTests(unittest.TestCase):
    method test_blocks_at_simple (line 12) | def test_blocks_at_simple(self, scope):
    method test_blocks_at_zero (line 41) | def test_blocks_at_zero(self, scope):
    method test_blocks_at_overlapping (line 51) | def test_blocks_at_overlapping(self, scope):
    method test_blocks_at_zero_sized (line 64) | def test_blocks_at_zero_sized(self, scope):
    method test_blocks_at_range (line 78) | def test_blocks_at_range(self, scope):
    method test_blocks_at_no_address (line 99) | def test_blocks_at_no_address(self, scope):
    method test_code_blocks_at (line 111) | def test_code_blocks_at(self, scope):
    method test_data_blocks_at (line 123) | def test_data_blocks_at(self, scope):
  class SectionBlocksAtTests (line 135) | class SectionBlocksAtTests(unittest.TestCase):
    method test_blocks_at_simple (line 136) | def test_blocks_at_simple(self):
    method test_blocks_at_overlapping (line 150) | def test_blocks_at_overlapping(self):
    method test_blocks_on_with_blocks_outside_bi (line 165) | def test_blocks_on_with_blocks_outside_bi(self):

FILE: python/tests/test_blocks_at_offset.py
  class BlocksAtOffsetTests (line 10) | class BlocksAtOffsetTests(unittest.TestCase):
    method test_blocks_at_offset_simple (line 11) | def test_blocks_at_offset_simple(self):
    method test_blocks_at_offset_overlapping (line 42) | def test_blocks_at_offset_overlapping(self):
    method test_blocks_at_offset_zero_sized (line 53) | def test_blocks_at_offset_zero_sized(self):
    method test_blocks_at_offset_range (line 64) | def test_blocks_at_offset_range(self):
    method test_code_blocks_at_offset (line 83) | def test_code_blocks_at_offset(self):
    method test_data_blocks_at_offset (line 93) | def test_data_blocks_at_offset(self):

FILE: python/tests/test_blocks_on.py
  class BlocksOnTests (line 8) | class BlocksOnTests(unittest.TestCase):
    method test_blocks_on_simple (line 10) | def test_blocks_on_simple(self, scope):
    method test_blocks_on_zero (line 42) | def test_blocks_on_zero(self, scope):
    method test_blocks_on_with_overlapping_blocks (line 52) | def test_blocks_on_with_overlapping_blocks(self, scope):
    method test_blocks_on_with_zero_sized_blocks (line 65) | def test_blocks_on_with_zero_sized_blocks(self, scope):
    method test_blocks_on_with_range (line 81) | def test_blocks_on_with_range(self, scope):
    method test_blocks_on_with_no_address (line 102) | def test_blocks_on_with_no_address(self, scope):
    method test_code_blocks_on (line 115) | def test_code_blocks_on(self, scope):
    method test_data_blocks_on (line 127) | def test_data_blocks_on(self, scope):
  class SectionBlocksOnTests (line 139) | class SectionBlocksOnTests(unittest.TestCase):
    method test_blocks_on_simple (line 140) | def test_blocks_on_simple(self):
    method test_blocks_on_overlapping (line 154) | def test_blocks_on_overlapping(self):
    method test_blocks_on_with_blocks_outside_bi (line 169) | def test_blocks_on_with_blocks_outside_bi(self):

FILE: python/tests/test_blocks_on_offset.py
  class BlocksOnOffsetTests (line 8) | class BlocksOnOffsetTests(unittest.TestCase):
    method test_blocks_on_offset_simple (line 9) | def test_blocks_on_offset_simple(self):
    method test_blocks_on_offset_zero (line 39) | def test_blocks_on_offset_zero(self):
    method test_blocks_on_offset_with_overlapping_blocks (line 47) | def test_blocks_on_offset_with_overlapping_blocks(self):
    method test_blocks_on_offset_with_zero_sized_blocks (line 61) | def test_blocks_on_offset_with_zero_sized_blocks(self):
    method test_blocks_on_offset_with_range (line 75) | def test_blocks_on_offset_with_range(self):
    method test_code_blocks_on_offset (line 94) | def test_code_blocks_on_offset(self):
    method test_data_blocks_on_offset (line 104) | def test_data_blocks_on_offset(self):

FILE: python/tests/test_byte_intervals_at.py
  class ByteIntervalsAtTests (line 8) | class ByteIntervalsAtTests(unittest.TestCase):
    method test_byte_intervals_at (line 12) | def test_byte_intervals_at(self, scope):

FILE: python/tests/test_byte_intervals_on.py
  class ByteIntervalsOnTests (line 8) | class ByteIntervalsOnTests(unittest.TestCase):
    method test_byte_intervals_on (line 12) | def test_byte_intervals_on(self, scope):
    method test_byte_intervals_overlapping (line 56) | def test_byte_intervals_overlapping(self, scope):

FILE: python/tests/test_cfg.py
  class CFGTest (line 6) | class CFGTest(unittest.TestCase):
    method test_contains (line 7) | def test_contains(self):
    method test_add (line 23) | def test_add(self):
    method test_clear (line 35) | def test_clear(self):
    method test_discard (line 50) | def test_discard(self):
    method test_out_edges (line 70) | def test_out_edges(self):
    method test_in_edges (line 87) | def test_in_edges(self):
    method test_nx (line 104) | def test_nx(self):

FILE: python/tests/test_deep_eq.py
  class DeepEqTest (line 7) | class DeepEqTest(unittest.TestCase):
    method test_code_block (line 8) | def test_code_block(self):
    method test_data_block (line 28) | def test_data_block(self):
    method test_proxy_blocks (line 45) | def test_proxy_blocks(self):
    method test_symbol (line 56) | def test_symbol(self):
    method test_sym_exprs (line 104) | def test_sym_exprs(self):
    method test_byte_intervals (line 236) | def test_byte_intervals(self):
    method test_sections (line 456) | def test_sections(self):
    method test_cfg (line 549) | def test_cfg(self):
    method test_module (line 672) | def test_module(self):
    method test_ir (line 1048) | def test_ir(self):

FILE: python/tests/test_ir.py
  class IRTest (line 14) | class IRTest(unittest.TestCase):
    method __init__ (line 15) | def __init__(self, *args, **kwargs):
    method setUp (line 69) | def setUp(self):
    method tearDown (line 72) | def tearDown(self):
    method test_ir_protobuf_load (line 75) | def test_ir_protobuf_load(self):
    method test_load_pathlib (line 83) | def test_load_pathlib(self):
  class NotGTIRBTest (line 97) | class NotGTIRBTest(unittest.TestCase):
    method test (line 98) | def test(self):
  class BadVersionTest (line 109) | class BadVersionTest(unittest.TestCase):
    method test (line 110) | def test(self):
  class BadProtobufTest (line 120) | class BadProtobufTest(unittest.TestCase):
    method test (line 121) | def test(self):
  class IRMethodTests (line 130) | class IRMethodTests(unittest.TestCase):
    method test_modules_named (line 131) | def test_modules_named(self):

FILE: python/tests/test_module.py
  class ModuleTests (line 6) | class ModuleTests(unittest.TestCase):
    method test_symbols_named (line 7) | def test_symbols_named(self):

FILE: python/tests/test_node_from_uuid.py
  class NodeFromUUIDTest (line 7) | class NodeFromUUIDTest(unittest.TestCase):
    method test_get_by_uuid_failed (line 8) | def test_get_by_uuid_failed(self):
    method test_get_by_uuid (line 13) | def test_get_by_uuid(self):
    method test_remove_from_cache (line 88) | def test_remove_from_cache(self):

FILE: python/tests/test_properties.py
  class TestProperties (line 6) | class TestProperties(unittest.TestCase):
    method test_data_blocks (line 7) | def test_data_blocks(self):
    method test_code_blocks (line 36) | def test_code_blocks(self):
    method test_proxy_blocks (line 92) | def test_proxy_blocks(self):
    method test_sections (line 129) | def test_sections(self):
    method test_modules (line 165) | def test_modules(self):
    method test_byte_intervals (line 212) | def test_byte_intervals(self):
    method test_sym_exprs (line 242) | def test_sym_exprs(self):

FILE: python/tests/test_repr.py
  class ReprTest (line 12) | class ReprTest(unittest.TestCase):
    method test_auxdata (line 13) | def test_auxdata(self):
    method test_block (line 28) | def test_block(self):
    method test_proxy_block (line 36) | def test_proxy_block(self):
    method test_data_object (line 42) | def test_data_object(self):
    method test_ir (line 48) | def test_ir(self):
    method test_cfg (line 55) | def test_cfg(self):
    method test_module (line 83) | def test_module(self):
    method test_offset (line 90) | def test_offset(self):
    method test_section (line 97) | def test_section(self):
    method test_symbol (line 106) | def test_symbol(self):
    method test_sym_expr (line 122) | def test_sym_expr(self):
    method test_byte_interval (line 146) | def test_byte_interval(self):

FILE: python/tests/test_section.py
  class SectionTests (line 6) | class SectionTests(unittest.TestCase):
    method test_byte_blocks (line 7) | def test_byte_blocks(self):

FILE: python/tests/test_serialization.py
  class TestSerialization (line 8) | class TestSerialization(unittest.TestCase):
    method test_parse_type (line 9) | def test_parse_type(self):
    method test_unknown_codec (line 60) | def test_unknown_codec(self):
    method test_nested_unknown_codec (line 69) | def test_nested_unknown_codec(self):
    method test_uuid_codec (line 91) | def test_uuid_codec(self):
    method test_variant_codec (line 159) | def test_variant_codec(self):
    method _check_val (line 214) | def _check_val(self, typename, val):
    method test_int_serializers (line 220) | def test_int_serializers(self):
    method test_float_serializers (line 236) | def test_float_serializers(self):

FILE: python/tests/test_symbolic_expression.py
  class SymbolicExpressionAttributes (line 9) | class SymbolicExpressionAttributes(unittest.TestCase):
    method test_unknown_attributes (line 10) | def test_unknown_attributes(self):

FILE: python/tests/test_symbolic_expressions_at.py
  class SymbolicExpressionsAtTests (line 8) | class SymbolicExpressionsAtTests(unittest.TestCase):
    method test_symbolic_expressions_at (line 10) | def test_symbolic_expressions_at(self, scope):

FILE: python/tests/test_wrapper.py
  class RecordingList (line 6) | class RecordingList(gtirb.util.ListWrapper):
    method __init__ (line 7) | def __init__(self, *args):
    method _add (line 11) | def _add(self, value):
    method _remove (line 14) | def _remove(self, value):
  class ListWrapperTests (line 18) | class ListWrapperTests(unittest.TestCase):
    method test_empty_init (line 19) | def test_empty_init(self):
    method test_values_init (line 23) | def test_values_init(self):
    method test_getitem_int (line 29) | def test_getitem_int(self):
    method test_getitem_slice (line 35) | def test_getitem_slice(self):
    method test_setitem_int (line 41) | def test_setitem_int(self):
    method test_setitem_slice (line 56) | def test_setitem_slice(self):
    method test_delitem_int (line 72) | def test_delitem_int(self):
    method test_delitem_slice (line 80) | def test_delitem_slice(self):
    method test_len (line 95) | def test_len(self):
    method test_insert (line 99) | def test_insert(self):
    method test_append (line 107) | def test_append(self):
    method test_remove (line 115) | def test_remove(self):
    method test_extend (line 123) | def test_extend(self):
    method test_str (line 129) | def test_str(self):

FILE: src/AuxData.cpp
  type gtirb (line 18) | namespace gtirb {

FILE: src/AuxDataContainer.cpp
  type gtirb (line 24) | namespace gtirb {
    type AuxDataTypeMap (line 26) | struct AuxDataTypeMap {

FILE: src/ByteInterval.cpp
  class ByteInterval::CodeBlockObserverImpl (line 29) | class ByteInterval::CodeBlockObserverImpl : public CodeBlockObserver {
    method CodeBlockObserverImpl (line 31) | CodeBlockObserverImpl(ByteInterval* BI_) : BI(BI_) {}
  class ByteInterval::DataBlockObserverImpl (line 43) | class ByteInterval::DataBlockObserverImpl : public DataBlockObserver {
    method DataBlockObserverImpl (line 45) | DataBlockObserverImpl(ByteInterval* BI_) : BI(BI_) {}
  function ByteInterval (line 187) | ByteInterval* ByteInterval::load(Context& C, std::istream& In) {
  function ChangeStatus (line 235) | static inline ChangeStatus removeBlocks(ByteIntervalObserver* Observer,
  function ChangeStatus (line 241) | static inline ChangeStatus removeBlocks(ByteIntervalObserver* Observer,
  function ChangeStatus (line 248) | ChangeStatus ByteInterval::removeBlock(BlockType* B) {
  function ChangeStatus (line 275) | ChangeStatus ByteInterval::removeBlock(CodeBlock* B) {
  function ChangeStatus (line 279) | ChangeStatus ByteInterval::removeBlock(DataBlock* B) {
  function CodeBlockObserver (line 283) | static inline CodeBlockObserver* getObserver(CodeBlock*, CodeBlockObserv...
  function DataBlockObserver (line 288) | static inline DataBlockObserver* getObserver(DataBlock*, CodeBlockObserv...
  function ChangeStatus (line 293) | static inline ChangeStatus addBlocks(ByteIntervalObserver* Observer,
  function ChangeStatus (line 299) | static inline ChangeStatus addBlocks(ByteIntervalObserver* Observer,
  function ChangeStatus (line 305) | static inline ChangeStatus moveBlocks(ByteIntervalObserver* Observer,
  function ChangeStatus (line 311) | static inline ChangeStatus moveBlocks(ByteIntervalObserver* Observer,
  function ChangeStatus (line 318) | ChangeStatus ByteInterval::addBlock(uint64_t Off, BlockType* B) {
  function ChangeStatus (line 388) | ChangeStatus ByteInterval::addBlock(uint64_t Off, CodeBlock* B) {
  function ChangeStatus (line 392) | ChangeStatus ByteInterval::addBlock(uint64_t Off, DataBlock* B) {
  function ChangeStatus (line 396) | ChangeStatus ByteInterval::CodeBlockObserverImpl::sizeChange(CodeBlock* B,
  function ChangeStatus (line 402) | ChangeStatus ByteInterval::CodeBlockObserverImpl::decodeModeChange(
  function ChangeStatus (line 407) | ChangeStatus ByteInterval::DataBlockObserverImpl::sizeChange(DataBlock* B,
  function ChangeStatus (line 437) | ChangeStatus ByteInterval::sizeChange(Node* N, uint64_t OldSize,
  function ChangeStatus (line 444) | ChangeStatus ByteInterval::decodeModeChange(CodeBlock* B, DecodeMode,

FILE: src/CFG.cpp
  type gtirb (line 22) | namespace gtirb {
    function GTIRB_EXPORT_API (line 23) | GTIRB_EXPORT_API std::ostream& operator<<(std::ostream& OS,
    function GTIRB_EXPORT_API (line 36) | GTIRB_EXPORT_API std::ostream& operator<<(std::ostream& OS,
    function GTIRB_EXPORT_API (line 61) | GTIRB_EXPORT_API std::ostream& operator<<(std::ostream& OS,
    function GTIRB_EXPORT_API (line 74) | GTIRB_EXPORT_API std::ostream& operator<<(std::ostream& OS,
    function addVertex (line 87) | std::pair<CFG::vertex_descriptor, bool> addVertex(CfgNode* B, CFG& Cfg) {
    function removeVertex (line 99) | bool removeVertex(CfgNode* N, CFG& Cfg) {
    function getVertex (line 110) | std::optional<CFG::vertex_descriptor> getVertex(const CfgNode* N,
    function addEdge (line 119) | std::optional<CFG::edge_de
Condensed preview — 357 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (2,448K chars).
[
  {
    "path": ".ci/Dockerfile.static",
    "chars": 974,
    "preview": "FROM ubuntu:20.04\n\nARG BOOST_VERSION=1_68_0\n\nSHELL [\"/bin/bash\", \"-c\"]\n\n# Install apt packages\nRUN export DEBIAN_FRONTEN"
  },
  {
    "path": ".ci/Dockerfile.ubuntu20",
    "chars": 1403,
    "preview": "FROM ubuntu:20.04\n\n# Install apt packages\nENV VIRTUAL_ENV=/opt/venv\nENV PATH=\"$VIRTUAL_ENV/bin:$PATH\"\nRUN apt-get -y upd"
  },
  {
    "path": ".ci/Dockerfile.ubuntu22",
    "chars": 897,
    "preview": "FROM ubuntu:22.04\n\nENV VIRTUAL_ENV=/opt/venv\nENV PATH=\"$VIRTUAL_ENV/bin:$PATH\"\nRUN apt-get -y update && \\\n    DEBIAN_FRO"
  },
  {
    "path": ".ci/Dockerfile.ubuntu24",
    "chars": 1110,
    "preview": "FROM ubuntu:24.04\n\nENV VIRTUAL_ENV=/opt/venv\nENV PATH=\"$VIRTUAL_ENV/bin:$PATH\"\nRUN apt-get -y update && \\\n    DEBIAN_FRO"
  },
  {
    "path": ".ci/PKGBUILD",
    "chars": 1041,
    "preview": "# Contributor: Eric Schulte <eschulte@grammatech.com>\n# Maintainer: Eric Schulte <eschulte@grammatech.com>\n_srcname=gtir"
  },
  {
    "path": ".ci/adjust-coverage-paths.py",
    "chars": 1821,
    "preview": "#!/usr/bin/env python3\n\nimport os\nfrom argparse import ArgumentParser\nfrom pathlib import Path\nfrom xml.etree import Ele"
  },
  {
    "path": ".ci/build.py",
    "chars": 862,
    "preview": "#!/usr/bin/env python\nimport subprocess\nimport sys\n\nimport conanfile\n\n\ndef run_conan(args):\n    cmd = [\"conan\"] + args\n "
  },
  {
    "path": ".ci/gitlab-ci.yml",
    "chars": 25199,
    "preview": "variables:\n  # The IMAGE_TAG is derived from the branch name so that if a branch modifies\n  # the CI images, it builds a"
  },
  {
    "path": ".ci/pre-commit",
    "chars": 244,
    "preview": "#!/bin/bash\nOUTPUT=$(git clang-format --diff)\nif [ \"${OUTPUT}\" == \"no modified files to format\" ] ||\n   [ \"${OUTPUT}\" =="
  },
  {
    "path": ".ci/test-install-all.sh",
    "chars": 300,
    "preview": "#!/bin/sh -e\n\nset -o xtrace\nset -o nounset\nset -o errexit\n\nbuilddir=$(pwd)\nworkdir=`mktemp -d`\ntrap 'cd / ; rm -rf $work"
  },
  {
    "path": ".ci/test-install-static.sh",
    "chars": 350,
    "preview": "#!/bin/sh -e\n\nset -o xtrace\nset -o nounset\nset -o errexit\n\nbuilddir=$(pwd)\nworkdir=`mktemp -d`\ntrap 'cd / ; rm -rf $work"
  },
  {
    "path": ".ci/test-install.cpp",
    "chars": 477,
    "preview": "#include <gtirb/gtirb.hpp>\n#include <cstdio>\n#include <fstream>\n\nint main() {\n  auto filename = std::tmpnam(nullptr);\n  "
  },
  {
    "path": ".ci/test-install.lisp",
    "chars": 540,
    "preview": "(in-package :gtirb)\n\n(uiop/stream:with-temporary-file (:pathname path :keep nil)\n  (let ((it (make-instance 'gtirb))\n   "
  },
  {
    "path": ".ci/test-install.py",
    "chars": 178,
    "preview": "import sys\nimport tempfile\n\nimport gtirb\n\nfilename = tempfile.mktemp()\nir = gtirb.IR()\nir.save_protobuf(filename)\nir = g"
  },
  {
    "path": ".ci/test-interop.sh",
    "chars": 938,
    "preview": "#!/bin/bash\nset -e\ncd build\n\nfailures=0\n\ncheck() {\n    local creator=$1\n    local auxdata=$2\n    local consumer=$3\n    s"
  },
  {
    "path": ".clang-format",
    "chars": 2897,
    "preview": "---\nLanguage:        Cpp\n# BasedOnStyle:  LLVM\nAccessModifierOffset: -2\nAlignAfterOpenBracket: Align\nAlignConsecutiveAss"
  },
  {
    "path": ".clang-tidy",
    "chars": 314,
    "preview": "---\nChecks:          '-*,clang-analyzer-*,bugprone*,modernize*,performance*,-modernize-pass-by-value,-modernize-use-auto"
  },
  {
    "path": ".cmake-format.yaml",
    "chars": 389,
    "preview": "# disable splitting of arguments based on the sheer number of them;\n# prefer to split by line length\nmax_subargs_per_lin"
  },
  {
    "path": ".dockerignore",
    "chars": 11,
    "preview": ".git/\n.ci/\n"
  },
  {
    "path": ".flake8",
    "chars": 561,
    "preview": "# Black feels free to violate some rules because they're PEP8 extensions and\n# not PEP8 itself. So we must ignore:\n#   E"
  },
  {
    "path": ".github/workflows/actions.yml",
    "chars": 3177,
    "preview": "name: GTIRB Docs\non: [push]\n\njobs:\n  docker:\n    runs-on: ubuntu-latest\n    permissions:\n      packages: write\n    strat"
  },
  {
    "path": ".gitignore",
    "chars": 419,
    "preview": "*~\n*.fasl\n*.o\n*.out\n*.pc\nout.gtir\nCMakeCache.txt\nCMakeFiles\nCMakeScripts\nTesting\nMakefile\ncmake_install.cmake\ninstall_ma"
  },
  {
    "path": ".gtirb.tex",
    "chars": 3091,
    "preview": "\\begin{tikzpicture}%% Caption: GrammaTech IR for Binaries is a data structure that implicitly represents binary structur"
  },
  {
    "path": ".isort.cfg",
    "chars": 329,
    "preview": "# Settings are chosen to be compatible with black:\n#   https://black.readthedocs.io/en/stable/the_black_code_style.html#"
  },
  {
    "path": ".lisp-format",
    "chars": 4028,
    "preview": ";;;; -*- emacs-lisp -*-\n;;;;\n;;;; For information about how to use lisp-format see it's\n;;;; documentation, which is ava"
  },
  {
    "path": ".pre-commit-config.yaml",
    "chars": 1253,
    "preview": "repos:\n  - repo: https://github.com/psf/black\n    rev: 22.3.0\n    hooks:\n      - id: black\n        args: [\"--line-length"
  },
  {
    "path": "AlignOf.cmake",
    "chars": 1428,
    "preview": "macro(ALIGNOF TYPE LANG NAME)\n  if(NOT ALIGNOF_${NAME})\n    #\n    # Try to compile and run a foo grogram. The alignment "
  },
  {
    "path": "AuxData.md",
    "chars": 35374,
    "preview": "Standard AuxData Schemata\n=========================\n\nThe \\ref AUXDATA_GROUP class provides generic storage for\napplicati"
  },
  {
    "path": "CHANGELOG.md",
    "chars": 13141,
    "preview": "# 2.3.2 (Unreleased)\n\n# 2.3.1\n\n* Fix auxdata table `elfSectionProperties` to `sectionProperties` in the java api\n  to ma"
  },
  {
    "path": "CMakeLists.googletest",
    "chars": 394,
    "preview": "cmake_minimum_required(VERSION 2.8.2)\n\nproject(googletest-download NONE)\n\ninclude(ExternalProject)\nexternalproject_add(\n"
  },
  {
    "path": "CMakeLists.txt",
    "chars": 20282,
    "preview": "#\n# Cmake Configuration\n#\n\n# Need 3.10 to support CXX_STANDARD=17 and protobuf::protoc\ncmake_minimum_required(VERSION 3."
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "chars": 3379,
    "preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, w"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 11773,
    "preview": "Contributing\n============\n\n\n## Code of Conduct\n\nPlease read the [GTIRB Code of Conduct](CODE_OF_CONDUCT.md).\n\n## General"
  },
  {
    "path": "FAQ.md",
    "chars": 1309,
    "preview": "Frequently Asked Questions\n--------------------------\n\n- [I get compiler errors when I try to compile programs using GTI"
  },
  {
    "path": "LICENSE.txt",
    "chars": 16326,
    "preview": "==============================================================================\nGTIRB is under the MIT License:\n========="
  },
  {
    "path": "Macros.cmake",
    "chars": 3206,
    "preview": "macro(IMPL_GTIRB_ADD_LINKER_FLAG flag)\n  if(NOT ${CMAKE_EXE_LINKER_FLAGS} MATCHES \"(${flag}.*)\")\n    set(CMAKE_EXE_LINKE"
  },
  {
    "path": "PROTOBUF.md",
    "chars": 5437,
    "preview": "Using Serialized GTIRB Data\n===========================\n\n> Note that for language with GTIRB APIs (at least C++, Python,"
  },
  {
    "path": "README.md",
    "chars": 10090,
    "preview": "# GTIRB\n\nThe GrammaTech Intermediate Representation for Binaries (GTIRB) is a\nmachine code analysis and rewriting data s"
  },
  {
    "path": "cl/CMakeLists.txt",
    "chars": 1725,
    "preview": "file(GLOB CL_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.lisp\n     ${CMAKE_CURRENT_SOURCE_DIR}/*.asd\n)\n\nset(CL_EXECUTABLE_STEM"
  },
  {
    "path": "cl/README.md",
    "chars": 4281,
    "preview": "Common Lisp library for GTIRB\n=============================\n\nThe Common Lisp API for GrammaTech's IR for Binaries (GTIRB"
  },
  {
    "path": "cl/dot.lisp",
    "chars": 1634,
    "preview": "(defpackage :gtirb/dot\n  (:use :common-lisp :alexandria :graph :graph/dot :gtirb\n        :command-line-arguments\n       "
  },
  {
    "path": "cl/gtirb.asd",
    "chars": 3802,
    "preview": "(defsystem \"gtirb\"\n    :name \"gtirb\"\n    :author \"GrammaTech\"\n    :licence \"MIT\"\n    :description \"Common Lisp library f"
  },
  {
    "path": "cl/gtirb.lisp",
    "chars": 70640,
    "preview": "(defpackage :gtirb/gtirb\n  (:nicknames :gtirb)\n  (:use :common-lisp :alexandria :cl-ppcre :graph :trivia\n        :trivia"
  },
  {
    "path": "cl/package.lisp",
    "chars": 49,
    "preview": "(defpackage :gtirb\n  (use-package :common-lisp))\n"
  },
  {
    "path": "cl/ranged.lisp",
    "chars": 1356,
    "preview": "(defpackage :gtirb/ranged\n  (:use :common-lisp)\n  (:import-from :interval)\n  (:export :make-ranged\n           :ranged-in"
  },
  {
    "path": "cl/test.lisp",
    "chars": 25114,
    "preview": "(defpackage :gtirb/test\n  (:use :common-lisp\n        :alexandria\n        :flexi-streams\n        :stefil\n        :gtirb\n "
  },
  {
    "path": "cl/update.lisp",
    "chars": 16673,
    "preview": "(defpackage :gtirb/update\n  (:use :common-lisp\n        :alexandria\n        :gtirb/utility\n        :named-readtables\n    "
  },
  {
    "path": "cl/utility.lisp",
    "chars": 4239,
    "preview": "(defpackage :gtirb/utility\n  (:use :common-lisp\n        :gtirb/version)\n  (:import-from :cl-intbytes\n                :in"
  },
  {
    "path": "cl/validate.lisp",
    "chars": 5072,
    "preview": "(defpackage :gtirb/validate\n  (:use :gt/full :gtirb :graph :command-line-arguments)\n  (:import-from :gtirb.proto)\n  (:sh"
  },
  {
    "path": "cl/version.lisp",
    "chars": 1286,
    "preview": "(defpackage :gtirb/version\n  (:use :common-lisp)\n  (:import-from :alexandria\n                :define-constant)\n  (:impor"
  },
  {
    "path": "conanfile.py",
    "chars": 5618,
    "preview": "import os\nimport re\n\nfrom conans import CMake, ConanFile, tools\nfrom conans.errors import ConanInvalidConfiguration\nfrom"
  },
  {
    "path": "cpack-config.cmake",
    "chars": 1876,
    "preview": "# Global properties\nset(CMAKE_PROJECT_HOMEPAGE_URL https://github.com/GrammaTech/gtirb)\nset(CPACK_COMPONENTS_GROUPING AL"
  },
  {
    "path": "doc/CFG-Edges.md",
    "chars": 3279,
    "preview": "Advice on when to Place ICFG Edges\n==================================\n\nIt is not always straightforward when to construc"
  },
  {
    "path": "doc/CMakeLists.txt",
    "chars": 940,
    "preview": "add_custom_target(doc)\nfile(MAKE_DIRECTORY \"${CMAKE_CURRENT_BINARY_DIR}/html\")\n\nif(CXX_API)\n  set(CPP_TAGFILE \"${CMAKE_C"
  },
  {
    "path": "doc/binary-representation.md",
    "chars": 5636,
    "preview": "Binary Representation with GTIRB\n================================\n\n- [Representing Binaries](#representing-binaries)\n   "
  },
  {
    "path": "doc/cl/CMakeLists.txt",
    "chars": 863,
    "preview": "set(SDT_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/write-documentation.lisp)\nset(README ${CMAKE_SOURCE_DIR}/cl/README.md)\nset(HT"
  },
  {
    "path": "doc/cl/write-documentation.lisp",
    "chars": 1265,
    "preview": ";; -*- lisp -*-\n;;\n;; Usage: write-documentation PKG ABSTRACT OUTPUT-HTML\n;;   Write the automatically generated documen"
  },
  {
    "path": "doc/cpp/CMakeLists.txt",
    "chars": 3456,
    "preview": "# based on sample in https://majewsky.wordpress.com/2010/08/14/tip-of-the-day-\n# cmake-and-doxygen/ add a target to gene"
  },
  {
    "path": "doc/cpp/Doxyfile.in",
    "chars": 108261,
    "preview": "# Doxyfile 1.8.11\n\n# This file describes the settings to be used by the documentation system\n# doxygen (www.doxygen.org)"
  },
  {
    "path": "doc/cpp/DoxygenLayout.xml",
    "chars": 6094,
    "preview": "<doxygenlayout version=\"1.0\">\n  <!-- Customized for gtirb C++ API based on doxygen 1.8.14 -->\n  <!-- Navigation index ta"
  },
  {
    "path": "doc/cpp/README.md",
    "chars": 3238,
    "preview": "# Using the C++ Library\n\nWe have provided several C++ examples in directory\n`gtirb/doc/examples`. See the [Examples page"
  },
  {
    "path": "doc/dot/gtirb.dot",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "doc/examples/CMakeLists.txt",
    "chars": 3264,
    "preview": "if(CL_API)\n  list(APPEND EXAMPLE_FILES_IN \"${CMAKE_CURRENT_SOURCE_DIR}/cfg-paths.lisp\"\n              \"${CMAKE_CURRENT_SO"
  },
  {
    "path": "doc/examples/api-walkthrough.cpp",
    "chars": 7504,
    "preview": "#include <gtirb/gtirb.hpp>\n#include <boost/uuid/uuid_io.hpp>\n#include <fstream>\n#include <iostream>\n\nusing namespace gti"
  },
  {
    "path": "doc/examples/cfg-paths.cpp",
    "chars": 3162,
    "preview": "// An example program which opens an IR and prints every control-flow path\n// from some basic block to another basic blo"
  },
  {
    "path": "doc/examples/cfg-paths.lisp",
    "chars": 1260,
    "preview": ";;;; cfg-paths.lisp --- Print the shortest path between two blocks\n;;;\n;;; To run this example, do the following.\n;;;\n;;"
  },
  {
    "path": "doc/examples/cfg-paths.py",
    "chars": 1093,
    "preview": "#!/usr/bin/python\n#\n# An example program which opens an IR and prints all paths between\n# two blocks.\n#\n# To run this ex"
  },
  {
    "path": "doc/examples/cfgpaths.java",
    "chars": 8404,
    "preview": "// An example program which opens an IR and prints every control-flow\n// path from some basic block to another basic blo"
  },
  {
    "path": "doc/examples/data-symbols.cpp",
    "chars": 1208,
    "preview": "// An example program which opens an IR and prints information about all\n// symbols pointing to data.\n\n#include <gtirb/g"
  },
  {
    "path": "doc/examples/data-symbols.lisp",
    "chars": 963,
    "preview": ";;;; data-symbols.lisp --- Print the names of all symbols pointing to data\n;;;\n;;; To run this example, do the following"
  },
  {
    "path": "doc/examples/data-symbols.py",
    "chars": 834,
    "preview": "#!/usr/bin/python\n#\n# An example program which opens an IR and prints information about all\n# symbols pointing to data.\n"
  },
  {
    "path": "doc/examples/datasymbols.java",
    "chars": 3770,
    "preview": "// An example program which opens an IR and prints information about all\n// symbols pointing to data.\n//\n// To run this "
  },
  {
    "path": "doc/examples/functions.cpp",
    "chars": 2519,
    "preview": "// An example program which opens and IR and prints information about\n// functions.\n\n#include <gtirb/gtirb.hpp>\n#include"
  },
  {
    "path": "doc/examples/jumps.cpp",
    "chars": 2118,
    "preview": "// An example program which opens an IR and prints information about every\n// jump instruction.\n\n#include <gtirb/gtirb.h"
  },
  {
    "path": "doc/examples/show-cfg.lisp",
    "chars": 644,
    "preview": ";;;; show-cfg.lisp --- An example program which opens an IR and draws the CFG\n;;;\n;;; To run this example, do the follow"
  },
  {
    "path": "doc/examples/show-cfg.py",
    "chars": 1052,
    "preview": "#!/usr/bin/python\n#\n# An example program which opens an IR and draws the CFG to the screen.\n#\n# To run this example, do "
  },
  {
    "path": "doc/examples/stack-stamp.md",
    "chars": 17500,
    "preview": "GTIRB Stack Stamp\n=================\n\nTLDR; It is very easy to write binary transforms in GTIRB, see\n[gtirb-stack-stamp]("
  },
  {
    "path": "doc/general/AuxDataContainer.md",
    "chars": 3441,
    "preview": "AuxDataContainer\n================\n\nAn AuxDataContainer object provides functionality for associating\n[auxiliary data](.."
  },
  {
    "path": "doc/general/Block.md",
    "chars": 794,
    "preview": "Block\n============\n\n**Block** represents a base class for blocks. [Symbol](Symbol.md)\nobjects may have references to any"
  },
  {
    "path": "doc/general/ByteBlock.md",
    "chars": 3200,
    "preview": "ByteBlock\n====================\n\n**ByteBlock** is the base class for blocks that belong to a\n[ByteInterval](ByteInterval."
  },
  {
    "path": "doc/general/ByteInterval.md",
    "chars": 9523,
    "preview": "ByteInterval\n====================\n\nA **ByteInterval** represents a named section of a binary.\n\nThe corresponding Protobu"
  },
  {
    "path": "doc/general/CFG.md",
    "chars": 1106,
    "preview": "CFG\n====================\n\nA **CFG** represents the interprocedural control flow graph.\n\nThe corresponding Protobuf messa"
  },
  {
    "path": "doc/general/CMakeLists.txt",
    "chars": 5314,
    "preview": "# based on sample in https://majewsky.wordpress.com/2010/08/14/tip-of-the-day-\n# cmake-and-doxygen/ add a target to gene"
  },
  {
    "path": "doc/general/COMPONENTS.md",
    "chars": 3009,
    "preview": "GTIRB Components\n================\n\nThe pages in this section serve two purposes.\n\n* A language-agnostic description of t"
  },
  {
    "path": "doc/general/CfgEdge.md",
    "chars": 1048,
    "preview": "CfgEdge\n====================\n\nA **CfgEdge** represents an edge in the interprocedural\n[control flow graph](CFG.md) (CFG)"
  },
  {
    "path": "doc/general/CfgEdgeLabel.md",
    "chars": 2314,
    "preview": "CfgEdgeLabel\n====================\n\nA **CfgEdgeLabel** represents the optional label on an edge\n([CfgEdge](CfgEdge.md)) i"
  },
  {
    "path": "doc/general/CfgNode.md",
    "chars": 843,
    "preview": "CfgNode\n====================\n\n**CfgNode** represents a base class for blocks that may appear as\nvertices in the control "
  },
  {
    "path": "doc/general/CodeBlock.md",
    "chars": 1260,
    "preview": "CodeBlock\n====================\n\nA **CodeBlock** represents a basic block in the binary.\n\nThe corresponding Protobuf mess"
  },
  {
    "path": "doc/general/DataBlock.md",
    "chars": 660,
    "preview": "DataBlock\n====================\n\nA **DataBlock** represents a data object, possibly symbolic.\n\nThe corresponding Protobuf"
  },
  {
    "path": "doc/general/Doxyfile.in",
    "chars": 108887,
    "preview": "# Doxyfile 1.8.11\n\n# This file describes the settings to be used by the documentation system\n# doxygen (www.doxygen.org)"
  },
  {
    "path": "doc/general/DoxygenLayout.xml",
    "chars": 7154,
    "preview": "<doxygenlayout version=\"1.0\">\n  <!-- Customized for gtirb main based on doxygen 1.8.14 -->\n  <!-- Navigation index tabs "
  },
  {
    "path": "doc/general/IR.md",
    "chars": 3689,
    "preview": "IR\n==========\n\n**IR** describes the *internal representation* of a software artifact.\n\nThe corresponding Protobuf messag"
  },
  {
    "path": "doc/general/Module.md",
    "chars": 8074,
    "preview": "Module\n=======\n\nA **Module** represents a single binary (library or executable).\n\nThe corresponding Protobuf message typ"
  },
  {
    "path": "doc/general/Node.md",
    "chars": 1100,
    "preview": "Node\n==========\n\n**Node** is the root class for many [GTIRB components](COMPONENTS.md).\n\n\nGuaranteed Properties\n--------"
  },
  {
    "path": "doc/general/ProxyBlock.md",
    "chars": 2005,
    "preview": "ProxyBlock\n====================\n\nA **ProxyBlock** is a placeholder that serves as the endpoint (source\nor target) of a ["
  },
  {
    "path": "doc/general/Section.md",
    "chars": 4181,
    "preview": "Section\n==========\n\nA **Section** represents a named section of a binary.\n\nThe corresponding Protobuf message type is `S"
  },
  {
    "path": "doc/general/SymAddrAddr.md",
    "chars": 2919,
    "preview": "SymAddrAddr\n====================\n\nA **SymAddrAddr** represents a symbolic operand of the form \"(Sym1 -\nSym2) / Scale + O"
  },
  {
    "path": "doc/general/SymAddrConst.md",
    "chars": 1872,
    "preview": "SymAddrConst\n====================\n\nA **SymAddrConst** represents a symbolic operand of the form \"Sym +\nOffset\".\n\nThe cor"
  },
  {
    "path": "doc/general/Symbol.md",
    "chars": 2685,
    "preview": "Symbol\n====================\n\nA **Symbol** maps a name to an object in the [IR](IR.md).\n\nThe corresponding Protobuf messa"
  },
  {
    "path": "doc/general/SymbolicExpression.md",
    "chars": 32091,
    "preview": "SymbolicExpression\n====================\n\nA **SymbolicExpression** represents a data value or instruction\noperand which s"
  },
  {
    "path": "doc/general/Version.md",
    "chars": 931,
    "preview": "Version Information\n===================\n\nAll APIs must provide functionality for retrieving the following\nversion inform"
  },
  {
    "path": "doc/general/examples.dox",
    "chars": 1293,
    "preview": "\n///@if CPPONLY\n\n/// \\example api-walkthrough.cpp\n/// Demonstrate many different elements of the GTIRB API.\n\n/// \\exampl"
  },
  {
    "path": "doc/general/images.dox",
    "chars": 22,
    "preview": "/// \\image .gtirb.svg\n"
  },
  {
    "path": "doc/java/CMakeLists.txt",
    "chars": 1818,
    "preview": "if(GTIRB_JAVA_API)\n  include(UseJava)\n\n  # ---------------------------------------------------------------------------\n "
  },
  {
    "path": "doc/preprocmd.py",
    "chars": 5558,
    "preview": "# doxygen is annoying about certain .md things so we have to\n# preprocess before doxygenating\nimport os\nimport re\nimport"
  },
  {
    "path": "doc/python/CMakeLists.txt",
    "chars": 1094,
    "preview": "if(PYTHON)\n  find_program(SPHINX_APIDOC sphinx-apidoc)\n\n  if(WIN32)\n    set(SPHINX_MAKE_CMD \"./make.bat\")\n  else()\n    s"
  },
  {
    "path": "doc/python/conf.py",
    "chars": 3237,
    "preview": "# Configuration file for the Sphinx documentation builder.\n#\n# This file only contains a selection of the most common op"
  },
  {
    "path": "gtirbConfig.cmake.in",
    "chars": 382,
    "preview": "function(check_gtirb_branch GTIRB_BRANCH_NAME)\n  if(NOT \"${GTIRB_BRANCH_NAME}\" STREQUAL \"@PACKAGE_BRANCH@\")\n    message("
  },
  {
    "path": "include/gtirb/Addr.hpp",
    "chars": 11840,
    "preview": "//===- Addr.hpp -------------------------------------------------*- C++ -*-===//\n//\n//  Copyright (C) 2020 GrammaTech, I"
  },
  {
    "path": "include/gtirb/Allocator.hpp",
    "chars": 13951,
    "preview": "//===- Allocator.hpp --------------------------------------------*- C++ -*-===//\n//\n//  Copyright (C) 2020 GrammaTech, I"
  },
  {
    "path": "include/gtirb/AuxData.hpp",
    "chars": 25711,
    "preview": "//===- AuxData.hpp -----------------------------------------------*- C++-*-===//\n//\n//  Copyright (C) 2020 GrammaTech, I"
  },
  {
    "path": "include/gtirb/AuxDataContainer.hpp",
    "chars": 12004,
    "preview": "//===- AuxDataContainer.hpp -------------------------------------*- C++ -*-===//\n//\n//  Copyright (C) 2020 GrammaTech, I"
  },
  {
    "path": "include/gtirb/AuxDataSchema.hpp",
    "chars": 5457,
    "preview": "//===- AuxDataSchema.hpp ---------------------------------------------*-\n// C++-*-===//\n//\n//  Copyright (C) 2018-2019 G"
  },
  {
    "path": "include/gtirb/ByteInterval.hpp",
    "chars": 100192,
    "preview": "//===- ByteInterval.hpp -----------------------------------------*- C++ -*-===//\n//\n//  Copyright (C) 2020 GrammaTech, I"
  },
  {
    "path": "include/gtirb/CFG.hpp",
    "chars": 17645,
    "preview": "//===- CFG.hpp --------------------------------------------------*- C++ -*-===//\n//\n//  Copyright (C) 2021 GrammaTech, I"
  },
  {
    "path": "include/gtirb/Casting.hpp",
    "chars": 18591,
    "preview": "//===- Casting.hpp ----------------------------------------------*- C++ -*-===//\n//\n//  Copyright (C) 2020 GrammaTech, I"
  },
  {
    "path": "include/gtirb/CfgNode.hpp",
    "chars": 1410,
    "preview": "//===- CfgNode.hpp -----------------------------------------------*- C++-*-===//\n//\n//  Copyright (C) 2020 GrammaTech, I"
  },
  {
    "path": "include/gtirb/CodeBlock.hpp",
    "chars": 17192,
    "preview": "//===- CodeBlock.hpp ---------------------------------------------*- C++-*-===//\n//\n//  Copyright (C) 2020 GrammaTech, I"
  },
  {
    "path": "include/gtirb/Context.hpp",
    "chars": 5433,
    "preview": "//===- Context.hpp ----------------------------------------------*- C++ -*-===//\n//\n//  Copyright (C) 2020 GrammaTech, I"
  },
  {
    "path": "include/gtirb/DataBlock.hpp",
    "chars": 15697,
    "preview": "//===- DataBlock.hpp --------------------------------------------*- C++ -*-===//\n//\n//  Copyright (C) 2020 GrammaTech, I"
  },
  {
    "path": "include/gtirb/DecodeMode.hpp",
    "chars": 1090,
    "preview": "//===- DecodeMode.hpp --------------------------------------------*- C++-*-===//\n//\n//  Copyright (C) 2024 GrammaTech, I"
  },
  {
    "path": "include/gtirb/ErrorOr.hpp",
    "chars": 8734,
    "preview": "//===- ErrorOr.hpp ----------------------------------------------*- C++ -*-===//\n//\n//  Copyright (C) 2020 GrammaTech, I"
  },
  {
    "path": "include/gtirb/Export.hpp",
    "chars": 2195,
    "preview": "//===- Export.hpp -----------------------------------------------*- C++ -*-===//\n//\n//  Copyright (C) 2020 GrammaTech, I"
  },
  {
    "path": "include/gtirb/IR.hpp",
    "chars": 62286,
    "preview": "//===- IR.hpp ---------------------------------------------------*- C++ -*-===//\n//\n//  Copyright (C) 2021 GrammaTech, I"
  },
  {
    "path": "include/gtirb/Module.hpp",
    "chars": 78788,
    "preview": "//===- Module.hpp -----------------------------------------------*- C++ -*-===//\n//\n//  Copyright (C) 2021 GrammaTech, I"
  },
  {
    "path": "include/gtirb/Node.hpp",
    "chars": 4071,
    "preview": "//===- Node.hpp -------------------------------------------------*- C++ -*-===//\n//\n//  Copyright (C) 2020 GrammaTech, I"
  },
  {
    "path": "include/gtirb/Observer.hpp",
    "chars": 1021,
    "preview": "//===- Observer.hpp ---------------------------------------------*- C++ -*-===//\n//\n//  Copyright (C) 2020 GrammaTech, I"
  },
  {
    "path": "include/gtirb/Offset.hpp",
    "chars": 3898,
    "preview": "//===- Offset.hpp ------------------------------------------------*- C++-*-===//\n//\n//  Copyright (C) 2020 GrammaTech, I"
  },
  {
    "path": "include/gtirb/ProxyBlock.hpp",
    "chars": 3783,
    "preview": "//===- ProxyBlock.hpp -------------------------------------------*- C++ -*-===//\n//\n//  Copyright (C) 2020 GrammaTech, I"
  },
  {
    "path": "include/gtirb/Section.hpp",
    "chars": 51633,
    "preview": "//===- Section.hpp ----------------------------------------------*- C++ -*-===//\n//\n//  Copyright (C) 2020 GrammaTech, I"
  },
  {
    "path": "include/gtirb/Symbol.hpp",
    "chars": 18265,
    "preview": "//===- Symbol.hpp -----------------------------------------------*- C++ -*-===//\n//\n//  Copyright (C) 2020 GrammaTech, I"
  },
  {
    "path": "include/gtirb/SymbolicExpression.hpp",
    "chars": 6807,
    "preview": "//===- SymbolicExpression.hpp -----------------------------------*- C++ -*-===//\n//\n//  Copyright (C) 2020 GrammaTech, I"
  },
  {
    "path": "include/gtirb/Utility.hpp",
    "chars": 28915,
    "preview": "//===- Utility.hpp ----------------------------------------------*- C++ -*-===//\n//\n//  Copyright (C) 2021 GrammaTech, I"
  },
  {
    "path": "include/gtirb/gtirb.hpp",
    "chars": 1323,
    "preview": "//===- gtirb.hpp ------------------------------------------------*- C++ -*-===//\n//\n//  Copyright (C) 2020 GrammaTech, I"
  },
  {
    "path": "include/gtirb/version.h.in",
    "chars": 1451,
    "preview": "//===- version.h -------------------------------------------------*- C++-*-===//\n//\n//  Copyright (C) 2020 GrammaTech, I"
  },
  {
    "path": "java/.gitignore",
    "chars": 41,
    "preview": ".idea\n.gradle\ngradle\ngradlew\ngradlew.bat\n"
  },
  {
    "path": "java/CMakeLists.txt",
    "chars": 6428,
    "preview": "#\n# Cmake configuration for java build\n#\n\n# ---------------------------------------------------------------------------\n"
  },
  {
    "path": "java/Version.java.in",
    "chars": 1025,
    "preview": "/*\n *  Copyright (C) 2020 GrammaTech, Inc.\n *\n *  This code is licensed under the MIT license. See the LICENSE file in t"
  },
  {
    "path": "java/build.gradle",
    "chars": 2363,
    "preview": "/* Gradle build for GTIRB Java API\n *\n * NOTE: The supported build system is CMake.\n * This Gradle build exists as a con"
  },
  {
    "path": "java/com/grammatech/gtirb/AuxDataContainer.java",
    "chars": 9610,
    "preview": "/*\n *  Copyright (C) 2020-2021 GrammaTech, Inc.\n *\n *  This code is licensed under the MIT license. See the LICENSE file"
  },
  {
    "path": "java/com/grammatech/gtirb/AuxDataSchema.java",
    "chars": 987,
    "preview": "package com.grammatech.gtirb;\n\nimport com.grammatech.gtirb.auxdatacodec.Codec;\n\n/**\n * This class mediates encoding and "
  },
  {
    "path": "java/com/grammatech/gtirb/AuxDataSchemas.java",
    "chars": 16004,
    "preview": "package com.grammatech.gtirb;\n\nimport com.grammatech.gtirb.auxdatacodec.BoolCodec;\nimport com.grammatech.gtirb.auxdataco"
  },
  {
    "path": "java/com/grammatech/gtirb/ByteBlock.java",
    "chars": 4349,
    "preview": "/*\n *  Copyright (C) 2021 GrammaTech, Inc.\n *\n *  This code is licensed under the MIT license. See the LICENSE file in t"
  },
  {
    "path": "java/com/grammatech/gtirb/ByteInterval.java",
    "chars": 30186,
    "preview": "/*\n *  Copyright (C) 2020-2023 GrammaTech, Inc.\n *\n *  This code is licensed under the MIT license. See the LICENSE file"
  },
  {
    "path": "java/com/grammatech/gtirb/CFG.java",
    "chars": 3663,
    "preview": "/*\n *  Copyright (C) 2020-2021 GrammaTech, Inc.\n *\n *  This code is licensed under the MIT license. See the LICENSE file"
  },
  {
    "path": "java/com/grammatech/gtirb/CfiDirective.java",
    "chars": 1053,
    "preview": "package com.grammatech.gtirb;\n\nimport com.grammatech.gtirb.tuple.Tuple3;\nimport java.util.List;\nimport java.util.UUID;\n\n"
  },
  {
    "path": "java/com/grammatech/gtirb/CodeBlock.java",
    "chars": 3916,
    "preview": "/*\n *  Copyright (C) 2020-2021 GrammaTech, Inc.\n *\n *  This code is licensed under the MIT license. See the LICENSE file"
  },
  {
    "path": "java/com/grammatech/gtirb/DataBlock.java",
    "chars": 2930,
    "preview": "/*\n *  Copyright (C) 2020-2021 GrammaTech, Inc.\n *\n *  This code is licensed under the MIT license. See the LICENSE file"
  },
  {
    "path": "java/com/grammatech/gtirb/Edge.java",
    "chars": 5766,
    "preview": "/*\n *  Copyright (C) 2020-2021 GrammaTech, Inc.\n *\n *  This code is licensed under the MIT license. See the LICENSE file"
  },
  {
    "path": "java/com/grammatech/gtirb/ElfSymbolInfoTuple.java",
    "chars": 1278,
    "preview": "package com.grammatech.gtirb;\n\nimport com.grammatech.gtirb.tuple.Tuple5;\n\n/**\n * A tuple representing information about "
  },
  {
    "path": "java/com/grammatech/gtirb/ElfSymbolVersionsTable.java",
    "chars": 2994,
    "preview": "package com.grammatech.gtirb;\n\nimport com.grammatech.gtirb.tuple.Tuple2;\nimport com.grammatech.gtirb.tuple.Tuple3;\nimpor"
  },
  {
    "path": "java/com/grammatech/gtirb/IR.java",
    "chars": 8197,
    "preview": "/*\n *  Copyright (C) 2020-2023 GrammaTech, Inc.\n *\n *  This code is licensed under the MIT license. See the LICENSE file"
  },
  {
    "path": "java/com/grammatech/gtirb/Module.java",
    "chars": 21761,
    "preview": "/*\n *  Copyright (C) 2020-2023 GrammaTech, Inc.\n *\n *  This code is licensed under the MIT license. See the LICENSE file"
  },
  {
    "path": "java/com/grammatech/gtirb/Node.java",
    "chars": 2026,
    "preview": "/*\n *  Copyright (C) 2020-2021 GrammaTech, Inc.\n *\n *  This code is licensed under the MIT license. See the LICENSE file"
  },
  {
    "path": "java/com/grammatech/gtirb/Offset.java",
    "chars": 1796,
    "preview": "/*\n *  Copyright (C) 2020-2021 GrammaTech, Inc.\n *\n *  This code is licensed under the MIT license. See the LICENSE file"
  },
  {
    "path": "java/com/grammatech/gtirb/PeExportEntry.java",
    "chars": 784,
    "preview": "package com.grammatech.gtirb;\n\nimport com.grammatech.gtirb.tuple.Tuple3;\n\n/**\n * A tuple storing information about a PE "
  },
  {
    "path": "java/com/grammatech/gtirb/PeImportEntry.java",
    "chars": 1064,
    "preview": "package com.grammatech.gtirb;\n\nimport com.grammatech.gtirb.tuple.Tuple4;\n\n/**\n * A tuple representing an import entry fo"
  },
  {
    "path": "java/com/grammatech/gtirb/PeResourceEntry.java",
    "chars": 857,
    "preview": "package com.grammatech.gtirb;\n\nimport com.grammatech.gtirb.Offset;\nimport com.grammatech.gtirb.tuple.Tuple3;\nimport java"
  },
  {
    "path": "java/com/grammatech/gtirb/ProbFuncName.java",
    "chars": 864,
    "preview": "package com.grammatech.gtirb;\n\nimport com.grammatech.gtirb.tuple.Tuple3;\n\n/**\n * A tuple representing a probability fact"
  },
  {
    "path": "java/com/grammatech/gtirb/ProxyBlock.java",
    "chars": 2927,
    "preview": "/*\n *  Copyright (C) 2020-2021 GrammaTech, Inc.\n *\n *  This code is licensed under the MIT license. See the LICENSE file"
  },
  {
    "path": "java/com/grammatech/gtirb/Section.java",
    "chars": 14928,
    "preview": "/*\n *  Copyright (C) 2020-2023 GrammaTech, Inc.\n *\n *  This code is licensed under the MIT license. See the LICENSE file"
  },
  {
    "path": "java/com/grammatech/gtirb/SectionPropertyTuple.java",
    "chars": 787,
    "preview": "package com.grammatech.gtirb;\n\nimport com.grammatech.gtirb.tuple.Tuple2;\n\n/**\n * A tuple for representing information ab"
  },
  {
    "path": "java/com/grammatech/gtirb/SymAddrAddr.java",
    "chars": 6089,
    "preview": "/*\n *  Copyright (C) 2020-2023 GrammaTech, Inc.\n *\n *  This code is licensed under the MIT license. See the LICENSE file"
  },
  {
    "path": "java/com/grammatech/gtirb/SymAddrConst.java",
    "chars": 4543,
    "preview": "/*\n *  Copyright (C) 2020-2023 GrammaTech, Inc.\n *\n *  This code is licensed under the MIT license. See the LICENSE file"
  },
  {
    "path": "java/com/grammatech/gtirb/Symbol.java",
    "chars": 7929,
    "preview": "/*\n *  Copyright (C) 2020-2023 GrammaTech, Inc.\n *\n *  This code is licensed under the MIT license. See the LICENSE file"
  },
  {
    "path": "java/com/grammatech/gtirb/SymbolicExpression.java",
    "chars": 10872,
    "preview": "/*\n *  Copyright (C) 2020-2023 GrammaTech, Inc.\n *\n *  This code is licensed under the MIT license. See the LICENSE file"
  },
  {
    "path": "java/com/grammatech/gtirb/TreeListItem.java",
    "chars": 978,
    "preview": "/*\n *  Copyright (C) 2020-2021 GrammaTech, Inc.\n *\n *  This code is licensed under the MIT license. See the LICENSE file"
  },
  {
    "path": "java/com/grammatech/gtirb/TreeListUtils.java",
    "chars": 10107,
    "preview": "/*\n *  Copyright (C) 2020-2021 GrammaTech, Inc.\n *\n *  This code is licensed under the MIT license. See the LICENSE file"
  },
  {
    "path": "java/com/grammatech/gtirb/TypeTableEntry.java",
    "chars": 8907,
    "preview": "package com.grammatech.gtirb;\n\nimport com.grammatech.gtirb.tuple.Tuple1;\nimport com.grammatech.gtirb.tuple.Tuple2;\nimpor"
  },
  {
    "path": "java/com/grammatech/gtirb/Util.java",
    "chars": 3838,
    "preview": "/*\n *  Copyright (C) 2020-2021 GrammaTech, Inc.\n *\n *  This code is licensed under the MIT license. See the LICENSE file"
  },
  {
    "path": "java/com/grammatech/gtirb/auxdatacodec/BoolCodec.java",
    "chars": 1204,
    "preview": "/*\n *  Copyright (C) 2022 GrammaTech, Inc.\n *\n *  This code is licensed under the MIT license. See the LICENSE file in t"
  },
  {
    "path": "java/com/grammatech/gtirb/auxdatacodec/ByteCodec.java",
    "chars": 896,
    "preview": "package com.grammatech.gtirb.auxdatacodec;\n\nimport java.io.EOFException;\nimport java.io.IOException;\nimport java.io.Inpu"
  },
  {
    "path": "java/com/grammatech/gtirb/auxdatacodec/Codec.java",
    "chars": 1433,
    "preview": "/*\n *  Copyright (C) 2020-2021 GrammaTech, Inc.\n *\n *  This code is licensed under the MIT license. See the LICENSE file"
  },
  {
    "path": "java/com/grammatech/gtirb/auxdatacodec/FloatCodec.java",
    "chars": 1419,
    "preview": "/*\n *  Copyright (C) 2020-2021 GrammaTech, Inc.\n *\n *  This code is licensed under the MIT license. See the LICENSE file"
  },
  {
    "path": "java/com/grammatech/gtirb/auxdatacodec/IntegerCodec.java",
    "chars": 1691,
    "preview": "/*\n *  Copyright (C) 2020-2021 GrammaTech, Inc.\n *\n *  This code is licensed under the MIT license. See the LICENSE file"
  },
  {
    "path": "java/com/grammatech/gtirb/auxdatacodec/ListCodec.java",
    "chars": 1499,
    "preview": "/*\n *  Copyright (C) 2020-2021 GrammaTech, Inc.\n *\n *  This code is licensed under the MIT license. See the LICENSE file"
  },
  {
    "path": "java/com/grammatech/gtirb/auxdatacodec/LongCodec.java",
    "chars": 1900,
    "preview": "/*\n *  Copyright (C) 2020-2021 GrammaTech, Inc.\n *\n *  This code is licensed under the MIT license. See the LICENSE file"
  },
  {
    "path": "java/com/grammatech/gtirb/auxdatacodec/MapCodec.java",
    "chars": 1911,
    "preview": "/*\n *  Copyright (C) 2020-2021 GrammaTech, Inc.\n *\n *  This code is licensed under the MIT license. See the LICENSE file"
  },
  {
    "path": "java/com/grammatech/gtirb/auxdatacodec/OffsetCodec.java",
    "chars": 1202,
    "preview": "/*\n *  Copyright (C) 2020-2021 GrammaTech, Inc.\n *\n *  This code is licensed under the MIT license. See the LICENSE file"
  },
  {
    "path": "java/com/grammatech/gtirb/auxdatacodec/SetCodec.java",
    "chars": 1616,
    "preview": "/*\n *  Copyright (C) 2020-2021 GrammaTech, Inc.\n *\n *  This code is licensed under the MIT license. See the LICENSE file"
  },
  {
    "path": "java/com/grammatech/gtirb/auxdatacodec/ShortCodec.java",
    "chars": 1154,
    "preview": "package com.grammatech.gtirb.auxdatacodec;\n\nimport java.io.EOFException;\nimport java.io.IOException;\nimport java.io.Inpu"
  },
  {
    "path": "java/com/grammatech/gtirb/auxdatacodec/StringCodec.java",
    "chars": 1558,
    "preview": "/*\n *  Copyright (C) 2020-2021 GrammaTech, Inc.\n *\n *  This code is licensed under the MIT license. See the LICENSE file"
  },
  {
    "path": "java/com/grammatech/gtirb/auxdatacodec/Tuple1Codec.java",
    "chars": 853,
    "preview": "package com.grammatech.gtirb.auxdatacodec;\n\nimport com.grammatech.gtirb.tuple.Tuple1;\nimport java.io.IOException;\nimport"
  },
  {
    "path": "java/com/grammatech/gtirb/auxdatacodec/Tuple2Codec.java",
    "chars": 1571,
    "preview": "/*\n *  Copyright (C) 2020-2021 GrammaTech, Inc.\n *\n *  This code is licensed under the MIT license. See the LICENSE file"
  },
  {
    "path": "java/com/grammatech/gtirb/auxdatacodec/Tuple3Codec.java",
    "chars": 1801,
    "preview": "/*\n *  Copyright (C) 2020-2021 GrammaTech, Inc.\n *\n *  This code is licensed under the MIT license. See the LICENSE file"
  },
  {
    "path": "java/com/grammatech/gtirb/auxdatacodec/Tuple4Codec.java",
    "chars": 2016,
    "preview": "/*\n *  Copyright (C) 2020-2021 GrammaTech, Inc.\n *\n *  This code is licensed under the MIT license. See the LICENSE file"
  },
  {
    "path": "java/com/grammatech/gtirb/auxdatacodec/Tuple5Codec.java",
    "chars": 2231,
    "preview": "/*\n *  Copyright (C) 2020-2021 GrammaTech, Inc.\n *\n *  This code is licensed under the MIT license. See the LICENSE file"
  },
  {
    "path": "java/com/grammatech/gtirb/auxdatacodec/UuidCodec.java",
    "chars": 1254,
    "preview": "/*\n *  Copyright (C) 2020-2021 GrammaTech, Inc.\n *\n *  This code is licensed under the MIT license. See the LICENSE file"
  },
  {
    "path": "java/com/grammatech/gtirb/auxdatacodec/Variant11Codec.java",
    "chars": 7563,
    "preview": "package com.grammatech.gtirb.auxdatacodec;\n\nimport com.grammatech.gtirb.variant.Variant11;\nimport java.io.IOException;\ni"
  },
  {
    "path": "java/com/grammatech/gtirb/auxdatacodec/Variant2Codec.java",
    "chars": 2201,
    "preview": "package com.grammatech.gtirb.auxdatacodec;\n\nimport com.grammatech.gtirb.variant.Variant2;\nimport java.io.IOException;\nim"
  },
  {
    "path": "java/com/grammatech/gtirb/auxdatacodec/Variant3Codec.java",
    "chars": 2809,
    "preview": "package com.grammatech.gtirb.auxdatacodec;\n\nimport com.grammatech.gtirb.variant.Variant3;\nimport java.io.IOException;\nim"
  },
  {
    "path": "java/com/grammatech/gtirb/tuple/Tuple1.java",
    "chars": 1145,
    "preview": "package com.grammatech.gtirb.tuple;\n\n/**\n * Immutable collection of one element of any type.\n *\n * Note that this class "
  },
  {
    "path": "java/com/grammatech/gtirb/tuple/Tuple2.java",
    "chars": 2005,
    "preview": "/*\n *  Copyright (C) 2020-2023 GrammaTech, Inc.\n *\n *  This code is licensed under the MIT license. See the LICENSE file"
  },
  {
    "path": "java/com/grammatech/gtirb/tuple/Tuple3.java",
    "chars": 2340,
    "preview": "/*\n *  Copyright (C) 2020-2021 GrammaTech, Inc.\n *\n *  This code is licensed under the MIT license. See the LICENSE file"
  },
  {
    "path": "java/com/grammatech/gtirb/tuple/Tuple4.java",
    "chars": 2683,
    "preview": "/*\n *  Copyright (C) 2020-2021 GrammaTech, Inc.\n *\n *  This code is licensed under the MIT license. See the LICENSE file"
  },
  {
    "path": "java/com/grammatech/gtirb/tuple/Tuple5.java",
    "chars": 3016,
    "preview": "/*\n *  Copyright (C) 2020-2021 GrammaTech, Inc.\n *\n *  This code is licensed under the MIT license. See the LICENSE file"
  },
  {
    "path": "java/com/grammatech/gtirb/variant/Token.java",
    "chars": 680,
    "preview": "package com.grammatech.gtirb.variant;\n\n/**\n * This class contains a bunch of marker classes that are used\n * exlusively "
  },
  {
    "path": "java/com/grammatech/gtirb/variant/Variant11.java",
    "chars": 13450,
    "preview": "package com.grammatech.gtirb.variant;\n\nimport java.util.Optional;\n\n/**\n * A 11-valued variant. The variant can store a s"
  },
  {
    "path": "java/com/grammatech/gtirb/variant/Variant2.java",
    "chars": 3350,
    "preview": "package com.grammatech.gtirb.variant;\n\nimport java.util.Optional;\n\n/**\n * A 2-valued variant. The variant can store a si"
  },
  {
    "path": "java/com/grammatech/gtirb/variant/Variant3.java",
    "chars": 4466,
    "preview": "package com.grammatech.gtirb.variant;\n\nimport java.util.Optional;\n\n/**\n * A 3-valued variant. The variant can store a si"
  }
]

// ... and 157 more files (download for full content)

About this extraction

This page contains the full source code of the GrammaTech/gtirb GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 357 files (2.2 MB), approximately 603.4k tokens, and a symbol index with 2877 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!