Removing static variables

This commit is contained in:
Leonardo Bautista-Gomez 2023-02-08 20:10:26 +01:00
parent b64fe7b383
commit 6334d1c779
8 changed files with 11 additions and 34 deletions

View File

@ -6,8 +6,6 @@ from bitarray.util import zeros
class Block:
blockSize = 0
data = bitarray()
def __init__(self, blockSize):
self.blockSize = blockSize

View File

@ -4,7 +4,6 @@ import configparser
class Configuration:
deterministic = 0
def __init__(self, fileName):

View File

@ -4,18 +4,16 @@ from DAS.block import *
class Observer:
block = []
rows = []
columns = []
goldenData = []
broadcasted = []
config = []
logger = []
def __init__(self, logger, config):
self.config = config
self.format = {"entity": "Observer"}
self.logger = logger
self.block = []
self.rows = []
self.columns = []
self.goldenData = []
self.broadcasted = []
def reset(self):
self.block = [0] * self.config.blockSize * self.config.blockSize

View File

@ -6,10 +6,6 @@ from dicttoxml import dicttoxml
class Result:
shape = []
missingVector = []
blockAvailable = -1
tta = -1
def __init__(self, shape):
self.shape = shape

View File

@ -1,12 +1,6 @@
#!/bin/python3
class Shape:
run = 0
numberValidators = 0
blockSize = 0
failureRate = 0
netDegree = 0
chi = 0
def __init__(self, blockSize, numberValidators, failureRate, chi, netDegree, run):
self.run = run

View File

@ -10,19 +10,16 @@ from DAS.validator import *
class Simulator:
proposerID = 0
logLevel = logging.INFO
validators = []
glob = []
result = []
shape = []
logger = []
format = {}
def __init__(self, shape):
self.shape = shape
self.format = {"entity": "Simulator"}
self.result = Result(self.shape)
self.validators = []
self.logger = []
self.logLevel = logging.INFO
self.proposerID = 0
self.glob = []
def initValidators(self):
self.glob = Observer(self.logger, self.shape)

View File

@ -20,11 +20,6 @@ class Neighbor:
class Validator:
ID = 0
amIproposer = 0
shape = []
format = {}
logger = []
def __repr__(self):
return str(self.ID)