types icon indicating copy to clipboard operation
types copied to clipboard

Feature: Standardised interface for entailment rules

Open jeswr opened this issue 2 years ago • 14 comments

I'm currently working on inferencing engines for the web and noticed that there seems to be a lack of standardisation for the representation of entailment rules. I was wondering whether it would be appropriate to add an interface to the @rdfjs/types package along the lines of:

interface Rule {
  /**
   * Antecedents for the rule
   */
  antecedents: RDF.Quad[]; // Note: Order doesn't theoretically matter so this could also be a set
  /**
   * Consequent(s) for the rule
   */
  consequences: RDF.Quad[]; // Possibly could be RDF.Quad[] | boolean or RDF.Quad[] | false
  /**
   * @param other The rule to compare with.
   * @return True if and only if other has the same sets of antecedents and consequences
   */
  equals(other: Rule | null | undefined): boolean;
}

jeswr avatar Nov 26 '21 12:11 jeswr