From 06029f2be62dd91f9019bc3684c95dae82dc9b1e Mon Sep 17 00:00:00 2001 From: Timothy Clem Date: Tue, 11 Sep 2018 15:29:24 -0700 Subject: [PATCH] Rename to source/target for consistently --- proto/types.proto | 8 ++++---- src/Data/Graph/ControlFlowVertex.hs | 4 ++-- src/Data/Graph/TermVertex.hs | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/proto/types.proto b/proto/types.proto index a4a97d1ec..99c1810f4 100644 --- a/proto/types.proto +++ b/proto/types.proto @@ -75,8 +75,8 @@ message ControlFlowGraph { } message ControlFlowEdge { - int64 from = 1; - int64 to = 2; + int64 source = 1; + int64 target = 2; } message ControlFlowVertex { @@ -132,8 +132,8 @@ message TermGraph { } message TermEdge { - int64 from = 1; - int64 to = 2; + int64 source = 1; + int64 target = 2; } message TermVertex { diff --git a/src/Data/Graph/ControlFlowVertex.hs b/src/Data/Graph/ControlFlowVertex.hs index 09a2927d1..906f9e214 100644 --- a/src/Data/Graph/ControlFlowVertex.hs +++ b/src/Data/Graph/ControlFlowVertex.hs @@ -145,8 +145,8 @@ instance Message (G.Edge ControlFlowVertex) where encodeMessage _ (G.Edge (from, to)) = encodePrimitive 1 (uniqueTag from) <> encodePrimitive 2 (uniqueTag to) decodeMessage = error "decodeMessage not implemented for (G.Edge ControlFlowVertex)" dotProto _ = - [ DotProtoMessageField $ DotProtoField 1 (Prim PB.Int64) (Single "from") [] Nothing - , DotProtoMessageField $ DotProtoField 2 (Prim PB.Int64) (Single "to") [] Nothing + [ DotProtoMessageField $ DotProtoField 1 (Prim PB.Int64) (Single "source") [] Nothing + , DotProtoMessageField $ DotProtoField 2 (Prim PB.Int64) (Single "target") [] Nothing ] diff --git a/src/Data/Graph/TermVertex.hs b/src/Data/Graph/TermVertex.hs index c8b5ec39f..cce6035e5 100644 --- a/src/Data/Graph/TermVertex.hs +++ b/src/Data/Graph/TermVertex.hs @@ -50,8 +50,8 @@ instance Message (Edge TermVertex) where encodeMessage _ (Edge (from, to)) = encodePrimitive 1 (uniqueTag from) <> encodePrimitive 2 (uniqueTag to) decodeMessage = error "decodeMessage not implemented for (Edge TermVertex)" dotProto _ = - [ DotProtoMessageField $ DotProtoField 1 (Prim PB.Int64) (Single "from") [] Nothing - , DotProtoMessageField $ DotProtoField 2 (Prim PB.Int64) (Single "to") [] Nothing + [ DotProtoMessageField $ DotProtoField 1 (Prim PB.Int64) (Single "source") [] Nothing + , DotProtoMessageField $ DotProtoField 2 (Prim PB.Int64) (Single "target") [] Nothing ] instance Message TermVertex where