java.lang.Object
edu.upc.fib.inlab.imp.kse.logics.logicschema.domain.LogicSchema

public class LogicSchema extends Object
This class implements the representation of a logic schema.
A logic schema bounds several predicates and constraints together guaranteeing their consistency.
  • Constructor Details

  • Method Details

    • isEmpty

      public boolean isEmpty()
    • getPredicateByName

      public Predicate getPredicateByName(String predicateName)
    • getLogicConstraintByID

      public LogicConstraint getLogicConstraintByID(ConstraintID constraintID)
    • getDerivationRulesByPredicateName

      public List<DerivationRule> getDerivationRulesByPredicateName(String derivedPredicateName)
    • getAllPredicates

      public Set<Predicate> getAllPredicates()
    • getAllNormalClauses

      public Set<NormalClause> getAllNormalClauses()
    • getAllLogicConstraints

      public Set<LogicConstraint> getAllLogicConstraints()
    • getAllDerivationRules

      public Set<DerivationRule> getAllDerivationRules()
    • getAllDerivedPredicates

      public Set<Predicate> getAllDerivedPredicates()
    • computeLevelHierarchy

      public LevelHierarchy computeLevelHierarchy()
      A LevelHierarchy is a partition of the predicates of a schema into several levels, where level 0 contains the base predicates, and each derived predicate from level i is defined through predicates from levels j < i.
      Returns:
      a LevelHierarchy for this schema
    • isSafe

      public boolean isSafe()
    • accept

      public <T> T accept(LogicSchemaVisitor<T> visitor)