Skip to content

Commit

Permalink
Imports corrected
Browse files Browse the repository at this point in the history
  • Loading branch information
cengwins committed Jan 14, 2022
1 parent 7454da5 commit 4518e6b
Show file tree
Hide file tree
Showing 19 changed files with 52 additions and 52 deletions.
8 changes: 4 additions & 4 deletions Clocks/testlogicalclock.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@

from ahc.Ahc import ComponentModel, Event, ConnectorTypes, Topology
from ahc.Ahc import EventTypes
from Channels.Channels import P2PFIFOPerfectChannel
from LinkLayers.GenericLinkLayer import LinkLayer
from NetworkLayers.AllSeeingEyeNetworkLayer import AllSeingEyeNetworkLayer
from ahc.Channels.Channels import P2PFIFOPerfectChannel
from ahc.LinkLayers.GenericLinkLayer import LinkLayer
from ahc.NetworkLayers.AllSeeingEyeNetworkLayer import AllSeingEyeNetworkLayer

from Clocks.LogicalClocks import VectorClock
from ahc.Clocks.LogicalClocks import VectorClock


class ApplicationLayerComponent(ComponentModel):
Expand Down
4 changes: 2 additions & 2 deletions Consensus/testpaxosconsensus.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

from ahc.Ahc import Topology
from ahc.Ahc import ComponentRegistry
from Channels.Channels import BasicLossyChannel
from Consensus.Paxos.paxos_component import PaxosConsensusComponentModel, Resolution
from ahc.Channels.Channels import BasicLossyChannel
from ahc.Consensus.Paxos.paxos_component import PaxosConsensusComponentModel, Resolution
from itertools import combinations
import logging
logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)
Expand Down
4 changes: 2 additions & 2 deletions Consensus/testraftconsensus.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

from ahc.Ahc import Topology
from ahc.Ahc import ComponentRegistry
from Channels.Channels import BasicLossyChannel
from Consensus.Raft.raft_component import RaftConsensusComponent
from ahc.Channels.Channels import BasicLossyChannel
from ahc.Consensus.Raft.raft_component import RaftConsensusComponent
from itertools import combinations

registry = ComponentRegistry()
Expand Down
8 changes: 4 additions & 4 deletions Election/testElectionEchoExtinction.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
from ahc.Ahc import ComponentModel, Event, ConnectorTypes, Topology
from ahc.Ahc import ComponentRegistry
from ahc.Ahc import EventTypes
from Channels.Channels import P2PFIFOPerfectChannel
from LinkLayers.GenericLinkLayer import LinkLayer
from NetworkLayers.AllSeeingEyeNetworkLayer import AllSeingEyeNetworkLayer
from Election.EchoExtinction import ElectionEchoExtinctionComponent
from ahc.Channels.Channels import P2PFIFOPerfectChannel
from ahc.LinkLayers.GenericLinkLayer import LinkLayer
from ahc.NetworkLayers.AllSeeingEyeNetworkLayer import AllSeingEyeNetworkLayer
from ahc.Election.EchoExtinction import ElectionEchoExtinctionComponent

registry = ComponentRegistry()

Expand Down
8 changes: 4 additions & 4 deletions Election/testElectionSpira.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
from ahc.Ahc import ComponentModel, Event, ConnectorTypes, Topology
from ahc.Ahc import ComponentRegistry
from ahc.Ahc import EventTypes
from Channels.Channels import P2PFIFOPerfectChannel
from LinkLayers.GenericLinkLayer import LinkLayer
from NetworkLayers.AllSeeingEyeNetworkLayer import AllSeingEyeNetworkLayer
from Election.Spira import ElectionSpiraComponent
from ahc.Channels.Channels import P2PFIFOPerfectChannel
from ahc.LinkLayers.GenericLinkLayer import LinkLayer
from ahc.NetworkLayers.AllSeeingEyeNetworkLayer import AllSeingEyeNetworkLayer
from ahc.Election.Spira import ElectionSpiraComponent

registry = ComponentRegistry()

Expand Down
4 changes: 2 additions & 2 deletions MutualExclusion/testBakery.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import matplotlib.pyplot as plt
import networkx as nx

from MutualExclusion.Bakery import *
from ahc.MutualExclusion.Bakery import *
from ahc.Ahc import ComponentModel, Event, EventTypes, ConnectorTypes, Topology
from Channels.Channels import FIFOBroadcastPerfectChannel
from ahc.Channels.Channels import FIFOBroadcastPerfectChannel

class AdHocNode(ComponentModel):

Expand Down
4 changes: 2 additions & 2 deletions MutualExclusion/testPeterson.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import matplotlib.pyplot as plt
import networkx as nx

from MutualExclusion.Peterson import *
from ahc.MutualExclusion.Peterson import *
from ahc.Ahc import ComponentModel, Event, EventTypes, ConnectorTypes, Topology
from Channels.Channels import FIFOBroadcastPerfectChannel
from ahc.Channels.Channels import FIFOBroadcastPerfectChannel

class AdHocNode(ComponentModel):

Expand Down
4 changes: 2 additions & 2 deletions MutualExclusion/testRaymond.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
from itertools import combinations, groupby
from math import cos, atan2

from MutualExclusion.Raymond import MutualExclusionRaymondComponent
from ahc.MutualExclusion.Raymond import MutualExclusionRaymondComponent
from ahc.Ahc import Topology
from Channels.Channels import P2PFIFOPerfectChannel
from ahc.Channels.Channels import P2PFIFOPerfectChannel


SAVED_FILE_INDEX = 0
Expand Down
4 changes: 2 additions & 2 deletions MutualExclusion/testRicartAgrawala.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
from itertools import combinations, groupby
from math import cos, sin, atan2

from MutualExclusion.RicartAgrawala import MutualExclusionAgrawalaComponent
from ahc.MutualExclusion.RicartAgrawala import MutualExclusionAgrawalaComponent
from ahc.Ahc import Topology
from Channels.Channels import P2PFIFOPerfectChannel
from ahc.Channels.Channels import P2PFIFOPerfectChannel


SAVED_FILE_INDEX = 0
Expand Down
4 changes: 2 additions & 2 deletions PhysicalLayers/testUsrp.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

from ahc.Ahc import ComponentModel, Event, ConnectorTypes, Topology, EventTypes, GenericMessage, GenericMessageHeader, FramerObjects
from ahc.Ahc import ComponentRegistry
from PhysicalLayers.UsrpB210OfdmFlexFramePhy import UsrpB210OfdmFlexFramePhy
from MAC.CSMA import MacCsmaPPersistent,MacCsmaPPersistentConfigurationParameters
from ahc.PhysicalLayers.UsrpB210OfdmFlexFramePhy import UsrpB210OfdmFlexFramePhy
from ahc.MAC.CSMA import MacCsmaPPersistent,MacCsmaPPersistentConfigurationParameters

registry = ComponentRegistry()
from Channels.Channels import FIFOBroadcastPerfectChannel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

from ahc.Ahc import ComponentModel, Event, ConnectorTypes, Topology, EventTypes, GenericMessage, GenericMessageHeader, FramerObjects
from ahc.Ahc import ComponentRegistry
from PhysicalLayers.UsrpB210OfdmFlexFramePhy import UsrpB210OfdmFlexFramePhy
from MAC.CSMA import MacCsmaPPersistent,MacCsmaPPersistentConfigurationParameters
from ahc.PhysicalLayers.UsrpB210OfdmFlexFramePhy import UsrpB210OfdmFlexFramePhy
from ahc.MAC.CSMA import MacCsmaPPersistent,MacCsmaPPersistentConfigurationParameters

registry = ComponentRegistry()
from Channels.Channels import FIFOBroadcastPerfectChannel
Expand Down Expand Up @@ -106,11 +106,11 @@ def main(argv):
try:
opts, args = getopt.getopt(argv,"hi:",["id="])
except getopt.GetoptError:
print ("testXXX.py -i <nodeinstancenumber>")
print ("testUsrpIndividually.py -i <nodeinstancenumber>")
sys.exit(2)
for opt, arg in opts:
if opt == '-h':
print ("testXXX.py -i <nodeinstancenumber>")
print ("testUsrpIndividually.py -i <nodeinstancenumber>")
sys.exit()
elif opt in ("-i", "--ifile"):
id = arg
Expand Down
4 changes: 2 additions & 2 deletions SelfStabilization/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

import matplotlib.pyplot as plt

from SelfStabilization.AroraGouda import *
from SelfStabilization.AfekKuttenYang import *
from ahc.SelfStabilization.AroraGouda import *
from ahc.SelfStabilization.AfekKuttenYang import *


def main():
Expand Down
4 changes: 2 additions & 2 deletions SelfStabilization/testbenchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

import matplotlib.pyplot as plt

from SelfStabilization.AroraGouda import *
from SelfStabilization.AfekKuttenYang import *
from ahc.SelfStabilization.AroraGouda import *
from ahc.SelfStabilization.AfekKuttenYang import *

def eprint(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs)
Expand Down
6 changes: 3 additions & 3 deletions Snapshot/testsnapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import sys

sys.path.insert(0, os.getcwd())
from Channels.Channels import Channel
from Snapshot.Snapshot import ChandyLamportComponentModel, LaiYangComponentModel
from Snapshot.Snapshot import SnapshotEventTypes
from ahc.Channels.Channels import Channel
from ahc.Snapshot.Snapshot import ChandyLamportComponentModel, LaiYangComponentModel
from ahc.Snapshot.Snapshot import SnapshotEventTypes
from ahc.Ahc import Event, Topology
import matplotlib.pyplot as plt
import networkx as nx
Expand Down
2 changes: 1 addition & 1 deletion Waves/testTreeAlgorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

sys.path.insert(0, os.getcwd())

from Channels.Channels import Channel
from ahc.Channels.Channels import Channel
from ahc.Waves.TreeAlgorithm import *

def main():
Expand Down
8 changes: 4 additions & 4 deletions Waves/test_awerbuch.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
from ahc.Ahc import Topology
from ahc.Ahc import ComponentModel, Event, ConnectorTypes, ComponentRegistry
from ahc.Ahc import EventTypes
from Channels.Channels import P2PFIFOPerfectChannel
from LinkLayers.GenericLinkLayer import LinkLayer
from NetworkLayers.AllSeeingEyeNetworkLayer import AllSeingEyeNetworkLayer
from Waves.AwerbuchDFS import WaveAwerbuchComponent
from ahc.Channels.Channels import P2PFIFOPerfectChannel
from ahc.LinkLayers.GenericLinkLayer import LinkLayer
from ahc.NetworkLayers.AllSeeingEyeNetworkLayer import AllSeingEyeNetworkLayer
from ahc.Waves.AwerbuchDFS import WaveAwerbuchComponent


number_mesg = 0
Expand Down
8 changes: 4 additions & 4 deletions Waves/test_cidon.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
from ahc.Ahc import Topology
from ahc.Ahc import ComponentModel, Event, ConnectorTypes, ComponentRegistry
from ahc.Ahc import EventTypes
from Channels.Channels import P2PFIFOPerfectChannel
from LinkLayers.GenericLinkLayer import LinkLayer
from NetworkLayers.AllSeeingEyeNetworkLayer import AllSeingEyeNetworkLayer
from Waves.CidonDFS import ApplicationLayerComponent_Cidon
from ahc.Channels.Channels import P2PFIFOPerfectChannel
from ahc.LinkLayers.GenericLinkLayer import LinkLayer
from ahc.NetworkLayers.AllSeeingEyeNetworkLayer import AllSeingEyeNetworkLayer
from ahc.Waves.CidonDFS import ApplicationLayerComponent_Cidon


number_mesg = 0
Expand Down
6 changes: 3 additions & 3 deletions Waves/test_dfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

from ahc.Ahc import ComponentModel, Event, ConnectorTypes, Topology, EventTypes
from ahc.Ahc import ComponentRegistry
from Waves.DepthFirstSearch import DfsTraverse
from Channels.Channels import P2PFIFOPerfectChannel
from LinkLayers.GenericLinkLayer import LinkLayer
from ahc.Waves.DepthFirstSearch import DfsTraverse
from ahc.Channels.Channels import P2PFIFOPerfectChannel
from ahc.LinkLayers.GenericLinkLayer import LinkLayer

registry = ComponentRegistry()

Expand Down
6 changes: 3 additions & 3 deletions Waves/test_tarrys.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

from ahc.Ahc import ComponentModel, Event, ConnectorTypes, Topology, EventTypes
from ahc.Ahc import ComponentRegistry
from Waves.Tarrys import TarrysTraverse
from Channels.Channels import P2PFIFOPerfectChannel
from LinkLayers.GenericLinkLayer import LinkLayer
from ahc.Waves.Tarrys import TarrysTraverse
from ahc.Channels.Channels import P2PFIFOPerfectChannel
from ahc.LinkLayers.GenericLinkLayer import LinkLayer

registry = ComponentRegistry()

Expand Down

0 comments on commit 4518e6b

Please sign in to comment.