parser

Language · Kotlin object ParserModule · library prolog.argumentation.parser

The rules of a theory, read by the graph builders (module parser): convertAllRules/1 converts the rules, premises, preferences and burdens of the theory, which classicRule/2,3 and the other predicates read.

PredicateDescription
convertAllRules/1The rules, premises, preferences and burdens of the theory, in the formats the graph builders read (rl/1 clauses, strict/1, sup/2, abstractBp/1), asserted; Rules are what was asserted
supClosure/2The preferences stated, closed transitively: the ordering of rules and premises is a strict partial order (no sup(X, X) is added, should the stated ones make a cycle)
languagePremises/1The ordinary premises the languages of the theory state (graphLanguage), as [Id, Statement]
languageConflicts/1The conflicts the languages of the theory state (graphLanguage), as conflict(Statement, Other)
checkLanguages/0The theory is written in each of its languages (graphLanguage): each checks it, raising an error if not
rule/3The rule Id as converted (see convertAllRules/1), concluding Conclusion from Premises
candidates/3The number of rules and premises concluding Statement, counted up to Limit (an integer, or anything else for no limit)
checkStrict/1The rule or premise Id is strict
prolog/2Premise, as [prolog(Goal)], is a Prolog check
argued/1Premise, of a rule, is supported by an argument: neither a Prolog check nor a contrary
contrary/2Premise, as [~(Statement)], is a contrary premise
tupleToList/2The items of a conjunction, as a list (built with an accumulator rather than appending the lists of the two sides, which took a module call at every step)
classicRule/3The rule Id concludes Conclusion ([Statement]) from Premises (a list); with metaRules, applicable(Id) is its first premise
classicRule/2The premise Id concludes Conclusion ([Statement])
ruleUsing/2A rule concludes Conclusion (a statement) from Premise, among others: classicRule/3 and member/2 over its premises, through an index of the premises of the rules built once in the active context
prologStrictRules/1The Prolog clauses of the theory (Head :- Body) with no identifier (see RuleAnnotations) as strict rules, [Id, Body, Head], with prologStrictCompatibility on (none otherwise)
prologAxioms/1The Prolog facts of the theory with no identifier (see RuleAnnotations) as axioms, [Id, Fact], with prologStrictCompatibility on (none otherwise)
bpsNew/1The burdens of persuasion of the theory, its bp(...) facts, as abstractBp([...]) terms
prologPremises/1The Prolog facts of the theory with an identifier (see RuleAnnotations) as defeasible premises, [Id, Fact], with prologStrictCompatibility on (none otherwise)
prologDefeasibleRules/1The Prolog clauses of the theory (Head :- Body) with an identifier (see RuleAnnotations) as defeasible rules, [Id, Body, Head], with prologStrictCompatibility on (none otherwise)
extractId/2strict(Id) for the identifier of each of Rules (lists starting with it)
ruleToClause/2The rules and premises of the parser ([Id, Body, Head], [Id, Head]) as the clauses of the module rule
ruleToClauseNatural/2As ruleToClause/2, with naturalTerms: the statements written as text are turned into terms, the words in upper case and in brackets becoming their arguments

convertAllRules/1

convertAllRules(-Rules)

The rules, premises, preferences and burdens of the theory, in the formats the graph builders read (rl/1 clauses, strict/1, sup/2, abstractBp/1), asserted; Rules are what was asserted.

supClosure/2

supClosure(+Stated, -Closed)

The preferences stated, closed transitively: the ordering of rules and premises is a strict partial order (no sup(X, X) is added, should the stated ones make a cycle). The preferences concluded by arguments (defeasiblePref) are closed by a rule of the theory instead, as sup(X, Y), sup(Y, Z) -> sup(X, Z).

languagePremises/1

languagePremises(-Premises)

The ordinary premises the languages of the theory state (graphLanguage), as [Id, Statement].

languageConflicts/1

languageConflicts(-Conflicts)

The conflicts the languages of the theory state (graphLanguage), as conflict(Statement, Other).

checkLanguages/0

checkLanguages

The theory is written in each of its languages (graphLanguage): each checks it, raising an error if not.

rule/3

rule(?Id, ?Premises, ?Conclusion)

The rule Id as converted (see convertAllRules/1), concluding Conclusion from Premises.

candidates/3

candidates(+Statement, +Limit, -Count)

The number of rules and premises concluding Statement, counted up to Limit (an integer, or anything else for no limit)

checkStrict/1

checkStrict(?Id)

The rule or premise Id is strict.

prolog/2

prolog(?Premise, ?Goal)

Premise, as [prolog(Goal)], is a Prolog check.

argued/1

argued(+Premise)

Premise, of a rule, is supported by an argument: neither a Prolog check nor a contrary.

contrary/2

contrary(?Premise, ?Statement)

Premise, as [~(Statement)], is a contrary premise.

tupleToList/2

tupleToList(+Conjunction, -List)

The items of a conjunction, as a list (built with an accumulator rather than appending the lists of the two sides, which took a module call at every step)

classicRule/3

classicRule(?Id, ?Premises, ?Conclusion)

The rule Id concludes Conclusion ([Statement]) from Premises (a list); with metaRules, applicable(Id) is its first premise.

classicRule/2

classicRule(?Id, ?Conclusion)

The premise Id concludes Conclusion ([Statement]).

ruleUsing/2

ruleUsing(?Premise, ?Conclusion)

A rule concludes Conclusion (a statement) from Premise, among others: classicRule/3 and member/2 over its premises, through an index of the premises of the rules built once in the active context.

prologStrictRules/1

prologStrictRules(-Rules)

Native primitive.

The Prolog clauses of the theory (Head :- Body) with no identifier (see RuleAnnotations) as strict rules, [Id, Body, Head], with prologStrictCompatibility on (none otherwise)

prologAxioms/1

prologAxioms(-Axioms)

Native primitive.

The Prolog facts of the theory with no identifier (see RuleAnnotations) as axioms, [Id, Fact], with prologStrictCompatibility on (none otherwise)

bpsNew/1

bpsNew(-Bps)

Native primitive.

The burdens of persuasion of the theory, its bp(...) facts, as abstractBp([...]) terms

prologPremises/1

prologPremises(-Premises)

Native primitive.

The Prolog facts of the theory with an identifier (see RuleAnnotations) as defeasible premises, [Id, Fact], with prologStrictCompatibility on (none otherwise)

prologDefeasibleRules/1

prologDefeasibleRules(-Rules)

Native primitive.

The Prolog clauses of the theory (Head :- Body) with an identifier (see RuleAnnotations) as defeasible rules, [Id, Body, Head], with prologStrictCompatibility on (none otherwise)

extractId/2

extractId(+Rules, -Ids)

Native primitive.

strict(Id) for the identifier of each of Rules (lists starting with it)

ruleToClause/2

ruleToClause(+Rules, -Clauses)

Native primitive.

The rules and premises of the parser ([Id, Body, Head], [Id, Head]) as the clauses of the module rule

ruleToClauseNatural/2

ruleToClauseNatural(+Rules, -Clauses)

Native primitive.

As ruleToClause/2, with naturalTerms: the statements written as text are turned into terms, the words in upper case and in brackets becoming their arguments

Undocumented

Called by other modules, or dispatched to by the engine, with no %! comment:

  • premise/2