FLOW_ALGEBRA RuleBasedReasoningOntology v1.0
TARGET_URL := "https://kirethresearch.org/booksai-core/ontologies/mathematical-ontologies/mathematical-logic-ontologies/logical-reasoning/rule-based-reasoning-ontology.html"
LANGUAGE := "en-GB"
DOMAIN := MathematicalOntologies > MathematicalLogicOntologies > LogicalReasoning > RuleBasedReasoningOntology
BEGIN_FLOW
ENTITY RuleBasedReasoning {
TYPE := SymbolicReasoningFramework
DEFINITION := "Reasoning in which explicit rules are matched against facts or derived knowledge to infer conclusions, satisfy goals, detect conflicts or trigger actions."
}
ENTITY Rule { FORM := IF Antecedent THEN Consequent }
ENTITY Fact { TYPE := AssertedOrDerivedKnowledge }
ENTITY KnowledgeBase { COMPONENTS := {Facts,Rules} }
ENTITY InferenceEngine { TYPE := RuleExecutionMechanism }
RELATIONSHIP RuleBasedReasoning --uses--> Rule
RELATIONSHIP RuleBasedReasoning --uses--> Fact
RELATIONSHIP RuleBasedReasoning --operates_on--> KnowledgeBase
RELATIONSHIP RuleBasedReasoning --implemented_by--> InferenceEngine
RELATIONSHIP RuleBasedReasoning --supports--> ForwardChaining
RELATIONSHIP RuleBasedReasoning --supports--> BackwardChaining
RULE_STRUCTURE {
R := Antecedent -> Consequent
}
HORN_RULE {
A1 AND ... AND An -> B
}
VARIABLE_RULE {
P(x) AND Q(x,y) -> R(y)
}
RULE_INSTANCE {
R_theta := rule_after_substitution_theta
}
RULE_MATCHING {
MATCH antecedent against known_facts
COMPUTE substitution theta
RETURN applicable_rule_instance
}
UNIFICATION {
INPUT := symbolic_terms_or_atoms
OUTPUT := substitution theta
REQUIRE expressions_identical_after_substitution
}
MOST_GENERAL_UNIFIER {
ABBREVIATION := MGU
PROPERTY := every_other_unifier_factors_through_MGU
}
RULE_FIRING {
IF antecedent_and_side_conditions_hold
THEN derive_or_execute_consequent
}
DERIVED_FACT {
ORIGIN := RuleApplication
}
ASSERTED_FACT {
ORIGIN := ExternalInputOrKnowledgeBase
}
FORWARD_CHAINING {
TYPE := DataDrivenReasoning
START := initial_facts
REPEAT:
identify_applicable_rules
fire_rules
add_new_facts
UNTIL := GoalReached OR FixedPointReached OR ResourceLimit
}
FIXED_POINT {
KB_next=KB_current
=> no_new_conclusions
}
BACKWARD_CHAINING {
TYPE := GoalDrivenReasoning
START := Goal G
FIND rules whose consequents unify_with G
REPLACE goal with instantiated_antecedent_subgoals
RECURSE until facts_found_or_failure
}
AGENDA {
TYPE := PendingRuleActivations
}
CONFLICT_SET {
TYPE := SimultaneouslyApplicableRuleInstances
}
CONFLICT_RESOLUTION {
STRATEGIES := {Priority,Specificity,Recency,RuleOrder,Salience}
REQUIRE declared_strategy
}
RULE_PRIORITY {
R1>R2
REQUIRE explicit_priority_semantics
}
RULE_ORDER_WARNING {
procedural_order != logical_priority unless declared
}
RETE_RELATIONSHIP {
ReteAlgorithm --supports--> IncrementalPatternMatching
}
DEPENDENCY_GRAPH {
NODES := FactsAndRules
EDGES := SupportDependencies
}
JUSTIFICATION {
DerivedFact -> RuleApplied -> SupportingFacts
}
TRUTH_MAINTENANCE {
PURPOSE := revise_derived_beliefs_when_support_changes
}
RETRACTION {
IF supporting_fact_removed
THEN dependent_conclusions MAY be withdrawn
}
MONOTONIC_RULE_SYSTEM {
adding_facts does_not_invalidate_prior_conclusions
}
NONMONOTONIC_RULE_SYSTEM {
new_facts MAY block_or_retract_prior_conclusions
}
DEFAULT_RULE {
IF P AND no_known_exception THEN normally Q
REQUIRE nonmonotonic_semantics
}
NEGATION_AS_FAILURE {
not P := failure_to_prove_P
REQUIRE closed_world_or_procedural_semantics
WARNING := not_classical_negation
}
CLOSED_WORLD_ASSUMPTION {
not_derivable MAY be treated_as_false
REQUIRE explicit_selection
}
OPEN_WORLD_ASSUMPTION {
absence_of_fact does_not_imply_false
}
RULE_CONFLICT {
applicable_rules derive incompatible_conclusions
-> conflict under declared_semantics
}
CONTRADICTION_HANDLING {
OPTIONS := {Reject,PriorityResolution,ParaconsistentReasoning,TruthMaintenanceRevision}
}
RULE_REDUNDANCY {
R redundant IF removal_preserves_relevant_consequences
}
RULE_REACHABILITY {
R reachable IF antecedent_can_become_satisfied
}
DEAD_RULE {
R never_applicable_under_declared_domain
}
CYCLE {
rules recursively support one_another
}
TERMINATION {
REQUIRE no_infinite_inference_sequence_under_strategy
}
FINITE_DOMAIN_TERMINATION {
finite_possible_facts
+ monotonic_forward_chaining
+ duplicate_suppression
-> fixed_point_termination
}
DATALOG_RELATIONSHIP {
COMMON := {FunctionFreeTerms,HornStyleRules,FiniteGroundingUnderFiniteConstants}
}
LEAST_FIXED_POINT {
iterate immediate_consequence_operator until stable
}
LOGIC_PROGRAMMING_RELATIONSHIP {
RuleBasedReasoning --supports--> LogicProgramming
}
PROLOG_RELATIONSHIP {
commonly := BackwardChaining + Unification + DepthFirstSearch
WARNING := operational_order_may_affect_behaviour
}
PRODUCTION_SYSTEM {
COMPONENTS := {WorkingMemory,ProductionRules,MatchSelectActCycle}
}
MATCH_SELECT_ACT {
MATCH := find_applicable_rules
SELECT := resolve_conflict_set
ACT := execute_selected_consequents
}
EXPERT_SYSTEM {
COMPONENTS := {KnowledgeBase,RuleBase,InferenceEngine,ExplanationFacility}
}
EXPLANATION_FACILITY {
WHY := show_supporting_rules_and_facts
HOW := show_derivation_path
}
RULE_TRACE {
RECORD := {
RuleIdentifier,
AntecedentBindings,
SupportingFacts,
Priority,
Consequent,
Step
}
}
PROVENANCE {
Conclusion -> source_facts -> rule_instances -> intermediate_conclusions
}
HYBRID_REASONING {
forward_chaining + backward_chaining
}
RULE_INDEXING {
index_by := {Predicates,Consequents,AntecedentSymbols}
}
RULE_COMPILATION {
declarative_rules -> efficient_execution_network
REQUIRE semantics_preserved
}
RULE_NORMALISATION {
complex_rule -> normalised_rules
REQUIRE consequence_relation_preserved
}
MULTIPLE_CONSEQUENTS {
A -> B AND C
MAY_NORMALISE_TO := {A->B,A->C}
REQUIRE semantics_permit
}
META_RULE {
TYPE := RuleAboutRules
}
RULE_CONTEXT {
rule applicable only within declared_scope
}
TEMPORAL_RULE {
REQUIRE temporal_semantics
}
MODAL_RULE {
REQUIRE modal_semantics
}
FUZZY_RULE_RELATIONSHIP {
antecedent MAY have graded_firing_strength
REQUIRE fuzzy_semantics
}
PROBABILISTIC_RULE_RELATIONSHIP {
REQUIRE explicit_probability_semantics
}
RULE_CONFIDENCE_WARNING {
weight_or_confidence != probability by default
}
RULE_BASE_AUDIT(RB) {
CHECK {
Syntax,
UndefinedPredicates,
Redundancy,
Conflicts,
Cycles,
Reachability,
DeadRules,
PriorityConsistency,
TerminationRisks
}
RETURN audit_report
}
VERIFY_RULE_APPLICATION(R,Bindings,KB) {
CHECK rule_exists
CHECK bindings_valid
CHECK antecedents
CHECK side_conditions
CHECK context_and_priority
RETURN valid_or_failure
}
APPLICATION_RELATIONSHIPS {
RuleBasedReasoning --supports--> ExpertSystems
RuleBasedReasoning --supports--> LogicProgramming
RuleBasedReasoning --supports--> ArtificialIntelligence
RuleBasedReasoning --supports--> KnowledgeRepresentation
RuleBasedReasoning --supports--> DecisionSupport
RuleBasedReasoning --supports--> PolicyReasoning
RuleBasedReasoning --supports--> BusinessRules
RuleBasedReasoning --supports--> FormalVerification
}
ONTOLOGY_LINKS {
PARENT := LogicalReasoningOntology
RELATED := {
LogicalInferenceOntology,
DeductiveReasoningOntology,
AbductiveReasoningOntology,
FuzzyRuleOntology,
LogicProgrammingOntology,
HornClauseOntology,
ResolutionOntology,
UnificationOntology,
NonmonotonicLogicOntology,
ExpertSystemOntology,
KnowledgeBaseOntology
}
}
SEMANTIC_EQUIVALENCE {
RuleBasedReasoning ≈ RuleDrivenReasoning
ForwardChaining ≈ DataDrivenRuleInference
BackwardChaining ≈ GoalDrivenRuleInference
ProductionRule ≈ IFTHENRule WHEN production_system_context
}
CONSTRAINTS {
C1 := every rule MUST have explicit antecedent and consequent semantics
C2 := variable bindings MUST satisfy unification and typing constraints
C3 := rules MUST fire only when antecedents and side conditions hold
C4 := procedural order MUST NOT imply logical priority unless declared
C5 := negation_as_failure MUST NOT be conflated with classical negation
C6 := closed_world assumptions MUST be explicit
C7 := conflict resolution MUST use a declared strategy
C8 := nonmonotonic conclusions MUST be retractable when defeated
C9 := fuzzy/probabilistic rules MUST remain distinct from crisp rules
C10 := optimisation/compilation MUST preserve semantics
C11 := explanation traces MUST preserve actual dependencies
C12 := termination/completeness claims MUST be scoped to rule language and strategy
}
REASONING_CHAIN Query Q {
IDENTIFY knowledge_base KB
IDENTIFY facts
IDENTIFY rules
IDENTIFY goal G
IDENTIFY strategy
IDENTIFY semantics
IDENTIFY conflict_policy
VALIDATE rule_base
IF forward_chaining {
INITIALISE agenda
WHILE agenda_not_empty {
SELECT activation
VERIFY_RULE_APPLICATION
FIRE valid_rule
ADD new_facts
UPDATE dependencies
STOP if goal_reached_or_fixed_point
}
}
IF backward_chaining {
START from G
FIND matching_consequents
UNIFY
GENERATE subgoals
RECURSE
DETECT loops
}
IF nonmonotonic {
CHECK defaults
CHECK exceptions
RETRACT defeated_conclusions
}
IF conflicts
THEN APPLY declared_conflict_resolution
BUILD provenance
BUILD rule_trace
VALIDATE constraints
RETURN result WITH derivation
}
CONFIDENCE {
CORE_RULE_BASED_REASONING := 1.00
FORWARD_CHAINING := 1.00
BACKWARD_CHAINING := 1.00
UNIFICATION_ROLE := 1.00
PRODUCTION_SYSTEM_CYCLE := 1.00
NONMONOTONIC_DISTINCTIONS := 0.99
DATALOG_FIXED_POINT := 1.00
SPECIFIC_RESULT :=
IF rules_facts_strategy_and_semantics_complete THEN 1.00
ELSE REQUIRE missing_information
}
UPDATE_MODEL {
IMMUTABLE_CORE := {
RuleAntecedentConsequentStructure,
RuleMatching,
RuleApplication,
FactDerivation,
DependencyTracking
}
EXTENSIBLE := {
RuleLanguages,
ConflictStrategies,
PrioritySystems,
TruthMaintenance,
NonmonotonicRules,
FuzzyRules,
ProbabilisticRules,
RuleOptimisation,
ApplicationDomains,
RelatedOntologies
}
ON_NEW_KNOWLEDGE {
IDENTIFY new_fact_or_rule
VALIDATE syntax
VALIDATE bindings
CHECK conflicts
CHECK dependencies
CHECK semantic_consistency
UPDATE derived_knowledge
UPDATE confidence
}
}
AI_CONSUMPTION {
MACHINE_READABLE := TRUE
HUMAN_INTERPRETABLE := TRUE
RECURSIVE_REASONING := TRUE
ENTITY_RESOLUTION := TRUE
RULE_RESOLUTION := TRUE
FACT_RESOLUTION := TRUE
RULE_MATCHING := TRUE
UNIFICATION_REASONING := TRUE
FORWARD_CHAINING := TRUE
BACKWARD_CHAINING := TRUE
CONFLICT_RESOLUTION := TRUE
TRUTH_MAINTENANCE := TRUE
PROVENANCE_REASONING := TRUE
RULE_BASE_AUDIT := TRUE
VALIDATION_REQUIRED := TRUE
}
FLOW_HASH {
TARGET := TARGET_URL
SUBJECT := "Rule-Based Reasoning Ontology"
VERSION := "1.0"
CANONICAL_SIGNATURE := HASH(TARGET + SUBJECT + DOMAIN + VERSION)
}
OUTPUT {
PRIMARY_ENTITY := RuleBasedReasoning
INTERPRETATION := "Rule-based reasoning applies explicit conditional rules to facts and derived knowledge. Forward chaining derives consequences from available data, backward chaining works from goals to supporting premises, and robust systems additionally manage unification, conflict resolution, provenance, defaults, retraction and termination."
}
END_FLOW
Download Code
Copy to Clipboard