================================================================= LILP - Lambda Inductive Logic Programming Learning predicate definitions from positive-only examples ================================================================= This directory contains the LILP system and a number of examples illustrating its work. The system is supplied in Prolog source code with the file "lilp.pl". The present version of LILP runs on SICStus Prolog v.3. All the other files contain example data sets for learning various predicate definitions. ================================================================= Description of LILP ================================================================= ================================================================= References: ================================================================= Markov, Z. Lambda-Subsumption and Its Application to Learning from Positive-only Examples, in: S. Muggleton (ed.), Proceedings of ILP-96, Stockholm, August, 1996, Selected Papers, Lecture Notes in Artificial Intelligence, Vol.1314, Springer, 1997, 377-396. Markov, Z. Generalization under Implication by lambda-Subsumption, in: David Page (ed.), Proceedings of ILP-98, Madison, Wisconsin, USA, July 22-24, 1998, Lecture Notes in Computer Science, Vol. 1446, Springer, 1998, 215-224. ================================================================= Top level predicate: lilp(+TargetPredicate/Arity) ================================================================= Prints the induced clauses for TargetPredicate and asserts them in the database in the following form: lilp_clause(SeedExample,Clause,Cover) SeedExample - the example from which Clause is induced; Clause - the induced clause; Cover - list of examples covered by Clause. ================================================================= Data required (asserted in the database before starting) ================================================================= 1. background([P1/A1,...,Pn/An]). Bi - predicate name, Ai - arity 2. propositional([C1,C2,...,Cm]). Ci - constants occurring in the examples, not variabilized in the predicate definition. If there are no such constants then specify propositional([]). 3. Clauses for P1,...,Pn and instances of TargetPredicate. ================================================================= Requirements to the data ================================================================= 1. All data are specified in DATALOG. Though functions are allowed their structure is used for unification only, but not for literal search. 2. The arguments of all atoms MAY NOT be Prolog lists. Preferably use atomic type. Any non-list term is also acceptable. See file "member3" for details. 3. In case of non-ground background knowledge ensure that the predicates behave correctly when called with a single instantiated agrument. See file "member3". 4. Do not use well-known or built-in predicate names (e.g. append, member etc.) to avoid name clashes. 5. Since there are no argument types, preferably use different domains for different types of arguments (see the rdiff/3 and fdiff/3 definitions in "chess"). ================================================================= Use of negative examples ================================================================= Generally negative examples are not necessary. However there are some special cases when negatives help: 1. Specifying the more specific predicate to be learnt, when two predicates (one more general than the other) can be learned given same data (see the "min" example). 2. Allowing singleton head variables. See "chess" and "krki". ================================================================= Adjustable parameters (defined in source code - lilp.pl) ================================================================= 1. MaxDet - Maximal number of determinate literals in a clause. The default is MaxDet=3, specified in the goal "for(0,N,3)" in the find_clause/2 predicate. 2. MaxDepth - Maximal number of body literals determining a single head argument. The default is 5, specified in the goal "for(1,Depth,5)" in the literal/3 predicate. ================================================================= Requirements to the Prolog system: SICStus Prolog v.3 (no libraries used) ================================================================= If another version of Prolog is used then it must provide: 1. Standard Edinburgh syntax 2. Built-in definitions of: * findall(Term,Goal,List) - List contains all possible instantiations of Term, when executing Goal; * \+(Goal) - negation by failure ("not Goal" in some versions) ================================================================= How to run LILP ================================================================= 1. Consult (or compile) the source file "lilp.pl". 2. Consult (or compile) the data set file (e.g. "member1.pl"). 3. Type "lilp(TragetPredicate/Arity)." at the top level. Here is an example of the output given by the system when "member1.pl" file is used: ?- lilp(memb/2). Searching clause for-memb(b,[a,b,c]) det_literals-[] Found-(memb(A,B):-components(B,C,D),memb(A,D)) Searching clause for-memb(b,[b,c]) det_literals-[] det_literals-[components([b,c],b,[c])] Found-(memb(A,B):-components(B,A,C),memb(D,C),memb(A,E)) Searching clause for-memb(c,[c]) det_literals-[] Found-(memb(A,B):-components(B,A,C)) Check for clause subsumption... Removing-(memb(A,B):-components(B,A,C),memb(D,C),memb(A,E)) Clauses found in 0.17 seconds: ------------------------------ memb(A,B):-components(B,C,D),memb(A,D) memb(A,B):-components(B,A,C) ================================================================= FOR MORE INFORMATION CONTACT: Zdravko Markov Department of Computer Science, Central Connecticut State University 1615 Stanley Street, New Britain, CT 06050, U.S.A. Phone: (860) 832-2711 E-mail: markovz@ccsu.edu URL: http://www.cs.ccsu.edu/~markov/ =================================================================