From d0b292432211744e70a21f6da85cc28258f172b1 Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Mon, 26 Jun 2017 01:17:51 +0100 Subject: [PATCH] doc --- C/absmi.c | 36 +++++++++++++++++++++++++++++++---- C/attvar.c | 2 +- docs/Doxyfile.in | 7 +++---- docs/custom/customdoxygen.css | 5 ++++- docs/md/atts.md | 2 +- docs/md/attscorout.md | 2 +- docs/md/packages.md | 2 +- docs/md/programming.md | 2 +- docs/md/swi.md | 2 ++ docs/md/yap.md | 11 +---------- docs/md/yapsyntax.md | 3 ++- docs/source/conf.py | 2 +- packages/bdd/bdd.yap | 6 +++++- packages/real/real.md | 3 +-- pl/arrays.yap | 2 +- pl/meta.yap | 1 + pl/modules.yap | 9 ++++++++- 17 files changed, 66 insertions(+), 31 deletions(-) diff --git a/C/absmi.c b/C/absmi.c index 75f207f91..c2e94a374 100755 --- a/C/absmi.c +++ b/C/absmi.c @@ -22,25 +22,49 @@ @file absmi.c -@defgroup Efficiency Efficiency Considerations -@ingroup YAPProgramming +@{ We next discuss several issues on trying to make Prolog programs run fast in YAP. We assume two different programming styles: -+ Execution of deterministic programs ofte -n ++ Execution of deterministic programs often boils down to a recursive loop of the form: ~~~~~ +loop(Done). loop(Env) :- do_something(Env,NewEnv), loop(NewEnv). ~~~~~ + +or to the repeat-fail loop: + +~~~~~ +loop(Inp) :- + do_something(Inp,Out), + out_and_fail(Out). +~~~~~ + + +@} + +@defgroup Implementation Implementation Considerations +@ingroup YAPProgramming + +This section is about the YAP implementation, and is mostly of +interest to hackers. + +@{ + +@defgroup Emulator The Abstract Machine Emulator +@ingroup Implementation + */ +/// code belongs to the emulator #define IN_ABSMI_C 1 #define _INATIVE 1 +/// use tmp variables that are placed in registers #define HAS_CACHE_REGS 1 #include "absmi.h" @@ -1420,3 +1444,7 @@ default: /* dummy function that is needed for profiler */ int Yap_absmiEND(void) { return 1; } + +/// @} + +/// @} diff --git a/C/attvar.c b/C/attvar.c index 470d35062..85b5ab0a8 100644 --- a/C/attvar.c +++ b/C/attvar.c @@ -29,7 +29,7 @@ static char SccsId[] = "%W% %G%"; #endif /** - @adefgroup AttributedVariables_Builtins Low-level support for Attributed Variables + @defgroup AttributedVariables_Builtins Low-level support for Attributed Variables @brief Implementation of Attribute Declarations @ingroup attributes diff --git a/docs/Doxyfile.in b/docs/Doxyfile.in index 3ba4f021b..fa459ef21 100644 --- a/docs/Doxyfile.in +++ b/docs/Doxyfile.in @@ -1153,10 +1153,9 @@ HTML_STYLESHEET = # list). For an example see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_EXTRA_STYLESHEET = @CMAKE_SOURCE_DIR@/docs/custom/customdoxygen.css - - -# @CMAKE_SOURCE_DIR@/docs/solarized-light.css +HTML_EXTRA_STYLESHEET = @CMAKE_SOURCE_DIR@/docs/custom/customdoxygen.css \ + @CMAKE_SOURCE_DIR@/docs/custom/pygments.css \ + @CMAKE_SOURCE_DIR@/docs/solarized-light.css # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note diff --git a/docs/custom/customdoxygen.css b/docs/custom/customdoxygen.css index 7bf2f5ec1..d578db4d9 100644 --- a/docs/custom/customdoxygen.css +++ b/docs/custom/customdoxygen.css @@ -1,3 +1,5 @@ +* { box-sizing:border-box } + h1, .h1, h2, .h2, h3, .h3{ font-weight: 200 !important; } @@ -8,7 +10,8 @@ h1, .h1, h2, .h2, h3, .h3{ .adjust-right { margin-left: 30px !important; -font-size: 1.15em !important; +margin-right: 30px !important; +Font-size: 1.15em !important; } .navbar{ border: 0px solid #222 !important; diff --git a/docs/md/atts.md b/docs/md/atts.md index 82a04dfa8..8eb81d6c8 100644 --- a/docs/md/atts.md +++ b/docs/md/atts.md @@ -28,7 +28,7 @@ interface. + @ref sicsatts + @ref New_Style_Attribute_Declarations + @ref AttributedVariables_Builtins - + @ref corout + + @ref attscorouts ### SICStus Style attribute declarations. {#SICS_attributes} diff --git a/docs/md/attscorout.md b/docs/md/attscorout.md index 2904105ee..cfeb32800 100644 --- a/docs/md/attscorout.md +++ b/docs/md/attscorout.md @@ -1,4 +1,4 @@ -Attributed Variables and Corouting {#atts} +Attributed Variables and Coroutingx ================================== diff --git a/docs/md/packages.md b/docs/md/packages.md index bd059de8e..3ddfa2e23 100644 --- a/docs/md/packages.md +++ b/docs/md/packages.md @@ -7,7 +7,7 @@ YAP packages {#packages} + @subpage gecode - + @subpage myddas_dbms + + @subpage myddas + @ref PFL diff --git a/docs/md/programming.md b/docs/md/programming.md index 68a633a83..b1f1e7518 100644 --- a/docs/md/programming.md +++ b/docs/md/programming.md @@ -1,7 +1,7 @@ Programming in YAP {#YAPProgramming} ==================== - + @ref Syntax + + @subpage YAPSyntax + @ref YAPCompilerSettings diff --git a/docs/md/swi.md b/docs/md/swi.md index 60d5163b5..36791a203 100644 --- a/docs/md/swi.md +++ b/docs/md/swi.md @@ -12,6 +12,7 @@ resulted in Prolog extensions such as the `dialect` feature. YAP currently supports most of the SWI-Prolog foreign interface. The following SWI libraries have been adapted to YAP: +~~~~~ + @ref aggregate + @ref base64 + @ref broadcast @@ -42,6 +43,7 @@ libraries have been adapted to YAP: + @ref utf8 + @ref win_menu + @ref www_browser +~~~~~ Note that in general SWI code may be from an earlier version than the diff --git a/docs/md/yap.md b/docs/md/yap.md index 10b2061c6..894b0a0bb 100644 --- a/docs/md/yap.md +++ b/docs/md/yap.md @@ -74,14 +74,12 @@ acknowledge the contributions from Ashwin Srinivasian. YAP includes a number of extensions over the original Prolog language. - + @subpage atts + + @subpage atts.md + @ref Rational_Trees + @ref CohYroutining - + @ref Attributed_Variables - + @ref DepthLimited + @ref Tabling @@ -97,15 +95,8 @@ language. @page YAPProgramming Programming in YAP - @subpage yapsyntax.md - @page packages Packages for YAP -YAP includes a number of packages. - - @subpage real.md - - @subpage chr.md diff --git a/docs/md/yapsyntax.md b/docs/md/yapsyntax.md index 64dffe844..ee3739f01 100644 --- a/docs/md/yapsyntax.md +++ b/docs/md/yapsyntax.md @@ -1,5 +1,6 @@ -@ingroup YAPProgramming +YAP Syntax {#YAPSyntax} +==================== We will describe the syntax of YAP at two levels. We first will describe the syntax for Prolog terms. In a second level we describe diff --git a/docs/source/conf.py b/docs/source/conf.py index cc44b2861..7f39e22a7 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -44,7 +44,7 @@ extensions = ['sphinx.ext.autodoc', 'breathe' ] -breathe_projects = { "yap": "${CMAKE_CURRENT_BINARY_DIR" } +breathe_projects = { "yap": "../../build/docs/xml" } breathe_default_project = "yap" # Add any paths that contain templates here, relative to this directory. diff --git a/packages/bdd/bdd.yap b/packages/bdd/bdd.yap index d56c6070e..0544f263d 100644 --- a/packages/bdd/bdd.yap +++ b/packages/bdd/bdd.yap @@ -1,4 +1,8 @@ -@defgroup BDDsPL Binary Decision Diagrams and Friends +/** + + @file bdd.yap + + @defgroup BDDsPL Binary Decision Diagrams and Friends @ingroup BDDs @{ diff --git a/packages/real/real.md b/packages/real/real.md index 7d9ddcb19..8b7045ec5 100644 --- a/packages/real/real.md +++ b/packages/real/real.md @@ -213,10 +213,9 @@ logical :- Also @subpaage yap-real describes the YAP specfic details in real. -*/Development of real in YAP (#yap-real) +*/Development of real in YAP (#yap_real) --------------------------- - YAP includes a development version of real, designed to experiment with the internals of the implementation of R. It includes major changes and is likely to be much less stable than the version diff --git a/pl/arrays.yap b/pl/arrays.yap index f6f2bd359..54c1be381 100644 --- a/pl/arrays.yap +++ b/pl/arrays.yap @@ -25,7 +25,7 @@ % YAP_ARRAYS is defined in Yap.h % -/** @pred array(+ _Name_, + _Size_) +/** @pred array( +Name, +Size ) Creates a new dynamic array. The _Size_ must evaluate to an diff --git a/pl/meta.yap b/pl/meta.yap index b88017efb..b8e2810e7 100644 --- a/pl/meta.yap +++ b/pl/meta.yap @@ -1,5 +1,6 @@ /** + @file meta.yap @defgroup YAPMetaPredicates Using Meta-Calls with Modules @ingroup YAPModules diff --git a/pl/modules.yap b/pl/modules.yap index 96dca73fb..96338b001 100644 --- a/pl/modules.yap +++ b/pl/modules.yap @@ -18,7 +18,12 @@ /** @file modules.yap -**/ + + @defgroup ModuleBuiltins Module Support + + @{ + + **/ :- system_module( '$_modules', [abolish_module/1, add_import_module/3, current_module/1, @@ -783,3 +788,5 @@ module_state :- format(' ~w:~w :- ~w:~w.~n',[M,G,HostM,G0]), fail. module_state. + +// @} \ No newline at end of file