Class GroundingTools


  • public class GroundingTools
    extends java.lang.Object
    This class holds common grounding functionality for causal theories using first-order formulas.
    Author:
    Sebastian Homann
    • Constructor Summary

      Constructors 
      Constructor Description
      GroundingTools()  
    • Method Summary

      Modifier and Type Method Description
      static java.util.Set<java.util.Map<Variable,​Constant>> getAllSubstitutions​(java.util.Set<Variable> variables)
      Calculates all possible substitutions in the given set of variables using all possible constants of the same sort.
      static java.util.Set<java.util.Map<Variable,​Constant>> getAllSubstitutions​(java.util.Set<Variable> variables, java.util.Set<Constant> constants)
      Calculates all possible substitutions of variables for a given set of constants
      static boolean isValidGroundingApplication​(java.util.Map<Variable,​Constant> map, java.util.Set<GroundingRequirement> requirements)
      Checks a grounding application for compliance with the grounding requirements.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GroundingTools

        public GroundingTools()
    • Method Detail

      • isValidGroundingApplication

        public static boolean isValidGroundingApplication​(java.util.Map<Variable,​Constant> map,
                                                          java.util.Set<GroundingRequirement> requirements)
        Checks a grounding application for compliance with the grounding requirements.
        Parameters:
        map - a map from variables to constants
        requirements - a set of requirements
        Returns:
        true, if map is a valid application of constants to variables.
      • getAllSubstitutions

        public static java.util.Set<java.util.Map<Variable,​Constant>> getAllSubstitutions​(java.util.Set<Variable> variables,
                                                                                                java.util.Set<Constant> constants)
        Calculates all possible substitutions of variables for a given set of constants
        Parameters:
        variables - The set of variables to be substituted.
        constants - The set of constants to be used as substitution for variables.
        Returns:
        A set of maps of possible substitutions.
      • getAllSubstitutions

        public static java.util.Set<java.util.Map<Variable,​Constant>> getAllSubstitutions​(java.util.Set<Variable> variables)
        Calculates all possible substitutions in the given set of variables using all possible constants of the same sort.
        Parameters:
        variables - The set of variables to be substituted.
        Returns:
        A set of maps of possible substitutions.