cacol89 avatar cacol89 committed 397c87c

finished report, removed past report

Comments (0)

Files changed (12)

 src/parser.ml
 src/lexer.ml
 *.swp
+
+#Ignore latex output in docfiles
+doc/report/*.log
+doc/report/*.out
+doc/report/*.aux
+doc/report/*.toc
+doc/report/*.pdf

doc/report/.gitignore

-*.log
-*.out
-*.aux
-*.toc
-*.pdf

doc/report/yadi_report.tex

 
 The project was implemented as requested and several levels of complexity were
 reached, the following sections describe in detail the features included in
-the project's current state as well as the kind of Datalog programs it accept.
+the project's current state as well as the kind of Datalog programs it accepts.
 
 For a list of known issues and features yet to implement, please refer to
 chapter \ref{chap:issues}.
         \end{verbatim}
 \end{enumerate}
 
-Due to this conditions, the language accepted by YADI is more expressive than $nonrecursive-Datalog^{\lnot}$ but
-less expressive than $stratified-Datalog^{\lnot}$ because it does not accept, for example, mutual recursion. Formally:
+Due to these conditions, the language accepted by YADI is more expressive than $\text{nonrecursive-Datalog}^{\lnot}$ but
+less expressive than $\text{stratified-Datalog}^{\lnot}$ because it does not accept, for example, mutual recursion. Formally:
 
-$$nonrecursive-Datalog^{\lnot} \subset YADI-Datalog^{\lnot} \subset stratified-Datalog^{\lnot}$$
+$$\text{nonrecursive-Datalog}^{\lnot} \subset \text{YADI-Datalog}^{\lnot} \subset \text{stratified-Datalog}^{\lnot}$$
 
 \subsection{Safety analysis}
 
-Rule safety-analysis is performed over the rules of a program. A program is considered safe if the following
+YADI only accepts ``safe programs'', where a program is considered safe if the following
 conditions are met:
 
 \begin{itemize}
-    \item All variables inside the rule's head appear in positive goals or strict equality relations. 
-        For example, the following program is not considered as safe because variables ``z'' and ``v'' do not
-        appear in a positive goals nor a strict equalities (like variable ``y''):
+    \item For any rule, all variables inside its head appear in positive goals or strict equality relations in its body. 
+        For example, the following program is not considered safe because variables ``z'' and ``v'' do not
+        appear in any positive goal nor a strict equality (like variable ``y''):
         \begin{verbatim}
             P(x,y,z,v) :- R(x), y = 5, z < 10.
             ?- P(x,y,z,v).
         \end{verbatim}
-    \item All variables inside negated goals must appear in positive goals or strict equalities.
-        For example, the following program is not considered as safe because variable ``y'' does not
-        appear in a positive goal nor a strict equality:
+    \item For any rule, all variables inside negated goals must appear in positive goals or strict equalities.
+        For example, the following program is not considered safe because variable ``y'' does not
+        appear in any positive goal nor a strict equality:
         \begin{verbatim}
             P(x) :- R(x), y<=100, not R(x,y).
             ?- P(x).
 will be printed, which includes database information, stratification of the program, parsing information, generated SQL and more.
 
 Finally, once YADI has been executed a command-line interpreter will be shown, which allows
-to write Datalog programs and see the resulting tables, or know if any semantic/syntactic errors has been found
+to write Datalog programs and see the resulting tables, or know if any semantic/syntactic errors have been found
 during execution.
 
 \section{Datalog-like syntax}
 
-As stated before, the language accepted by YADI includes completely $nonrecursive-Datalog^{\lnot}$
-and part of $stratified-Datalog^{\lnot}$. Besides it also accepts anonymous variables, constants inside
+As stated before, the language accepted by YADI dominates $\text{nonrecursive-Datalog}^{\lnot}$
+and includes parts of $\text{stratified-Datalog}^{\lnot}$. Besides it also accepts anonymous variables, constants inside
 predicates, and aggregate functions. The following list summarizes this features accepted by the project's
 current state:
 
 \begin{itemize}
-    \item Any $nonrecursive-Datalog^{\lnot}$ program is accepted by YADI.
+    \item Any $\text{nonrecursive-Datalog}^{\lnot}$ program is accepted by YADI.
     \item Inequality relations between variables and constants are also accepted.
         The constants can be integers, strings or real numbers.
         For example, the following program is accepted by YADI:
 There are four test suits included, where each one tests different specific features of YADI:
 
 \begin{itemize}
-    \item \textbf{Employee test suit}: test conjunctive query features, but without recursion or negation.
+    \item \textbf{Employee test suit}: tests conjunctive query features, but without recursion or negation.
     \item \textbf{Beer test suit}: tests negation features.
     \item \textbf{Family test suit}: tests recursion features.
     \item \textbf{Payment test suit}: tests aggregation features.
 
 \chapter{Project's structure}
 
-The project's code is contained inside the \emph{src/} directory, it comprises the following files:
+The project's root contains several files and directories. The \emph{bin/} directory holds binaries generated during compilation, and
+it will hold notably the final executable called ``yadi''. The \emph{doc/} directory contains the latex source for this report and
+the user manual. The \emph{lib/} directory is meant to contain special libraries needed for the project, nevertheless since YADI does not need
+special libraries this directory is currently empty. Finally, the most important directories are the \emph{src/} and \emph{test/} ones,
+which description will be made in the following sections.
+
+\section{The \emph{src/} directory}
+
+This directory contains the project's source code, it holds the following files:
 
 \begin{itemize}
     \item \textbf{conn\_ops.ml}: contains all the logic for connecting to the database, perform SQL queries, and fetching/printing the result.
     \item \textbf{lexer.mll}: contains the description of the tokens used for parsing programs.
     \item \textbf{main.ml}: contains the logic for the command-line interpreter and general user interface.
     \item \textbf{parser.mly}: contains the grammar definition for the Datalog language accepted by YADI.
-    \item \textbf{rule\_preproc.ml}: contains logic for performing preprocessing of rules before performing SQL generation,
-        such as safety checks, and optimizations.
+    \item \textbf{rule\_preproc.ml}: contains logic for performing preprocessing of rules before SQL generation,
+        such as safety checks and optimizations.
     \item \textbf{stratification.ml}: contains the logic for performing the stratification of a Datalog program.
     \item \textbf{yadi\_utils.ml}: contains the data model of the main data structures used along the program as well as functions
         for accessing/operating the structures.
 \end{itemize}
 
-Furthermore, the \emph{test/} directory contains all the files involved for testing the software. It includes the following sub-directories
+\section{The \emph{test/} directory}
+
+This directory contains all the files involved in the testing of the software. It includes the following sub-directories
 and files:
 
 \begin{itemize}
     \item \textbf{scripts/}: This directory contains all the shell-scripts that contain the logic for performing automated tests and
         setting of the test database.
     \item \textbf{sql/}: This directory contains the SQL scripts for setting the test database that is necessary for running the tests in the
-        \emph{integration} directory.
+        \emph{integration} directory. When automatically setting the test database, all SQL files in this directory will be provided to
+        the DBMS.
 \end{itemize}
 
 \chapter{SQL generation}
 
 The general process of generating SQL out of simple conjunctive queries was divided in three
 parts: SELECT-clause generation, FROM-clause generation, and WHERE-clause generation. In this part
-all predicates involved in rule definition are assumed to belong to the EDB, this is possible
-because the programs were stratified, which will be explained in the following section.
+all predicates involved in rule definitions are assumed to belong to the EDB, this assumption is correct
+because YADI stratifies programs before solving them, which will be explained in section \ref{sec:stratification}.
 
 \subsection{SELECT-clause generation}
 
-The select clause was composed exclusively of the variables that appear in the rule's head, however,
-this variables had to be mapped to EDB-table column-names or constants. For doing this, an appearance of the variable
-in the rule's body was performed. Finally, the columns in the resulting table are aliased with the names ``col0'', ``col1'',
+The select clause is composed exclusively of the variables that appear in the rule's head, however,
+these variables had to be mapped to EDB-table column-names or constants. For doing this, an appearance of the variable
+in the rule's body is searched; if it is found in a predicate then the variable is mapped to the corresponding column-name
+of the predicate, else, if it is found in a strict equality it takes the value of the constant.
+Finally, the columns in the resulting table are aliased with the names ``col0'', ``col1'',
 and so on.
 
 For instance, the rule:
 
 \subsection{FROM-clause generation}
 
-The FROM-clause is composed of table-names of all the positive predicates that appear on the rule's body.
-Since a predicate can appear twice in a rule's body, the table names are aliased with a postfix ``\_X'', where
-X is the position of the goal in the rule. For example, the rule:
+The FROM-clause is composed of the table-names of all the positive predicates that are in the rule's body.
+Since a same predicate can appear more than once in a rule's body, the table names are aliased with a postfix ``\_X'' (where
+X is the position of the goal in the rule) so as to let SQL differentiate between the different appearances. For example, the rule:
 
 \begin{verbatim}
 P(x,y) :- R(x), R(y), S(y,_).
 
 \subsection{WHERE-clause generation}
 
-If a variable appears more than once in positive goals of a rule, then a JOIN between two tables
+If a variable appears more than once in positive goals of a rule, then a JOIN between these tables
 is performed in the WHERE clause. Also all variable comparisons are included in this clause.
 For doing this task, variables are mapped to EDB-column names in the same way it is done for the
 SELECT-clause. The aliases given to the tables in the FROM clause are taken into account.
 FROM Q_a1 AS Q_a1_0  ;
 \end{verbatim}
 
-As it can be seen, for every IDB predicate P is calculated in a table named ``P\_aX'', where X is the arity of the predicate. This is done so as to allow
+It is important to highlight that every IDB predicate P is calculated in a table named ``P\_aX'', where X is the arity of the predicate. This is done so as to allow
 definitions of predicates with the same name but different arity.
 
 \section{Recursion}
 
 \section{Negation}
 
-Negation is handled with sub-queries in the WHERE clause, using NOT EXISTS statements. For example,
+Negation is handled with sub-queries in the WHERE clause, using NOT EXISTS statements.
+The inner WHERE-clause of this sub-query will be comprised of equalities between columns
+of the negated table and columns of non-negated tables or constants. The process of mapping
+variables to EDB-table column-names is similar as in the generation of normal WHERE-clauses.
+For example,
 the following rule:
 
 \begin{verbatim}
-P(x) :- R(x), not S(x,1).
+P(x) :- R(x), y=1, not S(x,y).
 \end{verbatim}
 
 Will generate the following SQL:
Add a comment to this file

doc/report_wp1/screenshots/db.png

Removed
Old image
Add a comment to this file

doc/report_wp1/screenshots/screenshot_bitbucket.jpg

Removed
Old image
Add a comment to this file

doc/report_wp1/screenshots/screenshot_trello_modified.jpg

Removed
Old image

doc/report_wp1/wp1s.aux

-\relax 
-\ifx\hyper@anchor\@undefined
-\global \let \oldcontentsline\contentsline
-\gdef \contentsline#1#2#3#4{\oldcontentsline{#1}{#2}{#3}}
-\global \let \oldnewlabel\newlabel
-\gdef \newlabel#1#2{\newlabelxx{#1}#2}
-\gdef \newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}}
-\AtEndDocument{\let \contentsline\oldcontentsline
-\let \newlabel\oldnewlabel}
-\else
-\global \let \hyper@last\relax 
-\fi
-
-\@writefile{toc}{\contentsline {section}{\numberline {1} Project Specification}{1}{section.1}}
-\@writefile{toc}{\contentsline {section}{\numberline {2} Installation}{1}{section.2}}
-\@writefile{toc}{\contentsline {section}{\numberline {3} Execution}{2}{section.3}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {3.1}Database Schema Example}{2}{subsection.3.1}}
-\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Database diagram\relax }}{2}{figure.1}}
-\newlabel{fig:db_fig}{{1}{2}{Database diagram\relax \relax }{figure.1}{}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {3.2}Database population}{2}{subsection.3.2}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {3.3}YADI}{2}{subsection.3.3}}
-\@writefile{toc}{\contentsline {section}{\numberline {4} Datalog Grammar for YADI}{3}{section.4}}
-\@writefile{toc}{\contentsline {section}{\numberline {5} Code Samples}{3}{section.5}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {5.1}SQL Generation}{3}{subsection.5.1}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {5.2}Database Connections}{4}{subsection.5.2}}
-\@writefile{toc}{\contentsline {section}{\numberline {6}Test Cases}{5}{section.6}}
-\@writefile{toc}{\contentsline {section}{\numberline {7}Project Management}{7}{section.7}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {7.1}Task Management with Trello}{7}{subsection.7.1}}
-\@writefile{lof}{\contentsline {figure}{\numberline {2}{\ignorespaces Trello Project Management Tool\relax }}{8}{figure.2}}
-\newlabel{fig:trello_fig}{{2}{8}{Trello Project Management Tool\relax \relax }{figure.2}{}}
-\@writefile{toc}{\contentsline {subsection}{\numberline {7.2}BitBucket}{8}{subsection.7.2}}
-\@writefile{lof}{\contentsline {figure}{\numberline {3}{\ignorespaces BitBucket Project Hosting\relax }}{9}{figure.3}}
-\newlabel{fig:bitbucket_fig}{{3}{9}{BitBucket Project Hosting\relax \relax }{figure.3}{}}
-\@writefile{toc}{\contentsline {section}{\numberline {8}Future Work }{9}{section.8}}
-\@writefile{toc}{\contentsline {section}{\numberline {9} References }{10}{section.9}}

doc/report_wp1/wp1s.log

-This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian) (format=pdflatex 2012.11.16)  18 NOV 2012 18:30
-entering extended mode
- %&-line parsing enabled.
-**wp1s.tex
-(./wp1s.tex
-LaTeX2e <2009/09/24>
-Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh
-yphenation, loaded.
-(/usr/share/texmf-texlive/tex/latex/base/article.cls
-Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
-(/usr/share/texmf-texlive/tex/latex/base/size10.clo
-File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
-)
-\c@part=\count79
-\c@section=\count80
-\c@subsection=\count81
-\c@subsubsection=\count82
-\c@paragraph=\count83
-\c@subparagraph=\count84
-\c@figure=\count85
-\c@table=\count86
-\abovecaptionskip=\skip41
-\belowcaptionskip=\skip42
-\bibindent=\dimen102
-)
-(/usr/share/texmf-texlive/tex/latex/base/inputenc.sty
-Package: inputenc 2008/03/30 v1.1d Input encoding file
-\inpenc@prehook=\toks14
-\inpenc@posthook=\toks15
-
-(/usr/share/texmf-texlive/tex/latex/base/latin1.def
-File: latin1.def 2008/03/30 v1.1d Input encoding file
-))
-(/usr/share/texmf-texlive/tex/latex/amsmath/amsmath.sty
-Package: amsmath 2000/07/18 v2.13 AMS math features
-\@mathmargin=\skip43
-
-For additional information on amsmath, use the `?' option.
-(/usr/share/texmf-texlive/tex/latex/amsmath/amstext.sty
-Package: amstext 2000/06/29 v2.01
-
-(/usr/share/texmf-texlive/tex/latex/amsmath/amsgen.sty
-File: amsgen.sty 1999/11/30 v2.0
-\@emptytoks=\toks16
-\ex@=\dimen103
-))
-(/usr/share/texmf-texlive/tex/latex/amsmath/amsbsy.sty
-Package: amsbsy 1999/11/29 v1.2d
-\pmbraise@=\dimen104
-)
-(/usr/share/texmf-texlive/tex/latex/amsmath/amsopn.sty
-Package: amsopn 1999/12/14 v2.01 operator names
-)
-\inf@bad=\count87
-LaTeX Info: Redefining \frac on input line 211.
-\uproot@=\count88
-\leftroot@=\count89
-LaTeX Info: Redefining \overline on input line 307.
-\classnum@=\count90
-\DOTSCASE@=\count91
-LaTeX Info: Redefining \ldots on input line 379.
-LaTeX Info: Redefining \dots on input line 382.
-LaTeX Info: Redefining \cdots on input line 467.
-\Mathstrutbox@=\box26
-\strutbox@=\box27
-\big@size=\dimen105
-LaTeX Font Info:    Redeclaring font encoding OML on input line 567.
-LaTeX Font Info:    Redeclaring font encoding OMS on input line 568.
-\macc@depth=\count92
-\c@MaxMatrixCols=\count93
-\dotsspace@=\muskip10
-\c@parentequation=\count94
-\dspbrk@lvl=\count95
-\tag@help=\toks17
-\row@=\count96
-\column@=\count97
-\maxfields@=\count98
-\andhelp@=\toks18
-\eqnshift@=\dimen106
-\alignsep@=\dimen107
-\tagshift@=\dimen108
-\tagwidth@=\dimen109
-\totwidth@=\dimen110
-\lineht@=\dimen111
-\@envbody=\toks19
-\multlinegap=\skip44
-\multlinetaggap=\skip45
-\mathdisplay@stack=\toks20
-LaTeX Info: Redefining \[ on input line 2666.
-LaTeX Info: Redefining \] on input line 2667.
-)
-(/usr/share/texmf-texlive/tex/latex/amsfonts/amsfonts.sty
-Package: amsfonts 2009/06/22 v3.00 Basic AMSFonts support
-\symAMSa=\mathgroup4
-\symAMSb=\mathgroup5
-LaTeX Font Info:    Overwriting math alphabet `\mathfrak' in version `bold'
-(Font)                  U/euf/m/n --> U/euf/b/n on input line 96.
-)
-(/usr/share/texmf-texlive/tex/latex/amsfonts/amssymb.sty
-Package: amssymb 2009/06/22 v3.00
-)
-(/usr/share/texmf-texlive/tex/latex/graphics/graphicx.sty
-Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
-
-(/usr/share/texmf-texlive/tex/latex/graphics/keyval.sty
-Package: keyval 1999/03/16 v1.13 key=value parser (DPC)
-\KV@toks@=\toks21
-)
-(/usr/share/texmf-texlive/tex/latex/graphics/graphics.sty
-Package: graphics 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
-
-(/usr/share/texmf-texlive/tex/latex/graphics/trig.sty
-Package: trig 1999/03/16 v1.09 sin cos tan (DPC)
-)
-(/etc/texmf/tex/latex/config/graphics.cfg
-File: graphics.cfg 2009/08/28 v1.8 graphics configuration of TeX Live
-)
-Package graphics Info: Driver file: pdftex.def on input line 91.
-
-(/usr/share/texmf-texlive/tex/latex/pdftex-def/pdftex.def
-File: pdftex.def 2010/03/12 v0.04p Graphics/color for pdfTeX
-\Gread@gobject=\count99
-))
-\Gin@req@height=\dimen112
-\Gin@req@width=\dimen113
-)
-(/usr/share/texmf-texlive/tex/latex/hyperref/hyperref.sty
-Package: hyperref 2009/10/09 v6.79a Hypertext links for LaTeX
-
-(/usr/share/texmf-texlive/tex/generic/oberdiek/ifpdf.sty
-Package: ifpdf 2009/04/10 v2.0 Provides the ifpdf switch (HO)
-Package ifpdf Info: pdfTeX in pdf mode detected.
-)
-(/usr/share/texmf-texlive/tex/generic/oberdiek/ifvtex.sty
-Package: ifvtex 2008/11/04 v1.4 Switches for detecting VTeX and its modes (HO)
-Package ifvtex Info: VTeX not detected.
-)
-(/usr/share/texmf-texlive/tex/generic/ifxetex/ifxetex.sty
-Package: ifxetex 2009/01/23 v0.5 Provides ifxetex conditional
-)
-(/usr/share/texmf-texlive/tex/latex/oberdiek/hycolor.sty
-Package: hycolor 2009/10/02 v1.5 Code for color options of hyperref/bookmark (H
-O)
-
-(/usr/share/texmf-texlive/tex/latex/oberdiek/xcolor-patch.sty
-Package: xcolor-patch 2009/10/02 xcolor patch
-))
-\@linkdim=\dimen114
-\Hy@linkcounter=\count100
-\Hy@pagecounter=\count101
-
-(/usr/share/texmf-texlive/tex/latex/hyperref/pd1enc.def
-File: pd1enc.def 2009/10/09 v6.79a Hyperref: PDFDocEncoding definition (HO)
-)
-(/usr/share/texmf-texlive/tex/generic/oberdiek/etexcmds.sty
-Package: etexcmds 2007/12/12 v1.2 Prefix for e-TeX command names (HO)
-
-(/usr/share/texmf-texlive/tex/generic/oberdiek/infwarerr.sty
-Package: infwarerr 2007/09/09 v1.2 Providing info/warning/message (HO)
-)
-Package etexcmds Info: Could not find \expanded.
-(etexcmds)             That can mean that you are not using pdfTeX 1.50 or
-(etexcmds)             that some package has redefined \expanded.
-(etexcmds)             In the latter case, load this package earlier.
-)
-(/usr/share/texmf-texlive/tex/latex/latexconfig/hyperref.cfg
-File: hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive
-)
-(/usr/share/texmf-texlive/tex/latex/oberdiek/kvoptions.sty
-Package: kvoptions 2009/08/13 v3.4 Keyval support for LaTeX options (HO)
-
-(/usr/share/texmf-texlive/tex/generic/oberdiek/kvsetkeys.sty
-Package: kvsetkeys 2009/07/30 v1.5 Key value parser with default handler suppor
-t (HO)
-))
-Package hyperref Info: Hyper figures OFF on input line 2975.
-Package hyperref Info: Link nesting OFF on input line 2980.
-Package hyperref Info: Hyper index ON on input line 2983.
-Package hyperref Info: Plain pages OFF on input line 2990.
-Package hyperref Info: Backreferencing OFF on input line 2995.
-
-Implicit mode ON; LaTeX internals redefined
-Package hyperref Info: Bookmarks ON on input line 3191.
-(/usr/share/texmf-texlive/tex/latex/ltxmisc/url.sty
-\Urlmuskip=\muskip11
-Package: url 2006/04/12  ver 3.3  Verb mode for urls, etc.
-)
-LaTeX Info: Redefining \url on input line 3428.
-
-(/usr/share/texmf-texlive/tex/generic/oberdiek/bitset.sty
-Package: bitset 2007/09/28 v1.0 Data type bit set (HO)
-
-(/usr/share/texmf-texlive/tex/generic/oberdiek/intcalc.sty
-Package: intcalc 2007/09/27 v1.1 Expandable integer calculations (HO)
-)
-(/usr/share/texmf-texlive/tex/generic/oberdiek/bigintcalc.sty
-Package: bigintcalc 2007/11/11 v1.1 Expandable big integer calculations (HO)
-
-(/usr/share/texmf-texlive/tex/generic/oberdiek/pdftexcmds.sty
-Package: pdftexcmds 2009/09/23 v0.6 LuaTeX support for pdfTeX utility functions
- (HO)
-
-(/usr/share/texmf-texlive/tex/generic/oberdiek/ifluatex.sty
-Package: ifluatex 2009/04/17 v1.2 Provides the ifluatex switch (HO)
-Package ifluatex Info: LuaTeX not detected.
-)
-(/usr/share/texmf-texlive/tex/generic/oberdiek/ltxcmds.sty
-Package: ltxcmds 2009/08/05 v1.0 Some LaTeX kernel commands for general use (HO
-)
-)
-Package pdftexcmds Info: LuaTeX not detected.
-Package pdftexcmds Info: \pdf@primitive is available.
-Package pdftexcmds Info: \pdf@ifprimitive is available.
-)))
-\Fld@menulength=\count102
-\Field@Width=\dimen115
-\Fld@charsize=\dimen116
-\Field@toks=\toks22
-Package hyperref Info: Hyper figures OFF on input line 4377.
-Package hyperref Info: Link nesting OFF on input line 4382.
-Package hyperref Info: Hyper index ON on input line 4385.
-Package hyperref Info: backreferencing OFF on input line 4392.
-Package hyperref Info: Link coloring OFF on input line 4397.
-Package hyperref Info: Link coloring with OCG OFF on input line 4402.
-Package hyperref Info: PDF/A mode OFF on input line 4407.
-
-(/usr/share/texmf-texlive/tex/generic/oberdiek/atbegshi.sty
-Package: atbegshi 2008/07/31 v1.9 At begin shipout hook (HO)
-)
-\Hy@abspage=\count103
-\c@Item=\count104
-\c@Hfootnote=\count105
-)
-*hyperref using default driver hpdftex*
-(/usr/share/texmf-texlive/tex/latex/hyperref/hpdftex.def
-File: hpdftex.def 2009/10/09 v6.79a Hyperref driver for pdfTeX
-\Fld@listcount=\count106
-)
-(/usr/share/texmf-texlive/tex/latex/preprint/fullpage.sty
-Package: fullpage 1999/02/23 1.1 (PWD)
-\FP@margin=\skip46
-)
-(/usr/share/texmf-texlive/tex/latex/caption/caption.sty
-Package: caption 2009/10/09 v3.1k Customizing captions (AR)
-
-(/usr/share/texmf-texlive/tex/latex/caption/caption3.sty
-Package: caption3 2009/10/09 v3.1k caption3 kernel (AR)
-\captionmargin=\dimen117
-\captionmargin@=\dimen118
-\captionwidth=\dimen119
-\caption@indent=\dimen120
-\caption@parindent=\dimen121
-\caption@hangindent=\dimen122
-)
-\c@ContinuedFloat=\count107
-Package caption Info: hyperref package is loaded.
-)
-(/usr/share/texmf-texlive/tex/latex/listings/listings.sty
-\lst@mode=\count108
-\lst@gtempboxa=\box28
-\lst@token=\toks23
-\lst@length=\count109
-\lst@currlwidth=\dimen123
-\lst@column=\count110
-\lst@pos=\count111
-\lst@lostspace=\dimen124
-\lst@width=\dimen125
-\lst@newlines=\count112
-\lst@lineno=\count113
-\lst@maxwidth=\dimen126
-
-(/usr/share/texmf-texlive/tex/latex/listings/lstmisc.sty
-File: lstmisc.sty 2007/02/22 1.4 (Carsten Heinz)
-\c@lstnumber=\count114
-\lst@skipnumbers=\count115
-\lst@framebox=\box29
-)
-(/usr/share/texmf-texlive/tex/latex/listings/listings.cfg
-File: listings.cfg 2007/02/22 1.4 listings configuration
-))
-Package: listings 2007/02/22 1.4 (Carsten Heinz)
-
-No file wp1s.aux.
-\openout1 = `wp1s.aux'.
-
-LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 13.
-LaTeX Font Info:    ... okay on input line 13.
-LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 13.
-LaTeX Font Info:    ... okay on input line 13.
-LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 13.
-LaTeX Font Info:    ... okay on input line 13.
-LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 13.
-LaTeX Font Info:    ... okay on input line 13.
-LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 13.
-LaTeX Font Info:    ... okay on input line 13.
-LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 13.
-LaTeX Font Info:    ... okay on input line 13.
-LaTeX Font Info:    Checking defaults for PD1/pdf/m/n on input line 13.
-LaTeX Font Info:    ... okay on input line 13.
-(/usr/share/texmf-texlive/tex/context/base/supp-pdf.mkii
-[Loading MPS to PDF converter (version 2006.09.02).]
-\scratchcounter=\count116
-\scratchdimen=\dimen127
-\scratchbox=\box30
-\nofMPsegments=\count117
-\nofMParguments=\count118
-\everyMPshowfont=\toks24
-\MPscratchCnt=\count119
-\MPscratchDim=\dimen128
-\MPnumerator=\count120
-\everyMPtoPDFconversion=\toks25
-)
-Package hyperref Info: Link coloring OFF on input line 13.
- (/usr/share/texmf-texlive/tex/latex/hyperref/nameref.sty
-Package: nameref 2007/05/29 v2.31 Cross-referencing by name of section
-
-(/usr/share/texmf-texlive/tex/latex/oberdiek/refcount.sty
-Package: refcount 2008/08/11 v3.1 Data extraction from references (HO)
-)
-\c@section@level=\count121
-)
-LaTeX Info: Redefining \ref on input line 13.
-LaTeX Info: Redefining \pageref on input line 13.
-\@outlinefile=\write3
-\openout3 = `wp1s.out'.
-
-\AtBeginShipoutBox=\box31
-Package caption Info: Begin \AtBeginDocument code.
-Package caption Info: listings package is loaded.
-Package caption Info: End \AtBeginDocument code.
-\c@lstlisting=\count122
-LaTeX Font Info:    Try loading font information for U+msa on input line 15.
-
-(/usr/share/texmf-texlive/tex/latex/amsfonts/umsa.fd
-File: umsa.fd 2009/06/22 v3.00 AMS symbols A
-)
-LaTeX Font Info:    Try loading font information for U+msb on input line 15.
-
-(/usr/share/texmf-texlive/tex/latex/amsfonts/umsb.fd
-File: umsb.fd 2009/06/22 v3.00 AMS symbols B
-)
-Underfull \hbox (badness 10000) in paragraph at lines 49--50
-
- []
-
-LaTeX Font Info:    Try loading font information for OMS+cmr on input line 52.
-(/usr/share/texmf-texlive/tex/latex/base/omscmr.fd
-File: omscmr.fd 1999/05/25 v2.5h Standard LaTeX font definitions
-)
-LaTeX Font Info:    Font shape `OMS/cmr/m/n' in size <10> not available
-(Font)              Font shape `OMS/cmsy/m/n' tried instead on input line 52.
-
-
-LaTeX Warning: Reference `fig:db_fig' on page 1 undefined on input line 70.
-
-[1
-
-{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
-<screenshots/db.png, id=19, 430.60875pt x 258.9675pt>
-File: screenshots/db.png Graphic file (type png)
- <use screenshots/db.png>
-
-Package caption Warning: \captionsetup{type*=...} or \captionof
-(caption)                outside box or environment on input line 74.
-See the caption package documentation for explanation.
-
-
-Package caption Warning: The option `hypcap=true' will be ignored for this
-(caption)                particular \caption on input line 74.
-See the caption package documentation for explanation.
-
-
-Underfull \hbox (badness 10000) in paragraph at lines 99--100
-
- []
-
-[2 <./screenshots/db.png (PNG copy)>]
-LaTeX Font Info:    Try loading font information for OML+cmr on input line 152.
-
-
-(/usr/share/texmf-texlive/tex/latex/base/omlcmr.fd
-File: omlcmr.fd 1999/05/25 v2.5h Standard LaTeX font definitions
-)
-LaTeX Font Info:    Font shape `OML/cmr/m/n' in size <10> not available
-(Font)              Font shape `OML/cmm/m/it' tried instead on input line 152.
- [3]
-Underfull \hbox (badness 10000) in paragraph at lines 210--211
-
- []
-
-
-Underfull \hbox (badness 10000) in paragraph at lines 214--215
-
- []
-
-
-Underfull \hbox (badness 10000) in paragraph at lines 217--218
-
- []
-
-
-Underfull \hbox (badness 10000) in paragraph at lines 219--220
-
- []
-
-
-Underfull \hbox (badness 10000) in paragraph at lines 224--225
-
- []
-
-
-Underfull \hbox (badness 10000) in paragraph at lines 227--228
-
- []
-
-[4]
-Overfull \hbox (23.5282pt too wide) in paragraph at lines 278--278
- []\OT1/cmtt/m/n/10 Allempdeppho(x,y,z) :- Departments(_,x,a) and Employees(a,y
-,_,b) and Phonenumber(b,z).[] 
- []
-
-[5] [6]
-Underfull \hbox (badness 10000) in paragraph at lines 382--384
-
- []
-
-
-LaTeX Warning: Reference `fig:trello_fig' on page 7 undefined on input line 387
-.
-
-
-LaTeX Warning: Reference `fig:trello_fig' on page 7 undefined on input line 400
-.
-
-
-Underfull \hbox (badness 10000) in paragraph at lines 400--401
-
- []
-
-
-<screenshots/screenshot_trello_modified.jpg, id=113, 1556.81625pt x 879.285pt>
-File: screenshots/screenshot_trello_modified.jpg Graphic file (type jpg)
-
-<use screenshots/screenshot_trello_modified.jpg>
-
-Package caption Warning: The option `hypcap=true' will be ignored for this
-(caption)                particular \caption on input line 405.
-See the caption package documentation for explanation.
-
-[7]
-
-LaTeX Warning: Reference `fig:bitbucket_fig' on page 8 undefined on input line 
-417.
-
-
-Underfull \hbox (badness 10000) in paragraph at lines 417--418
-
- []
-
-<screenshots/screenshot_bitbucket.jpg, id=123, 1105.12875pt x 780.9175pt>
-File: screenshots/screenshot_bitbucket.jpg Graphic file (type jpg)
-
-<use screenshots/screenshot_bitbucket.jpg>
-
-Package caption Warning: The option `hypcap=true' will be ignored for this
-(caption)                particular \caption on input line 422.
-See the caption package documentation for explanation.
-
-
-Overfull \hbox (4.07578pt too wide) in paragraph at lines 421--422
-[][] 
- []
-
-[8 <./screenshots/screenshot_trello_modified.jpg>] [9 <./screenshots/screenshot
-_bitbucket.jpg>] [10] (./wp1s.aux)
-
-LaTeX Warning: There were undefined references.
-
-
-LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.
-
- ) 
-Here is how much of TeX's memory you used:
- 7694 strings out of 495061
- 110019 string characters out of 1182620
- 218450 words of memory out of 3000000
- 10671 multiletter control sequences out of 15000+50000
- 12972 words of font info for 51 fonts, out of 3000000 for 9000
- 28 hyphenation exceptions out of 8191
- 38i,8n,38p,399b,1228s stack positions out of 5000i,500n,10000p,200000b,50000s
-</usr/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmbx10.pfb></usr/sha
-re/texmf-texlive/fonts/type1/public/amsfonts/cm/cmbx12.pfb></usr/share/texmf-te
-xlive/fonts/type1/public/amsfonts/cm/cmmi10.pfb></usr/share/texmf-texlive/fonts
-/type1/public/amsfonts/cm/cmmi8.pfb></usr/share/texmf-texlive/fonts/type1/publi
-c/amsfonts/cm/cmr10.pfb></usr/share/texmf-texlive/fonts/type1/public/amsfonts/c
-m/cmr12.pfb></usr/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmr17.pfb>
-</usr/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmr6.pfb></usr/share/t
-exmf-texlive/fonts/type1/public/amsfonts/cm/cmr7.pfb></usr/share/texmf-texlive/
-fonts/type1/public/amsfonts/cm/cmr8.pfb></usr/share/texmf-texlive/fonts/type1/p
-ublic/amsfonts/cm/cmsy10.pfb></usr/share/texmf-texlive/fonts/type1/public/amsfo
-nts/cm/cmti10.pfb></usr/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmtt
-10.pfb>
-Output written on wp1s.pdf (10 pages, 632101 bytes).
-PDF statistics:
- 224 PDF objects out of 1000 (max. 8388607)
- 97 named destinations out of 1000 (max. 500000)
- 16 words of extra memory for PDF output out of 10000 (max. 10000000)
-

doc/report_wp1/wp1s.out

-\BOOKMARK [1][-]{section.1}{ Project Specification}{}
-\BOOKMARK [1][-]{section.2}{ Installation}{}
-\BOOKMARK [1][-]{section.3}{ Execution}{}
-\BOOKMARK [2][-]{subsection.3.1}{Database Schema Example}{section.3}
-\BOOKMARK [2][-]{subsection.3.2}{Database population}{section.3}
-\BOOKMARK [2][-]{subsection.3.3}{YADI}{section.3}
-\BOOKMARK [1][-]{section.4}{ Datalog Grammar for YADI}{}
-\BOOKMARK [1][-]{section.5}{ Code Samples}{}
-\BOOKMARK [2][-]{subsection.5.1}{SQL Generation}{section.5}
-\BOOKMARK [2][-]{subsection.5.2}{Database Connections}{section.5}
-\BOOKMARK [1][-]{section.6}{Test Cases}{}
-\BOOKMARK [1][-]{section.7}{Project Management}{}
-\BOOKMARK [2][-]{subsection.7.1}{Task Management with Trello}{section.7}
-\BOOKMARK [2][-]{subsection.7.2}{BitBucket}{section.7}
-\BOOKMARK [1][-]{section.8}{Future Work }{}
-\BOOKMARK [1][-]{section.9}{ References }{}
Add a comment to this file

doc/report_wp1/wp1s.pdf

Binary file removed.

Add a comment to this file

doc/report_wp1/wp1s.synctex.gz

Binary file removed.

doc/report_wp1/wp1s.tex

-\documentclass[10pt,a4paper]{article}
-\usepackage[latin1]{inputenc}
-\usepackage{amsmath}
-\usepackage{amsfonts}
-\usepackage{amssymb}
-\usepackage{graphicx}
-\usepackage{hyperref}
-\usepackage{fullpage}
-\usepackage{caption}
-\usepackage{listings}
-\author{Carlos Colmenares, Mark Abspoel, Hasan Saygin Arkan, Jos\'{e} Robles Noriega}
-\title{YADI - Yet Another Datalog Interpreter \\ Work Package 1}
-\begin{document}
-\maketitle
-
-%\tableofcontents
-
-\section{ Project Specification}
-
-What is YADI? \\
-Yet Another Datalog Interpreter (YADI) is a project for converting Datalog queries into SQL statements. 
-Datalog is a declarative logic programming language. It will be used as a query language in this project. For conversion into SQL, first we need to create Abstract Syntax Tree, and provide an SQL statement. At the end, from SQL statements, the project tries to produce the answer set of tuples. 
-
-\noindent 
-A Datalog query for {R(A,B), S(B,C,D)} database looks like this:
-
-    \begin{verbatim}
-    V(x,y) :- R(x,y) and S(y,_,_).
-    Q(x,y) :- S(x,y,z) and V(z,t) and t>=3.
-    ?- Q(x,y).
-	\end{verbatim} 
-
-\noindent 	
-The example above states that we have some \textit{predicates} and \textit{query} in the first two lines. And the third line is the actual query. Even though the predicates above states a Datalog query with multiple-rules, since it's a \textit{Conjunctive Query} so that we can translate that into SQL statement.
-
-    \begin{verbatim}
-    SELECT B, C
-    FROM R INNER JOIN S S1 USING (B)
-    INNER JOIN S S2 ON (R.A=S2.D)
-    WHERE S1.B>=3; 
-	\end{verbatim} 
-
-\noindent 	
-The purpose of the project is to develop a Command Line Interpreter for Datalog queries. It aims at converting Datalog queries into SQL statements. Then, a backend Relational Database is in charge of evaluating the query. 
-
-
-\section{ Installation}
-
-The following dependencies are required to compile and execute this version of YADI: \\
-
-\begin{itemize}
-\item ocaml (4.0.0 or later)
-\item PostgreSQL (9.0 or later)
-\item postgresql-ocaml (2.0.1 or later) 
-\item findlib (1.3.1 or later)
-\end{itemize}
-
-And in order to compile the core code:
-
-\begin{enumerate}
-\item Uncompress the source archive and go to the root directory 
-\item run \texttt{make} 
-\end{enumerate}
-
-If \texttt{make} is successful, now we can populate our database and test YADI.
-
-\section{ Execution}
-\subsection{Database Schema Example}
-
-It's mandatory to connect a PostgreSQL server, with a role, a database and at least one populated table to formulate queries against the table. We already created a simple database schema for testing purposes. The database schema we use for testing purposes is shown in Figure~\ref{fig:db_fig} 
-	
-%\begin{figure}
-\includegraphics[scale=0.75]{screenshots/db.png} 
-\captionof{figure}{Database diagram}\label{fig:db_fig}	
-%\caption{Database diagram}
-%\label{schema_fig} 
-%\end{figure}	
-	
-	
-	\begin{verbatim}
-	Departments(budget,name,code) :- .
-	Employees(department,lastname,name,empid) :- .
-	Phonenumber(employee,number) :- .
-	\end{verbatim}
-	
-%TODO : Schema explanatino, keys, foreign keys etc. needed ????	
-
-
-\subsection{Database population}
-
-It's provided and SQL script file to create and populate the example database. The file is located in \texttt{yadi/test/sql/employee.sql}
-%For population of the Database, we have an sql file in doc you can execute the sql file below
-
-It can be executed with the following statement :
-\begin{verbatim}
-	psql -d test_db -a -f yadi/test/sql/employee.sql
-\end{verbatim}
-
-Remark: Be careful with the file owner permissions, it might need to give "postgres" user read/write permissions.\\
-
-If your database schema is ready, now we can try to make YADI work.
-
-
-\subsection{YADI}
-    
-The YADI executable can be found in \texttt{/yadi/bin}. To run it from the terminal:  
-    \begin{verbatim}
-	./yadi <connexion info>
-	\end{verbatim}
-
-
-Example:
-    \begin{verbatim}
-	./yadi "host=localhost port=5432 user=test password=test dbname=test_db"
-	\end{verbatim}
-
-\newpage
-\section{ Datalog Grammar for YADI}
-A datalog program in YADI is conformed by the following grammar:
-\begin{verbatim}
-<Datalog Program>  ->  Rules : <Rule List>
-                       Query : <Query>
-                       end
-
-<Rule List>       ->  <Rule> <Rule List>
-<Rule List>       ->  empty_string
-<Rule>            ->  <Predicate> :- <Predicate List> .
-
-<Query>           ->  ? <Predicate> /
-
-<Predicate List>  ->  <Predicate> , <Predicate List>
-<Predicate List>  ->  <Predicate>
-<Predicate>       ->  Identifier( <Parameter List> )
-
-<Parameter List>  ->  <Parameter> , <Parameter List> | <Parameter> empty_string
-<Parameter List>  ->  <Parameter>
-<Parameter>       ->  Identifier
-\end{verbatim}
-
-
-\section{ Code Samples}
-For predicates and rules there is a hash table in YADI. Hashtable is called as \texttt{symtable} which is in \textbf{symtable.ml} file and it's used for storing symbols that can be either predicates or variables.  
-
-\subsection{SQL Generation}
-
-\begin{lstlisting}
-module Symtable:
-    sig
-        type st 
-        and symbol = stt (*from expr*)
-        and sym_t = Int | Text
-        val create : int -> st
-        val insert : st -> string -> symbol -> unit
-        val find : st -> string -> symbol
-        val mem : st -> string -> bool
-        val print : st -> unit
-        val iter : (string -> symbol -> unit) -> st -> unit
-        val fold : (string -> symbol -> 'a -> 'a) -> st -> 'a -> 'a
-    end =
-    struct
-        type st = (string, symbol) Hashtbl.t
-        and symbol = stt
-        and sym_t = Int | Text
-        let create n = Hashtbl.create n
-        let insert = Hashtbl.add
-        let find = Hashtbl.find
-        let mem = Hashtbl.mem
-        let iter = Hashtbl.iter
-        let fold = Hashtbl.fold
-        let print =
-            let print_el n s = Printf.printf "%s" (string_of_stt s) in
-            Hashtbl.iter print_el
-    end;;
-\end{lstlisting}
-
-Main conversion from Datalog queries to SQL statements are done in \texttt{eval.ml} The function \texttt{sql$\_$stt}  is used for generating SQL statement from the \texttt{ast}, receives a symtable with the database's edb description. \texttt{sql$\_$stt} code piece is as follows :
-
-\begin{lstlisting}
-let sql_stt edb e =
-    let rt = (match get_query e with
-        | Query x -> x
-        | _ -> invalid_arg "is_prog") in
-    let idb = extract_idb e in
-    let predn = get_rterm_predname rt in
-    let rule = Symtable.find idb predn in
-    let sql = sql_of_rule edb idb rule in
-    sql^";"
-\end{lstlisting}
-
-Basically first it tries to check the program validity, and then gets the predicate name and rule from the \texttt{symtable} and then it provides necessary sql statement by using \texttt{sql$\_$of$\_$rule} function. 
-
-\begin{lstlisting}
-let rec sql_of_rule edb idb = function
-    | Query _ -> invalid_arg "is_query"
-    | Rule (head, body) ->
-        (*Extract positive rterms from the rule*)
-        let (rterms,_,equalities) = split_terms body in
-        let i_rt = check_rterms edb idb rterms in
-        let with_sql = get_with_clause edb idb i_rt in 
-        (*Build colnamtab, vartab, and eqtab for select and where clauses*)
-        let cnt = build_colnamtab edb idb in
-        let vt = build_vartab cnt rterms in
-        let eqt = build_eqtab equalities in
-        let select_sql = get_select_clause vt eqt head in
-        let from_sql = get_from_clause rterms in
-        let where_sql = get_where_clause vt eqt in
-        String.concat " " [with_sql;select_sql;from_sql;where_sql]
-\end{lstlisting}
-
-In \texttt{sql$\_$of$\_$rule}, we are taking our rule, which was derived from the Hashtable (symtable), with its head and body parts. We are splitting the terms and checking if they are valid or not. Later on we are assigning the new pre-defined types \texttt{coltabl}, \texttt{vartab} and \texttt{eqtab}. \\
-
-\begin{itemize}
-
-\item \texttt{colnamtab} is a dictionary that contains for each predicate a list with all of its columns in order. \\
-
-
-\item \texttt{vartab} defines a '\texttt{vartable}', which is a dictionary with \texttt{varnames} as key. The value for each key is a list of variable appearances. A variable appearence is simply a string denoting a column of a relation in the way Table.column. \\
-
-\item \texttt{eqtab} defines a eqtab, a dictionary with variable names as key and constants as values. They represent equalities that must be satisfied by the variables\\
-
-
-\end{itemize}
-
-sql$\_$of$\_$rule function is the main part of YADI project, because it is the part we construct \texttt{SELECT}, \texttt{WHERE} and \texttt{FROM} clauses. Again for detecting this clauses, we are using a Hashtable or string mappings/matchings with our vartab and eqtab types.  \\
-
-\subsection{Database Connections}
-We have \texttt{conn$\_$ops.ml} file basic database operations. Once the code is generated into SQL, making an SQL query on PostgreSQL database and printing the results are handled in \texttt{conn$\_$ops.ml}.\\
-
-The basic functions we have in \texttt{conn$\_$ops.ml} is :
-\begin{itemize}
-\item \textbf{print$\_$res} : Prints the results of the SQL query 
-\item \textbf{res$\_$to$\_$lst conn} : Extracts response column-names and tuples to lists
-\item \textbf{get$\_$query$\_$result} : Catches answers from the db server and returns a (cn,t) tuple where cn is a list with the column-names and t the tuples
-\item \textbf{print$\_$sql$\_$reslet} : Executes the provided SQL and print its resulting table through the stdin 
-\item \textbf{sym$\_$t$\_$of$\_$string} : Receives a string with the PostgreSQL description of a type and transfroms it to the corresponding symtable.
-\item \textbf{import$\_$table$\_$schema} : Looks in the database for the description of the provided table-name and returns a corresponding symtable type.
-\item \textbf{import$\_$dbschema} : Looks in the database for the description of all the tables and and returns the schema as a symtable with their descriptions.
-
-
-\end{itemize}
-
-\section{Test Cases}
-
-With the grammar previously presented, we can test YADI first declaring the head and then the predicates, with the corresponding parameters, and then ask for the query's result:
-
-\begin{verbatim}
-	head(x,y) :- predicate1(x,y), predicate2(x,z).
-	?- head(x,y,z).
-	/
-\end{verbatim}
-
-Notice that \texttt{predicate1, predicate2} must be the identifiers of the relations in the example schema and the orders of the parameters must correspond to the actual order of the relations' fields.\\
-So far, this first version of YADI supports the following basic rules:\footnote{The tests can be found in the file $/$yadi$/$test$/$employees$\_$test.lang} 
-\begin{itemize}
-
-\item Relational predicates:
-
-\begin{verbatim}
-	Selectdept(x,y,z) :- Departments(x,y,z).
-	?- Selectdept(x,y,z).
-	/
-\end{verbatim}
-
-\item Conjuntive queries (with equality in the query body):
-
-\begin{verbatim}
-	Allempdep(x,y,z) :- Employees(a,y,x,w) and Departments(v,z,a).
-	?- Allempdep(x,y,z).
-	/
-\end{verbatim}
-
-\item Anonymous variables:
-
-\begin{verbatim}
-	Allempdeppho(x,y,z) :- Departments(_,x,a) and Employees(a,y,_,b) and Phonenumber(b,z).
-	?- Allempdeppho(x,y,z).
-	/
-\end{verbatim}
-\newpage
-\item Cartesian product (not considering variables):
-\begin{verbatim}
-	Allemp(x,y) :- Employees(_,x,y,_).
-	Alldep(x) :- Departments(_,x,_).
-	Allempdep(x,y,z) :- Allemp(x,y) and Alldep(z).
-	?- Allempdep(x,y,z).
-	/
-\end{verbatim}
-
-\item Equality predicate (just for integers):
-\begin{verbatim}
-	Oneemp(x,y,z) :- Employees(x,y,z,_) and x = 77.
-	?- Oneemp(x,y,z).
-	/
-\end{verbatim}
-
-\item It checks for incomplete queries:
-\begin{verbatim}
-	Selectdept(x,y,z) :- Departments(x,y).
-	?- Selectdept(x,y,z).
-	/
-\end{verbatim}
-
-\end{itemize}
-
-Current limitations, known issues:
-
-\begin{itemize}
-\item Negation is not supported yet.
-\begin{verbatim}
-	Addconstdept(y) :- Departments(_,y,z) and not z = 14.
-	?- Addconstdept(y).
-	/
-\end{verbatim}
-
-\item Inequalities are not supported yet.
-\begin{verbatim}
-	Addconstdept(y) :- Departments(_,y,z) and not z > 14.
-	?- Addconstdept(y).
-	/
-\end{verbatim}
-
-\item The arity is not checked. For example:
-\begin{verbatim}
-	Selectdept(x,y,z) :- Departments(x,y,z).
-	?- Selectdept(x,y,z,w).
-	/
-\end{verbatim}
-returns a result, but it's wrong since \texttt{Selectdept} is arity 3 and not 4.
-
-\item A constant can't be inside the query:
-\begin{verbatim}
-Selectdept(x,y,z) :- Departments(x,y,Z).
-?- Selectdept(x,y,14).
-/
-\end{verbatim}
-
-\item The name of a variable can be a string, but without capital letters or underscore, for example this is ok:
-\begin{verbatim}
-	Selectpho(employee,phonenumber) :- Phonenumber(employee,phonenumber).
-	?- Selectpho(employee,phonenumber).
-	/
-\end{verbatim}
-\newpage
-and this one isn't:
-
-\begin{verbatim}
-	Selectpho(employee_id,phoneNumber) :- Phonenumber(employee_id,phoneNumber).
-	?- Selectpho(employee_id,phoneNumber).
-	/
-\end{verbatim}
-
-\item Recursiveness is not supported yet:
-\begin{verbatim}
-rec(y,z) :- Departments(_,y,z).
-rec(y,z) :- Departments(_,y,z), rec(z,y) 
-?- rec(y,z)
-/
-\end{verbatim}
-\end{itemize}
-%Jose
-%\subsection{(Right Samples)}
-%\subsection{(Wrong Samples)}
-
-%	\begin{verbatim}
-%	Alldept(x,y,z) :- Departments(x,y,z).
-%	?- Alldept(x,y,z).
-%	/
-
-%	Allemp(x,y,z,w) :- Employees(x,y,z,w).
-%	?- Allemp(x,y,z,w).
-%	/
-
-%	Allpho(x,y) :- Phonenumber(x,y).
-%	?- Allpho(x,y).
-%	/
-%	\end{verbatim}
-
-
-\section{Project Management}
-\subsection{Task Management with Trello}
-
-For YADI project as a team we decided to use \href{http://trello.com/}{Trello} for Task Management Tool. Trello is a collaborative tool for keeping track of the progress in the project. It is possible to separate the tasks between the contributors, easy to follow the current features that are being implemented, check ToDo list for the next tasks, seeing progress etc. 
-\\
-
- 
-
-Trello dashboard could be extended however you like. Figure~\ref{fig:trello_fig} states our lists in the dashboard.
-
-\begin{itemize}
- 
-  \item Bug-net : Bug reports, description, urgency (stated with colors), in which conditions occurs and the results. 
-  \item Fridge : Some features to be implemented without an urgent deadline. Interesting remarkable ideas.
-  \item Backlog : Important features / tasks on the way. 
-  \item Oven : The features / tasks currently progressing
-  \item Finished / Needs Checking : Tasks already delivered but needs some control
-  \item Delivered : Already completed tasks.
- 
-\end{itemize}
-	
-Figure~\ref{fig:trello_fig} itself is our project task management web interface. Here as it could be seen every list contains cards, usually the tasks we are working on, or ideas that could be remarkable. It's possible to assign each project member to different task, work separately, decide a due date, checklist etc.  \\ 
-
-%\begin{figure}
-  %\centering 
- \includegraphics[scale=0.28]{screenshots/screenshot_trello_modified.jpg} 
- \captionof{figure}{Trello Project Management Tool}\label{fig:trello_fig} 
- %\caption{Trello Project Management Tool} 
- %\label{trello_fig} 
- %\end{figure}
-
-\subsection{BitBucket}
-\href{https://bitbucket.org/}{Bitbucket} is a web-based hosting service for projects that use either the Mercurial or Git revision control systems.
-
-
-
-For YADI project we decided to use BitBucket. First of all it is free, and unlike Google Code or some other repositories, this is a private repo. For version control system, currently we are using \href{http://git-scm.com/}{git} and gitflow. 
-
-Figure~\ref{fig:bitbucket_fig} shows our most current commits.  \\
- 
-  %\begin{figure}
- % \centering 
- \includegraphics[scale=0.40]{screenshots/screenshot_bitbucket.jpg} 
-\captionof{figure}{BitBucket Project Hosting}\label{fig:bitbucket_fig} 
- %\caption{BitBucket Project Hosting} 
- %\label{bitbucket_fig} 
- %\end{figure}
- 
-\section{Future Work }
-
-For the next work package we aim to accomplish the following:
-
-\begin{itemize}
-\item Check the arity of predicates.
-\item Enable YADI to process predicates with values as arguments.
-\item Let simple facts populate the database for existing tables, or create new tables for the unexisting ones..
-\item Rule safety evaluation.
-\item Implement the OR operation (support multiple bodies for a head).
-\item Include support for negated expressions and inequalities.
-\item Allow YADI to read and execute commands directly from a file.
-\item Improve the error reports.
-\item Error handling.
-\item Enable YADI to handle recursive queries without negation.
-\item Include help, option commands. 
-\item Automated tests.
-\item In a higher level of maturity: stratified negation, completion features, support aggregate functions and DDL.
-\end{itemize}
- 
-
-\section{ References }
-\begin{enumerate}
-\item \href{https://bitbucket.org/}{Bitbucket}
-\item \href{http://trello.com/}{Trello}
-\item \href{http://courses.cms.caltech.edu/cs134/cs134b/book.pdf}{Introduction to Objective Caml}
-\item \href{http://www.cs.cornell.edu/courses/cs3110/2011sp/handouts/cheatsheet.pdf}{OCaml Cheat Sheet}
-\item \href{http://caml.inria.fr/resources/doc/index.en.html}{Ocaml Documentation}
-\item \href{http://www.ocamlpro.com/blog/2011/06/03/cheatsheets.html}{OCaml Reference Cards}
-\item \href{http://caml.inria.fr/pub/docs/manual-ocaml/manual026.html}{ocamllex and acamlyacc Documentation}
-\item \href{http://plus.kaist.ac.kr/~shoh/ocaml/ocamllex-ocamlyacc/ocamllex-tutorial.pdf}{ocamllex Tutorial}
-\item \href{http://plus.kaist.ac.kr/~shoh/ocaml/ocamllex-ocamlyacc/ocamlyacc-tutorial.pdf}{ocamlyacc Tutorial}
-\item \href{http://www.postgresql.org/docs/9.2/interactive/index.html}{PostgreSQL 9.2 Documentation}
-\end{enumerate}
-\end{document}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.