Semantics of templates in a compositional framework for building logics

WIPWIPWIP

Ingmar Dasseville, Matthias van der Hallen, Gerda Janssens, Marc Denecker

ICLP 2015

Observations

  1. KR-languages are repetitive (e.g. reachability)
  2. 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

1) \leq_p\text{-monotone: } x\leq_p y \Rightarrow \overline{F}(x)\leq_p \overline{F}(y)
\text{Requirements for an evaluation function }
\text{extending } (F : X \rightarrow Two) \text{ to } (\overline{F} : \overline{X} \rightarrow Three)
2) \text{exact and extending: } x\in X : \overline{F}(x) = F(x)
unknown \leq_p true
unknown \leq_p false

3-valued evaluation of logics

\text{An evaluation function } \text{extending } (F : X \rightarrow Two)
\text{ to } (\overline{F} : \overline{X} \rightarrow Three)
\overline{F}(\overline{x}) = glb_{\leq_p}\{F(x) | \overline{x} \leq_p x\}

∧: (Two²   Two)

 u = u
 u = f
 t = u
 f = f

COMPOSITIONAL FRAMEWORK

FO(ID^*) =\{Atom^1 ,\land,\lor,\lnot,\forall, \exists, R_w \}^*
FO =\{Atom^1 ,\land,\lor,\lnot,\forall, \exists, \}
FO(ID) = FO \bigcup R_w(FO)
SO(ID^*) =\{Atom^1 ,Atom^2 ,\land,\lor,\lnot,\forall, \exists, R_w \}^*

*

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