Feralcore Class Structure

Joshua Bloch recommends making classes immutable. This helps avoid side-effects and concurrency problems. As a precaution, Feralcore.java is currently singled-threaded. Perhaps at some point the top level of feralcore will be redesigned using Scala to leverage the Actor model. Feralcore would benefit from the code simplification provided by concurrency oriented programming (COP).

DEFINITION: An object is considered immutable if its state cannot change after it is constructed.

A class declared as "functional" has member functions that only take immutable objects as input. The exceptions are: objects of type YYrandom and Object. For example, some classes define the standard "equals" function, but they don't modify the Object that is passed in by reference. Similarly, The YYrandom object is only mutated by advancing its own PRNG state. Another exception is class NetWorker.java that takes as input references to Swing objects.

The word "functional" followed by "r" means it has a function that takes a reference to an object of type YYrandom.

Feralcore's adherence to the functional programming style in Java
ClassFunctional AdherenceMutability
Addrenum.java ENUM immutable - enumeration type
BCD.java functionalimmutable - static members
Blowfishcbc.java functionalimmutable
Blowfishcbcdec.java functional immutable - returns data
ByteArray.java has byte[] immutable
ByteArrayFilter.java functional MUTABLE - stores YYlinkedhashmap that changes over time
CCRcomp.java functionalimmutable - static members
CharArray.java has char[] immutable
Clickactor.scala Scala actor - - - - -
Clientreq.java functional immutable
Core.java functional INTERFACE class
Core24bit.java functionalMUTABLE - stores core memory. Can read/write the memory over time.
Datagramsockactor.scala Scala actor - - - - -
Debugcfg.java functional immutable - static members
DHdeserialactor.scala Scala actor - - - - -
DHserialactor.scala Scala actor - - - - -
Disainput.java functional immutable - returns data
Disaoutput.java functional immutable - returns data
Disassembler.java functional immutable - invokes singleton factory method of class identifyopword
EAenum.java ENUM immutable
EffectiveAddr.java functional immutable - does pre-decrement on input Registers object (mutator)
ElGamalCText.java functional immutable - returns data
Elgamalkeypair.java functional immutable - returns data
Elgamalptext.java functional immutable - returns data
ElGCText.java functional immutable - returns data
ElGDecode.java functional immutable - returns data
ElGEmbedDecode.java functional immutable
Exec.scala functional - - - -
Fc3tuple.java functional immutable
Fc3tupledres.java functional immutable
Fc3tuplepair.java functional immutable
Fccfg.java functional immutable
Fccommandenum.java ENUM immutable - enumeration type
Fccounter.java functional immutable
Fcdebug.java functional ---------
Fclog.java functional MUTABLE - stores PrintWriter object, allows writing to file over time
FCMatcher.java functional immutable
Fcqueue.java functional MUTABLE - stores a queue of objects
Fcsend.java functional immutable
Fcsenddres.java functional immutable
Fcsendenum.java ENUM immutable - enumeration type
FCYYRerandtransApp.java functional ---------
Feralcore.scala functional ---------
Feralcorecfg.java functional immutable - static members
Feralcoreconstants.java functional immutable - all data members are static final
FeralcoreException.java functional ---------
Feralqueue.scala functional ---------
Flagsreg.java functional,r immutable
Gandalf.java functional,r immutable
Graphsim.java - - - - - - - -
HandlePacketRcv.java functional immutable
HMatch.java functional immutable
HMatchres.java functional immutable
Hybridctext.java functional immutable - returns data
Hybridptext.java functional immutable - returns data
IDatagramSocket.java has DatagramPacket MUTABLE - contains an object of type DatagramSocket that can be closed
Identifyopword.java functional immutable - uses Bloch's enum singleton pattern
Injectoractor.scala Scala actor - - - - - -
Injectordhactor.scala Scala actor - - - - - -
Injectorprogenum.java ENUM immutable
Injectorres.java functional immutable
Instroutput.java functional immutable
Linkedhashmapext.java functional MUTABLE - extends class LinkedHashMap which is a mutable object
Modmul.java functionalimmutable
Modmulres.java functionalimmutable
Movemrun.java functional immutable
NetWorker.java has StringBuffer --------- implements a SwingWorker thread for Fcdebug.java
Operandsize.java ENUM immutable - enumeration type
Opword.java ENUM immutable - enumeration type
Parsedrequestdata.java functional immutable - returns data
Pbdecres.java functional immutable - returns data
Pingfsmactor.scala Scala actor - - - - - -
Pingfsmstate.java functional immutable
Pingstate.java functional immutable
Printjavaproperties.java functional immutable
Process.java functional immutable
Procinfo.java functional immutable
Procinfocontainer.java functional immutable
Procinfocontdres.java functional immutable
Procinfodres.java functional immutable
RDByte.java functional immutable - returns data
Readbinfl.java functional immutable - returns data
Readdebugcfg.java functional immutable - returns data
Readferalcorecfg.java functional immutable - returns data
ReadRSAPubres.java functional immutable
Reg2.java functional immutable
Reg3.java functional immutable
Reg4.java functional immutable
Reg5.java functional immutable
Reg8.java functional immutable
Reg16.java functional immutable
Reg32.java functional immutable
Registers.java functional immutable
Registersdres.java has Registers immutable
Regs.java functional immutable
Requestdata.java functional immutable - returns data
Rerandelgamalctext.java functional immutable - returns data
Rerandisvalidres.java functional immutable
Rerandpacket.java functional immutable
Rerandpool.java functional,r MUTABLE - stores a pool of messages that changes over time, YYrandom used to select an element at random from pool
Rerandtrans.java functional immutable
Rerandtransutil.java functional,r immutable - YYrandom used for encryption and timing resistance in decryption
Responsedata.java functional immutable - returns data
RRBigs.java functional immutable
RRBigsdres.java functional immutable
RRloadpub.java functional immutable
Sauron.java functional immutable
Sendtofcres.java functional immutable
Serverinfdres.java functional immutable
Serverinfo.java functional immutable - has factory methods
Serverstate.java functionalimmmutable
Serverstatedres.java has Serverstate immutable - returns data
Sting.java functionalimmutable
Stou16.java functional immutable - returns data
StringArray.java functional immutable
Submit.java functional immutable
Testdisassembler.java functional immutable - static members
Testprocess.scala functional - - - - -
Tuplewriteactor.scala Scala actor - - - - - -
Utilfns.java functional immutable - static members
VCbits.java functional immutable - returns data
WLOpword.java functional immutable
Words.java functional immutable
YYbase64.java functionalimmutable - static members
YYblowfish.java functionalimmutable
YYcrypto.java functional immutable - static members
YYhash.java functional immutable - state does not change after construction
YYisaac.java functional MUTABLE - the PRNG state changes over time
YYlinkedhashmap.java functional MUTABLE - stores Linkedhashmapext that changes over time
YYrandom.java functional MUTABLE - stores an ISAAC PRNG object that changes over time
YYRSA.java functional,r immutable
YYRSAdecr.java functional immutable
YYRSAdecryption.java functional immutable
YYRSAKeypair.java functional immutable
YYtime.java functional immutable