Package org.mcp.core

Class MCPOperableLabel


public class MCPOperableLabel extends OperableLabel
MCPOperableLabel wraps an MCPBitVector and provides set operations (union, intersection, difference) for use in dynamic symbolic computations.

This class implements the OperableLabel interface, enabling symbolic manipulation of sets of constraints using BDD or SAT representations.

Since:
2025-02-28
Author:
  • Constructor Details

    • MCPOperableLabel

      public MCPOperableLabel(MCPOperableLabel other)
      Copy constructor.
      Parameters:
      other - the MCPOperableLabel to copy
    • MCPOperableLabel

      public MCPOperableLabel(MCPBitVector value)
      Constructs a new MCPOperableLabel with the given symbolic value.
      Parameters:
      value - the MCPBitVector value
  • Method Details

    • copy

      public MCPOperableLabel copy()
      Returns a copy of this MCPOperableLabel.
      Returns:
      a new MCPOperableLabel with the same value
    • getFactory

      public Object getFactory()
      Returns the factory (BDDFactory or FormulaFactory) associated with this label.
      Returns:
      the factory object
    • setFactory

      public void setFactory(Object factory)
      Sets the factory (BDDFactory or FormulaFactory) for this label.
      Parameters:
      factory - the factory object
    • union

      public OperableLabel union(OperableLabel other)
      Returns the union of this label and another.
      Specified by:
      union in class OperableLabel
      Parameters:
      other - the other OperableLabel
      Returns:
      a new MCPOperableLabel representing the union
    • inter

      public OperableLabel inter(OperableLabel other)
      Returns the intersection of this label and another.
      Specified by:
      inter in class OperableLabel
      Parameters:
      other - the other OperableLabel
      Returns:
      a new MCPOperableLabel representing the intersection
    • minus

      public OperableLabel minus(OperableLabel other)
      Returns the difference of this label and another (this \ other).
      Specified by:
      minus in class OperableLabel
      Parameters:
      other - the other OperableLabel
      Returns:
      a new MCPOperableLabel representing the difference
    • getValue

      public Object getValue()
      Returns the underlying symbolic value.
      Specified by:
      getValue in class OperableLabel
      Returns:
      the MCPBitVector value
    • equals

      public boolean equals(Object o)
      Checks equality with another object.
      Specified by:
      equals in class OperableLabel
      Parameters:
      o - the object to compare
      Returns:
      true if equal, false otherwise
    • hashCode

      public int hashCode()
      Returns the hash code for this label.
      Specified by:
      hashCode in class OperableLabel
      Returns:
      the hash code
    • toString

      public String toString()
      Returns a string representation of this label.
      Specified by:
      toString in class OperableLabel
      Returns:
      a string representation
    • isEmpty

      public boolean isEmpty()
      Checks if this label represents the empty set.
      Specified by:
      isEmpty in class OperableLabel
      Returns:
      true if empty, false otherwise