Remove naive decoding net implementation
authorDaniel Schwyn <schwyda@student.ethz.ch>
Tue, 13 Jun 2017 08:16:20 +0000 (10:16 +0200)
committerDaniel Schwyn <schwyda@student.ethz.ch>
Tue, 13 Jun 2017 12:23:08 +0000 (14:23 +0200)
Signed-off-by: Daniel Schwyn <schwyda@student.ethz.ch>

usr/skb/programs/decodingNet_naive.pl [deleted file]

diff --git a/usr/skb/programs/decodingNet_naive.pl b/usr/skb/programs/decodingNet_naive.pl
deleted file mode 100644 (file)
index 68e7c4e..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-blockContains(block(Base, Limit),Addr) :-
-    between(Base,Limit,Addr).
-
-blockListContains([B|Blocks],Addr) :-
-    blockContains(B,Addr),!;
-    blockListContains(Blocks,Addr).
-
-mapsToName(map(SrcBlock,Dest,DestBase),Addr,Name) :-
-    name(Dest,DestAddr) = Name,
-    blockContains(SrcBlock,Addr),
-    block(SrcBase,_) = SrcBlock,
-    DestAddr is Addr - SrcBase + DestBase.
-
-listMapsToName([M|Maps],Addr,Name) :-
-    mapsToName(M,Addr,Name);
-    listMapsToName(Maps,Addr,Name).    
-
-accept(node(Accept,_,_),Addr) :-
-    blockListContains(Accept,Addr).
-
-translateMap(node(_,Translate,_),Addr,Name) :-
-    listMapsToName(Translate,Addr,Name).
-
-translateOverlay(node(_,_,Overlay),Addr,Name) :-
-    Name = name(Overlay,Addr).
-
-translate(Node,Addr,Name) :-
-    translateMap(Node,Addr,Name),!;
-    (   not(accept(Node,Addr))
-    ,   translateOverlay(Node,Addr,Name)
-    ).
-
-acceptedName(Name) :-
-    name(NodeId,Addr) = Name,
-    net(NodeId,Node),
-    accept(Node,Addr).
-
-decodeStep(name(NodeId,Addr),Name) :-
-    net(NodeId,Node),
-    translate(Node,Addr,Name).
-
-decodesTo(SrcName,DestName) :-
-    decodeStep(SrcName,Name),
-    (   DestName = Name,!
-    ;   decodesTo(Name,DestName)
-    ).
-
-resolve(SrcName,DestName) :-
-    (   DestName = SrcName
-    ;   decodesTo(SrcName,DestName)
-    ),
-    acceptedName(DestName).