graphStore

Graph · Kotlin object GraphStoreModule · library prolog.argumentation.graph.store

The argumentation graph kept in the active context, and its labels (module graphStore): the only module reading and writing them in the context; the terms are those of the data modules (argument, support, attack, label, statement).

Besides the graph itself (argument/1, support/2, attack/4 terms), the context keeps:

  • conc(Conclusion) :- argument(A) and arg(Id) :- argument(A), the arguments by conclusion and by identifier (context_id);
  • newConc(Tag, Conclusion), the conclusions of the arguments saved under a tag (the round of the graph builder);
  • a compact copy of the graph by argument identifiers: argInfo(Id, InfoId, Info), supportId(IdA, IdB), attackId(Type, IdA, IdB, IdOn). Loops over the graph go through it, so that resolution steps carry integers rather than whole arguments; InfoId identifies the info of the arguments (see the module argument), what the preferences weigh;
  • the labels of the arguments and of the statements (see the module label).

Only the attacks found are saved: an attack on an argument is an attack on every argument built on it as well, and the attacks are read with those (attack/4, attackById/4, attacksById/2, attackIn/5, and the attack graph of the native labellings), extended once until the attacks or the supports change (see ExpandedAttacks).

PredicateDescription
saveArgument/3Argument, for Conclusion, is saved under Tag, unless it already is
saveArguments/2Each of Arguments saved under Tag, for its conclusion (see saveArgument/3)
argument/1Argument is saved
arguments/1Arguments are the saved arguments
argumentFor/2Argument is saved for Conclusion
argumentUnifiable/2Argument is saved for a conclusion unifying with Conclusion, which it is not bound to
argumentById/2Argument is saved with the identifier Id
argumentId/2Id is the identifier of Argument (see context_id/2)
argumentIds/1Ids are the identifiers of the saved arguments
argumentByIdIn/3Argument is saved with the identifier Id in the context branch Branch
excludeArguments/0The saved arguments are left out of the graph the labellings label (by their identifiers), until included
includeArgument/2Argument, with identifier Id, is in the graph the labellings label again
argumentInfo/3The argument with identifier Id has the info Info, with identifier InfoId
newConclusion/2An argument for Conclusion was saved under Tag
forgetNewConclusions/1The conclusions saved under Tag are forgotten (not their arguments)
saveSupport/2Supporter, a sub-argument of Supported, is saved as supporting it, unless it already is
saveSupports/1Each of Supports, support(Supporter, Supported), saved (see saveSupport/2)
support/2Supporter supports Supported
supports/1Supports are the (Supporter, Supported) pairs saved
supportedById/2The argument with identifier SuperId is supported by the one with identifier Id, directly or not
saveAttack/4Attacker attacks Attacked on its sub-argument On (Attacked itself for a direct attack), with an attack of Type, unless it already does
saveAttacks/1Each of Attacks, attack(Type, Attacker, Attacked, On), saved (see saveAttack/4)
saveAttackById/7As saveAttack/4, with the identifiers of the arguments known
removeAttack/4The attack is removed, in all its forms
attack/4Attacker attacks Attacked on On, with an attack of Type: saved, or extended to Attacked from On, which it is built on
attacks/1Attacks are the (Type, Attacker, Attacked, On) attacks, saved or extended (see attack/4)
attackById/4The attack, saved or extended, by the identifiers of its arguments
attacksById/2The argument with identifier IdAttacker attacks the one with identifier IdAttacked
labelArgument/2Argument is labelled with Label (in, out or und)
labelArgument/3Argument, with identifier Id, is labelled with Label, by itself and by its identifier
unlabelArguments/1The arguments labelled with Label no longer are, by themselves and by their identifiers
argumentLabelById/2The argument with identifier Id is labelled with Label
argumentLabelByIdIn/3The argument with identifier Id is labelled with Label in the context branch Branch
labelledIds/2Ids are the identifiers of the arguments labelled with Label
argumentLabel/2Argument is labelled with Label
labelStatement/2Statement is labelled with Label
statementLabel/2Statement is labelled with Label
labelledArguments/2Arguments are those labelled with Label
argumentIn/2
supportIn/3
attackIn/5
argumentLabelIn/3
graph/3The arguments, the (Type, A, B, C) attacks and the (A, B) supports, each sorted
argumentLabelling/3The arguments labelled IN, OUT and UND, each sorted
statementLabelling/3The statements labelled IN, OUT and UND, each sorted
claimLabelling/3The claims of the arguments labelled IN, OUT and UND (the abstract arguments, see abstract::solve/5), each sorted
expandedAttack/4graphStore::expandedAttack(?Type, ?Attacker, ?Attacked, ?On): the attacks, saved or extended (see ExpandedAttacks)
expandedAttackById/4graphStore::expandedAttackById(?Type, ?IdAttacker, ?IdAttacked, ?IdOn): the attacks, saved or extended (see ExpandedAttacks), by identifiers
expandedAttackIn/5graphStore::expandedAttackIn(+Branch, ?Type, ?Attacker, ?Attacked, ?On): as expandedAttack/4, in the given branch

saveArgument/3

saveArgument(+Tag, +Conclusion, +Argument)

Argument, for Conclusion, is saved under Tag, unless it already is.

saveArguments/2

saveArguments(+Tag, +Arguments)

Each of Arguments saved under Tag, for its conclusion (see saveArgument/3).

argument/1

argument(?Argument)

Argument is saved.

arguments/1

arguments(-Arguments)

Arguments are the saved arguments.

argumentFor/2

argumentFor(?Conclusion, ?Argument)

Argument is saved for Conclusion.

argumentUnifiable/2

argumentUnifiable(+Conclusion, -Argument)

Argument is saved for a conclusion unifying with Conclusion, which it is not bound to.

argumentById/2

argumentById(?Id, ?Argument)

Argument is saved with the identifier Id.

argumentId/2

argumentId(+Argument, -Id)

Id is the identifier of Argument (see context_id/2).

argumentIds/1

argumentIds(-Ids)

Ids are the identifiers of the saved arguments.

argumentByIdIn/3

argumentByIdIn(+Branch, ?Id, ?Argument)

Argument is saved with the identifier Id in the context branch Branch.

excludeArguments/0

excludeArguments

The saved arguments are left out of the graph the labellings label (by their identifiers), until included.

includeArgument/2

includeArgument(+Id, +Argument)

Argument, with identifier Id, is in the graph the labellings label again.

argumentInfo/3

argumentInfo(?Id, ?InfoId, ?Info)

The argument with identifier Id has the info Info, with identifier InfoId.

newConclusion/2

newConclusion(?Tag, ?Conclusion)

An argument for Conclusion was saved under Tag.

forgetNewConclusions/1

forgetNewConclusions(?Tag)

The conclusions saved under Tag are forgotten (not their arguments).

saveSupport/2

saveSupport(+Supporter, +Supported)

Supporter, a sub-argument of Supported, is saved as supporting it, unless it already is.

saveSupports/1

saveSupports(+Supports)

Each of Supports, support(Supporter, Supported), saved (see saveSupport/2).

support/2

support(?Supporter, ?Supported)

Supporter supports Supported.

supports/1

supports(-Supports)

Supports are the (Supporter, Supported) pairs saved.

supportedById/2

supportedById(+Id, -SuperId)

The argument with identifier SuperId is supported by the one with identifier Id, directly or not.

saveAttack/4

saveAttack(+Type, +Attacker, +Attacked, +On)

Attacker attacks Attacked on its sub-argument On (Attacked itself for a direct attack), with an attack of Type, unless it already does.

saveAttacks/1

saveAttacks(+Attacks)

Each of Attacks, attack(Type, Attacker, Attacked, On), saved (see saveAttack/4).

saveAttackById/7

saveAttackById(+Type, +IdAttacker, +Attacker, +IdAttacked, +Attacked, +IdOn, +On)

As saveAttack/4, with the identifiers of the arguments known.

removeAttack/4

removeAttack(+Type, +Attacker, +Attacked, +On)

The attack is removed, in all its forms.

attack/4

attack(?Type, ?Attacker, ?Attacked, ?On)

Attacker attacks Attacked on On, with an attack of Type: saved, or extended to Attacked from On, which it is built on.

attacks/1

attacks(-Attacks)

Attacks are the (Type, Attacker, Attacked, On) attacks, saved or extended (see attack/4).

attackById/4

attackById(?Type, ?IdAttacker, ?IdAttacked, ?IdOn)

The attack, saved or extended, by the identifiers of its arguments.

attacksById/2

attacksById(?IdAttacker, ?IdAttacked)

The argument with identifier IdAttacker attacks the one with identifier IdAttacked.

labelArgument/2

labelArgument(+Label, +Argument)

Argument is labelled with Label (in, out or und).

labelArgument/3

labelArgument(+Label, +Argument, +Id)

Argument, with identifier Id, is labelled with Label, by itself and by its identifier.

unlabelArguments/1

unlabelArguments(+Label)

The arguments labelled with Label no longer are, by themselves and by their identifiers.

argumentLabelById/2

argumentLabelById(?Label, ?Id)

The argument with identifier Id is labelled with Label.

argumentLabelByIdIn/3

argumentLabelByIdIn(+Branch, ?Label, ?Id)

The argument with identifier Id is labelled with Label in the context branch Branch.

labelledIds/2

labelledIds(+Label, -Ids)

Ids are the identifiers of the arguments labelled with Label.

argumentLabel/2

argumentLabel(?Label, ?Argument)

Argument is labelled with Label.

labelStatement/2

labelStatement(+Label, +Statement)

Statement is labelled with Label.

statementLabel/2

statementLabel(?Label, ?Statement)

Statement is labelled with Label.

labelledArguments/2

labelledArguments(+Label, -Arguments)

Arguments are those labelled with Label.

argumentIn/2

argumentIn(+Branch, ?Argument)

supportIn/3

supportIn(+Branch, ?Supporter, ?Supported)

attackIn/5

attackIn(+Branch, ?Type, ?Attacker, ?Attacked, ?On)

argumentLabelIn/3

argumentLabelIn(+Branch, ?Label, ?Argument)

graph/3

graph(-Arguments, -Attacks, -Supports)

The arguments, the (Type, A, B, C) attacks and the (A, B) supports, each sorted.

argumentLabelling/3

argumentLabelling(-In, -Out, -Und)

The arguments labelled IN, OUT and UND, each sorted.

statementLabelling/3

statementLabelling(-In, -Out, -Und)

The statements labelled IN, OUT and UND, each sorted.

claimLabelling/3

claimLabelling(-In, -Out, -Und)

The claims of the arguments labelled IN, OUT and UND (the abstract arguments, see abstract::solve/5), each sorted.

expandedAttack/4

expandedAttack/4

Native primitive.

graphStore::expandedAttack(?Type, ?Attacker, ?Attacked, ?On): the attacks, saved or extended (see ExpandedAttacks)

expandedAttackById/4

expandedAttackById/4

Native primitive.

graphStore::expandedAttackById(?Type, ?IdAttacker, ?IdAttacked, ?IdOn): the attacks, saved or extended (see ExpandedAttacks), by identifiers

expandedAttackIn/5

expandedAttackIn/5

Native primitive.

graphStore::expandedAttackIn(+Branch, ?Type, ?Attacker, ?Attacked, ?On): as expandedAttack/4, in the given branch