Interface RuleFactory

All Known Implementing Classes:
DefaultRuleFactory

public interface RuleFactory
Factory for creating rules from atoms, atom sets, or iterators.
Author:
Clément Sipieter (INRIA) <clement@6pi.fr>
  • Method Details

    • create

      Rule create()
      Creates an empty rule.
      Returns:
      a new empty rule
    • create

      Rule create(Atom[] body, Atom[] head)
      Creates a rule from arrays of body and head atoms.
      Parameters:
      body - the body atoms
      head - the head atoms
      Returns:
      the created rule
    • create

      Creates a rule from iterators over body and head atoms.
      Parameters:
      body - the body atom iterator
      head - the head atom iterator
      Returns:
      the created rule
    • create

      Creates a labeled rule from iterators over body and head atoms.
      Parameters:
      label - the rule label
      body - the body atom iterator
      head - the head atom iterator
      Returns:
      the created rule
    • create

      Rule create(InMemoryAtomSet body, InMemoryAtomSet head)
      Creates a rule from in-memory body and head atom sets.
      Parameters:
      body - the rule body
      head - the rule head
      Returns:
      the created rule
    • create

      Rule create(String label, InMemoryAtomSet body, InMemoryAtomSet head)
      Creates a labeled rule from in-memory body and head atom sets.
      Parameters:
      label - the rule label
      body - the rule body
      head - the rule head
      Returns:
      the created rule
    • create

      Rule create(Atom body, Atom head)
      Creates a rule from single body and head atoms.
      Parameters:
      body - the body atom
      head - the head atom
      Returns:
      the created rule
    • create

      Rule create(String label, Atom body, Atom head)
      Creates a labeled rule from single body and head atoms.
      Parameters:
      label - the rule label
      body - the body atom
      head - the head atom
      Returns:
      the created rule
    • create

      Rule create(Rule rule)
      Creates a copy of the provided rule.
      Parameters:
      rule - the rule to copy
      Returns:
      the copied rule