Learning Multiple Predicates with M-ACL


In order to learn multiple predicates with M-ACL, the background knowledge must be represented as an abductive logic program containing the definitions of background predicates, written using the usual prolog syntax, the declaration of abducible predicates and, possibly, the definition of integrity constraints.  When learning multiple predicates, the target predicates must be declared as abducible so that assumptions can be made about them.  Any known integrity constraint regarding target predicates can be added to the input file.

The detailed description of how to write the input file <file_stem>.bg  is described below.  After having prepared the input files, M-ACL can be run, as described in the instruction on how to run M-ACL.

Input files format:

Format of <file_stem>.bg :

See ancestor.bg  as an example. Other examples are grandfather.bg and odd_even.bg.
  1. Bias:

  2. each target predicate must have a "bias" clause The <list of allowed literals> is the list of all the possible literals that
    can be added to the rule <head>:-<body>
    <body> is a template that can be used in order to specialize the clauses accordingly to what is already in the body.   In the example below is a variable so that any rule can be refined with the literals in the list.   The <list of variables> must contain the list of all the variables that may appear in the rule or its refinements and must be the same for all bias facts relative to the same predicate.
    Example:
  3. Abducible predicates:
  4. The variables in the abducible predicates must be all different (use _)
    Example:
  5. Integrity constraints:
  6. Example:
  7. Training set:
  8. Example:
  9. Background theory:
  10. Example:

Output files format:

    The result of the learning phase consists of the file <file_stem>.rules containing the rules learned together with information about the global and local consistency of clauses and the clauses that have, eventually, been retracted. In the case of ancestor.bg, the following output is produced:
      /*
      M-ACL ver 1 AbdProofProc. ver mple
      Input file: ancestor.bg, Output file: ancestor.rules
      Max spec steps=10, Beamsize=10, Derivation depth=50,Verbosity=3,
      Min cov=5, Accuracy stopping threshold=0.800
      4 positive examples, 4 negative examples
      */
      /* Execution time 2.640000 seconds. Generated rules */

      ancestor(A,B):-parent(A,B).
      /* Name: c122 GC: yes, LC: yes
      Covered positive examples: [ancestor(b,c),ancestor(a,b)]
      Covered positive abduced examples: []
      Covered negative abduced examples: []
      Abduced literals: []  */
       

      ancestor(A,B):-parent(A,C),ancestor(C,B).
      /* Name: c147 GC: yes, LC: yes
      Covered positive examples: [ancestor(d,c)]
      Covered positive abduced examples: []
      Covered negative abduced examples: [ancestor(a,c)]
      Abduced literals: [[not(ancestor(c,d)),c147],[not(ancestor(b,d)),c147],[not(ancestor(c,a)),c147]]  */
       

      father(A,B):-male(A),parent(A,B).
      /* Name: c166 GC: yes, LC: yes
      Covered positive examples: [father(a,b)]
      Covered positive abduced examples: []
      Covered negative abduced examples: []
      Abduced literals: []  */

      /* Backtracked clauses

      c135: father(A,B):-male(A),ancestor(A,B).

      */

    First the name of the input and output file are printed, then the values for the parameters are shown together with the total execution time. Then follows the rules that have been learned, together with the set of positive and negative examples covered by them and the set of assumptions made for covering them. In the set of assumptions, each assumption is associated to the rule that generated it.
    The meaning of the fields Name, GC and LC after each clause is the following:
    Name: is a constant that identifies the clause
    GC: state whether the clause is globally consistent
    LC: state whether the clause is locally consistent

    The last part of the output file records the clauses that have been retracted because they generated a global inconsistency.
    For the other examples, see the output files grandfather.rules and odd_even.rules.

 Back to the main ACL page.

Back to the LIA Home Page

Go to the DEIS Home Page Go to the Alma Mater Home Page