Advanced Logic Programming-Languages and Systems (ALPS) UTD Slide- 1 University of Texas at Dallas L. Simon, A. Bansal, A. Mallya, G. Gupta. Co-Logic.

Slides:



Advertisements
Similar presentations
C O - INDUCTIVE LOGIC PROGRAMMING AND ITS APPLICATIONS.
Advertisements

SLD-resolution Introduction Most general unifiers SLD-resolution
Chapter Three: Closure Properties for Regular Languages
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
Advanced Logic Programming-Languages and Systems (ALPS) UTD Slide- 1 University of Texas at Dallas Neda Saeedloei, Gopal Gupta Verifying Complex.
1 How to transform an analyzer into a verifier. 2 OUTLINE OF THE LECTURE a verification technique which combines abstract interpretation and Park’s fixpoint.
© M. Winter COSC 4P41 – Functional Programming Testing vs Proving Testing –uses a set of “typical” examples, –symbolic testing, –may find errors,
Timed Automata.
1 Pierangelo Dell’Acqua Dept. of Science and Technology Linköping University Constraint programming 2001 November 13th 2001
CS 267: Automated Verification Lecture 10: Nested Depth First Search, Counter- Example Generation Revisited, Bit-State Hashing, On-The-Fly Model Checking.
SYMBOLIC MODEL CHECKING: STATES AND BEYOND J.R. Burch E.M. Clarke K.L. McMillan D. L. Dill L. J. Hwang Presented by Rehana Begam.
ISBN Chapter 3 Describing Syntax and Semantics.
Fall Semantics Juan Carlos Guzmán CS 3123 Programming Languages Concepts Southern Polytechnic State University.
CS 355 – Programming Languages
Constraint Logic Programming Ryan Kinworthy. Overview Introduction Logic Programming LP as a constraint programming language Constraint Logic Programming.
CS 330 Programming Languages 09 / 18 / 2007 Instructor: Michael Eckmann.
Specification Formalisms Book: Chapter 5. Properties of formalisms Formal. Unique interpretation. Intuitive. Simple to understand (visual). Succinct.
PSUCS322 HM 1 Languages and Compiler Design II Formal Semantics Material provided by Prof. Jingke Li Stolen with pride and modified by Herb Mayer PSU Spring.
Semantics with Applications Mooly Sagiv Schrirber html:// Textbooks:Winskel The.
CS 330 Programming Languages 09 / 16 / 2008 Instructor: Michael Eckmann.
Describing Syntax and Semantics
Recursion Chapter 7. Chapter 7: Recursion2 Chapter Objectives To understand how to think recursively To learn how to trace a recursive method To learn.
Recursion Chapter 7. Chapter 7: Recursion2 Chapter Objectives To understand how to think recursively To learn how to trace a recursive method To learn.
Propositional Calculus Math Foundations of Computer Science.
Equational Reasoning Math Foundations of Computer Science.
Applied Logic, Programming-Languages and Systems (ALPS) UTD Slide- 1 University of Texas at Dallas Logic, Infinite Computation, and Coinduction Gopal.
Mathematical Modeling and Formal Specification Languages CIS 376 Bruce R. Maxim UM-Dearborn.
Recursion Chapter 7. Chapter Objectives  To understand how to think recursively  To learn how to trace a recursive method  To learn how to write recursive.
Advanced Logic Programming-Languages and Systems (ALPS) UTD Slide- 1 University of Texas at Dallas L. Simon, A. Bansal, A. Mallya, G. Gupta. Predicate.
Benjamin Gamble. What is Time?  Can mean many different things to a computer Dynamic Equation Variable System State 2.
Applied Logic, Programming-Languages and Systems (ALPS) UTD Slide- 1 University of Texas at Dallas Coinductive Logic Programming and its Applications.
CS 403: Programming Languages Lecture 19 Fall 2003 Department of Computer Science University of Alabama Joel Jones.
Profs. Necula CS 164 Lecture Top-Down Parsing ICOM 4036 Lecture 5.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 15-1 Mälardalen University 2012.
Reactive systems – general
ISBN Chapter 3 Describing Semantics -Attribute Grammars -Dynamic Semantics.
CS 363 Comparative Programming Languages Semantics.
CS 611: Lecture 6 Rule Induction September 8, 1999 Cornell University Computer Science Department Andrew Myers.
Propositional Calculus CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
3.2 Semantics. 2 Semantics Attribute Grammars The Meanings of Programs: Semantics Sebesta Chapter 3.
Chapter 3 Part II Describing Syntax and Semantics.
Semantics In Text: Chapter 3.
Ch. 13 Ch. 131 jcmt CSE 3302 Programming Languages CSE3302 Programming Languages (notes?) Dr. Carter Tiernan.
Types and Programming Languages Lecture 12 Simon Gay Department of Computing Science University of Glasgow 2006/07.
Lecture 5 1 CSP tools for verification of Sec Prot Overview of the lecture The Casper interface Refinement checking and FDR Model checking Theorem proving.
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
Applied Logic, Programming-Languages and Systems (ALPS) UTD Slide- 1 University of Texas at Dallas Modal Logic Gopal Gupta Department of Computer.
From Hoare Logic to Matching Logic Reachability Grigore Rosu and Andrei Stefanescu University of Illinois, USA.
Applied Logic, Programming-Languages and Systems (ALPS) UTD Slide- 1 University of Texas at Dallas Coinductive Logic Programming and its Applications.
Advanced Formal Methods Lecture 3: Simply Typed Lambda calculus Mads Dam KTH/CSC Course 2D1453, Some material from B. Pierce: TAPL + some from.
Syntax Analysis – Part I EECS 483 – Lecture 4 University of Michigan Monday, September 17, 2006.
This Week Lecture on relational semantics Exercises on logic and relations Labs on using Isabelle to do proofs.
Program Correctness. The designer of a distributed system has the responsibility of certifying the correctness of the system before users start using.
07/10/04 AIPP Lecture 5: List Processing1 List Processing Artificial Intelligence Programming in Prolog Lecturer: Tim Smith Lecture 5 07/10/04.
Variants of LTL Query Checking Hana ChocklerArie Gurfinkel Ofer Strichman IBM Research SEI Technion Technion - Israel Institute of Technology.
CMSC 330: Organization of Programming Languages Operational Semantics.
Advanced Logic Programming-Languages and Systems (ALPS) UTD Slide- 1 University of Texas at Dallas L. Simon, A. Mallya, A. Bansal, G. Gupta. Extending.
CS 404Ahmed Ezzat 1 CS 404 Introduction to Compiler Design Lecture 1 Ahmed Ezzat.
Logic Programming Lecture 2: Unification and proof search.
Applied Logic, Programming-Languages and Systems (ALPS) UTD Slide- 1 University of Texas at Dallas Coinductive Logic Programming and its Applications.
Goal-directed Execution of Answer Set Programs
Automating Induction for Solving Horn Clauses
Logic, Infinite Computation, and Coinduction
Propositional Calculus: Boolean Algebra and Simplification
Lecture 5 Floyd-Hoare Style Verification
Prolog syntax + Unification
Finite-Trace Linear Temporal Logic: Coinductive Completeness
Testing vs Proving Testing uses a set of “typical” examples,
Program correctness Model-checking CTL
Presentation transcript:

Advanced Logic Programming-Languages and Systems (ALPS) UTD Slide- 1 University of Texas at Dallas L. Simon, A. Bansal, A. Mallya, G. Gupta. Co-Logic Programming: Extending Logic Programming with Coinduction by Luke Simon, Ajay Bansal, Ajay Mallya, Gopal Gupta. Presented by Richard Min. ICALP 2007 (Wroclaw, Poland) Advanced Logic Programming-Languages and Systems (ALPS) Lab The University of Texas at Dallas, Richardson, Texas, USA

Advanced Logic Programming-Languages and Systems (ALPS) UTD Slide- 2 University of Texas at Dallas L. Simon, A. Bansal, A. Mallya, G. Gupta. Induction and Coinduction Induction is a mathematical technique for finitely reasoning about an infinite number of things. –If there were only finitely many different things, than induction would not be needed. –Naturals: 0, 1, 2, … –The naïve “proof” 3 components of inductive definition: (1) Initiality, (2) iteration, (3) minimality –for example, for example, for a list: [ ] – an empty list is a list (initiality) [ H | T ] is a list if T is a list and H is a list (iteration) nothing else is a list (minimality)

Advanced Logic Programming-Languages and Systems (ALPS) UTD Slide- 3 University of Texas at Dallas L. Simon, A. Bansal, A. Mallya, G. Gupta. Induction and Coinduction Coinduction is a mathematical technique for finitely reasoning about infinite things. –Mathematical dual of induction –If all things were finite, then coinduction would not be needed. –Perpetual programs, –Infinite strings: networks, model checking 2 components of coinductive definition: (1) iteration, (2) maximality –for example, for a list [ H | T ] is a list if T is a list and H is a list (iteration). Maximal set that satisfies the specification of a list.

Advanced Logic Programming-Languages and Systems (ALPS) UTD Slide- 4 University of Texas at Dallas L. Simon, A. Bansal, A. Mallya, G. Gupta. Mathematical Foundations Duality provides a source of new mathematical tools that reflect the sophistication of tried and true techniques. DefinitionProofMapping Least fixed pointInductionRecursion Greatest fixed pointCoinductionCorecursion

Advanced Logic Programming-Languages and Systems (ALPS) UTD Slide- 5 University of Texas at Dallas L. Simon, A. Bansal, A. Mallya, G. Gupta. Example: Natural Numbers   (S) = { 0 }  { succ(x) | x  S } N =   –where  is least fixed-point. aka “inductive definition” –Let N be the smallest set such that 0  N x  N implies x + 1  N Induction corresponds to LFP interpretation.

Advanced Logic Programming-Languages and Systems (ALPS) UTD Slide- 6 University of Texas at Dallas L. Simon, A. Bansal, A. Mallya, G. Gupta. Example: Natural Numbers and Infinity   (S) = { 0 }  { succ(x) | x  S }   unambiguously defines another set N’ =   = N  {  } –  = succ( succ( succ(... ) ) ) = succ(  ) =  + 1 –where   is a greatest fixed-point Coinduction corresponds to GFP interpretation.

Advanced Logic Programming-Languages and Systems (ALPS) UTD Slide- 7 University of Texas at Dallas L. Simon, A. Bansal, A. Mallya, G. Gupta. Applications of Coinduction model checking bisimilarity proofs for process algebras – -calculus –  -calculus lazy evaluation reasoning with infinite structures perpetual processes cyclic structures operational semantics of “coinductive logic programming”

Advanced Logic Programming-Languages and Systems (ALPS) UTD Slide- 8 University of Texas at Dallas L. Simon, A. Bansal, A. Mallya, G. Gupta. Inductive Logic Programming Logic Programming –is actually inductive logic programming. –has inductive definition. –useful for writing programs for reasoning about finite things: - data structures - properties

Advanced Logic Programming-Languages and Systems (ALPS) UTD Slide- 9 University of Texas at Dallas L. Simon, A. Bansal, A. Mallya, G. Gupta. Infinite Objects and Properties traditional logic programming is unable to reason about infinite objects and/or properties. Computer Network example: perpetual binary streams –traditional logic programming cannot handle bit(0). bit(1). bitstream( [ H | T ] ) :- bit( H ), bitstream( T ). |?- X = [ 0, 1, 1, 0 | X ], bitstream( X ).

Advanced Logic Programming-Languages and Systems (ALPS) UTD Slide- 10 University of Texas at Dallas L. Simon, A. Bansal, A. Mallya, G. Gupta. Thesis Logic Programming with its mathematical dual. –traditional logic programming –co-logic programming Duality can be exploited –traditional inductive logic programming –dual of it (= coinductive logic programming) –combining both using a stratification technique To Extend logic programming with –coinduction, corecursion (e.g., bitstream) –infinite data structure (e.g., infinite lists) –ability to reason about infinite objects or infinite properties

Advanced Logic Programming-Languages and Systems (ALPS) UTD Slide- 11 University of Texas at Dallas L. Simon, A. Bansal, A. Mallya, G. Gupta. Overview of Coinductive LP Programming Language= Syntax + Semantics Coinductive Logic Program is a definite program with maximal co-Herbrand model declarative semantics. Declarative Semantics –across the board dual, greatest fixed-points –terms: co-Herbrand universe U co (P) –atoms: co-Herbrand base B co (P) –program semantics: maximal co-Herbrand model M co (P).

Advanced Logic Programming-Languages and Systems (ALPS) UTD Slide- 12 University of Texas at Dallas L. Simon, A. Bansal, A. Mallya, G. Gupta. Coinductive LP: An Example Let P 1 be the following coinductive program. :- coinductive from/2. from( N, [ N | T ] ) :- from( s(N), T ). |?- from( 0, _ ). co-Herbrand Universe: U co (P 1 ) = N    L where N=[0, s(0), s(s(0)),... ],  ={ s(s(s(... ) ) ) }, and L is the the set of all finite and infinite lists of elements in N,  and L. co-Herbrand Model: M co (P 1 )={ from(t, [t, s(t), s(s(t)),... ]) | t  U co (P 1 ) } from(0, [0, s(0), s(s(0)),... ])  M co (P 1 ) implies the query be “yes” Without “coinductive” declaration of from, M co (P 1 ’)=  This corresponds traditional semantics of LP with infinite trees.

Advanced Logic Programming-Languages and Systems (ALPS) UTD Slide- 13 University of Texas at Dallas L. Simon, A. Bansal, A. Mallya, G. Gupta. Operational Semantics: co-SLD nondeterministic state transition system states are pairs of –a finite tree of syntactic atoms (as in Prolog) –a system of syntactic term equations in x = f (x). For a program p :- p. => a query |?- p. to succeed. p( [ 1 | T ] ) :- p( T ). => |?- p(X) to succeed with X= [ 1 | X ]. transition rules –“coinductive hypothesis rule” if coinductive Q is called, check whether to unify with Q called earlier (e.g., P :- Q) if so, then Q succeeds. –definite clause rule

Advanced Logic Programming-Languages and Systems (ALPS) UTD Slide- 14 University of Texas at Dallas L. Simon, A. Bansal, A. Mallya, G. Gupta. Correctness Theorem (soundness). If atom A has a successful co-SLD derivation in program P, then E(A) is true in program P, where E is the resulting variable bindings for the derivation. Theorem (completeness). If A  M co (P) has a rational idealized proof, then A has a successful co-SLD derivation in program P.

Advanced Logic Programming-Languages and Systems (ALPS) UTD Slide- 15 University of Texas at Dallas L. Simon, A. Bansal, A. Mallya, G. Gupta. Implementation Search strategy: hypothesis-first, leftmost, depth-first Meta-Interpreter implementation. query(Goal) :- solve([],Goal). solve(Hypothesis, (Goal1,Goal2)) :- solve( Hypothesis, Goal1), solve(Hypothesis,Goal2). solve( _, Atom) :- builtin(Atom), Atom. solve(Hypothesis,Atom):- member(Atom, Hypothesis). solve(Hypothesis,Atom):- notbuiltin(Atom), clause(Atom,Atoms), solve([Atom|Hypothesis],Atoms). real implementation with YAP Prolog

Advanced Logic Programming-Languages and Systems (ALPS) UTD Slide- 16 University of Texas at Dallas L. Simon, A. Bansal, A. Mallya, G. Gupta. Example – 0, s(0), s(s(0)), … :- coinductive stream/1. stream( [ H | T ] ) :- num( H ), stream( T ). num( 0 ). num( s( N ) ) :- num( N ). |?- stream( [ 0, s( 0 ), s( s ( 0 ) ) | T ] ). 1.MEMO: stream( [ 0, s( 0 ), s( s ( 0 ) ) | T ] ) 2.MEMO: stream( [ s( 0 ), s( s ( 0 ) ) | T ] ) 3.MEMO: stream( [ s( s ( 0 ) ) | T ] ) Answers: T = [ 0, s(0), s(s(0)), s(s(0)) | T ] T = [ 0, s(0), s(s(0)), s(0), s(s(0)) | T ] T = [ 0, s(0), s(s(0)) | T ]... T = [ 0, s(0), s(s(0)) | X ] (where X is any rational list of numbers.)

Advanced Logic Programming-Languages and Systems (ALPS) UTD Slide- 17 University of Texas at Dallas L. Simon, A. Bansal, A. Mallya, G. Gupta. Infinite Terms and Properties :- coinductive append/3. append( [ ], X, X ). append( [ H | T ], Y, [ H | Z ] ) :- append( T, Y, Z ). |?- Y = [ 4, 5, 6, | Y ], append( [ 1, 2, 3], Y, Z). Answer: Z = [ 1, 2, 3 | Y ], Y=[ 4, 5, 6, | Y] |?- X = [ 1, 2, 3, | X ], Y = [ 3, 4 | Y ], append( X, Y, Z). Answer: Z = [ 1, 2, 3 | Z ]. |?- Z = [ 1, 2 | Z ], append( X, Y, Z ). Answer:X = [ ], Y = [ 1, 2 | Z ] ; X = [ 1 ], Y = [ 2 | Z ] ; X = [ 1, 2 ], Y = Z

Advanced Logic Programming-Languages and Systems (ALPS) UTD Slide- 18 University of Texas at Dallas L. Simon, A. Bansal, A. Mallya, G. Gupta. A few more examples - comember member(H, [ H | _ ]). member(H, [ _ | T ]) :- member(H, T). drop(H, [H | T], T). drop(H, [_ | T], T1) :- drop(H, T, T1). :- coinductive(comember/2). comember(X,L) :- drop(X,L,L1), comember(X,L1). ?- X=[1,2,3|X], comember(2,X). Answer: yes. ?- X=[1,2,3,1,2,3], comember(2,X). Answer: no. ?- X=[1,2,3|X], comember(Y,X). Answer: Y = 1; Y = 2; Y = 3;

Advanced Logic Programming-Languages and Systems (ALPS) UTD Slide- 19 University of Texas at Dallas L. Simon, A. Bansal, A. Mallya, G. Gupta. A few more examples - sieve :- coinductive sieve/2, filter/3, comember/2. primes(X) :- generate_infinite_list(I),sieve(I,L),comember(X,L). sieve([H|T],[H,R]) :- filter(H,T,F),sieve(F,R). filter(H,[ ],[ ]). filter(H,[K | T],[K | T1]):- R is K mod H, R>0,filter(H,T,T1). filter(H,[K | T],T1) :- 0 is K mod H, filter(H,T,T1). :-coinductive int/2 int(X,[X | Y]) :- X1 is X+1, int(X1,Y). generate_infinite_list(I) :- int(2,I).

Advanced Logic Programming-Languages and Systems (ALPS) UTD Slide- 20 University of Texas at Dallas L. Simon, A. Bansal, A. Mallya, G. Gupta. Co-Logic Programming combines both halves of logic programming: –traditional logic programming –coinductive logic programming

Advanced Logic Programming-Languages and Systems (ALPS) UTD Slide- 21 University of Texas at Dallas L. Simon, A. Bansal, A. Mallya, G. Gupta. Syntax of Co-Logic Programs syntactically identical to traditional logic programming, except predicates are labeled: –inductive –coinductive and stratification restriction enforced where: –inductive and coinductive predicates cannot be mutually recursive. p :- q. q :- p. if p coinductive & q inductive, then this is not allowed

Advanced Logic Programming-Languages and Systems (ALPS) UTD Slide- 22 University of Texas at Dallas L. Simon, A. Bansal, A. Mallya, G. Gupta. Semantics of Co-Logic Programs declarative semantics –recursive alternating fixed-point –well-defined due to stratification restriction for example. p :- q. q :- p. operational semantics –alternating SLD and co-SLD –low additional overhead –easy to implement Implementation on top of YAP Prolog is available.

Advanced Logic Programming-Languages and Systems (ALPS) UTD Slide- 23 University of Texas at Dallas L. Simon, A. Bansal, A. Mallya, G. Gupta. Application: Model Checking automated verification of hardware and software systems  -automata –accept infinite strings –accepting state must be traversed infinitely often requires computation of lfp and gfp easily accomplished in co-logic programming traditional LP works for safety property (that is base on lfp) but not for liveness in an elegant manner.

Advanced Logic Programming-Languages and Systems (ALPS) UTD Slide- 24 University of Texas at Dallas L. Simon, A. Bansal, A. Mallya, G. Gupta. Automatically Check Properties kinds of properties: safety and liveness search for counter-example

Advanced Logic Programming-Languages and Systems (ALPS) UTD Slide- 25 University of Texas at Dallas L. Simon, A. Bansal, A. Mallya, G. Gupta. Safety versus Liveness Safety –“nothing bad will happen” –naturally described inductively –straightforward encoding into traditional LP liveness –“something good will happen” –dual of safety –naturally described coinductively –straightforward encoding into coinductive LP

Advanced Logic Programming-Languages and Systems (ALPS) UTD Slide- 26 University of Texas at Dallas L. Simon, A. Bansal, A. Mallya, G. Gupta. Automata automata([X|T],St):- trans(St,X,NewSt),automata(T,NewSt). automata([ ],St) :- final(St). trans(s0,a,s1). trans(s1,b,s2). trans(s2,c,s3). trans(s3,d,s0). trans(s2,3,s0). final(s2). ?- automata(X,s0). X=[ a, b, c, d | X ]; X=[ a, b, e | X ];

Advanced Logic Programming-Languages and Systems (ALPS) UTD Slide- 27 University of Texas at Dallas L. Simon, A. Bansal, A. Mallya, G. Gupta. Counter sm1(N,[sm1|T]) :- N1 is N+1 mod 4, s0(N1,T), N1>=0. s0(N,[s0|T]) :- N1 is N+1 mod 4, s1(N1,T), N1>=0. s1(N,[s1|T]) :- N1 is N+1 mod 4, s2(N1,T), N1>=0. s2(N,[s2|T]) :- N1 is N+1 mod 4, s3(N1,T), N1>=0. s3(N,[s3|T]) :- N1 is N+1 mod 4, s0(N1,T), N1>=0. ?- sm1(-1,X),comember(sm1,X). No. (because sm1 does not occur in X infinitely often).

Advanced Logic Programming-Languages and Systems (ALPS) UTD Slide- 28 University of Texas at Dallas L. Simon, A. Bansal, A. Mallya, G. Gupta. Verification of Real Time Systems Nested Finite and Infinite Automata :- coinductive state/2. state(s0, [s0,s1 | T]):- enter, work, state(s1,T). state(s1, [s1 | T]):- exit, state(s2,T). state(s2, [s2 | T]):- repeat, state(s0,T). state(s0, [s0 | T]):- error, state(s3,T). state(s3, [s3 | T]):- repeat, state(s0,T). work. enter. repeat. exit. error. work :- work. |?- state(s0,X), absent(s2,X). X=[ s0, s3 | X ]

Advanced Logic Programming-Languages and Systems (ALPS) UTD Slide- 29 University of Texas at Dallas L. Simon, A. Bansal, A. Mallya, G. Gupta. Verification of Real-Time Systems “Train, Controller, Gate”  -automata with time constrained transitions straightforward encoding into CLP(R)

Advanced Logic Programming-Languages and Systems (ALPS) UTD Slide- 30 University of Texas at Dallas L. Simon, A. Bansal, A. Mallya, G. Gupta. Verification of Real-Time Systems “Train, Controller, Gate” :- use_module(library(clpr)). :- coinductive driver/9. train(X, up, X, T1,T2,T2). % up=idle train(s0,approach,s1,T1,T2,T3) :- {T3=T1}. train(s1,in,s2,T1,T2,T3):-{T1-T2>2,T3=T2} train(s2,out,s3,T1,T2,T3). train(s3,exit,s0,T1,T2,T3):-{T3=T2,T1-T2<5}. train(X,lower,X,T1,T2,T2). train(X,down,X,T1,T2,T2). train(X,raise,X,T1,T2,T2).

Advanced Logic Programming-Languages and Systems (ALPS) UTD Slide- 31 University of Texas at Dallas L. Simon, A. Bansal, A. Mallya, G. Gupta. Verification of Real-Time Systems “Train, Controller, Gate” contr(s0,approach,s1,T1,T2,T1). contr(s1,lower,s2,T1,T2,T3):- {T3=T2, T1-T2=1}. contr(s2,exit,s3,T1,T2,T1). contr(s3,raise,s0,T1,T2,T2):-{T1-T2<1}. contr(X,in,X,T1,T2,T2). contr(X,up,X,T1,T2,T2). contr(X,out,X,T1,T2,T2). contr(X,down,X,T1,T2,T2).

Advanced Logic Programming-Languages and Systems (ALPS) UTD Slide- 32 University of Texas at Dallas L. Simon, A. Bansal, A. Mallya, G. Gupta. Verification of Real-Time Systems “Train, Controller, Gate” gate(s0,lower,s1,T1,T2,T3):- {T3=T1}. gate(s1,down,s2,T1,T2,T3):- {T3=T2,T1-T2<1}. gate(s2,raise,s3,T1,T2,T3):- {T3=T1}. gate(s3,up,s0,T1,T2,T3):- {T3=T2,T1-T2>1,T1-T2<2 }. gate(X,approach,X,T1,T2,T2). gate(X,in,X,T1,T2,T2). gate(X,out,X,T1,T2,T2). gate(X,exit,X,T1,T2,T2).

Advanced Logic Programming-Languages and Systems (ALPS) UTD Slide- 33 University of Texas at Dallas L. Simon, A. Bansal, A. Mallya, G. Gupta. Verification of Real-Time Systems “Train, Controller, Gate” driver(S0,S1,S2, T,T0,T1,T2, [ X | Rest ], [ (X,T) | R ]) :- train(S0,X,S00,T,T0,T00), contr(S1,X,S10,T,T1,T10), gate(S2,X,S20,T,T2,T20), {TA > T}, driver(S00,S10,S20,TA,T00,T10,T20,Rest,R). |?- driver(s0,s0,s0,T,Ta,Tb,Tc,X,R). R=[(approach,A), (lower,B), (down,C), (in,D), (out,E), (exit,F), (raise,G), (up,H) | R ], X=[approach, lower, down, in, out, exit, raise, up | X] ; R=[(approach,A),(lower,B),(down,C),(in,D),(out,E),(exit,F),(raise,G), (approach,H),(up,I)|R], X=[approach,lower,down,in,out,exit,raise,approach,up | X] ; % where A, B, C,... H, I are the corresponding wall clock time of events generated.

Advanced Logic Programming-Languages and Systems (ALPS) UTD Slide- 34 University of Texas at Dallas L. Simon, A. Bansal, A. Mallya, G. Gupta. Other Applications goal-directed execution of ASP reasoning about web services with USDL –service subsumption = type subsumption lazy logic programming and concurrent logic programming

Advanced Logic Programming-Languages and Systems (ALPS) UTD Slide- 35 University of Texas at Dallas L. Simon, A. Bansal, A. Mallya, G. Gupta. Related Work rational trees declarative semantics for infinite SLD derivations coinductive tabling proof method lazy functional logic programming

Advanced Logic Programming-Languages and Systems (ALPS) UTD Slide- 36 University of Texas at Dallas L. Simon, A. Bansal, A. Mallya, G. Gupta. Conclusion via duality, main contributions: –dual of traditional logic programming –operational semantics for coinduction –combining both halves of logic programming main result: co-logic programming applications to verification, planning, and web services

Advanced Logic Programming-Languages and Systems (ALPS) UTD Slide- 37 University of Texas at Dallas L. Simon, A. Bansal, A. Mallya, G. Gupta. Related Publications 1.Luke Simon, Ajay Mallya, Ajay Bansal, and Gopal Gupta. Coinductive logic programming. In Proceedings of the International Conference on Logic Programming. Lecture Notes in Computer Science. Springer, Luke Simon, Ajay Mallya, Ajay Bansal, and Gopal Gupta. Co-Logic programming: Extending logic programming with coinduction. In Proceedings of the International Workshop on Software Verification and Validation, Gopal Gupta, Ajay Bansal, Richard Min, Luke Simon, Ajay Mallya, Coinductive logic programming and its applications. (tutorial paper). In ICLP’07, 2007.