1m4_define(`dnl', `m4_dnl')`'dnl 2m4_divert(-1) 3 4dnl This m4 file generates the file Prolog_configured_domains.dox 5 6dnl Copyright (C) 2001-2010 Roberto Bagnara <bagnara@cs.unipr.it> 7dnl Copyright (C) 2010-2016 BUGSENG srl (http://bugseng.com) 8dnl 9dnl This file is part of the Parma Polyhedra Library (PPL). 10dnl 11dnl The PPL is free software; you can redistribute it and/or modify it 12dnl under the terms of the GNU General Public License as published by the 13dnl Free Software Foundation; either version 3 of the License, or (at your 14dnl option) any later version. 15dnl 16dnl The PPL is distributed in the hope that it will be useful, but WITHOUT 17dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 18dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 19dnl for more details. 20dnl 21dnl You should have received a copy of the GNU General Public License 22dnl along with this program; if not, write to the Free Software Foundation, 23dnl Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307, USA. 24dnl 25dnl For the most up-to-date information see the Parma Polyhedra Library 26dnl site: http://bugseng.com/products/ppl/ . 27 28dnl FIXME: This should be in the main m4 generator file. 29 30dnl ----------------------------------------------------------------- 31dnl Include the needed m4 files. 32dnl ----------------------------------------------------------------- 33m4_include(`ppl_interface_generator_prolog_procedure_generators.m4') 34m4_include(`ppl_interface_generator_prolog_dox_code.m4') 35 36dnl ================================================================= 37dnl Description of file and copyright notice 38dnl ================================================================= 39m4_divert`'dnl 40/* Configuration Dependent Documentation for Prolog. 41m4_include(`ppl_interface_generator_copyright')*/ 42 43/*! \page configured_domains_predicates Predicates for Configured Domains 44 45The structure of this section is as follows: 46m4_pushdef(`m4_one_class_code',`dnl 47 - \ref m4_interface_class$1`'_predicates "Predicates for the m4_interface_class$1 Domain" 48')`'dnl 49m4_all_code`'dnl 50m4_popdef(`m4_one_class_code')`'dnl 51m4_divert(-1) 52 53dnl ================================================================= 54dnl DOMAIN DEPENDENT DOCUMENTATION. 55dnl ================================================================= 56 57dnl ----------------------------------------------------------------- 58dnl Initialize the class definitions 59dnl as we do not use m4_all_code to generate the documentation, 60dnl this must be done here. 61dnl ----------------------------------------------------------------- 62m4_initialize_all 63 64dnl ----------------------------------------------------------------- 65dnl For the documentation, the predicates for a single class are 66dnl divinided into categories and then into subcategories. 67dnl Each category and subcategory can have its own introduction. 68dnl ----------------------------------------------------------------- 69 70dnl ----------------------------------------------------------------- 71dnl Define documentation for one subcategory. 72dnl This requires that m4_ext is defined. 73dnl ----------------------------------------------------------------- 74m4_define(`m4_one_subcategory', `dnl 75m4_define(`m4_procedure_schema_extension', m4_ext`'_doc)`'dnl 76m4_echo_unquoted(m4_subcategory_`'m4_ext) 77m4_ifdef(m4_interface_class`'$1, 78`m4_patsubst(m4_one_class_code($1), |COMMA|, `,')`'dnl 79')`'dnl 80') 81 82dnl ----------------------------------------------------------------- 83dnl Define the documentation for all categories for simple domains; 84dnl ----------------------------------------------------------------- 85m4_define(`m4_all_simple_categories', `dnl 86m4_category_constr_destr`'dnl 87m4_define(`m4_ext', build)`'dnl 88m4_one_subcategory($1)`'dnl 89m4_define(`m4_ext', convert)`'dnl 90m4_one_subcategory($1)`'dnl 91m4_define(`m4_ext', destruct)`'dnl 92m4_one_subcategory($1)`'dnl 93m4_finalize_category_constr_destr`'dnl 94m4_category_const`'dnl 95m4_define(`m4_ext', testpoly)`'dnl 96m4_one_subcategory($1)`'dnl 97m4_define(`m4_ext', constpoly)`'dnl 98m4_one_subcategory($1)`'dnl 99m4_define(`m4_ext', dump)`'dnl 100m4_one_subcategory($1)`'dnl 101m4_finalize_category_const`'dnl 102m4_category_nonconst`'dnl 103m4_define(`m4_ext', addto)`'dnl 104m4_one_subcategory($1)`'dnl 105m4_define(`m4_ext', trans)`'dnl 106m4_one_subcategory($1)`'dnl 107m4_define(`m4_ext', binop)`'dnl 108m4_one_subcategory($1)`'dnl 109m4_define(`m4_ext', widen)`'dnl 110m4_one_subcategory($1)`'dnl 111m4_finalize_category_nonconst`'dnl 112m4_category_varspace`'dnl 113m4_define(`m4_ext', concat)`'dnl 114m4_one_subcategory($1)`'dnl 115m4_define(`m4_ext', spacemod)`'dnl 116m4_one_subcategory($1)`'dnl 117m4_finalize_category_varspace`'dnl 118') 119 120dnl ----------------------------------------------------------------- 121dnl Define the documentation for an extra category for powerset domains; 122dnl ----------------------------------------------------------------- 123m4_define(`m4_iter_pps_categories', `dnl 124m4_define(`m4_ext', pps_iter)`'dnl 125m4_one_subcategory($1)`'dnl 126') 127 128dnl ----------------------------------------------------------------- 129dnl Documentation for one simple class. 130dnl ----------------------------------------------------------------- 131m4_define(`m4_one_simple_class_code', `dnl 132\anchor m4_this_interface_class`'_predicates 133<H1>Predicates for the m4_this_topology m4_this_interface_class Domain</H1> 134 Here we provide a short description for each of the predicates 135 available for the domain of m4_this_topology m4_this_ppl_objects. 136m4_ifdef(`m4_prolog_ci_documentation', 137 `Note that predicates for other domains will follow a similar pattern.') 138 139m4_all_simple_categories($1)`'dnl 140') 141 142dnl ----------------------------------------------------------------- 143dnl FIXME: Some experimental macros for text processing to try 144dnl and make the documentation a bit more grammatically correct! 145dnl ----------------------------------------------------------------- 146 147dnl m4_underscore_to_space(String) 148dnl 149dnl Changes an underscore to space. 150dnl Example: m4_underscore_to_space(`xyz_abc') ==> xyz abc 151m4_define(`m4_underscore_to_space', `m4_translit(`$1', `_', ` ')') 152 153dnl Changes an underscore to space and upper to lower case 154dnl It also tries to change a powerset name into English! 155m4_define(`m4_PPL_domain2text', `dnl 156 m4_patsubst(m4_patsubst(m4_downcase(m4_underscore_to_space($1)), 157 ` c polyhedron', ` of C polyhedra'), 158 ` nnc polyhedron', ` of NNC polyhedra')') 159 160dnl m4_plural(String) 161dnl 162dnl Very simple macro for making domains (lowercase) plural. 163m4_define(`m4_plural', `dnl 164m4_patsubst(m4_patsubst(m4_patsubst(m4_patsubst(m4_patsubst(m4_patsubst($1, 165 polyhedron, polyhedra), 166 grid, grids), 167 shape, shapes), 168 box, boxes), 169 powerset, powersets), 170 product, products)`'dnl 171') 172 173dnl ================================================================= 174dnl Now the generation of the documentation. 175dnl ================================================================= 176 177dnl ----------------------------------------------------------------- 178dnl CONFIGURATION INDEPENDENT 179dnl ----------------------------------------------------------------- 180 181dnl ----------------------------------------------------------------- 182dnl Additional ad hoc predicates for the configure independent manual. 183dnl 184dnl Note that currently this only describes predicates for the 185dnl pointset powerset domains but allows for other ad hoc predicates 186dnl for other domains to be added later. 187dnl ----------------------------------------------------------------- 188m4_define(`m4_ci_pps_class_code', `dnl 189\anchor other_domains 190<H1>Ad hoc Predicates for Other Domains</H1> 191dnl The pointset powerset domains. 192m4_category_pps 193dnl The predicates for iterators and disjuncts for the powerset domain. 194m4_iter_pps_categories($1)`'dnl 195dnl Other adhoc predicates for the powerset domain. 196m4_define(`m4_ext', pps_other)`'dnl 197m4_one_subcategory($1)`'dnl 198m4_pushdef(`m4_subcategory_widen', `')`'dnl 199m4_define(`m4_ext', widen)`'dnl 200m4_one_subcategory($1)`'dnl 201m4_popdef(`m4_subcategory_widen')`'dnl 202m4_finalize_category_pps`'dnl 203') 204 205m4_divert`'dnl 206m4_ifdef(`m4_prolog_ci_documentation', `dnl 207m4_define(`m4_this_interface_class', Polyhedron)`'dnl 208m4_pushdef(`m4_a_class_replacements', `polyhedron')`'dnl 209m4_pushdef(`m4_Polyhedron_topology_replacements', `C_')`'dnl 210m4_pushdef(`m4_Polyhedron_a_topology_replacements', `C ')`'dnl 211m4_pushdef(`m4_this_ppl_one_object', `polyhedron')`'dnl 212m4_pushdef(`m4_this_ppl_objects', `polyhedra')`'dnl 213m4_pushdef(`m4_this_ppl_group', `polyhedra')`'dnl 214m4_pushdef(`m4_this_topology', `C')`'dnl 215m4_pushdef(`m4_Polyhedron_friend_replacements', 216 `C_Polyhedron, NNC_Polyhedron')`'dnl 217m4_pushdef(`m4_Polyhedron_a_friend_replacements', 218 `C polyhedron, NNC polyhedron')`'dnl 219m4_patsubst(`m4_one_simple_class_code(1)', |COMMA|, `,')`'dnl 220m4_popdef(`m4_Polyhedron_topology_replacements')`'dnl 221m4_popdef(`m4_Polyhedron_a_topology_replacements')`'dnl 222m4_popdef(`m4_this_ppl_objects')`'dnl 223m4_popdef(`m4_this_topology')`'dnl 224m4_pushdef(`m4_Pointset_Powerset_comparison_replacements', 225 `geometrically_covers, geometrically_equals')`'dnl 226m4_pushdef(`m4_Pointset_Powerset_a_comparison_replacements', 227 `geometrically covers, geometrically equals')`'dnl 228m4_patsubst(`m4_ci_pps_class_code(2)', |COMMA|, `,')`'dnl 229')`'dnl 230m4_divert(-1) 231 232dnl ----------------------------------------------------------------- 233dnl CONFIGURATION DEPENDENT 234dnl ----------------------------------------------------------------- 235 236dnl m4_all_classes_code(Class_Counter) 237dnl 238dnl Class_Counter - The index for the current class. 239dnl This iterates through the classes to define the documentation. 240dnl Note that at the end of this stage, commas are still to be substituted. 241m4_define(`m4_all_classes_doc', `dnl 242dnl 243dnl Check for class counter in range. If so, generate the documentation 244dnl for the current class. If not finish. 245m4_ifdef(m4_interface_class`'$1, `dnl 246dnl 247dnl First some temporary definitions. 248m4_define(`m4_this_interface_class', m4_interface_class`'$1)`'dnl 249m4_pushdef(`m4_a_class_replacement', `dnl 250m4_PPL_domain2text(m4_this_interface_class)') 251m4_pushdef(`m4_this_topology', `')`'dnl 252m4_pushdef(`m4_this_ppl_group', m4_class_group`'$1)`'dnl 253m4_pushdef(`m4_this_ppl_kind', m4_class_kind`'$1)`'dnl 254m4_pushdef(`m4_this_ppl_disjunct_kind', m4_class_body_kind`'$1)`'dnl 255m4_define(`m4_disjunct_topology', `dnl 256m4_upcase(m4_get_class_topology(m4_cplusplus_class_body$1))')`'dnl 257m4_pushdef(`m4_this_ppl_one_object', `dnl 258m4_PPL_domain2text(m4_this_ppl_kind)') 259m4_pushdef(`m4_this_ppl_objects', `dnl 260m4_ifelse(m4_this_ppl_group, box, 261 m4_plural(m4_PPL_domain2text(m4_this_interface_class)), 262 m4_this_ppl_group, pointset_powerset, 263 pointset powersets of m4_plural(m4_PPL_domain2text(m4_disjunct_topology m4_this_ppl_disjunct_kind)), 264 m4_plural(m4_PPL_domain2text(m4_this_ppl_kind)))')`'dnl 265dnl 266dnl Generate documentation for current class. 267m4_one_simple_class_code($1)`'dnl 268m4_ifelse(m4_this_ppl_group, 269 pointset_powerset, `m4_iter_pps_categories($1)')`'dnl 270dnl 271dnl Remove temporary definition. 272m4_popdef(`m4_this_ppl_objects')`'dnl 273m4_popdef(`m4_this_topology')`'dnl 274m4_popdef(`m4_this_ppl_group')`'dnl 275m4_popdef(`m4_this_ppl_kind')`'dnl 276m4_popdef(`m4_this_ppl_disjunct_kind')`'dnl 277m4_popdef(`m4_disjunct_topology')`'dnl 278dnl 279dnl Increment class counter and repeat. 280m4_all_classes_doc(m4_incr($1))')`'dnl 281') 282 283dnl ----------------------------------------------------------------- 284dnl Generate all documentation for all the classes 285dnl ----------------------------------------------------------------- 286m4_divert`'dnl 287m4_ifdef(`m4_prolog_ci_documentation', `', 288 `m4_patsubst(`m4_all_classes_doc(1)', |COMMA|, `,')`'dnl 289')`'dnl 290m4_divert(-1) 291 292m4_divert`'dnl 293*/ /* \page configured_domains_predicates */ 294dnl 295dnl End of file generation. 296