Class LogicSchemaBuilder<T extends LogicConstraintSpec>
java.lang.Object
edu.upc.fib.inlab.imp.kse.logics.logicschema.services.creation.LogicSchemaBuilder<T>
- Type Parameters:
T
- kind of LogicConstraintSpec this class works with
Builder for a logic schema.
The builder will ensure that there is a Predicate for each predicate name used in the specification.
That is, if a logic constraint or derivation rule specification uses a predicate name "P", which
has not been specified as a predicate, the builder will automatically create such predicate P.
The builder must work with either LogicConstraintSpecWithIDs, or LogicConstraintSpecWithoutIDs, but not both at the same time.
-
Constructor Summary
ConstructorDescriptionLogicSchemaBuilder
(ConstraintIDGenerator<T> constraintIDGenerator) LogicSchemaBuilder
(ConstraintIDGenerator<T> constraintIDGenerator, Set<Predicate> predicates) -
Method Summary
Modifier and TypeMethodDescriptionaddAllDerivationRules
(List<DerivationRuleSpec> newRules) addAllLogicConstraints
(List<T> newConstraints) addAllPredicates
(List<PredicateSpec> allPredicates) addDerivationRule
(DerivationRuleSpec... drs) addDerivationRule
(Collection<DerivationRuleSpec> derivationRules) final LogicSchemaBuilder<T>
addLogicConstraint
(Collection<T> logicConstraintSpecs) final LogicSchemaBuilder<T>
addLogicConstraint
(T... logicConstraintSpecs) addPredicate
(PredicateSpec... predicateSpecs) addPredicate
(String predicateName, int arity) build()
-
Constructor Details
-
LogicSchemaBuilder
-
LogicSchemaBuilder
public LogicSchemaBuilder(ConstraintIDGenerator<T> constraintIDGenerator, Set<Predicate> predicates)
-
-
Method Details
-
defaultLogicSchemaWithoutIDsBuilder
public static LogicSchemaBuilder<LogicConstraintWithoutIDSpec> defaultLogicSchemaWithoutIDsBuilder() -
defaultLogicSchemaWithIDsBuilder
-
addPredicate
-
addPredicate
-
addDerivationRule
-
addDerivationRule
-
addLogicConstraint
-
addLogicConstraint
-
build
-
addAllDerivationRules
-
addAllLogicConstraints
-
addAllPredicates
-