move to 5.1.3
add MATLAB docs. git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1910 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
b4daf479f8
commit
cd23c60c45
4
H/Yap.h
4
H/Yap.h
@ -10,7 +10,7 @@
|
|||||||
* File: Yap.h.m4 *
|
* File: Yap.h.m4 *
|
||||||
* mods: *
|
* mods: *
|
||||||
* comments: main header file for YAP *
|
* comments: main header file for YAP *
|
||||||
* version: $Id: Yap.h,v 1.22 2007-04-10 22:13:20 vsc Exp $ *
|
* version: $Id: Yap.h,v 1.23 2007-06-29 01:33:35 vsc Exp $ *
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
@ -82,7 +82,7 @@
|
|||||||
#undef USE_THREADED_CODE
|
#undef USE_THREADED_CODE
|
||||||
#endif
|
#endif
|
||||||
#define inline __inline
|
#define inline __inline
|
||||||
#define YAP_VERSION "Yap-5.1.2"
|
#define YAP_VERSION "Yap-5.1.3"
|
||||||
#define BIN_DIR "c:\\Yap\\bin"
|
#define BIN_DIR "c:\\Yap\\bin"
|
||||||
#define LIB_DIR "c:\\Yap\\lib\\Yap"
|
#define LIB_DIR "c:\\Yap\\lib\\Yap"
|
||||||
#define SHARE_DIR "c:\\Yap\\share\\Yap"
|
#define SHARE_DIR "c:\\Yap\\share\\Yap"
|
||||||
|
@ -14,6 +14,12 @@
|
|||||||
|
|
||||||
<h1>Changes in YAP-5.1</h1>
|
<h1>Changes in YAP-5.1</h1>
|
||||||
|
|
||||||
|
<h2>Yap-5.1.3:</h2>
|
||||||
|
<ul>
|
||||||
|
<li> FIXED: add MATLAB interface docs.</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
<h2>Yap-5.1.2:</h2>
|
<h2>Yap-5.1.2:</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li> FIXED: clauses with floats/large ints should be pinnned (obs from Bernd
|
<li> FIXED: clauses with floats/large ints should be pinnned (obs from Bernd
|
||||||
|
29
distribute
29
distribute
@ -64,19 +64,26 @@ cd ../../../console
|
|||||||
splat
|
splat
|
||||||
cd ../docs
|
cd ../docs
|
||||||
splat
|
splat
|
||||||
if test "$1" = "--small"; then
|
|
||||||
make realclean
|
|
||||||
else
|
|
||||||
make html
|
|
||||||
make pdf
|
|
||||||
make clean
|
|
||||||
fi
|
|
||||||
cd ../include
|
cd ../include
|
||||||
splat
|
splat
|
||||||
cd ../library
|
cd ../library
|
||||||
splat
|
splat
|
||||||
cd regex
|
cd regex
|
||||||
splat
|
splat
|
||||||
|
cd ../system
|
||||||
|
splat
|
||||||
|
cd ../lammpi
|
||||||
|
splat
|
||||||
|
cd ../Tries
|
||||||
|
splat
|
||||||
|
cd ../mpi
|
||||||
|
splat
|
||||||
|
cd examples
|
||||||
|
splat
|
||||||
|
cd ../../tries
|
||||||
|
splat
|
||||||
|
cd ../matlab
|
||||||
|
splat
|
||||||
cd ../yap2swi
|
cd ../yap2swi
|
||||||
splat
|
splat
|
||||||
cd ../../misc
|
cd ../../misc
|
||||||
@ -107,9 +114,11 @@ cd clpbn
|
|||||||
splat
|
splat
|
||||||
cd examples
|
cd examples
|
||||||
splat
|
splat
|
||||||
cd ../../../..
|
cd ../../learning
|
||||||
|
splat
|
||||||
|
cd ../../..
|
||||||
if test "$1" = "--small"; then
|
if test "$1" = "--small"; then
|
||||||
tar cvzf "$version"-small.tar.gz --exclude=CVS "$version"/{Artistic,INSTALL,README*,changes*,config*,install-sh,Makefile.in,.depend.in,distribute,C,H,VC,console,docs,include,library,misc,pl,LGPL/README,LGPL/pillow/[C-Z]*,LGPL/pillow/*.pl,LGPL/pillow/doc/*info*,LGPL/JPL/jpl.yap,LGPL/JPL/jpl_paths.yap.in,LGPL/JPL/Makefile.in,LGPL/JPL/java,LGPL/JPL/src,build-distr,OPTYap,BEAM,MYDDAS,LGPL/clpr,LGPL/chr,LGPL/clp,CLPBN} # --exclude=CLPQR/clpqr/examples --exclude=CHR/chr/examples
|
tar cvzf "$version"-small.tar.gz --exclude=CVS "$version"/{Artistic,COPYING,INSTALL,README*,changes*,config*,install-sh,Makefile.in,.depend.in,distribute,C,H,VC,console,docs/*.tex,include,library,misc,pl,LGPL/README,LGPL/pillow/[C-Z]*,LGPL/pillow/*.pl,LGPL/pillow/doc/*info*,LGPL/JPL/jpl.yap,LGPL/JPL/jpl_paths.yap.in,LGPL/JPL/Makefile.in,LGPL/JPL/java,LGPL/JPL/src,build-distr,OPTYap,BEAM,MYDDAS,LGPL/clpr,LGPL/chr,LGPL/clp,CLPBN} --exclude=CLPBN/clpbn/backup --exclude=CLPBN/clpbn/devel --exclude=CLPBN/test
|
||||||
else
|
else
|
||||||
tar cvzf "$version".tar.gz --exclude=CVS "$version"/{Artistic,INSTALL,README*,changes*,config*,install-sh,Makefile.in,.depend.in,distribute,C,H,VC,console,docs,include,library,misc,pl,LGPL/README,LGPL/pillow/[C-Z]*,LGPL/pillow/*.pl,LGPL/pillow/doc/*info*,LGPL/JPL/jpl.yap,LGPL/JPL/jpl_paths.yap.in,LGPL/JPL/Makefile.in,LGPL/JPL/java,LGPL/JPL/src,build-distr,build-distr,OPTYap,BEAM,MYDDAS,LGPL/clpr,LGPL/chr,LGPL/clp,CLPBN,Logtalk}
|
tar cvzf "$version".tar.gz --exclude=CVS "$version"/{Artistic,COPYING,INSTALL,README*,changes*,config*,install-sh,Makefile.in,.depend.in,distribute,C,H,VC,console,docs,include,library,misc,pl,LGPL/README,LGPL/pillow/[C-Z]*,LGPL/pillow/*.pl,LGPL/pillow/doc/*info*,LGPL/JPL/jpl.yap,LGPL/JPL/jpl_paths.yap.in,LGPL/JPL/Makefile.in,LGPL/JPL/java,LGPL/JPL/src,build-distr,build-distr,OPTYap,BEAM,MYDDAS,LGPL/clpr,LGPL/chr,LGPL/clp,CLPBN,Logtalk} --exclude=CLPBN/clpbn/backup --exclude=CLPBN/clpbn/devel --exclude=docs/index --exclude=CLPBN/test
|
||||||
fi
|
fi
|
||||||
|
193
docs/yap.tex
193
docs/yap.tex
@ -8,9 +8,9 @@
|
|||||||
@c @setchapternewpage odd
|
@c @setchapternewpage odd
|
||||||
@c %**end of header
|
@c %**end of header
|
||||||
|
|
||||||
@set VERSION 5.1.2
|
@set VERSION 5.1.3
|
||||||
@set EDITION 4.2.4
|
@set EDITION 4.2.5
|
||||||
@set UPDATED December 2004
|
@set UPDATED June 2007
|
||||||
|
|
||||||
@c Index for C-Prolog compatible predicate
|
@c Index for C-Prolog compatible predicate
|
||||||
@defindex cy
|
@defindex cy
|
||||||
@ -191,6 +191,7 @@ Subnodes of Library
|
|||||||
* Heaps:: Labelled binary tree where the key of each node is less
|
* Heaps:: Labelled binary tree where the key of each node is less
|
||||||
than or equal to the keys of its children.
|
than or equal to the keys of its children.
|
||||||
* Lists:: List Manipulation
|
* Lists:: List Manipulation
|
||||||
|
* MATLAB:: Matlab Interface
|
||||||
* Non-Backtrackable Data Structures:: Queues, Heaps, and Beams.
|
* Non-Backtrackable Data Structures:: Queues, Heaps, and Beams.
|
||||||
* Ordered Sets:: Ordered Set Manipulation
|
* Ordered Sets:: Ordered Set Manipulation
|
||||||
* Pseudo Random:: Pseudo Random Numbers
|
* Pseudo Random:: Pseudo Random Numbers
|
||||||
@ -7018,6 +7019,7 @@ Library, Extensions, Built-ins, Top
|
|||||||
* Heaps:: Labelled binary tree where the key of each node is less
|
* Heaps:: Labelled binary tree where the key of each node is less
|
||||||
than or equal to the keys of its children.
|
than or equal to the keys of its children.
|
||||||
* Lists:: List Manipulation
|
* Lists:: List Manipulation
|
||||||
|
* MATLAB:: Matlab Interface
|
||||||
* Non-Backtrackable Data Structures:: Queues, Heaps, and Beams.
|
* Non-Backtrackable Data Structures:: Queues, Heaps, and Beams.
|
||||||
* Ordered Sets:: Ordered Set Manipulation
|
* Ordered Sets:: Ordered Set Manipulation
|
||||||
* Pseudo Random:: Pseudo Random Numbers
|
* Pseudo Random:: Pseudo Random Numbers
|
||||||
@ -7426,7 +7428,7 @@ Returns the smallest (Key1) and second smallest (Key2) pairs in the
|
|||||||
heap, without deleting them.
|
heap, without deleting them.
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@node Lists, Non-Backtrackable Data Structures, Heaps, Library
|
@node Lists, MATLAB, Heaps, Library
|
||||||
@section List Manipulation
|
@section List Manipulation
|
||||||
@cindex list manipulation
|
@cindex list manipulation
|
||||||
|
|
||||||
@ -7621,7 +7623,188 @@ True when @var{Numbers} is a list of numbers, and @var{Min} is the minimum.
|
|||||||
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@node Non-Backtrackable Data Structures, Ordered Sets, Lists, Library
|
@node MATLAB, Non-Backtrackable Data Structures, Lists, Library
|
||||||
|
@section MATLAB Package Interface
|
||||||
|
@cindex Matlab Interface
|
||||||
|
|
||||||
|
The MathWorks MATLAB is a widely used package for array
|
||||||
|
processing. YAP now includes a straightforward interface to MATLAB. To
|
||||||
|
actually use it, you need to install YAP calling @code{configure} with
|
||||||
|
the @code{--with-matlab=DIR} option, and you need to call
|
||||||
|
@code{use_module(library(lists))} command.
|
||||||
|
|
||||||
|
@table @code
|
||||||
|
|
||||||
|
@item start_matlab(+@var{Options})
|
||||||
|
@findex start_matlab/1
|
||||||
|
@snindex start_matlab/1
|
||||||
|
@cnindex start_matlab/1
|
||||||
|
Start a matlab session. The argument @var{Options} may either be the
|
||||||
|
empty string/atom or the command to call matlab. The command may fail.
|
||||||
|
|
||||||
|
@item close_matlab
|
||||||
|
@findex close_matlab/0
|
||||||
|
@snindex close_matlab/0
|
||||||
|
@cnindex close_matlab/0
|
||||||
|
Stop the current matlab session.
|
||||||
|
|
||||||
|
@item matlab_on
|
||||||
|
@findex matlab_on/0
|
||||||
|
@snindex matlab_on/0
|
||||||
|
@cnindex matlab_on/0
|
||||||
|
Holds if a matlab session is on.
|
||||||
|
|
||||||
|
@item matlab_eval_string(+@var{Command})
|
||||||
|
@findex matlab_eval_string/1
|
||||||
|
@snindex matlab_eval_string/1
|
||||||
|
@cnindex matlab_eval_string/1
|
||||||
|
Holds if matlab evaluated successfully the command @var{Command}.
|
||||||
|
|
||||||
|
@item matlab_eval_string(+@var{Command}, -@var{Answer})
|
||||||
|
@findex matlab_eval_string/2
|
||||||
|
@snindex matlab_eval_string/2
|
||||||
|
@cnindex matlab_eval_string/2
|
||||||
|
MATLAB will evaluate the command @var{Command} and unify @var{Answer}
|
||||||
|
with a string reporting the result.
|
||||||
|
|
||||||
|
|
||||||
|
@item matlab_cells(+@var{Size}, ?@var{Array})
|
||||||
|
@findex matlab_cells/2
|
||||||
|
@snindex matlab_cells/2
|
||||||
|
@cnindex matlab_cells/2
|
||||||
|
MATLAB will create an empty vector of cells of size @var{Size}, and if
|
||||||
|
@var{Array} is bound to an atom, store the array in the matlab
|
||||||
|
variable with name @var{Array}. Corresponds to the MATLAB command @code{cells}.
|
||||||
|
|
||||||
|
|
||||||
|
@item matlab_cells(+@var{SizeX}, +@var{SizeY}, ?@var{Array})
|
||||||
|
@findex matlab_cells/3
|
||||||
|
@snindex matlab_cells/3
|
||||||
|
@cnindex matlab_cells/3
|
||||||
|
MATLAB will create an empty array of cells of size @var{SizeX} and
|
||||||
|
@var{SizeY}, and if @var{Array} is bound to an atom, store the array
|
||||||
|
in the matlab variable with name @var{Array}. Corresponds to the
|
||||||
|
MATLAB command @code{cells}.
|
||||||
|
|
||||||
|
@item matlab_initialized_cells(+@var{SizeX}, +@var{SizeY}, +@var{List}, ?@var{Array})
|
||||||
|
@findex matlab_initialized_cells/4
|
||||||
|
@snindex matlab_initialized_cells/4
|
||||||
|
@cnindex matlab_initialized_cells/4
|
||||||
|
MATLAB will create an array of cells of size @var{SizeX} and
|
||||||
|
@var{SizeY}, initialized from the list @var{List}, and if @var{Array}
|
||||||
|
is bound to an atom, store the array in the matlab variable with name
|
||||||
|
@var{Array}.
|
||||||
|
|
||||||
|
@item matlab_matrix(+@var{SizeX}, +@var{SizeY}, +@var{List}, ?@var{Array})
|
||||||
|
@findex matlab_matrix/4
|
||||||
|
@snindex matlab_matrix/4
|
||||||
|
@cnindex matlab_matrix/4
|
||||||
|
MATLAB will create an array of floats of size @var{SizeX} and @var{SizeY},
|
||||||
|
initialized from the list @var{List}, and if @var{Array} is bound to
|
||||||
|
an atom, store the array in the matlab variable with name @var{Array}.
|
||||||
|
|
||||||
|
@item matlab_set(+@var{MatVar}, +@var{X}, +@var{Y}, +@var{Value})
|
||||||
|
@findex matlab_set/4
|
||||||
|
@snindex matlab_set/4
|
||||||
|
@cnindex matlab_set/4
|
||||||
|
Call MATLAB to set element @var{MatVar}(@var{X}, @var{Y}) to
|
||||||
|
@var{Value}. Notice that this command uses the MATLAB array access
|
||||||
|
convention.
|
||||||
|
|
||||||
|
@item matlab_get_variable(+@var{MatVar}, -@var{List})
|
||||||
|
@findex matlab_get_variable/2
|
||||||
|
@snindex matlab_get_variable/2
|
||||||
|
@cnindex matlab_get_variable/2
|
||||||
|
Unify MATLAB variable @var{MatVar} with the List @var{List}.
|
||||||
|
|
||||||
|
@item matlab_item(+@var{MatVar}, +@var{X}, ?@var{Val})
|
||||||
|
@findex matlab_item/3
|
||||||
|
@snindex matlab_item/3
|
||||||
|
@cnindex matlab_item/3
|
||||||
|
Read or set MATLAB @var{MatVar}(@var{X}) from/to @var{Val}. Use
|
||||||
|
@code{C} notation for matrix access (ie, starting from 0).
|
||||||
|
|
||||||
|
@item matlab_item(+@var{MatVar}, +@var{X}, +@var{Y}, ?@var{Val})
|
||||||
|
@findex matlab_item/4
|
||||||
|
@snindex matlab_item/4
|
||||||
|
@cnindex matlab_item/4
|
||||||
|
Read or set MATLAB @var{MatVar}(@var{X},@var{Y}) from/to @var{Val}. Use
|
||||||
|
@code{C} notation for matrix access (ie, starting from 0).
|
||||||
|
|
||||||
|
@item matlab_item1(+@var{MatVar}, +@var{X}, ?@var{Val})
|
||||||
|
@findex matlab_item/3
|
||||||
|
@snindex matlab_item/3
|
||||||
|
@cnindex matlab_item/3
|
||||||
|
Read or set MATLAB @var{MatVar}(@var{X}) from/to @var{Val}. Use
|
||||||
|
MATLAB notation for matrix access (ie, starting from 1).
|
||||||
|
|
||||||
|
@item matlab_item1(+@var{MatVar}, +@var{X}, +@var{Y}, ?@var{Val})
|
||||||
|
@findex matlab_item/4
|
||||||
|
@snindex matlab_item/4
|
||||||
|
@cnindex matlab_item/4
|
||||||
|
Read or set MATLAB @var{MatVar}(@var{X},@var{Y}) from/to @var{Val}. Use
|
||||||
|
MATLAB notation for matrix access (ie, starting from 1).
|
||||||
|
|
||||||
|
@item matlab_sequence(+@var{Min}, +@var{Max}, ?@var{Array})
|
||||||
|
@findex matlab_sequence/3
|
||||||
|
@snindex matlab_sequence/3
|
||||||
|
@cnindex matlab_sequence/3
|
||||||
|
MATLAB will create a sequence going from @var{Min} to @var{Max}, and
|
||||||
|
if @var{Array} is bound to an atom, store the sequence in the matlab
|
||||||
|
variable with name @var{Array}.
|
||||||
|
|
||||||
|
@item matlab_vector(+@var{Size}, +@var{List}, ?@var{Array})
|
||||||
|
@findex matlab_vector/4
|
||||||
|
@snindex matlab_vector/4
|
||||||
|
@cnindex matlab_vector/4
|
||||||
|
MATLAB will create a vector of floats of size @var{Size}, initialized
|
||||||
|
from the list @var{List}, and if @var{Array} is bound to an atom,
|
||||||
|
store the array in the matlab variable with name @var{Array}.
|
||||||
|
|
||||||
|
@item matlab_zeros(+@var{Size}, ?@var{Array})
|
||||||
|
@findex matlab_zeros/2
|
||||||
|
@snindex matlab_zeros/2
|
||||||
|
@cnindex matlab_zeros/2
|
||||||
|
MATLAB will create a vector of zeros of size @var{Size}, and if
|
||||||
|
@var{Array} is bound to an atom, store the array in the matlab
|
||||||
|
variable with name @var{Array}. Corresponds to the MATLAB command
|
||||||
|
@code{zeros}.
|
||||||
|
|
||||||
|
@item matlab_zeros(+@var{SizeX}, +@var{SizeY}, ?@var{Array})
|
||||||
|
@findex matlab_zeros/3
|
||||||
|
@snindex matlab_zeros/3
|
||||||
|
@cnindex matlab_zeros/3
|
||||||
|
MATLAB will create an array of zeros of size @var{SizeX} and
|
||||||
|
@var{SizeY}, and if @var{Array} is bound to an atom, store the array
|
||||||
|
in the matlab variable with name @var{Array}. Corresponds to the
|
||||||
|
MATLAB command @code{zeros}.
|
||||||
|
|
||||||
|
|
||||||
|
@item matlab_zeros(+@var{SizeX}, +@var{SizeY}, +@var{SizeZ}, ?@var{Array})
|
||||||
|
@findex matlab_zeros/4
|
||||||
|
@snindex matlab_zeros/4
|
||||||
|
@cnindex matlab_zeros/4
|
||||||
|
MATLAB will create an array of zeros of size @var{SizeX}, @var{SizeY},
|
||||||
|
and @var{SizeZ}. If @var{Array} is bound to an atom, store the array
|
||||||
|
in the matlab variable with name @var{Array}. Corresponds to the
|
||||||
|
MATLAB command @code{zeros}.
|
||||||
|
|
||||||
|
|
||||||
|
@item matlab_zeros(+@var{SizeX}, +@var{SizeY}, +@var{SizeZ}, ?@var{Array})
|
||||||
|
@findex matlab_zeros/4
|
||||||
|
@snindex matlab_zeros/4
|
||||||
|
@cnindex matlab_zeros/4
|
||||||
|
MATLAB will create an array of zeros of size @var{SizeX}, @var{SizeY},
|
||||||
|
and @var{SizeZ}. If @var{Array} is bound to an atom, store the array
|
||||||
|
in the matlab variable with name @var{Array}. Corresponds to the
|
||||||
|
MATLAB command @code{zeros}.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@end table
|
||||||
|
|
||||||
|
@node Non-Backtrackable Data Structures, Ordered Sets, MATLAB, Library
|
||||||
@section Non-Backtrackable Data Structures
|
@section Non-Backtrackable Data Structures
|
||||||
|
|
||||||
The following routines implement well-known data-structures using global
|
The following routines implement well-known data-structures using global
|
||||||
|
@ -5,10 +5,6 @@
|
|||||||
matlab_on/0,
|
matlab_on/0,
|
||||||
matlab_eval_string/1,
|
matlab_eval_string/1,
|
||||||
matlab_eval_string/2,
|
matlab_eval_string/2,
|
||||||
matlab_eval_sequence/1,
|
|
||||||
matlab_eval_sequence/2,
|
|
||||||
matlab_call/2,
|
|
||||||
matlab_call/3,
|
|
||||||
matlab_cells/2,
|
matlab_cells/2,
|
||||||
matlab_cells/3,
|
matlab_cells/3,
|
||||||
matlab_initialized_cells/4,
|
matlab_initialized_cells/4,
|
||||||
@ -17,7 +13,6 @@
|
|||||||
matlab_zeros/4,
|
matlab_zeros/4,
|
||||||
matlab_matrix/4,
|
matlab_matrix/4,
|
||||||
matlab_vector/3,
|
matlab_vector/3,
|
||||||
matlab_vector/3,
|
|
||||||
matlab_set/4,
|
matlab_set/4,
|
||||||
matlab_get_variable/2,
|
matlab_get_variable/2,
|
||||||
matlab_item/3,
|
matlab_item/3,
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
Name: Yap
|
Name: Yap
|
||||||
Summary: Prolog Compiler
|
Summary: Prolog Compiler
|
||||||
Version: 5.1.2
|
Version: 5.1.3
|
||||||
Packager: Vitor Santos Costa <vitor@cos.ufrj.br>
|
Packager: Vitor Santos Costa <vitor@cos.ufrj.br>
|
||||||
Release: 1
|
Release: 1
|
||||||
Source: http://www.ncc.up.pt/~vsc/Yap/%{name}-%{version}.tar.gz
|
Source: http://www.ncc.up.pt/~vsc/Yap/%{name}-%{version}.tar.gz
|
||||||
@ -28,7 +28,7 @@ Prolog.
|
|||||||
%setup -q
|
%setup -q
|
||||||
|
|
||||||
%build
|
%build
|
||||||
./configure --prefix=/usr --enable-max-performance
|
./configure --prefix=/usr --enable-max-performance --enable-depth-limit
|
||||||
make
|
make
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
Reference in New Issue
Block a user