Class NLPRule

All Implemented Interfaces:
Formula, Rule<FolFormula,FolFormula>, ComplexLogicalFormula, LogicStructure, SimpleLogicalFormula

A rule of a nested logic program. A nested logic program contains not quantified first order formulas.
Author:
Tim Janus
  • Constructor Details

    • NLPRule

      public NLPRule()
      Default constructor that creates an empty `NLPRule`.
    • NLPRule

      public NLPRule(NLPRule other)
      Copy constructor that creates a new `NLPRule` by copying an existing rule.

      The new rule is created by cloning the conclusion and premises of the provided `NLPRule` object. This ensures that the original rule and the copied rule do not share references to the same formula objects.

      Parameters:
      other - the `NLPRule` to be copied.
    • NLPRule

      public NLPRule(FolFormula conclusion)
      Constructor that creates a `NLPRule` with a specified conclusion.

      This constructor initializes the rule with a given conclusion formula, without any premises.

      Parameters:
      conclusion - the `FolFormula` that serves as the conclusion of the rule.
    • NLPRule

      public NLPRule(FolFormula conclusion, FolFormula premise)
      Constructor that creates a `NLPRule` with a specified conclusion and a single premise.

      This constructor initializes the rule with a given conclusion formula and a single premise formula.

      Parameters:
      conclusion - the `FolFormula` that serves as the conclusion of the rule.
      premise - the `FolFormula` that serves as the premise of the rule.
    • NLPRule

      public NLPRule(FolFormula conclusion, Collection<FolFormula> premise)
      Constructor that creates a `NLPRule` with a specified conclusion and a collection of premises.

      This constructor initializes the rule with a given conclusion formula and a collection of premise formulas.

      Parameters:
      conclusion - the `FolFormula` that serves as the conclusion of the rule.
      premise - a collection of `FolFormula` objects that serve as the premises of the rule.
  • Method Details