diff --git a/Clocks/testlogicalclock.py b/Clocks/testlogicalclock.py index 757c403..eb9c670 100644 --- a/Clocks/testlogicalclock.py +++ b/Clocks/testlogicalclock.py @@ -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): diff --git a/Consensus/testpaxosconsensus.py b/Consensus/testpaxosconsensus.py index 0a80219..0118e50 100644 --- a/Consensus/testpaxosconsensus.py +++ b/Consensus/testpaxosconsensus.py @@ -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) diff --git a/Consensus/testraftconsensus.py b/Consensus/testraftconsensus.py index e41e97c..b5a54dc 100644 --- a/Consensus/testraftconsensus.py +++ b/Consensus/testraftconsensus.py @@ -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() diff --git a/Election/testElectionEchoExtinction.py b/Election/testElectionEchoExtinction.py index 086f654..2517a35 100644 --- a/Election/testElectionEchoExtinction.py +++ b/Election/testElectionEchoExtinction.py @@ -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() diff --git a/Election/testElectionSpira.py b/Election/testElectionSpira.py index d1839fb..d06b51a 100644 --- a/Election/testElectionSpira.py +++ b/Election/testElectionSpira.py @@ -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() diff --git a/MutualExclusion/testBakery.py b/MutualExclusion/testBakery.py index c1b470c..d9d41c4 100644 --- a/MutualExclusion/testBakery.py +++ b/MutualExclusion/testBakery.py @@ -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): diff --git a/MutualExclusion/testPeterson.py b/MutualExclusion/testPeterson.py index 9a3375a..9aef27c 100644 --- a/MutualExclusion/testPeterson.py +++ b/MutualExclusion/testPeterson.py @@ -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): diff --git a/MutualExclusion/testRaymond.py b/MutualExclusion/testRaymond.py index cfa709a..97ebc9b 100644 --- a/MutualExclusion/testRaymond.py +++ b/MutualExclusion/testRaymond.py @@ -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 diff --git a/MutualExclusion/testRicartAgrawala.py b/MutualExclusion/testRicartAgrawala.py index e923e08..9e13a6a 100755 --- a/MutualExclusion/testRicartAgrawala.py +++ b/MutualExclusion/testRicartAgrawala.py @@ -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 diff --git a/PhysicalLayers/testUsrp.py b/PhysicalLayers/testUsrp.py index 8968ada..abf1f66 100644 --- a/PhysicalLayers/testUsrp.py +++ b/PhysicalLayers/testUsrp.py @@ -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 diff --git a/PhysicalLayers/testUsrpForDocker.py b/PhysicalLayers/testUsrpIndividually.py similarity index 94% rename from PhysicalLayers/testUsrpForDocker.py rename to PhysicalLayers/testUsrpIndividually.py index 460abfd..566eedb 100644 --- a/PhysicalLayers/testUsrpForDocker.py +++ b/PhysicalLayers/testUsrpIndividually.py @@ -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 @@ -106,11 +106,11 @@ def main(argv): try: opts, args = getopt.getopt(argv,"hi:",["id="]) except getopt.GetoptError: - print ("testXXX.py -i ") + print ("testUsrpIndividually.py -i ") sys.exit(2) for opt, arg in opts: if opt == '-h': - print ("testXXX.py -i ") + print ("testUsrpIndividually.py -i ") sys.exit() elif opt in ("-i", "--ifile"): id = arg diff --git a/SelfStabilization/test.py b/SelfStabilization/test.py index f5e689d..68aed01 100644 --- a/SelfStabilization/test.py +++ b/SelfStabilization/test.py @@ -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(): diff --git a/SelfStabilization/testbenchmark.py b/SelfStabilization/testbenchmark.py index 04dc05f..19552c8 100644 --- a/SelfStabilization/testbenchmark.py +++ b/SelfStabilization/testbenchmark.py @@ -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) diff --git a/Snapshot/testsnapshot.py b/Snapshot/testsnapshot.py index d3ed26c..58881d1 100755 --- a/Snapshot/testsnapshot.py +++ b/Snapshot/testsnapshot.py @@ -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 diff --git a/Waves/testTreeAlgorithm.py b/Waves/testTreeAlgorithm.py index 9594582..437b244 100644 --- a/Waves/testTreeAlgorithm.py +++ b/Waves/testTreeAlgorithm.py @@ -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(): diff --git a/Waves/test_awerbuch.py b/Waves/test_awerbuch.py index 3763274..8120724 100644 --- a/Waves/test_awerbuch.py +++ b/Waves/test_awerbuch.py @@ -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 diff --git a/Waves/test_cidon.py b/Waves/test_cidon.py index 7c306bd..f57f8b3 100644 --- a/Waves/test_cidon.py +++ b/Waves/test_cidon.py @@ -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 diff --git a/Waves/test_dfs.py b/Waves/test_dfs.py index 1279e51..aa9f7fa 100644 --- a/Waves/test_dfs.py +++ b/Waves/test_dfs.py @@ -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() diff --git a/Waves/test_tarrys.py b/Waves/test_tarrys.py index a8af947..d69f601 100644 --- a/Waves/test_tarrys.py +++ b/Waves/test_tarrys.py @@ -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()