Semantics of templates in a compositional framework for building logics
WIPWIPWIP
Ingmar Dasseville, Matthias van der Hallen, Gerda Janssens, Marc Denecker
ICLP 2015
Observations
- KR-languages are repetitive (e.g. reachability)
- No abstractions with semantics
With a meaning which is embedded in the language
Context: Rulesets as a logic of definitions, IDP3
uitbreiden ipv nieuwe taalconstructie
meer uitleg bij TC: (second order + nested)
language constructs: essentieel voor compositie
waarvoor goed: specifieker
def weg, nat taal, 3waardigheid benadrukken
intuïtiever vb nested defs
rewriting as theorem
GOAL
Extend the semantics
of an arbitrary KR-language with templates
Overview
-
Existing Approaches
-
Rulesets of an arbitrary logic
-
Compositional framework
-
A library of templates
Existing approaches
ASP+Templates
- Very usable in practice (resulted in DLT)
- Rewriting scheme
- Recursion?
HILOG
- Better abstractions
- Procedural execution
- Template = second order definition
- First order semantics
Overview
-
Existing approaches
-
Rulesets of an arbitrary logic
-
Compositional framework
-
A library of templates
If the language already contains definitions, isn't a generalization to second order enough?
?
{transitiveClosure(P,Q) ←
{Q(x,y) ← P(x,y).
Q(x,y) ← (∃ z: Q(x,z)∧Q(z,y)).
}.
}
Not if we want to write this:
rule sets over a logic L
rule sets over a logic L
iets beters hier
rule sets over a logic L
{
p ← {q ← q}
q ← {p ← p}
}
{
p ← ¬q
q ← ¬p
}
Overview
-
Existing Approaches
-
Rulesets of an arbitrary logic
-
Compositional framework
-
A library of templates
Logic =
Syntax + Semantics
Logic =
Set of Language Constructs
Language Construct =
Syntax + Semantics
Compositional framework
Syntax: A symbol with parameters
(predicate names or expressions)
Semantics:
We need a model semantics ↣ 2-valued
We need definitions ↣ 3-valued
3-valued evaluation of logics
3-valued evaluation of logics
∧: (Two² → Two)
t ∧ u = u
f ∧ u = f
u ∧ t = u
u ∧ f = f
COMPOSITIONAL FRAMEWORK
*
Overview
-
Existing Approaches
-
Rulesets of an arbitrary logic
-
Compositional framework
-
A library of templates
What is a Template?
Library of templates
∧
∧
Further results
- Libraries of templates are possible
- Theorem:
Non-recursive templates have a rewriting scheme
Conclusion
- Define rulesets of an arbitrary logic
- Use these in a compositional framework
- Write libraries for arbitrary logics
ToDo:
- Better support for functions
- Add type theory
- Higher-Order
- Use this compositional framework to develop a real system (IDP4)
SemanticsWIP
By Ingmar Dasseville
SemanticsWIP
- 1,128