//===- ByteInterval.proto -------------------------------------*- Proto -*-===//
//
//  Copyright (C) 2020 GrammaTech, Inc.
//
//  This code is licensed under the MIT license. See the LICENSE file in the
//  project root for license terms.
//
//  This project is sponsored by the Office of Naval Research, One Liberty
//  Center, 875 N. Randolph Street, Arlington, VA 22203 under contract #
//  N68335-17-C-0700.  The content of the information does not necessarily
//  reflect the position or policy of the Government and no official
//  endorsement should be inferred.
//
//===----------------------------------------------------------------------===//
syntax = "proto3";
package gtirb.proto;
option java_package = "com.grammatech.gtirb.proto";

import "CodeBlock.proto";
import "DataBlock.proto";
import "SymbolicExpression.proto";

message Block {
  uint64 offset = 1;
  oneof value {
    CodeBlock code = 2;
    DataBlock data = 3;
  }
}

message ByteInterval {
  bytes uuid = 1;
  repeated Block blocks = 2;
  map<uint64, SymbolicExpression> symbolic_expressions = 3;
  bool has_address = 4;
  uint64 address = 5;
  uint64 size = 6;
  bytes contents = 7;
}
