1 / 24

Yin-Yang of Programs and Three-Valued Logics

Yin-Yang of Programs and Three-Valued Logics. Jerzy Tyszkiewicz Instytut Informatyki UW. Three-valued logics. Programs. Three-Valued Logics for Programs. Explicit SQL Datalog with negation Implicit Every regular programming language Conditional expressions.

cachez
Télécharger la présentation

Yin-Yang of Programs and Three-Valued Logics

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Yin-Yang of Programs and Three-Valued Logics Jerzy Tyszkiewicz Instytut Informatyki UW

  2. Three-valued logics Programs

  3. Three-Valued Logics for Programs • Explicit • SQL • Datalog with negation • Implicit • Every regular programming language • Conditional expressions

  4. SQL, Heyting-Kleene-Łukasiewicz,Goodman-Nguyen-Walker

  5. Sobociński, Schay-Adams-Calabrese

  6. Strict evaluation, Bochvar

  7. Lazy evaluation

  8. Conditionals • An object can red r, yellow y or blue b • Pr(r)=Pr(y)=Pr(b)=1/3 • What is the probability, that it is b, given that if it is not r, then it is b? • Pr(b |(b |¬ r)) • Not a well-defined expression

  9. Conditionals

  10. Conditionals G-N-W

  11. Conditional S-A-C

  12. Datalog q(X, Y) ← edge(X, Y) q(X, Z) ← edge(X, Y), q(Y, Z) Computation stabilises eventually, if started from empty intentional relation q. The resulting q is two-valued.

  13. Datalog with negation q(X, Y) ← r(X, Y, Z), ¬q(Y, X) q(X, Y) ← s(X, Y, Z), r(X, Y, Z), q(X, Y), ¬q(Y, Y) Relation q need not stabilise during computation.

  14. Datalog with negation • Some tuples are almost always in q • Some tuples are almost always not in q • Some tuples continue changing status forever

  15. Datalog with negation The resulting relation is three-valued. • Some tuples are in the computed q • Some tuples are not in the computed q • Some tuples are undecided

  16. Mutual definability of conditional algebras • Are the connectives of SAC and GNW algebras definable in each other?

  17. Mutual definability of conditional algebras • The main question is equivalent to defibability of certain three-valued functions by composition of other functions. • We use programs to enumerate all possible two-argument compositions of the basic connectives.

  18. Mutual definability of conditional algebras Theorem 1. An n-argument connective f : {0,1,$} →{0,1,$} is definable in SAC iff f($,...,$) =$. There are 6561 of binary ones. In particular, all connectives of GNW are definable in SAC.

  19. Mutual definability of conditional algebras I could pretend not using computer in the proof of Theorem 1.

  20. Mutual definability of conditional algebras Theorem 2. The conjunction and disjunction of SAC are not definable in GNW. COND of SAC is definable in GNW. There are only 849 two-argument connectives definable in GNW.

  21. Mutual definability of conditional algebras At present I could not give a proof of Theorem 2 without reference to the computer.

  22. Internal structure of conditional algebras Theorem 3. SAC an GNW have Sheffer-like definable connectives: ones that are definable and suffice alone to define all other connectives.

  23. My co-authors Piotr Chrząstowski-Wachtel Achim Hoffmann Arthur Ramer

  24. you! Thank

More Related