order sorted unification with regular expression sorts
play

Order-Sorted Unification with Regular Expression Sorts (Work in - PowerPoint PPT Presentation

Order-Sorted Unification with Regular Expression Sorts (Work in Progress) Temur Kutsia 1 Mircea Marin 2 1 RISC, JKU Linz, Austria. 2 University of Tsukuba, Japan Presented by Laura Kov acs Motivation Advantages of using sorts in logic:


  1. Order-Sorted Unification with Regular Expression Sorts (Work in Progress) Temur Kutsia 1 Mircea Marin 2 1 RISC, JKU Linz, Austria. 2 University of Tsukuba, Japan Presented by Laura Kov´ acs

  2. Motivation Advantages of using sorts in logic: ◮ More adequate coding of mathematical problems in logic. ◮ Simplification of algebraic specifications. ◮ Compact and natural formalizations of AI problems. ◮ Supporting typed computations. ◮ ...

  3. Motivation Sorted unification: ◮ Walther in 1988 extended first-order unification to order-sorted case: ◮ Infinitely many sorts, ordered ◮ No overloading ◮ Problems may have infinitely many unifiers ◮ Complete procedure to enumerate unifiers ◮ Minimal complete set of unifiers might not exist ◮ If the set of sorts is finite, the problems becomes finitary

  4. Motivation Sorted unification: ◮ Walther in 1988 extended first-order unification to order-sorted case: ◮ Infinitely many sorts, ordered ◮ No overloading ◮ Problems may have infinitely many unifiers ◮ Complete procedure to enumerate unifiers ◮ Minimal complete set of unifiers might not exist ◮ If the set of sorts is finite, the problems becomes finitary ◮ Further generalizations: Schmidt-Schauss 1989, Weidenbach 1996: ◮ Sorts as unary predicates ◮ Term declarations allowed ◮ Undecidable

  5. Motivation Sorted unification: ◮ Walther in 1988 extended first-order unification to order-sorted case: ◮ Infinitely many sorts, ordered ◮ No overloading ◮ Problems may have infinitely many unifiers ◮ Complete procedure to enumerate unifiers ◮ Minimal complete set of unifiers might not exist ◮ If the set of sorts is finite, the problems becomes finitary ◮ Further generalizations: Schmidt-Schauss 1989, Weidenbach 1996: ◮ Sorts as unary predicates ◮ Term declarations allowed ◮ Undecidable ◮ Other works: Kirchner 1988, Hendrix, Mesegeur 2008 (equational OSU).

  6. Motivation Closer look at Walther’s work: ◮ Set of sorts S and order ≤ . ◮ Set of variables V s for each s ∈ S . ◮ Set of function symbols F w , s for each w ∈ S ∗ , s ∈ S . ◮ All these sets are pairwise disjoint.

  7. Motivation Closer look at Walther’s work: ◮ Set of sorts S and order ≤ . ◮ Set of variables V s for each s ∈ S . ◮ Set of function symbols F w , s for each w ∈ S ∗ , s ∈ S . ◮ All these sets are pairwise disjoint. Our contribution:

  8. Motivation Closer look at Walther’s work: ◮ Set of sorts S and order ≤ . ◮ Set of variables V s for each s ∈ S . ◮ Set of function symbols F w , s for each w ∈ S ∗ , s ∈ S . ◮ All these sets are pairwise disjoint. Our contribution: ◮ Finite set of basic sorts B and order � .

  9. Motivation Closer look at Walther’s work: ◮ Set of sorts S and order ≤ . ◮ Set of variables V s for each s ∈ S . ◮ Set of function symbols F w , s for each w ∈ S ∗ , s ∈ S . ◮ All these sets are pairwise disjoint. Our contribution: ◮ Finite set of basic sorts B and order � . ◮ Sorts are regular expressions over B , denoted R . � extends to sorts.

  10. Motivation Closer look at Walther’s work: ◮ Set of sorts S and order ≤ . ◮ Set of variables V s for each s ∈ S . ◮ Set of function symbols F w , s for each w ∈ S ∗ , s ∈ S . ◮ All these sets are pairwise disjoint. Our contribution: ◮ Finite set of basic sorts B and order � . ◮ Sorts are regular expressions over B , denoted R . � extends to sorts. ◮ Set of variables V R for each R ∈ R .

  11. Motivation Closer look at Walther’s work: ◮ Set of sorts S and order ≤ . ◮ Set of variables V s for each s ∈ S . ◮ Set of function symbols F w , s for each w ∈ S ∗ , s ∈ S . ◮ All these sets are pairwise disjoint. Our contribution: ◮ Finite set of basic sorts B and order � . ◮ Sorts are regular expressions over B , denoted R . � extends to sorts. ◮ Set of variables V R for each R ∈ R . ◮ Set of function symbols F R , s for each R ∈ R , s ∈ B .

  12. Motivation Closer look at Walther’s work: ◮ Set of sorts S and order ≤ . ◮ Set of variables V s for each s ∈ S . ◮ Set of function symbols F w , s for each w ∈ S ∗ , s ∈ S . ◮ All these sets are pairwise disjoint. Our contribution: ◮ Finite set of basic sorts B and order � . ◮ Sorts are regular expressions over B , denoted R . � extends to sorts. ◮ Set of variables V R for each R ∈ R . ◮ Set of function symbols F R , s for each R ∈ R , s ∈ B . ◮ Sets of function symbols are not required to be disjoint.

  13. Related Work REOSU SEQU OSU WURC SYNU WU ◮ SYNU - Syntactic unification (Robinson 1965). ◮ WU - Word unification (Schulz 1990). ◮ OSU - Order-sorted unification (Walther 1988). ◮ SEQU - Sequence unification (Kutsia 2002). ◮ WURC - Word unification with regular constraints (Schulz 1990). ◮ REOSU - Regular expression order-sorted unification.

  14. Example ◮ Solve f ( x , y , z ) . = f ( f ( x ) , g ( u ) , a , b ) ◮ Sort information. Basic sorts: s , r , q. Ordering: s ≺ q, r ≺ q. x , z : s ∗ y , u : q a , b : s f : q ∗ → r g : q → q , s + r → s ◮ Solution: { x �→ ǫ, y �→ f ( ǫ ) , u �→ v , z �→ ( g ( v ) , a , b ) } . ◮ v : fresh variable of sort s + r. ◮ u �→ v weakens g ( u ) : q to g ( v ) : s.

  15. Sorts ◮ Finite set B of basic sorts, partially ordered with the relation � . ◮ s, r, q denote basic sorts. ◮ Regular expression sorts: R ::= s | 1 | R 1 . R 2 | R 1 +R 2 | R ∗ . ◮ Corresponding regular language [ [R] ]: The set of words of base sorts, defined as usual.

  16. Sorts Extensions of � : ◮ On words of base sorts: s 1 · · · s n � r 1 · · · r n iff s i � r i for all 1 ≤ i ≤ n .

  17. Sorts Extensions of � : ◮ On words of base sorts: s 1 · · · s n � r 1 · · · r n iff s i � r i for all 1 ≤ i ≤ n . ◮ On sets of words of base sorts: S 1 � S 2 iff for each w 1 ∈ S 1 there is w 2 ∈ S 2 such that w 1 � w 2 .

  18. Sorts Extensions of � : ◮ On words of base sorts: s 1 · · · s n � r 1 · · · r n iff s i � r i for all 1 ≤ i ≤ n . ◮ On sets of words of base sorts: S 1 � S 2 iff for each w 1 ∈ S 1 there is w 2 ∈ S 2 such that w 1 � w 2 . ◮ On (regular expression) sorts: R 1 � R 2 iff [ [R 1 ] ] � [ [R 2 ] ].

  19. Sorts Extensions of � : ◮ On words of base sorts: s 1 · · · s n � r 1 · · · r n iff s i � r i for all 1 ≤ i ≤ n . ◮ On sets of words of base sorts: S 1 � S 2 iff for each w 1 ∈ S 1 there is w 2 ∈ S 2 such that w 1 � w 2 . ◮ On (regular expression) sorts: R 1 � R 2 iff [ [R 1 ] ] � [ [R 2 ] ]. ◮ R 1 ≃ R 2 means R 1 � R 2 and R 2 � R 1 .

  20. Alphabet ◮ Countable set of variables V R for each sort R, satisfying conditions: ◮ V R 1 = V R 2 if R 1 ≃ R 2 . ◮ V R 1 ∩ V R 2 = ∅ if R 1 �≃ R 2 .

  21. Alphabet ◮ Countable set of variables V R for each sort R, satisfying conditions: ◮ V R 1 = V R 2 if R 1 ≃ R 2 . ◮ V R 1 ∩ V R 2 = ∅ if R 1 �≃ R 2 . ◮ A family of sets of function symbols {F R . s | R ∈ R , s ∈ B} , satisfying conditions: ◮ F R 1 . s 1 = F R 2 . s 2 iff R 1 . s 1 ≃ R 2 . s 2 ◮ Monotonicity: If f ∈ F R 1 . s 1 ∩ F R 2 . s 2 and R 1 � R 2 , then s 1 � s 2 . ◮ Preregularity: If f ∈ F R 1 . s 1 and R 2 � R 1 , then there is a � -least element in the set { s | f ∈ F R . s and R 2 � R } . ◮ Finite overloading: For each f , the set {F R . s | f ∈ F R . s } is finite.

  22. Alphabet ◮ Countable set of variables V R for each sort R, satisfying conditions: ◮ V R 1 = V R 2 if R 1 ≃ R 2 . ◮ V R 1 ∩ V R 2 = ∅ if R 1 �≃ R 2 . ◮ A family of sets of function symbols {F R . s | R ∈ R , s ∈ B} , satisfying conditions: ◮ F R 1 . s 1 = F R 2 . s 2 iff R 1 . s 1 ≃ R 2 . s 2 ◮ Monotonicity: If f ∈ F R 1 . s 1 ∩ F R 2 . s 2 and R 1 � R 2 , then s 1 � s 2 . ◮ Preregularity: If f ∈ F R 1 . s 1 and R 2 � R 1 , then there is a � -least element in the set { s | f ∈ F R . s and R 2 � R } . ◮ Finite overloading: For each f , the set {F R . s | f ∈ F R . s } is finite. ◮ Notation. We use ◮ f : R → s for f ∈ F R . s ◮ a : s for a ∈ F 1 . s ◮ x : R for x ∈ V R

  23. Terms The set of terms over V = ∪ R ∈R V R and F = ∪ R ∈R , s ∈B F R . s : The least set T ( F , V ) = {T R ( F , V ) | R ∈ R} such that ◮ V R ⊆ T R ( F , V ). ◮ T R 1 ( F , V ) ⊆ T R 2 ( F , V ) if R 1 � R 2 . ◮ If f : R → s and 1 � R, then f ( ǫ ) ∈ T s ( F , V ). ◮ If f : R → s, t i ∈ T R i ( F , V ) for 1 ≤ i ≤ n , n ≥ 1, such that R 1 . · · · . R n � R, then f ( t 1 , . . . , t n ) ∈ T s ( F , V ).

  24. Terms The set of terms over V = ∪ R ∈R V R and F = ∪ R ∈R , s ∈B F R . s : The least set T ( F , V ) = {T R ( F , V ) | R ∈ R} such that ◮ V R ⊆ T R ( F , V ). ◮ T R 1 ( F , V ) ⊆ T R 2 ( F , V ) if R 1 � R 2 . ◮ If f : R → s and 1 � R, then f ( ǫ ) ∈ T s ( F , V ). ◮ If f : R → s, t i ∈ T R i ( F , V ) for 1 ≤ i ≤ n , n ≥ 1, such that R 1 . · · · . R n � R, then f ( t 1 , . . . , t n ) ∈ T s ( F , V ). Lemma For each term t there exists a � -minimal sort R that is unique modulo ≃ such that t ∈ T R ( F , V ) .

Recommend


More recommend