Skip to content

Commit bb94fa9

Browse files
author
“jklein94”
committed
Added missing javadocs and fixed javadoc errors
1 parent 69fe64c commit bb94fa9

110 files changed

Lines changed: 2490 additions & 1784 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

org-tweetyproject-arg-aba/src/main/java/org/tweetyproject/arg/aba/parser/AbaParser.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ public void setSymbolTrue(String symbolTrue) {
175175

176176
/**
177177
* Gets the symbol used to separate the head and body in rules.
178-
* This is the arrow symbol used to define rules in the form of head <- body.
179178
*
180179
* @return the symbol separating the head and body in rules
181180
*/

org-tweetyproject-arg-bipolar/src/main/java/org/tweetyproject/arg/bipolar/syntax/ArgumentSet.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
* @see Collection
4444
* @see Comparable
4545
*
46-
* @param <BArgument> the type of argument used in the argument set
4746
*
4847
* @author Lars Bengel
4948
*/

org-tweetyproject-arg-deductive/src/main/java/org/tweetyproject/arg/deductive/syntax/SimplePlLogicArgument.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,7 @@ public PlFormula getClaim() {
9191
}
9292

9393
/**
94-
* Returns a string representation of this argument in the form
95-
* "<support, claim>".
94+
* Returns a string representation
9695
*
9796
* @return The string representation of this argument.
9897
*/

org-tweetyproject-arg-delp/src/main/java/org/tweetyproject/arg/delp/semantics/CriterionOptionHandler.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@
3333
* in the command line and convert them into {@link ComparisonCriterion} instances.
3434
* </p>
3535
*
36-
* @param <ComparisonCriterion> the type of the comparison criterion handled by this option handler
37-
*
3836
* @author Linda Briesemeister
3937
*/
4038
public final class CriterionOptionHandler extends OptionHandler<ComparisonCriterion> {

org-tweetyproject-arg-dung/src/main/java/org/tweetyproject/arg/dung/analysis/NonGroundedCountInconsistencyMeasure.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@
3131
* Calculates the non-grounded count inconsistency measure of the given argumentation framework.
3232
* Non-grounded count inconsistency measure is the count of arguments in the argumentation framework
3333
* that are neither in any grounded extension nor attacked by any argument in grounded extensions.
34-
*
35-
* @param argumentationFramework The argumentation framework for which to calculate the non-grounded count inconsistency measure.
36-
* @return The non-grounded count inconsistency measure of the argumentation framework.
37-
* Returns the count of arguments that are not part of any grounded extension or attacked by any argument in grounded extensions.
3834
*/
3935
public class NonGroundedCountInconsistencyMeasure<T extends DungTheory> implements InconsistencyMeasure<T> {
4036

org-tweetyproject-arg-dung/src/main/java/org/tweetyproject/arg/dung/causal/syntax/CounterfactualStatement.java

Lines changed: 41 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@
2828
/**
2929
* This class describes a counterfactual causal statement like:
3030
* given phi, if v had been x then rho would be true
31-
*
31+
*
3232
* Reference: "Argumentation-based Causal and Counterfactual Reasoning" by
33-
* Lars Bengel, Lydia Blümel, Tjitze Rienstra and Matthias Thimm, published at 1st International Workshop on Argumentation
33+
* Lars Bengel, Lydia Blümel, Tjitze Rienstra and Matthias Thimm, published at
34+
* 1st International Workshop on Argumentation
3435
* for eXplainable AI (ArgXAI, co-located with COMMA ’22), September 12, 2022
35-
*
36+
*
3637
* @author Julian Sander
3738
* @version TweetyProject 1.23
3839
*
@@ -41,9 +42,13 @@ public class CounterfactualStatement extends InterventionalStatement {
4142

4243
/**
4344
* Creates a new counterfactual causal statement.
44-
* @param conclusions Conclusions, which would be true, iff this statement is true and the interventions were realized and the premises are met.
45+
*
46+
* @param conclusions Conclusions, which would be true, iff this statement is
47+
* true and the interventions were realized and the
48+
* premises are met.
4549
* @param interventions Maps explainable atoms to boolean values.
46-
* @param premises PlFormulas which have to be true, so that the conclusions can be drawn.
50+
* @param premises PlFormulas which have to be true, so that the
51+
* conclusions can be drawn.
4752
*/
4853
public CounterfactualStatement(HashSet<PlFormula> conclusions, HashMap<Proposition, Boolean> interventions,
4954
HashSet<PlFormula> premises) {
@@ -52,39 +57,56 @@ public CounterfactualStatement(HashSet<PlFormula> conclusions, HashMap<Propositi
5257

5358
@Override
5459
public boolean holds(CausalKnowledgeBase cKbase) {
55-
for(var conclusion : this.getConclusions()) {
56-
if(!checkCounterFactualStatement(cKbase, conclusion)) {
60+
for (var conclusion : this.getConclusions()) {
61+
if (!checkCounterFactualStatement(cKbase, conclusion)) {
5762
return false;
5863
}
5964
}
60-
65+
6166
return true;
6267
}
63-
68+
6469
@Override
65-
public void VisualizeHolds(CausalKnowledgeBase cKbase)
66-
{
70+
public void VisualizeHolds(CausalKnowledgeBase cKbase) {
6771
var causalKnowledgeBaseCopy = getIntervenedTwinModel(cKbase);
6872
causalKnowledgeBaseCopy.addAll(this.getPremises());
6973
var inducedAF = new InducedTheory(causalKnowledgeBaseCopy);
70-
DungTheoryPlotter.plotFramework(inducedAF, 3000, 2000,
71-
"Premises: " + this.getPremises().toString()
72-
+ " \n Interventions: " + this.getInterventions().toString()
73-
+ " \n Conclusions: " + this.getConclusions().toString());
74+
DungTheoryPlotter.plotFramework(inducedAF, 3000, 2000,
75+
"Premises: " + this.getPremises().toString()
76+
+ " \n Interventions: " + this.getInterventions().toString()
77+
+ " \n Conclusions: " + this.getConclusions().toString());
7478
}
75-
79+
7680
private boolean checkCounterFactualStatement(CausalKnowledgeBase cKbase, PlFormula conclusion) {
7781
var newKnowledgeBase = getIntervenedTwinModel(cKbase);
7882
return newKnowledgeBase.entails(this.getPremises(), conclusion);
7983
}
8084

85+
/**
86+
* Creates a new intervened twin model from the provided causal knowledge base.
87+
*
88+
* <p>
89+
* This method generates the twin model from the given causal knowledge base,
90+
* applies the specified
91+
* interventions to this twin model, and returns a new
92+
* {@code CausalKnowledgeBase} containing the
93+
* intervened twin model, assumptions, and beliefs from the original knowledge
94+
* base.
95+
*
96+
* @param cKbase The original {@code CausalKnowledgeBase} from which the twin
97+
* model and interventions are derived.
98+
* @return A new {@code CausalKnowledgeBase} that represents the intervened twin
99+
* model, including the original
100+
* assumptions and beliefs (excluding structural equations) from the
101+
* input knowledge base.
102+
*/
81103
protected CausalKnowledgeBase getIntervenedTwinModel(CausalKnowledgeBase cKbase) {
82104
var twin = cKbase.getCausalModel().getTwinModel();
83105
var interventions = this.getInterventions();
84-
for(var expAtom : interventions.keySet()) {
85-
twin.intervene( new Proposition(expAtom.getName() + "*"), interventions.get(expAtom).booleanValue());
106+
for (var expAtom : interventions.keySet()) {
107+
twin.intervene(new Proposition(expAtom.getName() + "*"), interventions.get(expAtom).booleanValue());
86108
}
87-
109+
88110
var newKnowledgeBase = new CausalKnowledgeBase(twin, cKbase.getAssumptions());
89111
newKnowledgeBase.addAll(cKbase.getBeliefsWithoutStructuralEquations());
90112
return newKnowledgeBase;

org-tweetyproject-arg-dung/src/main/java/org/tweetyproject/arg/dung/causal/syntax/InterventionalStatement.java

Lines changed: 53 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -28,75 +28,101 @@
2828
/**
2929
* This class describes an interventional causal statement like:
3030
* given phi, if v would be x then rho would be true
31-
*
31+
*
3232
* Reference: "Argumentation-based Causal and Counterfactual Reasoning" by
33-
* Lars Bengel, Lydia Blümel, Tjitze Rienstra and Matthias Thimm, published at 1st International Workshop on Argumentation
33+
* Lars Bengel, Lydia Blümel, Tjitze Rienstra and Matthias Thimm, published at
34+
* 1st International Workshop on Argumentation
3435
* for eXplainable AI (ArgXAI, co-located with COMMA ’22), September 12, 2022
35-
*
36+
*
3637
* @author Julian Sander
3738
* @version TweetyProject 1.23
3839
*
3940
*/
40-
public class InterventionalStatement extends CausalStatement{
41+
public class InterventionalStatement extends CausalStatement {
4142

4243
private HashMap<Proposition, Boolean> interventions;
44+
4345
/**
4446
* Creates a new interventional causal statement.
45-
* @param conclusions Conclusions, which would be true, iff this statement is true and the interventions were realized and the premises are met.
47+
*
48+
* @param conclusions Conclusions, which would be true, iff this statement is
49+
* true and the interventions were realized and the
50+
* premises are met.
4651
* @param interventions Maps explainable atoms to boolean values.
47-
* @param premises PlFormulas which have to be true, so that the conclusions can be drawn.
52+
* @param premises PlFormulas which have to be true, so that the
53+
* conclusions can be drawn.
4854
*/
4955
public InterventionalStatement(HashSet<PlFormula> conclusions, HashMap<Proposition, Boolean> interventions,
5056
HashSet<PlFormula> premises) {
5157
super(conclusions, premises);
52-
58+
5359
this.interventions = interventions;
5460
}
55-
56-
/**
57-
* Retrieves the interventions of this causal statement.
58-
*
59-
* @return A HashMap containing the interventions mapped from explainable atoms to their respective boolean values.
60-
*/
61-
public HashMap<Proposition, Boolean> getInterventions(){
61+
62+
/**
63+
* Retrieves the interventions of this causal statement.
64+
*
65+
* @return A HashMap containing the interventions mapped from explainable atoms
66+
* to their respective boolean values.
67+
*/
68+
public HashMap<Proposition, Boolean> getInterventions() {
6269
return new HashMap<Proposition, Boolean>(this.interventions);
6370
}
6471

6572
@Override
6673
public boolean holds(CausalKnowledgeBase cKbase) {
67-
for(var conclusion : this.getConclusions()) {
68-
if(!checkInterventionalStatement(cKbase, conclusion)) {
74+
for (var conclusion : this.getConclusions()) {
75+
if (!checkInterventionalStatement(cKbase, conclusion)) {
6976
return false;
7077
}
7178
}
72-
79+
7380
return true;
7481
}
75-
82+
7683
@Override
77-
public void VisualizeHolds(CausalKnowledgeBase cKbase)
78-
{
84+
public void VisualizeHolds(CausalKnowledgeBase cKbase) {
7985
var causalKnowledgeBaseCopy = getIntervenedCopy(cKbase);
8086
causalKnowledgeBaseCopy.addAll(this.getPremises());
8187
var inducedAF = new InducedTheory(causalKnowledgeBaseCopy);
82-
DungTheoryPlotter.plotFramework(inducedAF, 3000, 2000,
83-
"Premises: " + this.getPremises().toString()
84-
+ " \n Interventions: " + this.getInterventions().toString()
85-
+ " \n Conclusions: " + this.getConclusions().toString());
88+
DungTheoryPlotter.plotFramework(inducedAF, 3000, 2000,
89+
"Premises: " + this.getPremises().toString()
90+
+ " \n Interventions: " + this.getInterventions().toString()
91+
+ " \n Conclusions: " + this.getConclusions().toString());
8692
}
87-
93+
8894
private boolean checkInterventionalStatement(CausalKnowledgeBase cKbase, PlFormula conclusion) {
8995
var newKnowledgeBase = getIntervenedCopy(cKbase);
9096
return newKnowledgeBase.entails(this.getPremises(), conclusion);
9197
}
9298

99+
/**
100+
* Creates a new intervened copy of the provided causal knowledge base.
101+
*
102+
* <p>
103+
* This method clones the causal model from the given causal knowledge base,
104+
* applies the specified
105+
* interventions to the cloned model, and returns a new
106+
* {@code CausalKnowledgeBase} containing the
107+
* intervened model, along with the original assumptions and beliefs from the
108+
* input knowledge base
109+
* (excluding structural equations).
110+
*
111+
* @param cKbase The original {@code CausalKnowledgeBase} from which the causal
112+
* model is cloned and
113+
* interventions are derived.
114+
* @return A new {@code CausalKnowledgeBase} that represents the intervened copy
115+
* of the original causal
116+
* knowledge base, including the original assumptions and beliefs
117+
* (excluding structural equations).
118+
*/
93119
protected CausalKnowledgeBase getIntervenedCopy(CausalKnowledgeBase cKbase) {
94120
var interventions = this.getInterventions();
95121
var causalModel = cKbase.getCausalModel().clone();
96-
for(var expAtom : interventions.keySet()) {
122+
for (var expAtom : interventions.keySet()) {
97123
causalModel.intervene(expAtom, interventions.get(expAtom).booleanValue());
98124
}
99-
125+
100126
var newKnowledgeBase = new CausalKnowledgeBase(causalModel, cKbase.getAssumptions());
101127
newKnowledgeBase.addAll(cKbase.getBeliefsWithoutStructuralEquations());
102128
return newKnowledgeBase;

org-tweetyproject-arg-dung/src/main/java/org/tweetyproject/arg/dung/examples/EquivalenceExample.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,19 @@
3232
* @author Lars Bengel
3333
*/
3434
public class EquivalenceExample {
35+
36+
/** Constructor */
37+
public EquivalenceExample() {
38+
}
39+
3540
/**
3641
* Example for Equivalence of Argumentation Frameworks
3742
*/
38-
public static void main(String[] args) {
43+
/**
44+
* Example
45+
* @param args args
46+
*/
47+
public static void main(String[] args) {
3948

4049
// Initialize Example Argumentation Frameworks
4150
Argument a = new Argument("a");

0 commit comments

Comments
 (0)