"매 decidable fragment of first-order logic". 매 Description Logics (DL) 은 concept (class), role (property), individual 을 formal language 로 표현하여 ontology reasoning 의 mathematical foundation. 매 OWL 2 (Web Ontology Language) 는 SROIQ(D) DL 의 syntactic dialect — 매 2026 의 Knowledge Graph + LLM grounding 의 backbone.
매 핵심
매 DL family (expressivity)
AL (Attributive Language): atomic concept, conjunction, universal restriction.
ALC: AL + full negation. 매 baseline.
ALCN: ALC + cardinality.
SHIQ: + role hierarchy, inverse role, qualified cardinality.
SROIQ: SHIQ + role chain, self-restriction, nominal — OWL 2 DL 의 base.
defalc_satisfiable(concept,world=None):"""Naive tableau for ALC C ⊓ ¬C unsatisfiability check."""world=worldor{"individuals":{},"constraints":[]}ifconcept[0]=="AND":forsubinconcept[1:]:ifnotalc_satisfiable(sub,world):returnFalsereturnTrueifconcept[0]=="NOT":atom=concept[1]if("ATOM",atom)inworld["constraints"]:returnFalse# clashworld["constraints"].append(("NOT_ATOM",atom))returnTrueifconcept[0]=="ATOM":if("NOT_ATOM",concept[1])inworld["constraints"]:returnFalseworld["constraints"].append(("ATOM",concept[1]))returnTrue# ∃R.C, ∀R.C handled by spawning fresh individual ...
패턴 5: SPARQL over OWL inference
PREFIXowl:<http://www.w3.org/2002/07/owl#>PREFIX:<http://example.org/family#>SELECT?gp?gcWHERE{?gp:hasGrandchild?gc.# inferred via property_chain}
패턴 6: LLM-grounded ontology query
importanthropicfromowlready2importget_ontologyclient=anthropic.Anthropic()onto=get_ontology("./family.owl").load()defgrounded_answer(question:str)->str:classes=[c.nameforcinonto.classes()]response=client.messages.create(model="claude-opus-4-7-20260301",max_tokens=512,system=f"Use only these ontology classes: {classes}. Answer with class names.",messages=[{"role":"user","content":question}])returnresponse.content[0].text
매 결정 기준
상황
Approach
Web ontology / Linked Data
OWL 2 DL (SROIQ) + Protégé
Lightweight inference
OWL 2 EL (medical) or RL (rule-based)
Real-time reasoning
RDFS + custom rules (avoid full DL)
Research / proof-of-concept
ALC + custom tableau
Fact-heavy KG (Wikidata)
SHACL validation > full DL reasoning
LLM grounding
EL/RL profile + SPARQL
기본값: OWL 2 EL (tractable PTIME) + HermiT/ELK reasoner.
🔗 Graph
부모: Logic · Knowledge Representation
Adjacent: Knowledge-Graphs
🤖 LLM 활용
언제: ontology design review, axiom suggestion, SPARQL 생성, RAG 의 ontology-grounded prompt.
언제 X: 매 reasoning soundness 의 결정 — DL reasoner (HermiT, ELK) 의 영역. LLM 은 hint only.
❌ 안티패턴
Open-world misunderstanding: 매 absent fact 가 false 라 가정 — DL 은 OWA (open world).
Unique Name Assumption 가정: 매 individual a ≠ b 자동 아님 — differentFrom 명시 필요.
Undecidable extension: 매 SROIQ 의 추가 expressivity (full datatype reasoning) → 결정불가.
Reasoner 없이 inference: 매 axiom 만 작성 + 매 reasoner 미실행 → no inferred triples.