e ffjc i e n t e n c o d i n g s o f fj r s t o r d e r h
play

E ffjc i e n t e n c o d i n g s o f fj r s t - - PowerPoint PPT Presentation

E ffjc i e n t e n c o d i n g s o f fj r s t - o r d e r H o r n p r o b l e ms i n e q u a t i o n a l l o g i c K o e n C l a e s s e n N i c k S ma l l b o n e E q


  1. E ffjc i e n t e n c o d i n g s o f fj r s t - o r d e r H o r n p r o b l e ms i n e q u a t i o n a l l o g i c K o e n C l a e s s e n N i c k S ma l l b o n e

  2. E q u a t i o n a l t h e o r e m p r o v e r s a r e a w e s o m e ! H i g h p e r f o r m a n c e ! R e a d a b l e p r o o f s ! B u t t h e r e ’ s a p r o b l e m …

  3. R e a s o n i n g a b o u t a l g e b r a

  4. R e a s o n i n g a b o u t a l g e b r a ☹

  5. R e a s o n i n g a b o u t f u n c t i o n a l p r o g r a m s s o r t [ ] = [ ] s o r t ( x : x s ) = i n s e r t x ( s o r t x s ) i n s e r t x [ ] = x : [ ] i n s e r t x ( y : y s ) = i f x < y t h e n x : y : y s e l s e y : ( i n s e r t x y s )

  6. R e a s o n i n g a b o u t f u n c t i o n a l p r o g r a m s s o r t [ ] = [ ] s o r t ( x : x s ) = i n s e r t x ( s o r t x s ) ☹ i n s e r t x [ ] = x : [ ] i n s e r t x ( y : y s ) = i f x < y t h e n x : y : y s e l s e y : ( i n s e r t x y s )

  7. O u r p a p e r Wh a t ? T e a c h a u n i t e q u a l i t y p r o v e r h o w t o r e a s o n a b o u t H o r n c l a u s e s B y e n c o d i n g H o r n c l a u s e s a s H o w ? e q u a t i o n s ( l e a v i n g e x i s t i n g e q u a t i o n s a l o n e ) Wh y ? T o g e t a p r o v e r t h a t s p e c i a l i s e s i n m o s t l y - e q u a t i o n a l r e a s o n i n g

  8. T h e p l a n H o r n c l a u s e : a t m o s t o n e p o s i t i v e l i t e r a l � � ● e . g . f ( x ) = x p ( x ) g ( x ) = a � � ● o r p ( x ) q ( x ) f a l s e S t a g e 1 : h o w t o e n c o d e c l a u s e s o f t h e f o r m : � a = b c = d S t a g e 2 : h o w t o e n c o d e c l a u s e s o f t h e f o r m : � � a = b … a = b c = d 1 1 n n S t a g e 3 : h o w t o e n c o d e p r e d i c a t e s S k i p p e d : h o w t o e n c o d e g o a l c l a u s e s

  9. S t a g e 1 : H o w t o e n c o d e a b i n a r y c l a u s e � ( a = b c = d ) a s a n e q u a t i o n

  10. T h e i d e a i f e q W e a r e g o i n g t o a x i o m a t i s e a f u n c t i o n : i f e q ( x , y , z , w ) = i f x = y t h e n z e l s e w � Tie n w e c a n e n c o d e a = b c = d a s : i f e q ( a , b , c , d ) = d I f a = b t h e n i f e q ( a , b , c , d ) = c = d ; i f a ≠ b t h e n i f e q ( a , b , c , d ) = d . i f e q B u t h o w t o a x i o m a t i s e e q u a t i o n a l l y ?

  11. A x i o m s f o r i f e q ☺ A x i o m 1 : i f e q ( x , x , y , z ) = y ☹ A x i o m 2 : � x ≠ y i f e q ( x , y , z , w ) = w F o r H o r n f o r m u l a s , w e o n l y n e e d t h e fj r s t a x i o m !

  12. H o w t o d i s c h a r g e a c o n d i t i o n a l � a = b c = d G i v e n : i f e q ( a , b , c , d ) = d i f e q ( x , x , y , z ) = y I f a = b t h e n i f e q ( a , b , c , d ) = d = Tii s d e d u c t i o n r u l e ( p o s i t i v e i f e q ( a , a , c , d ) = c u n i t r e s o l u t i o n ) i s e n o u g h s o c = d . f o r H o r n r e a s o n i n g

  13. S t a g e 2 : H o w t o e n c o d e a n a r y c l a u s e n - � � ( a = b c = d e = f ) e . g . a s a n e q u a t i o n

  14. C l a u s e s w i t h m a n y n e g a t i v e l i t e r a l s O p t i o n # 1 : r e p e a t e d l y a p p l y t h e e n c o d i n g → e = g a = b & c = d e = f b e c o m e s � i a = b f e q ( c , d , e , f ) = f b e c o m e s i f e q ( a , b , i f e q ( c , d , e , f ) , f ) = f

  15. C l a u s e s w i t h m a n y n e g a t i v e l i t e r a l s O p t i o n # 2 : t u p l i n g � a = b & c = d e = f b e c o m e s � p a i r ( a , c ) = p a i r ( b , d ) e = f b e c o m e s i f e q ( p a i r ( a , c ) , p a i r ( b , d ) , e , f ) = f w h e r e p a i r m u s t b e f r e s h . ( t h i s i s n o t s o u n d f o r n o n - H o r n p r o b l e m s ! )

  16. ● E x a m p l e : L A T 2 2 4 - 1

  17. S t a g e 3 : H o w t o e n c o d e p r e d i c a t e s u s i n g e q u a t i o n s

  18. E n c o d i n g p r e d i c a t e s t r u e p ( t ) I d e a : a d d a c o n s t a n t a n d e n c o d e a s p ( t ) = t r u e

  19. E n c o d i n g p r e d i c a t e s t r u e p ( t ) I d e a : a d d a c o n s t a n t a n d e n c o d e a s p ( t ) = t r u e U n s o u n d !

  20. E n c o d i n g p r e d i c a t e s t r u e p ( t ) I d e a : a d d a c o n s t a n t a n d e n c o d e a s p ( t ) = t r u e � � S a t i s fj a b l e : (x , y . x = y ) ¬ p � � U n s a t i s fj a b l e : (x , y . x = y ) p ≠ t r u e S o l u t i o n # 1 : u s e t y p e s S o l u t i o n # 2 : . . .

  21. E n c o d i n g p r e d i c a t e s � � S a t i s fj a b l e : (x , y . x = y ) ¬ p � � U n s a t i s fj a b l e : (x , y . x = y ) p ≠ t r u e E n c o d i n g p r e d i c a t e s i s o n l y u n s o u n d b e c a u s e y o u c a n g o � x , y . x = y p = t r u e f r o m t o � ● t h i s i s o n l y a p r o b l e m i f x , y . x = y i s p r o v a b l e b u t t h e f o r m u l a i s s a t i s fj a b l e ● i . e . , w h e n t h e p r o b l e m h a s a m o d e l o f d o m a i n s i z e 1 S o , c h e c k i f t h e r e i s a m o d e l o f s i z e 1 fj r s t ● E a s y - p e a s y : p r e d i c a t e s a r e c o n s t a n t - v a l u e d , a n d a l l e q u a l i t y l i t e r a l s a r e t r u e , s o t h i s i s a H O R N S A T p r o b l e m I f t h e r e i s a m o d e l o f s i z e 1 , t h e p r o b l e m i s s a t i s fj a b l e O t h e r w i s e , e n c o d i n g p r e d i c a t e s i s s o u n d � ● I f x , y . x = y i s p r o v a b l e , t h e p r o b l e m i s u n s a t i s fj a b l e

  22. A n a l t e r n a t i v e e n c o d i n g

  23. T h e i f e q - e n c o d i n g i s s u b o p t i m a l i f e q ( a , b , c , d ) = d B u t i t w i l l a l s o Tie p r o v e r n e e d l e s s l y o n l y n e e d s t o r e a s o n m a k e a a n d a b o u t b e q u a l c a n d d

  24. E n c o d i n g # 2 � a = b c = d b e c o m e s : f r e s h ( a , x , …, x ) = c 1 n f r e s h ( b , x , …, x ) = d 1 n A f r e s h f u n c t i o n A l l f r e e v a r i a b l e s s y m b o l a b c d o f , , a n d ( s u b s t i t u t i o n )

  25. � E n c o d i n g # 2 : a = b c = d � a = b c = d G i v e n : f r e s h ( a , x , …, x ) = c 1 n f r e s h ( b , x , …, x ) = d 1 n I f a = b t h e n f r e s h ( a , x , …, x ) = c = 1 n f r e s h ( b , x , …, x ) = d 1 n c = d s o .

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend