documentation support

This commit is contained in:
Vitor Santos Costa
2017-05-19 09:54:35 +01:00
parent a828f3f899
commit 87851a68f4
18 changed files with 149 additions and 340 deletions

View File

@@ -1,11 +1,12 @@
The MYDDAS Data-base interface {#myddas}
The MYDDAS Data-base interface {#myddas}
===============================
The MYDDAS database project was developed within a FCT project aiming at
the development of a highly efficient deductive database system, based
on the coupling of the MySQL relational database system with the YAP
Prolog system. MYDDAS was later expanded to support the ODBC interface.
### Requirements and Installation Guide {#Requirements_and_Installation_Guide}
### Requirements and Installation Guide {#Requirements_and_Installation_Guide}
Next, we describe how to usen of the YAP with the MYDDAS System. The
use of this system is entirely depend of the MySQL development libraries
@@ -21,21 +22,22 @@ The MYDDAS Data-base interface {#myddas}
tested yet. MYDDAS must be enabled at configure time. This can be done
with the following options:
+ --enable-myddas
+ `--enable-myddas`
This option will detect which development libraries are installed on the computer system, MySQL, ODBC or both, and will compile the Yap system with the support for which libraries it detects;
+ --enable-myddas-stats
+ `--enable-myddas-stats`
This option is only available in MySQL. It includes code to get
statistics from the MYDDAS system;
+ --enable-top-level
+ `--enable-top-level`
This option is only available in MySQL. It enables the option to interact with the MySQL server in
two different ways. As if we were on the MySQL Client Shell, and as if
we were using Datalog.
### MYDDAS Architecture {#MYDDAS_Architecture}
The system includes four main blocks that are put together through the
@@ -85,6 +87,7 @@ The MYDDAS Data-base interface {#myddas}
FROM 'phonebook' A
WHERE A.Name = 'John Doe';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
### View Level Interface {#View_Level_Interface}
@@ -178,6 +181,7 @@ The MYDDAS Data-base interface {#myddas}
To know how to use db `view/3`, please refer to Draxler's Prolog to
SQL Compiler Manual.
### Accessing Tables in Data Sources Using SQL {#Accessing_Tables_in_Data_Sources_Using_SQL}
@@ -205,6 +209,7 @@ The MYDDAS Data-base interface {#myddas}
?- db_sql('SELECT * FROM phonebook',LA).
LA = ['D','John Doe',123456789] ?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
### Insertion of Rows {#Insertion_of_Rows}
@pred db_assert(+,+).
@@ -274,7 +279,8 @@ The MYDDAS Data-base interface {#myddas}
?- helloWorldInsert('A',NULL,31).
yes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
### Types of AttributesL {#Types_of_Attributes}
### Types of Attributes {#Types_of_Attributes}
@pred db_get_attributes_types(+,+,?).
@@ -305,6 +311,7 @@ The MYDDAS Data-base interface {#myddas}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
where <tt>Hello World</tt> is the name of the relation and <tt>myddas</tt> is the
connection identifier.
### Number of Fields {#Number_of_Fields}
@@ -331,6 +338,7 @@ The MYDDAS Data-base interface {#myddas}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
where `Hello World` is the name of the
relation and `myddas` is the connection identifier.
### Describing a Relation {#Describing_a_Relation}
@pred db_datalog_describe(+,+).
@@ -411,6 +419,7 @@ The MYDDAS Data-base interface {#myddas}
Table = table('Hello World') ? ;
no
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
### The MYDDAS MySQL Top Level {#The_MYDDAS_MySQL_Top_Level}
@pred db_top_level(+,+,+,+,+).
@@ -461,6 +470,7 @@ The MYDDAS Data-base interface {#myddas}
yes
?-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
### Other MYDDAS Properties {#Other_MYDDAS_Properties}
@pred db_verbose(+).
@@ -560,5 +570,4 @@ The MYDDAS Data-base interface {#myddas}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can see the available SQL Modes at the MySQL homepage at
<http://www.mysql.org>.
@}
b

View File

@@ -12,7 +12,6 @@ from traitlets import Instance, Type, Any, List
from .comm import CommManager
from .kernelbase import Kernel as KernelBase
from .zmqshell import ZMQInteractiveShell
from .interactiveshell import YAPInteraction
class YAPKernel(KernelBase):
shell = Instance('IPython.core.interactiveshell.InteractiveShellABC',
@@ -56,8 +55,7 @@ class YAPKernel(KernelBase):
for msg_type in comm_msg_types:
self.shell_handlers[msg_type] = getattr(self.comm_manager, msg_type)
self.engine = YAPInteraction(self)
self.shell.run_cell = self.engine.run_cell
self.engine = YAPInteraction(self.shell, **kwargs)
help_links = List([
{
@@ -194,7 +192,7 @@ class YAPKernel(KernelBase):
reply_content = {}
try:
res = self.shell.run_cell(code, store_history=store_history, silent=silent)
res = self.engine.run_cell(code, store_history=store_history, silent=silent)
finally:
self._restore_input()

View File

@@ -1,4 +1,4 @@
The R Prolog Progrmming Interface {#real}
The R Prolog Programming Interface {#realxplxc}
===================================
@file real.md
@@ -7,8 +7,6 @@ The R Prolog Progrmming Interface {#real}
@version 1:0:4, 2013/12/25, sinter_class
@license Perl Artistic License
@ingroup packages
+ @ref realpl
This library enables the communication with an R process started as a shared library.
@@ -46,7 +44,7 @@ Pass Prolog data to R, pass R data to Prolog or assign an R expression to
an assignable R expression.
### Testing Real {#TestingR}
There is a raft of examples packed in a singl```e file that test the library.
There is a raft of examples packed in a single file that tests the library.
~~~~
?- [pack(real/examples/for_real)].
@@ -122,7 +120,7 @@ However, not all possible "corrections" are currently supported. For instance,
~~~~
?- c <- [a,b,c,1].
ERROR: real:set_R_variable/2: Type error: `boolean' expected, found `a'
ERROR: real:set_R_variable/2: Type error: `boolean` expected, found `a`
~~~~
In the data passing mode we map Prolog atoms to R strings-
@@ -241,7 +239,7 @@ in~\cite{}. Their major differences:
prefer reading double-quote strings as Prolog string.
- Free variables can be used to represent missing
arguments,ie. `a[_,"G23"] would represent the column "G23".
arguments,ie. `a[_,"G23"]` would represent the column "G23".
- All recent versions of real support the common syntax extensions
for [], (), thus realC allows writing `a[[2]] <- f().
@@ -262,12 +260,8 @@ in~\cite{}. Their major differences:
---
Nicos Angelopoulos and Vitor Santos Costa
December, 2012.
- Nicos Angelopoulos and Vitor Santos Costa, December, 2012.
Updates: Nicos Angelopoulos
Dec. 2013,
March, 2014
- Updates: Nicos Angelopoulos, Dec. 2013, March, 2014
Updates: Vitor Santos Costa
Dec. 2015
- Updates: Vitor Santos Costa Dec. 2015

View File

@@ -1,68 +0,0 @@
#
# default base directory for YAP installation
# (EROOT for architecture-dependent files)
#
prefix = @prefix@
exec_prefix = @exec_prefix@
ROOTDIR = $(prefix)
EROOTDIR = @exec_prefix@
abs_top_builddir = @abs_top_builddir@
#
# where the binary should be
#
BINDIR = $(EROOTDIR)/bin
#
# where YAP should look for libraries
#
LIBDIR=@libdir@
SHAREDIR=$(ROOTDIR)/share/Yap
YAPLIBDIR=@libdir@/Yap
#
#
CC=@CC@
CFLAGS= @SHLIB_CFLAGS@ $(YAP_EXTRAS) $(DEFS) -I$(srcdir) -I../.. -I$(srcdir)/../../include -I$(srcdir)/liblbfgs-1.10/include
LDFLAGS=@LDFLAGS@
#
#
# You shouldn't need to change what follows.
#
INSTALL=@INSTALL@
INSTALL_DATA=@INSTALL_DATA@
INSTALL_PROGRAM=@INSTALL_PROGRAM@
SHELL=/bin/sh
RANLIB=@RANLIB@
srcdir=@srcdir@
SO=@SO@
#4.1VPATH=@srcdir@:@srcdir@/OPTYap
CWD=$(PWD)
#
OBJS=yap_lbfgs.o lbfgs.o
SOBJS=yap_lbfgs.@SO@
PLLIB=$(srcdir)/lbfgs.pl
#in some systems we just create a single object, in others we need to
# create a libray
all: $(SOBJS)
yap_lbfgs.o: $(srcdir)/yap_lbfgs.c
$(CC) -c $(CFLAGS) $(srcdir)/yap_lbfgs.c -o yap_lbfgs.o
lbfgs.o: $(srcdir)/liblbfgs-1.10/lib/lbfgs.c
$(CC) -c $(CFLAGS) -I $(srcdir)/liblbfgs-1.10/lib $(srcdir)/liblbfgs-1.10/lib/lbfgs.c -o lbfgs.o
@DO_SECOND_LD@yap_lbfgs.@SO@: yap_lbfgs.o lbfgs.o
@DO_SECOND_LD@ @SHLIB_LD@ $(LDFLAGS) -o yap_lbfgs.@SO@ yap_lbfgs.o lbfgs.o @EXTRA_LIBS_FOR_DLLS@
install: all
$(INSTALL_PROGRAM) $(SOBJS) $(DESTDIR)$(YAPLIBDIR)
for h in $(PLLIB); do $(INSTALL_DATA) $$h $(DESTDIR)$(SHAREDIR); done
install-examples:
clean:
rm -f *.o *~ $(OBJS) $(SOBJS) *.BAK
distclean: clean
rm -f Makefile