importation closure that is robust to circular dependencies
DESCRIPTION
The ISO Standard 24707 for Common Logic is under revision to fix certain issues in its semantics. One of these issues is in regard to the interpretation of circular importations, which is syntactically valid but semantically ambiguous. Elsewhere we have proposed a modification to the importation semantics that solves the theoretical problem. However, the importation closure of some finite collections (corpora) of texts leads to infinite corpora. For practical reasoning, we can work with finite covers- finite corpora that are equivalent in a particular sense to the original corpus. In this study we derive algebraic conditions for the applicability of an finite-cover determination algorithm to a general model-theoretic language implementing this approach to importation closure.TRANSCRIPT
Importation Closure that is Robust to Circular Dependencies
Tara Athan
Athan Services (athant.com)
West Lafayette, IN, USA
taraathan AT gmail.com
presented at RuleML 2013
7th International Rule Challenge
July 11, 2013
Seattle, USA
11 Jul 2013 2
Contents
Motivation for Embracing Circular Importation Issues in the nteraction of Common Logic (CL)
Importation and Domain Restriction Sandbox Language Family Specification
Syntax, Semantics and Algebraic Properties Algorithm Discussion Conclusions References
Motivation
Distributed authoring of knowledge bases depends on merging of smaller sets of formulas or rules (texts)
“Titling + Importation” is a standard approach Assign a title to a text Refer to the title in an
importation statement
Circular importation references are problematic Resolution by copying
(e.g. XIncude) can lead to infinite loops
Other semantics can be ambiguous
Forbidding circular dependence– Heavy burden on
syntactic validation
Current Standard CL Importation Semantics: Has an Issue
Original CL semantics (ttl foo G),
(import foo) I("(import foo)") =
I( G)
Problem (ttl foo (import foo)),
(import foo) I("(import foo)") =
I("(import foo)") Fails to define a truth-
value for the second text
Possible Solutions Ignore multiple importations Forbid circular importation Redefine importation semantics
CL Domain Restriction: Proposed Replacement for
“cl:module”
Text CL1
(txt (inDiscourse N A) (domain N (outDiscourse A) (inDiscourse a) (forall (x) (A x))) )
CL1 Logically Equivalent to:
(txt (inDiscourse N A) (not (N A)) (N a) (forall (x) (if (N x) (A x)))
CL Domain Restriction:Syntactic Sugar (sort of)
CL Text CL2:
(txt (outDiscourse N A) (domain N (outDiscourse A) (inDiscourse a) (forall (x) (A x))) )
CL2 Logically equivalent (≡) to:
(txt (outDiscourse N A) (N a) (forall (x) (if (N x) (A x)))
There is not a context-independent way to rewrite the domain restriction statement.
Interaction of CL Domain Restriction and Importation
Corpus CL3(ttl foo (txt (outDiscourse A) (forall (x) (A x)) ),(txt (inDiscourse N1 A) (domain N1 (import foo))),(txt (inDiscourse N2 A) (domain N2 (import foo)))
CL3 ≡ to:(txt (inDiscourse N1 N2) (not (N1 A)) (forall (x) (if (N1 x) (A x) (not (N2 A)) (forall (x) (if (N2 x) (A x)))
Approach of ignoring duplicate importations does not preserve intended semantics, is ambiguous
CL Importation – ProposedSemantics by Importation Closure
Original Text (ttl foo (A)),
(import foo)
This approach solves some problems:– (ttl foo (import foo)),
(import foo) But not all problems:
– (ttl foo (domain N (import foo))), (import foo)
Importation Closure (ttl foo (A)),
(import foo),(A)
I("(import foo)") = T
– (ttl foo (import foo)), (import foo)
– (ttl foo (domain N (import foo))), (import foo), (domain N (import foo)), ...
Working With Infinite Importation Closures
Start with a finite number of finite texts, mentioning a finite subset of the vocabulary/signature
Want to determine satisfaction from a the truth values of a finite set of expressions, even if importation closure is infinite
Goal of Analysis Determine conditions
on a general model-theoretic language using importation closure such that given an interpretation, satisfaction of a finite set of finite texts can be evaluated in finite time.
Language Family Specification
Syntax - Minimal Some infinite lexical space Expressions: Propositions and some Weird Things
Semantics – Beyond Minimal Corpus Satisfaction by Importation Closure Interpretation of Expressions:
It's True if I Say It Is Algebraic Properties – Where the Action Is
Rewriting of Expressions that Preserve "Full Equivalence" (≡
F)
Syntax of L0:
Propositions and Some Weird Things Statements are ...
Propositional Statements– (A)
Titling Statements– (ttl foo G)
Importation Statements– (import foo)
Texts are statements and ... Polyadic Text
Construction– (txt G
1 G
2 ... G
n)
Unary Text Operators– (F0 G)
Corpora are sets of texts
– G1, G
2, G
3, ...
Semantics of L0:
It's True if I Say It's True An “interpretation” I is
a specification of all true texts
A corpus is “satisfied” by I if all texts in its importation closure are true in I
A text is “satisfied” by I if a corpus containing only that text is satisfied by I
A corpus G is “self-contained” if it has “enough” titling statements to determine a “canonical” importation closure G'
Corpora G1, G2 are logically equivalent iff G1 is satisfied exactly when G2 is satisfied
Full Equivalence
Corpora G1, G2 are superficially equivalent iffsome text in G1 is false iff some text in G2 is false
Two corpora are fully equivalent (≡F) iff they are
logically equivalent and superficially equivalent
Covers
A corpus G1 is a cover of corpus G2 iff G1 ≡
F G2'
where G2' is the importation closure of G2 Significance: if G1 is a cover of G2, the truth values
in an interpretation I of the texts in G1 (not its importation closure G1') determine the satisfaction of G1 by I, and hence, the satisfaction of G2 by I
Task: determine algebraic properties of language that permit algorithmic determination of a finite cover for any self-contained finite corpus
Algebraic Properties: The Family L
0
Notation– the text construction operator is called Q– F, F0, F1, ... are text operators– B is a titling text, G, G1, G2, ... are any texts
– F0 ≡F F1 iff F0(G) ≡
FF1(G) for all G
Composition of Text Operators is Closed
F0(F1(G))) ≡F (F0 o F1)(G) = (F2)(G)
Composition of Text Operators is Associative
((F0 o F1) o F2)(G) ≡F (F0 o (F1 o F2))(G)
Algebraic Properties: The Family L
0
Titling Separable Titling statements can be extracted from texts
Q(G1, …, B, ..., Gn) ≡F B, Q(G1, ..., Gn)
F(Q(G1, …, B, ..., Gn)) ≡F F(B), F(Q(G1, ..., Gn))
Substitution If Gi ≡
F G*
Then
– Q(G1, …, Gi, ..., Gn) ≡F Q(G1, .. ,G*, ... Gn)
– F(Gi) ≡F F(G*)
Algebraic Properties:Subfamily L
0
Text Operators are Compositionally Compact The closure under composition of a finite set of text
operators is finite.– Given F1, ...FN, there exists F1, ... FM, (M>=N) such that
– Fi o Fj ≡F Fk
– Whenever 1 <= i, j, k, <= M
Algebraic Properties: L0
+
Binary text construction forms a commutative, idempotent monoid
– Q-associative (semigroup):
Q(G0, Q(G1, G2)) ≡F Q( Q(G0, G1), G2)
– Q-commutative: Q(G0, G1) ≡F Q( G1, G2)
– Q-identity: (monoid) Q(G0, Q()) ≡F G0
– Q-idempotent: Q( G0, G0)) ≡F G0
Polyadic Q is the composition of binary Q
– Q(G0, Q(G1, G2)) ≡F Q( G0, G1, G2)
Algebraic Properties: L0
Ω
Text Operators are distributive over polyadic text construction
– F(Q(G1, G2, ...)) ≡F Q( F(G1), F(G2), ...)
Algebraic Properties: L0
+Ω
Title-separable Compositionally-compact Ω-
Operators distribute over text construction Commutative Idempotent Monoid
Text construction is associative Empty text construction is identity
Cover-Determination Algorithm
Exract and simplify titling statements Simplify non-titling texts into “normal form”
Q(F0(G0), ..., Fn(Gn), Gn+1, ..., Gm) or F(G0) or G0where Gi is a propositional or importation statement
Pick one importation statement, and find titling statements for associated title
– No titling statement? Try again later (might be imported)– Inconsistent titling statements? Is unsatisfiable– Otherwise, continue ...
Create new text by substitution for importation
Cover-Determination Algorithm
Add to corpus if not fully-equivalent to any text already in the corpus
Repeat, applying once to each importation statement, including those added to the corpus by importation
Given properties of L0
+Ω, guaranteed to terminate
Were any importation statement not resolved?– Yes --> No finite cover exists, corpus is not self-contained– No --> finite corpus obtained is cover
Discussion
It was discovered in the course of the analysis that the original formulation of importation closure could be improved Originally all importation statements in a text were
resolved at once, because it seemed more efficient– This leads to texts that are theoretically self-contained but
difficult to resolve in practice (if the titling statement for one title is contained in a text to be imported at the same time)
– This also has some non-intuitive consequences regarding satisfaction of segregation requirements.
(txt (import M) (import N)(ttl P (import N))) is not equivalent to (txt (import M) (import P) )(ttl P (import N)))
Conclusions
Importation that is robust to circular imports can be defined theoretically and implemented practically
It is still best practice, from a performance point of view, to avoid or minimize circular imports
Further study will include application to CL extension IKL For application to nonmonotonic logic within a
monotonic wrapper Expect need for truncation (Ibelieve he believes ...)
References
Information technology – Common Logic (CL): a framework for a family of logic-based languages
Neuhaus, F. and P. Hayes, Common Logic and the Horatio problem, Appl. Ontol. v. 7 pp. 211-231
CL Draft Semanticshttp://philebus.tamu.edu/pipermail/cl/attachments/20130405/153ad554/attachment-0001.pdf