T
- is the type of the language that the ASPIC theory's rules range overpublic class AspicAttack<T extends Invertable> extends Attack
Modifier and Type | Field and Description |
---|---|
private java.util.Comparator<AspicArgument<T>> |
order
The binary ordring to determine if attacks are successfull
|
private RuleFormulaGenerator<T> |
rfgen
Used to transform ASPIC inference rules into words of the language they range over
|
(package private) boolean |
shortcut |
(package private) boolean |
successfull |
(package private) java.io.StringWriter |
sw
Logs attack attempts
|
Constructor and Description |
---|
AspicAttack(AspicArgument<T> active,
AspicArgument<T> passive)
Creates a new AspicAttack
|
Modifier and Type | Method and Description |
---|---|
static <T extends Invertable> |
determineAttackRelations(java.util.Collection<AspicArgument<T>> args,
java.util.Comparator<AspicArgument<T>> order,
RuleFormulaGenerator<T> rfgen)
Checks for defeats in a list of arguments
|
java.lang.String |
getLoggedOutput() |
boolean |
isSuccessfull() |
private void |
nl()
Writes a new line to the log
|
void |
resolve()
Determines whether the attack is successfull
|
void |
setOrder(java.util.Comparator<AspicArgument<T>> order)
Set an order for the arguments to determine if an attack ends in an defeat
|
private boolean |
setResult()
Marks this attack as successfull
|
void |
setRuleFormulaGenerator(RuleFormulaGenerator<T> rfg)
Set a new generator to transform rules into words of the language they range over
|
void |
setShortcut(boolean shortcut)
If shortcut is set the attack will stop after a successful defeat on one defeasible subargument
|
java.lang.String |
toString() |
contains, equals, getAttacked, getAttacker, getLdoFormula, getSignature, hashCode, isConflictFree
private java.util.Comparator<AspicArgument<T extends Invertable>> order
boolean successfull
boolean shortcut
java.io.StringWriter sw
private RuleFormulaGenerator<T extends Invertable> rfgen
public AspicAttack(AspicArgument<T> active, AspicArgument<T> passive)
active
- the attacking argumentpassive
- the attacked argumentpublic static <T extends Invertable> java.util.Collection<AspicAttack<T>> determineAttackRelations(java.util.Collection<AspicArgument<T>> args, java.util.Comparator<AspicArgument<T>> order, RuleFormulaGenerator<T> rfgen)
args
- a list of argumentsorder
- an comparator which should compare the arguments in argsprivate boolean setResult()
public boolean isSuccessfull()
public java.lang.String getLoggedOutput()
public void setShortcut(boolean shortcut)
shortcut
- is the new shortcut valueprivate void nl()
public void resolve()
public void setOrder(java.util.Comparator<AspicArgument<T>> order)
order
- the new orderpublic void setRuleFormulaGenerator(RuleFormulaGenerator<T> rfg)
rfg
- is the new formula generator