FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E > Class Template Reference

P2-DPOP's UTIL propagation module, using partially homomorphic encryption on utilities and a linear order on variables. More...

Inheritance diagram for frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >:

Classes

class  VariableInfo
 A convenience class used to store information about a variable. More...

Public Member Functions

 EncryptedUTIL (DCOPProblemInterface< V, U > problem, Element parameters) throws ClassNotFoundException
 Constructor from XML descriptions.
 EncryptedUTIL (Element parameters, DCOPProblemInterface< V, U > problem)
 The constructor called in "statistics gatherer" mode.
void reset ()
void setSilent (boolean silent)
void setQueue (Queue queue)
void getStatsFromQueue (Queue queue)
Integer getMaxMsgDim ()
Collection< MessageTypegetMsgTypes ()
void notifyIn (Message msg)
long getFinalTime ()
 Returns the time at which this module has finished, determined by looking at the timestamp of the stat messages.
Decision notifyOut (Message msg)
 Re-encrypts UTIL messages the first time they leave the agent.
Public Member Functions inherited from frodo2.communication.IncomingMsgPolicyInterface< T >
default void notifyIn (Message msg, Object toAgent)
 Notifies the listener of an incoming message.
Public Member Functions inherited from frodo2.communication.OutgoingMsgPolicyInterface< T >
default Decision notifyOut (Object fromAgent, Message msg)
 Notifies the listener of an outgoing message.
default Decision notifyOut (Object fromAgent, Message msg, Collection<? extends Object > toAgents)
 Notifies the listener of an outgoing message.
default Decision notifyOut (Message msg, Collection<? extends Object > toAgents)
 Notifies the listener of an outgoing message.

Static Public Attributes

static final MessageType CODENAME_TYPE = VariableObfuscation.CODE_NAME_TYPE
 The type of the message used to share codeName with children.

Static Package Attributes

static final MessageType LEAF_MSG_TYPE = new MessageType ("P2-DPOP", "EncryptedUTIL", "Start")
 The type of the token sent by the root to the last variable in the linear ordering to tell it to start UTIL propagation.
static final MessageType ENCRYPTED_UTIL_TYPE = new MessageType ("P2-DPOP", "EncryptedUTIL", "UTIL")
 The type of the encrypted UTIL messages.

Private Member Functions

void init ()
 Initiate the module.
void projectAndSend (UtilitySolutionSpaceLimited< V, U, E > space, VariableInfo info)
 Projects out a variable and sends the result to its parent (if any) or sends a reroot request.
findOptimalValueForIsolatedVar (VariableInfo varInfo)
void askDecrypt (UtilitySolutionSpaceLimited< V, U, E > space, VariableInfo info)
 Find out the optimal value of a variable.
void sendToParent (String var, UtilitySolutionSpaceLimited< V, U, E > space)
 Sends a UTIL message.
void sendOutput (U utility, V optValue, String var)
 Sends the output utility to itself and to the statistics monitor.
String generateCodeName ()
 Genereate a codeName and add it to the list of the used codeNames for this agent.
V[] randomDomain (String var)
 Generates a domain of random numbers.
void record (UtilitySolutionSpace< V, U > space, VariableInfo info)
 Records the input space until spaces from all children have been received.

Private Attributes

SecureRandom rand = new SecureRandom()
 A source of randomness.
Set< String > codeNames
 List of all codeNames used by this agent.
DCOPProblemInterface< V, U > problem
 This problem.
long finalTime
 The time when the last stat message has been received.
int maxMsgDim = 0
 In stats gatherer mode, the maximum number of variables in a UTIL message.
Queue queue
 Queue to receive messages.
Map< String, VariableInfoinfos
 For each variable this agent owns, its relevant information.
infinity
 An encrypted version of +INF.
final boolean minNCCCs
 Whether to minimize the NCCC count, at the expense of an increase in runtime.
boolean mergeBack
 If merging back edges is allowed (i.e.
boolean start = false
 If this module has started or not.
Class< E > encryptedUtilClass
 Class used for encrypted utilities.
HashMap< EncrUTIL< V, U, E >, VariableInfoutilSent = new HashMap< EncrUTIL<V, U, E>, VariableInfo > ()
 A set of UTIL messages sent, used to detect when one leaves the agent, so as only to re-encrypt it then.
boolean reportStats = true
 Whether to report stats.

Detailed Description

P2-DPOP's UTIL propagation module, using partially homomorphic encryption on utilities and a linear order on variables.

This is an optimization version of the ConsistencyProp() and FeasibleValue() procedures from the following paper: Thomas Leaute and Boi Faltings. Privacy-preserving multi-agent constraint satisfaction. In Proceedings of the 2009 IEEE International Conference on PrivAcy, Security, riSk and Trust (PASSAT'09), Vancouver, British Columbia, August 29-31 2009. IEEE Computer Society Press.

Author
Eric Zbinden, Thomas Leaute
Parameters
<V>the type used for variable values
<U>the type used for cleartext utility values
<E>the type used for encrypted utility values

Constructor & Destructor Documentation

◆ EncryptedUTIL() [1/2]

frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.EncryptedUTIL ( DCOPProblemInterface< V, U > problem,
Element parameters ) throws ClassNotFoundException

Constructor from XML descriptions.

Parameters
problemdescription of the problem
parametersdescription of the parameters of EncryptedUTIL
Exceptions
ClassNotFoundExceptionif specified utility classes are not found

References EncryptedUTIL(), and problem.

Referenced by EncryptedUTIL().

Here is the call graph for this function:

◆ EncryptedUTIL() [2/2]

frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.EncryptedUTIL ( Element parameters,
DCOPProblemInterface< V, U > problem )

The constructor called in "statistics gatherer" mode.

Parameters
problemthe overall problem
parametersthe description of what statistics should be reported

References problem.

Member Function Documentation

◆ askDecrypt()

◆ findOptimalValueForIsolatedVar()

◆ generateCodeName()

String frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.generateCodeName ( )
private

Genereate a codeName and add it to the list of the used codeNames for this agent.

Returns
a codeName

References codeNames, and rand.

◆ getFinalTime()

long frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.getFinalTime ( )

Returns the time at which this module has finished, determined by looking at the timestamp of the stat messages.

Returns
the time at which this module has finished

References finalTime.

◆ getMaxMsgDim()

Integer frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.getMaxMsgDim ( )
Returns
the maximum number of variables in a UTIL message (in stats gatherer mode only)

◆ getMsgTypes()

◆ getStatsFromQueue()

◆ init()

void frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.init ( )
private

Initiate the module.

References problem.

Referenced by notifyIn().

◆ notifyIn()

◆ notifyOut()

◆ projectAndSend()

void frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.projectAndSend ( UtilitySolutionSpaceLimited< V, U, E > space,
VariableInfo info )
private

Projects out a variable and sends the result to its parent (if any) or sends a reroot request.

Parameters
infoinformation about the variable to be projected out
spacethe space received in EncryptedUTIL (and null if the variable is a leaf)

References projectAndSend().

Referenced by projectAndSend().

Here is the call graph for this function:

◆ randomDomain()

V[] frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.randomDomain ( String var)
private

Generates a domain of random numbers.

Parameters
varthe variable for which the domain must be created
Returns
a random domain of values in form of a array of size specified
Todo
Make all obfuscated domains with the same size (given as a parameter in the XML file).

References frodo2.solutionSpaces.DCOPProblemInterface< V extends Addable< V >, U extends Addable< U > >.getDomain(), and rand.

Here is the call graph for this function:

◆ record()

void frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.record ( UtilitySolutionSpace< V, U > space,
VariableInfo info )
private

Records the input space until spaces from all children have been received.

Parameters
spacethe space to be recorded
infothe information on the variable responsible for the space

References frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.VariableInfo.localSpaces.

◆ reset()

void frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.reset ( )

◆ sendOutput()

void frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.sendOutput ( U utility,
V optValue,
String var )
private

Sends the output utility to itself and to the statistics monitor.

Parameters
utilityThe utility corresponding to optimal value
optValuethe optimal value
varthe variable who send

References infos, frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.VariableInfo.iteration, frodo2.output, queue, frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.VariableInfo.reset(), and frodo2.communication.Queue.sendMessageToSelf().

Here is the call graph for this function:

◆ sendToParent()

◆ setQueue()

void frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.setQueue ( Queue queue)

◆ setSilent()

void frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.setSilent ( boolean silent)

Member Data Documentation

◆ CODENAME_TYPE

◆ codeNames

Set<String> frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.codeNames
private

List of all codeNames used by this agent.

Referenced by generateCodeName().

◆ ENCRYPTED_UTIL_TYPE

◆ encryptedUtilClass

Class<E> frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.encryptedUtilClass
private

Class used for encrypted utilities.

◆ finalTime

long frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.finalTime
private

The time when the last stat message has been received.

Referenced by getFinalTime().

◆ infinity

E frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.infinity
private

An encrypted version of +INF.

◆ infos

Map<String, VariableInfo> frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.infos
private

For each variable this agent owns, its relevant information.

Referenced by sendOutput(), and sendToParent().

◆ LEAF_MSG_TYPE

final MessageType frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.LEAF_MSG_TYPE = new MessageType ("P2-DPOP", "EncryptedUTIL", "Start")
staticpackage

The type of the token sent by the root to the last variable in the linear ordering to tell it to start UTIL propagation.

Referenced by frodo2.algorithms.dpop.privacy.LeafMsg.LeafMsg().

◆ maxMsgDim

int frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.maxMsgDim = 0
private

In stats gatherer mode, the maximum number of variables in a UTIL message.

◆ mergeBack

boolean frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.mergeBack
private

If merging back edges is allowed (i.e.

one variable is always identified by the same codename, regardless of the pseudo-child)

◆ minNCCCs

final boolean frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.minNCCCs
private

Whether to minimize the NCCC count, at the expense of an increase in runtime.

◆ problem

DCOPProblemInterface<V, U> frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.problem
private

This problem.

Referenced by EncryptedUTIL(), EncryptedUTIL(), and init().

◆ queue

Queue frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.queue
private

Queue to receive messages.

Referenced by getStatsFromQueue(), sendOutput(), sendToParent(), and setQueue().

◆ rand

SecureRandom frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.rand = new SecureRandom()
private

A source of randomness.

Referenced by generateCodeName(), and randomDomain().

◆ reportStats

boolean frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.reportStats = true
private

Whether to report stats.

◆ start

boolean frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.start = false
private

If this module has started or not.

Referenced by notifyIn().

◆ utilSent

HashMap< EncrUTIL<V, U, E>, VariableInfo > frodo2.algorithms.dpop.privacy.EncryptedUTIL< V extends Addable< V >, U extends Addable< U >, E extends AddableLimited< U, E >.utilSent = new HashMap< EncrUTIL<V, U, E>, VariableInfo > ()
private

A set of UTIL messages sent, used to detect when one leaves the agent, so as only to re-encrypt it then.

Referenced by sendToParent().


The documentation for this class was generated from the following file: