Permalink
Browse files

Replace `metagol` local `size/2 `predicate with `lists::length/2`

  • Loading branch information...
pmoura committed Jan 8, 2019
1 parent 2d257e3 commit a06b9168f7aa8fcd017819f85b5d316e626790fc
Showing with 7 additions and 14 deletions.
  1. +1 −1 docs/_sources/index.rst.txt
  2. +1 −1 docs/_sources/metagol_0.rst.txt
  3. +1 −1 docs/index.html
  4. +1 −1 docs/metagol_0.html
  5. +3 −10 ports/metagol/metagol.lgt
@@ -17,4 +17,4 @@ Indices and tables
* :ref:`genindex`
* :ref:`search`

Generated on Tue Jan 8 14:55:19 WET 2019
Generated on Tue Jan 8 15:27:32 WET 2019
@@ -9,7 +9,7 @@
Inductive logic programming (ILP) system based on meta-interpretive learning.

| **Author:** Metagol authors; adapted to Logtalk by Paulo Moura.
| **Version:** 0.15
| **Version:** 0.16
| **Date:** 2019/1/8

| **Copyright:** Copyright 2016 Metagol authors; Copyright 2018-2019 Paulo Moura
@@ -2699,7 +2699,7 @@ <h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Pe
<li><a class="reference internal" href="genindex.html"><span class="std std-ref">Index</span></a></li>
<li><a class="reference internal" href="search.html"><span class="std std-ref">Search Page</span></a></li>
</ul>
<p>Generated on Tue Jan 8 14:55:19 WET 2019</p>
<p>Generated on Tue Jan 8 15:27:32 WET 2019</p>
</div>


@@ -211,7 +211,7 @@ <h1><code class="docutils literal notranslate"><span class="pre">metagol</span><
<p>Inductive logic programming (ILP) system based on meta-interpretive learning.</p>
<div class="line-block">
<div class="line"><strong>Author:</strong> Metagol authors; adapted to Logtalk by Paulo Moura.</div>
<div class="line"><strong>Version:</strong> 0.15</div>
<div class="line"><strong>Version:</strong> 0.16</div>
<div class="line"><strong>Date:</strong> 2019/1/8</div>
</div>
<div class="line-block">
@@ -38,7 +38,7 @@
implements(expanding)).

:- info([
version is 0.15,
version is 0.16,
author is 'Metagol authors; adapted to Logtalk by Paulo Moura.',
date is 2019/01/08,
copyright is 'Copyright 2016 Metagol authors; Copyright 2018-2019 Paulo Moura',
@@ -197,7 +197,7 @@
prove(Body1,FullSig,Sig2,MaxN,N3,N2,[sub(Name,P,A,MetaSub,PredTypes)|Prog1],Prog2).

add_empty_path([P|Args],p(inv,P,A,Args,[P|Args],[])) :-
size(Args,A).
length(Args,A).

select_lower(P,A,FullSig,_Sig1,Sig2) :-
nonvar(P),!,
@@ -231,13 +231,6 @@
when(ground(X), \+ member(sub(Name,P,A,MetaSub,_), Prog)).
check_new_metasub(_Name,_P,_A,_MetaSub,_Prog).

size([],0) :-!.
size([_],1) :-!.
size([_,_],2) :-!.
size([_,_,_],3) :-!.
size(L,N) :- !,
length(L,N).

nproveall([],_PS,_Prog).
nproveall([Atom|Atoms],PS,Prog) :-
\+ prove_deduce([Atom],PS,Prog),
@@ -430,7 +423,7 @@
add_path_to_body(['@'(Atom)|Atoms],Path,['@'(Atom)|Rest],Out) :-
add_path_to_body(Atoms,Path,Rest,Out).
add_path_to_body([[P|Args]|Atoms],Path,[p(PType,P,A,Args,[P|Args],Path)|Rest],[PType|Out]) :-
size(Args,A),
length(Args,A),
add_path_to_body(Atoms,Path,Rest,Out).

assert_program(Prog) :-

0 comments on commit a06b916

Please sign in to comment.