pax_global_header00006660000000000000000000000064142003661100014503gustar00rootroot0000000000000052 comment=6cf842fd1490b55a38954562571b69365e8aad44 Maude-Maude3.2/000077500000000000000000000000001420036611000133565ustar00rootroot00000000000000Maude-Maude3.2/AUTHORS000066400000000000000000000002621420036611000144260ustar00rootroot00000000000000Steven Eker Extensions to the strategy language and its reflection in the functional metalevel implemented by: Rubén Rafael Rubio Cuéllar Maude-Maude3.2/COPYING000066400000000000000000000431101420036611000144100ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. Maude-Maude3.2/ChangeLog000077500000000000000000000634521420036611000151450ustar00rootroot000000000000002022-01-25 Steven Eker * tests/ResolvedBugs/loopModeStateAugust2021.maude: added * tests/ResolvedBugs/uninitIterExtSeptember2021.maude: added ===================================Maude137=========================================== 2021-06-08 Steven Eker * tests/Misc/directoryTest.maude: added 2021-05-26 Steven Eker * tests/Misc/AU_and_A_UnificationEdgeCases.maude: updated comment now that PigPug::tightenConstraints() has been deleted ===================================Maude136=========================================== 2021-03-10 Steven Eker * tests/ResolvedBugs/deleteTimerMarch2021.maude: added ===================================Maude135=========================================== 2021-02-22 Steven Eker * tests/ResolvedBugs/irredUnifyFeb2021.maude: added 2021-02-17 Steven Eker * tests/Misc/fileTest.maude: use fileTest.maude itself as file to read from 2021-02-16 Steven Eker * tests/Misc/fileTest.maude: added 2021-01-22 Steven Eker * tests/Misc/AU_IrredUnification.maude: added 2021-01-04 Rubén Rubio * tests/StrategyLanguage/parameterization.maude: added tests for parameterized views ===================================Maude133=========================================== 2020-12-08 Steven Eker * tests/Meta/metaProcStrategy.maude: added * tests/Meta/metaProcNarrowSearch.maude: added * tests/Meta/metaProcNarrow.maude: added * tests/Meta/metaProcApply.maude: added * tests/Meta/metaProcParse.maude: added * tests/Meta/metaProcPrint.maude: added * tests/Meta/metaProcVariantMatch.maude: added * tests/Meta/metaProcVariantUnify2.maude: added * tests/Meta/metaProcVariantUnify.maude: added * tests/Meta/metaProcVariant.maude: added * tests/Meta/metaProcUnify.maude: added * tests/Meta/metaProcMatch.maude: added * tests/Meta/metaProcSearch.maude: added * tests/Meta/metaProcPrelude.maude: added * tests/Meta/metaProcReplace.maude: added * tests/Meta/metaProcReplace2.maude: added 2020-12-07 Steven Eker * tests/Meta/metaProcSort.maude: added * tests/Meta/russianDollsNonFlatProc3.maude: added * tests/Meta/russianDollsNonFlatProc2.maude: added * tests/Meta/russianDollsNonFlatProc.maude: added * tests/Meta/russianDollsFlatProc.maude: added 2020-11-09 Steven Eker * tests/ResolvedBugs/attributeBugsNovember2020.maude: added * tests/ResolvedBugs/polymorphicParsingBugsNovember2020.maude: added ===================================Maude132=========================================== 2020-09-24 Steven Eker * tests/ResolvedBugs/CUI_OccursCheckSeptember2020.maude: created ===================================Maude131=========================================== 2020-09-21 Steven Eker * tests/ResolvedBugs/indentityUnificationSeptember2020.maude: added 2020-09-17 Steven Eker * tests/Misc/continue.maude: added test for variant matching 2020-09-16 Steven Eker * tests/Meta/metaNarrow.maude: added delay, filter examples * tests/Meta/metaIntNewNarrow.maude: added delay, filter examples ===================================Maude130=========================================== 2020-09-09 Steven Eker * tests/Meta/metaVariantMatch.maude: added 2020-09-08 Steven Eker * tests/Meta/metaIntVariantMatch.maude: added 2020-09-04 Steven Eker * tests/Misc/variantMatching.maude: added 2020-09-03 Steven Eker * tests/Meta/metaIntVariantUnify2.maude: added 2020-09-02 Steven Eker * tests/Meta/metaVariantUnify2.maude: added * tests/Meta/checkUnifiers.maude: use new version of metaVariantUnify() 2020-09-01 Steven Eker * tests/Misc/filteredVariantUnification.maude: added 2020-07-15 Steven Eker * tests/Meta/metaIntUnify.maude: added examples for getIrredundantUnifier(), getIrredundantDisjointUnifier() * tests/Meta/metaUnify.maude: added examples for metaIrredundantUnify(), metaIrredundantDisjointUnify() ===================================Maude129=========================================== 2020-07-01 Steven Eker * tests/Misc/AU_Unification.maude: added 2020-06-24 Steven Eker * tests/Misc/unification.maude: change the theory in the unsupported theory example to AUl since AU is now partly supported 2020-06-11 Steven Eker * tests/ResolvedBugs/variantUnifyJune2020.maude: added * tests/Meta/checkUnifiers.maude: added 2020-05-28 Steven Eker * tests/ResolvedBugs/ACU_MissingUnifiersMay2020.maude: added * tests/ResolvedBugs/sortCollapseMay2020.maude: added 2020-05-19 Steven Eker * tests/ResolvedBugs/identityUnificationMay2020.maude: added 2020-05-05 Steven Eker * tests/ResolvedBugs/complexParserSyncApril2020.maude: removed line left from metaParseStrategy() test 2020-04-28 Steven Eker * configure.ac: added test for ppoll() existence 2020-04-13 Steven Eker * tests/ResolvedBugs/complexParserSyncApril2020.maude: added * tests/ResolvedBugs/metaParseStrategyApril2020.maude: added ===================================Maude128a=========================================== 2020-03-06 Steven Eker * tests/ResolvedBugs/closeSocketFeb2020.maude: added 2020-02-06 Steven Eker * tests/ResolvedBugs/ascentFunctionsJanuary2020.maude: added ===================================Maude128=========================================== 2019-11-20 Rubén Rubio * tests/Meta/metaIntStrategy.maude: added * tests/StrategyLanguage/metalevel.maude: adapted to the new interface and syntax of the strategy language at the metalevel * tests/StrategyLanguage/parameterization.maude: added 2019-11-11 Steven Eker * tests/Meta/metaIntParse.maude: parseQidList() -> parseTerm() 2019-11-08 Steven Eker * tests/Meta/metaIntParse.maude: use variable alias feature * tests/Meta/metaIntPrint.maude: use variable alias feature 2019-11-05 Steven Eker * tests/Meta/metaPrettyPrint.maude: added tests for variable alias feature 2019-11-04 Steven Eker * tests/Meta/metaParse.maude: added tests for variable alias feature 2019-10-22 Steven Eker * tests/Meta/metaGetVariant.maude: use new variable family based metaGetVariant() * tests/Meta/metaVariantUnify.maude: use new variable family based metaVariantUnify()/metaVariantDisjointUnify() * tests/Meta/legacyMetaGetVariant.maude: created 2019-10-21 Steven Eker * tests/Meta/legacyMetaVariantUnify.maude: created 2019-10-18 Steven Eker * tests/Meta/metaUnify.maude: use new variable family based metaUnify()/metaDisjointUnify() * tests/Meta/legacyMetaUnify.maude: created ===================================Maude125=========================================== 2019-07-31 Steven Eker * tests/ResolvedBugs/instantiationJuly2019.maude: added 2019-05-29 Steven Eker * tests/Misc/parameterizedView.maude: added * tests/Misc/badView.maude: added * tests/ResolvedBugs/viewRecursionMay2019.maude: added * tests/ResolvedBugs/polymorphicOverloadMay2019.maude: added * tests/ResolvedBugs/parameterTheoryCopyMay2019.maude: added * tests/ResolvedBugs/parameterTheoryMay2019.maude: added * tests/ResolvedBugs/moduleSumMay2019.maude: added 2019-05-28 Steven Eker * tests/Meta/russianDollsNonFlat2.maude: added 2019-05-24 Steven Eker * tests/Misc/mapToParameterTheory.maude: added 2019-05-03 Steven Eker * tests/Misc/parameterization.maude: summing modules with bound parameters is now legal ===================================Maude121=========================================== 2018-12-07 Steven Eker * tests/Meta/metaIntNewNarrowSearch.maude: added 2018-12-04 Steven Eker * tests/Meta/metaIntNewNarrow.maude: added 2018-11-12 Steven Eker * tests/Meta/metaIntApply.maude: added 2018-11-09 Steven Eker * tests/ResolvedBugs/metaApplyNov2018.maude: added ===================================Maude120=========================================== 2018-10-23 Steven Eker * tests/ResolvedBugs/physArgIndexOct2018.maude: added * tests/Meta/metaIntParse.maude: added 2018-10-22 Steven Eker * tests/Meta/metaIntPrint.maude: added 2018-10-15 Steven Eker * tests/Meta/metaIntVariantUnify.maude: added 2018-10-11 Steven Eker * tests/ResolvedBugs/metaIntMatchOct2018.maude: added 2018-10-10 Steven Eker * tests/Meta/metaIntVariant.maude: added 2018-10-09 Steven Eker * tests/ResolvedBugs/objectMessageOct2018.maude: added 2018-09-26 Steven Eker * tests/Meta/metaIntUnify.maude: added 2018-09-17 Steven Eker * tests/Meta/metaIntSort.maude: added tests for getMaximalAritySet(); added tests for normalizeTerm() ===================================Maude119=========================================== 2018-08-17 Steven Eker * tests/Meta/metaIntSort.maude: added 2018-08-13 Steven Eker * tests/BuiltIn/string.maude: added tests for upperCase(), lowerCase() 2018-08-09 Steven Eker * tests/ResolvedBugs/metaIntAscentJune2018.maude: updated to new createInterpreter() convention * tests/ResolvedBugs/metaIntImportJune2018.maude: updated to new createInterpreter() convention * tests/ResolvedBugs/metaModuleCacheJune2018.maude: updated to new createInterpreter() convention * tests/ResolvedBugs/metaIntRewriteJune2018.maude: updated to new createInterpreter() convention * tests/ResolvedBugs/showModuleJune2018.maude: updated to new createInterpreter() convention * tests/Meta/metaIntPrelude.maude: updated to new createInterpreter() convention * tests/Meta/metaIntReplace.maude: updated to new createInterpreter() convention * tests/Meta/russianDollsFlat.maude: updated to new createInterpreter() convention * tests/Meta/metaIntReplace2.maude: updated to new createInterpreter() convention * tests/Meta/russianDollsNonFlat.maude: updated to new createInterpreter() convention * tests/Meta/metaIntSearch.maude: updated to new createInterpreter() convention * tests/Meta/metaIntMatch.maude: updated to new createInterpreter() convention 2018-08-08 Steven Eker * tests/Meta/metaIntMatch.maude: added * tests/Meta/metaIntSearch.maude: added ===================================Maude118=========================================== 2018-07-20 Rubén Rubio * test/StrategyLanguage/metalevel.maude: added * test/StrategyLanguage/modules.maude: added * test/StrategyLanguage/srewrite.maude: added 2018-07-09 Steven Eker * tests/Misc/rot13.maude: added 2018-06-28 Steven Eker * tests/ResolvedBugs/metaIntRewriteJune2018.maude: added 2018-06-27 Steven Eker * tests/ResolvedBugs/clearRulesJune2018.maude: added * tests/ResolvedBugs/metaIntAscentJune2018.maude: added * tests/ResolvedBugs/metaIntImportJune2018.maude: added 2018-06-26 Steven Eker * tests/ResolvedBugs/metaModuleCacheJune2018.maude: added * tests/ResolvedBugs/showModuleJune2018.maude: added 2018-06-25 Steven Eker * tests/ResolvedBugs/staleViewJune2018.maude: added * tests/ResolvedBugs/parserJune2018.maude: added 2018-06-08 Steven Eker * tests/Meta/russianDollsFlat.maude: added * tests/Meta/russianDollsNonFlat.maude: added 2018-05-22 Steven Eker * tests/Meta/metaIntReplace2.maude: added * tests/Meta/metaIntReplace.maude: added * tests/Meta/metaIntPrelude.maude: added example to test upModule() running in meta-interpreter 2018-05-21 Steven Eker * tests/Meta/metaIntPrelude.maude: added 2018-05-11 Steven Eker * tests/Misc/view.maude: added 2018-03-27 Steven Eker * configure.ac: removed references to MSCP10 * AUTHORS: removed reference to MSCP10 * tests/Misc/bubble.maude: added two more examples ===================================Maude117=========================================== 2018-03-16 Steven Eker * configure.ac: remove ref to MSCP10 2018-03-15 Steven Eker * src/Makefile.am (SUBDIRS): remove MSCP10 * tests/Misc/Makefile.am: added parse and bubble tests * tests/Misc/bubble (MAUDE_LIB): created * tests/Misc/parse.maude: created * tests/Misc/parse (MAUDE_LIB): created 2018-02-28 Steven Eker * tests/Misc/bubble.maude: created 2017-12-22 Steven Eker * tests/Meta/metaWellFormed.maude: fix issue where none is ambiguous; it can be (none).EmptyTypeSet or (none).Substitution ===================================Maude116=========================================== 2017-07-12 Steven Eker * tests/Misc/smtTest.maude: added tests for violations of SMT restrictions 2017-06-26 Steven Eker * INSTALL: add Yices2 info 2017-06-21 Steven Eker * tests/Misc/smtTest (MAUDE_LIB): check for USE_YICES2 2017-06-20 Steven Eker * configure.ac (GMP_LIBS): add configuration for Yices2 2017-05-30 Steven Eker * tests/Misc/smtTest.maude: move smt continue tests here from continue.maude since they shouldn't be run if we don't have CVC4 linked ===================================Maude114=========================================== 2017-05-26 Steven Eker * tests/Meta/metaNarrow.maude: added tests for metaNarrowingSearchPath() * tests/Misc/narrow.maude: added tests for fvu-narrow 2017-05-02 Steven Eker * tests/Meta/metaNarrow.maude: metaNarrowingApply() no longer takes label argument * tests/Misc/continue.maude: use narrowing attribute 2017-05-01 Steven Eker * tests/Misc/narrow.maude: use narrowing attribute * tests/Meta/metaNarrow.maude: use narrowing attribute ===================================Maude113=========================================== 2017-04-13 Steven Eker * tests/Misc/continue.maude: created ===================================Maude112a=========================================== 2017-03-10 Steven Eker * tests/Meta/metaNarrow.maude: added metaNarrowingSearch() examples * tests/Misc/narrow.maude: created ===================================Maude111b=========================================== 2017-01-09 Steven Eker * tests/Meta/metaNarrow.maude: added examples 2017-01-06 Steven Eker * tests/Meta/metaVariantUnify.maude: fix typo in metaVariantDisjointUnify() ===================================Maude111a=========================================== 2016-12-19 Steven Eker * tests/Meta/metaNarrow.maude: created * tests/Meta/metaNarrow (MAUDE_LIB): created ===================================Maude111=========================================== 2016-06-27 Steven Eker * tests/Misc/smtTest (MAUDE_LIB): skip test if we don't define USE_CVC4 * configure.ac: use no argument form of AM_INIT_AUTOMAKE ===================================Maude110b=========================================== 2016-05-05 Steven Eker * configure.ac: changed bug report address from maude-bugs@maude.cs.uiuc.edu to maude-bugs@lists.cs.illinois.edu ===================================Maude110=========================================== 2016-02-26 Steven Eker * tests/Misc/meseguerFiniteVariant.maude: created * tests/Misc/meseguerFiniteVariant: created ===================================Maude109=========================================== 2014-11-19 Steven Eker * tests/Misc/assocUnification.maude: added examples to test new capabilities ===================================Maude106=========================================== 2014-10-29 Steven Eker * tests/Misc/smtTest.maude: updated with new syntax and examples ===================================Maude105=========================================== 2014-08-14 Steven Eker * tests/Misc/smtTest.maude: use new syntax ===================================Maude104=========================================== 2014-04-22 Steven Eker * configure.ac: added configuration for CVC4 and POSIX Realtime Extensions library (needed by CVC4) ===================================Maude103=========================================== 2014-04-04 Steven Eker * tests/Misc/assocUnification (MAUDE_LIB): created * tests/Misc/assocUnification.maude: created * tests/Misc/unification.maude: change assoc to assoc id: in TEST2 since assoc is now partially supported ===================================Maude102=========================================== 2014-02-06 Steven Eker * configure.ac: removed rope_UGLY_HACK option * src/3rdParty/Makefile.am (noinst_HEADERS): removed rope_UGLY_HACK stuff 2014-01-31 Steven Eker * configure.ac: no longer offer dlmalloc option * src/3rdParty/malloc.c: deleted * src/3rdParty/Makefile.am: remove all mention of dlmalloc ===================================Maude100a=========================================== 2013-03-12 Steven Eker * tests/Misc/unification (MAUDE_LIB): created * tests/Misc/CU_Unification.maude: created 2013-03-11 Steven Eker * tests/ResolvedBugs/unificationMar2013 (MAUDE_LIB): created * tests/ResolvedBugs/unificationMar2013.maude: created 2012-08-06 Steven Eker * src/3rdParty/ropeimpl_UGLY_HACK.h: hacked up verison of Mac ropeimpl.h * src/3rdParty/rope_UGLY_HACK: version of Mac rope that uses ropeimpl_UGLY_HACK.h * configure.ac: added flag for rope ugly hack 2012-07-31 Steven Eker * tests/Misc/variantNarrowing (MAUDE_LIB): created * tests/Misc/variantNarrowing.maude: created * tests/Meta/metaVariantUnify (MAUDE_LIB): created * tests/Meta/metaVariantUnify.maude: created * tests/Misc/variantUnification.maude: created * tests/Misc/variantUnification (MAUDE_LIB): created ===================================Maude96a=========================================== 2010-05-21 Steven Eker * tests/ResolvedBugs/CUIbug12-22-09.maude (CUI_DagNode): use set show timing off . ===================================Maude94=========================================== 2010-03-19 Steven Eker * configure.ac: don't bother with -fomit-frame-pointer -fforce-addr; check for gcc 4.* 2009-12-23 Steven Eker * tests/ResolvedBugs/CUIbug12-22-09 (MAUDE_LIB): added; removed previous tests 2009-11-12 Steven Eker * tests/ResolvedBugs/Makefile.am (RESULT_FILES): added 6 tests 2009-11-11 Steven Eker * tests/ResolvedBugs/santiago9-21-09 (MAUDE_LIB): created * tests/ResolvedBugs/paco10-6-09 (MAUDE_LIB): created * tests/ResolvedBugs/santiago11-2-09 (MAUDE_LIB): created * configure.ac: added tests/ResolvedBugs ===================================Maude92a=========================================== 2008-09-17 Steven Eker * tests/Meta/metaPrintAttr (MAUDE_LIB): created * tests/Meta/metaPrintAttr.maude: created * tests/Misc/attributes (MAUDE_LIB): created * tests/Misc/attributes.maude: created 2008-09-16 Steven Eker * tests/Misc/unification.maude: added simultaneous unification examples * tests/Misc/parameterization.maude: added a check for illegally overriding an operator from a parameter theory ===================================Maude91a=========================================== 2008-04-18 Steven Eker * tests/Meta/metaUnify (MAUDE_LIB): created * tests/Misc/unification (MAUDE_LIB): created * tests/Misc/unification.maude: created ===================================Maude91=========================================== 2006-10-06 Steven Eker * tests/Meta/metaMetadata (MAUDE_LIB): Mixfix -> Main * tests/Meta/metaUpDown (MAUDE_LIB): Mixfix -> Main * tests/Meta/metaPolymorph (MAUDE_LIB): Mixfix -> Main * tests/Meta/metaModExp (MAUDE_LIB): Mixfix -> Main * tests/Meta/metaUpModExp (MAUDE_LIB): Mixfix -> Main * tests/Meta/metaUp2 (MAUDE_LIB): Mixfix -> Main * tests/Meta/metaUp (MAUDE_LIB): Mixfix -> Main * tests/Meta/metaXmatch (MAUDE_LIB): Mixfix -> Main * tests/Meta/metaXapply (MAUDE_LIB): Mixfix -> Main * tests/Meta/metaWellFormed (MAUDE_LIB): Mixfix -> Main * tests/Meta/metaTerm (MAUDE_LIB): Mixfix -> Main * tests/Meta/metaSpecial (MAUDE_LIB): Mixfix -> Main * tests/Meta/metaSort (MAUDE_LIB): Mixfix -> Main * tests/Meta/metaSearch (MAUDE_LIB): Mixfix -> Main * tests/Meta/metaRewrite (MAUDE_LIB): Mixfix -> Main * tests/Meta/metaReduce (MAUDE_LIB): Mixfix -> Main * tests/Meta/metaPrettyPrint (MAUDE_LIB): Mixfix -> Main * tests/Meta/metaParse (MAUDE_LIB): Mixfix -> Main * tests/Meta/metaModule (MAUDE_LIB): Mixfix -> Main * tests/Meta/metaMeta (MAUDE_LIB): Mixfix -> Main * tests/Meta/metaMatch (MAUDE_LIB): Mixfix -> Main * tests/Meta/metaFrewrite (MAUDE_LIB): Mixfix -> Main * tests/Meta/metaApply (MAUDE_LIB): Mixfix -> Main * tests/Misc/parameterization.maude: use new order theories * tests/Misc/dataStructures (MAUDE_LIB): Mixfix -> Main * tests/Misc/dekker (MAUDE_LIB): Mixfix -> Main * tests/Misc/commands (MAUDE_LIB): Mixfix -> Main * tests/Misc/debug (MAUDE_LIB): Mixfix -> Main * tests/Misc/parameterization (MAUDE_LIB): Mixfix -> Main * tests/Misc/diophantine (MAUDE_LIB): Mixfix -> Main * tests/Misc/renaming (MAUDE_LIB): Mixfix -> Main * tests/BuiltIn/nat (MAUDE_LIB): Mixfix -> Main * tests/BuiltIn/int (MAUDE_LIB): Mixfix -> Main * tests/BuiltIn/rat (MAUDE_LIB): Mixfix -> Main * tests/BuiltIn/string (MAUDE_LIB): Mixfix -> Main * tests/BuiltIn/counters (MAUDE_LIB): Mixfix -> Main * configure.ac: support src/Main 2006-09-13 Steven Eker * tests/Misc/parameterization.maude: rewritten with new orderings replacing TAO-SET * tests/Misc/dataStructures.maude: rewritten to test fmod SORTABLE-LIST-AND-SET ===================================Maude88a=========================================== 2006-06-28 Steven Eker * configure.ac: don't tweak -mpreferred-stack-boundary= on Intel Macs because Darwin needs 16 byte alignment 2005-11-16 Steven Eker * configure.ac: don't use Doug Lea's malloc() on x86-64/linux because of linking issues 2005-11-15 Steven Eker * configure.ac: x86-64 specific stuff ===================================Maude86d=========================================== 2005-10-06 Steven Eker * tests/Misc/diophantine.maude: created * tests/Misc/diophantine (MAUDE_LIB): created * tests/Misc/diophantine.expected: created * tests/Misc/parameterization.maude: created * tests/Misc/parameterization (MAUDE_LIB): created * tests/Misc/parameterization.expected: created 2005-10-05 Steven Eker * tests/Misc/dataStructures.expected: created * tests/Misc/dataStructures.maude: created * tests/Misc/dataStructures (MAUDE_LIB): created ===================================Maude86c=========================================== 2005-06-23 Steven Eker * tests/Misc/renaming (MAUDE_LIB): created * tests/Misc/renaming.expected: created * tests/Misc/renaming.maude: added ===================================Maude86b=========================================== 2005-01-07 Steven Eker * tests/Meta/metaPrettyPrint.maude: updated test for print option argument 2004-12-08 Steven Eker * tests/Meta/Makefile.am: added metaMetadata * tests/Meta/metaMetadata: created * tests/Meta/metaMetadata.maude: created ===================================Maude85a=========================================== 2004-12-03 Steven Eker * tests/Meta/metaSort.maude: added maximalAritySet() test; added test for glbSorts() on a kind 2004-12-01 Steven Eker * tests/Meta/metaSearch.maude: added tests for metaSearchPath() * tests/BuiltIn/Makefile.am: added counters * tests/BuiltIn/counters: created * tests/BuiltIn/counters.expected: created * tests/BuiltIn/counters.maude: created 2004-11-30 Steven Eker * configure.ac: CCFLAGS -> CFLAGS replaced ETR_SOCKET_NSL with AC_CHECK_LIB() calls for nsl and socket libraries 2004-11-29 Steven Eker * configure.ac: changed -mcpu=v8 to -march=v8 since -mcpu= is deprecated in gcc versions >= 3.1; added ETR_SOCKET_NSL 2004-10-05 Steven Eker * configure.ac: added --enable-mos option to support legacy apps 2003-09-02 Steven Eker * configure.ac: deleted AC_DEFINE([SPEED_HACKS]) 2003-07-29 Steven Eker * Created standard files that automake expects to see. Look in individual source directories for detailed changes. Maude-Maude3.2/INSTALL000077500000000000000000000121531420036611000144140ustar00rootroot00000000000000Prerequisites ============= Maude requires following the tools: GNU gcc http://gcc.gnu.org/ GNU bison http://www.gnu.org/software/bison/ flex https://github.com/westes/flex It is recommended that you use the latest versions of bison and flex since Maude is known to tickle bugs in certain older versions. You should use gcc 5.2 or later as there are code generation issues with earlier versions. Maude requires the following packages: GNU gmp https://gmplib.org/ GNU libsigsegv https://www.gnu.org/software/libsigsegv/ Tecla http://www.astro.caltech.edu/~mcs/tecla/ BuDDY http://sourceforge.net/projects/buddy CVC4 (optional) https://cvc4.github.io/ Yices2 (optional) https://github.com/SRI-CSL/yices2 Configuring the 3rd party packages ================================== It is recommended that GNU gmp, BuDDy and CVC4 be compiled with the same compiler you will use for Maude. GMP --- GNU gmp must be configured with --enable-cxx to generate the C++ bindings. I also recommend --enable-fat to allow the code to run on CPUs older than the one you build on. In order to build Yices you will need both static and dynamic GMP libraries - you can discard the dynamic ones once Yices is built. I use the following configure arguments for Linux64 and Darwin64: ../configure \ CFLAGS="-O3 -pedantic -fno-stack-protector" \ CXXFLAGS="-O3 -pedantic -fno-stack-protector" \ --prefix=/home/Linux64 \ --enable-cxx \ --enable-fat ../configure \ --prefix="/Users/Darwin64" \ --enable-cxx \ --enable-fat libsigsegv ---------- Your Linux distribution may come with a suitable libsigsegv. On Mac I configure it with: ../configure \ --prefix=/Users/Darwin64 \ CFLAGS="-Wall -O3 -fno-stack-protector -fstrict-aliasing" Tecla ----- Tecla does not support separate build directories. I use the following configure arguments for Linux64 and Darwin64: ./configure \ CFLAGS="-g -fno-stack-protector -O3" \ -host=x86-linux-gnu \ --prefix=/home/Linux64 ./configure \ CFLAGS="-g -fno-stack-protector -O3" \ --prefix=/Users/Darwin64 BuDDy ----- As of 2.4 BuDDy has moved to autoconf. The option --disable-shared is recommended to avoid linking issues on various platforms. I use the following configure arguments for Linux64 and Darwin64: ../configure LDFLAGS=-lm \ CFLAGS="-g -fno-stack-protector -O3" \ CXXFLAGS="-g -fno-stack-protector -O3" \ --prefix=/home/Linux64 \ --disable-shared ../configure LDFLAGS=-lm \ CFLAGS="-g -fno-stack-protector -O3" \ CXXFLAGS="-g -fno-stack-protector -O3" \ --prefix=/Users/Darwin64 \ --disable-shared Yices ----- Yices2 must be built from source, and does not support separate build directories. It is very finicky about GMP. I use the following configure arguments for Linux64 and Darwin64: ./configure \ --prefix=/home/Linux64 \ --with-static-gmp=/home/Linux64/lib/libgmp.a \ --with-static-gmp-include-dir=/home/Linux64/include \ CFLAGS="-fno-stack-protector -O3" \ LDFLAGS="-L/home/Linux64/lib" \ CPPFLAGS="-I/home/Linux64/include" ./configure \ --prefix=/Users/Darwin64 \ --with-static-gmp=/Users/Darwin64/lib/libgmp.a \ --with-static-gmp-include-dir=/Users/Darwin64/include \ CFLAGS="-fno-stack-protector -O3" \ LDFLAGS="-L/Users/Darwin64/lib" \ CPPFLAGS="-I/Users/Darwin64/include" Building Maude ============== Only one of CVC4 and Yices2 should be linked to provide an SMT backend. By default, Maude is configured to use Yices2, which is significantly easier to build. I use the following configure arguments for Linux64 and Darwin64: ../configure \ --with-yices2=yes \ --with-cvc4=no \ --enable-compiler \ -host=x86-linux-gnu \ CFLAGS="-Wall -O3 -fno-crossjumping -fno-stack-protector -finline-limit=10000" \ CXXFLAGS="-Wall -O3 -fno-crossjumping -fno-stack-protector -finline-limit=10000" \ CPPFLAGS="-I/home/Linux64/include" \ LDFLAGS="-L/home/Linux64/lib" \ GMP_LIBS="/home/Linux64/lib/libgmpxx.a /home/Linux64/lib/libgmp.a" ../configure \ --with-yices2=yes \ --with-cvc4=no \ FLEX=/Users/Darwin64/bin/flex \ BISON=/Users/Darwin64/bin/bison \ CFLAGS="-Wall -O3 -fno-stack-protector -fstrict-aliasing" \ CXXFLAGS="-Wall -O3 -fno-stack-protector -fstrict-aliasing -std=c++11" \ CPPFLAGS="-I/Users/Darwin64/include" \ LDFLAGS="-L/Users/Darwin64/lib" \ GMP_LIBS="/Users/Darwin64/lib/libgmpxx.a /Users/Darwin64/lib/libgmp.a" Passing --with-yices2=no --with-cvc4=yes to configure will use CVC4 instead of Yices2. Passing both options as no will build Maude without SMT support. A very basic test suite can be run using the command: make check The maude binary is installed in $(bindir) and the .maude files are installed in $(datadir). In order for the Maude binary to find the .maude files you should set the environment variable MAUDE_LIB to point to $(datadir). Alternatively you could move the .maude files to $(bindir). Note that if your CVC4 library is built using CLN then you must also link this library (-lcln). Note for Mac users ================== As of Mavericks, Apple no longer supports gcc so Maude must be compiled with clang, which you can get by installing Apple's Xcode. Note that Xcode comes with ancient versions of flex and bison so you should install the latest versions from source or a package manager such as Mac Ports or Homebrew. Maude-Maude3.2/Makefile.am000066400000000000000000000000241420036611000154060ustar00rootroot00000000000000SUBDIRS = src tests Maude-Maude3.2/Makefile.in000066400000000000000000000606511420036611000154330ustar00rootroot00000000000000# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_have_poll.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir distdir-am dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in AUTHORS \ COPYING ChangeLog INSTALL NEWS README compile config.guess \ config.sub depcomp install-sh missing mkinstalldirs DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ BUDDY_LIB = @BUDDY_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FLEX = @FLEX@ GCC_LIBS = @GCC_LIBS@ GMP_LIBS = @GMP_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSIGSEGV_LIB = @LIBSIGSEGV_LIB@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TECLA_LIBS = @TECLA_LIBS@ VERSION = @VERSION@ YICES2_LIB = @YICES2_LIB@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = src tests all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @test -f $@ || rm -f stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile config.h installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) all install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ distcheck distclean distclean-generic distclean-hdr \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: Maude-Maude3.2/NEWS000077500000000000000000001156171420036611000140730ustar00rootroot00000000000000Overview of Changes in Maude 3.2 (alpha137a) (2022-02-07) ========================================================= * updated comments to 3.2 Overview of Changes in Maude 3.2 beta (alpha137) (2022-01-28) ============================================================= * fixed bug in the Yices bindings where constraints were being asserted twice * fixed bug in the prelude where projection functions didn't work for parameterized meta-modules * fixed bug in the handling of extension information for iter symbols * fixed bug in loop mode where it would try to continue using state left over from some incompatible command Overview of Changes in alpha136 (2021-06-08) ============================================ * file API supports makeLink() message * experimental directory API * -assoc-unif-depth= to control A/AU unification search Overview of Changes in alpha135 (2021-04-09) ============================================ * second control-C within a second now returns to command line * fixed bug in deleteTimer() which would cause a later crash * empty line is treated as implicit step command in debugger * getLine() is now nonblocking * changed semantics of stopTimer() * standard streams now accept bad messages and return streamError() Overview of Changes in alpha134 (2021-03-08) ============================================ * experimental time API Overview of Changes in alpha133 (2021-02-25) ============================================ * fixed bugs in the processing of strategies in parameterized views * fixed bug where irredundant prefix was echoed * fixed bug where waiting on multiple file descriptors could ignore some of them on platforms using pselect() such as Mac * constraint propagation gets more A/AU unification cases * two optimizations to reduce the number of redundant AU-unifiers * meta-interpreters running in the orginal process now have the same error semantics as meta-interpreters running in new processes * file API has new error semantics * missing start op-hook added to file.maude * removeFile() message added to file.maude * fixed a bug where irredundant unification was ignoring the last variable in each subsumption check * removed destructive generation of order-sorted unifiers because it breaks irredundant unification (which assume unifiers can be retained) and generates denormalized unifiers anyway Overview of Changes in alpha132-32 (2020-12-14) =============================================== * fixed GMP/long long int issue on 32-bit machines Overview of Changes in alpha132 (2020-12-11) ============================================ * fixed bugs where non-unary iter symbols caused breakage in regular and polymorphic cases * fixed bugs where bad sorts for iter symbols caused breakage in regular and polymorphics cases * fixed bug where comm, idem and id: attributes were ignored if iter attribute seen * fixed bug where flattened prefix syntax wasn't accepted for polymorphic associative operators * fixed bug where f^n(...) syntax wasn't accepted for polymorphic iter operators * fixed bug for ! strategy * support meta-interpreters in separate processes * new options for vu-narrow Overview of Changes in Maude 3.1 (alpha131a) (2020-10-12) ========================================================= * changed messages for ^C seen during suspension * some clang warnings fixed Overview of Changes in Maude 3.1 beta (alpha131) (2020-10-05) ============================================================= * fixed occurs-check bug in unification modulo U and CU * optimizations for unification modulo U and CU * fixed memory leak when trying to use file handle while file handling is disabled * optimization for merging variables during unification which merges towards the smaller sort * two control-C events without intervening rewrites to abort while suspended on external event * variant narrowing based commands no longer report number of rewrites and no unifiers/variants/matchers if there is a problem Overview of Changes in alpha130 (2020-09-22) ============================================ * fixed memory leak in filtered variant unify * fixed variable check bug in filtered variant unify * fixed bug in the meta-printing of strategies * support VariantOptionsSet for descent functions and meta-interpreter messages that use variant unification * fixed a bug in unification modulo identity where the theory purification code assumed the operator was also commutative Overview of Changes in alpha129 (2020-09-09) ============================================ * verbose mode now flags sort decreasing axioms * command line options for enabling dangerous feautures * added irredundant unification * receiving on a socket which closed for writing at the other end returns the empty string the first time rather than closing the socket * irred is an abreviation for irredundant on the command line * fixed stray space when echoing variant unify command * fixed memory leak affecting erroneous case of unification descent functions * added filtered variant unification * added variant matching Overview of Changes in alpha128a (2020-07-06) ============================================= * strategy definitions now support nonexec attribute * fixed bug in metaParseStrategy() and all operator declaration * fixed bug where simple and complex parsers could get out of sync with the auxiliary information leading to crashes * experimental support for processes as external objects * fixed bug where signals such as ^C could be ignored when sockets were used due to a race condition * fixed bug where sockets only supported half duplex operation * fixed bug where Maude could be terminated by SIGPIPE * -no-execute command line option * write half of a socket can now be shutdown * fixed error in -help message * fixed bug in C/U/Ul/Ur unification code that overwrote previous variable -> variable binds and produced non-unifiers * fixed bug where a collapse-up situation was not being warned about because the declaration used a kind * fixed bug in the sort analysis phase which could cause lost ACU unifiers * fixed bug in unifier subsumption check that causes silent memory corruption * fixed symmetric bug in variant subsumption check * handling of order-sorting in elementary A unification now takes systems of equations into account * experimental support for associative-identity unification Overview of Changes in alpha128 (2020-03-09) ============================================ * fixed bug where ascent functions were allowed to proceed on bad modules, resulting in an internal error * fixed bug where illegal use of built-in variable names in variant equations and narrowing rules wasn't being detecting in the functional metalevel * more sophisticated handling of order-sorting in elementary A unification * cleaner handling of ^C in unify and match commands * do clear memo command now takes an optional module * extra functions defined in META-LEVEL * fixed socket close bug Overview of Changes in Maude 3.0 (alpha127a) ============================================ * commented out unused code/data structures * increase default number of BDD variables to 100 * updated comments Overview of Changes in Maude 3.0 beta 1 (alpha127) ================================================== * fixed memory leak in file writing code * support ll as alias for ls -l * many compiler warnings fixed Overview of Changes in alpha126 =============================== * fixed memory leak in failed view instantiation * fixed bug in profiling of condition fragments * fixed bug when comment ended by EOF * Rubén Rafael Rubio Cuéllar's extensions to the strategy language and fuctional reflection of the strategy language integrated * Strategy language supported by meta-interpreter * -erewrite-loop-mode command line option * set print constants with sorts option * bubbles only disallow excluded tokens outside of parens * new variable family based descent functions * metaParse()/metaPretty() support variable aliases * symmetric change in meta-interpreter Overview of Changes in alpha123 ===============================erew <> < me : User | state: 1 > createProcess(processManager, me, "dc", nil, none) . * fixed a bug in module instantiation introduced by the redesigned module system * kludged around a bug in BuDDy Overview of Changes in alpha121 =============================== * fixed a bug where module sums were commuted * fixed a memory leak with module expression syntax errors * fixed a bug where number of sorts from a parameter theory was incorrectly recorded if the module had no regular imports * fixed symmetric bug with operators from a parameter theory * fixed symmetric bug with polymorphic operators from a parameter theory * fixed bug where user declared sort with parameter sort name could confuse module system * summing modules with bound parameters is now supported * parameterization of views is now supported * weird situation with overloaded polymorphic operators that could cause crash now disallowed * fixed recursive view bug Overview of Changes in alpha120 =============================== * fixed memory leak in normalizeTerm() message * fixed double counting of initial eq rewrites and mb application in metaApply()/metaXapply() * added rule application to the meta-interpreter * added single step narrowing with variant unification to the meta-interpreter * added narrowing search with variant unification, with and without path, to the meta-interpreter * Overview of Changes in alpha119 ================================ * smart load "sload" directive * more sort computation messages added to the meta-interpreter * unification and disjoint unification added to the meta-interpreter * fixed fake rewrites from object-message rewriting that were visible in trace/break/profile * variant generation added to the meta-interpreter * fixed mb/eq double counting bugs in metaMatch()/metaXmatch() and getMatch()/getXmatch() * variant unifier generation added to the meta-interpreter * fixed memory leak in metaGetVariant() * pretty printing added to the meta-interpreter * parsing added to the meta-interpreter * fixed physical vs nominal argument index stacking bugs Overview of Changes in alpha118 =============================== * getSearchResult()/getSearchResultAndPath() messages added to meta-interpreter * -show-pid command line option * SIGINFO (SIGUSR1 on Linux) now works immediately when blocked on sockets rather then waiting for next rewrite * fixed memory leaks in metaXmatch() * getMatch()/getXmatch() messages added to meta-interpreter * upperCase()/lowerCase() functions added to fmod STRING * sort computation messages added to the meta-interpreter Overview of Changes in alpha117 =============================== * fixed syntax error location bug in new parser * fixed show view bug * fixed symmetric upView() bug * fixed showModule bug in the meta-interpreter where imports and parameters were omitted * fixed hang when doing an abort from erewrite * fixed crash caused by object-message rewriting with the set clear rules off command * fixed bug where rewriteTerm()/frewriteTerm() in the meta-interpreter did not reset next rule pointers * fixed a bug where modules cached by the metalevel functional metalevel would be incorrectly used by by the meta-interpreter * fixed bug where using the functional metalevel from within the meta-interpreter would pull imports from object level interpreter * fixed bug where using the ascent functions from within the meta-interpreter would pull modules from object level interpreter * added insertView and showView messages to meta-interpreter * meta-interpreter now supports erewriteTerm message * erewrite will check for external events even when internal rewrites are possible * fixed memory leak triggered by bad unify command * loop-mode/pipe edge case reverted to old behavior for IOP * status report in response to SIGINFO (SIGUSR1 on Linux) Overview of Changes in alpha116 =============================== * fixed bug in ctor calculations for associative operators; enforce new ctor consistancy for such operators * fixed related bugs in unifier filtering, variant folding and narrowing folding wrt the handing of abstraction variables * new mixfix parser based on Leo's algorithm fixes many bubble related bugs Overview of Changes in alpha115 =============================== * fixed bug where show mod command output empty parentheses * fixed bug where maude wouldn't compile without SMT support * support for file i/o * support for standard streams * support for lexical level QidList <-> String conversion * no prompting when stdin redirect to read from file * sort Bound and op unbounded have their own fmod Overview of Changes in alpha114 =============================== * more sanity checks at object level and meta level * pretty printer smarter about iterated operator disambiguation * fixed bug where narrowing attribute was not being printed if it was a rule's only attribute * support for Yices2 as the SMT solver backend * fixed bug in CVC4 bindings where passing something other than a positive integer constant for the second argument to divisible produced a crash * asserting nonlinear stuff in CVC4 now produces unknown rather that a crash Overview of Changes in alpha113 =============================== * redesigned/extended vu narrowing functionality Overview of Changes in alpha112b ================================ * fixed bug in AU instantiation code introduced by optimizations in alpha111b * fixed memory corruption bug in class VariantUnificationProblem where the garbage collector runs before object fully initialized Overview of Changes in alpha112a ================================ * support for debug, cont, debug cont in vu-narrow * support for debug, cont, debug cont, incompleteness and printing state and timing information in narrow * support for cont/debug cont in variant unify * support for cont/debug cont in get variants * support for debug and debug cont in srewite * support for debug, cont, debug cont and printing printing state and timing information in smt-search * support for debug and debug cont in search * fixed longstanding family of related performance bugs in the ACU matchers * added bound element variable ACU stripper-collector automaton * added early failure optimization for ACU_LazySubproblem Overview of Changes in alpha112 =============================== * fixed a longstanding bug in the comparison of NatSets that amongst other things broke the LTL -> VWAA conversion in the model checker Overview of Changes in alpha111b ================================ * optimized handling of stacks of states in conditions * optimized construction of free right hand sides * fixed bug where 0 step rewrites module SMT could return unsatisfiable constraints * fixed bug where bindings were being shared between eager and lazy places in both regular narrowing and variant narrowing * fixed bug where narrowing steps and equational rewrites weren't being counted in metaNarrow() * vu-narrow command added * metaNarrowingSearch() descent function added * fixed bug where illegally parameterizing a module by a parameterized module caused a crash Overview of Changes in alpha111a ================================ * fixed bug where variables occuring only in a irreducibility constraint could cause a crash * fixed bug where irreducibility constraint could be ignored * better handled of contexts for metaNarrowingApply() * require that variables that only occur in irreducibility constraint meet safety criteria Overview of Changes in alpha111 =============================== * fixed bug where an ambiguity in a term-hook caused crash in sort computation because module isn't semi-compiled at this point * new narrowing descent function * one of the old narrowing descent functions now supports incompleteness Overview of Changes in Maude 2.7.1 (alpha110b) ============================================== * fixed typos and copyright date * minor configuation fixes Overview of Changes in alpha110a ================================ * fixed bug in ACU unification that was introduced in alpha108 Overview of Changes in alpha110 =============================== * reorganization of unification sort computations * added -print-to-stderr flag * added cycle detection and depth bounds to PIG-PUG * fixed some uninitialized memory reads in SMT code Overview of Changes in alpha109 =============================== * new metalevel interface for variant narrowing * large number of finite variant examples from Jose Meseuger added to the test suite Overview of Changes in alpha108a ================================ * fixed bug in variant narrowing where ground terms caused substitution size mismatch and memory corruption during subsumption check * replacement rope library avoids build problems on Mac Overview of Changes in alpha108 =============================== * new associative unification algorithm based on PIG-PUG * unification infrastructure support for incomplete algorithms * fixed bug in metaGetIrredundantVariant() * fixed bug in variant narrowing where collapse terms were being narrowed with variant equations from the wrong kind Overview of Changes in alpha107 =============================== * fixed bug where asking for the same variant or variant unify twice in succession from the metalevel resulted in memory corruption Overview of Changes in alpha106 =============================== * improvements to linear associative unification integration * fixed bug in SequenceAssignment code (low level associative unification code) Overview of Changes in alpha105 =============================== * experimental support for multi-step search modulo SMT Overview of Changes in alpha104 =============================== * fixed duplicate advisories about missing sorts * fixed missing echoing bug for commands with 2 optional arguments * fixed caching bug for descent functions * experimental support for 1-step rewriting modulo SMT Overview of Changes in alpha103 =============================== * 0/1 is now a valid Rat constant * advisory printed when downTerm() fails because of kind clash * experimental support for calling CVC4 * fixed bug where metaPrettyPrint() was failing to generate needed disambiguation for built-in data types Overview of Changes in alpha102 =============================== * experimental support for linear associative unification Overview of Changes in Maude 2.7 (alpha101) =========================================== * fixed bug with debug text being output during rewriting * MVM now supports _==_ and _=/=_ * incementalized (up to layer level) variant narrowing and unification * --always-advise flag Overview of Changes in alpha100a ================================ * dlmalloc removed (already disabled on most platforms) * MVM now supports non-linear variables * fixed bug with debug text being output during variant narrowing * (binary) Mac version now compiled with Mac Ports toolchain which resolves several issues caused by Apple gcc and flex bugs, including hanging on an end-of-file inside a comment * code cleaning to remove unused code and avoid many compiler warnings Overview of Changes in Maude alpha100 (source trees 97, 98, 99 abandoned) ========================================================================= * added crude Maude VM based interpreter (sreduce) Overview of Changes in Maude alpha96c ===================================== * added unification support for CU, U, Ul and Ur theories * fixed two related bugs where unifying a variable against a variable generating an implicit renaming caused an in-theory occurs check issue leading to non-termination * fixed a bug in the AC/ACU unification code where binding a variable to an alien subterm caused a variety effects including missing unifiers and nontermination * performance fixes for AC/ACU unification where subterms cancel * fixed a GC bug in AC/ACU unification * fixed a bug where printing the empty QID in loop mode caused an out-of-bounds memory read * fixed a bug in the free theory semi-compilation of variant equation left hand sides Overview of Changes in Maude alpha96b ===================================== * fixed bug in variant narrowing of ground terms * fixed memory corruption bug in sockets * the print attribute now flushes its output * fixed a long standing bug where sockets could appear to be dropped on Mac Overview of Changes in Maude alpha96a ===================================== * hack to allow building 64-bit binaries under Darwin * fixed bug in metaGenerateVariant() with singleton substitutions * fixed variable name clash bug in narrowing * support for irreducibility constraints in variant narrowing * support for variant unification Overview of Changes in Maude alpha96 ==================================== * fixed bug in narrowing where unifiers were being eagerly rewritten in place * fixed bug in narrowing caused by abstraction variables * fixed bug in pretty printing of equation attributes * fixed fresh variable clash bug in narrowing * first attempt at supporting variant narrowing Overview of Changes in Maude alpha95c ===================================== * fixed a bug where stale information about fresh variables was not being cleaned up when backing out of a unification branch that generated those variables * a bug where the socket write code was using memory might have been deallocated * patched around apparent weirdness in rope::c_str() Overview of Changes in Maude 2.6 (alpha95b) =========================================== * fixed a bug in the profiler provoked by condition fragments in a command or descent function invocation * more overparsing * avoid unnecessary right id sort checking for commutative symbols Overview of Changes in Maude alpha95a ===================================== * fixed sort bug with new memo mechanism * added MAUDE_META_MODULE_CACHE_SIZE environment variable Overview of Changes in Maude alpha95 ==================================== * fixed bug where tokens starting in . that followed a . that might have, but didn't terminate a statement or command were having their initial . split off * handle collapse down cases in order sorted unification * hash consing used for srewrite * fixed a bug in the ACU matcher where bad solutions could be generated by the lazy red-black algorithm for certain nonlinear patterns * fixed a bug in the module system where errors in modules constructed for module expressions could cause a crash * memo attribute reimplemented using hash consing * a memory corruption bug in the compilation of variant equations whose left hand side is headed by a free function symbol Overview of Changes in Maude alpha94a ===================================== * fixed bug where downTerm() could return terms in the wrong kind * changed handling of operator names that are a single special character * implemented compound cycle breaking for unification * optimizations for ACU unification * changed handling of variable bindings for unification Overview of Changes in Maude alpha94 ==================================== * fixed bug where hash consing wasn't being used for model checking after all. * fixed bug where empty sort declaration crashed show module command * fixed bug where op->op mapping in a theory-view could be ignored if followed by an op->term mapping in another view * fixed bug in upView() where op->term mappings were not being lifted to the metalevel correctly. * fixed potential bug in garbage collection of dags produced by unification if rewriting takes place between the generation of two unifiers * partial implementation of ACU unification. Overview of Changes in Maude 2.5 (alpha93d2) ============================================ * BOOL-OPS split off BOOL in prelude Overview of Changes in Maude alpha93d ===================================== * fixed bug where fail term attachments to polymorphs cause crash * fixed bug where flattened meta-modules produced by upModule() still had parameters Overview of Changes in Maude alpha93c ===================================== * fixed bug where upView was producing bad metaViews Overview of Changes in Maude alpha93b ===================================== * fixed bug in handing of metaRenamings Overview of Changes in Maude alpha93a ===================================== * changed AC constraint propagation algorithm to reduce the risk of exponential blow up at semi-compile time * changed free theory constraint propagation algorithm to reduce the risk of exponential blow up at semi-compile time Overview of Changes in Maude alpha93 ==================================== * fixed performance bug with huge AC/ACU right hand sides * fixed symmetric performace bug in A/AU theory * fixed a A/AU rewriting with extension bug * graceful recovery from tabs in string literals * optimizations for construction of rhs instances * bug where single token op names containing a string part were considered to have mixfix syntax * unification code cleanup and potential bug fixed Overview of Changes in Maude alpha92c ===================================== * fixed metaPrettyPrint() bug in assoc, with paren case * tail recusion elimination for dag node comparison * various low level optimizations Overview of Changes in Maude alpha92b ===================================== * fixed failure to GC in rules only search * fixed unstackable flag bug in CUI theory * first attempt at hash consing for search/model checking * unrewritable/unstackable optimization for search/model checking Overview of Changes in Maude alpha92a ===================================== * fixed BDD variable bug introduced by lazy computation of symbol sort calculation BDDs in alpha92 * fixed bug where free, fresh variables were not constrained to have a valid sort * partly fixed a performance bug in constraint propagaion analysis phase of pattern compilation * partial support for strat in metalevel builtins Overview of Changes in Maude alpha92 ==================================== * fixed a bug in unification sort calculations on polymorphic symbols * if_then_else_fi now uses generic sort mechanism and can give preregularity warnings * fixed module reparsing bug * fixed CUI matcher bug * fixed pending unification stack bug * added rewrite condition fragments to search command * fixed instantiation by theory-view bug * added meta-view syntax and upView() operator * first attempt at meta-interpreter Overview of Changes in Maude 2.4 (alpha91d) =========================================== * fixed AU term normalization bug Overview of Changes in Maude alpha91c ===================================== * Special case optimization for AC/ACU matching with extension Overview of Changes in Maude alpha91b ===================================== * Removed extranous debugging print statement Overview of Changes in Maude alpha91a ===================================== * Now solve diophantine equations over ints rather than mpzs for unification * Extended unify command to handle systems * Added print attribute * Fixed Diophantine solver bug for results over 2^31 - 1 * Install .maude files in the data directory * Fixed free theory discrimination net subsumption bug * Fixed gcc4 incompatibilities * Outlawed overloading operations from a parameter theory * Fixed longstanding stdout/stderr synchonization bugs Overview of Changes in Maude alpha91 ==================================== * fixed bug where natSystemSolve() would lose hooks during importation * fixed bug where unify command was not cleaning up after bad unification problem Overview of Changes in Maude alpha90a ===================================== * added stack overflow handling using libsigsegv * semi-compilation of right hand sides optimized for huge right hand sides * construnction of free theory discrimination nets optimized for large numbers of equations Overview of Changes in Maude alpha90 ==================================== * new unification combination scheme to avoid AC cycling bug * C unification is smarter about avoiding redundant unifiers * reorganized surface syntax parser to allow deeply nested terms * more overparsing Overview of Changes in Maude alpha89j (not released) ==================================================== * fixed bug that cause solved form subproblems to be lost in commutative unification * added single redex per state narrowing option Overview of Changes in Maude alpha89i ===================================== * fixed two bugs which caused narrowing structures not to be deleted * allow multiple calls to cached desent functions with same arguments to be efficient in most cases * added another narrowing descent function Overview of Changes in Maude alpha89h ===================================== * crude support for narrowing * fixed bug with condition fragment collapses during processing * fixed memory leak in AU term collapses Overview of Changes in Maude alpha89g ===================================== * fixed selection from basis bug in AC unification algorithm * allow unification to work on ground terms from unimplemented theories; made recovery in unimplemented cases consistent Overview of Changes in Maude alpha89f ===================================== * fixed bug where large AC dags could get normalized into tree form during unification with resulting chaos * fixed C unification breakage from alpha89c Overview of Changes in Maude alpha89e ===================================== * fixed bug where we were deleting unification subproblems twice * fixed module name in "no module" warning Overview of Changes in Maude alpha89d ===================================== * fixed bug where we were not reserving enough BDD variables for free variable sorts Overview of Changes in Maude alpha89c ===================================== * fixed bug iter theory matching with extension could return a match where the matched portion was alien * added unification with extension * reimplement meta-unification interface to support control over fresh variable names and disjoint unification * allow spaces in file names using \ and "" conventions Overview of Changes in Maude alpha89b ===================================== * fixed bug where early unification failure caused memory corruption Overview of Changes in Maude alpha89a ===================================== * fixed bug where syntax could leave renaming in bad state * fixed bug where were were passing variable->BDD mappings by value rather than by reference * fixed bug where we weren't clear new substitutions in CUI unification * fixed bug where we weren't deleting subproblems in unification problems Overview of Changes in Maude alpha89 ==================================== * fixed bug where new unsorted unifier would not be look for after an unsorted unifier failed to have at least one sorted solution * fixed bug where non-unifiers were generated in deeply nested commutative unification examples * fixed bug where command line files were ignored with -no-prelude flag * use dag solved forms for unification * first support for AC unification Overview of Changes in Maude 2.3 (alpha88f) =========================================== * added commutative unification * fixed free theory instantiation bug * fixed sort calculation of S_Theory terms bug * fixed unification with too many variables bug * added iter theory unification Overview of Changes in alpha88e =============================== * string, qid and float constants allowed in unification * fixed unify f(X, Y) =? f(Y, X) bug Overview of Changes in Maude alpha88d ===================================== * set trace builtin on/off command * state caching in strategy language * first suppport for unification Overview of Changes in Maude alpha88c ===================================== * extra advisories in metalevel * min/max operators in FLOAT * slight change to search semantics * metalevel projection functions now support parameterized metamodules * fixed kind printing bug in metaPrettyPrint() * erwrite supports limit and continue Overview of Changes in Maude alpha88b ===================================== * minor syntactic changes to appease gcc 4.1 * minor importation changes in prelude.maude and model-checker.maude * fixed extension tracing bugs in search/model checker, strategy language and metalevel * revised/extended strategy language; cont now works with srew * fixed trace condition bug Overview of Changes in Maude alpha88a ===================================== * many changes to the prelude to fix unsoundness concerns * process based reimplementation of strategy language * better overparsing for operator declarations * fixed bug with views mapping to terms from FLOAT/STRING/QID * fixed bug in AU unique collapse matcher * fixed bug that allowed parsing of parameterized theories * fixed upModule() bug affecting renamings * fixed metaXmatch() kind bug introduced by alpha86 fix * subset tests for SET and SET* * predefined term ordering module Overview of Changes in Maude alpha88 ==================================== * fixed more sufficient completeness issues * search command now takes a depth bound * added metaNormalize() * added machine ints module Overview of Changes in Maude alpha87a ===================================== * fixed bug in ! strategy combinator * fixed long standing bug in look up code for assoc ops Overview of Changes in Maude alpha87 ==================================== * crude first version of strategy language Overview of Changes in Maude 2.2 (alpha86e) =========================================== * fixed long standing metalevel prec bug Overview of Changes in Maude alpha86d2 ====================================== * reorganized metalevel list sorts to fix sufficient completeness problem Overview of Changes in Maude alpha86d ===================================== * fixed stale pointer bug in view reevaluation * minor fixes to prelude.maude * fixed uninitialized format attribute bug * fixed parameter theory module expression memory leak * fixed polymorph identity memory leak * fixed polymorph identity processing bug * added and used QID-SET fmod * fixed metamodule cache deletion bug * sortLeq and lesserSort now work on types Overview of Changes in Maude alpha86c ===================================== * improved recovery from surface syntax errors * added DEFAULT fth, various views and ARRAY fmod * added LIST-AND-SET fmod * added linear Diophantine solver * warn about object level duplicate attributes * fixed backquote in created module name bug * fixed view ACU op->term mapping bug * added -no-wrap command line option * disallow parameter passing in nonfinal instantiations * allow renaming of modules with bound parameters Overview of Changes in Maude alpha86b ===================================== * module garbage collection bug fixed * metasummation bug fixed * target modules with free parameters no longer allowed in views * illegal importations no longer tolerated * views can no longer map module defined stuff * renamings can no longer map parameter defined stuff * operator mappings now allowed in views * dependency tracking supports views * meta support for parameterization * identity elements added for various structures in prelude Overview of Changes in Maude alpha86a ===================================== * fixed parameter checking bug for modules with both free and bound parameters * structured sorts printed correctly in various places * theory-views now pushed into parameterized sorts * new naming convention for otf modules * bound parameter instantiation now handled like Full Maude * -no-advise command line flag * declined messages to external objects generate advisories Overview of Changes in Maude alpha86 ==================================== * fixed loop mode \/ bug * metaPrettyPrint() now supports options * preregularity and constructor consistancy errors now produce a single informative warning * set trace rewrite and set trace body options * fixed metaXmatch() kind clash bug * SO_REUSEADDR flag set on server sockets * first attempt at parameterization in module system Overview of Changes in Maude alpha85a ===================================== * fixed more sufficient completeness issues in the prelude * metadata attribute now allowed for operator declarations * added crude support for sockets as external objects Overview of Changes in Maude alpha85 ==================================== * added min/max functions to number hierarchy * fixed bug in up'ing FloatOpSymbol hook * fixed sufficient completeness issues in the prelude * fixed a bug in up'ing terms which gave kind variables the wrong sort * glbSorts() now handles kinds * show profile now includes percentages * show path labels command added * metaSearchPath() added * set clear rules on/off command added * maximalAritySet() added Overview of Changes in Maude alpha84d ===================================== * fixed 0.0 ^ -1.0 bug * module selectors now support theories Overview of Changes in Maude alpha84c ===================================== * added random number generation * added counters * trace applications in metaApply()/metaXapply() Overview of Changes in Maude 2.1.1 (alpha84b.2) =============================================== * fixed op renaming bug Overview of Changes in Maude alpha84b.1 ======================================= * fixed AU sort calculation bug Overview of Changes in Maude alpha84b ===================================== * set protect/extend on/off added, BOOL now protected * fixed upModule() bug wrt CUI_NumberSymbol and ACU_NumberSymbol hooks * theory syntax and meta-syntax added * fixed label renaming bug * overparsing added * warnings added for illegal ad hoc overloading * rudimentary checking for bubble hooks * fixed missing id importation bug Overview of Changes in Maude 2.1 (alpha84) ========================================== * added -no-banner flag * fixed bug where syntax errors corrupted memory * added rudimentary test suite Overview of Changes in Maude alpha83a ===================================== * fixed crash that occurred when bubbles are imported * fixed memory corruption when copying persistent representations * fixed crash on imported module overwrite following a descent function failure * simple module expressions are now supported at both the object and metalevel * bashing together unrelated sorts and ops is now legal * added show modules command Overview of Changes in Maude alpha83 ==================================== * made polymorphs explicit with poly attribute * added many new metalevel functions * fixed meta-context iter bug * fixed object level Bubble-Exclude bug * show all/show module now prints specials Overview of Changes in Maude alpha82 ==================================== * fixed crash that occurred when printing redeclaration of sort error from the metalevel * extended quo/rem/gcd/lcm/divides to Rats * made constructor coloring work corectly for iter operators * changed operational semantics of owise equations wrt nondefault operator stategies * fixed bugs in show module/show all commands * fixed metaPrettyPrint kind variable bug * fixed break point with builtin op seg fault * added upTerm() and downTerm() * Infinity/-Infinity now work on FreeBSD & MacOSX * building with Tecla is now optional Overview of Changes in Maude 2.0.1 (alpha81) ============================================ * switched build system to autoconf/automake * many portability fixes * added --help and --version flags * fixed infinite recursion with unary empty syntax bug * internal ordering on Qids is now alphabetical * fixed serious bugs in the ACU matcher Maude-Maude3.2/README000077500000000000000000000006151420036611000142430ustar00rootroot00000000000000This directory contains the Maude 3 interpreter source tree. Copyright 1997-2021 SRI International, Menlo Park, CA 94025, USA. The Maude 3 interpreter is free software. See the file COPYING for copying permission. For documentation and examples, see the Maude website: http://maude.cs.uiuc.edu/ For help using Maude 3: maude-help@maude.cs.uiuc.edu Report bugs to: maude-bugs@maude.cs.uiuc.edu Maude-Maude3.2/aclocal.m4000066400000000000000000001217011420036611000152200ustar00rootroot00000000000000# generated automatically by aclocal 1.16.1 -*- Autoconf -*- # Copyright (C) 1996-2018 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # Copyright (C) 2002-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.16.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.16.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. # TODO: see whether this extra hack can be removed once we start # requiring Autoconf 2.70 or later. AS_CASE([$CONFIG_FILES], [*\'*], [eval set x "$CONFIG_FILES"], [*], [set x $CONFIG_FILES]) shift # Used to flag and report bootstrapping failures. am_rc=0 for am_mf do # Strip MF so we end up with the name of the file. am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ || continue am_dirpart=`AS_DIRNAME(["$am_mf"])` am_filepart=`AS_BASENAME(["$am_mf"])` AM_RUN_LOG([cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles]) || am_rc=$? done if test $am_rc -ne 0; then AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments for automatic dependency tracking. Try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking).]) fi AS_UNSET([am_dirpart]) AS_UNSET([am_filepart]) AS_UNSET([am_mf]) AS_UNSET([am_rc]) rm -f conftest-deps.mk } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking is enabled. # This creates each '.Po' and '.Plo' makefile fragment that we'll need in # order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAKE_INCLUDE() # ----------------- # Check whether make has an 'include' directive that can support all # the idioms we need for our automatic dependency tracking code. AC_DEFUN([AM_MAKE_INCLUDE], [AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out .PHONY: am__doit END am__include="#" am__quote= # BSD make does it like this. echo '.include "confinc.mk" # ignored' > confmf.BSD # Other make implementations (GNU, Solaris 10, AIX) do it like this. echo 'include confinc.mk # ignored' > confmf.GNU _am_result=no for s in GNU BSD; do AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) AS_CASE([$?:`cat confinc.out 2>/dev/null`], ['0:this is the am__doit target'], [AS_CASE([$s], [BSD], [am__include='.include' am__quote='"'], [am__include='include' am__quote=''])]) if test "$am__include" != "#"; then _am_result="yes ($s style)" break fi done rm -f confinc.* confmf.* AC_MSG_RESULT([${_am_result}]) AC_SUBST([am__include])]) AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/ax_have_poll.m4]) Maude-Maude3.2/compile000077500000000000000000000053261420036611000147420ustar00rootroot00000000000000#! /bin/sh # Wrapper for compilers which do not understand `-c -o'. # Copyright 1999, 2000 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Usage: # compile PROGRAM [ARGS]... # `-o FOO.o' is removed from the args passed to the actual compile. prog=$1 shift ofile= cfile= args= while test $# -gt 0; do case "$1" in -o) # configure might choose to run compile as `compile cc -o foo foo.c'. # So we do something ugly here. ofile=$2 shift case "$ofile" in *.o | *.obj) ;; *) args="$args -o $ofile" ofile= ;; esac ;; *.c) cfile=$1 args="$args $1" ;; *) args="$args $1" ;; esac shift done if test -z "$ofile" || test -z "$cfile"; then # If no `-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # `.c' file was seen then we are probably linking. That is also # ok. exec "$prog" $args fi # Name of file we expect compiler to create. cofile=`echo $cfile | sed -e 's|^.*/||' -e 's/\.c$/.o/'` # Create the lock directory. # Note: use `[/.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo $cofile | sed -e 's|[/.-]|_|g'`.d while true; do if mkdir $lockdir > /dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir $lockdir; exit 1" 1 2 15 # Run the compile. "$prog" $args status=$? if test -f "$cofile"; then mv "$cofile" "$ofile" fi rmdir $lockdir exit $status Maude-Maude3.2/config.guess000077500000000000000000001157631420036611000157130ustar00rootroot00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002 Free Software Foundation, Inc. timestamp='2002-09-03' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # This shell variable is my proudest work .. or something. --bje set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ; (old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old) || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ; dummy=$tmpdir/dummy ; files="$dummy.c $dummy.o $dummy.rel $dummy" ; trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; rm -f $files ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; unset files' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit 0 ;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; arc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; macppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme88k:OpenBSD:*:*) echo m88k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvmeppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; pmax:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sgi:OpenBSD:*:*) echo mipseb-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sun3:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; wgrisc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` fi # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. eval $set_cc_for_build cat <$dummy.s .data \$Lformat: .byte 37,100,45,37,120,10,0 # "%d-%x\n" .text .globl main .align 4 .ent main main: .frame \$30,16,\$26,0 ldgp \$29,0(\$27) .prologue 1 .long 0x47e03d80 # implver \$0 lda \$2,-1 .long 0x47e20c21 # amask \$2,\$1 lda \$16,\$Lformat mov \$0,\$17 not \$1,\$18 jsr \$26,printf ldgp \$29,0(\$26) mov 0,\$16 jsr \$26,exit .end main EOF $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then case `$dummy` in 0-0) UNAME_MACHINE="alpha" ;; 1-0) UNAME_MACHINE="alphaev5" ;; 1-1) UNAME_MACHINE="alphaev56" ;; 1-101) UNAME_MACHINE="alphapca56" ;; 2-303) UNAME_MACHINE="alphaev6" ;; 2-307) UNAME_MACHINE="alphaev67" ;; 2-1307) UNAME_MACHINE="alphaev68" ;; 3-1307) UNAME_MACHINE="alphaev7" ;; esac fi rm -f $dummy.s $dummy && rmdir $tmpdir echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit 0;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit 0 ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; DRS?6000:UNIX_SV:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7 && exit 0 ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit 0 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit 0 ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit 0 ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit 0 ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD $dummy.c -o $dummy \ && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 rm -f $dummy.c $dummy && rmdir $tmpdir echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit 0 ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:*:*:PowerMAX_OS) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit 0 ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit 0 ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit 0 ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit 0 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit 0 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit 0 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit 0 ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit 0 ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit 0 ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF $CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 rm -f $dummy.c $dummy && rmdir $tmpdir echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit 0 ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:*:*) echo rs6000-ibm-aix exit 0 ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit 0 ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit 0 ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit 0 ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit 0 ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`$dummy` if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi rm -f $dummy.c $dummy && rmdir $tmpdir fi ;; esac echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit 0 ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 rm -f $dummy.c $dummy && rmdir $tmpdir echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit 0 ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3D:*:*:*) echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) # Determine whether the default compiler uses glibc. eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #if __GLIBC__ >= 2 LIBC=gnu #else LIBC= #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` rm -f $dummy.c && rmdir $tmpdir echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit 0 ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; x86:Interix*:3*) echo i386-pc-interix3 exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i386-pc-interix exit 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit 0 ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` rm -f $dummy.c && rmdir $tmpdir test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0 ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit 0 ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit 0 ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit 0 ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit 0 ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit 0 ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit 0 ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit 0 ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit 0 ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #ifdef __INTEL_COMPILER LIBC=gnu #else LIBC=gnuaout #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` rm -f $dummy.c && rmdir $tmpdir test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit 0 ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit 0 ;; i*86:*:5:[78]*) case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit 0 ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit 0 ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit 0 ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 exit 0 ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit 0 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit 0 ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4.3${OS_REL} && exit 0 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit 0 ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit 0 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit 0 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit 0 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit 0 ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit 0 ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit 0 ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit 0 ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Darwin:*:*) echo `uname -p`-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit 0 ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit 0 ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit 0 ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit 0 ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit 0 ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit 0 ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit 0 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit 0 ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit 0 ;; *:ITS:*:*) echo pdp10-unknown-its exit 0 ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit 0 ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 rm -f $dummy.c $dummy && rmdir $tmpdir # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit 0 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; c34*) echo c34-convex-bsd exit 0 ;; c38*) echo c38-convex-bsd exit 0 ;; c4*) echo c4-convex-bsd exit 0 ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: Maude-Maude3.2/config.h.in000066400000000000000000000067621420036611000154140ustar00rootroot00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* annotate comiler output */ #undef ANNOTATED /* build the experimental integrated compiler */ #undef COMPILER /* enable Darwin specific fixes */ #undef DARWIN /* include dump code */ #undef DUMP /* have conditional move instruction */ #undef HAVE_CMOV /* Define to 1 if you have the header file. */ #undef HAVE_CTYPE_H /* Define to 1 if you have the header file. */ #undef HAVE_IEEEFP_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `rt' library (-lrt). */ #undef HAVE_LIBRT /* Define to 1 if you have the `socket' library (-lsocket). */ #undef HAVE_LIBSOCKET /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_MATH_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_OSTREAM /* Define to 1 if you have the header file. */ #undef HAVE_OSTREAM_H /* use ppoll() */ #undef HAVE_PPOLL /* Define to 1 if you have the header file. */ #undef HAVE_STDDEF_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDIO_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TERMIOS_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* inline and discard selected local functions */ #undef LOCAL_INLINES /* support MOS oracles */ #undef MOS /* don't do runtime checks */ #undef NO_ASSERT /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* The size of `int', as computed by sizeof. */ #undef SIZEOF_INT /* The size of `long', as computed by sizeof. */ #undef SIZEOF_LONG /* The size of `short', as computed by sizeof. */ #undef SIZEOF_SHORT /* The size of `unsigned long', as computed by sizeof. */ #undef SIZEOF_UNSIGNED_LONG /* The size of `void *', as computed by sizeof. */ #undef SIZEOF_VOID_P /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* use CVC4 SMT solver library */ #undef USE_CVC4 /* use libsigsegv to handle segmentation faults */ #undef USE_LIBSIGSEGV /* use Tecla command line editing library */ #undef USE_TECLA /* use Yices2 SMT solver library */ #undef USE_YICES2 /* Version number of package */ #undef VERSION Maude-Maude3.2/config.sub000077500000000000000000000716741420036611000153600ustar00rootroot00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002 Free Software Foundation, Inc. timestamp='2002-09-05' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit 0;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | freebsd*-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k \ | m32r | m68000 | m68k | m88k | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mipsisa32 | mipsisa32el \ | mipsisa64 | mipsisa64el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | ns16k | ns32k \ | openrisc | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xscale | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* \ | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \ | clipper-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* \ | m32r-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39 | mipstx39el \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | tic80-* | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ | xtensa-* \ | ymp-* \ | z8k-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; crds | unos) basic_machine=m68k-crds ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; mmix*) basic_machine=mmix-knuth os=-mmixware ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; or32 | or32-*) basic_machine=or32-unknown os=-coff ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2) basic_machine=i686-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3d) basic_machine=alpha-cray os=-unicos ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic4x | c4x*) basic_machine=tic4x-unknown os=-coff ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; windows32) basic_machine=i386-pc os=-windows32-msvcrt ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele) basic_machine=sh-unknown ;; sh64) basic_machine=sh64-unknown ;; sparc | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* | -powermax*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto*) os=-nto-qnx ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-ibm) os=-aix ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -ptx*) vendor=sequent ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: Maude-Maude3.2/configure000077500000000000000000006406161420036611000153020ustar00rootroot00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for Maude 3.2. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: maude-bugs@lists.cs.illinois.edu about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Maude' PACKAGE_TARNAME='maude' PACKAGE_VERSION='3.2' PACKAGE_STRING='Maude 3.2' PACKAGE_BUGREPORT='maude-bugs@lists.cs.illinois.edu' PACKAGE_URL='' # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS BUILD_COMPILER_FALSE BUILD_COMPILER_TRUE EGREP GREP CXXCPP GCC_LIBS GMP_LIBS LIBSIGSEGV_LIB TECLA_LIBS CVC4_LIB YICES2_LIB BUDDY_LIB FLEX BISON RANLIB am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM host_os host_vendor host_cpu host build_os build_vendor build_cpu build target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir runstatedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL am__quote' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_dependency_tracking with_yices2 with_cvc4 with_tecla with_libsigsegv enable_debug enable_compiler enable_mos ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CXX CXXFLAGS CCC CXXCPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -runstatedir | --runstatedir | --runstatedi | --runstated \ | --runstate | --runstat | --runsta | --runst | --runs \ | --run | --ru | --r) ac_prev=runstatedir ;; -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | --run=* | --ru=* | --r=*) runstatedir=$ac_optarg ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures Maude 3.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/maude] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of Maude 3.2:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --enable-debug no optimization, runtime checks, dump routines [default=no] --enable-compiler build the experimental integrated compiler [default=no] --enable-mos support MOS oracles (DO NOT USE!) [default=no] Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-yices2 use Yices2 SMT solver library [default=yes] --with-cvc4 use CVC4 SMT solver library [default=no] --with-tecla use Tecla command line editing library [default=yes] --with-libsigsegv use libsigsegv to handle segmentation faults [default=yes] Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF Maude configure 3.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES # --------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_cxx_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ----------------------------------------------- ## ## Report this to maude-bugs@lists.cs.illinois.edu ## ## ----------------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_header_mongrel # ac_fn_cxx_try_run LINENO # ------------------------ # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_cxx_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_run # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES # --------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_cxx_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_header_compile # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES # ---------------------------------------------- # Tries to find the compile-time value of EXPR in a program that includes # INCLUDES, setting VAR accordingly. Returns whether the value could be # computed ac_fn_cxx_compute_int () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) >= 0)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_lo=0 ac_mid=0 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_hi=$ac_mid; break else as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) < 0)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_hi=-1 ac_mid=-1 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_lo=$ac_mid; break else as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_hi=$ac_mid else as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in #(( ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; '') ac_retval=1 ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 static long int longval () { return $2; } static unsigned long int ulongval () { return $2; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if (($2) < 0) { long int i = longval (); if (i != ($2)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != ($2)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : echo >>conftest.val; read $3 config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by Maude $as_me 3.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # # Allow directory names that look like macros. # # # Local macros. # # # Figure out system we are building for and set $host shell variable. # ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # # Initialize automake stuff. # am__api_version='1.16' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='maude' VERSION='3.2' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi # # Cause defines to be put in a header file rather than passed as # compiler flags. # ac_config_headers="$ac_config_headers config.h" # # If the user set CFLAGS or CXXFLAGS we leave them alone. # Otherwise we set them to -g -Wall to stop AC_PROG_CC and # AC_PROG_CXX from setting them. # USER_SET_CFLAGS=yes if (test -z "$CFLAGS") then USER_SET_CFLAGS=no CFLAGS="-g -Wall" fi USER_SET_CXXFLAGS=yes if (test -z "$CXXFLAGS") then USER_SET_CXXFLAGS=no CXXFLAGS="-g -Wall" fi # # *** PROGRAMS *** # ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 $as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; } cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out .PHONY: am__doit END am__include="#" am__quote= # BSD make does it like this. echo '.include "confinc.mk" # ignored' > confmf.BSD # Other make implementations (GNU, Solaris 10, AIX) do it like this. echo 'include confinc.mk # ignored' > confmf.GNU _am_result=no for s in GNU BSD; do { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } case $?:`cat confinc.out 2>/dev/null` in #( '0:this is the am__doit target') : case $s in #( BSD) : am__include='.include' am__quote='"' ;; #( *) : am__include='include' am__quote='' ;; esac ;; #( *) : ;; esac if test "$am__include" != "#"; then _am_result="yes ($s style)" break fi done rm -f confinc.* confmf.* { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 $as_echo "${_am_result}" >&6; } # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi if (test "$GXX" = yes) then { $as_echo "$as_me:${as_lineno-$LINENO}: checking g++ compiler version" >&5 $as_echo_n "checking g++ compiler version... " >&6; } GXX_VERSION=`$CXX -dumpversion` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GXX_VERSION" >&5 $as_echo "$GXX_VERSION" >&6; } fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi if (test -z "$BISON") then BISON="bison" fi if (test -z "$FLEX") then FLEX="flex" fi # # *** SYSTEM CALLS *** # { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ppoll(2)" >&5 $as_echo_n "checking for ppoll(2)... " >&6; } if ${ax_cv_have_ppoll+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { int rc; rc = poll((struct pollfd *)(0), 0, 0); rc = ppoll((struct pollfd *)(0), 0, (struct timespec const *)(0), (sigset_t const *)(0)); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ax_cv_have_ppoll=yes else ax_cv_have_ppoll=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi if test "${ax_cv_have_ppoll}" = "yes"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_PPOLL /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # # *** LIBRARIES *** # # # Figure out what libraries need to be linked in to use sockets. # #AC_CHECK_LIB(nsl, inet_addr) # Adds unnecessary dependencies to the binaries in Linux { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 $as_echo_n "checking for socket in -lsocket... " >&6; } if ${ac_cv_lib_socket_socket+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char socket (); int main () { return socket (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_socket=yes else ac_cv_lib_socket_socket=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 $as_echo "$ac_cv_lib_socket_socket" >&6; } if test "x$ac_cv_lib_socket_socket" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSOCKET 1 _ACEOF LIBS="-lsocket $LIBS" fi # # Check if user set particular Buddy library to use and if # not set default. # if (test -z "$BUDDY_LIB") then BUDDY_LIB="-lbdd" fi # # Check to see if we should use Yices2 for SMT solving. # # Check whether --with-yices2 was given. if test "${with_yices2+set}" = set; then : withval=$with_yices2; WITH_YICES2=$withval else WITH_YICES2=yes fi if (test $WITH_YICES2 = yes) then # # Check if user set a particular Yices2 library to use and if # not set default. # $as_echo "#define USE_YICES2 /**/" >>confdefs.h if (test -z "$YICES2_LIB") then YICES2_LIB="-lyices" fi else YICES2_LIB="" fi # # Check to see if we should use CVC4 for SMT solving. # # Check whether --with-cvc4 was given. if test "${with_cvc4+set}" = set; then : withval=$with_cvc4; WITH_CVC4=$withval else WITH_CVC4=no fi if (test $WITH_CVC4 = yes) then # # Check if user set a particular CVC4 library to use and if # not set default. # $as_echo "#define USE_CVC4 /**/" >>confdefs.h if (test -z "$CVC4_LIB") then CVC4_LIB="-lcvc4" fi # # CVC4 needs the clock_gettime() function from the POSIX Realtime Extensions library. # { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 $as_echo_n "checking for clock_gettime in -lrt... " >&6; } if ${ac_cv_lib_rt_clock_gettime+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char clock_gettime (); int main () { return clock_gettime (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_clock_gettime=yes else ac_cv_lib_rt_clock_gettime=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 $as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBRT 1 _ACEOF LIBS="-lrt $LIBS" fi else CVC4_LIB="" fi # # Check to see if we should use Tecla for command line editing. # # Check whether --with-tecla was given. if test "${with_tecla+set}" = set; then : withval=$with_tecla; WITH_TECLA=$withval else WITH_TECLA=yes fi if (test $WITH_TECLA = yes) then # # Check if user set particular Tecla libraries to use and if # not set defaults. # $as_echo "#define USE_TECLA /**/" >>confdefs.h if (test -z "$TECLA_LIBS") then TECLA_LIBS="-ltecla -lcurses" fi else TECLA_LIBS="" fi # # Check to see if we should use libsigsegv to handle segmentation faults. # # Check whether --with-libsigsegv was given. if test "${with_libsigsegv+set}" = set; then : withval=$with_libsigsegv; WITH_LIBSIGSEGV=$withval else WITH_LIBSIGSEGV=yes fi if (test $WITH_LIBSIGSEGV = yes) then # # Check if user set particular libsigsegv to use and if # not set default. # $as_echo "#define USE_LIBSIGSEGV /**/" >>confdefs.h if (test -z "$LIBSIGSEGV_LIB") then LIBSIGSEGV_LIB="-lsigsegv" fi else LIBSIGSEGV_LIB="" fi # # Check if user set particular GMP libraries to use and if # not set defaults. # if (test -z "$GMP_LIBS") then GMP_LIBS="-lgmpxx -lgmp" fi # # Check if the user set particular GCC libraries to use - otherwise # let the compiler pick. # if (test -z "$GCC_LIBS") then GCC_LIBS="" fi # # *** HEADERS *** # ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_header_time=yes else ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in sys/time.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" if test "x$ac_cv_header_sys_time_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_TIME_H 1 _ACEOF fi done for ac_header in math.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "math.h" "ac_cv_header_math_h" "$ac_includes_default" if test "x$ac_cv_header_math_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MATH_H 1 _ACEOF fi done for ac_header in ieeefp.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "ieeefp.h" "ac_cv_header_ieeefp_h" "$ac_includes_default" if test "x$ac_cv_header_ieeefp_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_IEEEFP_H 1 _ACEOF fi done for ac_header in sys/termios.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "sys/termios.h" "ac_cv_header_sys_termios_h" "$ac_includes_default" if test "x$ac_cv_header_sys_termios_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_TERMIOS_H 1 _ACEOF fi done for ac_header in stddef.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "stddef.h" "ac_cv_header_stddef_h" "$ac_includes_default" if test "x$ac_cv_header_stddef_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDDEF_H 1 _ACEOF fi done for ac_header in limits.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default" if test "x$ac_cv_header_limits_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIMITS_H 1 _ACEOF fi done for ac_header in stdlib.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDLIB_H 1 _ACEOF fi done for ac_header in stdio.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default" if test "x$ac_cv_header_stdio_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDIO_H 1 _ACEOF fi done for ac_header in ctype.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "ctype.h" "ac_cv_header_ctype_h" "$ac_includes_default" if test "x$ac_cv_header_ctype_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_CTYPE_H 1 _ACEOF fi done for ac_header in unistd.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" if test "x$ac_cv_header_unistd_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_UNISTD_H 1 _ACEOF fi done for ac_header in ostream do : ac_fn_cxx_check_header_mongrel "$LINENO" "ostream" "ac_cv_header_ostream" "$ac_includes_default" if test "x$ac_cv_header_ostream" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_OSTREAM 1 _ACEOF fi done for ac_header in ostream.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "ostream.h" "ac_cv_header_ostream_h" "$ac_includes_default" if test "x$ac_cv_header_ostream_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_OSTREAM_H 1 _ACEOF fi done # # *** SIZES *** # # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 $as_echo_n "checking size of short... " >&6; } if ${ac_cv_sizeof_short+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then : else if test "$ac_cv_type_short" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (short) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_short=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 $as_echo "$ac_cv_sizeof_short" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_SHORT $ac_cv_sizeof_short _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 $as_echo_n "checking size of int... " >&6; } if ${ac_cv_sizeof_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : else if test "$ac_cv_type_int" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (int) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_int=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 $as_echo "$ac_cv_sizeof_int" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_INT $ac_cv_sizeof_int _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 $as_echo_n "checking size of long... " >&6; } if ${ac_cv_sizeof_long+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : else if test "$ac_cv_type_long" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 $as_echo "$ac_cv_sizeof_long" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG $ac_cv_sizeof_long _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 $as_echo_n "checking size of unsigned long... " >&6; } if ${ac_cv_sizeof_unsigned_long+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then : else if test "$ac_cv_type_unsigned_long" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (unsigned long) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_unsigned_long=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5 $as_echo "$ac_cv_sizeof_unsigned_long" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 $as_echo_n "checking size of void *... " >&6; } if ${ac_cv_sizeof_void_p+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then : else if test "$ac_cv_type_void_p" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (void *) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_void_p=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 $as_echo "$ac_cv_sizeof_void_p" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_VOID_P $ac_cv_sizeof_void_p _ACEOF # # Check to see if we are debugging. # If we are not debugging, assume we are optimizing. # # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then : enableval=$enable_debug; DEBUGGING=$enableval else DEBUGGING=no fi if (test "$DEBUGGING" = yes) then $as_echo "#define DUMP /**/" >>confdefs.h else $as_echo "#define NO_ASSERT /**/" >>confdefs.h $as_echo "#define LOCAL_INLINES /**/" >>confdefs.h # # Set compiler optimization flags if user didn't set CXXFLAGS. # if (test "$GXX" = yes) then OFLAGS="-O2 -fomit-frame-pointer -fforce-addr" case $GXX_VERSION in 3.*) OFLAGS="$OFLAGS -finline-limit=10000" ;; 4.*) OFLAGS="$OFLAGS -finline-limit=10000" ;; esac else OFLAGS="-O" fi if (test $USER_SET_CFLAGS = no) then CFLAGS="$CFLAGS $OFLAGS" fi if (test $USER_SET_CXXFLAGS = no) then CXXFLAGS="$CXXFLAGS $OFLAGS" fi # # Performance tweaks for known hosts. # TWEAKFLAGS="" case $host in sparc-*) # # We assume the v8 instruction set as a baseline in order to # have multiplication and division instructions (gcc defaults # to v7 which does not) but schedule for a more recent v9 # implementation. # TWEAKFLAGS="-march=v8 -mtune=ultrasparc" ;; *-darwin*) # # Changing the stack boundary causes problems on x86 Macs. # ;; # # For the Intel x86 family we select the smallest stack alignment # in order to trade speed for memory on deeply recursive calls. # The Pentium Pro and later have conditional move instructions, # which out-perform various bit twiddling tricks, but gcc will # only use them if given -march=i686. # i386-*) TWEAKFLAGS="-march=i386 -mpreferred-stack-boundary=2" ;; i486-*) TWEAKFLAGS="-march=i486 -mpreferred-stack-boundary=2" ;; i586-*) TWEAKFLAGS="-march=i586 -mpreferred-stack-boundary=2" ;; i686-*) TWEAKFLAGS="-march=i686 -mpreferred-stack-boundary=2" if (test $USER_SET_CXXFLAGS = no) then $as_echo "#define HAVE_CMOV /**/" >>confdefs.h fi ;; # # The x86-64 supports conditional moves and gcc will use # them without being given additional flags. Smallest legal # stack alignment is 4. # x86_64-*) TWEAKFLAGS="-mpreferred-stack-boundary=4" $as_echo "#define HAVE_CMOV /**/" >>confdefs.h ;; # # The DEC Alpha supports conditional moves and gcc will use # them without being given additional flags. # alpha*) $as_echo "#define HAVE_CMOV /**/" >>confdefs.h ;; esac if (test $USER_SET_CFLAGS = no) && (test $GCC = yes) then CFLAGS="$CFLAGS $TWEAKFLAGS" fi if (test $USER_SET_CXXFLAGS = no) && (test $GXX = yes) then CXXFLAGS="$CXXFLAGS $TWEAKFLAGS" fi fi # # Fixes for known hosts. # FIXFLAGS="" case $host in # # Needed to handle +/- infinity and underflow without # causing a SIGFPE. # alpha*) FIXFLAGS="-mieee" ;; # # (no longer deal with dlmalloc) # x86_64-*-linux-*) ;; # # (no longer deal with dlmalloc) # *-darwin*) $as_echo "#define DARWIN /**/" >>confdefs.h ;; esac if (test $USER_SET_CFLAGS = no) && (test $GCC = yes) then CFLAGS="$CFLAGS $FIXFLAGS" fi if (test $USER_SET_CXXFLAGS = no) && (test $GXX = yes) then CXXFLAGS="$CXXFLAGS $FIXFLAGS" fi # # Needed defines. # # Check to see if we should build the compiler. # # Check whether --enable-compiler was given. if test "${enable_compiler+set}" = set; then : enableval=$enable_compiler; COMPILER=$enableval else COMPILER=no fi if (test "$COMPILER" = yes) then $as_echo "#define COMPILER /**/" >>confdefs.h $as_echo "#define ANNOTATED /**/" >>confdefs.h fi # # Check to see if we should support MOS oracles. # # Check whether --enable-mos was given. if test "${enable_mos+set}" = set; then : enableval=$enable_mos; MOS=$enableval else MOS=no fi if (test "$MOS" = yes) then $as_echo "#define MOS /**/" >>confdefs.h fi # # Conditional compilation and linking. # if test $COMPILER = yes; then BUILD_COMPILER_TRUE= BUILD_COMPILER_FALSE='#' else BUILD_COMPILER_TRUE='#' BUILD_COMPILER_FALSE= fi ac_config_files="$ac_config_files Makefile src/Makefile src/Utility/Makefile src/Parser/Makefile src/Temporal/Makefile src/Interface/Makefile src/Core/Makefile src/Variable/Makefile src/NA_Theory/Makefile src/ACU_Persistent/Makefile src/ACU_Theory/Makefile src/AU_Persistent/Makefile src/AU_Theory/Makefile src/CUI_Theory/Makefile src/S_Theory/Makefile src/FreeTheory/Makefile src/Higher/Makefile src/BuiltIn/Makefile src/IO_Stuff/Makefile src/ObjectSystem/Makefile src/Meta/Makefile src/FullCompiler/Makefile src/StrategyLanguage/Makefile src/Mixfix/Makefile src/SMT/Makefile src/Main/Makefile tests/Makefile tests/BuiltIn/Makefile tests/Meta/Makefile tests/Misc/Makefile tests/ResolvedBugs/Makefile tests/StrategyLanguage/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_COMPILER_TRUE}" && test -z "${BUILD_COMPILER_FALSE}"; then as_fn_error $? "conditional \"BUILD_COMPILER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by Maude $as_me 3.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ Maude config.status 3.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/Utility/Makefile") CONFIG_FILES="$CONFIG_FILES src/Utility/Makefile" ;; "src/Parser/Makefile") CONFIG_FILES="$CONFIG_FILES src/Parser/Makefile" ;; "src/Temporal/Makefile") CONFIG_FILES="$CONFIG_FILES src/Temporal/Makefile" ;; "src/Interface/Makefile") CONFIG_FILES="$CONFIG_FILES src/Interface/Makefile" ;; "src/Core/Makefile") CONFIG_FILES="$CONFIG_FILES src/Core/Makefile" ;; "src/Variable/Makefile") CONFIG_FILES="$CONFIG_FILES src/Variable/Makefile" ;; "src/NA_Theory/Makefile") CONFIG_FILES="$CONFIG_FILES src/NA_Theory/Makefile" ;; "src/ACU_Persistent/Makefile") CONFIG_FILES="$CONFIG_FILES src/ACU_Persistent/Makefile" ;; "src/ACU_Theory/Makefile") CONFIG_FILES="$CONFIG_FILES src/ACU_Theory/Makefile" ;; "src/AU_Persistent/Makefile") CONFIG_FILES="$CONFIG_FILES src/AU_Persistent/Makefile" ;; "src/AU_Theory/Makefile") CONFIG_FILES="$CONFIG_FILES src/AU_Theory/Makefile" ;; "src/CUI_Theory/Makefile") CONFIG_FILES="$CONFIG_FILES src/CUI_Theory/Makefile" ;; "src/S_Theory/Makefile") CONFIG_FILES="$CONFIG_FILES src/S_Theory/Makefile" ;; "src/FreeTheory/Makefile") CONFIG_FILES="$CONFIG_FILES src/FreeTheory/Makefile" ;; "src/Higher/Makefile") CONFIG_FILES="$CONFIG_FILES src/Higher/Makefile" ;; "src/BuiltIn/Makefile") CONFIG_FILES="$CONFIG_FILES src/BuiltIn/Makefile" ;; "src/IO_Stuff/Makefile") CONFIG_FILES="$CONFIG_FILES src/IO_Stuff/Makefile" ;; "src/ObjectSystem/Makefile") CONFIG_FILES="$CONFIG_FILES src/ObjectSystem/Makefile" ;; "src/Meta/Makefile") CONFIG_FILES="$CONFIG_FILES src/Meta/Makefile" ;; "src/FullCompiler/Makefile") CONFIG_FILES="$CONFIG_FILES src/FullCompiler/Makefile" ;; "src/StrategyLanguage/Makefile") CONFIG_FILES="$CONFIG_FILES src/StrategyLanguage/Makefile" ;; "src/Mixfix/Makefile") CONFIG_FILES="$CONFIG_FILES src/Mixfix/Makefile" ;; "src/SMT/Makefile") CONFIG_FILES="$CONFIG_FILES src/SMT/Makefile" ;; "src/Main/Makefile") CONFIG_FILES="$CONFIG_FILES src/Main/Makefile" ;; "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; "tests/BuiltIn/Makefile") CONFIG_FILES="$CONFIG_FILES tests/BuiltIn/Makefile" ;; "tests/Meta/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Meta/Makefile" ;; "tests/Misc/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Misc/Makefile" ;; "tests/ResolvedBugs/Makefile") CONFIG_FILES="$CONFIG_FILES tests/ResolvedBugs/Makefile" ;; "tests/StrategyLanguage/Makefile") CONFIG_FILES="$CONFIG_FILES tests/StrategyLanguage/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. # TODO: see whether this extra hack can be removed once we start # requiring Autoconf 2.70 or later. case $CONFIG_FILES in #( *\'*) : eval set x "$CONFIG_FILES" ;; #( *) : set x $CONFIG_FILES ;; #( *) : ;; esac shift # Used to flag and report bootstrapping failures. am_rc=0 for am_mf do # Strip MF so we end up with the name of the file. am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ || continue am_dirpart=`$as_dirname -- "$am_mf" || $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$am_mf" : 'X\(//\)[^/]' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$am_mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` am_filepart=`$as_basename -- "$am_mf" || $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$am_mf" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` { echo "$as_me:$LINENO: cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles" >&5 (cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } || am_rc=$? done if test $am_rc -ne 0; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "Something went wrong bootstrapping makefile fragments for automatic dependency tracking. Try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). See \`config.log' for more details" "$LINENO" 5; } fi { am_dirpart=; unset am_dirpart;} { am_filepart=; unset am_filepart;} { am_mf=; unset am_mf;} { am_rc=; unset am_rc;} rm -f conftest-deps.mk } ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi Maude-Maude3.2/configure.ac000077500000000000000000000233631420036611000156560ustar00rootroot00000000000000# Process this file with autoconf to produce a configure script. # # Initialize autoconf stuff. # AC_INIT(Maude, 3.2, [maude-bugs@lists.cs.illinois.edu]) # # Allow directory names that look like macros. # m4_pattern_allow([AU_Persistent]) m4_pattern_allow([AU_Theory]) # # Local macros. # AC_CONFIG_MACRO_DIRS([m4]) # # Figure out system we are building for and set $host shell variable. # AC_CANONICAL_HOST # # Initialize automake stuff. # AM_INIT_AUTOMAKE # # Cause defines to be put in a header file rather than passed as # compiler flags. # AC_CONFIG_HEADER(config.h) # # If the user set CFLAGS or CXXFLAGS we leave them alone. # Otherwise we set them to -g -Wall to stop AC_PROG_CC and # AC_PROG_CXX from setting them. # USER_SET_CFLAGS=yes if (test -z "$CFLAGS") then USER_SET_CFLAGS=no CFLAGS="-g -Wall" fi USER_SET_CXXFLAGS=yes if (test -z "$CXXFLAGS") then USER_SET_CXXFLAGS=no CXXFLAGS="-g -Wall" fi # # *** PROGRAMS *** # AC_PROG_CC AC_PROG_CXX if (test "$GXX" = yes) then AC_MSG_CHECKING([g++ compiler version]) GXX_VERSION=`$CXX -dumpversion` AC_MSG_RESULT($GXX_VERSION) fi AC_PROG_RANLIB if (test -z "$BISON") then BISON="bison" fi AC_SUBST(BISON) if (test -z "$FLEX") then FLEX="flex" fi AC_SUBST(FLEX) # # *** SYSTEM CALLS *** # AX_HAVE_PPOLL(AC_DEFINE([HAVE_PPOLL], [], [use ppoll()])) # # *** LIBRARIES *** # # # Figure out what libraries need to be linked in to use sockets. # #AC_CHECK_LIB(nsl, inet_addr) # Adds unnecessary dependencies to the binaries in Linux AC_CHECK_LIB(socket, socket) # # Check if user set particular Buddy library to use and if # not set default. # if (test -z "$BUDDY_LIB") then BUDDY_LIB="-lbdd" fi AC_SUBST(BUDDY_LIB) # # Check to see if we should use Yices2 for SMT solving. # AC_ARG_WITH(yices2, AC_HELP_STRING([--with-yices2], [use Yices2 SMT solver library [default=yes]]), [WITH_YICES2=$withval], [WITH_YICES2=yes]) if (test $WITH_YICES2 = yes) then # # Check if user set a particular Yices2 library to use and if # not set default. # AC_DEFINE([USE_YICES2], [], [use Yices2 SMT solver library]) if (test -z "$YICES2_LIB") then YICES2_LIB="-lyices" fi AC_SUBST(YICES2_LIB) else YICES2_LIB="" fi # # Check to see if we should use CVC4 for SMT solving. # AC_ARG_WITH(cvc4, AC_HELP_STRING([--with-cvc4], [use CVC4 SMT solver library [default=no]]), [WITH_CVC4=$withval], [WITH_CVC4=no]) if (test $WITH_CVC4 = yes) then # # Check if user set a particular CVC4 library to use and if # not set default. # AC_DEFINE([USE_CVC4], [], [use CVC4 SMT solver library]) if (test -z "$CVC4_LIB") then CVC4_LIB="-lcvc4" fi AC_SUBST(CVC4_LIB) # # CVC4 needs the clock_gettime() function from the POSIX Realtime Extensions library. # AC_CHECK_LIB(rt, clock_gettime) else CVC4_LIB="" fi # # Check to see if we should use Tecla for command line editing. # AC_ARG_WITH(tecla, AC_HELP_STRING([--with-tecla], [use Tecla command line editing library [default=yes]]), [WITH_TECLA=$withval], [WITH_TECLA=yes]) if (test $WITH_TECLA = yes) then # # Check if user set particular Tecla libraries to use and if # not set defaults. # AC_DEFINE([USE_TECLA], [], [use Tecla command line editing library]) if (test -z "$TECLA_LIBS") then TECLA_LIBS="-ltecla -lcurses" fi else TECLA_LIBS="" fi AC_SUBST(TECLA_LIBS) # # Check to see if we should use libsigsegv to handle segmentation faults. # AC_ARG_WITH(libsigsegv, AC_HELP_STRING([--with-libsigsegv], [use libsigsegv to handle segmentation faults [default=yes]]), [WITH_LIBSIGSEGV=$withval], [WITH_LIBSIGSEGV=yes]) if (test $WITH_LIBSIGSEGV = yes) then # # Check if user set particular libsigsegv to use and if # not set default. # AC_DEFINE([USE_LIBSIGSEGV], [], [use libsigsegv to handle segmentation faults]) if (test -z "$LIBSIGSEGV_LIB") then LIBSIGSEGV_LIB="-lsigsegv" fi else LIBSIGSEGV_LIB="" fi AC_SUBST(LIBSIGSEGV_LIB) # # Check if user set particular GMP libraries to use and if # not set defaults. # if (test -z "$GMP_LIBS") then GMP_LIBS="-lgmpxx -lgmp" fi AC_SUBST(GMP_LIBS) # # Check if the user set particular GCC libraries to use - otherwise # let the compiler pick. # if (test -z "$GCC_LIBS") then GCC_LIBS="" fi AC_SUBST(GCC_LIBS) # # *** HEADERS *** # AC_LANG(C++) AC_HEADER_TIME AC_CHECK_HEADERS(sys/time.h) AC_CHECK_HEADERS(math.h) AC_CHECK_HEADERS(ieeefp.h) AC_CHECK_HEADERS(sys/termios.h) AC_CHECK_HEADERS(stddef.h) AC_CHECK_HEADERS(limits.h) AC_CHECK_HEADERS(stdlib.h) AC_CHECK_HEADERS(stdio.h) AC_CHECK_HEADERS(ctype.h) AC_CHECK_HEADERS(unistd.h) AC_CHECK_HEADERS(ostream) AC_CHECK_HEADERS(ostream.h) # # *** SIZES *** # AC_CHECK_SIZEOF(short) AC_CHECK_SIZEOF(int) AC_CHECK_SIZEOF(long) AC_CHECK_SIZEOF(unsigned long) AC_CHECK_SIZEOF(void *) # # Check to see if we are debugging. # If we are not debugging, assume we are optimizing. # AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [no optimization, runtime checks, dump routines [default=no]]), [DEBUGGING=$enableval], [DEBUGGING=no]) if (test "$DEBUGGING" = yes) then AC_DEFINE([DUMP], [], [include dump code]) else AC_DEFINE([NO_ASSERT], [], [don't do runtime checks]) AC_DEFINE([LOCAL_INLINES], [], [inline and discard selected local functions]) # # Set compiler optimization flags if user didn't set CXXFLAGS. # if (test "$GXX" = yes) then OFLAGS="-O2 -fomit-frame-pointer -fforce-addr" case $GXX_VERSION in 3.*) OFLAGS="$OFLAGS -finline-limit=10000" ;; 4.*) OFLAGS="$OFLAGS -finline-limit=10000" ;; esac else OFLAGS="-O" fi if (test $USER_SET_CFLAGS = no) then CFLAGS="$CFLAGS $OFLAGS" fi if (test $USER_SET_CXXFLAGS = no) then CXXFLAGS="$CXXFLAGS $OFLAGS" fi # # Performance tweaks for known hosts. # TWEAKFLAGS="" case $host in sparc-*) # # We assume the v8 instruction set as a baseline in order to # have multiplication and division instructions (gcc defaults # to v7 which does not) but schedule for a more recent v9 # implementation. # TWEAKFLAGS="-march=v8 -mtune=ultrasparc" ;; *-darwin*) # # Changing the stack boundary causes problems on x86 Macs. # ;; # # For the Intel x86 family we select the smallest stack alignment # in order to trade speed for memory on deeply recursive calls. # The Pentium Pro and later have conditional move instructions, # which out-perform various bit twiddling tricks, but gcc will # only use them if given -march=i686. # i386-*) TWEAKFLAGS="-march=i386 -mpreferred-stack-boundary=2" ;; i486-*) TWEAKFLAGS="-march=i486 -mpreferred-stack-boundary=2" ;; i586-*) TWEAKFLAGS="-march=i586 -mpreferred-stack-boundary=2" ;; i686-*) TWEAKFLAGS="-march=i686 -mpreferred-stack-boundary=2" if (test $USER_SET_CXXFLAGS = no) then AC_DEFINE([HAVE_CMOV], [], [have conditional move instruction]) fi ;; # # The x86-64 supports conditional moves and gcc will use # them without being given additional flags. Smallest legal # stack alignment is 4. # x86_64-*) TWEAKFLAGS="-mpreferred-stack-boundary=4" AC_DEFINE([HAVE_CMOV], [], [have conditional move instruction]) ;; # # The DEC Alpha supports conditional moves and gcc will use # them without being given additional flags. # alpha*) AC_DEFINE([HAVE_CMOV], [], [have conditional move instruction]) ;; esac if (test $USER_SET_CFLAGS = no) && (test $GCC = yes) then CFLAGS="$CFLAGS $TWEAKFLAGS" fi if (test $USER_SET_CXXFLAGS = no) && (test $GXX = yes) then CXXFLAGS="$CXXFLAGS $TWEAKFLAGS" fi fi # # Fixes for known hosts. # FIXFLAGS="" case $host in # # Needed to handle +/- infinity and underflow without # causing a SIGFPE. # alpha*) FIXFLAGS="-mieee" ;; # # (no longer deal with dlmalloc) # x86_64-*-linux-*) ;; # # (no longer deal with dlmalloc) # *-darwin*) AC_DEFINE([DARWIN], [], [enable Darwin specific fixes]) ;; esac if (test $USER_SET_CFLAGS = no) && (test $GCC = yes) then CFLAGS="$CFLAGS $FIXFLAGS" fi if (test $USER_SET_CXXFLAGS = no) && (test $GXX = yes) then CXXFLAGS="$CXXFLAGS $FIXFLAGS" fi # # Needed defines. # # Check to see if we should build the compiler. # AC_ARG_ENABLE(compiler, AC_HELP_STRING([--enable-compiler], [build the experimental integrated compiler [default=no]]), [COMPILER=$enableval], [COMPILER=no]) if (test "$COMPILER" = yes) then AC_DEFINE([COMPILER], [], [build the experimental integrated compiler]) AC_DEFINE([ANNOTATED], [], [annotate comiler output]) fi # # Check to see if we should support MOS oracles. # AC_ARG_ENABLE(mos, AC_HELP_STRING([--enable-mos], [support MOS oracles (DO NOT USE!) [default=no]]), [MOS=$enableval], [MOS=no]) if (test "$MOS" = yes) then AC_DEFINE([MOS], [], [support MOS oracles]) fi # # Conditional compilation and linking. # AM_CONDITIONAL(BUILD_COMPILER, test $COMPILER = yes) AC_CONFIG_FILES([Makefile src/Makefile src/Utility/Makefile src/Parser/Makefile src/Temporal/Makefile src/Interface/Makefile src/Core/Makefile src/Variable/Makefile src/NA_Theory/Makefile src/ACU_Persistent/Makefile src/ACU_Theory/Makefile src/AU_Persistent/Makefile src/AU_Theory/Makefile src/CUI_Theory/Makefile src/S_Theory/Makefile src/FreeTheory/Makefile src/Higher/Makefile src/BuiltIn/Makefile src/IO_Stuff/Makefile src/ObjectSystem/Makefile src/Meta/Makefile src/FullCompiler/Makefile src/StrategyLanguage/Makefile src/Mixfix/Makefile src/SMT/Makefile src/Main/Makefile tests/Makefile tests/BuiltIn/Makefile tests/Meta/Makefile tests/Misc/Makefile tests/ResolvedBugs/Makefile tests/StrategyLanguage/Makefile ]) AC_OUTPUT Maude-Maude3.2/depcomp000077500000000000000000000275331420036611000147450ustar00rootroot00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects # Copyright 1999, 2000 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # `libtool' can also be set to `yes' or `no'. if test -z "$depfile"; then base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'` dir=`echo "$object" | sed 's,/.*$,/,'` if test "$dir" = "$object"; then dir= fi # FIXME: should be _deps on DOS. depfile="$dir.deps/$base" fi tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. This file always lives in the current directory. # Also, the AIX compiler puts `$object:' at the start of each line; # $object doesn't have directory information. stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" outname="$stripped.o" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1="$dir.libs/$base.lo.d" tmpdepfile2="$dir.libs/$base.d" "$@" -Wc,-MD else tmpdepfile1="$dir$base.o.d" tmpdepfile2="$dir$base.d" "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi if test -f "$tmpdepfile1"; then tmpdepfile="$tmpdepfile1" else tmpdepfile="$tmpdepfile2" fi if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a space and a tab in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. We will use -o /dev/null later, # however we can't do the remplacement now because # `-o $object' might simply not be used IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M "$@" -o /dev/null $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; -*) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 Maude-Maude3.2/doc/000077500000000000000000000000001420036611000141235ustar00rootroot00000000000000Maude-Maude3.2/doc/alpha132.txt000066400000000000000000000177031420036611000162070ustar00rootroot00000000000000Alpha 132 release notes ======================== Bug fixes ========== (1) A bug where Maude warns about non-unary iter symbols but doesn't patch up the situation and produces nonsense results or crashes: fmod TEST is sorts Foo . op f : Foo Foo -> Foo [iter] . op g : -> Foo [iter] . ops a b c : -> Foo . endfm red f(a, b) . red g . If the assoc attribute is given as well, there is no warning, just a crash: fmod TEST is sorts Foo . op f : Foo Foo -> Foo [assoc iter] . ops a b c : -> Foo . endfm red f(a, b) . (1a) A symmetric bug in the code that handles polymorphic operators: fmod TEST is sorts Foo Foo2 Foo3 Foo4 Bar . subsorts Foo < Foo2 < Foo3 < Foo4 . op f : Universal Universal -> Universal [poly (0 1 2) iter] . op g : -> Universal [poly (0) iter] . ops a b c : -> Foo . endfm red f(a, b) . red g . fmod TEST is sorts Foo Foo2 Foo3 Foo4 Bar . subsorts Foo < Foo2 < Foo3 < Foo4 . op f : Universal Universal -> Universal [poly (0 1 2) assoc iter] . ops a b c : -> Foo . endfm red f(a, b) . (2) A bug where Maude does not check that the domain and range kinds of a iter operator are equal resulting in a crash: fmod TEST is sorts Foo Foo2 Foo3 Foo4 Bar . subsorts Foo < Foo2 < Foo3 < Foo4 . op f : Foo -> Bar [iter] . op g : Bar -> Foo [iter] . ops a b c : -> Foo . ops x y z : -> Bar . endfm red f(a) . red g(x) . (2a) A similar bug in the code that handles polymorphic operators: fmod TEST is sorts Foo Foo2 Foo3 Foo4 Bar . subsorts Foo < Foo2 < Foo3 < Foo4 . op f : Universal -> Foo [poly (1) iter] . op g : Foo -> Universal [poly (0) iter] . ops a b c : -> Foo . ops x y z : -> Bar . endfm red f(x) . red g(a) . (3) A bug where Maude doesn't look at comm, idem and id: attributes if it sees an iter attribute: fmod TEST is sort Foo . op f : Foo -> Foo [iter comm id: a idem] . ops a b c : -> Foo . endfm red f(a) . red f(f(a)) . (4) A bug where Maude doesn't accept flattened prefix syntax for polymorphic associative operators: fmod ASSOC is op f : Poly Poly -> Poly [assoc poly (1 2 0)] . endfm red f(X:Bool, Y:Bool, Z:Bool) . (5) A bug where Maude doesn't accept f^n(...) syntax for for polymorphic iter operators: fmod ITER is op f : Poly -> Poly [iter poly (1 0) ] . endfm red f^12345(X:Bool) . (6) Removed stray debugging output that had the form saw from code for getVariantUnifier()/getDisjointVariantUnifier() messages in meta-interpreter. (7) A bug the normalization (exclamation mark) operator of the strategy language where α ! did not finish if α can be executed infinitely many times in a loop, while the equivalent expression (according to the manual) α * ; not(α) did. Found by Paul M. Krogmeier and fixed by Rubén. New features ============= (1) Meta-interpreters can now be run in a separate process. This is done by passing the option op newProcess : -> InterpreterOption [ctor] . as the last argument to createInterpreter() Meta-interpreters running in a separate process use the same API as meta-interpreters runing in the original process with all the necessary IPC being hidden from the user. However there are both advantages and limitations: (a) A meta-interpreter running in a separate process does not halt the parent interpreter when a request is sent to it. If you have a multi-core processor the OS may schedule the new process on a different core for true parallelism. You can have many meta-interpreters each in their own process, as a way of splitting a computation over multiple cores. If the top level interpreter has no local rewrites to do while it is waiting for messages, it will suspend to avoid busy waiting. (b) Bad request messages sent to such a meta-interpreter are removed from the configuration (since the badness cannot be detected in the process where the configuration resides) and replaced with an error message when they are detected as bad in the new process: op interpreterError : Oid Oid String -> Msg [ctor msg format (r o)] . Eventually I plan refactor the code and make all meta-interpreters work this way since it seems more informative. (c) The count of rewrites done in such a meta-interpreter are reported in the reply message but not added to the grand total in the top level interpreter. I'm not sure this is the best solution so it may change in the future. (d) Debugging, break points and tracing is not supported in such a meta-interpreter. Debugging concurrent processes on a single terminal is something that even gdb avoids. Control-C does not interrupt such a meta-interpreter. (e) The print attribute is not supported for such a meta-interpreter. This may change in the future. (f) Profiling is not supported for such a meta-interpreter. This may change in the future. (g) Such a meta-interpreter can be sent a quit() message, even if it is stuck in a long or infinite computation. (h) Such a meta-interpreter can run a meta-meta-interpreter in a new process. Currently there is a limitation, that if such a process gets stuck in a long or infinite computation, it can only be made to quit by the meta-interpreter that created it. In principle nesting meta^k-interpreters in new processes can be done to an arbitrary depth (see russianDollsFlatProc.maude in the test suite), with the same limitation on quitting long or infinite computations. (i) If the process of a meta-interpreter unexpectedly exits, a message op interpreterExit : Oid Oid String -> Msg [ctor msg format (r o)] . is sent to the object that created the meta-interpreter. In particular, this allows handling situations such as "Stack overflow." and "Internal error." arising in the meta-interpreter. (j) Messages on stderr from such a meta-intepreter are interleaved with the stderr output from the top-level interpreter, just as if it were actually running in the same process. This may change in the future. (k) Such meta-interpreters support pipelining, in that multiple requests can be sent without waiting for a reply. However the order in which requests are removed from the configuration and the order in which replies arrive in the configuration is undefined. So you should not do a reduceTerm() until you have seen the insertedModule() reply for the module you are working in. Furthermore, deciding which reply corresponds to which request is the user's problem. Finally, only the current "in flight" message is buffered over and above the buffering provided by the OS socket mechanism, so if a socket is busy, requests will stay in the configuration until they can be sent. (2) The vu-narrow command has a new syntax: debug {} vu-narrow {} [, ] in : . The debug, {}, {}, [, ] and in : parts are all optional. Multiple options inside {}s are separated by commas. Currently there is one narrowing option: fold which does folded narrowing. Currently there are two variant unification options: delay, filter where delay doesn't look at any variant unifier until all have been generated so any subsumed by variant folding are eliminated and filter does an extra filtering by variant subsumption step on surviving variant unifiers. Other changes ============== (1) Extra information occasionally produced when the set verbose on . option is used is now sent to stderr rather than stdout. The rationale is to have all out-of-band messages go to the same place to ease management of such messages in meta-interpreters. (2) For vu-narrow, two pieces of verbose information are produced: the total number of states seen and the total number of states on which narrowing was attempted. The latter can be smaller than the former because states were eliminated by folding before they were considered for narrowing or because narrowing from them would have violated the depth bound. Also as a temporary hack, details of when one state subsumes another are printed; this may become a tracing option in the future. Maude-Maude3.2/doc/alpha133.txt000066400000000000000000000250751420036611000162110ustar00rootroot00000000000000Alpha 133 release notes ======================== Bug fixes ========== (1) A GMP/long long int issue that prevented compiling on 32-bit platforms. (2) Bugs in processing of strategies in parameterized views, found and fixed by Rubén. See /tests/StrategyLanguage/parameterization.maude (3) A bug where the irredundant prefix to the unify command was not being echoed. (4) A bug where when Maude suspended waiting for events on multiple file descriptors there was a chance that some of the file descriptors would be ignored. This only affects builds using the pselect() based code which is used on platforms where ppoll() is not available such as Mac. Found by Yati Phyo (yatiphyo@jaist.ac.jp). (5) The hook op-hook startSymbol (start : ~> Base) was missing from file.maude with the result that setPosition() could not use the start of a file as the base for seeking. (6) A bug in irredundant unifier generation where the last variable in each unifier was not checked for subsumption. In principle this might lose unifiers that are irredundant but it is hard to find a case where it does. (7) A bug in irredundant unifier generation where the creation of multiple order-sorted unifiers from a single unsorted unifier by destructively replacing variables conflicted with the retention of previous unifiers needed for unifier filtering. This destructive update mechanism, while fast, could also occasionally produce denormalized bindings because the order of variables under an AC symbol for example, depends on the sorts of those variables, and so has been removed. Illustrated by the following example where irredundant unification prunes two unifiers that are not redundant. fmod ASSOC-LIST is sorts Elt Pair Triple List . subsort Elt Pair Triple < List . op __ : List List -> List [assoc] . op __ : Elt Elt -> Pair [assoc] . op __ : Elt Pair -> Triple [assoc] . op __ : Pair Elt -> Triple [assoc] . op rev : List -> List . vars A B C X Y Z : List . vars P Q R : Pair . vars E F G : Elt . vars S T U V : Triple . endfm unify S T =? A B . irred unify S T =? A B . Changes ======== (1) An optimization for A- and AU-unification where constraints on variables are propagated into variables occurring in their assignments. This avoids the situation where a finitary problem becomes infinitary after substitution. An example of this is: fmod ASSOC-LIST is sorts Elt Pair List . subsort Elt Pair < List . op __ : List List -> List [assoc] . op __ : Elt Elt -> Pair [assoc] . op rev : List -> List . vars A B C X Y Z : List . vars P Q R : Pair . vars E F G : Elt . endfm unify P =? X Y /\ A P =? P B . Here both equations have finite solutions but if the first equation is solved by putting P |-> X Y and then this is substituted into the second equation without propagating the constraint on P into X and Y, the second equation now becomes infinitary. (2) An optimization that attempts to reduce the number of redundant AU-unifiers where one or more variables is assigned the identity. A-unifiers are necessarily AU-unifiers, and since identity elements are removed from words, the only AU-unifiers that are not A-unifiers are those where one or more variables is assigned identity. So AU- unification is done by nondeterministically deciding which variables should take identity, simplifying and solving the A-unification. However it may be that assigning identity to some or all variables is unnecessary because it can be shown that a more general unifier exists. For example: fmod FOO is sort Foo . ops 1 a : -> Foo . op __ : Foo Foo -> Foo [assoc id: 1] . vars W X Y Z : Foo . endfm unify W =? Y Z . Previously Maude would generate: Unifier 1 W --> #1:Foo #2:Foo Y --> #1:Foo Z --> #2:Foo Unifier 2 W --> #1:Foo Y --> 1 Z --> #1:Foo Unifier 3 W --> #1:Foo Y --> #1:Foo Z --> 1 Unifier 4 W --> 1 Y --> 1 Z --> 1 But only the first unifier is needed, as is shown by: irred unify W =? Y Z . Of course sometimes identity assignments are needed so they can't always be discarded; for example irred unify a W =? X Y . Unifier 1 W --> #2:Foo #1:Foo X --> a #2:Foo Y --> #1:Foo Unifier 2 W --> #1:Foo X --> 1 Y --> a #1:Foo Here Unifier 2 shows that an identity assignment to X is needed. The new optimization computes an over-approximation of the set of variables that need to be considered for identity assignments. However if the identity axiom is sort decreasing rather than sort preserving, this optimization is disabled because some of the unifiers that are redundant in the unsorted problem might be needed for completeness in the order-sorted problem. This can happen because the more general unsorted unifier is unsortable: fmod FOO2 is sorts Lo Hi . subsort Lo < Hi . op 1 : -> Lo . op __ : Hi Hi -> Hi [assoc id: 1] . vars W X Y Z : Lo . endfm unify W =? Y Z . Here the most general unifier is eliminated and two of the previously redundant unifiers are needed: irred unify W =? Y Z . Another reason this can happen is because while the more general unifier can be sorted, its sorting leaves it unable to subsume unifiers that it subsumes in the unsorted problem. fmod FOO3 is sorts Lo Hi . subsort Lo < Hi . op 1 : -> Hi . op __ : Hi Hi -> Hi [assoc id: 1] . op __ : Lo Lo -> Lo [ditto] . vars W X : Lo . vars Y Z : Hi . endfm unify W =? Y Z . Here all three unifers generated by the naive algorithm are needed: irred unify W =? Y Z . One might seek to detect these situations by considering the constraints on variables generated by the sort structure rather than a blanket disabling of the optimization. However the constraints on variables are considered advice from the order-sorted analysis to the unsorted unification algorithm and need not capture all the possible ways failure can happen at the order-sorted level. This optimization is also disabled if the system, after simplification has nonlinear unconstrained variables since the associative unification algorithm that we are relying on to generate the more general unifiers may be incomplete in this case. (3) An optimization for AU-unification that attempts to eliminate syntactic or equatity steps from the underlying PIG-PUG algorithm to avoid generating redundant unifiers. Consider: fmod FOO is sort Foo . ops 1 a : -> Foo . op __ : Foo Foo -> Foo [assoc id: 1] . vars W X Y Z : Foo . endfm unify W X =? Y Z . While the previous optimization might avoid unnecessary identity assignments, the PIG-PUG algorithm will generate the 3 unifiers that are needed in the A-unification. Unifier 1 W --> #2:Foo #3:Foo X --> #1:Foo Y --> #2:Foo Z --> #3:Foo #1:Foo Unifier 2 W --> #1:Foo X --> #3:Foo #2:Foo Y --> #1:Foo #3:Foo Z --> #2:Foo Unifier 3 W --> #1:Foo X --> #2:Foo Y --> #1:Foo Z --> #2:Foo However because we have an identity element, the last unifier is an instance of both of the first two unifiers. In general, during the PIG-PUG algorithm, equality steps are tried last, and the optimization checks either of the other moves have already made a more general unifier. As with the previous optimization, it is only done if the identity axiom is sort preserving for much the same reasons. Also it is only done if the equation is linear (this might be relaxed somewhat in the future). Finally it is only done for the last equation if a system of equations is being solved. The reason is that at the time PIG-PUG is used we have dealt with identity once and for all on that branch. So we are generating A-unifiers, although we are reducing them to a set that is complete wrt AU rather than A. However solving another equation wrt to A could fail, because while we are assuming the new variables introduced by PigPug can take identity, we are no longer making identity assignments on that branch. For example: unify W X =? Y Z /\ W X =? a a . Here neither of the first two unifiers for W X =? Y Z result in an A-unifier of the second equations. So with no identity assignments there is a irredundant unifier: irred unify W X =? Y Z /\ W X =? a a . Unifier 1 W --> a X --> a Y --> a Z --> a that we would miss. (4) The meta-interpreter code has been refactored so that meta-interpreters running in the original process have the same error behavior as meta-interpreters running in a new process. In particular, a message formed from a legal meta-interpreter message constructor with the first argument being the name of an existing meta-interpreter external object will always be accepted by that meta-intepreter even if the other arguments are erroneous in some way, rather than leaving the erroneous message in the configuration. In the case of an error, the meta-interpreter will reply with an interpreterError() message such as: interpreterError(me, interpreter(0), "Bad type.") The message strings currently used are: "Bad module." "Bad module name." "Bad view." "Bad view name." "Bad type." "Bad type list." "Bad target sort." "Bad kind.", "Bad operator name.", "Bad variable declarations.", "Bad term." "Bad limit." "Bad gas." "Bad option." "Bad flag." "Bad rule application." "Bad matching problem." "Bad unification problem." "Bad narrowing problem." "Bad narrowing search problem." "Bad variable family." "Bad reducibility constraint." "Bad search." "Bad strategy." "Bad solution number." "Bad token list." These are intended for user information rather than to be used programmatically and may change in the future. Note that message strings that do not end in a period such as "Too many open files" are generated by the operating system and are merely reported by Maude when a system call fails which can happen for meta-interpreters running in a new process, if for example, file descriptors cannot be allocated for the sockets needed communicate with the new process. (5) The file API error behavior has changed so that correctly addressed messages with appropriate message constructors are always accepted and if there is a problem with other message arguments an fileError() reply is generated. Possible message strings are: "Bad mode." "Bad file name." "File operations disabled." "Bad characters." "File not open for writing." "File not open for reading." "Bad size." "Bad offset." "Bad base." As with meta-interpreters, message strings that do not end in a period such as "No such file or directory" are generated by the operating system. (6) There is a new message pair in the file API: op removeFile : Oid Oid String -> Msg [ctor msg format (b o)] . op removedFile : Oid Oid -> Msg [ctor msg format (m o)] . removeFile() can only be sent to the fileManager object and removes the named file. It uses the unlink() system call that can fail for a variety of reasons with failures returned as fileError() messages. Maude-Maude3.2/doc/alpha134.txt000066400000000000000000000303101420036611000161760ustar00rootroot00000000000000Alpha 134 release notes ======================== New feature ============ There is a initial attempt an a API for time: mod TIME is protecting INT . protecting STRING . including CONFIGURATION . sorts TimerMode Date Time TimeZoneInfo . ops oneShot periodic : -> TimerMode [ctor] . op _\_\_ : NzNat NzNat NzNat -> Date [ctor] . op _:_:_ : Nat Nat Nat -> Time [ctor] . op [_,_,_,_] : String String Int Int -> TimeZoneInfo [ctor] . op timer : Nat -> Oid [ctor] . op getTimeSinceEpoch : Oid Oid -> Msg [ctor msg format (b o)] . op gotTimeSinceEpoch : Oid Oid Nat -> Msg [ctor msg format (m o)] . op getDateAndTime : Oid Oid Nat -> Msg [ctor msg format (b o)] . op gotDateAndTime : Oid Oid Date Time NzNat NzNat -> Msg [ctor msg format (m o)] . op getLocalDateAndTime : Oid Oid Nat -> Msg [ctor msg format (b o)] . op gotLocalDateAndTime : Oid Oid Date Time NzNat NzNat TimeZoneInfo -> Msg [ctor msg format (m o)] . op createTimer : Oid Oid -> Msg [ctor msg format (b o)] . op createdTimer : Oid Oid Oid -> Msg [ctor msg format (m o)] . op startTimer : Oid Oid TimerMode NzNat -> Msg [ctor msg format (b o)] . op startedTimer : Oid Oid -> Msg [ctor msg format (m o)] . op timeOut : Oid Oid -> Msg [ctor msg format (r o)] . op stopTimer : Oid Oid -> Msg [ctor msg format (b o)] . op stoppedTimer : Oid Oid -> Msg [ctor msg format (m o)] . op deleteTimer : Oid Oid -> Msg [ctor msg format (b o)] . op deletedTimer : Oid Oid -> Msg [ctor msg format (m o)] . op timeError : Oid Oid String -> Msg [ctor msg format (r o)] . op timeManager : -> Oid [special (...)] . *** *** Time unit conversion. *** var N : Nat . op _us : Nat -> Nat . eq N us = 1000 * N . op _ms : Nat -> Nat . eq N ms = 1000000 * N . op _seconds : Nat -> Nat . eq N seconds = 1000000000 * N . endm While the underlying system calls use a variety of time units, all time values are in nanoseconds except for time zones which by convention are specified in seconds from the Prime Meridian. The rationale for using nanoseconds is to have a single consistent unit, and for future proofing since machines will get faster and newer system calls will likely have improved resolution. Newer system calls such as pselect(), ppoll() and clock_gettime() already use nanoseconds. The is an external object timeManger. Sending it the message getTimeSinceEpoch() results in a reply gotTimeSinceEpoch() where the last argument is the number of nanoseconds since the Unix Epoch (00:00:00 UTC on 1 January 1970). Realistically, computers synchronizing their time via ntp will only be accurate to a few tens of milliseconds. However for measuring the time difference between two such message exchanges, say for timing an interval, significantly higher accuracy is expected. Conversion from nanoseconds since the Unix Epoch to more conventional date and time representations is handled by the message pairs: op getDateAndTime : Oid Oid Nat -> Msg [ctor msg format (b o)] . op gotDateAndTime : Oid Oid Date Time NzNat NzNat -> Msg [ctor msg format (m o)] . and op getLocalDateAndTime : Oid Oid Nat -> Msg [ctor msg format (b o)] . op gotLocalDateAndTime : Oid Oid Date Time NzNat NzNat TimeZoneInfo -> Msg [ctor msg format (m o)] . The former converts to Coordinated Universal Time (UTC) while the latter converts to the local time zone. Dates are represented using: op _\_\_ : NzNat NzNat NzNat -> Date [ctor] . where the arguments are year (1969,...), month (1 - 12) and day (1 - 31). It would have been nicer to use the ISO convention of - as the separator but that runs into ambiguity with subtraction. Likewise using | would run into ambiguity with the OR operator and / would run into ambiguity with the divison operator from fmod RAT. Times are represented using: op _:_:_ : Nat Nat Nat -> Time [ctor] . where the arguments are hour (0 - 23), minute (0 - 59), and second (0 - 60). The value of 60 for the second only arises with leap-seconds. The next two arguments in both gotDateAndTime() and gotLocalDateAndTime() are NzNats representing day-of-the-year (1 - 366) with 366 only arising in leap-years and day-of-the-week (1 = Sunday,..., 7 = Saturday). gotLocalDateAndTime() also returns TimeZoneInfo: op [_,_,_,_] : String String Int Int -> TimeZoneInfo [ctor] . Here the first two arguments are the abbreviations for the names of the standard time and daylight saving time for the time zone. The second of these can be the empty string if there is no daylight saving time for the time zone. The next argument is the time zone specified specified as an offset in seconds from UTC. This number is negative for time zones west of the Prime Meridian to the International Date Line and positive for time zones east of the Prime Meridian to the International Date Line. Note that this number of seconds does not take daylight saving into account. The final Int argument is the value returned by the POSIX library call localtime() to indicate whether daylight savings time is in effect. According to POSIX, +ve indicates in effect, 0 indicates not in effect and -ve indicates the information is not available. However the MacOS manual does not mention the possibility of a -ve value and from the source code for the GNU Standard C Library I see that the only possible values are 0 or 1 on Linux. Note that both message pairs only handle a non-negative number of nanoseconds since the Unix Epoch because POSIX does not require the underlying library functions to do anything sensible with negative values. The upper bound on the number of nanoseconds that can be converted depends on the platform. For platforms where the time_t data type is a signed 32-bit number, the Year 2038 problem comes into play. For platforms where the time_t data is a signed 64-bit number, other limits such as the maximum representable year (1900 + 2^32 - 1) come into play. Since the rules regarding daylight savings time may change in the future for a given locale, doing local date and time conversions for dates far into the future is uncertain at best. Possible timeError() messages are: "Time out-of-range." "Bad time." It is also possible to get an error message from the C library if the year cannot be represented. Here is an example that gets the nanoseconds since the Unix Epoch and converts it into both UTC and local time: load time mod TEST is inc TIME . op myClass : -> Cid . ops me : -> Oid . op run : -> Configuration . eq run = <> < me : myClass | none > getTimeSinceEpoch(timeManager, me) . vars O O2 : Oid . var N : Nat . rl < O : myClass | none > gotTimeSinceEpoch(O, O2, N) => < O : myClass | none > getDateAndTime(O2, O, N) getLocalDateAndTime(O2, O, N). endm erew run . Here is an example that sends the getTimeSinceEpoch() twice in succession to measure the time between fair rewriting traversals: load time mod TEST2 is inc TIME . op myClass : -> Cid . ops me : -> Oid . op prevTime:_ : Nat -> Attribute . op interval:_ : Nat -> Attribute . op run : -> Configuration . eq run = <> < me : myClass | none > getTimeSinceEpoch(timeManager, me) . vars O O2 : Oid . var N N2 : Nat . rl < O : myClass | none > gotTimeSinceEpoch(O, O2, N) => < O : myClass | prevTime: N > getTimeSinceEpoch(timeManager, me) . rl < O : myClass | prevTime: N > gotTimeSinceEpoch(O, O2, N2) => < O : myClass | interval: (N2 - N) > . endm erew run . On my machine I usually get at number between 10,000 and 20,000 or 10-20 microseconds. As well as timeManger, there are more ephemeral external objects called timers that can be used to generate timeOut() messages at a given future time. Timer objects are created by communicating with timeManager using the message pair: op createTimer : Oid Oid -> Msg [ctor msg format (b o)] . op createdTimer : Oid Oid Oid -> Msg [ctor msg format (m o)] . The final argument of createdTimer() is the Oid of a timer object which looks like timer(n). A timer is started using the message pair: op startTimer : Oid Oid TimerMode NzNat -> Msg [ctor msg format (b o)] . op startedTimer : Oid Oid -> Msg [ctor msg format (m o)] . Here TimerMode is either oneShot for a single timeOut() message after which the timer enters a quiescent state, from which it may be restarted at a later time or periodic in which case the timer sends a series of timeOut() messages until it is stopped, deleted or restarted. The NzNat argument specifies the time to count down from, and which, in periodic mode is reset after it reaches zero. In periodic mode, if a given timeOut() message is delayed for some reason, it does not impact the time at which future timeOut() messages will be delivered. Note that periodic mode is somewhat dangerous since the configuration can quickly fill with timeOut messages and if the countdown start time is too short (say < 500 ms) it can be hard to enter two control-C interrupts on the same suspension to cause Maude to stop. If a startTimer() message is sent to a running timer, its current countdown time and mode are forgotten and it restarts fresh with the new parameters. A running timer can be returned to quiescent state with the message pair: op stopTimer : Oid Oid -> Msg [ctor msg format (b o)] . op stoppedTimer : Oid Oid -> Msg [ctor msg format (m o)] . Finally a timer (running or quiescent) can be deleted with the message pair: op deleteTimer : Oid Oid -> Msg [ctor msg format (b o)] . op deletedTimer : Oid Oid -> Msg [ctor msg format (m o)] . Note that there is necessarily a race condition when sending a message to a running timer, since the timeOut() message may be emitted before the incoming message is received. For this reason it is legal to send a stopTimer() message to a quiescent timer since it may have been running in oneShot mode and may have just timed out. The shortest allowed start time is 1 nanosecond. The longest allowed start time is 2^63 - 1 nanoseconds or about 292 years. Note that internally, times are converted into wall clock times so on 32-bit systems subject to the Year 2038 problem, timers (along with many other things!) will stop working in the year 2038. As with other external objects, Maude only returns to the command line after all pending external messages have arrived and there are no local rewrites available. Possible timeError() messages are: "Bad timer start value." "Bad timer mode." Here is an example that creates and starts 3 timers. The first is periodic, the second is oneShot that has a timeOut() after two timeOuts() from the first timer. The third timer is also oneShot and stops the first time after 4 further timeOut()s. load time load file mod TEST is inc TIME . inc STD-STREAM . op myClass : -> Cid . ops me : -> Oid . op firstTimer : Oid -> Attribute . op secondTimer : Oid -> Attribute . op thirdTimer : Oid -> Attribute . op run : -> Configuration . eq run = <> < me : myClass | none > createTimer(timeManager, me) . vars O O2 O3 O4 O5 : Oid . var N : Nat . rl < O : myClass | none > createdTimer(O, O2, O3) => < O : myClass | firstTimer(O3) > createTimer(timeManager, me) . rl < O : myClass | firstTimer(O3) > createdTimer(O, O2, O4) => < O : myClass | firstTimer(O3), secondTimer(O4) > createTimer(timeManager, me) . rl < O : myClass | firstTimer(O3), secondTimer(O4) > createdTimer(O, O2, O5) => < O : myClass | firstTimer(O3), secondTimer(O4), thirdTimer(O5) > startTimer(O3, me, periodic, 500 ms) startTimer(O4, me, oneShot, 1250 ms) startTimer(O5, me, oneShot, 3250 ms). rl < O : myClass | firstTimer(O3), secondTimer(O4), thirdTimer(O5) > timeOut(O, O3) => < O : myClass | firstTimer(O3), secondTimer(O4), thirdTimer(O5) > write(stdout, O, "time out for first timer\n") . rl < O : myClass | firstTimer(O3), secondTimer(O4), thirdTimer(O5) > timeOut(O, O4) => < O : myClass | firstTimer(O3), secondTimer(O4), thirdTimer(O5) > write(stdout, O, "time out for second timer\n") . rl < O : myClass | firstTimer(O3), secondTimer(O4), thirdTimer(O5) > timeOut(O, O5) => < O : myClass | firstTimer(O3), secondTimer(O4), thirdTimer(O5) > write(stdout, O, "time out for third timer\n") stopTimer(O3, O) . rl < O : myClass | firstTimer(O3), secondTimer(O4), thirdTimer(O5) > stoppedTimer(O, O3) => < O : myClass | none > deleteTimer(O3, O) deleteTimer(O4, O) deleteTimer(O5, O) . endm erew run . Steven Maude-Maude3.2/doc/alpha135.txt000066400000000000000000000234341420036611000162100ustar00rootroot00000000000000Alpha 135 release notes ======================== Bug fix ======== A bug in deleteTimer() that caused the interpreter to be left in an inconsistent state resulting in a crash on the next rewrite command. Triggered by: load time mod TEST is inc TIME . op myClass : -> Cid . ops me : -> Oid . vars O O2 O3 : Oid . rl < O : myClass | none > createdTimer(O, O2, O3) => < O : myClass | none > deleteTimer(O3, me) . endm erew <> < me : myClass | none > createTimer(timeManager, me) . red 0 . New feature ============ The getLine() message for the external object stdin is now (mostly) nonblocking. Thus other computations can take place while Maude is waiting for the user's response. This is achieved by using a child process to read from terminal (if stdin not a terminal, the behavior is unchanged from earlier versions). It is possible for the running program to cancel a getLine() currently in progress using the message pair: op cancelGetLine : Oid Oid -> Msg [ctor msg format (b o)] . op canceledGetLine : Oid Oid -> Msg [ctor msg format (b o)] . If there is no getLine() currently in progress, cancelGetLine() is quietly discarded otherwise there is a race between cancelGetLine() and the user entering a line. cancelGetLine() is deemed to have won if it manages to kill the child process before it exits normally, and a canceledGetLine() message is returned. In this case the original getLine() will never receive a response. Otherwise if the child process exits normally, a gotLine() message is returned as normal and the cancelGetLine() never receives a response. Having only the winner of the race receive a reply is a little at odds with Maude's normal convention, but it seems both easier to implement and easier to program with - the reply from the winner is matched to determine the future execution of the program and the user doesn't have to bother matching and discarding a reply from the loser - recall that object-message rewriting requires lhs patterns to consist one object and one message. In this case getLine() and cancelGetLine() are closely related and are in direct opposition, so an exception seems reasonable. Here is an example that illustrates the race between getLine() and cancelGetLine() and also the race between timeOut() and stopTimer(). Note that it relies on the new semantics of stopTimer() - see below. load file load time mod TEST is pr CONVERSION . pr RANDOM . inc STD-STREAM . inc TIME . ops #questions timeLimit upperBound : -> Nat . eq #questions = 5 . eq timeLimit = 3 seconds . eq upperBound = 100 . op myClass : -> Cid . ops me : -> Oid . ops stop next : -> Attribute . op timer : Oid -> Attribute . ops asked score answer : Nat -> Attribute . vars O O2 O3 : Oid . var A : AttributeSet . var S : String . vars N M X Y : Nat . op run : -> Configuration . eq run = <> < me : myClass | asked(0), score(0) > write(stdout, me, "\nAddition Test\n-------------\n") . op number : Nat -> Nat . eq number(N) = 1 + (random(N) rem upperBound) . op conv : String -> Nat . eq conv(S) = rat(substr(S, 0, length(S) - 1), 10) . rl < O : myClass | A, asked(0) > wrote(O, O2) => < O : myClass | A, asked(0) > createTimer(timeManager, O) . rl < O : myClass | A > createdTimer(O, O2, O3) => < O : myClass | A, timer(O3) > startTimer(O3, O, oneShot, timeLimit) . *** cycle starts here when a startedTimer() message is received crl < O : myClass | A, asked(N) > startedTimer(O, O2) => < O : myClass | A, asked(N + 1), answer(X + Y) > getLine(stdin, O, "What is " + string(X, 10) + " + " + string(Y, 10) + " ? ") if X := number(2 * N) /\ Y := number(2 * N + 1) . *** if timeOut() while we were waiting for an answer we try to cancelGetLine() rl < O : myClass | A, answer(X) > timeOut(O, O2) => < O : myClass | A, answer(X) > cancelGetLine(stdin, O) . *** cancelGetLine() won rl < O : myClass | A, answer(X) > canceledGetLine(O, O2) => < O : myClass | A, next > write(stdout, O, "Too slow! The answer is " + string(X, 10) + ".\n") . *** getLine() won; need to stop timer and check answer rl < O : myClass | A, score(N), answer(X), timer(O3) > gotLine(O, O2, S) => stopTimer(O3, O) if conv(S) == X then write(stdout, O, "Correct.\n") < O : myClass | A, stop, score(N + 1), timer(O3) > else write(stdout, O, "Wrong. The answer is " + string(X, 10) + ".\n") < O : myClass | A, stop, score(N), timer(O3) > fi . *** timer stopped before timeOut() arrived rl < O : myClass | A, stop > stoppedTimer(O, O2) => < O : myClass | A, next > . *** timeOut() arrived after we tried to stop timer rl < O : myClass | A, stop > timeOut(O, O2) => < O : myClass | A, next > . *** if done print score otherwise restart timer rl < O : myClass | A, next, timer(O3), asked(N), score(M) > wrote(O, O2) => if N == #questions then write(stdout, O, "Finished. Your score is " + string(M, 10) + " out of " + string(N, 10) + ".\n") deleteTimer(O3, O) < O : myClass | A > else startTimer(O3, O, oneShot, timeLimit) < O : myClass | A, timer(O3), asked(N), score(M) > fi . endm erew run . Stream I/O is only mostly nonblocking. The terminal is considered to be a critical resource and if a getLine() is pending, other attempts to access it, say to write out advisories or messages from the debugger, will cause the parent process to suspend until the getLine() has completed. Attempts to use the terminal by sending messages to stdin/stdout/stderr will not block but the messages will be left in the configuration until the terminal is available. Typing control-C (interrupt) into a getLine() returns the empty string as does control-D (EOF), though the former also interrupts the parent process and may enter the debugger or print a message about being suspended, depending on whether the parent process is running (doing rewrites) or suspended (awaiting external events) at that instant. The nonblocking feature can be used without Tecla (either not building with Tecla or using the command line flag -no-tecla) though the default read() from a terminal does not reprint prompt after a control-Z (stop process) and fg. Maude can still end up suspended if terminal output is paused (control-S/control-Q). Other changes ============== (1) When Maude receives control-C interrupts while suspended waiting for external events, previously two such interrupts on the same suspension were required to abort and return to the command line. However if Maude is alternating between doing a few rewrites and suspending many times a second, it becomes physically impossible to generate two interrupts on the same suspension and unless one was lucky enough to generate an interrupt during the few microsecond window when a rewrite is happening (and thus enter the debugger) it was impossible to stop the execution. In this version, receiving two interrupts on different suspensions but within a one second window is an alternative criteria to abort execution and return to the command line. (2) An empty line is treated as an implicit "step ." command if the all of the following are true: (a) In debugger. (b) In interactive mode (stdin is a terminal or -interactive command line option). (c) Not in the middle of an incomplete command or module. (d) Not reading from an included file (i.e. via in/load/sload or command line file name). This allows single stepping by just tapping the return key for each step. (3) The stream API error behavior has changed so that correctly addressed messages with appropriate message constructors are always accepted (although this can be delayed if the terminal is busy as mentioned above). There is now a op streamError : Oid Oid String -> Msg [ctor msg format (m o)] . that returns a "Bad string." error if the last argument of getLine() and write() is not a valid string. This message constructor is also used if there is an error reported from the operating system when setting up a child to do a nonblocking getLine(). (4) There is a small but important change in the semantics of the stopTimer() message: Previously a stoppedTimer() reply would be generated whether or not the timer was currently running. Now the reply is only produced if the timer was indeed running at the instant the message was acted on. Otherwise if the timer is stopped, perhaps because it is in one shot mode and has already generated its timeOut() messages, the stopTimer() message is quietly consumed without producing reply. The rationale for this change is that with the original semantics it is difficult to reliably reuse a timer if we decide we're not interested in its pending timeOut(). Suppose we send a running timer a stopTimer() message. Now there is a race between the timer and the message. If we produced a stoppedTimer() message after the the timer had already sent it timeOut() and stopped, then because Maude does not guarentee the order in which messages-objects pairs are rewritten in a configuration, we might be tempted to reuse the timer after matching the stoppedTimer() message, only to be confused by the timeOut() message which referred to the previous use and not our reuse. Now when a stopTimer() message is sent to a running timer, either a stoppedTimer() message will be produced or a timeOut() message will be produced, _but not both_, depending on the outcome of the race. So we need merely wait to see one of these two messaes and then we know the timer is in a stopped state, ready for reuse and any timeOut() we see in the future will be due to our reuse of the timer. Of course this does nothing to help reuse timers that are running in periodic mode, but because depending on the period and the speed at which timeOut() messages are matched and dealt with, there could be an arbitrary build up of timeOut() messages in the configuration, so reusing such timers is always going to be problematic. Maude-Maude3.2/doc/alpha136.txt000066400000000000000000000111331420036611000162020ustar00rootroot00000000000000Alpha 136 release notes ======================== New features ============= (1) The file API now had a message pair for making hard or symbolic links: ops hard symbolic : -> LinkType [ctor] . op makeLink : Oid Oid String String LinkType -> Msg [ctor msg format (b o)] . op madeLink : Oid Oid -> Msg [ctor msg format (m o)] . The first string argument is the target of the link. The second string argument is the name of the link. Possible fileError() messages include: "Bad target file name." "Bad link name." "Bad link type." As usual, messages that don't end in a period come from the operating system. There is no need for a removeLink() message since both hard and symbolic links can be removed as regular files. (2) There is now an API for manipulating directories, in file.maude: mod DIRECTORY is including CONFIGURATION . protecting NAT . protecting STRING . sort EntryType EntryType? . subsort EntryType < EntryType? . op directory : Nat -> Oid [ctor] . ops file directory socket pipe charDevice blockDevice : -> EntryType [ctor] . op symbolicLink : String -> EntryType [ctor] . op endOfDirectory : -> EntryType? [ctor] . op openDirectory : Oid Oid String -> Msg [ctor msg format (b o)] . op openedDirectory : Oid Oid Oid -> Msg [ctor msg format (m o)] . op closeDirectory : Oid Oid -> Msg [ctor msg format (b o)] . op closedDirectory : Oid Oid -> Msg [ctor msg format (m o)] . op getDirectoryEntry : Oid Oid -> Msg [ctor msg format (b o)] . op gotDirectoryEntry : Oid Oid String EntryType? -> Msg [ctor msg format (m o)] . op makeDirectory : Oid Oid String -> Msg [ctor msg format (b o)] . op madeDirectory : Oid Oid -> Msg [ctor msg format (m o)] . op removeDirectory : Oid Oid String -> Msg [ctor msg format (b o)] . op removedDirectory : Oid Oid -> Msg [ctor msg format (m o)] . op directoryError : Oid Oid String -> Msg [ctor msg format (m o)] . op directoryManager : -> Oid [special (...)] . endm Directory operations are considered dangerous, but less so than file operations, since only empty directories can be created and destroyed, and only information about the contents of a directory can be leaked to an external server (via sockets). They need to be explicitly enabled via -trust or -allow-dir command line flags. The message openDirectory() can only be sent to directoryManager and if successful opens the named directory and the reply message, openedDirectory contains an external object identifier of the form directory(N) for natural number N. Such objects accept two kinds of messages: closeDirectory() which deletes the external object, frees any resources associated with it and produces a closedDirectory() reply. getDirectoryEntry() which tries to read the next entry in the directory. If an entry is successfully read, a gotDirectoryEntry() reply is produced where the String argument is the name of the directory entry and the EntryType? argument gives its type: file : regular file directory : directory socket : Unix domain socket pipe : named pipe (aka FIFO) charDevice : character device (e.g. a terminal) blockDevice : block device (e.g. a hard drive) symbolLink(T) : a symbolic link pointing at T If there are no more entries in the directory, a gotDirectoryEntry() reply is produced where the String argument is "" and the EntryType? argument is endOfDirectory Note that endOfDirectory resides in a larger type, EntryType? than the actual entry types, EntryType, to facilitate writing patterns that only match the latter. The message makeDirectory() can only be sent to directoryManager and if successful makes an empty directory at the given path and returns a madeDirectory() message. The message removeDirectory() can only be sent to directoryManager and if successful removes an empty directory at the given path and returns a removedDirectory() message. Note that nonempty directories cannot be removed. (3) There is a command line flag -assoc-unif-depth= which controls how depth the PIG-PUG algorithm searches for A/AU unifiers in the case it can't assure termination. This value is multiplied by the number of arguments in the lhs and rhs unificands and rounded down to determine how many steps to take. If after this number of moves, both neither unificand has been reduced to a lone variable, the branch is cut and the solution to the overall problem is marked as incomplete. Cancel steps, where the left end variables in each unificand are identical are not counted towards this depth. The default value is 1.0. It is a float because there is typically a huge difference the search space between 1.0 and 2.0 so values like 1.25 and 1.5 make sense. Maude-Maude3.2/doc/alpha137.txt000066400000000000000000000015641420036611000162120ustar00rootroot00000000000000Alpha 137 release notes ======================== Bug fixes ========== (1) A bug in the Yices bindings where constraints were being asserted twice. (2) A bug in the prelude where projection functions didn't work for parameterized meta-modules - found and fixed by Rubén. (3) A bug in the handling of extension information for iter symbols; illustrated by this example from Rubén: mod UNINITIALIZED-BUG is protecting NAT . vars N M : Nat . crl [rwc] : s N => M if N => M [nonexec] . endm srew 3 using rwc{idle} . Here two solutions are produced but only one is valid. (4) A bug in loop mode where it would try to continue using state left over from some incompatible command. Reported by Rubén and provoked by: search 0 =>* 0 . (restart loop mode) Other changes ============== (1) std::mt19937 is used instead of having 3rdParty/MersenneTwister.h in the source tree. Maude-Maude3.2/install-sh000077500000000000000000000127011420036611000153630ustar00rootroot00000000000000#!/bin/sh # # install - install a program, script, or datafile # This comes from X11R5 (mit/util/scripts/install.sh). # # Copyright 1991 by the Massachusetts Institute of Technology # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation, and that the name of M.I.T. not be used in advertising or # publicity pertaining to distribution of the software without specific, # written prior permission. M.I.T. makes no representations about the # suitability of this software for any purpose. It is provided "as is" # without express or implied warranty. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else : fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: chmodcmd="" else instcmd=$mkdirprog fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f "$src" ] || [ -d "$src" ] then : else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else : fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else : fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else : fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else : fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 Maude-Maude3.2/m4/000077500000000000000000000000001420036611000136765ustar00rootroot00000000000000Maude-Maude3.2/m4/ax_have_poll.m4000066400000000000000000000043721420036611000166070ustar00rootroot00000000000000# =========================================================================== # https://www.gnu.org/software/autoconf-archive/ax_have_poll.html # =========================================================================== # # SYNOPSIS # # AX_HAVE_POLL([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # AX_HAVE_PPOLL([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # DESCRIPTION # # This macro determines whether the system supports the poll I/O event # interface. A neat usage example would be: # # AX_HAVE_POLL( # [AX_CONFIG_FEATURE_ENABLE(poll)], # [AX_CONFIG_FEATURE_DISABLE(poll)]) # AX_CONFIG_FEATURE( # [poll], [This platform supports poll(7)], # [HAVE_POLL], [This platform supports poll(7).]) # # Some systems -- most notably Linux kernel 2.6.16 and later -- also have # the variant ppoll(). The availability of that function can be tested # with the second macro. Generally speaking, it is safe to assume that # AX_HAVE_POLL would succeed if AX_HAVE_PPOLL has, but not the other way # round. # # LICENSE # # Copyright (c) 2009 Peter Simons # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. #serial 8 AC_DEFUN([AX_HAVE_POLL], [dnl AC_MSG_CHECKING([for poll(2)]) AC_CACHE_VAL([ax_cv_have_poll], [dnl AC_LINK_IFELSE([dnl AC_LANG_PROGRAM( [#include ], [int rc; rc = poll((struct pollfd *)(0), 0, 0);])], [ax_cv_have_poll=yes], [ax_cv_have_poll=no])]) AS_IF([test "${ax_cv_have_poll}" = "yes"], [AC_MSG_RESULT([yes]) $1],[AC_MSG_RESULT([no]) $2]) ])dnl AC_DEFUN([AX_HAVE_PPOLL], [dnl AC_MSG_CHECKING([for ppoll(2)]) AC_CACHE_VAL([ax_cv_have_ppoll], [dnl AC_LINK_IFELSE([dnl AC_LANG_PROGRAM( [dnl #include #include ], [dnl int rc; rc = poll((struct pollfd *)(0), 0, 0); rc = ppoll((struct pollfd *)(0), 0, (struct timespec const *)(0), (sigset_t const *)(0));])], [ax_cv_have_ppoll=yes], [ax_cv_have_ppoll=no])]) AS_IF([test "${ax_cv_have_ppoll}" = "yes"], [AC_MSG_RESULT([yes]) $1],[AC_MSG_RESULT([no]) $2]) ]) Maude-Maude3.2/missing000077500000000000000000000240361420036611000147620ustar00rootroot00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. # Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch]" ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing 0.4 - GNU automake" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. You can get \`$1Help2man' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then # We have makeinfo, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; tar) shift if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 fi # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequirements for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 Maude-Maude3.2/mkinstalldirs000077500000000000000000000034111420036611000161630ustar00rootroot00000000000000#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain errstatus=0 dirmode="" usage="\ Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." # process command line arguments while test $# -gt 0 ; do case "${1}" in -h | --help | --h* ) # -h for help echo "${usage}" 1>&2; exit 0 ;; -m ) # -m PERM arg shift test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; } dirmode="${1}" shift ;; -- ) shift; break ;; # stop option processing -* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option * ) break ;; # first non-opt arg esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac case $dirmode in '') if mkdir -p -- . 2>/dev/null; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" fi ;; *) if mkdir -m "$dirmode" -p -- . 2>/dev/null; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" fi ;; esac for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case "$pathcomp" in -* ) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr="" chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp="$pathcomp/" done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 3 # End: # mkinstalldirs ends here Maude-Maude3.2/src/000077500000000000000000000000001420036611000141455ustar00rootroot00000000000000Maude-Maude3.2/src/ACU_Persistent/000077500000000000000000000000001420036611000167755ustar00rootroot00000000000000Maude-Maude3.2/src/ACU_Persistent/ACU_Copy.cc000066400000000000000000000067511420036611000207170ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Functions for rebuilding a the spine of a red-black tree. // ACU_RedBlackNode* ACU_RedBlackNode::copy(ACU_Stack& path, ACU_RedBlackNode* n, ACU_RedBlackNode* old) { int maxMult = 0; if (n != 0) maxMult = n->getMaxMult(); // // Rebuild spine. // while (!(path.empty())) { ACU_RedBlackNode* parent = path.pop(); ACU_RedBlackNode* l = parent->getLeft(); if (parent->getMaxMult() > maxMult) { // // Slow case; need to recalculate maxMult. // int t = parent->getMultiplicity(); if (t > maxMult) maxMult = t; if (l == old) { l = n; n = parent->getRight(); if (n != 0) { t = n->getMaxMult(); if (t > maxMult) maxMult = t; } } else { if (l != 0) { t = l->getMaxMult(); if (t > maxMult) maxMult = t; } } } else { // // Fast case. // if (l == old) { l = n; n = parent->getRight(); } } n = new ACU_RedBlackNode(parent->getDagNode(), parent->getMultiplicity(), l, n, maxMult); n->makeRedIfRed(parent); old = parent; } return n; } ACU_RedBlackNode* ACU_RedBlackNode::copy(ACU_Stack& path, ACU_RedBlackNode* n, ACU_RedBlackNode* old, ACU_RedBlackNode* victim, ACU_RedBlackNode* surrogate) { int maxMult = 0; if (n != 0) maxMult = n->getMaxMult(); // // Rebuild spine replacing victim data with surrogate data. // while (!(path.empty())) { ACU_RedBlackNode* parent = path.pop(); ACU_RedBlackNode* l = parent->getLeft(); ACU_RedBlackNode* source = parent; if (source == victim) { source = surrogate; // // surrogate is a descendant of parent. // Thus parent->getMaxMult() will be at least as // large as surrogate->getMultiplicity(). // } if (parent->getMaxMult() > maxMult) { // // Slow case; need to recalculate maxMult. // int t = source->getMultiplicity(); if (t > maxMult) maxMult = t; if (l == old) { l = n; n = parent->getRight(); if (n != 0) { t = n->getMaxMult(); if (t > maxMult) maxMult = t; } } else { if (l != 0) { t = l->getMaxMult(); if (t > maxMult) maxMult = t; } } } else { // // Fast case. // if (l == old) { l = n; n = parent->getRight(); } } n = new ACU_RedBlackNode(source->getDagNode(), source->getMultiplicity(), l, n, maxMult); n->makeRedIfRed(parent); old = parent; } return n; } Maude-Maude3.2/src/ACU_Persistent/ACU_Delete.cc000066400000000000000000000057021420036611000212020ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Persistent delete from ACU red-black tree argument list. // ACU_RedBlackNode* ACU_RedBlackNode::consDelete(ACU_Stack& path, int multiplicity, int& delta) { ACU_RedBlackNode* victim = path.pop(); int newMult = victim->getMultiplicity() - multiplicity; Assert(newMult >= 0, "-ve newMult"); if (newMult > 0) { delta = 0; ACU_RedBlackNode* n = new ACU_RedBlackNode(victim->getDagNode(), newMult, victim->getLeft(), victim->getRight()); n->makeRedIfRed(victim); return copy(path, n, victim); } // // Need to do a red-black delete. // delta = -1; ACU_RedBlackNode* child = victim->getLeft(); if (child != 0) { ACU_RedBlackNode* n = victim->getRight(); if (n != 0) { // // Victim has two children; need to replace it with // successor. // path.unpop(); path.stackLeftmostPath(n); ACU_RedBlackNode* surrogate = path.pop(); child = surrogate->getRight(); // might be null if (surrogate->isRed()) { // // Surrogate is replaced by it's only child, and victim // is replaced by surrogate. // return copy(path, child, surrogate, victim, surrogate); } else if (isRed(child)) { // // Surrogate is replaced by a black copy of it's // only child, and victim is replaced by surrogate. // return copy(path, blackNode(child, child->getLeft(), child->getRight()), surrogate, victim, surrogate); } // // Need to increase black length for child. // return copyRebalance(path, child, surrogate, victim, surrogate); } } else child = victim->getRight(); // // Victim has no children or one child only. // if (path.empty()) { return isRed(child) ? blackNode(child, child->getLeft(), child->getRight()) : child; } if (victim->isRed()) return copy(path, child, victim); else if (isRed(child)) return copy(path, blackNode(child, child->getLeft(), child->getRight()), victim); // // Need to increase black length for child. // return copyRebalance(path, child, victim, 0, 0); } Maude-Maude3.2/src/ACU_Persistent/ACU_FastIter.hh000066400000000000000000000034601420036611000215320ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for fast iterators for ACU red-black trees. // // They are fast in the sense that we do the explicit // stack version of tail recursion elimination and therefore // may not have a full path on the stack. // #ifndef _ACU_FastIter_hh_ #define _ACU_FastIter_hh_ #include "ACU_Stack.hh" #include "ACU_Tree.hh" class ACU_FastIter : private ACU_Stack { NO_COPYING(ACU_FastIter); public: ACU_FastIter(const ACU_Tree& tree); bool valid() const; DagNode* getDagNode() const; int getMultiplicity() const; void next(); }; inline ACU_FastIter::ACU_FastIter(const ACU_Tree& tree) { stackLeftmostPath(tree.root); } inline bool ACU_FastIter::valid() const { return !empty(); } inline DagNode* ACU_FastIter::getDagNode() const { return top()->getDagNode(); } inline int ACU_FastIter::getMultiplicity() const { return top()->getMultiplicity(); } inline void ACU_FastIter::next() { if (ACU_RedBlackNode* r = pop()->getRight()) stackLeftmostPath(r); } #endif Maude-Maude3.2/src/ACU_Persistent/ACU_Find.cc000066400000000000000000000060041420036611000206540ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Find functions for ACU red-black tree argument lists. // bool ACU_RedBlackNode::find(ACU_RedBlackNode* root, DagNode* dagNode, ACU_Stack& path) { do { path.push(root); int r = dagNode->compare(root->getDagNode()); if (r == 0) return true; root = root->getChild(r); } while (root != 0); return false; } bool ACU_RedBlackNode::find(ACU_RedBlackNode* root, Term* term, ACU_Stack& path) { do { path.push(root); int r = term->compare(root->getDagNode()); if (r == 0) return true; root = root->getChild(r); } while (root != 0); return false; } bool ACU_RedBlackNode::findFirstPotentialMatch(ACU_RedBlackNode* root, Term* key, const Substitution& partial, ACU_Stack& path) { // // Return true if the red-black tree contains a potential // match for key, given a partial substitution for key's // variables, or false otherwise. // In the true case, path holds the path to the left most // potential match. // int explore = 0; do { path.push(root); ++explore; int r = key->partialCompare(partial, root->getDagNode()); switch (r) { case Term::GREATER: { root = root->getRight(); break; } case Term::EQUAL: { return true; } case Term::LESS: { root = root->getLeft(); break; } case Term::UNKNOWN: { explore = 0; // so we can retreat to this node root = root->getLeft(); break; } } } while (root != 0); path.multiPop(explore); // retreat the last place we zero'd explore return !path.empty(); } bool ACU_RedBlackNode::findGeqMult(ACU_RedBlackNode* root, int multiplicity, ACU_Stack& path) { if (root->getMaxMult() >= multiplicity) { for(;;) { path.push(root); ACU_RedBlackNode* l = root->getLeft(); if (l != 0 && l->getMaxMult() >= multiplicity) root = l; else if (root->getMultiplicity() >= multiplicity) break; else { root = root->getRight(); Assert(root != 0 && root->getMaxMult() >= multiplicity, "maxMult invariant failed"); } } return true; } return false; } Maude-Maude3.2/src/ACU_Persistent/ACU_Insert.cc000066400000000000000000000075331420036611000212500ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Persistent insert into ACU red-black tree argument list. // // We use the algorithm from: // Chris Okasaki, // "Functional Pearl: Red-black trees in a functional setting", // Journal of Functional Programming, 9(4):471-477, July 1999. // ACU_RedBlackNode* ACU_RedBlackNode::consInsert(ACU_RedBlackNode* p, DagNode* argument, int multiplicity, int& delta) { Assert(p != 0, "inserting into empty tree not allowed"); ACU_Stack path; bool goLeft; { // // First figure out where to insert new argument. // int r; do { r = argument->compare(p->getDagNode()); if (r == 0) { delta = 0; int newMult = p->getMultiplicity() + multiplicity; int maxMult = p->getMaxMult(); if (newMult > maxMult) maxMult = newMult; ACU_RedBlackNode* n = new ACU_RedBlackNode(p->getDagNode(), newMult, p->getLeft(), p->getRight(), maxMult); if (path.empty()) return n; n->makeRedIfRed(p); return copy(path, n, p); } path.push(p); p = p->getChild(r); } while (p != 0); goLeft = (r < 0); } // // Now insert and copy spine, rebalancing as we go. // delta = 1; ACU_RedBlackNode* parent = path.pop(); ACU_RedBlackNode* left = 0; ACU_RedBlackNode* right = 0; while (parent->isRed()) { // // Resolve red-red conflict using Okisaka's balancing scheme. // ACU_RedBlackNode* grandParent = path.pop(); // red nodes always have a parent if (goLeft) { if (grandParent->getLeft() == parent) { left = new ACU_RedBlackNode(argument, multiplicity, left, right); right = blackNode(grandParent, parent->getRight(), grandParent->getRight()); argument = parent->getDagNode(); multiplicity = parent->getMultiplicity(); } else { left = blackNode(grandParent, grandParent->getLeft(), left); right = blackNode(parent, right, parent->getRight()); } } else { if (grandParent->getLeft() == parent) { left = blackNode(parent, parent->getLeft(), left); right = blackNode(grandParent, right, grandParent->getRight()); } else { right = new ACU_RedBlackNode(argument, multiplicity, left, right); left = blackNode(grandParent, grandParent->getLeft(), parent->getLeft()); argument = parent->getDagNode(); multiplicity = parent->getMultiplicity(); } } if (path.empty()) { // // New root must be black. // return new ACU_RedBlackNode(argument, multiplicity, left, right); } parent = path.pop(); goLeft = (parent->getLeft() == grandParent); } // // Create red node. // ACU_RedBlackNode* n = new ACU_RedBlackNode(argument, multiplicity, left, right); n->makeRed(); // // Copy rest of spine without rebalancing. // ACU_RedBlackNode* newRoot = goLeft ? blackNode(parent, n, parent->getRight()) : blackNode(parent, parent->getLeft(), n); return copy(path, newRoot, parent); } Maude-Maude3.2/src/ACU_Persistent/ACU_Pair.hh000066400000000000000000000027701420036611000207070ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for argument-multiplicity pairs. // #ifndef _ACU_Pair_hh_ #define _ACU_Pair_hh_ class ACU_Pair { public: ACU_Pair(); ACU_Pair(DagNode* d, int m); void set(DagNode* d, int m); DagNode* getDagNode() const; int getMultiplicity() const; /* HACK private: */ DagNode* dagNode; int multiplicity; }; inline ACU_Pair::ACU_Pair() { } inline ACU_Pair::ACU_Pair(DagNode* d, int m) { dagNode = d; multiplicity = m; } inline void ACU_Pair::set(DagNode* d, int m) { dagNode = d; multiplicity = m; } inline DagNode* ACU_Pair::getDagNode() const { return dagNode; } inline int ACU_Pair::getMultiplicity() const { return multiplicity; } #endif Maude-Maude3.2/src/ACU_Persistent/ACU_Persistent.hh000066400000000000000000000021341420036611000221460ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Forward declarations for red-black representation of // ACU arguments lists. // #ifndef _ACU_RedBlack_hh_ #define _ACU_RedBlack_hh_ class ACU_RedBlackNode; class ACU_Stack; class ACU_FastIter; class ACU_SlowIter; class ACU_Pair; class ACU_Tree; #endif Maude-Maude3.2/src/ACU_Persistent/ACU_Rebalance.cc000066400000000000000000000133241420036611000216530ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Copy spine of a red-black tree, rebalancing. // // We use the rebalancing method given in chapter 14 of // Thomas H. Cormen, Charles E. Leierson and Ronald L. Rivest, // "Introduction to Algorithms", // MIT Press and McGraw-Hill, 1990. // // We need to handle 2 * 2 * 3 = 12 distinct cases. // ACU_RedBlackNode* ACU_RedBlackNode::copyRebalance(ACU_Stack& path, ACU_RedBlackNode* a, ACU_RedBlackNode* old, ACU_RedBlackNode* victim, ACU_RedBlackNode* surrogate) { // // Swap surrogate for victim and increase black length by 1. // a is a new black node or possibly null. // old is the node is it is replacing in the rebuilt tree. // ACU_RedBlackNode* b; for(;;) { b = path.pop(); // old's parent ACU_RedBlackNode* b2 = (b == victim) ? surrogate : b; if (b->getLeft() == old) { // // a will replace b->getLeft() in the rebuilt tree. Thus every // path from b->getRight() must contain at least 1 black node. // Therefore d = b->getRight() exists. // ACU_RedBlackNode* d = b->getRight(); // old a's sibling ACU_RedBlackNode* c = d->getLeft(); // might be null ACU_RedBlackNode* e = d->getRight(); // might be null if (d->isRed()) { // // CLR case 1; we consider 3 subcases. // // Since d is red, every path from d must contain // at least 1 black node; so c = d->getLeft() // and e = d->getRight() exist. // ACU_RedBlackNode* p = c->getLeft(); // might be null ACU_RedBlackNode* q = c->getRight(); // might be null ACU_RedBlackNode* t; if (isRed(q)) { // // Transformation 1 followed by transformation 4. // t = redNode(c, blackNode(b2, a, p), blackNode(q, q->getLeft(), q->getRight())); } else if (isRed(p)) { // // Transformation 1 followed by transformation 3 // followed by transformation 4. // t = redNode(p, blackNode(b2, a, p->getLeft()), blackNode(c, p->getRight(), q)); } else { // // Transformation 1 followed by transformation 2. // t = blackNode(b2, a, redNode(c, p, q)); } a = blackNode(d, t, e); break; } else // d is black { if (isRed(e)) { // // CLR case 4. // a = blackNode(d, blackNode(b2, a, c), blackNode(e, e->getLeft(), e->getRight())); } else if (isRed(c)) { // // CLR case 3; we do a combined 3 then 4 transformation. // a = blackNode(c, blackNode(b2, a, c->getLeft()), blackNode(d, c->getRight(), e)); } else { // // CLR case 2. // a = blackNode(b2, a, redNode(d, c, e)); goto up; } a->makeRedIfRed(b); break; } } else { // // Reflection of previous branch. // // // a will replace b->getRight() in the rebuilt tree. Thus every // path from b->getLeft() must contain at least 1 black node. // Therefore d = b->getLeft() exists. // ACU_RedBlackNode* d = b->getLeft(); // old a's sibling ACU_RedBlackNode* c = d->getRight(); // might be null ACU_RedBlackNode* e = d->getLeft(); // might be null if (d->isRed()) { // // CLR case 1; we consider 3 subcases. // // Since d is red, every path from d must contain // at least 1 black node; so c = d->getRight() // and e = d->getLeft() exist. // ACU_RedBlackNode* p = c->getRight(); // might be null ACU_RedBlackNode* q = c->getLeft(); // might be null ACU_RedBlackNode* t; if (isRed(q)) { // // Transformation 1 followed by transformation 4. // t = redNode(c, blackNode(q, q->getLeft(), q->getRight()), blackNode(b2, p, a)); } else if (isRed(p)) { // // Transformation 1 followed by transformation 3 // followed by transformation 4. // t = redNode(p, blackNode(c, q, p->getLeft()), blackNode(b2, p->getRight(), a)); } else { // // Transformation 1 followed by transformation 2. // t = blackNode(b2, redNode(c, q, p), a); } a = blackNode(d, e, t); break; } else // d is black { if (isRed(e)) { // // CLR case 4. // a = blackNode(d, blackNode(e, e->getLeft(), e->getRight()), blackNode(b2, c, a)); } else if (isRed(c)) { // // CLR case 3; we do a combined 3 then 4 transformation. // a = blackNode(c, blackNode(d, e, c->getLeft()), blackNode(b2, c->getRight(), a)); } else { // // CLR case 2. // a = blackNode(b2, redNode(d, e, c), a); goto up; } a->makeRedIfRed(b); break; } } up: if (path.empty()) return a; if (b->isRed()) return copy(path, a, b, victim, surrogate); old = b; } if (path.empty()) return a; return copy(path, a, b, victim, surrogate); } Maude-Maude3.2/src/ACU_Persistent/ACU_RedBlack.hh000066400000000000000000000021141420036611000214530ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Forward declarations for red-black representation of // ACU arguments lists. // #ifndef _ACU_RedBlack_hh_ #define _ACU_RedBlack_hh_ class ACU_RedBlackNode; class ACU_Stack; class ACU_FastIter; class ACU_SlowIter; class ACU_Tree; #endif Maude-Maude3.2/src/ACU_Persistent/ACU_RedBlackNode.cc000066400000000000000000000104051420036611000222510ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class ACU_RedBlackNode. // // utility stuff #include "macros.hh" #include "vector.hh" #include "indent.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "ACU_RedBlack.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" #include "term.hh" // core class definitions #include "hashConsSet.hh" // ACU red-black class definitions #include "ACU_RedBlackNode.hh" #include "ACU_Stack.hh" // our parts #include "ACU_Insert.cc" #include "ACU_Delete.cc" #include "ACU_Rebalance.cc" #include "ACU_Copy.cc" #include "ACU_Find.cc" ACU_RedBlackNode* ACU_RedBlackNode::blackNode(ACU_RedBlackNode* key, ACU_RedBlackNode* left, ACU_RedBlackNode* right) { return new ACU_RedBlackNode(key->getDagNode(), key->getMultiplicity(), left, right); } // // Experimental hash consing code // ACU_RedBlackNode* ACU_RedBlackNode::canonicalRebuild(HashConsSet* hcs) { // // Horribly inefficient - recode it after we determine it is worthwhile. // bool needRebuild = false; ACU_RedBlackNode* left = getLeft(); if (left) { ACU_RedBlackNode* canonicalLeft = left->canonicalRebuild(hcs); if (left != canonicalLeft) { left = canonicalLeft; needRebuild = true; } } ACU_RedBlackNode* right = getRight(); if (right) { ACU_RedBlackNode* canonicalRight = right->canonicalRebuild(hcs); if (right != canonicalRight) { right = canonicalRight; needRebuild = true; } } DagNode* d = getDagNode(); DagNode* c = hcs->getCanonical(hcs->insert(d)); if (needRebuild || c != d) { ACU_RedBlackNode* n = new ACU_RedBlackNode(c, getMultiplicity(), left, right, getMaxMult()); n->makeRedIfRed(this); n->setSortIndex(getSortIndex()); return n; } return this; } #ifdef CHECK_TREE bool ACU_RedBlackNode::checkRedBlackProperty() { int height; if (!checkRedBlackProperty(height) || isRed()) { cerr << "Red-Black Violation\n"; dump(cerr, 0); return false; } return true; } bool ACU_RedBlackNode::checkRedBlackProperty(int& height) { bool ok = true; height = 0; if (ACU_RedBlackNode* l = getLeft()) { ok = l->checkRedBlackProperty(height); if (getDagNode()->compare(l->getDagNode()) <= 0) { cerr << "order violation " << getDagNode() << " <= " << l->getDagNode() << endl; ok = false; } } int rHeight = 0; if (ACU_RedBlackNode* r = getRight()) { ok = r->checkRedBlackProperty(rHeight) && ok; if (getDagNode()->compare(r->getDagNode()) >= 0) { cerr << "order violation " << getDagNode() << " >= " << r->getDagNode() << endl; ok = false; } } if (height != rHeight) { cerr << "black height violation " << height << " != " << rHeight << endl; ok = false; } if (!isRed()) ++height; return ok; } #endif void ACU_RedBlackNode::dump(ostream& s, int indent) { s << Indent(indent) << "address = " << this << "\tdagNode = " << getDagNode() << "\tmultiplicity = " << getMultiplicity() << "\tcolor = " << (isRed() ? "red" : "black") << endl; s << Indent(indent) << "left = "; if (ACU_RedBlackNode* l = getLeft()) { s << '\n'; l->dump(s, indent + 1); } else s << "null\n"; s << Indent(indent) << "right = "; if (ACU_RedBlackNode* r = getRight()) { s << '\n'; r->dump(s, indent + 1); } else s << "null\n"; } Maude-Maude3.2/src/ACU_Persistent/ACU_RedBlackNode.hh000077500000000000000000000167641420036611000223040ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for nodes in persistent red-black trees. // #ifndef _ACU_RedBlackNode_hh_ #define _ACU_RedBlackNode_hh_ #include "symbol.hh" // HACK #include "dagNode.hh" // HACK #include "memoryCell.hh" class ACU_RedBlackNode { NO_COPYING(ACU_RedBlackNode); public: enum PublicValues { MAX_TREE_HEIGHT = 64 // must be height of largest red-black tree }; ACU_RedBlackNode(DagNode* dagNode, int multiplicity, ACU_RedBlackNode* left, ACU_RedBlackNode* right); ACU_RedBlackNode(DagNode* dagNode, int multiplicity, ACU_RedBlackNode* left, ACU_RedBlackNode* right, int maxMult); DagNode* getDagNode() const; int getMultiplicity() const; ACU_RedBlackNode* getLeft() const; ACU_RedBlackNode* getRight() const; int getMaxMult() const; void setSortIndex(int index); int getSortIndex() const; void makeRed(); // need for conversion from array void* operator new(size_t size); void setMarked(); bool isMarked(); static bool find(ACU_RedBlackNode* root, DagNode* dagNode, ACU_Stack& path); static bool find(ACU_RedBlackNode* root, Term* term, ACU_Stack& path); static bool findFirstPotentialMatch(ACU_RedBlackNode* root, Term* key, const Substitution& partial, ACU_Stack& path); static bool findGeqMult(ACU_RedBlackNode* root, int multiplicity, ACU_Stack& path); static ACU_RedBlackNode* consInsert(ACU_RedBlackNode* root, DagNode* dagNode, int multiplicity, int& delta); static ACU_RedBlackNode* consDelete(ACU_Stack& path, int multiplicity, int& delta); // // Experimental hash cons code. // ACU_RedBlackNode* canonicalRebuild(HashConsSet* hcs); void dump(ostream& s, int indent); #ifdef CHECK_TREE // // Extra functions for strict checking of red-black property // after each operation. // bool checkRedBlackProperty(); bool checkRedBlackProperty(int& height); static ACU_RedBlackNode* consInsert2(ACU_RedBlackNode* root, DagNode* dagNode, int multiplicity); static ACU_RedBlackNode* consDelete2(ACU_Stack& path, int multiplicity); #endif private: enum Values { LEFT_INDEX = 1, RIGHT_INDEX = 0 }; enum Flags { RED = 1 }; // // Returns left child if negative, right child otherwise. // ACU_RedBlackNode* getChild(int sign) const; static ACU_RedBlackNode* copy(ACU_Stack& path, ACU_RedBlackNode* n, ACU_RedBlackNode* old); static ACU_RedBlackNode* copy(ACU_Stack& path, ACU_RedBlackNode* n, ACU_RedBlackNode* old, ACU_RedBlackNode* victim, ACU_RedBlackNode* surrogate); static ACU_RedBlackNode* copyRebalance(ACU_Stack& path, ACU_RedBlackNode* n, ACU_RedBlackNode* old, ACU_RedBlackNode* victim, ACU_RedBlackNode* surrogate); static ACU_RedBlackNode* blackNode(ACU_RedBlackNode* key, ACU_RedBlackNode* left, ACU_RedBlackNode* right); static ACU_RedBlackNode* redNode(ACU_RedBlackNode* key, ACU_RedBlackNode* left, ACU_RedBlackNode* right); bool isRed() const; static bool isRed(const ACU_RedBlackNode* mightBeNull); void makeRedIfRed(const ACU_RedBlackNode* other); // // Get pointer to MemoryInfo object associated with us. // MemoryInfo* getMemoryInfo(); const MemoryInfo* getMemoryInfo() const; DagNode* const dagNode; int const multiplicity; ACU_RedBlackNode* children[2]; // no way to initialize const int maxMult; }; inline MemoryInfo* ACU_RedBlackNode::getMemoryInfo() { return MemoryCell::getMemoryInfo(this); } inline const MemoryInfo* ACU_RedBlackNode::getMemoryInfo() const { return MemoryCell::getMemoryInfo(this); } inline void* ACU_RedBlackNode::operator new(size_t size) { Assert(size <= sizeof(MemoryCell), "red-black node too big"); void* m = MemoryCell::allocateMemoryCell(); // // MemoryCell::allocateMemoryCell() no longer sets the half word to // Sort::SORT_UNKNOWN. This responsibility is shifted to us. // MemoryCell::getMemoryInfo(m)->setHalfWord(Sort::SORT_UNKNOWN); // // MemoryCell::allocateMemoryCell() no longer clears the memory // cell flags. This responsibility is shifted to us. // MemoryCell::getMemoryInfo(m)->clearAllFlags(); return m; } inline void ACU_RedBlackNode::setMarked() { getMemoryInfo()->setMarked(); } inline bool ACU_RedBlackNode::isMarked() { return getMemoryInfo()->isMarked(); } inline int ACU_RedBlackNode::getMaxMult() const { return maxMult; } inline ACU_RedBlackNode::ACU_RedBlackNode(DagNode* dagNode, int multiplicity, ACU_RedBlackNode* left, ACU_RedBlackNode* right) : dagNode(dagNode), multiplicity(multiplicity) { int mm = multiplicity; if (left != 0) { int t = left->maxMult; if (t > mm) mm = t; } if (right != 0) { int t = right->maxMult; if (t > mm) mm = t; } maxMult = mm; children[LEFT_INDEX] = left; children[RIGHT_INDEX] = right; } inline ACU_RedBlackNode::ACU_RedBlackNode(DagNode* dagNode, int multiplicity, ACU_RedBlackNode* left, ACU_RedBlackNode* right, int maxMult) : dagNode(dagNode), multiplicity(multiplicity), maxMult(maxMult) { Assert(maxMult == max(multiplicity, max((left == 0) ? 0 : left->maxMult, (right == 0) ? 0 : right->maxMult)), "bad maxMult"); children[LEFT_INDEX] = left; children[RIGHT_INDEX] = right; } inline DagNode* ACU_RedBlackNode::getDagNode() const { return dagNode; } inline int ACU_RedBlackNode::getMultiplicity() const { return multiplicity; } inline ACU_RedBlackNode* ACU_RedBlackNode::getLeft() const { return children[LEFT_INDEX]; } inline ACU_RedBlackNode* ACU_RedBlackNode::getRight() const { return children[RIGHT_INDEX]; } inline ACU_RedBlackNode* ACU_RedBlackNode::getChild(int sign) const { return children[sign < 0]; } inline void ACU_RedBlackNode::setSortIndex(int index) { getMemoryInfo()->setHalfWord(index); } inline int ACU_RedBlackNode::getSortIndex() const { return getMemoryInfo()->getHalfWord(); } inline bool ACU_RedBlackNode::isRed() const { return getMemoryInfo()->getFlag(RED); } inline bool ACU_RedBlackNode::isRed(const ACU_RedBlackNode* mightBeNull) { return mightBeNull != 0 && mightBeNull->getMemoryInfo()->getFlag(RED); } inline void ACU_RedBlackNode::makeRed() { getMemoryInfo()->setFlag(RED); } inline void ACU_RedBlackNode::makeRedIfRed(const ACU_RedBlackNode* other) { getMemoryInfo()->copySetFlags(RED, other->getMemoryInfo()); } inline ACU_RedBlackNode* ACU_RedBlackNode::redNode(ACU_RedBlackNode* key, ACU_RedBlackNode* left, ACU_RedBlackNode* right) { ACU_RedBlackNode* n = blackNode(key, left, right); n->makeRed(); return n; } #endif Maude-Maude3.2/src/ACU_Persistent/ACU_SlowIter.hh000066400000000000000000000036021420036611000215570ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for slow iterators for ACU red-black trees. // // They are slow in the sense that we always keep the full // path on the stack. // #ifndef _ACU_SlowIter_hh_ #define _ACU_SlowIter_hh_ #include "ACU_Stack.hh" #include "ACU_Tree.hh" class ACU_SlowIter : public ACU_Stack { NO_COPYING(ACU_SlowIter); public: ACU_SlowIter(); ACU_SlowIter(const ACU_Tree& tree); bool valid() const; DagNode* getDagNode() const; int getMultiplicity() const; void next(); }; inline ACU_SlowIter::ACU_SlowIter() { } inline ACU_SlowIter::ACU_SlowIter(const ACU_Tree& tree) { stackLeftmostPath(tree.root); } inline bool ACU_SlowIter::valid() const { return !empty(); } inline DagNode* ACU_SlowIter::getDagNode() const { return top()->getDagNode(); } inline int ACU_SlowIter::getMultiplicity() const { return top()->getMultiplicity(); } inline void ACU_SlowIter::next() { ACU_RedBlackNode* t = top()->getRight(); if (t != 0) stackLeftmostPath(t); else { do t = pop(); while (!empty() && top()->getRight() == t); } } #endif Maude-Maude3.2/src/ACU_Persistent/ACU_Stack.hh000066400000000000000000000051751420036611000210630ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for stack of pointers to red-black nodes. // #ifndef _ACU_Stack_hh_ #define _ACU_Stack_hh_ #include "ACU_RedBlackNode.hh" class ACU_Stack { NO_COPYING(ACU_Stack); public: ACU_Stack(); bool empty() const; ACU_RedBlackNode* top() const; void clear(); void push(ACU_RedBlackNode* node); ACU_RedBlackNode* pop(); void unpop(); // only valid if no clear() or push() since last pop() void multiPop(int nr); void stackLeftmostPath(ACU_RedBlackNode* n); void save(); void restore(); private: enum Sizes { STACK_SIZE = ACU_RedBlackNode::MAX_TREE_HEIGHT }; ACU_RedBlackNode** ptr; ACU_RedBlackNode** old; ACU_RedBlackNode* base[STACK_SIZE]; }; inline ACU_Stack::ACU_Stack() { ptr = base; } inline bool ACU_Stack::empty() const { return ptr == base; } inline ACU_RedBlackNode* ACU_Stack::top() const { Assert(ptr > base, "ACU_Stack::top() : stack underflow"); return *(ptr - 1); } inline void ACU_Stack::clear() { ptr = base; } inline void ACU_Stack::push(ACU_RedBlackNode* node) { Assert(ptr < base + STACK_SIZE, "ACU_Stack::push() : stack overflow"); *ptr++ = node; } inline ACU_RedBlackNode* ACU_Stack::pop() { Assert(ptr > base, "ACU_Stack::pop() : stack underflow"); return *(--ptr); } inline void ACU_Stack::unpop() { Assert(ptr < base + STACK_SIZE, "ACU_Stack::unpop() : stack overflow"); ++ptr; } inline void ACU_Stack::multiPop(int nr) { Assert(ptr - nr >= base, "ACU_Stack::multiPop() : stack underflow"); ptr -= nr; } inline void ACU_Stack::stackLeftmostPath(ACU_RedBlackNode* n) { Assert(n != 0, "ACU_Stack::stackLeftmostPath() : null pointer"); do { push(n); n = n->getLeft(); } while (n != 0); } inline void ACU_Stack::save() { old = ptr; } inline void ACU_Stack::restore() { ptr = old; } #endif Maude-Maude3.2/src/ACU_Persistent/ACU_Tree.cc000066400000000000000000000111221420036611000206700ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class ACU_Tree. // // utility stuff #include "macros.hh" #include "vector.hh" #include "indent.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "ACU_RedBlack.hh" // interface class definitions #include "binarySymbol.hh" #include "dagNode.hh" #include "term.hh" // ACU red-black class definitions #include "ACU_RedBlackNode.hh" #include "ACU_Stack.hh" #include "ACU_Tree.hh" ACU_Tree::ACU_Tree(const ArgVec& source) { size = source.length(); root = makeTree(source, 0, size, false); #ifdef CHECK_TREE checkIntegrity(); #endif } local_inline bool ACU_Tree::pow2min1(int i) { // // Return true iff i is 2^n - 1 for some n >= 0. // return ((i + 1) & i) == 0; } ACU_RedBlackNode* ACU_Tree::makeTree(const ArgVec& args, int first, int size, bool makeRed) { if (size == 0) return 0; int leftSize = size / 2; int rightSize = size - 1 - leftSize; ACU_RedBlackNode* leftTree = makeTree(args, first, leftSize, leftSize > rightSize && pow2min1(leftSize)); ACU_RedBlackNode* rightTree = makeTree(args, first + leftSize + 1, rightSize, false); ACU_RedBlackNode* t = new ACU_RedBlackNode(args[first + leftSize].dagNode, args[first + leftSize].multiplicity, leftTree, rightTree); if (makeRed) t->makeRed(); return t; } /* void ACU_Tree::copyToArgVec(ArgVec& dest) const { ArgVec::iterator j = dest->argArray.begin(); for (ACU_FastIter i(t); i.valid(); i.next(), ++j) { j->dagNode = i.getDagNode(); j->multiplicity = i.getMultiplicity(); } } */ int ACU_Tree::computeBaseSort2(BinarySymbol* symbol, ACU_RedBlackNode* root) { // // Postorder traversal of node is red-black tree without a sort. // ACU_Stack s; ACU_RedBlackNode* n; for(;;) { n = root->getLeft(); if (n == 0 || n->getSortIndex() != Sort::SORT_UNKNOWN) { tryRight: n = root->getRight(); if (n == 0 || n->getSortIndex() != Sort::SORT_UNKNOWN) break; } s.push(root); root = n; } int f = root->getDagNode()->getSortIndex(); f = symbol->computeMultSortIndex(f, f, root->getMultiplicity() - 1); n = root->getLeft(); if (n != 0) f = symbol->computeSortIndex(f, n->getSortIndex()); n = root->getRight(); if (n != 0) f = symbol->computeSortIndex(f, n->getSortIndex()); root->setSortIndex(f); while (!(s.empty())) { ACU_RedBlackNode* oldRoot = root; root = s.pop(); n = root->getLeft(); if (n == oldRoot) goto tryRight; if (n != 0) f = symbol->computeSortIndex(f, n->getSortIndex()); f = symbol->computeMultSortIndex(f, root->getDagNode()->getSortIndex(), root->getMultiplicity()); root->setSortIndex(f); } return f; } void ACU_Tree::mark() { // // Preorder traversal of unmarked nodes in red-black tree. // ACU_Stack i; ACU_RedBlackNode* n = root; for(;;) { while (n != 0 && !(n->isMarked())) { n->setMarked(); n->getDagNode()->mark(); i.push(n); n = n->getLeft(); } if (i.empty()) break; n = i.pop()->getRight(); } } bool ACU_Tree::makeCanonical(ACU_Tree& canonizedVersion, HashConsSet* hcs) { ACU_RedBlackNode* c = root->canonicalRebuild(hcs); if (c != root) { canonizedVersion.size = size; canonizedVersion.root = c; return true; } return false; } #ifdef CHECK_TREE void ACU_Tree::checkIntegrity(DagNode* dagNode, int multiplicity) const { // // should also check size // if (root != 0 && !(root->checkRedBlackProperty())) { if (dagNode != 0) { cerr << "dagNode = " << dagNode << "\t multiplcity = " << multiplicity << endl; } root->dump(cerr, 0); abort(); } } #endif Maude-Maude3.2/src/ACU_Persistent/ACU_Tree.hh000066400000000000000000000112111420036611000207010ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for red-black trees of argument-multiplicity pairs. // #ifndef _ACU_Tree_hh_ #define _ACU_Tree_hh_ #include "argVec.hh" #include "ACU_Pair.hh" #include "ACU_RedBlackNode.hh" #include "ACU_Stack.hh" class ACU_Tree { public: ACU_Tree(){} ACU_Tree(const ArgVec& source); void clear(); int getSize() const; int getMaxMult() const; void copyToArgVec(ArgVec& dest) const; DagNode* getSoleDagNode() const; int getSoleMultiplicity() const; bool find(DagNode* dagNode, ACU_Stack& path) const; bool find(Term* term, ACU_Stack& path) const ; bool findFirstPotentialMatch(Term* key, const Substitution& partial, ACU_Stack& path) const; bool findGeqMult(int multiplicity, ACU_Stack& path) const; void insertMult(DagNode* dagNode, int multiplicity); void deleteMult(ACU_Stack& path, int multiplicity); void deleteMult2(ACU_Stack& path, int multiplicity); int computeBaseSort(BinarySymbol* symbol) const; void mark(); #ifdef CHECK_TREE void checkIntegrity(DagNode* dagNode = 0, int multiplicity = 0) const; #endif // // Hash cons stuff. // bool makeCanonical(ACU_Tree& canonizedVersion, HashConsSet* hcs); private: static bool pow2min1(int i); static ACU_RedBlackNode* makeTree(const ArgVec& args, int first, int size, bool makeRed); static int computeBaseSort2(BinarySymbol* symbol, ACU_RedBlackNode* root); int size; ACU_RedBlackNode* root; friend class ACU_FastIter; friend class ACU_SlowIter; }; inline int ACU_Tree::getSize() const { return size; } inline void ACU_Tree::clear() { size = 0; root = 0; } inline int ACU_Tree::getMaxMult() const { return root->getMaxMult(); } inline DagNode* ACU_Tree::getSoleDagNode() const { Assert(size == 1, "more than one node in tree"); return root->getDagNode(); } inline int ACU_Tree::getSoleMultiplicity() const { Assert(size == 1, "more than one node in tree"); return root->getMultiplicity(); } inline bool ACU_Tree::find(DagNode* dagNode, ACU_Stack& path) const { return ACU_RedBlackNode::find(root, dagNode, path); } inline bool ACU_Tree::find(Term* term, ACU_Stack& path) const { return ACU_RedBlackNode::find(root, term, path); } inline bool ACU_Tree::findFirstPotentialMatch(Term* key, const Substitution& partial, ACU_Stack& path) const { return ACU_RedBlackNode::findFirstPotentialMatch(root, key, partial, path); } inline bool ACU_Tree::findGeqMult(int multiplicity, ACU_Stack& path) const { return ACU_RedBlackNode::findGeqMult(root, multiplicity, path); } inline int ACU_Tree::computeBaseSort(BinarySymbol* symbol) const { Assert(size > 0 && root != 0, "bad tree for sort computation"); int index = root->getSortIndex(); if (index != Sort::SORT_UNKNOWN) return index; return computeBaseSort2(symbol, root); } inline void ACU_Tree::insertMult(DagNode* dagNode, int multiplicity) { #ifdef CHECK_TREE checkIntegrity(); #endif int delta; root = ACU_RedBlackNode::consInsert(root, dagNode, multiplicity, delta); size += delta; #ifdef CHECK_TREE checkIntegrity(dagNode, multiplicity); #endif } inline void ACU_Tree::deleteMult(ACU_Stack& path, int multiplicity) { #ifdef CHECK_TREE checkIntegrity(); ACU_RedBlackNode* dagNode = path.top(); #endif int delta; root = ACU_RedBlackNode::consDelete(path, multiplicity, delta); size += delta; #ifdef CHECK_TREE checkIntegrity(dagNode, multiplicity); #endif } inline void ACU_Tree::deleteMult2(ACU_Stack& path, int multiplicity) { // // This version preserves the stack. // #ifdef CHECK_TREE checkIntegrity(); ACU_RedBlackNode* dagNode = path.top(); #endif path.save(); int delta; root = ACU_RedBlackNode::consDelete(path, multiplicity, delta); size += delta; path.restore(); #ifdef CHECK_TREE checkIntegrity(dagNode, multiplicity); #endif } #endif Maude-Maude3.2/src/ACU_Persistent/ChangeLog000077500000000000000000000373361420036611000205660ustar00rootroot000000000000002019-07-01 Steven Eker * ACU_RedBlackNode.hh: rewritten using new MemoryCell definition ===================================Maude123=========================================== 2017-04-20 Steven Eker * ACU_Find.cc (findFirstPotentialMatch): added comment ===================================Maude112a=========================================== 2013-09-26 Steven Eker * ACU_RedBlackNode.hh (new): set half word to SORT_UNKNOWN rather than relying on allocateMemoryCell() (new): call initFlags() (new): clean up; update comments; initFlags() becomes clearAllFlags() ===================================Maude98=========================================== 2010-04-19 Steven Eker * ACU_FastIter.hh (ACU_FastIter::next): avoid passing null to stackLeftmostPath() * ACU_Delete.cc (ACU_RedBlackNode::consDelete): use stackLeftmostPath() * ACU_Stack.hh (ACU_Stack::stackLeftmostPath): converted loop from while-do to do-while * ACU_SlowIter.hh (ACU_SlowIter::next): deleted commented out version ===================================Maude93a=========================================== 2010-02-18 Steven Eker * ACU_RedBlackNode.hh (ACU_RedBlackNode::getChild): use sign < 0 rather than getSignBit() in the hope that the compiler can be smart about optimizing the right shift ===================================Maude92c=========================================== 2009-12-09 Steven Eker * ACU_Tree.cc (makeCanonical): added * ACU_Tree.hh (class ACU_Tree): added decl for makeCanonical() 2009-12-08 Steven Eker * ACU_RedBlackNode.hh (class ACU_RedBlackNode): added decl for canonicalRebuild() * ACU_RedBlackNode.cc (canonicalRebuild): added * ACU_RedBlackNode.hh (ACU_RedBlackNode): removed what appears to be an unneeded getMemoryCell()->setByte() ===================================Maude92b=========================================== 2003-05-29 Steven Eker * ACU_Tree.hh (deleteMult2): added 2003-05-12 Steven Eker * ACU_RedBlackNode.hh (class ACU_RedBlackNode): deleted SAT_MULT from enum PublicValues 2003-05-06 Steven Eker * ACU_Tree.hh (class ACU_Tree): added decl for computeBaseSort2() * ACU_Tree.cc (recComputeBaseSort): deleted * ACU_Tree.hh (computeBaseSort): moved here and rewritten * ACU_Tree.cc (computeBaseSort2): added (recComputeBaseSort): deleted * ACU_Find.cc (findFirstPotentialMatch): use Term::UNKNOWN 2003-05-05 Steven Eker * ACU_Rebalance.cc (copyRebalance): use makeRedIfRed() (2 places) * ACU_Insert.cc (consInsert): use makeRedIfRed() * ACU_Delete.cc (consDelete): use makeRedIfRed() * ACU_Copy.cc (copy): use makeRedIfRed() (both versions) * ACU_RedBlackNode.hh (makeRedIfRed): added * ACU_Find.cc (findGeqMult): removed SAT_MULT Assert() * ACU_Insert.cc (consInsert): don't pass size to ACU_RedBlackNode() (consInsert): use getChild() (consInsert): removed SAT_MULT check * ACU_Copy.cc (copy): don't pass size to ACU_RedBlackNode() (both versions) (copy): simplified maxMult computation (both versions) * ACU_Stack.hh (class ACU_Stack): deleted decl for pathToIndex() * ACU_Stack.cc (pathToIndex): deleted * ACU_Find.cc (findIth): deleted * ACU_RedBlackNode.hh (getSize): deleted (class ACU_RedBlackNode): store maxMult as an int data member; deleted data member size (getMaxMult): use maxMult data member (ACU_RedBlackNode): don't set size; optimize maxMult calculation (class ACU_RedBlackNode): deleted decl for findIth() * ACU_Tree.hh (getSoleDagNode): added (class ACU_Tree): aded default ctor (clear): added (getSoleMultiplicity): added * ACU_Persistent.hh: renamed from ACU_RedBlack.hh; added class ACU_Tree, class ACU_Pair * ACU_SlowIter.hh (ACU_SlowIter): rewritten * ACU_FastIter.hh (ACU_FastIter): rewritten * ACU_Tree.hh (class ACU_Tree): added decl for recComputeBaseSort() (class ACU_Tree): updated decl for computeBaseSort() * ACU_Tree.cc (computeBaseSort): added (recComputeBaseSort): added * ACU_Tree.hh (class ACU_Tree): added decls for pow2min1() and makeTree() * ACU_Tree.cc (pow2min1): added (makeTree): added 2003-05-03 Steven Eker * ACU_Tree.cc: created * ACU_Stack.hh (class ACU_Stack): ACU_RedBlackNode no longer a friend in CHECK_RED_BLACK case * ACU_Delete.cc (consDelete): handle delta argument * ACU_Tree.hh (insertMult): rewritten (deleteMult): rewritten * ACU_RedBlackNode.hh (class ACU_RedBlackNode): updated decls for consInsert() and consDelete() * ACU_Insert.cc (consInsert): handle delta argument * ACU_Stack.hh (save): added (restore): added (class ACU_Stack): added data member old 2003-04-29 Steven Eker * ACU_Tree.hh: created * ACU_Pair.hh: created ===================================Maude80=========================================== 2003-03-21 Steven Eker * ACU_Find.cc (find): use getChild() (both versions) * ACU_RedBlackNode.hh (getChild): added (class ACU_RedBlackNode): flipped LEFT_INDEX and RIGHT_INDEX values 2003-03-10 Steven Eker * ACU_RedBlackNode.hh (class ACU_RedBlackNode): made getMaxMult() public 2003-02-25 Steven Eker * ACU_Insert.cc (consInsert2): updated Assert() * ACU_Find.cc (findGeqMult): updated Assert()s (findIth): updated Assert() * ACU_Delete.cc (consDelete2): updated Assert() * ACU_Stack.hh (top): updated Assert() (push): updated Assert() (pop): updated Assert() (unpop): updated Assert() (multiPop): updated Assert() * ACU_RedBlackNode.hh (new): updated Assert() (ACU_RedBlackNode): updated Assert()s ===================================Maude79=========================================== 2003-02-13 Steven Eker * ACU_RedBlackNode.hh (class ACU_RedBlackNode): deleted decls for fastFindGeqMult(), searchGeqMult(), maxMultOK(), stackLeftmostMultPath(), nextMult(), maxMultValid(), setMaxMult() (class ACU_RedBlackNode): made slow ctor public (ACU_RedBlackNode): fixed bug where we weren't setting maxMult * ACU_Find.cc: rewritten to take advantantage of new maxMult assumptions (maxMultOK): deleted (stackLeftmostMultPath): deleted (nextMult): deleted (fastFindGeqMult): deleted (searchGeqMult): deleted * ACU_Insert.cc (consInsert): handle maxMult * ACU_Delete.cc (consDelete): don't use optimized ACU_RedBlackNode() since we have no fast way of obtaining maxMult * ACU_RedBlackNode.hh (class ACU_RedBlackNode): deleted MAX_MULT_VALID (setMaxMult): deleted (maxMultValid): deleted (ACU_RedBlackNode): handle maxMult (both versions) * ACU_Copy.cc (copy): perform maxMult calculations (both copies) 2003-02-12 Steven Eker * ACU_Delete.cc (consDelete): added optional code for cheching the red-black property * ACU_Insert.cc (consInsert): added optional code for cheching the red-black property * ACU_Rebalance.cc (copyRebalance): removed bug catching code now that bug fixed * ACU_Delete.cc (consDelete): fixed nasty bug where we were making a black copy of a red victim in the case that the victim has enough multiplicity that it isn't removed from the tree - just has it's multiplicity lowered * ACU_RedBlackNode.hh (class ACU_RedBlackNode): added decls for both versions of checkRedBlackProperty() * ACU_RedBlackNode.cc (checkRedBlackProperty): added (2 versions) * ACU_Rebalance.cc (copyRebalance): added code to dump everything when bug in logic3 example happens * ACU_RedBlackNode.hh (class ACU_RedBlackNode): added decl for dump() * ACU_RedBlackNode.cc (dump): added 2003-02-10 Steven Eker * ACU_Find.cc (multOK): added (nextMult): rewritten using maxMultOK() (stackLeftmostMultPath): rewritten using maxMultOK() (nextMult): optimized * ACU_SlowIter.hh (next): fixed bug where we had !empty rather than !empty() 2003-02-07 Steven Eker * ACU_SlowIter.hh (next): simplified * ACU_Find.cc (nextMult): rewritten to fix symmetric bug * ACU_SlowIter.hh (next): rewritten to fix nasty stack underflow bug * ACU_RedBlackNode.hh (class ACU_RedBlackNode): added decls for stackLeftmostMultPath() and nextMult() * ACU_Find.cc (stackLeftmostMultPath): added (nextMult): added (findGeqMult): rewritten using stackLeftmostMultPath() and nextMult() 2003-02-03 Steven Eker * ACU_FastIter.hh (setMarked): deleted * ACU_RedBlackNode.hh (isMarked): added 2003-01-31 Steven Eker * ACU_Stack.cc: deleted commented out copy ctor & assignment code 2003-01-30 Steven Eker * ACU_TreeDagNode.hh (class ACU_TreeDagNode): updated decl for makeDelete() * ACU_TreeDagNode.cc (markArguments): use ACU_FastIter::setMarked() (makeDelete): ACU_SlowIter -> ACU_Stack * ACU_FastIter.hh (setMarked): added * ACU_TreeDagNode.cc (getHashValue): reimplemented using ACU_FastIter (stackArguments): reimplemented using ACU_FastIter (partialReplace): ACU_SlowIter -> ACU_Stack (makeExtensionInfo): reimplemented * ACU_TreeDagNode.hh (class ACU_TreeDagNode): deleted decl for findFirstPotentialMatch * ACU_TreeDagNode.cc (findFirstPotentialMatch): deleted * ACU_Find.cc: ACU_SlowIter -> ACU_Stack * ACU_RedBlack.cc: deleted * ACU_RedBlackNode.hh (class ACU_RedBlackNode): ACU_SlowIter -> ACU_Stack * ACU_FastIter.hh (ACU_FastIter): use stackLeftmostPath() (next): use stackLeftmostPath() (leftMost): deleted * ACU_SlowIter.hh (ACU_SlowIter): use stackLeftmostPath() (next): use stackLeftmostPath() (leftMost): deleted * ACU_Stack.hh (stackLeftmostPath): added * ACU_Insert.cc (consInsert): rewritten to make use of blackNode() and copy() 2003-01-29 Steven Eker * ACU_TreeDagArgumentIterator.cc (argument): use getDagNode() * ACU_TreeDagNode.cc: use new conventions in all routines * ACU_FastIter.hh (getArgument): becomes getDagNode() * ACU_Insert.cc (consInsert): use new conventions * ACU_Delete.cc (consDelete): use new conventions * ACU_Rebalance.cc (copyRebalance): use new conventions * ACU_SlowIter.hh (getArgument): becomes getDagNode() * ACU_Find.cc: use new conventions in all routines * ACU_RedBlackNode.hh (class ACU_RedBlackNode): major reoranization of class for efficiency and cleaness * ACU_Copy.cc (copy): rewritten to use new ctor and delta trick (both versions) 2003-01-28 Steven Eker * ACU_SlowIter.hh (class ACU_SlowIter): made base class ACU_Stack public until we figure out best permissions 2003-01-27 Steven Eker * ACU_RedBlackNode.hh (class ACU_RedBlackNode): updated decl for findIth() * ACU_Find.cc (findIth): implemented; return void * ACU_TreeDagNode.cc (partialReplace): rewritten using consDelete() * ACU_RedBlackNode.hh (getDagNode): added (getMultiplicity): added 2003-01-23 Steven Eker * ACU_TreeDagNode.cc (compareArguments): fix bug where we weren't checking r after doing subcompare * ACU_TreeDagNode.hh (getRoot): added 2003-01-22 Steven Eker * ACU_TreeDagNode.cc (compareArguments): added tree comparison * ACU_TreeDagArgumentIterator.cc: removed #pragma * ACU_TreeDagArgumentIterator.hh: removed #pragma * ACU_TreeDagNode.cc: removed #pragma * ACU_TreeDagNode.hh: removed #pragma * ACU_RedBlackNode.cc: removed #pragma * ACU_FastIter.hh (leftMost): use getLeft() (next): use getRight() * ACU_SlowIter.hh (next): use getRight() (leftMost): use getLeft() * ACU_Rebalance.cc (copyRebalance): use ACU_Stack * ACU_Copy.cc (copy): use ACU_Stack (both versions) * ACU_RedBlackNode.hh (class ACU_RedBlackNode): updated decls for copy() (both versions) and copyRebalance() * ACU_RedBlack.cc: deleted * ACU_RedBlackNode.hh: removed #pragma * ACU_FastIter.hh (class ACU_FastIter): derive from ACU_Stack * ACU_SlowIter.hh (class ACU_SlowIter): derive from ACU_Stack * ACU_RedBlackNode.hh (class ACU_RedBlackNode): made getSize() public; added decls for getLeft() and getRight() (getLeft): added (getRight): added * ACU_Stack.cc: created * ACU_Stack.hh: created; moved ACU_RedBlackNode::Stack stuff here * ACU_RedBlackNode.hh (class ACU_RedBlackNode): added PublicValues 2003-01-15 Steven Eker * ACU_TreeDagNode.cc (computeBaseSort): fixed stupid bug where we were looking at the left child twice instread of the right child * ACU_RedBlackNode.cc (Stack): commented out assignment and copy ctor; places where we might want to use them seem unsafe because of possible garbage colection of ACU_RedBlackNode following a representation change * ACU_RedBlackNode.hh (class ACU_RedBlackNode): added decl for pathToIndex() * ACU_RedBlackNode.cc (Stack): (copy ctor) added (operator=): added (pathToIndex): added * ACU_RedBlackNode.hh (class ACU_RedBlackNode): added copy ctor and assignment for Stack 2003-01-13 Steven Eker * ACU_RedBlackNode.hh (setSortIndex): added (getSortIndex): added * ACU_TreeDagNode.hh (class ACU_TreeDagNode): added decls for computeBaseSort() (2 versions) * ACU_TreeDagNode.cc (computeBaseSort): added 2 versions * ACU_TreeDagNode.hh (class ACU_TreeDagNode): added decl for makeDelete() * ACU_TreeDagNode.cc (makeDelete): added 2003-01-12 Steven Eker * ACU_TreeDagNode.cc (findFirstPotentialMatch): added * ACU_TreeDagNode.hh (class ACU_TreeDagNode): added decl for findFirstPotentialMatch() 2003-01-11 Steven Eker * ACU_TreeDagNode.cc (argVecToTree): copy sortIndex and reduced flag (treeToArgVec): copy sortIndex and reduced flag 2003-01-10 Steven Eker * ACU_TreeDagNode.hh (class ACU_TreeDagNode): added decl for overwriteWithInsert() * ACU_TreeDagNode.cc (overwriteWithInsert): added * ACU_Delete.cc (consDelete): use blackNode(); fixed bug where we weren't returning the new node * ACU_RedBlackNode.hh (redNode): moved here * ACU_RedBlackNode.cc (blackNode): moved here * ACU_Rebalance.cc (copyRebalance): many simplifications (copyRebalance): more code factoring 2003-01-09 Steven Eker * ACU_Rebalance.cc: created from experimental code * ACU_RedBlackNode.hh (class ACU_RedBlackNode): added decls for copyRebalance() and consDelete() (class ACU_RedBlackNode): added declarations for blackNode() and redNode() * ACU_Delete.cc: created * ACU_RedBlackNode.hh (class ACU_RedBlackNode): added decl for findFirstPotentialMatch(); deletd decls for findFirst() and createFromSortedVector() * ACU_Find.cc (findFirstPotentialMatch): added (findFirst): deleted * ACU_TreeDagNode.cc (markArguments): implemented * ACU_FastIter.hh: added ACU_TreeDagNode as a friend 2003-01-08 Steven Eker * ACU_TreeDagNode.cc (arguments): implemented (overwriteWithClone): implemented (makeClone): implemented * ACU_TreeDagArgumentIterator.cc: created * ACU_TreeDagArgumentIterator.hh (class ACU_TreeDagArgumentIterator): created * ACU_TreeDagNode.cc (makeTree): need to end recursion at size == 0 * ACU_RedBlackNode.hh (class ACU_RedBlackNode): ACU_TreeDagNode becomes a friend * ACU_TreeDagNode.cc (makeTree): added * ACU_RedBlack.cc: created * ACU_RedBlack.hh: created * ACU_TreeDagNode.cc: created * ACU_TreeDagNode.hh: created * ACU_Copy.cc: created from experimental code * ACU_Insert.cc: created from experimental code * ACU_Find.cc: created from experimental code * ACU_SlowIter.hh: created from experimental code * ACU_FastIter.hh: created from experimental code * ACU_RedBlackNode.cc: created from experimental code * ACU_RedBlackNode.hh: created from experimental code (ACU_RedBlackNode): set size here, rather than trying to compute it lazily Maude-Maude3.2/src/ACU_Persistent/Makefile.am000066400000000000000000000010631420036611000210310ustar00rootroot00000000000000noinst_LIBRARIES = libACU_Persistent.a libACU_Persistent_a_CPPFLAGS = \ -I$(top_srcdir)/src/Utility \ -I$(top_srcdir)/src/Interface \ -I$(top_srcdir)/src/Core \ -I$(top_srcdir)/src/Variable \ -I$(top_srcdir)/src/FullCompiler libACU_Persistent_a_SOURCES = \ ACU_RedBlackNode.cc \ ACU_Tree.cc EXTRA_DIST = \ ACU_Find.cc \ ACU_Insert.cc \ ACU_Copy.cc \ ACU_Delete.cc \ ACU_Rebalance.cc noinst_HEADERS = \ ACU_FastIter.hh \ ACU_Persistent.hh \ ACU_RedBlackNode.hh \ ACU_Stack.hh \ ACU_Pair.hh \ ACU_RedBlack.hh \ ACU_SlowIter.hh \ ACU_Tree.hh Maude-Maude3.2/src/ACU_Persistent/Makefile.in000066400000000000000000000535441420036611000210550ustar00rootroot00000000000000# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/ACU_Persistent ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_have_poll.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) AR = ar ARFLAGS = cru AM_V_AR = $(am__v_AR_@AM_V@) am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) am__v_AR_0 = @echo " AR " $@; am__v_AR_1 = libACU_Persistent_a_AR = $(AR) $(ARFLAGS) libACU_Persistent_a_LIBADD = am_libACU_Persistent_a_OBJECTS = \ libACU_Persistent_a-ACU_RedBlackNode.$(OBJEXT) \ libACU_Persistent_a-ACU_Tree.$(OBJEXT) libACU_Persistent_a_OBJECTS = $(am_libACU_Persistent_a_OBJECTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = \ ./$(DEPDIR)/libACU_Persistent_a-ACU_RedBlackNode.Po \ ./$(DEPDIR)/libACU_Persistent_a-ACU_Tree.Po am__mv = mv -f AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(libACU_Persistent_a_SOURCES) DIST_SOURCES = $(libACU_Persistent_a_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ $(top_srcdir)/mkinstalldirs ChangeLog DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ BUDDY_LIB = @BUDDY_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FLEX = @FLEX@ GCC_LIBS = @GCC_LIBS@ GMP_LIBS = @GMP_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSIGSEGV_LIB = @LIBSIGSEGV_LIB@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TECLA_LIBS = @TECLA_LIBS@ VERSION = @VERSION@ YICES2_LIB = @YICES2_LIB@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LIBRARIES = libACU_Persistent.a libACU_Persistent_a_CPPFLAGS = \ -I$(top_srcdir)/src/Utility \ -I$(top_srcdir)/src/Interface \ -I$(top_srcdir)/src/Core \ -I$(top_srcdir)/src/Variable \ -I$(top_srcdir)/src/FullCompiler libACU_Persistent_a_SOURCES = \ ACU_RedBlackNode.cc \ ACU_Tree.cc EXTRA_DIST = \ ACU_Find.cc \ ACU_Insert.cc \ ACU_Copy.cc \ ACU_Delete.cc \ ACU_Rebalance.cc noinst_HEADERS = \ ACU_FastIter.hh \ ACU_Persistent.hh \ ACU_RedBlackNode.hh \ ACU_Stack.hh \ ACU_Pair.hh \ ACU_RedBlack.hh \ ACU_SlowIter.hh \ ACU_Tree.hh all: all-am .SUFFIXES: .SUFFIXES: .cc .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/ACU_Persistent/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/ACU_Persistent/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libACU_Persistent.a: $(libACU_Persistent_a_OBJECTS) $(libACU_Persistent_a_DEPENDENCIES) $(EXTRA_libACU_Persistent_a_DEPENDENCIES) $(AM_V_at)-rm -f libACU_Persistent.a $(AM_V_AR)$(libACU_Persistent_a_AR) libACU_Persistent.a $(libACU_Persistent_a_OBJECTS) $(libACU_Persistent_a_LIBADD) $(AM_V_at)$(RANLIB) libACU_Persistent.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libACU_Persistent_a-ACU_RedBlackNode.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libACU_Persistent_a-ACU_Tree.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` libACU_Persistent_a-ACU_RedBlackNode.o: ACU_RedBlackNode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Persistent_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Persistent_a-ACU_RedBlackNode.o -MD -MP -MF $(DEPDIR)/libACU_Persistent_a-ACU_RedBlackNode.Tpo -c -o libACU_Persistent_a-ACU_RedBlackNode.o `test -f 'ACU_RedBlackNode.cc' || echo '$(srcdir)/'`ACU_RedBlackNode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Persistent_a-ACU_RedBlackNode.Tpo $(DEPDIR)/libACU_Persistent_a-ACU_RedBlackNode.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_RedBlackNode.cc' object='libACU_Persistent_a-ACU_RedBlackNode.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Persistent_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Persistent_a-ACU_RedBlackNode.o `test -f 'ACU_RedBlackNode.cc' || echo '$(srcdir)/'`ACU_RedBlackNode.cc libACU_Persistent_a-ACU_RedBlackNode.obj: ACU_RedBlackNode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Persistent_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Persistent_a-ACU_RedBlackNode.obj -MD -MP -MF $(DEPDIR)/libACU_Persistent_a-ACU_RedBlackNode.Tpo -c -o libACU_Persistent_a-ACU_RedBlackNode.obj `if test -f 'ACU_RedBlackNode.cc'; then $(CYGPATH_W) 'ACU_RedBlackNode.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_RedBlackNode.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Persistent_a-ACU_RedBlackNode.Tpo $(DEPDIR)/libACU_Persistent_a-ACU_RedBlackNode.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_RedBlackNode.cc' object='libACU_Persistent_a-ACU_RedBlackNode.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Persistent_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Persistent_a-ACU_RedBlackNode.obj `if test -f 'ACU_RedBlackNode.cc'; then $(CYGPATH_W) 'ACU_RedBlackNode.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_RedBlackNode.cc'; fi` libACU_Persistent_a-ACU_Tree.o: ACU_Tree.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Persistent_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Persistent_a-ACU_Tree.o -MD -MP -MF $(DEPDIR)/libACU_Persistent_a-ACU_Tree.Tpo -c -o libACU_Persistent_a-ACU_Tree.o `test -f 'ACU_Tree.cc' || echo '$(srcdir)/'`ACU_Tree.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Persistent_a-ACU_Tree.Tpo $(DEPDIR)/libACU_Persistent_a-ACU_Tree.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_Tree.cc' object='libACU_Persistent_a-ACU_Tree.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Persistent_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Persistent_a-ACU_Tree.o `test -f 'ACU_Tree.cc' || echo '$(srcdir)/'`ACU_Tree.cc libACU_Persistent_a-ACU_Tree.obj: ACU_Tree.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Persistent_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Persistent_a-ACU_Tree.obj -MD -MP -MF $(DEPDIR)/libACU_Persistent_a-ACU_Tree.Tpo -c -o libACU_Persistent_a-ACU_Tree.obj `if test -f 'ACU_Tree.cc'; then $(CYGPATH_W) 'ACU_Tree.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_Tree.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Persistent_a-ACU_Tree.Tpo $(DEPDIR)/libACU_Persistent_a-ACU_Tree.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_Tree.cc' object='libACU_Persistent_a-ACU_Tree.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Persistent_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Persistent_a-ACU_Tree.obj `if test -f 'ACU_Tree.cc'; then $(CYGPATH_W) 'ACU_Tree.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_Tree.cc'; fi` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/libACU_Persistent_a-ACU_RedBlackNode.Po -rm -f ./$(DEPDIR)/libACU_Persistent_a-ACU_Tree.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/libACU_Persistent_a-ACU_RedBlackNode.Po -rm -f ./$(DEPDIR)/libACU_Persistent_a-ACU_Tree.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-noinstLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: Maude-Maude3.2/src/ACU_Theory/000077500000000000000000000000001420036611000161075ustar00rootroot00000000000000Maude-Maude3.2/src/ACU_Theory/ACU_ArgumentIterator.cc000066400000000000000000000032131420036611000224010ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class ACU_ArgumentIterator. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "ACU_Theory.hh" // ACU theory class definitions #include "ACU_Term.hh" #include "ACU_ArgumentIterator.hh" bool ACU_ArgumentIterator::valid() const { return multiplicityRemaining > 0; } Term* ACU_ArgumentIterator::argument() const { Assert(multiplicityRemaining > 0, "no args left"); return (*argArray)[position].term; } void ACU_ArgumentIterator::next() { Assert(multiplicityRemaining > 0, "no args left"); --multiplicityRemaining; if (multiplicityRemaining == 0) { ++position; if (position < argArray->length()) multiplicityRemaining = (*argArray)[position].multiplicity; } } Maude-Maude3.2/src/ACU_Theory/ACU_ArgumentIterator.hh000066400000000000000000000027341420036611000224220ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for argument iterator for ACU terms // #ifndef _ACU_ArgumentIterator_hh_ #define _ACU_ArgumentIterator_hh_ #include "rawArgumentIterator.hh" class ACU_ArgumentIterator : public RawArgumentIterator { public: ACU_ArgumentIterator(const Vector* arguments); bool valid() const; Term* argument() const; void next(); private: const Vector* argArray; int position; int multiplicityRemaining; }; inline ACU_ArgumentIterator::ACU_ArgumentIterator(const Vector* arguments) { argArray = arguments; position = 0; multiplicityRemaining = (*arguments)[0].multiplicity; } #endif Maude-Maude3.2/src/ACU_Theory/ACU_BaseDagNode.cc000066400000000000000000000030531420036611000212030ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class ACU_BaseDagNode. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "ACU_Persistent.hh" #include "ACU_Theory.hh" // ACU theory class definitions #include "ACU_Symbol.hh" #include "ACU_DagNode.hh" #include "ACU_ExtensionInfo.hh" // ACU Red-Black class definitions #include "ACU_TreeDagNode.hh" int ACU_BaseDagNode::getSize() const { return isTree() ? safeCastNonNull(this)->getTree().getSize() : safeCastNonNull(this)->argArray.length(); } ExtensionInfo* ACU_BaseDagNode::makeExtensionInfo() { return new ACU_ExtensionInfo(this); } Maude-Maude3.2/src/ACU_Theory/ACU_BaseDagNode.hh000066400000000000000000000047461420036611000212270ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Base class for DAG nodes in the AC and ACU theories. // #ifndef _ACU_BaseDagNode_hh_ #define _ACU_BaseDagNode_hh_ #include "dagNode.hh" class ACU_BaseDagNode : public DagNode { public: enum NormalizationStatus { // // Default: no guarantees. // FRESH, // // Node was produced by an assignment in ACU matcher: // (a) all arguments are reduced up to strategy of our symbol // (this only holds if it was true of subject before matching); // (b) all arguments have the correct sort; and // (c) argument list in theory normal form. // ASSIGNMENT, // // As above but arguments are stored in a red-black (ACU_TreeDagNode) // rather than in an ArgVec (ACU_DagNode). // TREE }; ACU_BaseDagNode(ACU_Symbol* symbol); ExtensionInfo* makeExtensionInfo(); ACU_Symbol* symbol() const; NormalizationStatus getNormalizationStatus() const; void setNormalizationStatus(NormalizationStatus status); bool isTree() const; bool isFresh() const; int getSize() const; }; inline ACU_BaseDagNode::ACU_BaseDagNode(ACU_Symbol* symbol) : DagNode(symbol) { } inline ACU_Symbol* ACU_BaseDagNode::symbol() const { return safeCast(ACU_Symbol*, DagNode::symbol()); } inline ACU_BaseDagNode::NormalizationStatus ACU_BaseDagNode::getNormalizationStatus() const { return static_cast(getTheoryByte()); } inline bool ACU_BaseDagNode::isTree() const { return getTheoryByte() == TREE; } inline bool ACU_BaseDagNode::isFresh() const { return getTheoryByte() == FRESH; } inline void ACU_BaseDagNode::setNormalizationStatus(NormalizationStatus status) { setTheoryByte(status); } #endif Maude-Maude3.2/src/ACU_Theory/ACU_BndVarLhsAutomaton.cc000066400000000000000000000120321420036611000226170ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 2017 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class ACU_BndVarLhsAutomaton. // // utility stuff #include "macros.hh" #include "indent.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "variable.hh" #include "ACU_Persistent.hh" #include "ACU_Theory.hh" // interface class definitions #include "associativeSymbol.hh" #include "dagNode.hh" #include "extensionInfo.hh" // core class definitions #include "variableInfo.hh" #include "substitution.hh" // variable class definitions #include "variableSymbol.hh" #include "variableTerm.hh" // ACU Red-Black class definitions #include "ACU_SlowIter.hh" // ACU theory class definitions #include "ACU_Symbol.hh" #include "ACU_DagNode.hh" #include "ACU_TreeDagNode.hh" #include "ACU_BndVarLhsAutomaton.hh" ACU_BndVarLhsAutomaton::ACU_BndVarLhsAutomaton(ACU_Symbol* symbol, bool matchAtTop, bool collapsePossible, int nrVariables, VariableTerm* stripper, VariableTerm* collector) : ACU_CollectorLhsAutomaton(symbol, matchAtTop, collapsePossible, nrVariables, collector), stripperVarIndex(stripper->getIndex()), stripperSort(stripper->getSort()) { Assert(!(symbol->takeIdentity(stripperSort)), "stripper variable shouldn't be able take identity"); Assert(symbol->sortBound(stripperSort) == 1, "stripper variable must be of element sort"); } bool ACU_BndVarLhsAutomaton::match(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo) { if (collectorFree(solution)) { // // We only handle the situation where the collector variable is unbound. // The bound case is punted to the full matcher. // if (subject->symbol() == getSymbol()) { // // Non-collapse case. // DagNode* stripperDag = solution.value(stripperVarIndex); Assert(stripperDag != 0, "stripper variable is unbound"); Assert(stripperDag->symbol() != getSymbol(), "stripper variable bound to multiple aliens"); if (safeCast(ACU_BaseDagNode*, subject)->isTree()) { // // Red-black case. // ACU_TreeDagNode* s = safeCast(ACU_TreeDagNode*, subject); ACU_SlowIter i; if (!(s->getTree().find(stripperDag, i))) return false; if (collect(i, s, solution)) { returnedSubproblem = 0; if (extensionInfo) { extensionInfo->setValidAfterMatch(true); extensionInfo->setMatchedWhole(true); } return true; } // fall into full matcher } else { // // ArgVec case. // ACU_DagNode* s = safeCast(ACU_DagNode*, subject); int pos = s->binarySearch(stripperDag); if (pos < 0) return false; if (collect(pos, s, solution)) { returnedSubproblem = 0; if (extensionInfo) { extensionInfo->setValidAfterMatch(true); extensionInfo->setMatchedWhole(true); } return true; } // fall into full matcher } } else { // // Collapse case. // if (!getCollapsePossible()) return false; Assert(extensionInfo == 0 && subject->getSortIndex() != Sort::SORT_UNKNOWN, "collapse to top not handled by ACU_BndVarLhsAutomaton"); DagNode* stripperDag = solution.value(stripperVarIndex); Assert(stripperDag != 0, "stripper variable is unbound"); Assert(stripperDag->symbol() != getSymbol(), "stripper variable bound to multiple aliens"); if (!(stripperDag->equal(subject))) return false; returnedSubproblem = 0; collapse(solution); return true; } } return ACU_LhsAutomaton::match(subject, solution, returnedSubproblem, extensionInfo); } #ifdef DUMP void ACU_BndVarLhsAutomaton::dump(ostream& s, const VariableInfo& variableInfo, int indentLevel) { s << Indent(indentLevel) << "Begin{ACU_BndVarLhsAutomaton}\n"; ++indentLevel; s << Indent(indentLevel) << "stripperVarIndex = " << stripperVarIndex << " \"" << variableInfo.index2Variable(stripperVarIndex) << '"' << "\tstripperSort = \"" << stripperSort << '\n'; ACU_CollectorLhsAutomaton::dump(s, variableInfo, indentLevel); s << Indent(indentLevel - 1) << "End{ACU_BndVarLhsAutomaton}\n"; } #endif Maude-Maude3.2/src/ACU_Theory/ACU_BndVarLhsAutomaton.hh000066400000000000000000000035411420036611000226360ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 2017 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for ACU bound variable stripper-collector lhs automaton. // #ifndef _ACU_BndVarLhsAutomaton_hh_ #define _ACU_BndVarLhsAutomaton_hh_ #include "ACU_CollectorLhsAutomaton.hh" class ACU_BndVarLhsAutomaton : public ACU_CollectorLhsAutomaton { NO_COPYING(ACU_BndVarLhsAutomaton); public: ACU_BndVarLhsAutomaton(ACU_Symbol* symbol, bool matchAtTop, bool collapsePossible, int nrVariables, VariableTerm* stripper, VariableTerm* collector); // // Standard ACU_LhsAutomaton operations. // bool match(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo); #ifdef DUMP void dump(ostream& s, const VariableInfo& variableInfo, int indentLevel); #endif private: // // The stripper variable strips off one argument. It must have // an element sort that cannot take the identity and thus it is // guaranteed bound to a single alien. // const int stripperVarIndex; Sort* const stripperSort; }; #endif Maude-Maude3.2/src/ACU_Theory/ACU_CollapseMatcher.cc000066400000000000000000000174521420036611000221650ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for matching where ACU top symbol collapses. // bool ACU_LhsAutomaton::uniqueCollapseMatch(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo) { // // Because one subterm cannot take the identity element we can only // collapse to that subterm (which has multiplicity 1). // Every other subterm must be a variable that can take identity and // it either must be already bound to identity or is now bound to identity. // SubproblemAccumulator subproblems; int nrTopVariables = topVariables.length(); Assert(nrTopVariables >= 1, "not enough top variables to collapse"); for (int i = 0; i < nrTopVariables; i++) { TopVariable& tv = topVariables[i]; if (tv.takeIdentity) { DagNode* d = solution.value(tv.index); if (d == 0) solution.bind(tv.index, topSymbol->getIdentityDag()); else { if(!(topSymbol->getIdentity()->equal(d))) return false; } if (tv.abstracted != 0) { Subproblem* subproblem; if(!(tv.abstracted->match(solution.value(tv.index), solution, subproblem))) return false; subproblems.add(subproblem); } } else { Assert(tv.multiplicity == 1, "variable with multiplicity > 1 cannot take identity"); } } Subproblem* subproblem; if (!(uniqueCollapseAutomaton->match(subject,solution, subproblem, extensionInfo))) return false; subproblems.add(subproblem); returnedSubproblem = subproblems.extractSubproblem(); return true; } void ACU_LhsAutomaton::bindUnboundVariablesToIdentity(Substitution& solution, int exception) { int nrTopVariables = topVariables.length(); for (int i = 0; i < nrTopVariables; i++) { if (i != exception) { int vi = topVariables[i].index; if (solution.value(vi) == 0) solution.bind(vi, topSymbol->getIdentityDag()); } } } bool ACU_LhsAutomaton::multiwayCollapseMatch(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo) { Term* identity = topSymbol->getIdentity(); int matchingVariable = NONE; int lastViableVariable = NONE; int nrViableVariables = 0; int nrTopVariables = topVariables.length(); for (int i = 0; i < nrTopVariables; i++) { TopVariable& tv = topVariables[i]; Assert(tv.takeIdentity, "variable can't take identity"); DagNode* d = solution.value(tv.index); if (d != 0) { if (!(identity->equal(d))) { if (matchingVariable != NONE || tv.multiplicity > 1) return false; matchingVariable = i; } } else { if (tv.multiplicity == 1) { lastViableVariable = i; ++nrViableVariables; } else solution.bind(tv.index, topSymbol->getIdentityDag()); } } if (matchingVariable != NONE) { // // Exactly one variable was bound to something other than our identity. // TopVariable& mv = topVariables[matchingVariable]; bool r = subject->matchVariable(mv.index, mv.sort, matchAtTop, solution, returnedSubproblem, extensionInfo); if (r) bindUnboundVariablesToIdentity(solution, NONE); return r; } // // At this point all variables are either (a) bound to our identity; or // (b) unbound and have multiplicity 1 (viable). // if (identity->equal(subject)) { // // Subject is our identity; we must still deal with alien extension. // returnedSubproblem = 0; bindUnboundVariablesToIdentity(solution, NONE); if (extensionInfo != 0) { extensionInfo->setValidAfterMatch(true); extensionInfo->setMatchedWhole(true); } return true; } if (nrViableVariables == 0) { // // All variables are bound to our identity and the subject is not // our identity. We can succeed only if we have entension and the // subject contains our identity. // if (extensionInfo == 0) return false; TopVariable& tv = topVariables[0]; // pick any since they are all bound to identity Assert(identity->equal(solution.value(tv.index)), "should be identity"); return subject->matchVariable(tv.index, tv.sort, matchAtTop, solution, returnedSubproblem, extensionInfo); } if (nrViableVariables == 1) { // // All variables except one are bound to our identity and the // subject is not our identity. The last viable variable must match // the subject (with extension if present). // This case need to make good on our constraint propagation // guarantee when we have no extension. // TopVariable& vv = topVariables[lastViableVariable]; return subject->matchVariable(vv.index, vv.sort, matchAtTop, solution, returnedSubproblem, extensionInfo); } // // General case: multiple unbound variables that can take identity and // have multiplicity 1. Any bound variables are already bound to identity. // DisjunctiveSubproblemAccumulator alternatives(solution); for (int i = 0; i < nrTopVariables; i++) { TopVariable& tv = topVariables[i]; if (solution.value(tv.index) == 0) { Assert(tv.multiplicity == 1, "unbound variable of multiplicity > 1"); local.copy(solution); bindUnboundVariablesToIdentity(local, i); Subproblem* subproblem; if (subject->matchVariable(tv.index, tv.sort, matchAtTop, local, subproblem, extensionInfo)) { if (!(alternatives.empty()) && extensionInfo != 0) { // // Need to exclude the case where subject = id + ext and // we match our chosen variable against our identity // in all but the first branch to avoid duplicate solutions. // SubproblemAccumulator subproblems; subproblems.add(subproblem); subproblems.add(new EqualitySubproblem(identity, tv.index, false)); subproblem = subproblems.extractSubproblem(); } alternatives.addOption(local, subproblem, extensionInfo); continue; } } } return alternatives.extract(solution, returnedSubproblem, extensionInfo); } bool ACU_LhsAutomaton::collapseMatch(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo) { if (uniqueCollapseAutomaton != 0) return uniqueCollapseMatch(subject, solution, returnedSubproblem, extensionInfo); Subproblem* subproblem; if (!multiwayCollapseMatch(subject, solution, subproblem, extensionInfo)) return false; SubproblemAccumulator subproblems; subproblems.add(subproblem); int nrVariables = solution.nrFragileBindings(); int nrTopVariables = topVariables.length(); for (int i = 0; i < nrTopVariables; i++) { TopVariable& tv = topVariables[i]; if (tv.abstracted != 0) { subproblems.add(new VariableAbstractionSubproblem(tv.abstracted, tv.index, nrVariables)); } } returnedSubproblem = subproblems.extractSubproblem(); return true; } Maude-Maude3.2/src/ACU_Theory/ACU_CollectorLhsAutomaton.cc000066400000000000000000000145141420036611000234000ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class ACU_CollectorLhsAutomaton. // // utility stuff #include "macros.hh" #include "indent.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "ACU_Persistent.hh" #include "ACU_Theory.hh" // interface class definitions #include "associativeSymbol.hh" #include "dagNode.hh" #include "term.hh" // core class definitions #include "variableInfo.hh" #include "substitution.hh" // variable class definitions #include "variableSymbol.hh" #include "variableTerm.hh" // ACU theory class definitions #include "ACU_Symbol.hh" #include "ACU_DagNode.hh" #include "ACU_TreeDagNode.hh" #include "ACU_CollectorLhsAutomaton.hh" ACU_CollectorLhsAutomaton::ACU_CollectorLhsAutomaton(ACU_Symbol* symbol, bool matchAtTop, bool collapsePossible, int nrVariables, VariableTerm* collector) : ACU_LhsAutomaton(symbol, matchAtTop, collapsePossible, nrVariables), collectorVarIndex(collector->getIndex()) { Assert(symbol->sortConstraintFree(), "not sort constraint free"); collectorSort = collector->getSort(); Assert(symbol->sortBound(collectorSort) == UNBOUNDED, "collector must have unbounded sort"); int index = collectorSort->index(); if (index == 0) collectorSort = 0; // kind can take anything else if (index == 1) { ConnectedComponent* c = collectorSort->component(); if (c->nrMaximalSorts() == 1 && c->errorFree()) collectorSort = 0; // top sort in an error-free component can take anything } } bool ACU_CollectorLhsAutomaton::collect(int stripped, ACU_DagNode* subject, Substitution& solution) const { int nrArgs = subject->argArray.length(); if (nrArgs <= 2) { // // Check for case where there's only one arg left after stripping. // int m = subject->argArray[0].multiplicity; int t = 0; if (nrArgs == 2) { m += subject->argArray[1].multiplicity; t = 1 - stripped; } if (m == 2) { DagNode* sd = subject->argArray[t].dagNode; if (collectorSort == 0 || sd->leq(collectorSort)) { solution.bind(collectorVarIndex, sd); return true; } else return false; } } // // Make binding for collector variable. // ArgVec::const_iterator source = subject->argArray.begin(); const ArgVec::const_iterator e = subject->argArray.end(); const ArgVec::const_iterator victim = source + stripped; int strippedMultiplicity = victim->multiplicity - 1; if (strippedMultiplicity == 0) --nrArgs; ACU_Symbol* topSymbol = subject->symbol(); ACU_DagNode* d = new ACU_DagNode(topSymbol, nrArgs, ACU_DagNode::ASSIGNMENT); ArgVec::iterator dest = d->argArray.begin(); for (; source != victim; ++dest, ++source) *dest = *source; if (strippedMultiplicity > 0) { dest->dagNode = source->dagNode; dest->multiplicity = strippedMultiplicity; ++dest; } for (++source; source != e; ++dest, ++source) *dest = *source; Assert(dest == d->argArray.end(), "iterators inconsistant"); // // Do any sort calculations needed. // const Sort* cs = collectorSort; if (cs == 0) { if (subject->isReduced()) { int index = topSymbol->getUniqueSortIndex(); Assert(index != 0, "bad uniqueSortIndex"); if (index < 0) index = d->argVecComputeBaseSort(); d->setSortIndex(index); d->setReduced(); } } else { int index = d->argVecComputeBaseSort(); if (!leq(index, cs)) return false; if (subject->isReduced()) { d->setSortIndex(index); d->setReduced(); } } solution.bind(collectorVarIndex, d); return true; } bool ACU_CollectorLhsAutomaton::collect(ACU_Stack& stripped, // destroyed ACU_TreeDagNode* subject, Substitution& solution) const { ACU_Tree t(subject->getTree()); t.deleteMult(stripped, 1); DagNode* d; const Sort* cs = collectorSort; if (t.getSize() == 1 && t.getMaxMult() == 1) { // // Only one argument left for collector. // d = t.getSoleDagNode(); if (cs != 0 && !leq(d->getSortIndex(), cs)) return false; } else { ACU_Symbol* topSymbol = subject->symbol(); if (cs == 0) { // // The collector sort is maximal (error-free kind) or // the error sort. Either way sort checks are disabled. // d = new ACU_TreeDagNode(topSymbol, t); if (subject->isReduced()) { int index = topSymbol->getUniqueSortIndex(); Assert(index != 0, "bad uniqueSortIndex"); if (index < 0) index = t.computeBaseSort(topSymbol); d->setSortIndex(index); d->setReduced(); } } else { // // Need to check sort of the dag we are going to // bind to the collector variable. // int index = t.computeBaseSort(topSymbol); if (!leq(index, cs)) return false; d = new ACU_TreeDagNode(topSymbol, t); if (subject->isReduced()) { d->setSortIndex(index); d->setReduced(); } } } solution.bind(collectorVarIndex, d); return true; } #ifdef DUMP void ACU_CollectorLhsAutomaton::dump(ostream& s, const VariableInfo& variableInfo, int indentLevel) { s << Indent(indentLevel) << "collectorVarIndex = " << collectorVarIndex << " \"" << variableInfo.index2Variable(collectorVarIndex) << "\"\tcollectorSort = "; if (collectorSort == 0) s << "(sort checks off)\n"; else s << collectorSort << '\n'; ACU_LhsAutomaton::dump(s, variableInfo, indentLevel); } #endif Maude-Maude3.2/src/ACU_Theory/ACU_CollectorLhsAutomaton.hh000066400000000000000000000046441420036611000234150ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Base class for ACU stripper-collector left hand side automata. // #ifndef _ACU_CollectorLhsAutomaton_hh_ #define _ACU_CollectorLhsAutomaton_hh_ #include "ACU_LhsAutomaton.hh" class ACU_CollectorLhsAutomaton : public ACU_LhsAutomaton { NO_COPYING(ACU_CollectorLhsAutomaton); public: ACU_CollectorLhsAutomaton(ACU_Symbol* symbol, bool matchAtTop, bool collapsePossible, int nrVariables, VariableTerm* collector); #ifdef DUMP void dump(ostream& s, const VariableInfo& variableInfo, int indentLevel); #endif protected: bool collectorFree(Substitution& solution) const; bool collect(int stripped, ACU_DagNode* subject, Substitution& solution) const; bool collect(ACU_Stack& stripped, // destroyed ACU_TreeDagNode* subject, Substitution& solution) const; void collapse(Substitution& solution) const; private: // // The stripper variable/automaton/term in the derived class // strips off one argument. // The collector variable collects all the other arguments. // const int collectorVarIndex; // // The collector sort must be unbounded. If it is the error sort // or the unique maximal sort of an error free component we set // it to 0 to switch off sort checks since they should always succeed. // const Sort* collectorSort; }; inline bool ACU_CollectorLhsAutomaton::collectorFree(Substitution& solution) const { return solution.value(collectorVarIndex) == 0; } inline void ACU_CollectorLhsAutomaton::collapse(Substitution& solution) const { solution.bind(collectorVarIndex, getSymbol()->getIdentityDag()); } #endif Maude-Maude3.2/src/ACU_Theory/ACU_DagArgumentIterator.cc000066400000000000000000000033341420036611000230210ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class ACU_DagArgumentIterator. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "ACU_Persistent.hh" #include "ACU_Theory.hh" // ACU theory class definitions #include "ACU_Symbol.hh" #include "ACU_DagNode.hh" #include "ACU_DagArgumentIterator.hh" bool ACU_DagArgumentIterator::valid() const { return multiplicityRemaining > 0; } DagNode* ACU_DagArgumentIterator::argument() const { Assert(multiplicityRemaining > 0, "no args left"); return (*argArray)[position].dagNode; } void ACU_DagArgumentIterator::next() { Assert(multiplicityRemaining > 0, "no args left"); --multiplicityRemaining; if (multiplicityRemaining == 0) { ++position; if (position < argArray->length()) multiplicityRemaining = (*argArray)[position].multiplicity; } } Maude-Maude3.2/src/ACU_Theory/ACU_DagArgumentIterator.hh000066400000000000000000000030101420036611000230220ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for argument iterator for ACU dag nodes. // #ifndef _ACU_DagArgumentIterator_hh_ #define _ACU_DagArgumentIterator_hh_ #include "rawDagArgumentIterator.hh" class ACU_DagArgumentIterator : public RawDagArgumentIterator { public: ACU_DagArgumentIterator(const ArgVec* arguments); bool valid() const; DagNode* argument() const; void next(); private: const ArgVec* argArray; int position; int multiplicityRemaining; }; inline ACU_DagArgumentIterator::ACU_DagArgumentIterator(const ArgVec* arguments) { argArray = arguments; position = 0; multiplicityRemaining = (*arguments)[0].multiplicity; } #endif Maude-Maude3.2/src/ACU_Theory/ACU_DagNode.cc000077500000000000000000000456751420036611000204330ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2021 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class ACU_DagNode. // // utility stuff #include "macros.hh" #include "vector.hh" #include "mpzSystem.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "variable.hh" #include "ACU_Theory.hh" #include "ACU_Persistent.hh" // interface class definitions #include "term.hh" // core class definitions #include "substitution.hh" #include "pendingUnificationStack.hh" #include "unificationContext.hh" // variable class definitions #include "variableSymbol.hh" #include "variableDagNode.hh" // ACU theory class definitions #include "ACU_Symbol.hh" #include "ACU_DagNode.hh" #include "ACU_DagArgumentIterator.hh" #include "ACU_ExtensionInfo.hh" #include "ACU_Subproblem.hh" // ACU Red-Black class definitions #include "ACU_TreeDagNode.hh" #include "ACU_FastIter.hh" // our stuff #include "ACU_Normalize.cc" #include "ACU_FastMerge.cc" #include "ACU_MergeSort.cc" #include "ACU_DagOperations.cc" Vector ACU_DagNode::runsBuffer(INITIAL_RUNS_BUFFER_SIZE); ACU_DagNode* getACU_DagNode(DagNode* dagNode) { ACU_BaseDagNode* d = safeCast(ACU_BaseDagNode*, dagNode); if (d->isTree()) return ACU_TreeDagNode::treeToArgVec(safeCast(ACU_TreeDagNode*, d)); return safeCast(ACU_DagNode*, d); } RawDagArgumentIterator* ACU_DagNode::arguments() { return new ACU_DagArgumentIterator(&argArray); } size_t ACU_DagNode::getHashValue() { size_t hashValue = symbol()->getHashValue(); for (const Pair& p : argArray) hashValue = hash(hashValue, p.dagNode->getHashValue(), p.multiplicity); return hashValue; } int ACU_DagNode::compareArguments(const DagNode* other) const { int len = argArray.length(); const ACU_BaseDagNode* d = safeCast(const ACU_BaseDagNode*, other); if (d->isTree()) { const ACU_TreeDagNode* d2 = safeCast(const ACU_TreeDagNode*, d); int r = len - d2->getTree().getSize(); if (r != 0) return r; // // Because the lengths compare equal, we will iterate over // both the red-black tree and the ArgVec, only checking for // the end of the ArgVec, and not checking j.valid() // This will confuse static analyzers. // ACU_FastIter j(d2->getTree()); ArgVec::const_iterator i = argArray.begin(); const ArgVec::const_iterator e = argArray.end(); do { r = i->multiplicity - j.getMultiplicity(); if (r != 0) return r; r = i->dagNode->compare(j.getDagNode()); if (r != 0) return r; j.next(); ++i; } while (i != e); Assert(!j.valid(), "iterator problem - didn't exhaust tree"); } else { const ArgVec& argArray2 = safeCast(const ACU_DagNode*, d)->argArray; int r = len - argArray2.length(); if (r != 0) return r; ArgVec::const_iterator j = argArray2.begin(); ArgVec::const_iterator i = argArray.begin(); const ArgVec::const_iterator e = argArray.end(); do { r = i->multiplicity - j->multiplicity; if (r != 0) return r; r = i->dagNode->compare(j->dagNode); if (r != 0) return r; ++j; ++i; } while (i != e); Assert(j == argArray2.end(), "iterator problem"); } return 0; } DagNode* ACU_DagNode::markArguments() { argArray.evacuate(); Assert(argArray.length() > 0, "no arguments"); // // We avoid recursing on the first subterm that shares our symbol. // Symbol* s = symbol(); DagNode* r = 0; for (const Pair& p : argArray) { DagNode* d = p.dagNode; if (r == 0 && d->symbol() == s) r = d; else d->mark(); } return r; } DagNode* ACU_DagNode::copyEagerUptoReduced2() { // cerr << "copyEagerUptoReduced2() " << this << endl; int nrArgs = argArray.length(); ACU_Symbol* s = symbol(); ACU_DagNode* n = new ACU_DagNode(s, nrArgs); if (s->getPermuteStrategy() == BinarySymbol::EAGER) { for (int i = 0; i < nrArgs; i++) { n->argArray[i].dagNode = argArray[i].dagNode->copyEagerUptoReduced(); n->argArray[i].multiplicity = argArray[i].multiplicity; } } else { for (int i = 0; i < nrArgs; i++) n->argArray[i] = argArray[i]; } return n; } DagNode* ACU_DagNode::copyAll2() { int nrArgs = argArray.length(); ACU_Symbol* s = symbol(); ACU_DagNode* n = new ACU_DagNode(s, nrArgs); for (int i = 0; i < nrArgs; i++) { n->argArray[i].dagNode = argArray[i].dagNode->copyAll(); n->argArray[i].multiplicity = argArray[i].multiplicity; } return n; } void ACU_DagNode::clearCopyPointers2() { if (symbol()->getPermuteStrategy() == BinarySymbol::EAGER) { for (const Pair& p : argArray) p.dagNode->clearCopyPointers(); } } void ACU_DagNode::overwriteWithClone(DagNode* old) { int nrArgs = argArray.length(); ACU_DagNode* d = new(old) ACU_DagNode(symbol(), nrArgs); d->copySetRewritingFlags(this); d->setTheoryByte(getTheoryByte()); d->setSortIndex(getSortIndex()); fastCopy(argArray.begin(), argArray.end(), d->argArray.begin()); } DagNode* ACU_DagNode::makeClone() { int nrArgs = argArray.length(); ACU_DagNode* d = new ACU_DagNode(symbol(), nrArgs); d->copySetRewritingFlags(this); d->setTheoryByte(getTheoryByte()); d->setSortIndex(getSortIndex()); fastCopy(argArray.begin(), argArray.end(), d->argArray.begin()); return d; } DagNode* ACU_DagNode::copyWithReplacement(int argIndex, DagNode* replacement) { int nrArgs = argArray.length(); Assert(argIndex < nrArgs, "bad argIndex = " << argIndex << " when nrArgs = " << nrArgs); ACU_Symbol* s = symbol(); ACU_DagNode* n = new ACU_DagNode(s, nrArgs); ArgVec& args2 = n->argArray; int p = 0; for (int i = 0; i < nrArgs; i++) { if (i != argIndex) args2[p++] = argArray[i]; else { int m = argArray[i].multiplicity - 1; if (m > 0) { args2[p].dagNode = argArray[i].dagNode; args2[p].multiplicity = m; ++p; } } } Assert(p >= 1, "no arguments left"); args2.contractTo(p); args2.expandBy(1); args2[p].dagNode = replacement; args2[p].multiplicity = 1; return n; } DagNode* ACU_DagNode::copyWithReplacement(Vector& redexStack, int first, int last) { // // We need to build a copy of our dag node, replacing those // arguments that were stacked with those on the stack between // first and last. Unfortunately, unstackable flags are not // a reliable guide to which arguments were stacked since they // may have become true since the arguments were stacked. // int nrArgs = argArray.length(); // // The first task is to calculate the number of physical arguments // in the new dag node. // int nrNewArgs = 0; { int j = first; int argNr = 0; // notional argument number int nextReplacementIndex = redexStack[j].argIndex(); for (int i = 0; i < nrArgs; i++) { int m = argArray[i].multiplicity; // // We figure out if this block of m identical arguments was // stacked by checking if our notional arg number matches // the next stacked arg number. // if (argNr == nextReplacementIndex) { nrNewArgs += m; // stacked so each will need a slot in new arg array j += m; if (j <= last) nextReplacementIndex = redexStack[j].argIndex(); else { // // No more stacked arguments; each remaining physical // argument will use one slot in new arg array. // nrNewArgs += nrArgs - (i + 1); break; } } else ++nrNewArgs; // not stacked so they will use a single slot in new arg array argNr += m; } } // // Now make the new node. // ACU_DagNode* n = new ACU_DagNode(symbol(), nrNewArgs); { ArgVec& args = n->argArray; int j = first; int k = 0; // new physical arg number int argNr = 0; // notional argument number int nextReplacementIndex = redexStack[j].argIndex(); for (int i = 0; i < nrArgs; i++) { int m = argArray[i].multiplicity; if (argNr == nextReplacementIndex) { for (int n = 0; n < m ; n++) { args[k].dagNode = redexStack[j].node(); args[k].multiplicity = 1; ++j; ++k; } nextReplacementIndex = (j <= last) ? redexStack[j].argIndex() : NONE; } else { args[k].dagNode = argArray[i].dagNode; args[k].multiplicity = m; ++k; } argNr += m; } } return n; } void ACU_DagNode::partialReplace(DagNode* replacement, ExtensionInfo* extensionInfo) { ACU_ExtensionInfo* e = safeCast(ACU_ExtensionInfo*, extensionInfo); DagNode* unmatched = e->buildUnmatchedPortion(); argArray.resizeWithoutPreservation(2); argArray[0].set(unmatched, 1); argArray[1].set(replacement, 1); setNormalizationStatus(FRESH); repudiateSortInfo(); } DagNode* ACU_DagNode::partialConstruct(DagNode* replacement, ExtensionInfo* extensionInfo) { ACU_DagNode* n = new ACU_DagNode(symbol(), 2); ACU_ExtensionInfo* e = safeCast(ACU_ExtensionInfo*, extensionInfo); n->argArray[0].set(e->buildUnmatchedPortion(), 1); n->argArray[1].set(replacement, 1); return n; } bool ACU_DagNode::matchVariableWithExtension(int index, const Sort* sort, Substitution& /* solution */, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo) { int bound = symbol()->sortBound(sort); if (bound == 1) return false; // // This code could be much more sophisticated: in particular we look for // the subject having total subterm multiplicity of 2 and return unique solution. // // There is also the possibility that our variable could be bound; in this case // we could avoid generating and solving the subproblem. But this case is so // rare because the extension means we matching at the top, the binding would // have had to be made by some external agency (e.g. a meta level). // The extra code needed to do the optimal thing with extension is not // worth the performance gain. // // May use runsBuffer // ACU_ExtensionInfo* e = safeCast(ACU_ExtensionInfo*, extensionInfo); int totalSubjectMultiplicity = 0; int nrArgs = argArray.length(); Vector currentMultiplicity(nrArgs); for (int i = 0; i < nrArgs; ++i) { int m = argArray[i].multiplicity; currentMultiplicity[i] = m; totalSubjectMultiplicity += m; } e->setUpperBound(totalSubjectMultiplicity - 2); ACU_Subproblem* subproblem = new ACU_Subproblem(this, e); subproblem->addSubjects(currentMultiplicity); subproblem->addTopVariable(index, 1, 2, bound, sort); returnedSubproblem = subproblem; extensionInfo->setValidAfterMatch(false); return true; } int ACU_DagNode::argVecComputeBaseSort() const { ACU_Symbol* s = symbol(); if (const Sort* uniSort = s->uniformSort()) { // // If symbol has a uniform sort structure do a fast sort computation. // if (!(uniSort->component()->errorFree())) { int lastIndex = Sort::SORT_UNKNOWN; for (const Pair& p : argArray) { int index = p.dagNode->getSortIndex(); Assert(index >= Sort::ERROR_SORT, "bad sort index"); if (index != lastIndex) { if (!(::leq(index, uniSort))) return Sort::ERROR_SORT; lastIndex = index; } } } return uniSort->index(); } // // Standard sort calculation. // int sortIndex; ArgVec::const_iterator i = argArray.begin(); const ArgVec::const_iterator e = argArray.end(); { int index = i->dagNode->getSortIndex(); Assert(index >= Sort::ERROR_SORT, "bad sort index"); sortIndex = s->computeMultSortIndex(index, index, i->multiplicity - 1); } for (++i; i != e; ++i) { int index = i->dagNode->getSortIndex(); Assert(index >= Sort::ERROR_SORT, "bad sort index"); sortIndex = s->computeMultSortIndex(sortIndex, index, i->multiplicity); } return sortIndex; } // // Unification code. // DagNode::ReturnResult ACU_DagNode::computeBaseSortForGroundSubterms(bool warnAboutUnimplemented) { ReturnResult result = GROUND; for (const Pair& p : argArray) { ReturnResult r = p.dagNode->computeBaseSortForGroundSubterms(warnAboutUnimplemented); if (r > result) result = r; // NONGROUND dominates GROUND, UNIMPLEMENTED dominates NONGROUND } if (result == GROUND) { symbol()->computeBaseSort(this); setGround(); } return result; } bool ACU_DagNode::computeSolvedForm2(DagNode* rhs, UnificationContext& solution, PendingUnificationStack& pending) { DebugEnter(this << " =? " << rhs); if (symbol() == rhs->symbol()) { // // ACU unification problems with the same top symbol need to be collected and solved // simultaneously for termination reasons. // pending.push(symbol(), this, rhs); return true; } if (VariableDagNode* v = dynamic_cast(rhs)) { VariableDagNode* r = v->lastVariableInChain(solution); if (DagNode* value = solution.value(r->getIndex())) return computeSolvedForm2(value, solution, pending); // // We now treat unification problems f(...) =? X where X's representative // variable is unbound as full ACU unification problems now that the variable // theory no longer resolves such problems and we require // purification. // pending.push(symbol(), this, rhs); return true; } return pending.resolveTheoryClash(this, rhs); } void ACU_DagNode::insertVariables2(NatSet& occurs) { for (const Pair& p : argArray) p.dagNode->insertVariables(occurs); } DagNode* ACU_DagNode::instantiate2(const Substitution& substitution, bool maintainInvariants) { ACU_Symbol* s = symbol(); int nrArgs = argArray.length(); for (int i = 0; i < nrArgs; ++i) { if (DagNode* n = argArray[i].dagNode->instantiate(substitution, maintainInvariants)) { // // Argument changed under instantiation - need to make a new // dagnode. // bool ground = true; ACU_DagNode* d = new ACU_DagNode(s, nrArgs); // // Copy the arguments we already looked at. // for (int j = 0; j < i; ++j) { if (!(argArray[j].dagNode->isGround())) ground = false; d->argArray[j] = argArray[j]; } // // Handle current argument. // d->argArray[i].dagNode = n; d->argArray[i].multiplicity = argArray[i].multiplicity; if (!(n->isGround())) ground = false; // // Handle remaining arguments. // for (++i; i < nrArgs; ++i) { DagNode* a = argArray[i].dagNode; if (DagNode* n = a->instantiate(substitution, maintainInvariants)) a = n; if (!(a->isGround())) ground = false; d->argArray[i].dagNode = a; d->argArray[i].multiplicity = argArray[i].multiplicity; } if (maintainInvariants) { // // Normalize the new dagnode; if it doesn't collapse and // all its arguments are ground we compute its base sort. // if (!(d->dumbNormalizeAtTop()) && ground) { s->computeBaseSort(d); d->setGround(); } Assert(d->isTree() == false, "Oops we got a tree! " << d); } else { if (ground) d->setGround(); } return d; } } return 0; // unchanged } // // Narrowing code. // bool ACU_DagNode::indexVariables2(NarrowingVariableInfo& indices, int baseIndex) { bool ground = true; for (const Pair& p : argArray) { if (!(p.dagNode->indexVariables(indices, baseIndex))) ground = false; } return ground; } DagNode* ACU_DagNode::instantiateWithReplacement(const Substitution& substitution, const Vector* eagerCopies, int argIndex, DagNode* newDag) { int nrArgs = argArray.length(); ACU_Symbol* s = symbol(); bool eager = (eagerCopies != 0) && symbol()->getPermuteStrategy() == BinarySymbol::EAGER; ACU_DagNode* n = new ACU_DagNode(s, nrArgs); ArgVec& args2 = n->argArray; int p = 0; for (int i = 0; i < nrArgs; i++) { int m = argArray[i].multiplicity; if (i == argIndex) { --m; if (m == 0) continue; } DagNode* d = argArray[i].dagNode; SAFE_INSTANTIATE(d, eager, substitution, *eagerCopies); args2[p].dagNode = d; args2[p].multiplicity = m; ++p; } Assert(p >= 1, "no arguments left"); args2.contractTo(p); args2.expandBy(1); args2[p].dagNode = newDag; args2[p].multiplicity = 1; return n; } DagNode* ACU_DagNode::instantiateWithCopies2(const Substitution& substitution, const Vector& eagerCopies) { ACU_Symbol* s = symbol(); bool eager = symbol()->getPermuteStrategy() == BinarySymbol::EAGER; int nrArgs = argArray.length(); for (int i = 0; i < nrArgs; ++i) { DagNode* a = argArray[i].dagNode; DagNode* n = eager ? a->instantiateWithCopies(substitution, eagerCopies) : a->instantiate(substitution, false); if (n != 0) { // // Argument changed under instantiation - need to make a new // dagnode. // //bool ground = true; ACU_DagNode* d = new ACU_DagNode(s, nrArgs); // // Copy the arguments we already looked at. // for (int j = 0; j < i; ++j) { //if (!(argArray[j].dagNode->isGround())) // ground = false; d->argArray[j] = argArray[j]; } // // Handle current argument. // d->argArray[i].dagNode = n; d->argArray[i].multiplicity = argArray[i].multiplicity; //if (!(n->isGround())) // ground = false; // // Handle remaining arguments. // for (++i; i < nrArgs; ++i) { DagNode* a = argArray[i].dagNode; SAFE_INSTANTIATE(a, eager, substitution, eagerCopies); //if (!(a->isGround())) // ground = false; d->argArray[i].dagNode = a; d->argArray[i].multiplicity = argArray[i].multiplicity; } // // Currently the only user of this function is PositionState::rebuildAndInstantiateDag() // via instantiateWithCopies(), SAFE_INSTANTIATE() and instantiateWithReplacement(), // and this is only used for various kinds of narrowing steps. These are followed // by reduction so we don't need to worry about: // normal forms // sort computations // ground flags // // If this changes in the future the following will be needed: // #if 0 if (!(d->dumbNormalizeAtTop()) && ground) { s->computeBaseSort(d); d->setGround(); } Assert(d->isTree() == false, "Oops we got a tree! " << d); #endif return d; } } return 0; // unchanged } Maude-Maude3.2/src/ACU_Theory/ACU_DagNode.hh000066400000000000000000000157471420036611000204370ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2020 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for ArgVec based DAG nodes in the AC and ACU theories. // #ifndef _ACU_DagNode_hh_ #define _ACU_DagNode_hh_ #include "ACU_BaseDagNode.hh" #include "ACU_Pair.hh" #include "argVec.hh" #include "ACU_FastIter.hh" #if 1 extern int CONVERT_THRESHOLD; extern int MERGE_THRESHOLD; #endif class ACU_DagNode : public ACU_BaseDagNode { public: ACU_DagNode(ACU_Symbol* symbol, int size, NormalizationStatus status = FRESH); // // Member functions required by theory interface. // RawDagArgumentIterator* arguments(); size_t getHashValue(); int compareArguments(const DagNode* other) const; void overwriteWithClone(DagNode* old); DagNode* makeClone(); DagNode* copyWithReplacement(int argIndex, DagNode* replacement); DagNode* copyWithReplacement(Vector& redexStack, int first, int last); // // Member functions required to handle extension information. // bool matchVariableWithExtension(int index, const Sort* sort, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo); void partialReplace(DagNode* replacement, ExtensionInfo* extensionInfo); DagNode* partialConstruct(DagNode* replacement, ExtensionInfo* extensionInfo); // // Unification member functions. // ReturnResult computeBaseSortForGroundSubterms(bool warnAboutUnimplemented); bool computeSolvedForm2(DagNode* rhs, UnificationContext& solution, PendingUnificationStack& pending); void insertVariables2(NatSet& occurs); DagNode* instantiate2(const Substitution& substitution, bool maintainInvariants); // // Interface for narrowing. // bool indexVariables2(NarrowingVariableInfo& indices, int baseIndex); DagNode* instantiateWithReplacement(const Substitution& substitution, const Vector* eagerCopies, int argIndex, DagNode* newDag); DagNode* instantiateWithCopies2(const Substitution& substitution, const Vector& eagerCopies); // // Functions particular to ACU_DagNode. // int nrArgs() const; DagNode* getArgument(int i) const; int getMultiplicity(int i) const; int argVecComputeBaseSort() const; private: enum Sizes { #if 1 CONVERT_THRESHOLD = 8, MERGE_THRESHOLD = 16, #endif INITIAL_RUNS_BUFFER_SIZE = 4 // must be > 0 }; typedef ACU_Pair Pair; // // Theory interface functions. // DagNode* markArguments(); DagNode* copyEagerUptoReduced2(); DagNode* copyAll2(); void clearCopyPointers2(); // // Normalization functions. // static ArgVec::iterator fastCopy(ArgVec::const_iterator i, ArgVec::const_iterator e, ArgVec::iterator d); static ArgVec::iterator fastCopy(ACU_FastIter& i, ArgVec::iterator d); bool normalizeAtTop(); bool dumbNormalizeAtTop(); void copyAndBinaryInsert(const ACU_DagNode* source, DagNode* dagNode, int multiplicity); void fastMerge(const ACU_DagNode* source0, const ACU_DagNode* source1); void fastMerge(const ACU_DagNode* source0, const ACU_TreeDagNode* source1); void fastMerge(const ACU_TreeDagNode* source0, const ACU_TreeDagNode* source1); void sortAndUniquize(); void flattenSortAndUniquize(int expansion); void mergeSortAndUniquize(); void collapse(DagNode* arg); void insertAlien(ACU_BaseDagNode* normalForm, int nMult, DagNode* alien, int aMult); // // Functions for ACU specific operations. // int findFirstPotentialMatch(Term* key, const Substitution& partial) const; int binarySearch(DagNode* key) const; int binarySearch(Term* key) const; bool eliminateSubject(DagNode* target, int multiplicity, Vector& subjectMultiplicity); bool eliminateArgument(Term* target); // // Arguments under ACU symbol. // ArgVec argArray; // // Pre-allocated buffer for run-time use. // static Vector runsBuffer; // // Most related classes need direct access to our argument list for efficiency. // friend class ACU_Symbol; // to reduce subterms prior to rewrite, normalization friend class ACU_Term; // for term->DAG conversion & comparison friend class ACU_LhsAutomaton; // for matching DAG subject friend class ACU_AlienAlienLhsAutomaton; // for matching DAG subject friend class ACU_CollectorLhsAutomaton; // for matching DAG subject friend class ACU_NGA_LhsAutomaton; // for matching DAG subject friend class ACU_VarLhsAutomaton; // for matching DAG subject friend class ACU_BndVarLhsAutomaton; // for matching DAG subject friend class ACU_GndLhsAutomaton; // for matching DAG subject friend class ACU_NonLinearLhsAutomaton; // for matching DAG subject friend class ACU_RhsAutomaton; // for constructing replacement DAG friend class ACU_Subproblem; // for constructing substitution friend class ACU_UnificationSubproblem2; // for constructing substitution friend class ACU_ExtensionInfo; // for constructing matched portion friend class ACU_DagArgumentIterator; // to accesss Pair friend class ACU_TreeDagNode; // for conversion friend class ACU_BaseDagNode; // HACK for getSize friend ACU_DagNode* getACU_DagNode(DagNode* dagNode); }; ACU_DagNode* getACU_DagNode(DagNode* dagNode); inline ACU_DagNode::ACU_DagNode(ACU_Symbol* symbol, int size, NormalizationStatus status) : ACU_BaseDagNode(symbol), argArray(size) { setNormalizationStatus(status); } inline int ACU_DagNode::nrArgs() const { return argArray.length(); } inline DagNode* ACU_DagNode::getArgument(int i) const { return argArray[i].dagNode; } inline int ACU_DagNode::getMultiplicity(int i) const { return argArray[i].multiplicity; } inline ArgVec::iterator ACU_DagNode::fastCopy(ArgVec::const_iterator i, ArgVec::const_iterator e, ArgVec::iterator d) { // // This beats the STL copy() algorithm because the latter maintains // a counter. // while (i != e) { *d = *i; ++d; ++i; } return d; } inline ArgVec::iterator ACU_DagNode::fastCopy(ACU_FastIter& i, ArgVec::iterator d) { while (i.valid()) { d->dagNode = i.getDagNode(); d->multiplicity = i.getMultiplicity(); ++d; i.next(); } return d; } #endif Maude-Maude3.2/src/ACU_Theory/ACU_DagOperations.cc000066400000000000000000000124041420036611000216460ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Fast operations on ACU dag nodes. // int ACU_DagNode::findFirstPotentialMatch(Term* key, const Substitution& partial) const { // // Return the smallest index whose subdag is a potential match // for key, given the partial substitution for key's variables. // If we know that no subdag can match we return an index 1 beyond the // maximal index. // const ArgVec::const_iterator args = argArray.begin(); // for speed int first = argArray.length(); // return index beyond arg array prospects Assert(first > 0, "no args"); int upper = first - 1; int lower = 0; do { int probe = (upper + lower) / 2; int r = key->partialCompare(partial, args[probe].dagNode); switch (r) { case Term::GREATER: { lower = probe + 1; break; } case Term::EQUAL: { return probe; } case Term::LESS: { upper = probe - 1; break; } case Term::UNKNOWN: { // // We need to treat probe as a potential match, and search to see if there // is one with a smaller index. // first = probe; upper = probe - 1; break; } } } while (lower <= upper); return first; } int ACU_DagNode::binarySearch(DagNode* key) const { // // Returns index of argument equal key, or a -ve value pos otherwise. // In the latter case ~pos is the index of the smallest element greater // than key, and can be argArray.length() if key is greater than all elements // in the arrray. // const ArgVec::const_iterator args = argArray.begin(); // for speed int upper = argArray.length() - 1; Assert(upper >= 0, "no args"); int lower = 0; do { // // upper and lower will be non-negative at this point so declaring their sum // to be unsigned allows the compiler to optimize the division on machines // that round integer division towards zero. // unsigned int sum = upper + lower; int probe = sum / 2; int r = key->compare(args[probe].dagNode); if (r == 0) return probe; if (r < 0) upper = probe - 1; else lower = probe + 1; } while (lower <= upper); return ~lower; } int ACU_DagNode::binarySearch(Term* key) const { // // Returns index of argument equal key or -1 otherwise. // const ArgVec::const_iterator args = argArray.begin(); // for speed int upper = argArray.length() - 1; Assert(upper >= 0, "no args"); int lower = 0; do { // // upper and lower will be non-negative at this point so declaring their sum // to be unsigned allows the compiler to optimize the division on machines // that round integer division towards zero. // unsigned int sum = upper + lower; int probe = sum / 2; int r = key->compare(args[probe].dagNode); if (r == 0) return probe; if (r < 0) upper = probe - 1; else lower = probe + 1; } while (lower <= upper); return -1; } bool ACU_DagNode::eliminateSubject(DagNode* target, int multiplicity, Vector& subjectMultiplicity) { ACU_Symbol* topSymbol = symbol(); Term* identity = topSymbol->getIdentity(); if (identity != 0 && identity->equal(target)) return true; if (target->symbol() == topSymbol) { ArgVec& args = getACU_DagNode(target)->argArray; int nrArgs = args.length(); for (int i = 0; i < nrArgs; i++) { DagNode* d = args[i].dagNode; int m = args[i].multiplicity; int pos = binarySearch(d); if (pos < 0 || (subjectMultiplicity[pos] -= m * multiplicity) < 0) return false; } } else { int pos = binarySearch(target); if (pos < 0 || (subjectMultiplicity[pos] -= multiplicity) < 0) return false; } return true; } bool ACU_DagNode::eliminateArgument(Term* target) { int pos = binarySearch(target); if (pos >= 0) { int nrArgs = argArray.length() - 1; for (int i = pos; i < nrArgs; i++) argArray[i] = argArray[i + 1]; if (nrArgs == 0 || (nrArgs == 1 && argArray[0].multiplicity == 1)) { // // Eliminating target causes ACU dag node to collapse to its remaining // argument (or its original argument if only argument was target). // DagNode* remaining = (symbol()->getPermuteStrategy() == BinarySymbol::EAGER) ? argArray[0].dagNode : argArray[0].dagNode->copyReducible(); remaining->overwriteWithClone(this); return true; } argArray.contractTo(nrArgs); } return false; } Maude-Maude3.2/src/ACU_Theory/ACU_ExtensionInfo.cc000066400000000000000000000113531420036611000217010ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2021 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class ACU_ExtensionInfo. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "ACU_Persistent.hh" #include "ACU_Theory.hh" // ACU theory class definitions #include "ACU_Symbol.hh" #include "ACU_DagNode.hh" #include "ACU_TreeDagNode.hh" #include "ACU_ExtensionInfo.hh" DagNode* ACU_ExtensionInfo::buildMatchedPortion() const { if (matchedWhole()) return subject; ACU_DagNode* s = getACU_DagNode(subject); ACU_DagNode* n = new ACU_DagNode(s->symbol(), s->argArray.length(), ACU_DagNode::ASSIGNMENT); ArgVec::iterator dest = n->argArray.begin(); DagNode* d = unmatched.getNode(); if (d == 0) { // // Unmatched stuff is given by a multiplicity vector. // Vector::const_iterator i = unmatchedMultiplicity.begin(); for (const ACU_Pair& source : s->argArray) { int m = source.multiplicity - *i; Assert(m >= 0, "bad unmatchedMultiplicity"); if (m > 0) { dest->set(source.dagNode, m); ++dest; } ++i; } } else if (d->symbol() == s->symbol()) { // // Unmatched stuff is given by a dag node in our theory. // ACU_DagNode* u = getACU_DagNode(d); ArgVec::const_iterator i = u->argArray.begin(); for (const ACU_Pair& source : s->argArray) { int m = source.multiplicity; if (i->dagNode == source.dagNode) { m -= i->multiplicity; Assert(m >= 0, "bad unmatched"); ++i; if (m == 0) continue; } dest->set(source.dagNode, m); ++dest; } } else { // // Unmatched stuff is given an alien dag node. // for (const ACU_Pair& source : s->argArray) { int m = source.multiplicity; if (d == source.dagNode) { --m; if (m == 0) continue; } dest->set(source.dagNode, m); ++dest; } } int size = dest - n->argArray.begin(); Assert(size > 1 || n->argArray[0].multiplicity > 1, "must match more than one thing"); n->argArray.contractTo(size); return n; } DagNode* ACU_ExtensionInfo::buildUnmatchedPortion() const { if (DagNode* d = unmatched.getNode()) return d; Assert(!(subject->isTree()), "tree form!"); int size = 0; int lastNonZero; int nrArgs = unmatchedMultiplicity.size(); for (int i = 0; i < nrArgs; ++i) { if (unmatchedMultiplicity[i] > 0) { ++size; lastNonZero = i; } } Assert(size >= 1, "no unmatched portion"); ACU_DagNode* s = safeCast(ACU_DagNode*, subject); if (size == 1 && unmatchedMultiplicity[lastNonZero] == 1) return s->argArray[lastNonZero].dagNode; ACU_DagNode* n = new ACU_DagNode(s->symbol(), size, ACU_DagNode::ASSIGNMENT); ArgVec::const_iterator source = s->argArray.begin(); ArgVec::iterator dest = n->argArray.begin(); for (int t : unmatchedMultiplicity) { if (t > 0) { dest->set(source->dagNode, t); ++dest; } ++source; } return n; } ExtensionInfo* ACU_ExtensionInfo::makeClone() const { ACU_ExtensionInfo* e = new ACU_ExtensionInfo(subject); e->setValidAfterMatch(validAfterMatch()); bool whole = matchedWhole(); e->setMatchedWhole(whole); if (!whole) { if (DagNode* d = unmatched.getNode()) e->unmatched.setNode(d); else e->unmatchedMultiplicity = unmatchedMultiplicity; // deep copy } e->upperBound = upperBound; return e; } void ACU_ExtensionInfo::copy(const ExtensionInfo* extensionInfo) { const ACU_ExtensionInfo* e = safeCast(const ACU_ExtensionInfo*, extensionInfo); setValidAfterMatch(e->validAfterMatch()); bool whole = e->matchedWhole(); setMatchedWhole(whole); subject = e->subject; if (!whole) { if (DagNode* d = e->unmatched.getNode()) unmatched.setNode(d); else unmatchedMultiplicity = e->unmatchedMultiplicity; // deep copy } upperBound = e->upperBound; } Maude-Maude3.2/src/ACU_Theory/ACU_ExtensionInfo.hh000066400000000000000000000057561420036611000217250ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class to record what parts of an ACU DAG node were not matched. // #ifndef _ACU_ExtensionInfo_hh_ #define _ACU_ExtensionInfo_hh_ #include "extensionInfo.hh" #include "dagRoot.hh" class ACU_ExtensionInfo : public ExtensionInfo { public: ACU_ExtensionInfo(ACU_BaseDagNode* subject); DagNode* buildMatchedPortion() const; ExtensionInfo* makeClone() const; void copy(const ExtensionInfo* extensionInfo); // // Stuff specific to ACU_ExtensionInfo. // DagNode* buildUnmatchedPortion() const; // // We (sometimes) keep track of the maximum amount of // stuff we can put in the extension and still match // two arguments. // void setUpperBound(int multiplicity); int getUpperBound() const; // // Member functions for tracking the stuff in the extension // as a dag node. // void setUnmatched(DagNode* unmatched); DagNode* getUnmatched() const; // // Member functions for tracking the stuff in the // extension as a vector of unmatched multiplicities. // void clear(); // setup vector and clear it void reset(); // setup vector without clearing it void setUnmatched(int argIndex, int multiplicity); private: ACU_BaseDagNode* subject; DagRoot unmatched; Vector unmatchedMultiplicity; int upperBound; }; inline ACU_ExtensionInfo::ACU_ExtensionInfo(ACU_BaseDagNode* subject) : subject(subject) { } inline void ACU_ExtensionInfo::setUpperBound(int multiplicity) { upperBound = multiplicity; } inline int ACU_ExtensionInfo::getUpperBound() const { return upperBound; } inline void ACU_ExtensionInfo::setUnmatched(DagNode* dagNode) { unmatched.setNode(dagNode); } inline DagNode* ACU_ExtensionInfo::getUnmatched() const { return unmatched.getNode(); } inline void ACU_ExtensionInfo::clear() { unmatched.setNode(0); int nrArgs = subject->getSize(); unmatchedMultiplicity.resize(nrArgs); for (int i = 0; i < nrArgs; i++) unmatchedMultiplicity[i] = 0; } inline void ACU_ExtensionInfo::reset() { unmatched.setNode(0); unmatchedMultiplicity.resize(subject->getSize()); } inline void ACU_ExtensionInfo::setUnmatched(int argIndex, int multiplicity) { unmatchedMultiplicity[argIndex] = multiplicity; } #endif Maude-Maude3.2/src/ACU_Theory/ACU_FastMerge.cc000066400000000000000000000111271420036611000207650ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Three fast merge functions: // ArgVec and ArgVec // ArgVec and red-black // red-black and red-black // void ACU_DagNode::fastMerge(const ACU_DagNode* source0, const ACU_DagNode* source1) { // // Merge the argArrays from source0 and source1 into our argArray. // argArray.resizeWithoutPreservation(source0->argArray.length() + source1->argArray.length()); ArgVec::const_iterator s0 = source0->argArray.begin(); const ArgVec::const_iterator e0 = source0->argArray.end(); ArgVec::const_iterator s1 = source1->argArray.begin(); const ArgVec::const_iterator e1 = source1->argArray.end(); ArgVec::iterator d = argArray.begin(); for(;;) { int r = s0->dagNode->compare(s1->dagNode); if (r < 0) { *d = *s0; ++d; ++s0; if (s0 == e0) goto source0Exhausted; } else if (r > 0) { *d = *s1; ++d; ++s1; goto checkSource1; } else { d->dagNode = s0->dagNode; d->multiplicity = s0->multiplicity + s1->multiplicity; ++d; ++s0; ++s1; if (s0 == e0) { source0Exhausted: d = fastCopy(s1, e1, d); break; } checkSource1: if (s1 == e1) { d = fastCopy(s0, e0, d); break; } } } argArray.contractTo(d - argArray.begin()); } void ACU_DagNode::fastMerge(const ACU_DagNode* source0, const ACU_TreeDagNode* source1) { // // Merge the argArray from source0 with red-black tree from // source1 into our argArray. // const ACU_Tree& tree1 = source1->getTree(); argArray.resizeWithoutPreservation(source0->argArray.length() + tree1.getSize()); ArgVec::const_iterator s0 = source0->argArray.begin(); const ArgVec::const_iterator e0 = source0->argArray.end(); ACU_FastIter s1(tree1); ArgVec::iterator d = argArray.begin(); for(;;) { DagNode* d1 = s1.getDagNode(); int r = s0->dagNode->compare(d1); if (r < 0) { *d = *s0; ++d; ++s0; if (s0 == e0) goto source0Exhausted; } else if (r > 0) { d->dagNode = d1; d->multiplicity = s1.getMultiplicity(); ++d; s1.next(); goto checkSource1; } else { d->dagNode = d1; d->multiplicity = s0->multiplicity + s1.getMultiplicity(); ++d; ++s0; s1.next(); if (s0 == e0) { source0Exhausted: d = fastCopy(s1, d); break; } checkSource1: if (!s1.valid()) { d = fastCopy(s0, e0, d); break; } } } argArray.contractTo(d - argArray.begin()); } void ACU_DagNode::fastMerge(const ACU_TreeDagNode* source0, const ACU_TreeDagNode* source1) { // // Merge the red-black tree from source0 with red-black tree // from source1 into our argArray. // const ACU_Tree& tree0 = source0->getTree(); const ACU_Tree& tree1 = source1->getTree(); argArray.resizeWithoutPreservation(tree0.getSize() + tree1.getSize()); ACU_FastIter s0(tree0); ACU_FastIter s1(tree1); ArgVec::iterator d = argArray.begin(); for(;;) { DagNode* d0 = s0.getDagNode(); DagNode* d1 = s1.getDagNode(); int r = d0->compare(d1); if (r < 0) { d->dagNode = d0; d->multiplicity = s0.getMultiplicity(); ++d; s0.next(); if (!s0.valid()) goto source0Exhausted; } else if (r > 0) { d->dagNode = d1; d->multiplicity = s1.getMultiplicity(); ++d; s1.next(); goto checkSource1; } else { d->dagNode = d0; d->multiplicity = s0.getMultiplicity() + s1.getMultiplicity(); ++d; s0.next(); s1.next(); if (!s0.valid()) { source0Exhausted: d = fastCopy(s1, d); break; } checkSource1: if (!s1.valid()) { d = fastCopy(s0, d); break; } } } argArray.contractTo(d - argArray.begin()); } Maude-Maude3.2/src/ACU_Theory/ACU_GndLhsAutomaton.cc000066400000000000000000000100321420036611000221510ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class ACU_GndLhsAutomaton. // // utility stuff #include "macros.hh" #include "indent.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "variable.hh" #include "ACU_Persistent.hh" #include "ACU_Theory.hh" // interface class definitions #include "associativeSymbol.hh" #include "dagNode.hh" #include "term.hh" #include "extensionInfo.hh" // core class definitions #include "substitution.hh" // ACU Red-Black class definitions #include "ACU_SlowIter.hh" // ACU theory class definitions #include "ACU_Symbol.hh" #include "ACU_DagNode.hh" #include "ACU_GndLhsAutomaton.hh" #include "ACU_TreeDagNode.hh" ACU_GndLhsAutomaton::ACU_GndLhsAutomaton(ACU_Symbol* symbol, bool matchAtTop, bool collapsePossible, int nrVariables, Term* stripperTerm, VariableTerm* collector) : ACU_CollectorLhsAutomaton(symbol, matchAtTop, collapsePossible, nrVariables, collector), stripperTerm(stripperTerm) { Assert(stripperTerm->ground(), "stripper term must be ground"); } bool ACU_GndLhsAutomaton::match(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo) { if (collectorFree(solution)) { if (subject->symbol() == getSymbol()) { // // Non-collapse case. // if (safeCast(ACU_BaseDagNode*, subject)->isTree()) { // // Red-black case. // ACU_TreeDagNode* s = safeCast(ACU_TreeDagNode*, subject); ACU_SlowIter i; if (!(s->getTree().find(stripperTerm, i))) return false; if (collect(i, s, solution)) { returnedSubproblem = 0; if (extensionInfo) { extensionInfo->setValidAfterMatch(true); extensionInfo->setMatchedWhole(true); } return true; } } else { // // ArgVec case. // ACU_DagNode* s = safeCast(ACU_DagNode*, subject); int pos = s->binarySearch(stripperTerm); if (pos < 0) return false; if (collect(pos, s, solution)) { returnedSubproblem = 0; if (extensionInfo) { extensionInfo->setValidAfterMatch(true); extensionInfo->setMatchedWhole(true); } return true; } } if (extensionInfo == 0) return false; // no extension implies true failure } else { // // Collapse case. // if (!getCollapsePossible()) return false; Assert(extensionInfo == 0 && subject->getSortIndex() != Sort::SORT_UNKNOWN, "collapse to top not handled by ACU_GndLhsAutomaton"); if (!(stripperTerm->equal(subject))) return false; returnedSubproblem = 0; collapse(solution); return true; } } return ACU_LhsAutomaton::match(subject, solution, returnedSubproblem, extensionInfo); } #ifdef DUMP void ACU_GndLhsAutomaton::dump(ostream& s, const VariableInfo& variableInfo, int indentLevel) { s << Indent(indentLevel) << "Begin{ACU_GndLhsAutomaton}\n"; ++indentLevel; s << Indent(indentLevel) << "stripperTerm = \"" << stripperTerm << '\n'; ACU_CollectorLhsAutomaton::dump(s, variableInfo, indentLevel); s << Indent(indentLevel - 1) << "End{ACU_GndLhsAutomaton}\n"; } #endif Maude-Maude3.2/src/ACU_Theory/ACU_GndLhsAutomaton.hh000066400000000000000000000033441420036611000221730ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for ACU ground alien stripper-collector algorithm lhs automaton. // #ifndef _ACU_GndLhsAutomaton_hh_ #define _ACU_GndLhsAutomaton_hh_ #include "ACU_CollectorLhsAutomaton.hh" class ACU_GndLhsAutomaton : public ACU_CollectorLhsAutomaton { NO_COPYING(ACU_GndLhsAutomaton); public: ACU_GndLhsAutomaton(ACU_Symbol* symbol, bool matchAtTop, bool collapsePossible, int nrVariables, Term* stripperTerm, VariableTerm* collector); // // Standard LhsAutomaton operations. // bool match(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo); #ifdef DUMP void dump(ostream& s, const VariableInfo& variableInfo, int indentLevel); #endif private: // // The stripper term strips off one argument; it must be ground. // Term* const stripperTerm; }; #endif Maude-Maude3.2/src/ACU_Theory/ACU_GreedyMatcher.cc000066400000000000000000000214741420036611000216410ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for greedy AC/ACU matcher. // int ACU_LhsAutomaton::greedyMatch(ACU_DagNode* subject, Substitution& solution, ACU_ExtensionInfo* extensionInfo) { ArgVec& args = subject->argArray; int nrArgs = args.length(); local.copy(solution); // greedy matching is speculative so make a copy scratch.copy(solution); // keep a scratch copy as well FOR_EACH_CONST(i, Vector, nonGroundAliens) { Term* t = i->term; int j = (t == 0) ? 0 : subject->findFirstPotentialMatch(t, solution); if (j < nrArgs) { int m = i->multiplicity; LhsAutomaton* a = i->automaton; DagNode* d = args[j].dagNode; do { if (subjects[j].multiplicity >= m) { Subproblem *sp; if (a->match(d, scratch, sp)) { if (sp != 0) { // // On a hiding to nothing so pack up and go home. // delete sp; return UNDECIDED; } local.copy(scratch); // preserve any new bindings subjects[j].multiplicity -= m; goto nextNonGroundAlien; } scratch.copy(local); // restore scratch copy } ++j; if (j == nrArgs) break; d = args[j].dagNode; } while (t == 0 || t->partialCompare(solution, d) != Term::LESS); } return ((i - nonGroundAliens.begin()) < nrIndependentAliens) ? false : UNDECIDED; nextNonGroundAlien: ; } if (greedyPureMatch(subject, local, extensionInfo) == true) { solution.copy(local); return true; } return UNDECIDED; } int ACU_LhsAutomaton::decidePhase1FailureMode(TopVariable& fv) { // // We start with the assumption that everything prior to greedy // pure matching was forced. Now we have failed to find something // to assign to variable fv we need to decide if we might have // succeeded doing something differently. // // If we fail on some variable which cannot take identity we // have to return UNDECIDED unless: // (1) all variables upto and including fv one have sorts in increasing // order and have either pure sorts or sorts with bound 1; and // (2) the fv has multiplicity 1 or it is the first variable. // if (fv.structure != AssociativeSymbol::PURE_SORT && fv.upperBound != 1) return UNDECIDED; // combination may have be assignable if (fv.multiplicity != 1 && fv.prevUnbound != NONE) return UNDECIDED; // previous may have used high multiplicity subject Sort* nextSort = fv.sort; for (int i = fv.prevUnbound; i != NONE;) { TopVariable& tv = topVariables[i]; if (tv.structure != AssociativeSymbol::PURE_SORT && tv.upperBound != 1) return UNDECIDED; // might have assigned a combination for tv if (!(leq(tv.sort, nextSort))) return UNDECIDED; // might have assigned a larger subject to tv nextSort = tv.sort; i = tv.prevUnbound; } return false; } int ACU_LhsAutomaton::decidePhase2FailureMode() { // // If we fail to assign a subject to some variable or the extension we // have to return UNDECIDED unless all unbound variables have pure sorts // and multiplicity 1. Weaker conditions are possible but it is tricky // to avoid subtle bugs. // for (int j = lastUnboundVariable; j != NONE; j = topVariables[j].prevUnbound) { TopVariable& tv = topVariables[j]; if (!(tv.structure == AssociativeSymbol::PURE_SORT && tv.multiplicity == 1)) return UNDECIDED; } return false; } int ACU_LhsAutomaton::greedyPureMatch(ACU_DagNode* subject, Substitution& solution, ACU_ExtensionInfo* extensionInfo) { ArgVec& args = subject->argArray; int nrArgs = args.length(); // // Phase 1: // Try to find at least one subject assignable to each variable. // { int nrTopVariables = topVariables.length(); for (int i = 0; i < nrTopVariables; i++) { TopVariable& tv = topVariables[i]; if (solution.value(tv.index) == 0) { int m = tv.multiplicity; for (int j = 0; j < nrArgs; j++) { if (subjects[j].multiplicity >= m && args[j].dagNode->leq(tv.sort)) { subjects[j].multiplicity -= m; tv.firstSubject = j; tv.nrSubjects = 1; goto nextVariable; } } if (tv.takeIdentity) { tv.firstSubject = NONE; tv.nrSubjects = 0; } else return decidePhase1FailureMode(tv); } nextVariable: ; } } // // Phase 2: // Now we have to deal with any unassigned subjects. // int extensionAssignments = 0; for (int i = 0; i < nrArgs; i++) { int sm = subjects[i].multiplicity; if (sm > 0) { DagNode* d = args[i].dagNode; for (int j = lastUnboundVariable; j != NONE;) { TopVariable& tv = topVariables[j]; int m = tv.multiplicity; if (tv.structure >= AssociativeSymbol::LIMIT_SORT && d->leq(tv.sort) && (m == 1 || (sm % m) == 0)) { subjects[i].assignee = j; if (tv.firstSubject == i) { // // Slight of hand to make building normal form // substitutions easier in this tricky special case // tv.firstSubject = NONE; subjects[i].multiplicity += m; } else ++tv.nrSubjects; goto nextSubject; } j = tv.prevUnbound; } // // Need to fix failure mode // if (extensionInfo != 0) { extensionAssignments += sm; if (extensionAssignments <= extensionInfo->getUpperBound()) { subjects[i].assignee = NONE; goto nextSubject; } } return decidePhase2FailureMode(); } nextSubject: ; } // // Phase 3: // We have a succeessful match; now we actually build the // assignments we computed in the two previous phases. // bool buildReducedNodes = subject->isReduced() && topSymbol->sortConstraintFree(); for (int i = lastUnboundVariable; i != NONE; i = topVariables[i].prevUnbound) { TopVariable& tv = topVariables[i]; int index = tv.index; int firstSubject = tv.firstSubject; int nrSubjects = tv.nrSubjects; Assert(solution.value(index) == 0, "unbound variable is bound"); if (nrSubjects == 1 && firstSubject != NONE) solution.bind(index, args[firstSubject].dagNode); else if (nrSubjects == 0) solution.bind(index, topSymbol->getIdentityDag()); else { int m = tv.multiplicity; ACU_DagNode* d = new ACU_DagNode(topSymbol, nrSubjects, ACU_DagNode::ASSIGNMENT); int pos = 0; for (int j = 0; j < nrArgs; j++) { Subject& s = subjects[j]; int sm = s.multiplicity; if (sm > 0 && s.assignee == i) { ACU_DagNode::Pair& p = d->argArray[pos]; p.dagNode = args[j].dagNode; p.multiplicity = (m == 1) ? sm : (sm / m); ++pos; } else if (j == firstSubject) { ACU_DagNode::Pair& p = d->argArray[pos]; p.dagNode = args[j].dagNode; p.multiplicity = 1; ++pos; } } Assert(pos == nrSubjects, "inconsistant number of subjects"); if (buildReducedNodes) { // Ideally we would like to know that the variable // occurs in rhs/condition before spending time here. // // If the ACU subject is fully reduced then any piece // of it is also fully reduced and if there are no // sort constraints applicable to the top symbol we // can compute the true sort and mark the new node as // reduced to avoid wasted future normalization and // matching attempts. // topSymbol->computeBaseSort(d); d->setReduced(); } solution.bind(index, d); } } // // Phase 4: // Finally we build extension info if it is needed. // if (extensionInfo != 0) { extensionInfo->setValidAfterMatch(true); extensionInfo->setMatchedWhole(true); bool partial = false; for (int i = 0; i < nrArgs; i++) { int m = subjects[i].multiplicity; if (m > 0 && subjects[i].assignee == NONE) { if (!partial) { extensionInfo->setMatchedWhole(false); extensionInfo->clear(); partial = true; } extensionInfo->setUnmatched(i, m); } } } return true; } Maude-Maude3.2/src/ACU_Theory/ACU_LazySubproblem.cc000066400000000000000000000147201420036611000220640ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class ACU_LazySubproblem. // // utility stuff #include "macros.hh" #include "vector.hh" #include "indent.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "ACU_RedBlack.hh" #include "ACU_Theory.hh" // interface class definitions #include "argVec.hh" #include "associativeSymbol.hh" #include "dagNode.hh" #include "lhsAutomaton.hh" #include "subproblem.hh" // core class definitions #include "variableInfo.hh" #include "substitution.hh" #include "rewritingContext.hh" #include "localBinding.hh" // ACU theory class definitions #include "ACU_Symbol.hh" //#include "ACU_DagNode.hh" #include "ACU_TreeDagNode.hh" //#include "ACU_ExtensionInfo.hh" #include "ACU_LazySubproblem.hh" ACU_LazySubproblem::ACU_LazySubproblem(ACU_BaseDagNode* subject, const ACU_Tree& remaining, const Substitution& substitution, LhsAutomaton* const stripperAutomaton, Term* const stripperTerm, int collectorVarIndex, Sort* collectorSort) : subject(subject), remaining(remaining), matchTime(substitution.nrFragileBindings()), stripperAutomaton(stripperAutomaton), stripperTerm(stripperTerm), collectorVarIndex(collectorVarIndex), collectorSort(collectorSort), local(substitution.nrFragileBindings()) { matchTime.copy(substitution); previousIndex = NONE; } ACU_LazySubproblem::~ACU_LazySubproblem() { for (const Alternative& i : previous) { delete i.difference; delete i.subproblem; } } bool ACU_LazySubproblem::solve(bool findFirst, RewritingContext& solution) { if (findFirst) { // // We're asked to find the first match with current global solution. // This doens't mean that we haven't found and saved local matches // before, on behalf of a previous global solution. // if (previousIndex == NONE) { // // This really is the first time, so initialize path to subject to strip. // previousIndex = 0; if (!remaining.findFirstPotentialMatch(stripperTerm, matchTime, currentPath)) return false; } else { // // This isn't the first time, so look at saved local solutions. // if (previous.empty()) return false; previousIndex = 0; } } else { // // Try to solve last used match in a new way. // Alternative& a = previous[previousIndex]; if (a.subproblem != 0 && a.subproblem->solve(false, solution)) return true; a.difference->retract(solution); ++previousIndex; } // // Try the next previously generated match. // int nrPrevious = previous.length(); for (; previousIndex < nrPrevious; ++previousIndex) { Alternative& a = previous[previousIndex]; if (a.difference->assert(solution)) { if (a.subproblem == 0 || a.subproblem->solve(true, solution)) return true; a.difference->retract(solution); } } // // Try to generate new matches; this will usually be on behalf of the // first global solution, but it is legal to start with findFirst = true // with a new global solution, even if the we didn't exhaust matches // for the previous global solution. // for (; currentPath.valid(); currentPath.next()) { // // In order for saved local matches to be valid wrt any global // solution we may be given, we can only use bindings that were // available at match time. // local.copy(matchTime); DagNode* d = currentPath.getDagNode(); if (stripperTerm->partialCompare(local, d) == Term::LESS) { // // All instantiations of stripperTerm consistent with local are // less than d, and therefore will be less than nodes further to the right. // Thus we have gone pass the last potential match and can give up. // break; } Subproblem* sp; if (stripperAutomaton->match(d, local, sp) && bindCollector(solution)) { previousIndex = previous.length(); previous.resize(previousIndex + 1); Alternative& a = previous[previousIndex]; a.subproblem = sp; a.difference = local - matchTime; if (a.difference->assert(solution)) { if (sp == 0 || sp->solve(true, solution)) { currentPath.next(); // must not try the same argument again return true; } a.difference->retract(solution); } } } return false; } bool ACU_LazySubproblem::bindCollector(RewritingContext& solution) { ACU_Tree t(remaining); t.deleteMult2(currentPath, 1); Assert(t.getSize() != 0, "no arguments left"); DagNode* d; if (t.getSize() == 1 && t.getMaxMult() == 1) { // // Only one argument left for collector. // d = t.getSoleDagNode(); if (!leq(d->getSortIndex(), collectorSort)) return false; } else { // // General case. // d = new ACU_TreeDagNode(subject->symbol(), t); if (!(d->checkSort(collectorSort, solution))) return false; if (subject->isReduced() && d->getSortIndex() != Sort::SORT_UNKNOWN) d->setReduced(); } // // It's possible that matching the stripper could have bound the collector, // since we are in the "FULL" case and not insisting on linearity. // if (DagNode* c = local.value(collectorVarIndex)) { DebugAdvisory("ACU_LazySubproblem::bindCollector() Collector variable bound to " << d); return c->equal(d); } local.bind(collectorVarIndex, d); return true; } void ACU_LazySubproblem::markReachableNodes() { remaining.mark(); } #ifdef DUMP void ACU_LazySubproblem::dump(ostream& s, const VariableInfo& variableInfo, int indentLevel) { s << "begin{ACU_LazySubproblem}\n"; s << "end{ACU_LazySubproblem}\n"; } #endif Maude-Maude3.2/src/ACU_Theory/ACU_LazySubproblem.hh000066400000000000000000000044031420036611000220730ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for fast subproblems in tree case. // // We try to find each solution by stripping out one argument of the // subject and avoid copying a potentially huge number of subject // arguments using non-destructive deletion. // #ifndef _ACU_LazySubproblem_hh_ #define _ACU_LazySubproblem_hh_ #include "subproblem.hh" #include "ACU_SlowIter.hh" class ACU_LazySubproblem : public Subproblem, private SimpleRootContainer { NO_COPYING(ACU_LazySubproblem); public: ACU_LazySubproblem(ACU_BaseDagNode* subject, const ACU_Tree& remaining, const Substitution& substitution, LhsAutomaton* const stripperAutomaton, Term* const stripperTerm, int collectorVarIndex, Sort* collectorSort); ~ACU_LazySubproblem(); bool solve(bool findFirst, RewritingContext& solution); #ifdef DUMP void dump(ostream& s, const VariableInfo& variableInfo, int indentLevel); #endif private: struct Alternative { LocalBinding* difference; Subproblem* subproblem; }; void markReachableNodes(); bool bindCollector(RewritingContext& solution); ACU_BaseDagNode* const subject; ACU_Tree remaining; Substitution matchTime; LhsAutomaton* const stripperAutomaton; Term* const stripperTerm; const int collectorVarIndex; Sort* const collectorSort; // // Solve time variables. // ACU_SlowIter currentPath; Substitution local; int previousIndex; Vector previous; }; #endif Maude-Maude3.2/src/ACU_Theory/ACU_LhsAutomaton.cc000066400000000000000000000265451420036611000215400ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class ACU_LhsAutomaton. // // utility stuff #include "macros.hh" #include "indent.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "ACU_Persistent.hh" #include "ACU_Theory.hh" // interface class definitions #include "argVec.hh" #include "associativeSymbol.hh" #include "dagNode.hh" #include "term.hh" #include "subproblem.hh" #include "lhsAutomaton.hh" #include "rhsAutomaton.hh" // core class definitions #include "variableInfo.hh" #include "subproblemSequence.hh" #include "subproblemDisjunction.hh" #include "subproblemAccumulator.hh" #include "disjunctiveSubproblemAccumulator.hh" #include "substitution.hh" #include "localBinding.hh" #include "variableAbstractionSubproblem.hh" #include "equalitySubproblem.hh" // variable class definitions #include "variableSymbol.hh" #include "variableTerm.hh" // ACU Red-Black class definitions #include "ACU_SlowIter.hh" // ACU theory class definitions #include "ACU_Symbol.hh" #include "ACU_DagNode.hh" #include "ACU_TreeDagNode.hh" #include "ACU_LhsAutomaton.hh" #include "ACU_Subproblem.hh" #include "ACU_LazySubproblem.hh" #include "ACU_ExtensionInfo.hh" // our stuff #include "ACU_TreeMatcher.cc" #include "ACU_CollapseMatcher.cc" #include "ACU_Matcher.cc" #include "ACU_GreedyMatcher.cc" ACU_LhsAutomaton::ACU_LhsAutomaton(ACU_Symbol* symbol, bool matchAtTop, bool collapsePossible, int nrVariables) : topSymbol(symbol), matchAtTop(matchAtTop), collapsePossible(collapsePossible), local(nrVariables), scratch(nrVariables) { totalLowerBound = 0; totalUpperBound = matchAtTop ? UNBOUNDED : 0; maxPatternMultiplicity = 0; totalNonGroundAliensMultiplicity = 0; uniqueCollapseAutomaton = 0; treeMatchOK = true; collectorSeen = matchAtTop; nrExpectedUnboundVariables = 0; } ACU_LhsAutomaton::~ACU_LhsAutomaton() { delete uniqueCollapseAutomaton; int nrTopVariables = topVariables.length(); for (int i = 0; i < nrTopVariables; i++) delete topVariables[i].abstracted; int nrGroundedOutAliens = groundedOutAliens.length(); for (int i = 0; i < nrGroundedOutAliens; i++) delete groundedOutAliens[i].automaton; int nrGroundAliens = nonGroundAliens.length(); for (int i = 0; i < nrGroundAliens; i++) delete nonGroundAliens[i].automaton; } void ACU_LhsAutomaton::updateTotals(int min, int max) { totalLowerBound += min; if (min > maxPatternMultiplicity) maxPatternMultiplicity = min; if (totalUpperBound != UNBOUNDED && max != UNBOUNDED) totalUpperBound += max; else totalUpperBound = UNBOUNDED; } void ACU_LhsAutomaton::addTopVariable(const VariableTerm* variable, int multiplicity, bool willBeBound) { Sort* s = variable->getSort(); int bound = topSymbol->sortBound(s); collectorSeen = collectorSeen || (!willBeBound && bound == UNBOUNDED && multiplicity == 1); if (!willBeBound) ++nrExpectedUnboundVariables; bool takeIdentity = topSymbol->takeIdentity(s); int nrTopVariables = topVariables.length(); topVariables.expandBy(1); TopVariable& tv = topVariables[nrTopVariables]; tv.index = variable->getIndex(); tv.multiplicity = multiplicity; tv.sort = s; tv.upperBound = bound; tv.structure = topSymbol->sortStructure(s); tv.takeIdentity = takeIdentity; tv.abstracted = 0; updateTotals(takeIdentity ? 0 : multiplicity, (bound == UNBOUNDED) ? UNBOUNDED : (bound * multiplicity)); } void ACU_LhsAutomaton::addAbstractionVariable(int index, Sort* sort, int upperBound, bool takeIdentity, LhsAutomaton* abstracted, int multiplicity) { int nrTopVariables = topVariables.length(); topVariables.expandBy(1); TopVariable& tv = topVariables[nrTopVariables]; tv.index = index; tv.multiplicity = multiplicity; tv.sort = sort; tv.upperBound = upperBound; tv.structure = AssociativeSymbol::UNSTRUCTURED; tv.takeIdentity = takeIdentity; tv.abstracted = abstracted; updateTotals(takeIdentity ? 0 : multiplicity, (upperBound == UNBOUNDED) ? UNBOUNDED : (upperBound * multiplicity)); treeMatchOK = false; } void ACU_LhsAutomaton::addGroundAlien(Term* alien, int multiplicity) { updateTotals(multiplicity, multiplicity); int nrGroundAliens = groundAliens.length(); groundAliens.expandBy(1); groundAliens[nrGroundAliens].term = alien; groundAliens[nrGroundAliens].multiplicity = multiplicity; } void ACU_LhsAutomaton::addGroundedOutAlien(Term* alien, LhsAutomaton* automaton, int multiplicity) { updateTotals(multiplicity, multiplicity); int nrGroundedOutAliens = groundedOutAliens.length(); groundedOutAliens.expandBy(1); groundedOutAliens[nrGroundedOutAliens].term = alien->stable() ? alien : 0; groundedOutAliens[nrGroundedOutAliens].automaton = automaton; groundedOutAliens[nrGroundedOutAliens].multiplicity = multiplicity; treeMatchOK = treeMatchOK && alien->stable(); } void ACU_LhsAutomaton::addNonGroundAlien(Term* alien, LhsAutomaton* automaton, int multiplicity) { updateTotals(multiplicity, multiplicity); totalNonGroundAliensMultiplicity += multiplicity; int nrNonGroundAliens = nonGroundAliens.length(); nonGroundAliens.expandBy(1); nonGroundAliens[nrNonGroundAliens].term = alien->stable() ? alien : 0; nonGroundAliens[nrNonGroundAliens].automaton = automaton; nonGroundAliens[nrNonGroundAliens].multiplicity = multiplicity; treeMatchOK = treeMatchOK && alien->stable(); } local_inline bool ACU_LhsAutomaton::topVariableLt(const TopVariable& t1, const TopVariable& t2) { // // Variables with high multiplicity go to the begining of the vector. // Between variables of equal multiplicity, variables of high sort // index (low sort) come first. // int r = t2.multiplicity - t1.multiplicity; return (r != 0) ? (r < 0) : (t2.sort->index() < t1.sort->index()); } void ACU_LhsAutomaton::complete(MatchStrategy strategy, int nrIndependent) { // // For red-black greedy matching to be correct we require that // (1) unbound top variables are quasi-linear and don't occur in the // condition; // (2) unbound variables in a nonground alien don't occur in other // aliens, in our context or in the condition; // (3) there are no abstraction variables; // (4) all groundout aliens and nonground aliens are stable; and // (5) - obsolete - (was SAT_MULT related) // // For red-black greedy matching to be a win we require that // (6) subproblems must be unlikely; and // (7) there is a unbound variable or extension that can take almost // everything. // // (1) and (2) are satisfied if strategy is LONE_VARIABLE or GREEDY. // (6) is satisfied if strategy is GREEDY or strategy is LONE_VARIABLE // and (3) holds. // treeMatchOK will have already been falsified if (3) or (4) fail to // hold. (7) is recorded by the collectorSeen flag. // if (treeMatchOK) { if (strategy == LONE_VARIABLE || strategy == GREEDY) treeMatchOK = collectorSeen; else if (strategy == FULL) { // // We now allow non-greedy tree matching if there is a single // NGA with multiplicity 1, a single unbound variable with // multiplicity 1 and no extension. // treeMatchOK = collectorSeen && !matchAtTop && nrExpectedUnboundVariables == 1 && nonGroundAliens.length() == 1 && nonGroundAliens[0].multiplicity == 1; } else treeMatchOK = false; } matchStrategy = strategy; Assert(nrIndependent <= nonGroundAliens.length(), "too many independent"); nrIndependentAliens = nrIndependent; sort(topVariables.begin(), topVariables.end(), topVariableLt); } #ifdef DUMP void ACU_LhsAutomaton::dump(ostream& s, const VariableInfo& variableInfo, int indentLevel) { s << Indent(indentLevel) << "Begin{ACU_LhsAutomaton}\n"; ++indentLevel; s << Indent(indentLevel) << "topSymbol = \"" << topSymbol << "\"\tmatchAtTop = " << static_cast(matchAtTop) << "\tcollapsePossible = " << static_cast(collapsePossible) << '\n'; s << Indent(indentLevel) << "treeMatchOK = " << static_cast(treeMatchOK) << "\tcollectorSeen = " << static_cast(collectorSeen) << "\tmatchStrategy = " << static_cast(matchStrategy) << '\n'; if (uniqueCollapseAutomaton != 0) { s << Indent(indentLevel) << "uniqueCollapseAutomaton =\n"; uniqueCollapseAutomaton->dump(s, variableInfo, indentLevel + 1); } s << Indent(indentLevel) << "totalLowerBound = " << totalLowerBound << "\tmaxPatternMultiplicity = " << maxPatternMultiplicity << "\ttotalUpperBound = " << totalUpperBound << '\n'; s << Indent(indentLevel) << "totalNonGroundAliensMultiplicity = " << totalNonGroundAliensMultiplicity << "\tnrIndependentAliens = " << nrIndependentAliens << '\n'; s << Indent(indentLevel) << "topVariables:\n"; ++indentLevel; for (int i = 0; i < topVariables.length(); i++) { TopVariable& tv = topVariables[i]; s << Indent(indentLevel) << "index = " << tv.index; if (tv.abstracted == 0) s << " \"" << variableInfo.index2Variable(tv.index) << '"'; s << "\tmultiplicity = " << tv.multiplicity << "\tsort = \"" << tv.sort << "\"\tupperBound = " << tv.upperBound << "\tstructure = " << tv.structure << "\ttakeIdentity = " << tv.takeIdentity << '\n'; if (tv.abstracted != 0) { s << Indent(indentLevel) << "abstracted = " << '\n'; tv.abstracted->dump(s, variableInfo, indentLevel + 1); } } s << Indent(indentLevel - 1) << "groundAliens:\n"; for (int i = 0; i < groundAliens.length(); i++) { s << Indent(indentLevel) << "term = \"" << groundAliens[i].term << "\"\tmultiplicity = " << groundAliens[i].multiplicity << '\n'; } s << Indent(indentLevel - 1) << "groundedOutAliens:\n"; for (int i = 0; i < groundedOutAliens.length(); i++) { s << Indent(indentLevel) << "multiplicity = " << groundedOutAliens[i].multiplicity << "\tautomaton =\n"; groundedOutAliens[i].automaton->dump(s, variableInfo, indentLevel + 1); } s << Indent(indentLevel - 1) << "nonGroundAliens:\n"; for (int i = 0; i < nonGroundAliens.length(); i++) { s << Indent(indentLevel) << "multiplicity = " << nonGroundAliens[i].multiplicity << "\tautomaton =\n"; nonGroundAliens[i].automaton->dump(s, variableInfo, indentLevel + 1); } s << Indent(indentLevel - 2) << "End{ACU_LhsAutomaton}\n"; } ostream& operator<<(ostream& s, ACU_LhsAutomaton::MatchStrategy strategy) { static const char* const names[] = {"GROUND_OUT", "LONE_VARIABLE", "ALIENS_ONLY", "GREEDY", "FULL"}; s << names[strategy]; return s; } #endif Maude-Maude3.2/src/ACU_Theory/ACU_LhsAutomaton.hh000066400000000000000000000232341420036611000215420ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for left hand side automata in the AC and ACU theories. // #ifndef _ACU_LhsAutomaton_hh_ #define _ACU_LhsAutomaton_hh_ #include "lhsAutomaton.hh" #include "ACU_Tree.hh" class ACU_LhsAutomaton : public LhsAutomaton { NO_COPYING(ACU_LhsAutomaton); public: enum MatchStrategy { // // Ground out case: no extension and everthing grounds out; // return fail if any subjects left. // GROUND_OUT, // // Lone variable case: no extension, no aliens, 1 unbound variable which is forced // to match remaining subjects. // LONE_VARIABLE, // // Aliens only case: no extension, all top variables are guaranteed to be // bound on entry to matcher. Alien sequence will be ordered: // (1) to optimize strong constraint propagation (match independent aliens) // (2) to "force" as many aliens as possible (subsumptive aliens) // (3) to optimize weak constraint propagation (aliens left over) // The field nrIndependents holds the total number in parts (1) and (2) of // alien sequence. // ALIENS_ONLY, // // Greedy case: the intersection of each subterm's variables with union of // its context variables and the condition variables contains only variables // guaranteed to be bound on entry to matcher. Alien sequence will be ordered // to maximize the chance that greedy failure is true failure. The field // nrIndependents holds the number of aliens for which greedy failure is true // failure. The top variable sequence will be ordered to maximize the chance of // finding a greedy match, and in the pure greedy case, to maximize the chance // that pure greedy failure is true failure. // GREEDY, // // Full case: if other cases don't apply. Alien sequence will be ordered to // optimize solve-time weak constraint propagation. The field nrIndependents // is unused. // FULL }; // // Operations to build an ACU_LhsAutomaton // ACU_LhsAutomaton(ACU_Symbol* symbol, bool matchAtTop, bool collapsePossible, int nrVariables); ~ACU_LhsAutomaton(); void addUniqueCollapseAutomaton(LhsAutomaton* ucAutomaton); void addTopVariable(const VariableTerm* variable, int multiplicity, bool bound); void addAbstractionVariable(int index, Sort* sort, int upperBound, bool takeIdentity, LhsAutomaton* abstracted, int multiplicity); void addGroundAlien(Term* alien, int multiplicity); void addGroundedOutAlien(Term* alien, LhsAutomaton* automaton, int multiplicity); void addNonGroundAlien(Term* alien, LhsAutomaton* automaton, int multiplicity); void complete(MatchStrategy strategy, int nrIndependent); // // Standard LhsAutomaton operations // bool match(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo); #ifdef DUMP void dump(ostream& s, const VariableInfo& variableInfo, int indentLevel); #endif protected: // // Allow derived automata to access this stuff and avoid // storing it for themselves. // ACU_Symbol* getSymbol() const; bool getCollapsePossible() const; Substitution& getLocal(); Substitution& getLocal2(); // // Useful functionality for ACU_NonLinearAutomaton. // DagNode* makeHighMultiplicityAssignment(int multiplicity, Sort* sort, ACU_Tree& current); private: struct TopVariable { int index; int multiplicity; Sort* sort; int upperBound; AssociativeSymbol::Structure structure; bool takeIdentity; LhsAutomaton* abstracted; // automaton for abstracted term // // Data storage for match-time use // int prevUnbound; // back pointer to last unbound variable int firstSubject; // first subject heuristically assigned to variable int nrSubjects; // number of subjects heuristically assigned to variable }; struct GroundAlien { Term* term; int multiplicity; }; struct NonGroundAlien { Term* term; // 0 if not stable int multiplicity; LhsAutomaton* automaton; }; struct Subject { int multiplicity; int assignee; }; static bool topVariableLt(const TopVariable& t1, const TopVariable& t2); void updateTotals(int min, int max); bool multiplicityChecks(ACU_DagNode* subject); bool eliminateGroundAliens(ACU_DagNode* subject); bool eliminateBoundVariables(ACU_DagNode* subject, Substitution& solution); bool eliminateGroundedOutAliens(ACU_DagNode* subject, Substitution& solution); bool forcedLoneVariableCase(ACU_DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem); bool aliensOnlyMatch(ACU_DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem); ACU_Subproblem* buildBipartiteGraph(ACU_DagNode* subject, Substitution& solution, ACU_ExtensionInfo* extensionInfo, int firstAlien, SubproblemAccumulator& subproblems); bool handleElementVariables(ACU_DagNode* subject, Substitution& solution, ACU_Subproblem* subproblem); int computeTotalMultiplicity(); // // Tree matcher. // int treeMatch(ACU_TreeDagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ACU_ExtensionInfo* extensionInfo); int eliminateBoundVariables(Substitution& solution); bool eliminateGroundAliens(); bool eliminateGroundedOutAliens(Substitution& solution); int greedyMatch(ACU_TreeDagNode* subject, Substitution& solution, ACU_ExtensionInfo* extensionInfo); bool tryToBindVariable(const TopVariable& tv, Substitution& solution); bool tryToBindLastVariable(ACU_TreeDagNode* subject, const TopVariable& tv, Substitution& solution); bool greedyPureMatch(ACU_TreeDagNode* subject, Substitution& solution, ACU_ExtensionInfo* extensionInfo); bool forcedLoneVariableCase(ACU_TreeDagNode* subject, const TopVariable& tv, Substitution& solution, Subproblem*& returnedSubproblem); // // ArgVec greedy matcher. // int greedyMatch(ACU_DagNode* subject, Substitution& solution, ACU_ExtensionInfo* extensionInfo); int decidePhase1FailureMode(TopVariable& fv); int decidePhase2FailureMode(); int greedyPureMatch(ACU_DagNode* subject, Substitution& solution, ACU_ExtensionInfo* extensionInfo); // // Collapse matcher. // void bindUnboundVariablesToIdentity(Substitution& solution, int exception); bool uniqueCollapseMatch(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo); bool multiwayCollapseMatch(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo); bool collapseMatch(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo); // // Full matcher. // bool fullMatch(ACU_DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ACU_ExtensionInfo* extensionInfo); ACU_Symbol* const topSymbol; const Bool matchAtTop; const Bool collapsePossible; Bool treeMatchOK; Bool collectorSeen; MatchStrategy matchStrategy; int totalLowerBound; // must have at least this total mutiplicity of subjects int totalUpperBound; // can't have more than this total mutiplicity of subjects int maxPatternMultiplicity; // must have at least on subject with >= this multiplicity int totalNonGroundAliensMultiplicity; int nrIndependentAliens; int nrExpectedUnboundVariables; // used at semicompile time only LhsAutomaton* uniqueCollapseAutomaton; Vector topVariables; Vector groundAliens; Vector groundedOutAliens; Vector nonGroundAliens; // // Data storage for match-time use // Substitution local; Substitution scratch; // // Use by ArgVec matcher only. // int lastUnboundVariable; int totalMultiplicity; Vector currentMultiplicity; Vector subjects; // // Used by red-black matcher only. // int nrUnboundVariables; // so we know when we are at the last unbound variable int matchedMultiplicity; // so we know when we've matched at least 2 subjects ACU_Tree current; Vector matched; }; inline ACU_Symbol* ACU_LhsAutomaton::getSymbol() const { return topSymbol; } inline bool ACU_LhsAutomaton::getCollapsePossible() const { return collapsePossible; } inline Substitution& ACU_LhsAutomaton::getLocal() { return local; } inline Substitution& ACU_LhsAutomaton::getLocal2() { return scratch; } inline void ACU_LhsAutomaton::addUniqueCollapseAutomaton(LhsAutomaton* ucAutomaton) { uniqueCollapseAutomaton = ucAutomaton; } #ifdef DUMP ostream& operator<<(ostream& s, ACU_LhsAutomaton::MatchStrategy strategy); #endif #endif Maude-Maude3.2/src/ACU_Theory/ACU_LhsCompiler0.cc000066400000000000000000000160621420036611000214140ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation of match compilation for AC and ACU theories. // Part 0: See if the pattern falls into one of several common cases // where we can try a fast heuristic. // #include "ACU_VarLhsAutomaton.hh" #include "ACU_BndVarLhsAutomaton.hh" #include "ACU_NGA_LhsAutomaton.hh" #include "ACU_GndLhsAutomaton.hh" #include "ACU_NonLinearLhsAutomaton.hh" LhsAutomaton* ACU_Term::compileLhs2(bool matchAtTop, const VariableInfo& variableInfo, NatSet& boundUniquely, bool& subproblemLikely) { ACU_LhsAutomaton* a = tryToMakeSpecialCaseAutomaton(matchAtTop, variableInfo, boundUniquely); if (a == 0) { a = new ACU_LhsAutomaton(symbol(), matchAtTop, !(collapseSymbols().empty()), variableInfo.getNrProtectedVariables()); DebugInfo("this = " << this << "local size = " << variableInfo.getNrProtectedVariables()); } compileLhs3(matchAtTop, variableInfo, boundUniquely, subproblemLikely, a); return a; } ACU_LhsAutomaton* ACU_Term::tryToMakeSpecialCaseAutomaton(bool matchAtTop, const VariableInfo& variableInfo, NatSet& boundUniquely) { if (matchAtTop && argArray.length() == 1) return tryToMakeNonLinearLhsAutomaton(variableInfo, boundUniquely); if (argArray.length() == 2 && argArray[0].multiplicity == 1 && argArray[1].multiplicity == 1 && (!matchAtTop || collapseSymbols().empty())) // don't handle collapses at the top { ACU_LhsAutomaton* t = tryToMakeCollectorLhsAutomaton(matchAtTop, variableInfo, boundUniquely, 0); if (t != 0) return t; return tryToMakeCollectorLhsAutomaton(matchAtTop, variableInfo, boundUniquely, 1); } return 0; } ACU_LhsAutomaton* ACU_Term::tryToMakeNonLinearLhsAutomaton(const VariableInfo& variableInfo, NatSet& boundUniquely) { VariableTerm* v = dynamic_cast(argArray[0].term); if (v == 0) return 0; ACU_Symbol* s = symbol(); int vi = v->getIndex(); Sort* vs = v->getSort(); int multiplicity = argArray[0].multiplicity; Assert(multiplicity >= 2, "bad multiplicity"); // // Non linear variable should: // (1) be unbound at match time (can't guarantee this of course); // (2) not occur in condition; // (3) not occur elsewhere in lhs; // (4) have unit, limit or pure sort w.r.t. top symbol; // (5) not be able to take identity; and // if (boundUniquely.contains(vi) || variableInfo.getConditionVariables().contains(vi) || v->occursInContext().contains(vi) || (s->sortBound(vs) > 1 && s->sortStructure(vs) != AssociativeSymbol::LIMIT_SORT && s->sortStructure(vs) != AssociativeSymbol::PURE_SORT) || s->takeIdentity(vs)) return 0; Assert(collapseSymbols().empty(), "shouldn't be able to collapse"); return new ACU_NonLinearLhsAutomaton(s, variableInfo.getNrProtectedVariables(), vi, multiplicity, vs); } ACU_LhsAutomaton* ACU_Term::tryToMakeCollectorLhsAutomaton(bool matchAtTop, const VariableInfo& variableInfo, NatSet& boundUniquely, int collectorCandidate) { // // We require that our top symbol be free of sort constraints. // if (!(symbol()->sortConstraintFree())) return 0; // // First check collector. // VariableTerm* c = dynamic_cast(argArray[collectorCandidate].term); if (c == 0) return 0; int ci = c->getIndex(); // // Collector variable should: // (1) be unbound at match time (can't guarantee this of course); and // (2) have unbounded sort // Unless stripper is a ground term and there is no extension (i.e. // there will be a unique match) we also require that variable should: // (3) not occur in condition; and // (4) not occur elsewhere in lhs. // if (boundUniquely.contains(ci) || symbol()->sortBound(c->getSort()) != UNBOUNDED) return 0; bool needAllCollectorSolutions = variableInfo.getConditionVariables().contains(ci) || c->occursInContext().contains(ci); if (matchAtTop && needAllCollectorSolutions) return 0; // // Then check stripper. // Term* t = argArray[1 - collectorCandidate].term; if (t->ground()) { return new ACU_GndLhsAutomaton(symbol(), matchAtTop, !(collapseSymbols().empty()), variableInfo.getNrProtectedVariables(), t, c); } VariableTerm* v = dynamic_cast(t); if (v != 0) { int vi = v->getIndex(); if (boundUniquely.contains(vi)) { // // Bound stripper variable should: // (1) have an element sort; and // (2) not be able to take the identity // Sort* stripperSort = v->getSort(); if (symbol()->sortBound(stripperSort) != 1 || symbol()->takeIdentity(stripperSort)) return 0; return new ACU_BndVarLhsAutomaton(symbol(), matchAtTop, !(collapseSymbols().empty()), variableInfo.getNrProtectedVariables(), v, c); } else { if (needAllCollectorSolutions) return 0; // // Unbound stripper variable should: // (1) not occur in condition; // (2) not occur elsewhere in lhs; and // (3) not be able to take identity. // int vi = v->getIndex(); if (variableInfo.getConditionVariables().contains(vi) || v->occursInContext().contains(vi) || symbol()->takeIdentity(v->getSort())) return 0; return new ACU_VarLhsAutomaton(symbol(), matchAtTop, !(collapseSymbols().empty()), variableInfo.getNrProtectedVariables(), v, c); } } if (needAllCollectorSolutions) return 0; // // Non ground stripper term should: // (1) be stable; // (2) not be abstracted (might match identity); // (3) be greedySafe (not contain unbound bad variables); and // (4) not be likely to return subproblems. // if (!(t->stable()) || argArray[1 - collectorCandidate].abstractionVariableIndex != NONE || !(t->greedySafe(variableInfo, boundUniquely))) return 0; NatSet local(boundUniquely); bool spl; LhsAutomaton* a = t->compileLhs(false, variableInfo, local, spl); if (spl) { delete a; return 0; } return new ACU_NGA_LhsAutomaton(symbol(), matchAtTop, !(collapseSymbols().empty()), variableInfo.getNrProtectedVariables(), a, t, c); } Maude-Maude3.2/src/ACU_Theory/ACU_LhsCompiler1.cc000066400000000000000000000212131420036611000214070ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation of match compilation for AC and ACU theories. // Part 1: constraint propagation analysis, easy cases and // weak constraint propagation. // struct ACU_Term::CP_Sequence { Vector sequence; int nrIndependent; NatSet bound; int cardinality; }; void ACU_Term::analyseConstraintPropagation(NatSet& boundUniquely) const { int nrArgs = argArray.length(); Vector nonGroundAliens; int lastUnboundVariable = UNDEFINED; for (int i = 0; i < nrArgs; i++) { const Pair& p = argArray[i]; if (p.abstractionVariableIndex != NONE) return; // abstraction variable kills constraint propagation analysis Term* t = p.term; if (t->ground()) continue; // ignore ground terms if (t->willGroundOutMatch(boundUniquely)) continue; // ignore terms that will "ground out match" VariableTerm* v = dynamic_cast(t); if (v != 0) { // // A variable. // // Two unbound variables or an unbound variable plus an NGA kills // constraint propagation analysis. // if (lastUnboundVariable != UNDEFINED || nonGroundAliens.size() != 0) return; lastUnboundVariable = v->getIndex(); } else { // // Must be a non-ground alien. // // An NGA plus a unbound variable kills constraint propagation analysis. // if (lastUnboundVariable != UNDEFINED) return; nonGroundAliens.append(p); } } if (lastUnboundVariable != UNDEFINED) { Assert(nonGroundAliens.size() == 0, "ACU_Term::analyseConstraintPropagation() : shouldn't have NGAs"); // // If the only thing that doesn't ground out is a variable we can // bind it uniquely. // boundUniquely.insert(lastUnboundVariable); } else if (nonGroundAliens.length() != 0) { // // If the only things that don't ground out are NGAs we can choose a // sequence to propagate constraints on shared variables among them. // CP_Sequence bestSequence; findConstraintPropagationSequence(nonGroundAliens, boundUniquely, bestSequence); boundUniquely = bestSequence.bound; // deep copy } } //#include "rule.hh" // HACK void ACU_Term::compileLhs3(bool matchAtTop, const VariableInfo& variableInfo, NatSet& boundUniquely, bool& subproblemLikely, ACU_LhsAutomaton* automaton) { if (uniqueCollapseSubtermIndex != NONE) { // // Maybe we should add the variable(s) which will be bound to identity // to this local bound uniquely. // NatSet local(boundUniquely); bool spl; automaton-> addUniqueCollapseAutomaton(argArray[uniqueCollapseSubtermIndex].term-> compileLhs(matchAtTop, variableInfo, local, spl)); } // // Insert variables, ground aliens and grounded out aliens // in to automaton and collect non-ground aliens. // Vector nonGroundAliens; bool greedy = true; int lastUnboundVariable = UNDEFINED; int nrUnboundVariables = 0; int nrAbstractionVariables = 0; int nrArgs = argArray.length(); //int V_COUNT = 0; // HACK for (int i = 0; i < nrArgs; i++) { Pair& p = argArray[i]; Term* t = p.term; int m = p.multiplicity; VariableTerm* v = dynamic_cast(t); if (v != 0) { int index = v->getIndex(); bool bound = boundUniquely.contains(index); automaton->addTopVariable(v, m, bound); if (!bound) { lastUnboundVariable = index; ++nrUnboundVariables; if (t->occursInContext().contains(index) || variableInfo.getConditionVariables().contains(index)) greedy = false; //++V_COUNT; // HACK } } else if (p.abstractionVariableIndex != NONE) { NatSet local(boundUniquely); bool spl; automaton->addAbstractionVariable(p.abstractionVariableIndex, t->getComponent()->sort(Sort::ERROR_SORT), p.collapseToOurSymbol ? UNBOUNDED : 1, p.matchOurIdentity, t->compileLhs(false, variableInfo, local, spl), m); ++nrAbstractionVariables; greedy = false; } else if (t->ground()) automaton->addGroundAlien(t, m); else if (t->willGroundOutMatch(boundUniquely)) { bool spl; LhsAutomaton* subAutomaton = t->compileLhs(false, variableInfo, boundUniquely, spl); Assert(!spl, "grounded out alien should not return subproblem"); automaton->addGroundedOutAlien(t, subAutomaton, m); } else { greedy = greedy && t->greedySafe(variableInfo, boundUniquely); nonGroundAliens.append(argArray[i]); } } /* if (V_COUNT > 2 || matchAtTop && V_COUNT > 1) // HACK { cout << Tty(Tty::RED) << "Nasty : " << this << Tty(Tty::RESET) << endl; const PreEquation* pe = static_cast(&variableInfo); if (const Rule* rl = dynamic_cast(pe)) cout << rl; } */ // // Now decide on a matching strategy // if (nonGroundAliens.empty()) { // // No aliens case // subproblemLikely = !greedy; ACU_LhsAutomaton::MatchStrategy strategy = greedy ? ACU_LhsAutomaton::GREEDY : ACU_LhsAutomaton::FULL; if (!matchAtTop) { switch (nrUnboundVariables + nrAbstractionVariables) { case 0: strategy = ACU_LhsAutomaton::GROUND_OUT; break; case 1: if (nrUnboundVariables == 1) { boundUniquely.insert(lastUnboundVariable); subproblemLikely = false; // variable forced so red-black ok } strategy = ACU_LhsAutomaton::LONE_VARIABLE; break; } } automaton->complete(strategy, 0); } else if (!matchAtTop && nrUnboundVariables == 0 && nrAbstractionVariables == 0) { // // Aliens only case // compileAliensOnlyCase(automaton, nonGroundAliens, variableInfo, boundUniquely, subproblemLikely); } else { // // General case // subproblemLikely = !greedy; compileGreedyAndFullCases(automaton, nonGroundAliens, variableInfo, boundUniquely, subproblemLikely); } } void ACU_Term::weakConstraintPropagation(const Vector& aliens, const NatSet& boundUniquely, int step, Vector& sequence) { int nrAliens = aliens.length(); // // Reorder sequence[step],...,sequence[nrAliens - 1] to optimize weak constraint // propagation at solve-time. // // First we compute (a conservative approximation to) the set of variables // that will be already bound when we select a match of aliens[sequence[step]].term. // NatSet alreadyBound(boundUniquely); for (int i = 0; i < step; i++) alreadyBound.insert(aliens[sequence[i]].term->occursBelow()); // // Determine the set of variables which occur in more than one of // aliens[sequence[step]].term,...,aliens[sequence[nrAliens - 1]].term. // NatSet shared; { NatSet seen(aliens[sequence[step]].term->occursBelow()); for (int i = step + 1; i < nrAliens; i++) { NatSet result(seen); const NatSet& ourVariables = aliens[sequence[i]].term->occursBelow(); result.intersect(ourVariables); shared.insert(result); seen.insert(ourVariables); } } if (shared.empty()) return; // if no shared variables, no point in reordering sequence // // Now sequence aliens to bind unbound shared variables as quickly // as possible in order to minimize search space. // for (int i = step; i < nrAliens - 1; i++) { int best = UNDEFINED; int bestCardinality = 0; for (int j = i; j < nrAliens; j++) { NatSet willBindShared(aliens[sequence[j]].term->occursBelow()); willBindShared.intersect(shared); willBindShared.subtract(alreadyBound); int cardinality = willBindShared.cardinality(); if (cardinality > bestCardinality) { best = j; bestCardinality = cardinality; } } if (best == UNDEFINED) break; swap(sequence[i], sequence[best]); alreadyBound.insert(aliens[sequence[i]].term->occursBelow()); } } Maude-Maude3.2/src/ACU_Theory/ACU_LhsCompiler2.cc000066400000000000000000000170201420036611000214110ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation of match compilation for AC and ACU theories. // Part 2: aliens only case. // void ACU_Term::compileAliensOnlyCase(ACU_LhsAutomaton* automaton, const Vector& nonGroundAliens, const VariableInfo& variableInfo, NatSet& boundUniquely, bool& subproblemLikely) { subproblemLikely = false; // // Find a "best" sequence to match NGAs that can be "forced". // CP_Sequence bestSequence; findConstraintPropagationSequence(nonGroundAliens, boundUniquely, bestSequence); // // Compile forced NGAs and add them to the ACU_LhsAutomaton. // int nrForced_NGAs = bestSequence.nrIndependent; for (int i = 0; i < nrForced_NGAs; i++) { const Pair& p = nonGroundAliens[bestSequence.sequence[i]]; bool spl; LhsAutomaton* subAutomaton = p.term->compileLhs(false, variableInfo, boundUniquely, spl); subproblemLikely = subproblemLikely || spl; automaton->addNonGroundAlien(p.term, subAutomaton, p.multiplicity); } Assert(boundUniquely == bestSequence.bound, "ACU_Term::compileAliensOnlyCase(): bound uniquely clash"); // // Heuristically reorder any remaining NGAs. // int nrNonGroundAliens = nonGroundAliens.size(); if (nrForced_NGAs < nrNonGroundAliens) { Assert(nrNonGroundAliens - nrForced_NGAs >= 2, "ACU_Term::compileAliensOnlyCase(): lone non-forceable alien is impossible"); subproblemLikely = true; weakConstraintPropagation(nonGroundAliens, boundUniquely, nrForced_NGAs, bestSequence.sequence); } // // Compile remaining NGAs and add them to the ACU_LhsAutomaton. // for (int i = nrForced_NGAs; i < nrNonGroundAliens; i++) { const Pair& p = nonGroundAliens[bestSequence.sequence[i]]; // // We need a local copy of the set uniquely bound variables since we // cannot propagate constraint on variables generated by non-forced NGAs. // NatSet local(boundUniquely); bool spl; LhsAutomaton* subAutomaton = p.term->compileLhs(false, variableInfo, local, spl); subproblemLikely = subproblemLikely || spl; automaton->addNonGroundAlien(p.term, subAutomaton, p.multiplicity); } automaton->complete(ACU_LhsAutomaton::ALIENS_ONLY, bestSequence.nrIndependent); } void ACU_Term::findConstraintPropagationSequence(const Vector& aliens, const NatSet& boundUniquely, CP_Sequence& bestSequence) { int nrAliens = aliens.length(); Vector currentSequence(nrAliens); for (int i = 0; i < nrAliens; i++) currentSequence[i] = i; bestSequence.cardinality = -1; findConstraintPropagationSequence(aliens, currentSequence, boundUniquely, 0, bestSequence); Assert(bestSequence.cardinality >= 0, "ACU_Term::findConstraintPropagationSequence() : didn't find a sequence"); } void ACU_Term::findConstraintPropagationSequence(const Vector& aliens, const Vector& currentSequence, const NatSet& boundUniquely, int step, CP_Sequence& bestSequence) { bool expandedAtLeastOneBranch = false; // // Try to grow search tree. // int nrAliens = aliens.size(); for (int i = step; i < nrAliens; i++) { Term* t = aliens[currentSequence[i]].term; // // Check that t won't steal a subject from another NGA - essentially it // has to fail early on all instances of the remaining NGAs. // for (int j = step; j < nrAliens; j++) { if (j != i && !(t->earlyMatchFailOnInstanceOf(aliens[currentSequence[j]].term))) goto nextAlien; } { // // Build a new sequence by adding t. // Vector newSequence(currentSequence); swap(newSequence[step], newSequence[i]); int newStep = step + 1; bool usefulToMatchNow = false; // // Now see if term will force the binding of additional variables. // NatSet newBound(boundUniquely); t->analyseConstraintPropagation(newBound); NatSet newlyBoundUniquely(newBound); newlyBoundUniquely.subtract(boundUniquely); if (!newlyBoundUniquely.empty()) { // // Since we uniquely bound additional variables we might "ground out match" // on additional NGAs that can be added to the new sequence. // // Matching t now is considered useful if it allows an NGA to ground out match // or it binds uniquely a variable occurring in a remaining NGA. Actually the former // implies the latter but we need to test the former anyway. // for (int j = newStep; j < nrAliens; j++) { Term* a = aliens[newSequence[j]].term; if (a->willGroundOutMatch(newBound)) { swap(newSequence[newStep], newSequence[j]); ++newStep; usefulToMatchNow = true; } usefulToMatchNow = usefulToMatchNow || !(newlyBoundUniquely.disjoint(a->occursBelow())); } } // // We consider postponement of matching to be useful if t had an unbound variable that occurs // in a remaining NGA. // bool usefulToPostpone = false; NatSet unbound(t->occursBelow()); unbound.subtract(newBound); if (!unbound.empty()) { for (int j = newStep; j < nrAliens; j++) { Term* a = aliens[newSequence[j]].term; if (!(unbound.disjoint(a->occursBelow()))) { usefulToPostpone = true; break; } } } if (usefulToPostpone) { // // We might get a better sequence by matching t later. // if (!expandedAtLeastOneBranch || usefulToMatchNow) { // // But either we have yet to expand a branch from the current state or we // might find a better sequence by matching now so we explore this branch anyway. // findConstraintPropagationSequence(aliens, newSequence, newBound, newStep, bestSequence); expandedAtLeastOneBranch = true; } } else { // // We lose nothing by matching t now, so continue with new sequence and prune // any unexplored paths from this node since they can't produce a better // sequence than the best obtained by extending the new sequence. // findConstraintPropagationSequence(aliens, newSequence, newBound, newStep, bestSequence); return; } } nextAlien: ; } if (expandedAtLeastOneBranch) return; // // Didn't find any forceable NGAs - leaf node of search tree. // // We want a sequence that guarantees unique bindings for the greatest number of variables (to cut down // the match-time search space) and we break ties in favor of longer sequences (more NGAs forced). // int n = boundUniquely.cardinality(); if (n > bestSequence.cardinality || (n == bestSequence.cardinality && step > bestSequence.sequence.length())) { bestSequence.sequence = currentSequence; // deep copy bestSequence.nrIndependent = step; bestSequence.bound = boundUniquely; // deep copy bestSequence.cardinality = n; } } Maude-Maude3.2/src/ACU_Theory/ACU_LhsCompiler3.cc000066400000000000000000000121271420036611000214150ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation of match compilation for AC and ACU theories. // Part 3: greedy and full cases. // void ACU_Term::compileGreedyAndFullCases(ACU_LhsAutomaton* automaton, const Vector& nonGroundAliens, const VariableInfo& variableInfo, NatSet& boundUniquely, bool& subproblemLikely) { int nrNonGroundAliens = nonGroundAliens.length(); Vector subAutomata(nrNonGroundAliens); for (int i = 0; i < nrNonGroundAliens; i++) { NatSet local(boundUniquely); bool spl; subAutomata[i] = nonGroundAliens[i].term->compileLhs(false, variableInfo, local, spl); subproblemLikely = subproblemLikely || spl; } Vector bestSequence; int nrIndependent = 0; if (subproblemLikely) findFullSequence(nonGroundAliens, boundUniquely, bestSequence); else nrIndependent = findGreedySequence(nonGroundAliens, bestSequence); for (int i = 0; i < nrNonGroundAliens; i++) { int j = bestSequence[i]; automaton->addNonGroundAlien(nonGroundAliens[j].term, subAutomata[j], nonGroundAliens[j].multiplicity); } automaton->complete(subproblemLikely ? ACU_LhsAutomaton::FULL : ACU_LhsAutomaton::GREEDY, nrIndependent); } int ACU_Term::findGreedySequence(const Vector& aliens, Vector& sequence) { Vector > independents; findIndependentSets(aliens, independents); NatSet used; int nrIndependents = independents.length(); // // For each set of dependent patterns, add the longest sequence // that increases in generality. // for (int i = 0; i < nrIndependents; i++) { Vector& set = independents[i]; if (set.length() == 1) { int t = set[0]; sequence.append(t); used.insert(t); } else { Vector longest; findLongestIncreasingSequence(aliens, set, longest); int length = longest.length(); for (int j = 0; j < length; j++) { int t = set[longest[j]]; sequence.append(t); used.insert(t); } } } int nrIndependent = sequence.length(); // // Now tack on any aliens not yet put in sequence. // int nrAliens = aliens.length(); for (int i = 0; i < nrAliens; i++) { if (!(used.contains(i))) sequence.append(i); } Assert(sequence.length() == aliens.length(), "length mis-match"); return nrIndependent; } void ACU_Term::findLongestIncreasingSequence(const Vector& aliens, Vector& dependents, Vector& sequence) { // // Since this function is only used for compiling the greedy case, // any variable occurring in a potential subsumer must either // not be a condition variable or must be bound (and hence occurs // in context). Since an external agency that can bind a variable X // is required to make X a condition variable we can safely use // subsumes(), since if X is bound externally it must also occur in // in context and this will be noted by subsumes(). // int nrDependents = dependents.length(); Digraph subsumption(nrDependents); for (int i = 0; i < nrDependents; i++) { Term* t1 = aliens[dependents[i]].term; for (int j = 0; j < nrDependents; j++) { if (i != j) { Term* t2 = aliens[dependents[j]].term; int m2 = aliens[dependents[j]].multiplicity; if (m2 == 1 && t2->subsumes(t1, true)) subsumption.insertEdge(i, j); } } } subsumption.findLongestDirectedPath(sequence); } void ACU_Term::findIndependentSets(const Vector& aliens, Vector >& independents) { int nrAliens = aliens.length(); Graph conflicts(nrAliens); // // Check for pairs of aliens that might match the same subject (upto an // unsolved subproblem) and insert them into conflict graph. // for (int i = 0; i < nrAliens; i++) { for (int j = 0; j < i; j++) { if (!(aliens[i].term->matchIndependent(aliens[j].term))) conflicts.insertEdge(i, j); } } conflicts.findComponents(independents); } void ACU_Term::findFullSequence(const Vector& aliens, const NatSet& boundUniquely, Vector& sequence) { int nrAliens = aliens.length(); sequence.expandTo(nrAliens); for (int i = 0; i < nrAliens; i++) sequence[i] = i; if (nrAliens > 1) weakConstraintPropagation(aliens, boundUniquely, 0, sequence); } Maude-Maude3.2/src/ACU_Theory/ACU_Matcher.cc000066400000000000000000000450541420036611000205010ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2021 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for main AC/ACU matcher. // local_inline bool ACU_LhsAutomaton::multiplicityChecks(ACU_DagNode* subject) { // // Copy argument multiplicities and check for trivial failure. // const ArgVec::const_iterator e = subject->argArray.end(); if (maxPatternMultiplicity > 1) { // // Because failure here is common we check this first. // for (ArgVec::const_iterator i = subject->argArray.begin(); i != e; ++i) { if (i->multiplicity >= maxPatternMultiplicity) goto okay; } return false; } okay: currentMultiplicity.resize(subject->argArray.length()); Vector::iterator cm = currentMultiplicity.begin(); int totalSubjectMultiplicity = 0; for (ArgVec::const_iterator i = subject->argArray.begin(); i != e; ++i, ++cm) { int m = i->multiplicity; *cm = m; totalSubjectMultiplicity += m; } if (totalSubjectMultiplicity < totalLowerBound || totalSubjectMultiplicity > totalUpperBound) return false; totalMultiplicity = totalSubjectMultiplicity; return true; } local_inline bool ACU_LhsAutomaton::eliminateGroundAliens(ACU_DagNode* subject) { for (const GroundAlien& i : groundAliens) { int pos = subject->binarySearch(i.term); if (pos < 0 || (currentMultiplicity[pos] -= i.multiplicity) < 0) return false; } return true; } local_inline bool ACU_LhsAutomaton::eliminateBoundVariables(ACU_DagNode* subject, Substitution& solution) { int nrTopVariables = topVariables.length(); lastUnboundVariable = NONE; for (int i = 0; i < nrTopVariables; i++) { DagNode* d = solution.value(topVariables[i].index); if (d != 0) { if (!(subject->eliminateSubject(d, topVariables[i].multiplicity, currentMultiplicity))) return false; } else { // // Make linked list of unbound variables. // topVariables[i].prevUnbound = lastUnboundVariable; lastUnboundVariable = i; } } return true; } local_inline bool ACU_LhsAutomaton::eliminateGroundedOutAliens(ACU_DagNode* subject, Substitution& solution) { ArgVec& args = subject->argArray; int nrArgs = args.length(); for (const NonGroundAlien& i : groundedOutAliens) { Term* t = i.term; int j = (t == 0) ? 0 : subject->findFirstPotentialMatch(t, solution); if (j < nrArgs) { LhsAutomaton* a = i.automaton; DagNode* d = args[j].dagNode; do { Subproblem* sp; if (a->match(d, solution, sp)) { Assert(sp == 0, "grounded out alien gave rise to subproblem!"); if ((currentMultiplicity[j] -= i.multiplicity) < 0) return false; goto nextGroundedOutAlien; } ++j; if (j == nrArgs) break; d = args[j].dagNode; } while (t == 0 || t->partialCompare(solution, d) != Term::LESS); } return false; nextGroundedOutAlien: ; } return true; } bool ACU_LhsAutomaton::forcedLoneVariableCase(ACU_DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem) { TopVariable& loneVariable = topVariables[lastUnboundVariable]; int m = loneVariable.multiplicity; // // Locate remaining subterms. // int nrArgs = currentMultiplicity.length(); int nrSubterms = 0; int lastSubterm = UNDEFINED; for (int i = 0; i < nrArgs; i++) { int cm = currentMultiplicity[i]; if (cm > 0) { if (cm % m > 0) return false; ++nrSubterms; lastSubterm = i; } } // // Build assignment for lone variable. // if (nrSubterms == 0) { // // Special case: assign identity. // if (loneVariable.takeIdentity) { DagNode* d = topSymbol->getIdentityDag(); solution.bind(loneVariable.index, d); if (loneVariable.abstracted != 0) return loneVariable.abstracted->match(d, solution, returnedSubproblem); return true; } return false; } ArgVec& args = subject->argArray; if (nrSubterms == 1 && currentMultiplicity[lastSubterm] == m) { // // Special case: assign one subject. // DagNode* d = args[lastSubterm].dagNode; solution.bind(loneVariable.index, d); if (loneVariable.abstracted != 0) return loneVariable.abstracted->match(d, solution, returnedSubproblem); return d->leq(loneVariable.sort); } // // General case: need to assign everything. // ACU_DagNode* d = new ACU_DagNode(topSymbol, nrSubterms, ACU_DagNode::ASSIGNMENT); int pos = 0; for (int i = 0; i < nrArgs; i++) { int cm = currentMultiplicity[i]; if (cm > 0) { d->argArray[pos].dagNode = args[i].dagNode; d->argArray[pos].multiplicity = cm / m; ++pos; } } Assert(pos == nrSubterms, "inconsistant number of subterms"); solution.bind(loneVariable.index, d); if (loneVariable.abstracted != 0) return loneVariable.abstracted->match(d, solution, returnedSubproblem); if (d->checkSort(loneVariable.sort, returnedSubproblem)) { if (subject->isReduced() && d->getSortIndex() != Sort::SORT_UNKNOWN) d->setReduced(); // not worth checking if variable is useful return true; } return false; } local_inline bool ACU_LhsAutomaton::aliensOnlyMatch(ACU_DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem) { ArgVec& args = subject->argArray; int nrArgs = args.length(); SubproblemAccumulator subproblems; if (nrIndependentAliens > 0) { // // Anything matched by an independent alien can be "forced" // since it can't be matched by another alien (except one that // subsumes the first) and there are no variables or extension. // local.copy(solution); // make a local copy of solution for (int i = 0; i < nrIndependentAliens; i++) { NonGroundAlien& nga = nonGroundAliens[i]; Term* t = nga.term; LhsAutomaton* a = nga.automaton; int m = nga.multiplicity; for (int j = (t == 0) ? 0 : subject->findFirstPotentialMatch(t, solution); j < nrArgs; j++) { DagNode* d = args[j].dagNode; if (t != 0 && t->partialCompare(solution, d) == Term::LESS) break; if (currentMultiplicity[j] >= m) { Subproblem* sp; if (a->match(d, local, sp)) { solution.copy(local); currentMultiplicity[j] -= m; subproblems.add(sp); goto nextIndependentAlien; } local.copy(solution); // restore local copy of solution } } return false; nextIndependentAlien: ; } } if (nonGroundAliens.length() > nrIndependentAliens) { // // Need to build bipartite graph for remaining aliens as usual. // ACU_Subproblem* sp = buildBipartiteGraph(subject, solution, 0, nrIndependentAliens, subproblems); if (sp == 0) return false; if (sp->noPatterns()) delete sp; // remaining aliens were forced else { sp->addSubjects(currentMultiplicity); subproblems.add(sp); } } returnedSubproblem = subproblems.extractSubproblem(); return true; } local_inline int ACU_LhsAutomaton::computeTotalMultiplicity() { int totalSubjectMultiplicity = 0; for (int i : currentMultiplicity) totalSubjectMultiplicity += i; return totalSubjectMultiplicity; } bool ACU_LhsAutomaton::match(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo) { if (subject->symbol() != topSymbol) { if (collapsePossible) return collapseMatch(subject, solution, returnedSubproblem, extensionInfo); return false; } Assert(matchAtTop == (extensionInfo != 0), "matchAtTop disagreement"); returnedSubproblem = 0; // // Check to see if we should use red-black matcher. // if (safeCast(ACU_BaseDagNode*, subject)->isTree()) { ACU_TreeDagNode* t = safeCast(ACU_TreeDagNode*, subject); if (treeMatchOK) { int r = treeMatch(t, solution, returnedSubproblem, safeCast(ACU_ExtensionInfo*, extensionInfo)); if (r == true || r == false) return r; } (void) ACU_TreeDagNode::treeToArgVec(t); } ACU_DagNode* s = safeCast(ACU_DagNode*, subject); // // Check for trivial failure and eliminate stuff that can only // be matched in one way. // if (!multiplicityChecks(s) || !eliminateGroundAliens(s) || !eliminateBoundVariables(s, solution) || !eliminateGroundedOutAliens(s, solution)) return false; if (extensionInfo == 0) { // // Matching without extension special cases: // if (lastUnboundVariable == NONE) { if (totalNonGroundAliensMultiplicity != computeTotalMultiplicity()) return false; if (totalNonGroundAliensMultiplicity == 0) return true; if (matchStrategy == ALIENS_ONLY) return aliensOnlyMatch(s, solution, returnedSubproblem); } else { Assert(matchStrategy != GROUND_OUT, "didn't ground out"); Assert(matchStrategy != ALIENS_ONLY, "variable left"); TopVariable& tv = topVariables[lastUnboundVariable]; if (tv.prevUnbound == NONE) { int needed = totalNonGroundAliensMultiplicity; if (needed == 0) return forcedLoneVariableCase(s, solution, returnedSubproblem); // // Check for trivial failure. // if (!(tv.takeIdentity)) needed += tv.multiplicity; if (computeTotalMultiplicity() < needed) return false; } Assert(matchStrategy != LONE_VARIABLE, "> 1 variable left"); } } // // If we have are matching with extension we have to ensure that at least // two real subterms are actually matched; i.e. extension cannot be whole // subject or whole subject except for one alien subterm. // ACU_ExtensionInfo* e = safeCast(ACU_ExtensionInfo*, extensionInfo); if (e != 0) e->setUpperBound(totalMultiplicity - 2); if (matchStrategy == GREEDY) { // // Greedy matching special cases: // subjects.resize(currentMultiplicity.length()); Vector::iterator dest = subjects.begin(); for (int i : currentMultiplicity) { dest->multiplicity = i; ++dest; } int r = (totalNonGroundAliensMultiplicity != 0) ? greedyMatch(s, solution, e) : greedyPureMatch(s, solution, e); if (r != UNDECIDED) return r; } // // If all else fails... // return fullMatch(s, solution, returnedSubproblem, e); } bool ACU_LhsAutomaton::fullMatch(ACU_DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ACU_ExtensionInfo* extensionInfo) { DebugEnter("topSymbol=" << topSymbol << " totalLowerBound=" << totalLowerBound << " totalUpperBound=" << totalUpperBound << " nrTopVariables=" << topVariables.size() << " nrGroundAliens=" << groundAliens.size() << " nrGroundedOutAliens=" << groundedOutAliens.size() << " nrNonGroundAliens=" << nonGroundAliens.size() << " subject" << subject); SubproblemAccumulator subproblems; ACU_Subproblem* subproblem = buildBipartiteGraph(subject, solution, extensionInfo, 0, subproblems); if (subproblem == 0) return false; if (subproblem->noPatterns()) { //cout << "no patterns\n"; // // Check for trivial cases. // if (extensionInfo == 0) { if (lastUnboundVariable == NONE) { delete subproblem; for (int i : currentMultiplicity) { if (i > 0) return false; } goto succeed; } else { TopVariable& tv = topVariables[lastUnboundVariable]; if (tv.prevUnbound == NONE) { delete subproblem; Subproblem* sp = 0; if (forcedLoneVariableCase(subject, solution, sp)) { subproblems.add(sp); goto succeed; } return false; } } } else { if (lastUnboundVariable == NONE) { delete subproblem; extensionInfo->clear(); int total = 0; int nrSubjects = currentMultiplicity.length(); for (int i = 0; i < nrSubjects; i++) { int t = currentMultiplicity[i]; if (t > 0) { extensionInfo->setUnmatched(i, t); total += t; } } if (total > extensionInfo->getUpperBound()) return false; // would give extension too much extensionInfo->setMatchedWhole(total == 0); extensionInfo->setValidAfterMatch(true); goto succeed; } else { TopVariable& tv = topVariables[lastUnboundVariable]; if (tv.prevUnbound == NONE) { // // We have extension, and a single unbound top variable. // We check if we can force the lone variable to take a lone subject. // if (totalMultiplicity > 2) { if (tv.takeIdentity) goto cantForce; // // We had more than two subjects, but we can't take the identity // so there is still hope that there is only one left that // can be forced. // int total = 0; int nrSubjects = currentMultiplicity.length(); for (int i = 0; i < nrSubjects; i++) { total += currentMultiplicity[i]; if (total > 1) goto cantForce; } } { delete subproblem; Subproblem* sp = 0; if (forcedLoneVariableCase(subject, solution, sp)) { subproblems.add(sp); extensionInfo->setMatchedWhole(true); extensionInfo->setValidAfterMatch(true); goto succeed; } return false; } cantForce: ; } } } } if (!handleElementVariables(subject, solution, subproblem)) { delete subproblem; return false; } subproblem->addSubjects(currentMultiplicity); subproblems.add(subproblem); { for (const TopVariable& i : topVariables) { if ((i.upperBound != 1 || i.takeIdentity) && solution.value(i.index) == 0) { subproblem->addTopVariable(i.index, i.multiplicity, i.takeIdentity ? 0 : 1, i.upperBound, i.sort); if (i.abstracted != 0) { subproblems.add (new VariableAbstractionSubproblem(i.abstracted, i.index, solution.nrFragileBindings())); } } } } if (extensionInfo != 0) { // // Extension info will not be valid until solve phase. // extensionInfo->setValidAfterMatch(false); } succeed: returnedSubproblem = subproblems.extractSubproblem(); return true; } ACU_Subproblem* ACU_LhsAutomaton::buildBipartiteGraph(ACU_DagNode* subject, Substitution& solution, ACU_ExtensionInfo* extensionInfo, int firstAlien, SubproblemAccumulator& subproblems) { ArgVec& args = subject->argArray; int nrArgs = args.length(); ACU_Subproblem* subproblem = new ACU_Subproblem(subject, extensionInfo); int nrNonGroundAliens = nonGroundAliens.length(); //cout << "\n bipartite: "; for (int i = firstAlien; i < nrNonGroundAliens; i++) { int nrMatches = 0; NonGroundAlien& nga = nonGroundAliens[i]; Term* t = nga.term; //cout << Tty(Tty::GREEN) << t << Tty(Tty::RESET) << ' '; LhsAutomaton* a = nga.automaton; int m = nga.multiplicity; int pn = subproblem->addPatternNode(m); for (int j = (t == 0) ? 0 : subject->findFirstPotentialMatch(t, solution); j < nrArgs; j++) { DagNode* d = args[j].dagNode; if (t != 0 && t->partialCompare(solution, d) == Term::LESS) break; if (currentMultiplicity[j] >= m) { local.copy(solution); Subproblem* sp; if (a->match(d, local, sp)) { subproblem->addEdge(pn, j, local - solution, sp); ++nrMatches; } } } //cout << Tty(Tty::RED) << nrMatches << Tty(Tty::RESET) << ' '; if (nrMatches == 0) { delete subproblem; return 0; } if (nrMatches == 1) { //cout << "forcing\n"; // // Only one match so we can force it. // int uniqueSubject; LocalBinding* lb; Subproblem* sp; subproblem->removePatternNode(uniqueSubject, lb, sp); currentMultiplicity[uniqueSubject] -= m; if (lb != 0) { lb->assert(solution); delete lb; } subproblems.add(sp); // // We need to check if any of our unbound variables became bound. // int parent = NONE; for (int i = lastUnboundVariable; i != NONE;) { TopVariable& tv = topVariables[i]; DagNode* d = solution.value(tv.index); if (d != 0) { if (!(subject->eliminateSubject(d, tv.multiplicity, currentMultiplicity))) { delete subproblem; return 0; } // // Need to unlink from linked list of unbound variables. // i = tv.prevUnbound; if (parent == NONE) lastUnboundVariable = i; else topVariables[parent].prevUnbound = i; } else { parent = i; i = tv.prevUnbound; } } } } return subproblem; } bool ACU_LhsAutomaton::handleElementVariables(ACU_DagNode* subject, Substitution& solution, ACU_Subproblem* subproblem) { ArgVec& args = subject->argArray; int nrArgs = args.length(); // // Treat unbound variables that take exactly 1 subject like non-ground aliens. // for (const TopVariable& i : topVariables) { if (i.upperBound == 1 && !(i.takeIdentity) && solution.value(i.index) == 0) { bool matchable = false; int m = i.multiplicity; int pn = subproblem->addPatternNode(m); for (int j = 0; j < nrArgs; j++) { if (currentMultiplicity[j] >= m) { DagNode* d = args[j].dagNode; if(d->leq(i.sort)) { LocalBinding* b = new LocalBinding(1); b->addBinding(i.index, d); subproblem->addEdge(pn, j, b, 0); matchable = true; } } } if (!matchable) return false; } } return true; } Maude-Maude3.2/src/ACU_Theory/ACU_MergeSort.cc000066400000000000000000000134711420036611000210230ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Specialized mergesort algorithm for ACU argument lists. // void ACU_DagNode::mergeSortAndUniquize() { int nrArgs = argArray.length(); int nrRuns = runsBuffer.length(); ArgVec mergeBuffer(nrArgs); while (nrRuns > 1) { int d = 0; int rd = 0; int i = 0; for (; i < nrRuns - 1; i += 2) { // // Merge runs i and i+1 // int p1 = runsBuffer[i]; int e1 = runsBuffer[i + 1]; int p2 = runsBuffer[i + 1]; int e2 = i + 2 < nrRuns ? runsBuffer[i + 2] : nrArgs; runsBuffer[rd++] = d; // save start of merged run we are creating for(;;) { int r = argArray[p1].dagNode->compare(argArray[p2].dagNode); if (r < 0) { mergeBuffer[d++] = argArray[p1++]; if (p1 == e1) { p1 = p2; e1 = e2; break; } } else if (r > 0) { mergeBuffer[d++] = argArray[p2++]; if (p2 == e2) break; } else { mergeBuffer[d].dagNode = argArray[p1].dagNode; mergeBuffer[d++].multiplicity = argArray[p1++].multiplicity + argArray[p2++].multiplicity; if (p1 == e1) { p1 = p2; e1 = e2; break; } if (p2 == e2) break; } } while (p1 < e1) mergeBuffer[d++] = argArray[p1++]; } if (i < nrRuns) { Assert(rd < i, "floor(nrRuns/2) >= nrRuns - 1"); runsBuffer[rd++] = d; // Assert guarantees we don't overwrite runsBuffer[i] // // Copy odd run into merge buffer // for (int p = runsBuffer[i]; p < nrArgs; p++) mergeBuffer[d++] = argArray[p]; } nrArgs = d; nrRuns = rd; argArray.swap(mergeBuffer); } argArray.contractTo(nrArgs); // merging may have shrunk number of arguments } void ACU_DagNode::sortAndUniquize() { // // ACU argument lists tend to have long runs of in order // arguments so we discover these runs first befor running // the mergesort algorithm. // int nrArgs = argArray.length(); for (int i = 1; i < nrArgs; i++) { int r = argArray[i - 1].dagNode->compare(argArray[i].dagNode); if (r >= 0) { runsBuffer.contractTo(1); int lastRun = 0; runsBuffer[0] = lastRun; int d = i - 1; for(;;) { if (r == 0) argArray[d].multiplicity += argArray[i].multiplicity; else if (r < 0) argArray[++d] = argArray[i]; else { if (lastRun == d) // don't make a run of length 1 { Pair t(argArray[d]); argArray[d] = argArray[i]; argArray[++d] = t; } else { argArray[++d] = argArray[i]; lastRun = d; runsBuffer.append(lastRun); } } if (++i == nrArgs) break; r = argArray[d].dagNode->compare(argArray[i].dagNode); } argArray.contractTo(d + 1); if (runsBuffer.length() > 1) mergeSortAndUniquize(); break; } } } void ACU_DagNode::flattenSortAndUniquize(int expansion) { Symbol* s = symbol(); int nrArgs = argArray.length(); ArgVec newArray(nrArgs + expansion); runsBuffer.contractTo(1); int lastRun = 0; runsBuffer[0] = lastRun; int d = -1; // HACK: should use iterators for everything for (int i = 0; i < nrArgs; i++) { DagNode* n = argArray[i].dagNode; if (n->symbol() == s) { // // Need to flatten in subterm. // int m = argArray[i].multiplicity; if (d >= 0) { lastRun = d + 1; runsBuffer.append(lastRun); } ArgVec::iterator dest = newArray.begin() + (d + 1); if (safeCast(ACU_BaseDagNode*, n)->isTree()) { const ACU_Tree& tree = safeCast(ACU_TreeDagNode*, n)->getTree(); ACU_FastIter i(tree); do { dest->dagNode = i.getDagNode(); dest->multiplicity = m * i.getMultiplicity(); ++dest; i.next(); } while (i.valid()); d += tree.getSize(); } else { const ArgVec& argArray2 = safeCast(ACU_DagNode*, n)->argArray; ArgVec::const_iterator i = argArray2.begin(); const ArgVec::const_iterator e = argArray2.end(); do { dest->dagNode = i->dagNode; dest->multiplicity = m * i->multiplicity; ++dest; ++i; } while (i != e); d += argArray2.length(); } } else { if (d >= 0) { int r = newArray[d].dagNode->compare(n); if (r == 0) { newArray[d].multiplicity += argArray[i].multiplicity; continue; } else if (r > 0) { if (lastRun == d) // don't make a run of length 1 { newArray[d + 1] = newArray[d]; newArray[d] = argArray[i]; ++d; continue; } else { lastRun = d + 1; runsBuffer.append(lastRun); } } } newArray[++d] = argArray[i]; } } /* cout << " flattenSortAndUniquize() runs buffer: "; for (int i = 0; i < runsBuffer.length(); i++) cout << runsBuffer[i] << ' '; cout << " nrArgs = " << newArray.length() << '\n'; */ newArray.contractTo(d + 1); argArray.swap(newArray); if (runsBuffer.length() > 1) mergeSortAndUniquize(); } Maude-Maude3.2/src/ACU_Theory/ACU_NGA_LhsAutomaton.cc000066400000000000000000000134561420036611000222220ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class ACU_NGA_LhsAutomaton. // // utility stuff #include "macros.hh" #include "indent.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "variable.hh" #include "ACU_Persistent.hh" #include "ACU_Theory.hh" // interface class definitions #include "associativeSymbol.hh" #include "dagNode.hh" #include "subproblem.hh" #include "extensionInfo.hh" // core class definitions #include "substitution.hh" // ACU Red-Black class definitions #include "ACU_SlowIter.hh" // ACU theory class definitions #include "ACU_Symbol.hh" #include "ACU_DagNode.hh" #include "ACU_TreeDagNode.hh" #include "ACU_NGA_LhsAutomaton.hh" ACU_NGA_LhsAutomaton::ACU_NGA_LhsAutomaton(ACU_Symbol* symbol, bool matchAtTop, bool collapsePossible, int nrVariables, LhsAutomaton* stripperAutomaton, Term* stripperTerm, VariableTerm* collector) : ACU_CollectorLhsAutomaton(symbol, matchAtTop, collapsePossible, nrVariables, collector), stripperAutomaton(stripperAutomaton), stripperTerm(stripperTerm) { Assert(!(stripperTerm->ground()), "stripper term must be non-ground"); Assert(stripperTerm->stable(), "stripper term must be stable"); } ACU_NGA_LhsAutomaton::~ACU_NGA_LhsAutomaton() { delete stripperAutomaton; } bool ACU_NGA_LhsAutomaton::match(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo) { if (collectorFree(solution)) { if (subject->symbol() == getSymbol()) { // // Non-collapse case. // if (safeCast(ACU_BaseDagNode*, subject)->isTree()) { // // Red-black case. // ACU_TreeDagNode* s = safeCast(ACU_TreeDagNode*, subject); ACU_SlowIter i; if (s->getTree().findFirstPotentialMatch(stripperTerm, solution, i)) { DagNode* d = i.getDagNode(); Substitution& local = getLocal(); for (;;) { local.copy(solution); if (stripperAutomaton->match(d, local, returnedSubproblem)) { if (returnedSubproblem == 0) { if (!collect(i, s, local)) goto fullMatch; // collect() destroys i if (extensionInfo) { extensionInfo->setValidAfterMatch(true); extensionInfo->setMatchedWhole(true); } solution.copy(local); return true; } else { delete returnedSubproblem; goto fullMatch; } } i.next(); if (!i.valid()) break; d = i.getDagNode(); if (stripperTerm->partialCompare(solution, d) == Term::LESS) { // // stripperTerm is less than d, so it will be less than // all next arguments and we can quit. // break; } } } } else { // // ArgVec case. // ACU_DagNode* s = safeCast(ACU_DagNode*, subject); int nrArgs = s->argArray.length(); int i = s->findFirstPotentialMatch(stripperTerm, solution); if (i < nrArgs) { DagNode* d = s->argArray[i].dagNode; Substitution& local = getLocal(); for (;;) { local.copy(solution); if (stripperAutomaton->match(d, local, returnedSubproblem)) { if (returnedSubproblem == 0) { if (!collect(i, s, local)) goto fullMatch; // on a hiding to nothing if (extensionInfo) { extensionInfo->setValidAfterMatch(true); extensionInfo->setMatchedWhole(true); } solution.copy(local); return true; } else { delete returnedSubproblem; goto fullMatch; } } ++i; if (i >= nrArgs) break; d = s->argArray[i].dagNode; if (stripperTerm->partialCompare(solution, d) == Term::LESS) { // // stripperTerm is less than d, so it will be less than // all next arguments and we can quit. // break; } } } } return false; } else { // // Collapse case. // if (!getCollapsePossible()) return false; Assert(extensionInfo == 0 && subject->getSortIndex() != Sort::SORT_UNKNOWN, "collapse to top not handled by ACU_NGA_LhsAutomaton"); if (!(stripperAutomaton->match(subject, solution, returnedSubproblem))) return false; collapse(solution); return true; } } fullMatch: return ACU_LhsAutomaton::match(subject, solution, returnedSubproblem, extensionInfo); } #ifdef DUMP void ACU_NGA_LhsAutomaton::dump(ostream& s, const VariableInfo& variableInfo, int indentLevel) { s << Indent(indentLevel) << "Begin{ACU_NGA_LhsAutomaton}\n"; ++indentLevel; s << Indent(indentLevel) << "\tstripperTerm = \"" << stripperTerm << "\"\n"; s << Indent(indentLevel) << "stripperAutomaton =\n"; stripperAutomaton->dump(s, variableInfo, indentLevel + 1); ACU_CollectorLhsAutomaton::dump(s, variableInfo, indentLevel); s << Indent(indentLevel - 1) << "End{ACU_NGA_LhsAutomaton}\n"; } #endif Maude-Maude3.2/src/ACU_Theory/ACU_NGA_LhsAutomaton.hh000066400000000000000000000035711420036611000222310ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for ACU non-ground alien stripper-collector algorithm lhs automaton. // #ifndef _ACU_NGA_LhsAutomaton_hh_ #define _ACU_NGA_LhsAutomaton_hh_ #include "ACU_CollectorLhsAutomaton.hh" class ACU_NGA_LhsAutomaton : public ACU_CollectorLhsAutomaton { NO_COPYING(ACU_NGA_LhsAutomaton); public: ACU_NGA_LhsAutomaton(ACU_Symbol* symbol, bool matchAtTop, bool collapsePossible, int nrVariables, LhsAutomaton* stripperAutomaton, Term* stripperTerm, VariableTerm* collector); ~ACU_NGA_LhsAutomaton(); // // Standard LhsAutomaton operations. // bool match(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo); #ifdef DUMP void dump(ostream& s, const VariableInfo& variableInfo, int indentLevel); #endif private: // // The stripper automaton strips off one argument; it must be // non-ground and stable. // LhsAutomaton* const stripperAutomaton; Term* const stripperTerm; }; #endif Maude-Maude3.2/src/ACU_Theory/ACU_NonLinearLhsAutomaton.cc000066400000000000000000000164131420036611000233370ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class ACU_NonLinearLhsAutomaton. // // utility stuff #include "macros.hh" #include "indent.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "ACU_Persistent.hh" #include "ACU_Theory.hh" // interface class definitions #include "associativeSymbol.hh" #include "dagNode.hh" #include "term.hh" // core class definitions #include "variableInfo.hh" #include "substitution.hh" // variable class definitions #include "variableSymbol.hh" #include "variableTerm.hh" // ACU Red-Black class definitions #include "ACU_SlowIter.hh" // ACU theory class definitions #include "ACU_Symbol.hh" #include "ACU_DagNode.hh" #include "ACU_TreeDagNode.hh" #include "ACU_NonLinearLhsAutomaton.hh" #include "ACU_ExtensionInfo.hh" ACU_NonLinearLhsAutomaton::ACU_NonLinearLhsAutomaton(ACU_Symbol* symbol, int nrVariables, int varIndex, int multiplicity, Sort* varSort) : ACU_LhsAutomaton(symbol, true, false, nrVariables), varIndex(varIndex), multiplicity(multiplicity), varSort(varSort), unitSort(symbol->sortBound(varSort) == 1), pureSort(symbol->sortStructure(varSort) == AssociativeSymbol::PURE_SORT) { Assert(unitSort || pureSort || symbol->sortStructure(varSort) == AssociativeSymbol::LIMIT_SORT, "bad sort"); Assert(multiplicity >= 2, "bad multiplicity"); } void ACU_NonLinearLhsAutomaton:: fillOutExtensionInfo(ACU_DagNode* subject, const ArgVec::const_iterator chosen, ACU_ExtensionInfo* extensionInfo) { int nrArgs = subject->argArray.length(); ArgVec::const_iterator args = subject->argArray.begin(); if (nrArgs == 1 && args->multiplicity == multiplicity) extensionInfo->setMatchedWhole(true); else { extensionInfo->setMatchedWhole(false); extensionInfo->reset(); for (int i = 0; i < nrArgs; i++, ++args) { int m = args->multiplicity; extensionInfo->setUnmatched(i, args == chosen ? (m - multiplicity) : m); } Assert(args == subject->argArray.end(), "iterator inconsistent"); } extensionInfo->setValidAfterMatch(true); } bool ACU_NonLinearLhsAutomaton::match(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo) { Assert(extensionInfo != 0, "should only be called in extension case"); if (subject->symbol() != getSymbol()) return false; if (solution.value(varIndex) != 0) goto undecided; returnedSubproblem = 0; if (safeCast(ACU_BaseDagNode*, subject)->isTree()) { // // Red-black case. // ACU_Tree t(safeCast(ACU_TreeDagNode*, subject)->getTree()); if (t.getMaxMult() < multiplicity) return false; DagNode* d = makeHighMultiplicityAssignment(multiplicity, varSort, t); if (d == 0) { // // Because makeHighMultiplicityAssignment() just looks at // first argument with enough multiplicity we must assume we // may have missed a match. // goto undecided; } solution.bind(varIndex, d); ACU_ExtensionInfo* e = safeCast(ACU_ExtensionInfo*, extensionInfo); e->setValidAfterMatch(true); int size = t.getSize(); if (size == 0) e->setMatchedWhole(true); else { e->setMatchedWhole(false); if (size == 1 && t.getMaxMult() == 1) e->setUnmatched(t.getSoleDagNode()); else e->setUnmatched(new ACU_TreeDagNode(getSymbol(), t)); } return true; } else { // // ArgVec case. // ACU_DagNode* s = safeCast(ACU_DagNode*, subject); int fastMult = multiplicity; // register copy to avoid reloading after writes ACU_ExtensionInfo* e = safeCast(ACU_ExtensionInfo*, extensionInfo); if (unitSort) { // // Can only assign one subject. // FOR_EACH_CONST(i, ArgVec, s->argArray) { if (i->multiplicity >= fastMult && i->dagNode->leq(varSort)) { solution.bind(varIndex, i->dagNode); fillOutExtensionInfo(s, i, e); return true; } } return false; } else { // // First find out how many subjects are assignable. // int size = 0; ArgVec::const_iterator last; // gcc gives uninitialized warning FOR_EACH_CONST(i, ArgVec, s->argArray) { if (i->multiplicity >= fastMult && i->dagNode->leq(varSort)) { ++size; last = i; } } if (size == 0) { if (pureSort) return false; goto undecided; } // // Now make binding. // if (size == 1 && last->multiplicity < 2 * fastMult) { solution.bind(varIndex, last->dagNode); fillOutExtensionInfo(s, last, e); } else { ACU_DagNode* d = new ACU_DagNode(getSymbol(), size, ACU_DagNode::ASSIGNMENT); ArgVec::iterator j = d->argArray.begin(); e->reset(); bool whole = true; FOR_EACH_CONST(i, ArgVec, s->argArray) { int m = i->multiplicity; if (m >= fastMult && i->dagNode->leq(varSort)) { int rem = m % fastMult; int result = m / fastMult; j->dagNode = i->dagNode;; j->multiplicity = result; ++j; e->setUnmatched(i - s->argArray.begin(), rem); if (rem != 0) whole = false; } else { e->setUnmatched(i - s->argArray.begin(), m); whole = false; } } Assert(j == d->argArray.end(), "arg list mismatch"); e->setMatchedWhole(whole); e->setValidAfterMatch(true); if (s->isReduced() && getSymbol()->sortConstraintFree()) { getSymbol()->computeBaseSort(d); d->setReduced(); } solution.bind(varIndex, d); } return true; } } undecided: return ACU_LhsAutomaton::match(subject, solution, returnedSubproblem, extensionInfo); } #ifdef DUMP void ACU_NonLinearLhsAutomaton::dump(ostream& s, const VariableInfo& variableInfo, int indentLevel) { s << Indent(indentLevel) << "Begin{ACU_NonLinearLhsAutomaton}\n"; ++indentLevel; s << Indent(indentLevel) << "varIndex = " << varIndex << " \"" << variableInfo.index2Variable(varIndex) << "\tmultiplicity = " << multiplicity << '\n'; s << Indent(indentLevel) << "varSort = " << varSort << "\tunitSort = " << unitSort << "\tpureSort = " << pureSort << '\n'; ACU_LhsAutomaton::dump(s, variableInfo, indentLevel); s << Indent(indentLevel - 1) << "End{ACU_NonLinearLhsAutomaton}\n"; } #endif Maude-Maude3.2/src/ACU_Theory/ACU_NonLinearLhsAutomaton.hh000066400000000000000000000037331420036611000233520ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for fast left hand side automata in the AC and ACU theories // when there is just a variable of multiplicity >= 2 with pure, // limit or unit sort which cannot take identity, at the top. // #ifndef _ACU_NonLinearLhsAutomaton_hh_ #define _ACU_NonLinearLhsAutomaton_hh_ #include "ACU_LhsAutomaton.hh" class ACU_NonLinearLhsAutomaton : public ACU_LhsAutomaton { NO_COPYING(ACU_NonLinearLhsAutomaton); public: ACU_NonLinearLhsAutomaton(ACU_Symbol* symbol, int nrVariables, int varIndex, int multiplicity, Sort* varSort); // // Standard LhsAutomaton operations. // bool match(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo); #ifdef DUMP void dump(ostream& s, const VariableInfo& variableInfo, int indentLevel); #endif private: void fillOutExtensionInfo(ACU_DagNode* subject, const ArgVec::const_iterator chosen, ACU_ExtensionInfo* extensionInfo); const int varIndex; const int multiplicity; Sort* const varSort; const Bool unitSort; const Bool pureSort; }; #endif Maude-Maude3.2/src/ACU_Theory/ACU_Normalize.cc000066400000000000000000000216011420036611000210460ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // AC/ACU normalization. // void ACU_DagNode::copyAndBinaryInsert(const ACU_DagNode* source, DagNode* dagNode, int multiplicity) { // // Copy source's argArray into our argArray, inserting dagNode // in the correct place. // int nrSourceArgs = source->argArray.length(); int pos = source->binarySearch(dagNode); // DebugAdvisory("copyAndBinaryInsert() " << pos << " out of " << nrSourceArgs); if (pos >= 0) { // // We found dagNode in the source argument array at index pos so we can // just do a fast copy of the source array and increment the multiplicity of // the argument at index pos. // argArray.resizeWithoutPreservation(nrSourceArgs); fastCopy(source->argArray.begin(), source->argArray.end(), argArray.begin()); argArray[pos].multiplicity += multiplicity; } else { // // Didn't find dagNode, and pos is the 1's complement of the index // where dagNode should be inserted. // pos = ~pos; argArray.resizeWithoutPreservation(nrSourceArgs + 1); const ArgVec::const_iterator i = source->argArray.begin(); const ArgVec::const_iterator p = i + pos; const ArgVec::iterator j = fastCopy(i, p, argArray.begin()); j->dagNode = dagNode; j->multiplicity = multiplicity; fastCopy(p, source->argArray.end(), j + 1); } } void ACU_DagNode::collapse(DagNode* arg) { DagNode* remaining = (symbol()->getPermuteStrategy() == BinarySymbol::EAGER) ? arg : arg->copyReducible(); remaining->overwriteWithClone(this); } void ACU_DagNode::insertAlien(ACU_BaseDagNode* normalForm, int nMult, DagNode* alien, int aMult) { if (normalForm->isTree()) { ACU_Tree t = safeCast(ACU_TreeDagNode*, normalForm)->getTree(); if (nMult == 1) { t.insertMult(alien, aMult); (void) new (this) ACU_TreeDagNode(symbol(), t); } else { // // Rare case - do slow thing. // flattenSortAndUniquize(t.getSize() - 1); } } else { ACU_DagNode* d = safeCast(ACU_DagNode*, normalForm); if (nMult == 1) { #if 0 copyAndBinaryInsert(d, alien, aMult); if (symbol()->useTree() && argArray.length() >= CONVERT_THRESHOLD) { // // This is the place ACU_TreeDagNodes are // created where none previously exist. // ACU_Tree t(d->argArray); (void) new (this) ACU_TreeDagNode(symbol(), t); } #else if (symbol()->useTree() && d->argArray.length() >= CONVERT_THRESHOLD) { ACU_Tree t(d->argArray); t.insertMult(alien, aMult); (void) new (this) ACU_TreeDagNode(symbol(), t); } else copyAndBinaryInsert(d, alien, aMult); #endif } else { // // Rare case - do slow thing. // flattenSortAndUniquize(d->argArray.length() - 1); } } } bool ACU_DagNode::normalizeAtTop() { #if 0 cout << "normalizeAtTop() " << this << endl; #endif // // We return true if we have an identity and collapsed out of theory or // to something that was already in normal form. // ACU_Symbol* s = symbol(); Term* identity = s->getIdentity(); int nrArgs = argArray.length(); if (nrArgs == 2) { // // This is the usual case so we heavily optimize it, // considering many subcases. // DagNode* d0 = argArray[0].dagNode; DagNode* d1 = argArray[1].dagNode; if (d0->symbol() != s) { if (d1->symbol() != s) { // // (1) Two alien subterms. // int r = d0->compare(d1); if (r < 0) { // // In order - the most common sub-subcase. // if (identity != 0) { if (identity->equal(d0)) goto collapseToArgument1; if (identity->equal(d1)) goto collapseToArgument0; } } else if (r > 0) { // // Reverse order. // if (identity != 0) { if (identity->equal(d0)) { collapseToArgument1: int m = argArray[1].multiplicity; if (m == 1) { collapse(d1); return true; } argArray[0].dagNode = d1; argArray[0].multiplicity = m; argArray.contractTo(1); return false; } else if (identity->equal(d1)) { collapseToArgument0: int m = argArray[0].multiplicity; if (m == 1) { collapse(d0); return true; } argArray.contractTo(1); return false; } } int m = argArray[1].multiplicity; argArray[1].multiplicity = argArray[0].multiplicity; argArray[1].dagNode = d0; argArray[0].dagNode = d1; argArray[0].multiplicity = m; } else { // // Combine equal arguments. // if (identity != 0 && identity->equal(d0)) { collapse(d0); return true; } argArray[0].multiplicity += argArray[1].multiplicity; argArray.contractTo(1); } // // End of two alien subterms subcase. // } else { // // (2) d0 alien, d1 in theory normal form. // if (identity != 0 && identity->equal(d0)) { // // Collapse to d1. // d1->overwriteWithClone(this); return true; } insertAlien(safeCast(ACU_BaseDagNode*, d1), argArray[1].multiplicity, d0, argArray[0].multiplicity); // // End of d0 alien, d1 in theory normal form subcase. // } } else { if (d1->symbol() != s) { // // (3) d0 in theory normal form, d1 alien. // if (identity != 0 && identity->equal(d1)) { // // Collapse to d0. // d0->overwriteWithClone(this); return true; } insertAlien(safeCast(ACU_BaseDagNode*, d0), argArray[0].multiplicity, d1, argArray[1].multiplicity); // // End of d0 in theory normal form, d1 alien subcase. // } else { // // (4) Two theory normal form subterms. // ACU_BaseDagNode* b0 = safeCast(ACU_BaseDagNode*, d0); ACU_BaseDagNode* b1 = safeCast(ACU_BaseDagNode*, d1); if (argArray[0].multiplicity == 1 && argArray[1].multiplicity == 1) { if (b0->isTree()) { if (b1->isTree()) { fastMerge(safeCast(ACU_TreeDagNode*, d0), safeCast(ACU_TreeDagNode*, d1)); // // Convert back to tree representation if // size of merged argument lists exceeds // a threshold. // if (symbol()->useTree() && argArray.length() >= MERGE_THRESHOLD) { ACU_Tree t(argArray); (void) new (this) ACU_TreeDagNode(symbol(), t); } } else { fastMerge(safeCast(ACU_DagNode*, d1), safeCast(ACU_TreeDagNode*, d0)); } } else { if (b1->isTree()) { fastMerge(safeCast(ACU_DagNode*, d0), safeCast(ACU_TreeDagNode*, d1)); } else { fastMerge(safeCast(ACU_DagNode*, d0), safeCast(ACU_DagNode*, d1)); } } } else { // // Rare sub-subcase - do slow thing. // flattenSortAndUniquize(b0->getSize() + b1->getSize() - 2); } // // End of two theory normal form subterms subcase. // } } return false; // // End of two arguments case. // } // // General case. // return dumbNormalizeAtTop(); } bool ACU_DagNode::dumbNormalizeAtTop() { //cout << this << " norm to "; // // Don't try any fancy optimizations and in particular never convert to // tree form - thus we can safely be called during unification. // ACU_Symbol* s = symbol(); Term* identity = s->getIdentity(); int expansion = 0; bool needToFlatten = false; const ArgVec::const_iterator e = argArray.end(); for (ArgVec::const_iterator i = argArray.begin(); i != e; ++i) { DagNode* d = i->dagNode; if (d->symbol() == s) { expansion += safeCast(ACU_BaseDagNode*, d)->getSize() - 1; needToFlatten = true; // expansion due to flattening could be zero } } if (needToFlatten) flattenSortAndUniquize(expansion); else sortAndUniquize(); //cout << this << endl; return identity != 0 && eliminateArgument(identity); } Maude-Maude3.2/src/ACU_Theory/ACU_RhsAutomaton.cc000066400000000000000000000066411420036611000215410ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class ACU_RhsAutomaton. // // utility stuff #include "macros.hh" #include "vector.hh" #include "indent.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "ACU_Persistent.hh" #include "ACU_Theory.hh" // core class definitions #include "substitution.hh" #include "variableInfo.hh" // ACU theory class definitions #include "ACU_Symbol.hh" #include "ACU_DagNode.hh" #include "ACU_RhsAutomaton.hh" ACU_RhsAutomaton::ACU_RhsAutomaton(ACU_Symbol* symbol, int nrArgs) : topSymbol(symbol), arguments(0, nrArgs) { } void ACU_RhsAutomaton::addArgument(int index, int multiplicity) { int nrArgs = arguments.length(); arguments.expandBy(1); arguments[nrArgs].index = index; arguments[nrArgs].multiplicity = multiplicity; } void ACU_RhsAutomaton::close(int destinationIndex) { destination = destinationIndex; nrArguments = arguments.size(); } void ACU_RhsAutomaton::remapIndices(VariableInfo& variableInfo) { destination = variableInfo.remapIndex(destination); int nrArgs = arguments.length(); for (int i = 0; i < nrArgs; i++) arguments[i].index = variableInfo.remapIndex(arguments[i].index); } local_inline void ACU_RhsAutomaton::buildArguments(ArgVec& argArray, Substitution& matcher) const { Vector::const_iterator j = arguments.begin(); const Vector::const_iterator e = j + nrArguments; Assert(nrArguments > 0, "no args"); ArgVec::iterator i = argArray.begin(); do { i->dagNode = matcher.value(j->index); i->multiplicity = j->multiplicity; ++i; ++j; } while (j != e); Assert(i == argArray.end(), "iterator inconsistent"); } DagNode* ACU_RhsAutomaton::construct(Substitution& matcher) { ACU_DagNode* n = new ACU_DagNode(topSymbol, nrArguments); buildArguments(n->argArray, matcher); matcher.bind(destination, n); return n; } void ACU_RhsAutomaton::replace(DagNode* old, Substitution& matcher) { buildArguments((new(old) ACU_DagNode(topSymbol, nrArguments))->argArray, matcher); } #ifdef DUMP void ACU_RhsAutomaton::dump(ostream& s, const VariableInfo& variableInfo, int indentLevel) { s << Indent(indentLevel) << "Begin{ACU_RhsAutomaton}\n"; ++indentLevel; s << Indent(indentLevel) << "[" << destination << "] <= " << topSymbol << '('; int nrArgs = arguments.length(); for (int i = 0; i < nrArgs; i++) { s << '[' << arguments[i].index << "]^" << arguments[i].multiplicity; if (i + 1 < nrArgs) s << ", "; } s << ")\n"; s << Indent(indentLevel - 1) << "End{ACU_RhsAutomaton}\n"; } #endif Maude-Maude3.2/src/ACU_Theory/ACU_RhsAutomaton.hh000066400000000000000000000034321420036611000215460ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for right hand side automata in the AC and ACU theories. // #ifndef _ACU_RhsAutomaton_hh_ #define _ACU_RhsAutomaton_hh_ #include "rhsAutomaton.hh" class ACU_RhsAutomaton : public RhsAutomaton { NO_COPYING(ACU_RhsAutomaton); public: ACU_RhsAutomaton(ACU_Symbol* symbol, int nrArgs); void addArgument(int index, int multiplicity); void close(int destinationIndex); // // Standard RhsAutomaton operations. // void remapIndices(VariableInfo& variableInfo); DagNode* construct(Substitution& matcher); void replace(DagNode* old, Substitution& matcher); #ifdef DUMP void dump(ostream& s, const VariableInfo& variableInfo, int indentLevel); #endif private: struct Argument { int index; int multiplicity; }; void buildArguments(ArgVec& argArray, Substitution& matcher) const; ACU_Symbol* const topSymbol; Vector arguments; int nrArguments; int destination; }; #endif Maude-Maude3.2/src/ACU_Theory/ACU_Subproblem.cc000066400000000000000000000355211420036611000212260ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2021 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class ACU_Subproblem. // // utility stuff #include "macros.hh" #include "vector.hh" #include "indent.hh" #include "diophantineSystem.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "ACU_Persistent.hh" #include "ACU_Theory.hh" // interface class definitions #include "argVec.hh" #include "associativeSymbol.hh" #include "dagNode.hh" #include "subproblem.hh" // core class definitions #include "variableInfo.hh" #include "substitution.hh" #include "rewritingContext.hh" #include "localBinding.hh" // ACU theory class definitions #include "ACU_Symbol.hh" #include "ACU_DagNode.hh" #include "ACU_ExtensionInfo.hh" #include "ACU_Subproblem.hh" ACU_Subproblem::ACU_Subproblem(ACU_DagNode* subject, ACU_ExtensionInfo* extensionInfo) : subject(subject), extensionInfo(extensionInfo) { system = 0; } void ACU_Subproblem::addSubjects(Vector& multiplicity) { currentMultiplicity = multiplicity; // deep copy } ACU_Subproblem::~ACU_Subproblem() { for (const PatternNode& i : patternNodes) { for (const Edge& j : i.edges) { delete j.difference; delete j.subproblem; } } delete system; } int ACU_Subproblem::addPatternNode(int multiplicity) { int nrPatternNodes = patternNodes.length(); patternNodes.expandBy(1); patternNodes[nrPatternNodes].multiplicity = multiplicity; return nrPatternNodes; } void ACU_Subproblem::removePatternNode(int& uniqueSubject, LocalBinding*& difference, Subproblem*& subproblem) { int newLen = patternNodes.length() - 1; PatternNode& p = patternNodes[newLen]; Assert(p.edges.length() == 1, "can only remove pattern with single edge"); Edge& e = p.edges[0]; uniqueSubject = e.target; difference = e.difference; subproblem = e.subproblem; patternNodes.contractTo(newLen); } void ACU_Subproblem::addEdge(int pattern, int target, LocalBinding* difference, Subproblem* subproblem) { PatternNode& p = patternNodes[pattern]; int nrEdges = p.edges.length(); p.edges.expandBy(1); Edge& edge = p.edges[nrEdges]; edge.target = target; edge.difference = difference; edge.subproblem = subproblem; } void ACU_Subproblem::addTopVariable(int index, int multiplicity, int lowerBound, int upperBound, const Sort* sort) { int nrTopVariables = topVariables.length(); topVariables.expandBy(1); TopVariable& tv = topVariables[nrTopVariables]; tv.index = index; tv.multiplicity = multiplicity; tv.lowerBound = lowerBound; tv.upperBound = upperBound; tv.sort = sort; } bool ACU_Subproblem::solve(bool findFirst, RewritingContext& solution) { if (!findFirst && solveVariables(false, solution)) return true; for (;;) { if (!solvePatterns(findFirst, solution)) return false; if (solveVariables(true, solution)) return true; findFirst = false; } } bool ACU_Subproblem::solvePatterns(bool findFirst, RewritingContext& solution) { int nrPatterns = patternNodes.length(); if (nrPatterns == 0) return findFirst; int i = findFirst ? 0 : nrPatterns - 1; for(;;) { findFirst = patternNodes[i].solve(findFirst, solution, currentMultiplicity); if (findFirst) { if (++i == nrPatterns) return true; } else { if (--i < 0) break; } } return false; } bool ACU_Subproblem::PatternNode::solve(bool findFirst, RewritingContext& solution, Vector& currentMultiplicity) { int nrEdges = edges.length(); if (findFirst) selectedEdge = 0; for (; selectedEdge < nrEdges; selectedEdge++) { Edge& e = edges[selectedEdge]; int target = e.target; if (findFirst) { if (currentMultiplicity[target] < multiplicity) continue; if (e.difference != 0 && !(e.difference->assert(solution))) continue; currentMultiplicity[target] -= multiplicity; } Subproblem* subproblem = e.subproblem; if (subproblem == 0) { if (findFirst) return true; } else { if (subproblem->solve(findFirst, solution)) return true; } currentMultiplicity[target] += multiplicity; if (e.difference != 0) e.difference->retract(solution); findFirst = true; } return false; } bool ACU_Subproblem::solveVariables(bool findFirst, RewritingContext& solution) { if (findFirst && !extractDiophantineSystem(solution)) return false; int nrVars = variableMap.length(); ACU_Symbol* topSymbol = subject->symbol(); if (system == 0) { // // Deal with trivial Diophantine system - // we can succeed only once. // if (findFirst) return true; } else { bool buildReducedNodes = subject->isReduced(); while (system->solve()) { for (int i = 0; i < nrVars; ++i) { TopVariable& tv = topVariables[variableMap[i]]; DagNode *d = computeAssignment(i); if (d == 0) d = topSymbol->getIdentityDag(); else { if (!(d->checkSort(tv.sort, solution))) goto fail; if (d->symbol() == topSymbol && buildReducedNodes && d->getSortIndex() != Sort::SORT_UNKNOWN) d->setReduced(); } solution.bind(tv.index, d); } if (extensionInfo != 0) fillOutExtensionInfo(); return true; fail: MemoryCell::okToCollectGarbage(); // to avoid build up of failed solutions } } // // Unbind variables involved in Diophantine system // (Can we guarentee that the same set of variables will be involved // in each Diophantine system for this subproblem and avoid this; and // also reuse variableMap?); Subjects (even number of subjects) will // certainly change for each system. // for (int i : variableMap) solution.bind(topVariables[i].index, 0); return false; } bool ACU_Subproblem::noVariableCase(const Vector& multVec) { int nrSubjects = multVec.length(); if (extensionInfo == 0) { for (int i = 0; i < nrSubjects; ++i) { if (multVec[i] > 0) return false; } return true; } // // Extension takes everything. // extensionInfo->clear(); int total = 0; for (int i = 0; i < nrSubjects; ++i) { int t = multVec[i]; if (t > 0) { extensionInfo->setUnmatched(i, t); total += t; } } if (total > extensionInfo->getUpperBound()) return false; // would give extension too much extensionInfo->setMatchedWhole(total == 0); return true; } bool ACU_Subproblem::oneVariableCase(const Vector& multVec, RewritingContext& solution) { // // The case where we have a single unbound top variable // left which has multiplicity 1 and there is no extension // is common enough that we handle it with custom code that // avoids the Diophantine system setup and tear-down costs. // int nrSubjects = multVec.length(); int nrSubterms = 0; int last = NONE; for (int i = 0; i < nrSubjects; ++i) { if (multVec[i] > 0) { ++nrSubterms; last = i; } } TopVariable& tv = topVariables[variableMap[0]]; DagNode* d; if (nrSubterms == 0) { if (tv.lowerBound > 0) return false; d = subject->symbol()->getIdentityDag(); } else if (nrSubterms == 1 && multVec[last] == 1) { d = (subject->argArray[last]).dagNode; if (!(d->leq(tv.sort))) // d's sort must be known return false; } else { ACU_DagNode* a = new ACU_DagNode(subject->symbol(), nrSubterms, ACU_DagNode::ASSIGNMENT); ArgVec::const_iterator source = subject->argArray.begin(); ArgVec::iterator dest = a->argArray.begin(); for (int i = 0; i <= last; ++i, ++source) { int m = multVec[i]; if (m > 0) { dest->dagNode = source->dagNode; dest->multiplicity = m; ++dest; } } if (!(a->checkSort(tv.sort, solution))) return false; if (subject->isReduced() && a->getSortIndex() != Sort::SORT_UNKNOWN) a->setReduced(); d = a; } solution.bind(tv.index, d); return true; } bool ACU_Subproblem::extractDiophantineSystem(RewritingContext& solution) { // // Initialize data structures // delete system; system = 0; variableMap.clear(); // // Check for easy special cases. // int nrTopVariables = topVariables.length(); if (nrTopVariables == 1) { if (extensionInfo == 0) { TopVariable& tv = topVariables[0]; if (tv.multiplicity == 1 && solution.value(tv.index) == 0) { variableMap.append(0); return oneVariableCase(currentMultiplicity, solution); } } } else if (nrTopVariables == 0) return noVariableCase(currentMultiplicity); // // General case requires that we build the Diophantine system. // int nrSubjects = currentMultiplicity.length(); system = new DiophantineSystem(nrTopVariables, nrSubjects); afterMultiplicity = currentMultiplicity; // deep copy // // Find unbound variables (= rows in Diophantine system) // int nrNonIdentityVariables = 0; for (int i = 0; i < nrTopVariables; ++i) { TopVariable& tv = topVariables[i]; DagNode* d = solution.value(tv.index); if (d != 0) { if (!(subject->eliminateSubject(d, tv.multiplicity, afterMultiplicity))) return false; } else { variableMap.append(i); if (tv.lowerBound > 0) ++nrNonIdentityVariables; system->insertRow(tv.multiplicity, tv.lowerBound, tv.upperBound); } } // // Check if after handing bound variables we have reached an easy special case. // int nrVariables = variableMap.length(); if (nrVariables == 1) { if (extensionInfo == 0 && topVariables[variableMap[0]].multiplicity == 1) { delete system; system = 0; return oneVariableCase(afterMultiplicity, solution); } } else if (nrVariables == 0) { delete system; system = 0; return noVariableCase(afterMultiplicity); } // // Find unused subjects (= columns in Diophantine system) // subjectMap.clear(); for (int i = 0; i < nrSubjects; ++i) { int t = afterMultiplicity[i]; if (t > 0) { subjectMap.append(i); system->insertColumn(t); } } // // Check for trivial system. // if (subjectMap.empty()) { // // No subjects. // delete system; system = 0; if (nrNonIdentityVariables > 0) return false; // // Extension gets nothing and any unbound variables // must be bound to identity. // if (extensionInfo != 0) extensionInfo->setMatchedWhole(true); int nrVars = variableMap.length(); if (nrVars > 0) { DagNode* identityDag = subject->symbol()->getIdentityDag(); for (int i = 0; i < nrVars; ++i) solution.bind(topVariables[variableMap[i]].index, identityDag); } return true; } // // Extra row to account for extension. // if (extensionInfo != 0) system->insertRow(1, 0, extensionInfo->getUpperBound()); return true; } DagNode* ACU_Subproblem::computeAssignment(int row) { int nrColumns = system->columnCount(); int nrSubterms = 0; int totalMultiplicity = 0; int col = UNDEFINED; for (int i = 0; i < nrColumns; ++i) { int t = system->solution(row, i); if (t > 0) { ++nrSubterms; totalMultiplicity += t; col = i; } } if (totalMultiplicity == 1) return (subject->argArray[subjectMap[col]]).dagNode; if (totalMultiplicity == 0) return 0; // identity case ACU_Symbol* s = subject->symbol(); ACU_DagNode* d = new ACU_DagNode(s, nrSubterms, ACU_DagNode::ASSIGNMENT); int pos = 0; // // Because subject is in normal form and subjectMap is monotonic, we will // construct new ACU_DagNode in normal form. // for (int i = 0; i <= col; ++i) { int t = system->solution(row, i); if (t > 0) { d->argArray[pos].dagNode = (subject->argArray[subjectMap[i]]).dagNode; d->argArray[pos].multiplicity = t; ++pos; } } return d; } void ACU_Subproblem::fillOutExtensionInfo() { extensionInfo->setMatchedWhole(true); int nrColumns = system->columnCount(); int extensionRow = system->rowCount() - 1; bool partial = false; for (int i = 0; i < nrColumns; ++i) { int t = system->solution(extensionRow, i); if (t > 0) { if (!partial) { extensionInfo->setMatchedWhole(false); extensionInfo->clear(); partial = true; } extensionInfo->setUnmatched(subjectMap[i], t); } } } #ifdef DUMP void ACU_Subproblem::dump(ostream& s, const VariableInfo& variableInfo, int indentLevel) { s << Indent(indentLevel) << "Begin{ACU_Subproblem}\n"; ++indentLevel; s << Indent(indentLevel) << "subject = " << subject << '\n'; s << Indent(indentLevel) << "extensionInfo = " << extensionInfo << '\n'; s << Indent(indentLevel) << "currentMultiplicity:\n"; ++indentLevel; for (int i = 0; i < currentMultiplicity.length(); i++) { s << Indent(indentLevel) << currentMultiplicity[i] << '\t' << subject->argArray[i].dagNode << '\n'; } s << Indent(indentLevel - 1) << "topVariables:\n"; for (int i = 0; i < topVariables.length(); i++) { TopVariable& tv = topVariables[i]; s << Indent(indentLevel) << "index = " << tv.index << " \"" << variableInfo.index2Variable(tv.index) << "\"\tmultiplicity = " << tv.multiplicity << "\tlowerBound = " << tv.lowerBound << "\tupperBound = " << tv.upperBound << "\tsort = " << tv.sort << '\n'; } s << Indent(indentLevel - 1) << "patternNodes:\n"; for (int i = 0; i < patternNodes.length(); i++) { PatternNode& pn = patternNodes[i]; s << Indent(indentLevel) << "multiplicity = " << pn.multiplicity << "\tedges:\n"; for (int j = 0; j < pn.edges.length(); j++) { Edge& e = pn.edges[j]; s << Indent(indentLevel + 1) << "target = " << e.target << '\n'; s << Indent(indentLevel + 1) << "difference = "; if (e.difference == 0) s << "0\n"; else { s << '\n'; e.difference->dump(s, variableInfo, indentLevel + 2); } s << Indent(indentLevel + 1) << "subproblem = "; if (e.subproblem == 0) s << "0\n"; else { s << '\n'; e.subproblem->dump(s, variableInfo, indentLevel + 2); } } } s << Indent(indentLevel - 2) << "End{ACU_Subproblem}\n"; } #endif Maude-Maude3.2/src/ACU_Theory/ACU_Subproblem.hh000066400000000000000000000063351420036611000212410ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for subproblems in the AC and ACU theories; // they consist of a bipartite graph matching // problem and (possibly) a diophantine system // #ifndef _ACU_Subproblem_hh_ #define _ACU_Subproblem_hh_ #include "subproblem.hh" #include "delayedSubproblem.hh" class ACU_Subproblem : public Subproblem, public DelayedSubproblem { NO_COPYING(ACU_Subproblem); public: ACU_Subproblem(ACU_DagNode* subjectDagNode, ACU_ExtensionInfo* extension); ~ACU_Subproblem(); int addPatternNode(int multiplicity); void removePatternNode(int& uniqueSubject, LocalBinding*& difference, Subproblem*& subproblem); bool noPatterns() const; void addEdge(int pattern, int target, LocalBinding* difference, Subproblem* subproblem); void addTopVariable(int index, int multiplicity, int lowerBound, int upperBound, const Sort* sort); void addSubjects(Vector& multiplicity); bool solve(bool findFirst, RewritingContext& solution); #ifdef DUMP void dump(ostream& s, const VariableInfo& variableInfo, int indentLevel); #endif private: struct TopVariable { int index; int multiplicity; int lowerBound; int upperBound; const Sort* sort; }; struct Edge { int target; LocalBinding* difference; Subproblem* subproblem; }; struct PatternNode { bool solve(bool findFirst, RewritingContext& solution, Vector& currentMultiplicity); int multiplicity; Vector edges; int selectedEdge; }; bool solvePatterns(bool findFirst, RewritingContext& solution); bool solveVariables(bool findFirst, RewritingContext& solution); bool noVariableCase(const Vector& multVec); bool oneVariableCase(const Vector& multVec, RewritingContext& solution); bool extractDiophantineSystem(RewritingContext& solution); DagNode* computeAssignment(int row); void fillOutExtensionInfo(); ACU_DagNode* const subject; ACU_ExtensionInfo* const extensionInfo; Vector currentMultiplicity; Vector topVariables; Vector patternNodes; // // Structures needed for building and solving diophantine problem // DiophantineSystem* system; Vector variableMap; Vector subjectMap; Vector afterMultiplicity; }; inline bool ACU_Subproblem::noPatterns() const { return patternNodes.empty(); } #endif Maude-Maude3.2/src/ACU_Theory/ACU_Symbol.cc000077500000000000000000000445401420036611000203650ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2021 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class ACU_Symbol. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "variable.hh" #include "ACU_Persistent.hh" #include "ACU_Theory.hh" // core class definitions #include "sortBdds.hh" #include "hashConsSet.hh" // ACU theory class definitions #include "ACU_Symbol.hh" #include "ACU_DagNode.hh" #include "ACU_TreeDagNode.hh" #include "ACU_Term.hh" #include "ACU_ExtensionInfo.hh" #include "ACU_UnificationSubproblem2.hh" ACU_Symbol::ACU_Symbol(int id, const Vector& strategy, bool memoFlag, Term* identity, bool useTree) : AssociativeSymbol(id, strategy, memoFlag, identity) { useTreeFlag = useTree; } void ACU_Symbol::compileOpDeclarations() { commutativeSortCompletion(); Symbol::compileOpDeclarations(); // do default sort processing } void ACU_Symbol::postOpDeclarationPass() { processIdentity(); if(getIdentity() != 0) { // // No need to call rightIdentitySortCheck() - since we are commutative // if there is a problem it will show up with leftIdentitySortCheck() and // the latter is somewhat faster. // leftIdentitySortCheck(); } } DagNode* ACU_Symbol::ruleRewrite(DagNode* subject, RewritingContext& context) { if (ruleFree()) return 0; ACU_ExtensionInfo extensionInfo(safeCast(ACU_BaseDagNode*, subject)); return applyRules(subject, context, &extensionInfo); } bool ACU_Symbol::rewriteAtTop(DagNode* subject, RewritingContext& context) { // // We have a separate function for this to keep ACU_ExtensionInfo // off of the eqRewrite() stack frame since recursion through // eqRewrite() can get very deep. // ACU_ExtensionInfo extensionInfo(safeCast(ACU_BaseDagNode*, subject)); return applyReplace(subject, context, &extensionInfo); } bool ACU_Symbol::rewriteAtTopNoOwise(DagNode* subject, RewritingContext& context) { // // Same idea as above. // ACU_ExtensionInfo extensionInfo(safeCast(ACU_BaseDagNode*, subject)); return applyReplaceNoOwise(subject, context, &extensionInfo); } bool ACU_Symbol::normalize(DagNode* subject, RewritingContext& context) { if (safeCast(ACU_BaseDagNode*, subject)->isFresh()) { ACU_DagNode* s = safeCast(ACU_DagNode*, subject); int nrArgs = s->argArray.length(); for (int i = 0; i < nrArgs; i++) s->argArray[i].dagNode->computeTrueSort(context); return s->normalizeAtTop(); } return false; } bool ACU_Symbol::copyReduceSubtermsAndNormalize(DagNode* subject, RewritingContext& context) { ACU_DagNode* s = getACU_DagNode(subject); int nrArgs = s->argArray.length(); for (int i = 0; i < nrArgs; i++) s->argArray[i].dagNode = s->argArray[i].dagNode->copyAndReduce(context); return s->normalizeAtTop(); } Term* ACU_Symbol::makeTerm(const Vector& args) { return new ACU_Term(this, args); } DagNode* ACU_Symbol::makeDagNode(const Vector& args) { int nrArgs = args.length(); ACU_DagNode* a = new ACU_DagNode(this, nrArgs); ArgVec& args2 = a->argArray; for (int i = 0; i < nrArgs; ++i) { ACU_Pair& p = args2[i]; p.dagNode = args[i]; p.multiplicity = 1; } return a; } DagNode* ACU_Symbol::makeDagNode(const Vector& args, const Vector& multiplicities) { int nrArgs = args.length(); Assert(multiplicities.length() == nrArgs, "length mismatch"); ACU_DagNode* a = new ACU_DagNode(this, nrArgs); ArgVec& args2 = a->argArray; for (int i = 0; i < nrArgs; ++i) { ACU_Pair& p = args2[i]; p.dagNode = args[i]; p.multiplicity = multiplicities[i]; } return a; } bool ACU_Symbol::reduceArgumentsAndNormalize(DagNode* subject, RewritingContext& context) { if (safeCast(ACU_BaseDagNode*, subject)->isFresh()) { ACU_DagNode* s = safeCast(ACU_DagNode*, subject); int nrArgs = s->argArray.length(); for (int i = 0; i < nrArgs; i++) s->argArray[i].dagNode->reduce(context); // // We always need to renormalize at the top because // shared subterms may have rewritten. // return s->normalizeAtTop(); } return false; } bool ACU_Symbol::eqRewrite(DagNode* subject, RewritingContext& context) { Assert(this == subject->symbol(), "bad symbol"); if (standardStrategy()) { if (safeCast(ACU_BaseDagNode*, subject)->isFresh()) { ACU_DagNode* s = safeCast(ACU_DagNode*, subject); int nrArgs = s->argArray.length(); for (int i = 0; i < nrArgs; i++) s->argArray[i].dagNode->reduce(context); // // We always need to renormalize at the top because // shared subterms may have rewritten. // if (s->normalizeAtTop()) return false; } if (equationFree()) return false; return rewriteAtTop(subject, context); } return complexStrategy(subject, context); } bool ACU_Symbol::complexStrategy(DagNode* subject, RewritingContext& context) { if (isMemoized()) { MemoTable::SourceSet from; bool result = memoStrategy(from, subject, context); memoEnter(from, subject); // // We may need to return true in the case we collapse // to a unreduced subterm. // return result; } // // If we collapse to one of our subterms which has not been reduced // we pretend that we did a rewrite so that the reduction process // continues. // if (normalize(subject, context)) return !(subject->isReduced()); if (getPermuteStrategy() == LAZY) { if (rewriteAtTop(subject, context)) return true; return false; } // // Semi-eager case. // if (rewriteAtTopNoOwise(subject, context)) return true; if (copyReduceSubtermsAndNormalize(subject, context)) return false; subject->repudiateSortInfo(); // rewriteAtTopNoOwise() might have left sort behind return rewriteAtTop(subject, context); } bool ACU_Symbol::memoStrategy(MemoTable::SourceSet& from, DagNode* subject, RewritingContext& context) { if (getPermuteStrategy() == EAGER) { if (safeCast(ACU_BaseDagNode*, subject)->isFresh()) { ACU_DagNode* s = safeCast(ACU_DagNode*, subject); int nrArgs = s->argArray.length(); for (int i = 0; i < nrArgs; i++) s->argArray[i].dagNode->reduce(context); // // We always need to renormalize at the top because // shared subterms may have rewritten. // if (s->normalizeAtTop()) return false; } } else { // // If we collapse to one of our subterms which has not been reduced // we pretend that we did a rewrite so that the reduction process // continues. // if (normalize(subject, context)) return !(subject->isReduced()); if (memoRewrite(from, subject, context)) return false; if (getPermuteStrategy() == LAZY) { if (rewriteAtTop(subject, context)) subject->reduce(context); return false; } // // Semi-eager case. // if (rewriteAtTopNoOwise(subject, context)) { subject->reduce(context); return false; } if (copyReduceSubtermsAndNormalize(subject, context)) return false; subject->repudiateSortInfo(); // rewriteAtTopNoOwise() might have left sort behind } if (!memoRewrite(from, subject, context) && rewriteAtTop(subject, context)) subject->reduce(context); return false; } void ACU_Symbol::computeBaseSort(DagNode* subject) { Assert(this == subject->symbol(), "bad symbol"); subject->setSortIndex(safeCast(ACU_BaseDagNode*, subject)->isTree() ? (safeCast(ACU_TreeDagNode*, subject)-> getTree().computeBaseSort(this)) : safeCast(ACU_DagNode*, subject)->argVecComputeBaseSort()); } void ACU_Symbol::normalizeAndComputeTrueSort(DagNode* subject, RewritingContext& context) { Assert(this == subject->symbol(), "bad symbol"); if (normalize(subject, context)) return; fastComputeTrueSort(subject, context); } void ACU_Symbol::stackArguments(DagNode* subject, Vector& stack, int parentIndex, bool respectFrozen, bool eagerContext) { if (respectFrozen && !(getFrozen().empty())) // under AC, any frozen argument affects all return; bool eager = eagerContext & (getPermuteStrategy() == EAGER); int argNr = 0; if (safeCast(ACU_BaseDagNode*, subject)->isTree()) { const ACU_Tree& tree = safeCast(ACU_TreeDagNode*, subject)->getTree(); for (ACU_FastIter i(tree); i.valid(); i.next()) { DagNode* d = i.getDagNode(); int m = i.getMultiplicity(); if (d->isUnstackable()) argNr += m; else { for (int j = m; j > 0; --j) { stack.append(RedexPosition(d, parentIndex, argNr, eager)); ++argNr; } } } } else { ArgVec& args = safeCast(ACU_DagNode*, subject)->argArray; for (const ACU_Pair& i : args) { DagNode* d = i.dagNode; int m = i.multiplicity; if (d->isUnstackable()) argNr += m; else { for (int j = m; j > 0; --j) { stack.append(RedexPosition(d, parentIndex, argNr, eager)); ++argNr; } } } } } void ACU_Symbol::stackPhysicalArguments(DagNode* subject, Vector& stack, int parentIndex, bool respectFrozen, bool eagerContext) { if (respectFrozen && !(getFrozen().empty())) // under AC, any frozen argument affects all return; bool eager = eagerContext & (getPermuteStrategy() == EAGER); if (safeCast(ACU_BaseDagNode*, subject)->isTree()) { int argNr = 0; const ACU_Tree& tree = safeCast(ACU_TreeDagNode*, subject)->getTree(); for (ACU_FastIter i(tree); i.valid(); i.next()) { DagNode* d = i.getDagNode(); if (!(d->isUnstackable())) stack.append(RedexPosition(d, parentIndex, argNr, eager)); ++argNr; } } else { ArgVec& argArray = safeCast(ACU_DagNode*, subject)->argArray; int nrArgs = argArray.length(); for (int i = 0; i < nrArgs; i++) { DagNode* d = argArray[i].dagNode; if (!(d->isUnstackable())) stack.append(RedexPosition(d, parentIndex, i, eager)); } } } Term* ACU_Symbol::termify(DagNode* dagNode) { Vector arguments; Vector multiplicities; if (safeCast(const ACU_BaseDagNode*, dagNode)->isTree()) { const ACU_Tree& tree = safeCast(const ACU_TreeDagNode*, dagNode)->getTree(); for (ACU_FastIter i(tree); i.valid(); i.next()) { DagNode* a = i.getDagNode(); arguments.append(a->symbol()->termify(a)); multiplicities.append(i.getMultiplicity()); } } else { const ArgVec& argArray = safeCast(const ACU_DagNode*, dagNode)->argArray; for (const ACU_Pair& i : argArray) { DagNode* a = i.dagNode; arguments.append(a->symbol()->termify(a)); multiplicities.append(i.multiplicity); } } return new ACU_Term(this, arguments, multiplicities); } // // Unification code. // void ACU_Symbol::computeGeneralizedSort(const SortBdds& sortBdds, const Vector& realToBdd, DagNode* subject, Vector& generalizedSort) { Assert(safeCast(ACU_BaseDagNode*, subject)->isTree() == false, "Tree case not implemented: " << subject << " " << static_cast(dynamic_cast(subject)) << " " << static_cast(dynamic_cast(subject))); const Vector& sortFunction = sortBdds.getSortFunction(this); int nrBdds = sortFunction.size(); ArgVec& args = safeCast(ACU_DagNode*, subject)->argArray; bool firstArg = true; bddPair* argMap = bdd_newpair(); for (const ACU_Pair& i : args) { Vector argGenSort; i.dagNode->computeGeneralizedSort(sortBdds, realToBdd, argGenSort); Assert((int) argGenSort.size() == nrBdds, "nrBdds clash"); int multiplicity = i.multiplicity; if (firstArg) { firstArg = false; generalizedSort = argGenSort; // deep copy --multiplicity; } for (; multiplicity != 0; --multiplicity) { // // Do a sort function application step. // for (int j = 0; j < nrBdds; ++j) { bdd_setbddpair(argMap, j, generalizedSort[j]); bdd_setbddpair(argMap, nrBdds + j, argGenSort[j]); } for (int j = 0; j < nrBdds; ++j) generalizedSort[j] = bdd_veccompose(sortFunction[j], argMap); } } bdd_freepair(argMap); } // experimental code void ACU_Symbol::computeGeneralizedSort2(const SortBdds& sortBdds, const Vector& realToBdd, DagNode* subject, Vector& outputBdds) { Assert(safeCast(ACU_BaseDagNode*, subject)->isTree() == false, "Tree case not implemented: " << subject << " " << static_cast(dynamic_cast(subject)) << " " << static_cast(dynamic_cast(subject))); ArgVec& args = safeCast(ACU_DagNode*, subject)->argArray; int lastArg = args.length() - 1; Vector inputBdds; Vector middleBdds; for (int i = 0;; ++i) { // // Generalized sort ith argument. // args[i].dagNode->computeGeneralizedSort2(sortBdds, realToBdd, inputBdds); int multiplicity = args[i].multiplicity; if (i == 0) { --multiplicity; if (multiplicity == 0) continue; // must be a next argument // // Special case - first argument has multiplicity > 1 so we // need to clone its sort BDDs. // int nrBdds = inputBdds.size(); // // Need to be careful since we are reading and writing the same Vector // and a reference can be come stale if the Vector reallocates. // So we force the reallocation, if needed, up front. // inputBdds.resize(2 * nrBdds); for (int j = 0; j < nrBdds; ++j) inputBdds[nrBdds + j] = inputBdds[j]; } for (--multiplicity; multiplicity != 0; --multiplicity) { middleBdds.clear(); sortBdds.operatorCompose(this, inputBdds, middleBdds); // // Copy middleBdds over first half of inputBdds. // Vector::iterator input = inputBdds.begin(); for (const Bdd& j : middleBdds) { *input = j; ++input; } } if (i == lastArg) { // // Final application of our sort function with result // directly appended to outputBdds. // sortBdds.operatorCompose(this, inputBdds, outputBdds); break; } else { // // Middle case - write result to middleBdds. // middleBdds.clear(); sortBdds.operatorCompose(this, inputBdds, middleBdds); // // middleBdds become first part of inputBdds. // inputBdds.swap(middleBdds); } } } bool ACU_Symbol::canResolveTheoryClash() { // // We don't put this in parent class because return true has // the obligation to handle clashing in our unification subproblems. // return getIdentity() != 0; } UnificationSubproblem* ACU_Symbol::makeUnificationSubproblem() { if (getIdentity() != 0) { // // Because ACU_UnificationSubproblem2 may introduce the // identity element we make sure it had its sort computed // and its ground flag set. // DagNode* id = getIdentityDag(); if (!(id->isGround())) id->computeBaseSortForGroundSubterms(false); } return new ACU_UnificationSubproblem2(this); } int ACU_Symbol::unificationPriority() const { return 10 + 10 * (getIdentity() != 0); } // // Hash cons code. // DagNode* ACU_Symbol::makeCanonical(DagNode* original, HashConsSet* hcs) { if (safeCast(ACU_BaseDagNode*, original)->isTree()) return safeCast(ACU_TreeDagNode*, original)->makeCanonical(hcs); const ACU_DagNode* d = safeCast(const ACU_DagNode*, original); int nrArgs = d->argArray.size(); for (int i = 0; i < nrArgs; i++) { DagNode* b = d->argArray[i].dagNode; DagNode* c = hcs->getCanonical(hcs->insert(b)); if (c != b) { // // Detected a non-canonical argument so need to make a new node. // ACU_DagNode* n = new ACU_DagNode(this, nrArgs, ACU_BaseDagNode::ASSIGNMENT); n->copySetRewritingFlags(original); n->setSortIndex(original->getSortIndex()); for (int j = 0; j < i; ++j) n->argArray[j] = d->argArray[j]; n->argArray[i].dagNode = c; n->argArray[i].multiplicity = d->argArray[i].multiplicity; for (++i; i < nrArgs; ++i) { n->argArray[i].dagNode = hcs->getCanonical(hcs->insert(d->argArray[i].dagNode)); n->argArray[i].multiplicity = d->argArray[i].multiplicity; } return n; } } return original; // can use the original dag node as the canonical version } DagNode* ACU_Symbol::makeCanonicalCopy(DagNode* original, HashConsSet* hcs) { // // We have a unreduced node - copy forced. // if (safeCast(ACU_BaseDagNode*, original)->isTree()) { // // Never use tree form as canonical for unreduced dag. // const ACU_TreeDagNode* d = safeCast(const ACU_TreeDagNode*, original); ACU_DagNode* n = new ACU_DagNode(this, d->tree.getSize(), ACU_BaseDagNode::ASSIGNMENT); n->copySetRewritingFlags(original); n->setSortIndex(original->getSortIndex()); ArgVec::iterator j = n->argArray.begin(); for (ACU_FastIter i(d->tree); i.valid(); i.next(), ++j) { j->dagNode = hcs->getCanonical(hcs->insert(i.getDagNode())); j->multiplicity = i.getMultiplicity(); } return n; } const ACU_DagNode* d = safeCast(const ACU_DagNode*, original); int nrArgs = d->argArray.size(); ACU_DagNode* n = new ACU_DagNode(this, nrArgs, ACU_BaseDagNode::ASSIGNMENT); n->copySetRewritingFlags(original); n->setSortIndex(original->getSortIndex()); for (int i = 0; i < nrArgs; ++i) { n->argArray[i].dagNode = hcs->getCanonical(hcs->insert(d->argArray[i].dagNode)); n->argArray[i].multiplicity = d->argArray[i].multiplicity; } return n; } Maude-Maude3.2/src/ACU_Theory/ACU_Symbol.hh000066400000000000000000000074551420036611000204000ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for symbols belonging to the AC and ACU theories. // #ifndef _ACU_Symbol_hh_ #define _ACU_Symbol_hh_ #include "associativeSymbol.hh" class ACU_Symbol : public AssociativeSymbol { public: ACU_Symbol(int id, const Vector& strategy = standard, bool memoFlag = false, Term* identity = 0, bool useTree = true); // // Member functions required by theory interface. // Term* makeTerm(const Vector& args); DagNode* makeDagNode(const Vector& args); void computeBaseSort(DagNode* subject); void normalizeAndComputeTrueSort(DagNode* subject, RewritingContext& context); bool eqRewrite(DagNode* subject, RewritingContext& context); DagNode* ruleRewrite(DagNode* subject, RewritingContext& context); void stackArguments(DagNode* subject, Vector& stack, int parentIndex, bool respectFrozen, bool eagerContext); void stackPhysicalArguments(DagNode* subject, Vector& stack, int parentIndex, bool respectFrozen, bool eagerContext); Term* termify(DagNode* dagNode); // // Member functions overiding default handling. // void compileOpDeclarations(); void postOpDeclarationPass(); // // Unification stuff. // void computeGeneralizedSort(const SortBdds& sortBdds, const Vector& realToBdd, DagNode* subject, Vector& generalizedSort); void computeGeneralizedSort2(const SortBdds& sortBdds, const Vector& realToBdd, DagNode* subject, Vector& outputBdds); UnificationSubproblem* makeUnificationSubproblem(); int unificationPriority() const; bool canResolveTheoryClash(); // // Hash cons stuff. // DagNode* makeCanonical(DagNode* original, HashConsSet* hcs); DagNode* makeCanonicalCopy(DagNode* original, HashConsSet* hcs); // // Member functions special to ACU_Symbol. // bool useTree() const; protected: // // For use in derived classes that override eqRewrite() so // they don't have to known about the complexities of normalization. // Only supports standard strategy; does not support memoization. // bool reduceArgumentsAndNormalize(DagNode* subject, RewritingContext& context); // // Alow derived classes to make our dag nodes with resonable efficiency. // DagNode* makeDagNode(const Vector& args, const Vector& multiplicities); private: static bool normalize(DagNode* subject, RewritingContext& context); static bool copyReduceSubtermsAndNormalize(DagNode* subject, RewritingContext& context); bool rewriteAtTop(DagNode* subject, RewritingContext& context); bool rewriteAtTopNoOwise(DagNode* subject, RewritingContext& context); bool complexStrategy(DagNode* subject, RewritingContext& context); bool memoStrategy(MemoTable::SourceSet& from, DagNode* subject, RewritingContext& context); bool useTreeFlag; }; inline bool ACU_Symbol::useTree() const { return useTreeFlag; } #endif Maude-Maude3.2/src/ACU_Theory/ACU_Term.cc000066400000000000000000000441251420036611000200230ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2021 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class ACU_Term. // // utility stuff #include "macros.hh" #include "vector.hh" #include "graph.hh" #include "digraph.hh" #include "indent.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "variable.hh" #include "ACU_Persistent.hh" #include "ACU_Theory.hh" // interface class definitions #include "argVec.hh" #include "associativeSymbol.hh" #include "dagNode.hh" #include "term.hh" #include "rawArgumentIterator.hh" #include "lhsAutomaton.hh" #include "rhsAutomaton.hh" // core class definitions #include "rewritingContext.hh" #include "equation.hh" #include "symbolMap.hh" #include "termBag.hh" #include "rhsBuilder.hh" // variable class definitions #include "variableTerm.hh" // ACU theory class definitions #include "ACU_Symbol.hh" #include "ACU_DagNode.hh" #include "ACU_Term.hh" #include "ACU_ArgumentIterator.hh" #include "ACU_LhsAutomaton.hh" #include "ACU_RhsAutomaton.hh" // ACU Red-Black class definitions #include "ACU_TreeDagNode.hh" #include "ACU_FastIter.hh" // extra source files #include "ACU_LhsCompiler0.cc" #include "ACU_LhsCompiler1.cc" #include "ACU_LhsCompiler2.cc" #include "ACU_LhsCompiler3.cc" ACU_Term::ACU_Term(ACU_Symbol* symbol, const Vector& arguments) : Term(symbol), argArray(arguments.length()) { int nrArgs = arguments.length(); Assert(nrArgs >= 2, "insufficient arguments for operator " << symbol); for (int i = 0; i < nrArgs; ++i) { argArray[i].term = arguments[i]; argArray[i].multiplicity = 1; } } ACU_Term::ACU_Term(ACU_Symbol* symbol, const Vector& arguments, const Vector& multiplicities) : Term(symbol), argArray(arguments.size()) { Assert(arguments.size() == multiplicities.size(), "vector size disagreement"); int nrArgs = arguments.size(); Assert(nrArgs >= 2 || (nrArgs == 1 && multiplicities[0] >= 2), "insufficient arguments for operator " << symbol); for (int i = 0; i < nrArgs; ++i) { argArray[i].term = arguments[i]; argArray[i].multiplicity = multiplicities[i]; } } ACU_Term::ACU_Term(const ACU_Term& original, ACU_Symbol* symbol, SymbolMap* translator) : Term(symbol), argArray(original.argArray.length()) { int nrArgs = original.argArray.length(); for (int i = 0; i < nrArgs; ++i) { argArray[i].term = original.argArray[i].term->deepCopy(translator); argArray[i].multiplicity = original.argArray[i].multiplicity; } } RawArgumentIterator* ACU_Term::arguments() { return new ACU_ArgumentIterator(&argArray); } void ACU_Term::deepSelfDestruct() { for (const Pair& p : argArray) p.term->deepSelfDestruct(); delete this; } Term* ACU_Term::deepCopy2(SymbolMap* translator) const { ACU_Symbol* s = symbol(); if (translator != 0) { Symbol* s2 = translator->translate(s); if (s2 == 0) { int nrArgs = argArray.length(); if ((nrArgs == 1 && argArray[0].multiplicity == 2) || (nrArgs == 2 && argArray[0].multiplicity == 1 && argArray[1].multiplicity == 1)) return translator->translateTerm(this); // // Tricky situtation - we have to use translateTerm() since // we are translating to a term but we have more than // 2 arguments. We resolve it by creating a temporary // expanded term. // Vector args(2); Term* arg = argArray[0].term; args[0] = arg; int remainingMultiplicity = argArray[0].multiplicity - 1; int nrNewTerms = remainingMultiplicity; for (int i = 0;; nrNewTerms += remainingMultiplicity) { // // Normally it is a no-no for sharing of subterms, but // here we are just making a temporary construction that // will be translated and then carefully destructed. // for (; remainingMultiplicity > 0; --remainingMultiplicity) { args[1] = arg; args[0] = new ACU_Term(s, args); } if (++i == nrArgs) break; arg = argArray[i].term; remainingMultiplicity = argArray[i].multiplicity; } Term* t = args[0]; Term* r = translator->translateTerm(t); for (int i = 0; i < nrNewTerms; ++i) { Term* n = safeCast(ACU_Term*, t)->argArray[0].term; delete t; t = n; } return r; } s = dynamic_cast(s2); if (s == 0) { // // Another tricky situation - we are translating to a non-ACU_Symbol. // Vector args(2); Term* arg = argArray[0].term; int remainingMultiplicity = argArray[0].multiplicity - 1; args[0] = arg->deepCopy(translator); int nrArgs = argArray.length(); for (int i = 0;;) { for (; remainingMultiplicity > 0; --remainingMultiplicity) { args[1] = arg->deepCopy(translator); args[0] = s2->makeTerm(args); } if (++i == nrArgs) break; arg = argArray[i].term; remainingMultiplicity = argArray[i].multiplicity; } return args[0]; } } return new ACU_Term(*this, s, translator); } bool ACU_Term::normalizeAliensAndFlatten() { bool changed = false; Symbol* s = symbol(); int nrArgs = argArray.length(); // // Pass 1: normalize aliens and recusively flatten non-aliens, computing // the number of extra arguments that will result from flattening at the top. // bool needToFlatten = false; int expansion = 0; for (int i = 0; i < nrArgs; ++i) { Term* t = argArray[i].term; if (t->symbol() == s) { changed = true; ACU_Term* ac = safeCast(ACU_Term*, t); (void) ac->normalizeAliensAndFlatten(); expansion += ac->argArray.length() - 1; needToFlatten = true; } else { bool subtermChanged; argArray[i].term = t = t->normalize(true, subtermChanged); if (subtermChanged) { changed = true; if (t->symbol() == s) { ACU_Term* ac = safeCast(ACU_Term*, t); expansion += ac->argArray.length() - 1; needToFlatten = true; } } } } // // Pass 2 : flatten at the top // if (needToFlatten) { argArray.expandBy(expansion); int p = nrArgs + expansion - 1; for (int i = nrArgs - 1; i >= 0; --i) { Assert(p >= i, "loop invariant broken"); Term* t = argArray[i].term; if (t->symbol() == s) { int m = argArray[i].multiplicity; Vector& argArray2 = safeCast(ACU_Term*, t)->argArray; for (int j = argArray2.length() - 1; j >= 0; --j) { argArray[p].term = argArray2[j].term; argArray[p].multiplicity = m * argArray2[j].multiplicity; --p; } delete t; } else argArray[p--] = argArray[i]; } } return changed; } local_inline bool ACU_Term::pairLt(const Pair& p1, const Pair& p2) { return p1.term->compare(p2.term) < 0; // sort pairs in ascending order of terms } Term* ACU_Term::normalize(bool full, bool& changed) { if (full) changed = normalizeAliensAndFlatten(); else { changed = false; for (int i = argArray.length() - 1; i >= 0; --i) { bool subtermChanged; argArray[i].term = argArray[i].term->normalize(false, subtermChanged); if (subtermChanged) changed = true; } } int nrArgs = argArray.length(); for (int i = 1; i < nrArgs; ++i) { if (argArray[i - 1].term->compare(argArray[i].term) > 0) { changed = true; sort(argArray.begin(), argArray.end(), pairLt); } } int d = 0; for (int i = 1; i < nrArgs; ++i) { if (argArray[i].term->equal(argArray[d].term)) { changed = true; argArray[d].multiplicity += argArray[i].multiplicity; argArray[i].term->deepSelfDestruct(); } else argArray[++d] = argArray[i]; } ++d; const Term* id = symbol()->getIdentity(); if (id != 0) { // // Need to eliminate any identity elements (maybe we should use binary search). // for (int i = 0; i < d; ++i) { if (id->equal(argArray[i].term)) { changed = true; if (d == 1) { // // Only identity element left so collapse to identity element. // Term* t = argArray[i].term; delete this; return t; } else if (d == 2 && argArray[1 - i].multiplicity == 1) { // // Only one non-identity subterm left so collapse to it. // argArray[i].term->deepSelfDestruct(); Term* t = argArray[1 - i].term; delete this; return t; } else { // // Delete identity and shift other subterms to close gap. // argArray[i].term->deepSelfDestruct(); --d; for (; i < d; ++i) argArray[i] = argArray[i + 1]; break; } } } } argArray.contractTo(d); unsigned int hashValue = symbol()->getHashValue(); for (int i = 0; i < d; ++i) hashValue = hash(hashValue, argArray[i].term->getHashValue(), argArray[i].multiplicity); setHashValue(hashValue); return this; } int ACU_Term::compareArguments(const Term* other) const { const Vector& argArray2 = safeCast(const ACU_Term*, other)->argArray; int r = argArray.length() - argArray2.length(); if (r != 0) return r; Vector::const_iterator j = argArray2.begin(); Vector::const_iterator i = argArray.begin(); const Vector::const_iterator e = argArray.end(); do { r = i->multiplicity - j->multiplicity; if (r != 0) return r; r = i->term->compare(j->term); if (r != 0) return r; ++j; ++i; } while (i != e); Assert(j == argArray2.end(), "iterator problem"); return 0; } int ACU_Term::compareArguments(const DagNode* other) const { int len = argArray.length(); const ACU_BaseDagNode* d = safeCast(const ACU_BaseDagNode*, other); if (d->isTree()) { const ACU_TreeDagNode* d2 = safeCast(const ACU_TreeDagNode*, d); int r = len - d2->getTree().getSize(); if (r != 0) return r; // // Because the lengths compare equal, we will iterate over // both the red-black tree and the Vector, only checking for // the end of the Vector, and not checking j.valid() // This will confuse static analyzers. // ACU_FastIter j(d2->getTree()); Vector::const_iterator i = argArray.begin(); const Vector::const_iterator e = argArray.end(); do { r = i->multiplicity - j.getMultiplicity(); if (r != 0) return r; r = i->term->compare(j.getDagNode()); if (r != 0) return r; j.next(); ++i; } while (i != e); Assert(!j.valid(), "iterator problem - didn't exhaust tree"); } else { const ArgVec& argArray2 = safeCast(const ACU_DagNode*, d)->argArray; int r = len - argArray2.length(); if (r != 0) return r; ArgVec::const_iterator j = argArray2.begin(); Vector::const_iterator i = argArray.begin(); const Vector::const_iterator e = argArray.end(); do { r = i->multiplicity - j->multiplicity; if (r != 0) return r; r = i->term->compare(j->dagNode); if (r != 0) return r; ++j; ++i; } while (i != e); Assert(j == argArray2.end(), "iterator problem"); } return 0; } void ACU_Term::findEagerVariables(bool atTop, NatSet& eagerVariables) const { BinarySymbol::PermuteStrategy strat = symbol()->getPermuteStrategy(); if (strat == BinarySymbol::EAGER || (strat == BinarySymbol::SEMI_EAGER && !atTop)) { int nrArgs = argArray.length(); for (int i = 0; i < nrArgs; i++) argArray[i].term->findEagerVariables(false, eagerVariables); } } void ACU_Term::markEagerArguments(int nrVariables, const NatSet& eagerVariables, Vector& problemVariables) { if (symbol()->getPermuteStrategy() == BinarySymbol::EAGER) { int nrArgs = argArray.length(); for (int i = 0; i < nrArgs; i++) argArray[i].term->markEager(nrVariables, eagerVariables, problemVariables); } } DagNode* ACU_Term::dagify2() { int nrArgs = argArray.length(); ACU_DagNode* d = new ACU_DagNode(symbol(), nrArgs); ArgVec& p = d->argArray; for (int i = 0; i < nrArgs; i++) { p[i].dagNode = argArray[i].term->dagify(); p[i].multiplicity = argArray[i].multiplicity; } return d; } void ACU_Term::analyseCollapses2() { int nrArgs = argArray.length(); for (int i = 0; i < nrArgs; i++) argArray[i].term->analyseCollapses(); uniqueCollapseSubtermIndex = NONE; ACU_Symbol* topSymbol = symbol(); const Term* identity = topSymbol->getIdentity(); if (identity == 0) return; // if no identity element then we can't collapse int firstNonIdArg = NONE; for (int i = 0; i < nrArgs; i++) { Pair& p = argArray[i]; if (!(topSymbol->mightMatchOurIdentity(p.term))) { if (firstNonIdArg != NONE || p.multiplicity > 1) return; // can't collapse firstNonIdArg = i; } } if (firstNonIdArg != NONE) { // // Can only collapse to firstNonIdArg. // uniqueCollapseSubtermIndex = firstNonIdArg; addCollapseSymbol(argArray[firstNonIdArg].term->symbol()); addCollapseSymbols(argArray[firstNonIdArg].term->collapseSymbols()); } else { // // Can collapse to any of our arguments that has multiplicity 1. // If no argument has multiplicity 1 then we can still collapse // to our identity. // for (int i = 0; i < nrArgs; i++) { Pair& p = argArray[i]; if (p.multiplicity == 1) { addCollapseSymbol(p.term->symbol()); addCollapseSymbols(p.term->collapseSymbols()); } } if (collapseSymbols().empty()) addCollapseSymbol(identity->symbol()); // bizarre special case } } void ACU_Term::insertAbstractionVariables(VariableInfo& variableInfo) { ACU_Symbol* topSymbol = symbol(); bool honorsGroundOutMatch = true; int nrArgs = argArray.length(); for (int i = 0; i < nrArgs; i++) { Pair& p = argArray[i]; p.term->insertAbstractionVariables(variableInfo); if (!(p.term->honorsGroundOutMatch())) honorsGroundOutMatch = false; p.abstractionVariableIndex = NONE; p.collapseToOurSymbol = false; p.matchOurIdentity = false; if (dynamic_cast(p.term) == 0) { p.matchOurIdentity = topSymbol->mightMatchOurIdentity(p.term); p.collapseToOurSymbol = topSymbol->mightCollapseToOurSymbol(p.term); if (p.matchOurIdentity || p.collapseToOurSymbol) { p.abstractionVariableIndex = variableInfo.makeProtectedVariable(); honorsGroundOutMatch = false; DebugAdvisoryCheck(false, "Introduced abstraction variable for " << p.term << " in " << this << '.'); } } } setHonorsGroundOutMatch(honorsGroundOutMatch); } #ifdef DUMP void ACU_Term::dump(ostream& s, const VariableInfo& variableInfo, int indentLevel) { s << Indent(indentLevel) << "Begin{ACU_Term}\n"; ++indentLevel; dumpCommon(s, variableInfo, indentLevel); s << Indent(indentLevel) << "arguments:\n"; ++indentLevel; int nrArgs = argArray.length(); for (int i = 0; i < nrArgs; i++) { const Pair& p = argArray[i]; s << Indent(indentLevel) << "multiplicity = " << p.multiplicity << "\tcollapseToOurSymbol = " << bool(p.collapseToOurSymbol) << "\tmatchOurIdentity = " << bool(p.matchOurIdentity); if (p.abstractionVariableIndex != NONE) s << "\tabstractionVariableIndex = " << p.abstractionVariableIndex; s << '\n'; p.term->dump(s, variableInfo, indentLevel); } s << Indent(indentLevel - 2) << "End{ACU_Term}\n"; } #endif void ACU_Term::findAvailableTerms(TermBag& availableTerms, bool eagerContext, bool atTop) { if (ground()) return; if (!atTop) availableTerms.insertMatchedTerm(this, eagerContext); BinarySymbol::PermuteStrategy strat = symbol()->getPermuteStrategy(); bool argEager = eagerContext && (strat == BinarySymbol::EAGER || (strat == BinarySymbol::SEMI_EAGER && !atTop)); int nrArgs = argArray.length(); for (int i = 0; i < nrArgs; i++) argArray[i].term->findAvailableTerms(availableTerms, argEager); } int ACU_Term::compileRhs2(RhsBuilder& rhsBuilder, VariableInfo& variableInfo, TermBag& availableTerms, bool eagerContext) { int nrArgs = argArray.length(); // // We want to minimize conflict between slots to avoid quadratic number of // conflict arcs on giant right hand sides. The heuristic we use is crude: // we sort in order of arguments by number of symbol occurences, and build // largest first. // typedef Vector > PairVec; PairVec order(nrArgs); for (int i = 0; i < nrArgs; i++) { order[i].first = - argArray[i].term->computeSize(); // larger terms to the front order[i].second = i; } sort(order.begin(), order.end()); // // Compile each argument in largest first order. // bool argEager = eagerContext && symbol()->getPermuteStrategy() == BinarySymbol::EAGER; Vector sources(nrArgs); for (const pair& i : order) { int j = i.second; sources[j] = argArray[j].term->compileRhs(rhsBuilder, variableInfo, availableTerms, argEager); } // // Now add sources to automaton in original order, and flag last use // of each source for conflict arc generation. // ACU_RhsAutomaton* automaton = new ACU_RhsAutomaton(symbol(), nrArgs); for (int i = 0; i < nrArgs; i++) { int index = sources[i]; automaton->addArgument(index, argArray[i].multiplicity); variableInfo.useIndex(index); } // // Complete the automaton and add it to the rhs builder. // int destination = variableInfo.makeConstructionIndex(); automaton->close(destination); rhsBuilder.addRhsAutomaton(automaton); return destination; } Maude-Maude3.2/src/ACU_Theory/ACU_Term.hh000066400000000000000000000124521420036611000200330ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for terms in the AC and ACU theories. // #ifndef _ACU_Term_hh_ #define _ACU_Term_hh_ #include "ACU_Symbol.hh" #include "term.hh" class ACU_Term : public Term { NO_COPYING(ACU_Term); public: ACU_Term(ACU_Symbol* symbol, const Vector& arguments); ACU_Term(ACU_Symbol* symbol, const Vector& arguments, const Vector& multiplicities); // // Member functions required by theory interface. // RawArgumentIterator* arguments(); void deepSelfDestruct(); Term* deepCopy2(SymbolMap* translator) const; Term* normalize(bool full, bool& changed); int compareArguments(const Term* other) const; int compareArguments(const DagNode* other) const; void findEagerVariables(bool atTop, NatSet& eagerVariables) const; void analyseConstraintPropagation(NatSet& boundUniquely) const; void analyseCollapses2(); void insertAbstractionVariables(VariableInfo& variableInfo); LhsAutomaton* compileLhs2(bool matchAtTop, const VariableInfo& variableInfo, NatSet& boundUniquely, bool& subproblemLikely); void markEagerArguments(int nrVariables, const NatSet& eagerVariables, Vector& problemVariables); DagNode* dagify2(); void findAvailableTerms(TermBag& availableTerms, bool eagerContext, bool atTop); int compileRhs2(RhsBuilder& rhsBuilder, VariableInfo& variableInfo, TermBag& availableTerms, bool eagerContext); // // Functions particular to ACU_Term. // ACU_Symbol* symbol() const; #ifdef DUMP void dump(ostream& s, const VariableInfo& variableInfo, int indentLevel); #endif private: struct Pair // misnomer! { Term* term; int multiplicity; short abstractionVariableIndex; // if subterm could enter our theory we abstract it Bool collapseToOurSymbol; // first possible reason for variable abstraction Bool matchOurIdentity; // second possible reason for variable abstraction }; struct CP_Sequence; ACU_Term(const ACU_Term& original, ACU_Symbol* symbol, SymbolMap* translator); bool normalizeAliensAndFlatten(); static bool pairLt(const Pair& p1, const Pair& p2); static void weakConstraintPropagation(const Vector& aliens, const NatSet& boundUniquely, int step, Vector& sequence); void compileLhs3(bool matchAtTop, const VariableInfo& variableInfo, NatSet& boundUniquely, bool& subproblemLikely, ACU_LhsAutomaton* automaton); // // Fuctions for compiling special case automata. // ACU_LhsAutomaton* tryToMakeSpecialCaseAutomaton(bool matchAtTop, const VariableInfo& variableInfo, NatSet& boundUniquely); ACU_LhsAutomaton* tryToMakeNonLinearLhsAutomaton(const VariableInfo& variableInfo, NatSet& boundUniquely); ACU_LhsAutomaton* tryToMakeCollectorLhsAutomaton(bool matchAtTop, const VariableInfo& variableInfo, NatSet& boundUniquely, int collectorCandidate); // // Functions needed to compile aliens only case matching. // static void compileAliensOnlyCase(ACU_LhsAutomaton* automaton, const Vector& nonGroundAliens, const VariableInfo& variableInfo, NatSet& boundUniquely, bool& subproblemLikely); static void findConstraintPropagationSequence(const Vector& aliens, const NatSet& boundUniquely, CP_Sequence& bestSequence); static void findConstraintPropagationSequence(const Vector& aliens, const Vector& currentSequence, const NatSet& boundUniquely, int step, CP_Sequence& bestSequence); // // Functions needed to compile full and greedy case matching. // static void compileGreedyAndFullCases(ACU_LhsAutomaton* automaton, const Vector& nonGroundAliens, const VariableInfo& variableInfo, NatSet& boundUniquely, bool& subproblemLikely); static int findGreedySequence(const Vector& aliens, Vector& sequence); static void findIndependentSets(const Vector& aliens, Vector >& independents); static void findLongestIncreasingSequence(const Vector& aliens, Vector& dependents, Vector& sequence); static void findFullSequence(const Vector& aliens, const NatSet& boundUniquely, Vector& sequence); Vector argArray; int uniqueCollapseSubtermIndex; friend class ACU_ArgumentIterator; }; inline ACU_Symbol* ACU_Term::symbol() const { return safeCast(ACU_Symbol*, Term::symbol()); } #endif Maude-Maude3.2/src/ACU_Theory/ACU_Theory.hh000066400000000000000000000026731420036611000204020ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Forward declarations for ACU theory classes. // #ifndef _ACU_Theory_hh_ #define _ACU_Theory_hh_ class ACU_Symbol; class ACU_Term; class ACU_ArgumentIterator; class ACU_BaseDagNode; class ACU_DagNode; class ACU_DagArgumentIterator; class ACU_TreeDagNode; class ACU_TreeDagArgumentIterator; class ACU_LhsAutomaton; class ACU_CollectorLhsAutomaton; class ACU_NGA_LhsAutomaton; class ACU_VarLhsAutomaton; class ACU_BndVarLhsAutomaton; class ACU_GndLhsAutomaton; class ACU_NonLinearLhsAutomaton; class ACU_RhsAutomaton; class ACU_Subproblem; class ACU_ExtensionInfo; class ACU_UnificationSubproblem2; #endif Maude-Maude3.2/src/ACU_Theory/ACU_TreeDagArgumentIterator.cc000066400000000000000000000031301420036611000236330ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class ACU_TreeDagArgumentIterator. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "ACU_Persistent.hh" // ACU theory class definitions #include "ACU_TreeDagArgumentIterator.hh" bool ACU_TreeDagArgumentIterator::valid() const { return multiplicityRemaining > 0; } DagNode* ACU_TreeDagArgumentIterator::argument() const { Assert(valid(), "no args left"); return iter.getDagNode(); } void ACU_TreeDagArgumentIterator::next() { Assert(valid(), "no args left"); --multiplicityRemaining; if (multiplicityRemaining == 0) { iter.next(); if (iter.valid()) multiplicityRemaining = iter.getMultiplicity(); } } Maude-Maude3.2/src/ACU_Theory/ACU_TreeDagArgumentIterator.hh000066400000000000000000000027711420036611000236570ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for argument iterator for ACU tree dag nodes. // #ifndef _ACU_TreeDagArgumentIterator_hh_ #define _ACU_TreeDagArgumentIterator_hh_ #include "rawDagArgumentIterator.hh" #include "ACU_FastIter.hh" class ACU_TreeDagArgumentIterator : public RawDagArgumentIterator { NO_COPYING(ACU_TreeDagArgumentIterator); public: ACU_TreeDagArgumentIterator(const ACU_Tree& tree); bool valid() const; DagNode* argument() const; void next(); private: ACU_FastIter iter; int multiplicityRemaining; }; inline ACU_TreeDagArgumentIterator::ACU_TreeDagArgumentIterator(const ACU_Tree& tree) : iter(tree) { multiplicityRemaining = iter.getMultiplicity(); } #endif Maude-Maude3.2/src/ACU_Theory/ACU_TreeDagNode.cc000066400000000000000000000143471420036611000212400ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class ACU_TreeDagNode. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "ACU_Persistent.hh" #include "ACU_Theory.hh" // ACU Persistent class definitions #include "ACU_FastIter.hh" // ACU theory class definitions #include "ACU_Symbol.hh" #include "ACU_DagNode.hh" #include "ACU_ExtensionInfo.hh" #include "ACU_TreeDagArgumentIterator.hh" #include "ACU_TreeDagNode.hh" RawDagArgumentIterator* ACU_TreeDagNode::arguments() { return new ACU_TreeDagArgumentIterator(tree); } size_t ACU_TreeDagNode::getHashValue() { if (isHashValid()) return hashCache; size_t hashValue = symbol()->getHashValue(); for (ACU_FastIter i(tree); i.valid(); i.next()) hashValue = hash(hashValue, i.getDagNode()->getHashValue(), i.getMultiplicity()); hashCache = hashValue; setHashValid(); return hashValue; } int ACU_TreeDagNode::compareArguments(const DagNode* other) const { const ACU_BaseDagNode* d = safeCast(const ACU_BaseDagNode*, other); if (d->isTree()) { const ACU_TreeDagNode* d2 = safeCast(const ACU_TreeDagNode*, d); int r = tree.getSize() - d2->tree.getSize(); if (r != 0) return r; ACU_FastIter i(tree); ACU_FastIter j(d2->tree); do { r = i.getMultiplicity() - j.getMultiplicity(); if (r != 0) return r; r = i.getDagNode()->compare(j.getDagNode()); if (r != 0) return r; j.next(); i.next(); } while (i.valid()); return 0; } return - other->compareArguments(this); } void ACU_TreeDagNode::overwriteWithClone(DagNode* old) { ACU_TreeDagNode* d = new(old) ACU_TreeDagNode(symbol(), tree); d->copySetRewritingFlags(this); d->setTheoryByte(getTheoryByte()); d->setSortIndex(getSortIndex()); } DagNode* ACU_TreeDagNode::makeClone() { ACU_TreeDagNode* d = new ACU_TreeDagNode(symbol(), tree); d->copySetRewritingFlags(this); d->setTheoryByte(getTheoryByte()); d->setSortIndex(getSortIndex()); return d; } DagNode* ACU_TreeDagNode::copyWithReplacement(int argIndex, DagNode* replacement) { return treeToArgVec(this)->copyWithReplacement(argIndex, replacement); // HACK } DagNode* ACU_TreeDagNode::copyWithReplacement(Vector& redexStack, int first, int last) { return treeToArgVec(this)->copyWithReplacement(redexStack, first, last); } bool ACU_TreeDagNode::matchVariableWithExtension(int index, const Sort* sort, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo) { return treeToArgVec(this)->matchVariableWithExtension(index, sort, solution, returnedSubproblem, extensionInfo); } void ACU_TreeDagNode::partialReplace(DagNode* replacement, ExtensionInfo* extensionInfo) { ArgVec& args = (new(this) ACU_DagNode(symbol(), 2))->argArray; args[0].dagNode = safeCast(ACU_ExtensionInfo*, extensionInfo)->getUnmatched(); args[0].multiplicity = 1; args[1].dagNode = replacement; args[1].multiplicity = 1; } DagNode* ACU_TreeDagNode::partialConstruct(DagNode* replacement, ExtensionInfo* extensionInfo) { ACU_DagNode* n = new ACU_DagNode(symbol(), 2); ArgVec& args = n->argArray; args[0].dagNode = safeCast(ACU_ExtensionInfo*, extensionInfo)->getUnmatched(); args[0].multiplicity = 1; args[1].dagNode = replacement; args[1].multiplicity = 1; return n; } DagNode* ACU_TreeDagNode::markArguments() { tree.mark(); return 0; } DagNode* ACU_TreeDagNode::copyEagerUptoReduced2() { ACU_Symbol* s = symbol(); return (s->getPermuteStrategy() == BinarySymbol::EAGER) ? treeToArgVec(this)->copyEagerUptoReduced2() : new ACU_TreeDagNode(s, tree); } DagNode* ACU_TreeDagNode::copyAll2() { // // Don't try to do this copy on tree form. // return treeToArgVec(this)->copyAll2(); } void ACU_TreeDagNode::clearCopyPointers2() { Assert(symbol()->getPermuteStrategy() != BinarySymbol::EAGER, "should not be copying ACU_TreeDagNode with eager symbol"); } ACU_DagNode* ACU_TreeDagNode::treeToArgVec(ACU_TreeDagNode* original) { // cerr << "in: " << original << endl; ACU_Symbol* s = original->symbol(); ACU_Tree t = original->tree; // deep copy int sortIndex = original->getSortIndex(); bool redFlag = original->isReduced(); // // Now we overwrite original. // ACU_DagNode* d = new(original) ACU_DagNode(s, t.getSize(), ASSIGNMENT); ArgVec::iterator j = d->argArray.begin(); for (ACU_FastIter i(t); i.valid(); i.next(), ++j) { j->dagNode = i.getDagNode(); j->multiplicity = i.getMultiplicity(); } Assert(j == d->argArray.end(), "iterators inconsistant"); //cerr << "out: " << d << endl; d->setSortIndex(sortIndex); if (redFlag) d->setReduced(); return d; } // // Narrowing code. // bool ACU_TreeDagNode::indexVariables2(NarrowingVariableInfo& indices, int baseIndex) { // // Just revert to argvec ACU representation and use its code. // return treeToArgVec(this)->indexVariables2(indices, baseIndex); } // // Hash cons code. // ACU_TreeDagNode* ACU_TreeDagNode::makeCanonical(HashConsSet* hcs) { ACU_Tree canonical; if (tree.makeCanonical(canonical, hcs)) { ACU_TreeDagNode* d = new ACU_TreeDagNode(symbol(), canonical); d->copySetRewritingFlags(this); d->setTheoryByte(getTheoryByte()); d->setSortIndex(getSortIndex()); return d; } return this; } Maude-Maude3.2/src/ACU_Theory/ACU_TreeDagNode.hh000066400000000000000000000062071420036611000212460ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for Red-Black Tree based DAG nodes in the AC and ACU theories. // #ifndef _ACU_TreeDagNode_hh_ #define _ACU_TreeDagNode_hh_ #include "ACU_BaseDagNode.hh" #include "ACU_Tree.hh" class ACU_TreeDagNode : public ACU_BaseDagNode { public: ACU_TreeDagNode(ACU_Symbol* symbol, const ACU_Tree& tree); // // Member functions required by theory interface. // RawDagArgumentIterator* arguments(); size_t getHashValue(); int compareArguments(const DagNode* other) const; void overwriteWithClone(DagNode* old); DagNode* makeClone(); DagNode* copyWithReplacement(int argIndex, DagNode* replacement); DagNode* copyWithReplacement(Vector& redexStack, int first, int last); // // Member functions required to handle extension information. // bool matchVariableWithExtension(int index, const Sort* sort, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo); void partialReplace(DagNode* replacement, ExtensionInfo* extensionInfo); DagNode* partialConstruct(DagNode* replacement, ExtensionInfo* extensionInfo); // // Interface for narrowing. // // This is needed to remove any tree nodes from dag being narrowed since // unification and narrowing functionality doesn't support them. // bool indexVariables2(NarrowingVariableInfo& indices, int baseIndex); // // ACU_TreeDagNode -> ACU_DagNode in-place conversion function. // static ACU_DagNode* treeToArgVec(ACU_TreeDagNode* original); const ACU_Tree& getTree() const; // // Hash cons stuff // ACU_TreeDagNode* makeCanonical(HashConsSet* hcs); private: // // Theory interface functions. // DagNode* markArguments(); DagNode* copyEagerUptoReduced2(); DagNode* copyAll2(); void clearCopyPointers2(); // // Arguments under ACU symbol. // ACU_Tree tree; // // Slot for caching hash value. // size_t hashCache; friend class ACU_Symbol; // HACK for hash consing }; inline ACU_TreeDagNode::ACU_TreeDagNode(ACU_Symbol* symbol, const ACU_Tree& tree) : ACU_BaseDagNode(symbol), tree(tree) { Assert(tree.getSize() > 1 || tree.getMaxMult() > 1, "tried to make ACU_TreeDagNode with single argument"); setNormalizationStatus(TREE); } inline const ACU_Tree& ACU_TreeDagNode::getTree() const { return tree; } #endif Maude-Maude3.2/src/ACU_Theory/ACU_TreeMatcher.cc000066400000000000000000000422401420036611000213130ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2021 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for AC/ACU matcher that works on red-black trees. // local_inline int ACU_LhsAutomaton::eliminateBoundVariables(Substitution& solution) { nrUnboundVariables = 0; Term* identity = topSymbol->getIdentity(); for (const TopVariable& i : topVariables) { DagNode* d = solution.value(i.index); if (d != 0) { if (d->symbol() == topSymbol) return UNDECIDED; if (identity == 0 || !(identity->equal(d))) { ACU_SlowIter j; if (current.getSize() == 0 || !(current.find(d, j))) return false; int multiplicity = i.multiplicity; if (j.getMultiplicity() < multiplicity) return false; current.deleteMult(j, multiplicity); matchedMultiplicity += multiplicity; } } else ++nrUnboundVariables; } return true; } local_inline bool ACU_LhsAutomaton::eliminateGroundAliens() { for (const GroundAlien& i : groundAliens) { ACU_SlowIter j; if (current.getSize() == 0 || !(current.find(i.term, j))) return false; int multiplicity = i.multiplicity; if (j.getMultiplicity() < multiplicity) return false; current.deleteMult(j, multiplicity); matchedMultiplicity += multiplicity; } return true; } local_inline bool ACU_LhsAutomaton::eliminateGroundedOutAliens(Substitution& solution) { for (const NonGroundAlien& i : groundedOutAliens) { Term* t = i.term; Assert(t != 0, "shouldn't be running on unstable terms"); ACU_SlowIter j; if (current.getSize() != 0 && current.findFirstPotentialMatch(t, solution, j)) { LhsAutomaton* a = i.automaton; DagNode* d = j.getDagNode(); for (;;) { Subproblem* sp; if (a->match(d, solution, sp)) { Assert(sp == 0, "grounded out alien gave rise to subproblem!"); int multiplicity = i.multiplicity; if (j.getMultiplicity() < multiplicity) return false; current.deleteMult(j, multiplicity); matchedMultiplicity += multiplicity; goto nextGroundedOutAlien; } j.next(); if (!j.valid()) break; d = j.getDagNode(); if (t->partialCompare(solution, d) == Term::LESS) { // // Since t is less then d, it will also be less than // all next nodes so we can quit now. // break; } } } return false; nextGroundedOutAlien: ; } return true; } int ACU_LhsAutomaton::greedyMatch(ACU_TreeDagNode* subject, Substitution& solution, ACU_ExtensionInfo* extensionInfo) { local.copy(solution); // greedy matching is speculative so make a copy scratch.copy(solution); // keep a scratch copy as well FOR_EACH_CONST(i, Vector, nonGroundAliens) { Term* t = i->term; Assert(t != 0, "shouldn't be running on unstable terms"); ACU_SlowIter j; if (current.getSize() != 0 && current.findFirstPotentialMatch(t, solution, j)) { int multiplicity = i->multiplicity; LhsAutomaton* a = i->automaton; DagNode* d = j.getDagNode(); for (;;) { if (j.getMultiplicity() >= multiplicity) { Subproblem* sp; if (a->match(d, scratch, sp)) { if (sp != 0) { // // On a hiding to nothing so pack up and go home. // delete sp; return UNDECIDED; } local.copy(scratch); // preserve any new bindings current.deleteMult(j, multiplicity); matchedMultiplicity += multiplicity; goto nextNonGroundAlien; } scratch.copy(local); // restore scratch copy } j.next(); if (!j.valid()) break; d = j.getDagNode(); if (t->partialCompare(solution, d) == Term::LESS) { // // Since t is less then d, it will also be less than // all next nodes so we can quit now. // break; } } } return ((i - nonGroundAliens.begin()) < nrIndependentAliens) ? false : UNDECIDED; nextNonGroundAlien: ; } if (greedyPureMatch(subject, local, extensionInfo)) { solution.copy(local); return true; } // // When the pure matching step fails we always treat it as // UNDECIDED for safety. // return UNDECIDED; } local_inline bool ACU_LhsAutomaton::tryToBindVariable(const TopVariable& tv, Substitution& solution) { // // Try to assign one thing to variable. // int multiplicity = tv.multiplicity; if (multiplicity == 1) { // // Choose first subject with low enough sort. // ACU_SlowIter j(current); do { DagNode* d = j.getDagNode(); if (d->leq(tv.sort)) { solution.bind(tv.index, d); current.deleteMult(j, 1); ++matchedMultiplicity; return true; } j.next(); } while (j.valid()); } else { // // Try first subject with high enough // multiplicity and give up if sort too big. // ACU_SlowIter j; if (current.findGeqMult(multiplicity, j)) { DagNode* d = j.getDagNode(); if (d->leq(tv.sort)) { solution.bind(tv.index, d); current.deleteMult(j, multiplicity); matchedMultiplicity += multiplicity; return true; } } } // // If we weren't able to assign a subject we can still // try the identity element. // if (tv.takeIdentity) { solution.bind(tv.index, topSymbol->getIdentityDag()); return true; } return false; } DagNode* ACU_LhsAutomaton::makeHighMultiplicityAssignment(int multiplicity, Sort* sort, ACU_Tree& tree) { ACU_SlowIter i; if (!(tree.findGeqMult(multiplicity, i))) return 0; DagNode* d = i.getDagNode(); int currentSortIndex = d->getSortIndex(); if (!leq(currentSortIndex, sort)) return 0; // // We have a legal assignment; now try to find a "better" one. // int m = i.getMultiplicity(); int a = m / multiplicity; Assert(a > 0, "multiplicity error"); if (a > 1) { currentSortIndex = topSymbol->computeMultSortIndex(currentSortIndex, currentSortIndex, a - 1); if (!leq(currentSortIndex, sort)) { tree.deleteMult(i, multiplicity); return d; // quit trying to improve substitution } } // // We build the details in the reusable matched vector. // matched.clear(); do { matched.append(ACU_DagNode::Pair(d, a)); tree.deleteMult(i, a * multiplicity); if (tree.getSize() == 0 || !(tree.findGeqMult(multiplicity, i))) break; d = i.getDagNode(); m = i.getMultiplicity(); a = m / multiplicity; Assert(a > 0, "multiplicity error"); currentSortIndex = topSymbol->computeMultSortIndex(currentSortIndex, d->getSortIndex(), a); } while (leq(currentSortIndex, sort)); // // Now make the assignment. // int nrMatched = matched.length(); if (nrMatched == 1 && matched[0].multiplicity == 1) return matched[0].dagNode; ACU_DagNode* d2 = new ACU_DagNode(topSymbol, nrMatched, ACU_DagNode::ASSIGNMENT); ArgVec::iterator dest = d2->argArray.begin(); for (const ACU_Pair& i : matched) *dest++ = i; return d2; } local_inline bool ACU_LhsAutomaton::tryToBindLastVariable(ACU_TreeDagNode* subject, const TopVariable& tv, Substitution& solution) { int multiplicity = tv.multiplicity; if (multiplicity == 1) { if (current.getSize() == 1 && current.getMaxMult() == 1) { // // Just one subject left so try to assign it. // DagNode* d = current.getSoleDagNode(); if (d->leq(tv.sort)) { solution.bind(tv.index, d); current.clear(); // no need to update matchedMultiplicity return true; } } else { { // // First see if we can give it everything. // ACU_TreeDagNode* t = new ACU_TreeDagNode(topSymbol, current); int index = current.computeBaseSort(topSymbol); if (leq(index, tv.sort)) { if (subject->isReduced() && topSymbol->sortConstraintFree()) { t->setSortIndex(index); t->setReduced(); } solution.bind(tv.index, t); current.clear(); // no need to update matchedMultiplicity return true; } } if (matchAtTop && matchedMultiplicity >= 1) { // // Plan B: We must have extension so try assigning // just one subject. // ACU_SlowIter j(current); do { DagNode* d = j.getDagNode(); if (d->leq(tv.sort)) { solution.bind(tv.index, d); current.deleteMult(j, 1); ++matchedMultiplicity; return true; } j.next(); } while (j.valid()); } } } else { // // Last unbound variable has multiplicity >= 2. // if (matchAtTop) { DagNode* d = makeHighMultiplicityAssignment(multiplicity, tv.sort, current); if (d != 0) { solution.bind(tv.index, d); matchedMultiplicity = 2; // wrong but good enough return true; } } else { int size = current.getSize(); if (size == 1 && current.getSoleMultiplicity() == multiplicity) { DagNode* d = current.getSoleDagNode(); if (d->leq(tv.sort)) { solution.bind(tv.index, d); current.clear(); // no need to update matchedMultiplicity return true; } return false; } ACU_DagNode* d = new ACU_DagNode(topSymbol,current.getSize(), ACU_DagNode::ASSIGNMENT); ArgVec::iterator dest = d->argArray.begin(); ACU_SlowIter i(current); do { int m = i.getMultiplicity(); if (m % multiplicity != 0) return false; dest->dagNode = i.getDagNode(); dest->multiplicity = m / multiplicity; ++dest; i.next(); } while (i.valid()); int index = d->argVecComputeBaseSort(); if (!leq(index, tv.sort)) return false; if (subject->isReduced() && topSymbol->sortConstraintFree()) { d->setSortIndex(index); d->setReduced(); } solution.bind(tv.index, d); current.clear(); // no need to update matchedMultiplicity return true; } } // // Last hope: see if we can assign the identity. // if (matchAtTop && matchedMultiplicity >= 2 && tv.takeIdentity) { solution.bind(tv.index, topSymbol->getIdentityDag()); return true; } return false; } bool ACU_LhsAutomaton::greedyPureMatch(ACU_TreeDagNode* subject, Substitution& solution, ACU_ExtensionInfo* extensionInfo) { // // Greedy pure matching can fail for so many reasons // in the red-black case, we don't bother trying to // detect true failure: false always means UNDECIDED. // for (const TopVariable& i : topVariables) { if (solution.value(i.index) == 0) { --nrUnboundVariables; if (current.getSize() == 0) { if (!(i.takeIdentity)) return false; solution.bind(i.index, topSymbol->getIdentityDag()); if (nrUnboundVariables == 0) break; } else { if (nrUnboundVariables == 0) { if (!tryToBindLastVariable(subject, i, solution)) return false; break; } else { if (!tryToBindVariable(i, solution)) return false; } } } } if (current.getSize() == 0) { // // Everything matched; fill out empty extension if needed. // if (extensionInfo != 0) { extensionInfo->setValidAfterMatch(true); extensionInfo->setMatchedWhole(true); } } else { // // Stuff left over; see if we can put it in the extension. // if (extensionInfo != 0 && matchedMultiplicity >= 2) { extensionInfo->setValidAfterMatch(true); extensionInfo->setMatchedWhole(false); if (current.getSize() == 1 && current.getMaxMult() == 1) extensionInfo->setUnmatched(current.getSoleDagNode()); else extensionInfo->setUnmatched(new ACU_TreeDagNode(topSymbol, current)); } else return false; } return true; } int ACU_LhsAutomaton::treeMatch(ACU_TreeDagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ACU_ExtensionInfo* extensionInfo) { current = subject->getTree(); // deep copy if (current.getMaxMult() < maxPatternMultiplicity) return false; // // Eliminate subpatterns that must match a specific subterm // in the subject. // matchedMultiplicity = 0; // so we know when we've matched at least 2 subjects int r = eliminateBoundVariables(solution); if (r != true) return r; if (!eliminateGroundAliens() || !eliminateGroundedOutAliens(solution)) return false; if (extensionInfo == 0 && nrUnboundVariables == 1 && nonGroundAliens.empty()) { // // Forced lone variable case. // for (const TopVariable& i : topVariables) { if (solution.value(i.index) == 0) return forcedLoneVariableCase(subject, i, solution, returnedSubproblem); } CantHappen("didn't find unbound variable"); } if (matchStrategy == FULL) { // // We're here because treeMatchOK was true, which implies: // We're not matching at the top // Expected nrUnboundVariables = 1 // That one variable has unbounded sort and multiplicity 1 // Number of NGAs = 1 // That one NGA is stable and has multiplicity 1 // Assert(nrUnboundVariables <= 1, "nrUnboundVariables = " << nrUnboundVariables); if (nrUnboundVariables != 1) { // // The variable we expected to be unbound and act as a collector // variable was bound after all. We could potentially be // smarter here but this is a very unlikely case. // return UNDECIDED; } if (current.getSize() == 0) { // // Subject exhausted - we don't expect this to happen in the // red-black case where the subject is expected to be large. // Though we could handle this efficiently it might be tricky // to reach this code, even for test purposes so we don't bother. // return UNDECIDED; } if (current.getSize() == 1 && current.getMaxMult() == 1) { // // Subject reduced to a single item; again it would be tricky // to reach this case, so we don't both with an efficient // implementation. // return UNDECIDED; } // // The only way we can be here is if we have a nonground alien // and a collector variable, and no extension. // Assert(nonGroundAliens.length() == 1, "wrong number of nonGroundAliens" << nonGroundAliens.length()); Assert(extensionInfo == 0, "should not have extension"); for (const TopVariable& i : topVariables) { if (solution.value(i.index) == 0) { Assert(i.multiplicity == 1, "collector multiplicity = " << i.multiplicity); returnedSubproblem = new ACU_LazySubproblem(subject, current, solution, nonGroundAliens[0].automaton, nonGroundAliens[0].term, i.index, i.sort); return true; } } CantHappen("didn't find unbound variable"); } // // Match everything else using greedy algorithms. // return greedyMatch(subject, solution, extensionInfo); } bool ACU_LhsAutomaton::forcedLoneVariableCase(ACU_TreeDagNode* subject, const TopVariable& tv, Substitution& solution, Subproblem*& returnedSubproblem) { if (current.getSize() == 0) { // // Special case: assign identity. // if (tv.takeIdentity) { solution.bind(tv.index, topSymbol->getIdentityDag()); return true; } return false; } int multiplicity = tv.multiplicity; if (current.getSize() == 1 && current.getSoleMultiplicity() == multiplicity) { // // Special case: assign one subject. // DagNode* d = current.getSoleDagNode(); if (d->leq(tv.sort)) { solution.bind(tv.index, d); return true; } return false; } // // General case: need to assign everything. // ACU_BaseDagNode* b; if (multiplicity == 1) b = new ACU_TreeDagNode(topSymbol, current); else { ACU_DagNode* d = new ACU_DagNode(topSymbol, current.getSize(), ACU_DagNode::ASSIGNMENT); ArgVec::iterator dest = d->argArray.begin(); ACU_SlowIter i(current); do { int m = i.getMultiplicity(); if (m % multiplicity != 0) return false; dest->dagNode = i.getDagNode(); dest->multiplicity = m / multiplicity; ++dest; i.next(); } while (i.valid()); b = d; } if (b->checkSort(tv.sort, returnedSubproblem)) { solution.bind(tv.index, b); if (subject->isReduced() && b->getSortIndex() != Sort::SORT_UNKNOWN) b->setReduced(); return true; } return false; } Maude-Maude3.2/src/ACU_Theory/ACU_UnificationSubproblem2.cc000077500000000000000000000665521420036611000235140ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2021 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class ACU_UnificationSubproblem2. // // utility stuff #include "macros.hh" #include "vector.hh" #include "indent.hh" #include "intSystem.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "variable.hh" #include "ACU_Persistent.hh" #include "ACU_Theory.hh" // interface class definitions #include "argVec.hh" #include "associativeSymbol.hh" #include "dagNode.hh" #include "subproblem.hh" // core class definitions #include "variableInfo.hh" #include "unificationContext.hh" #include "localBinding.hh" // variable class definitions #include "variableSymbol.hh" #include "variableDagNode.hh" // ACU theory class definitions #include "ACU_Symbol.hh" #include "ACU_DagNode.hh" #include "ACU_UnificationSubproblem2.hh" ACU_UnificationSubproblem2::ACU_UnificationSubproblem2(ACU_Symbol* topSymbol) : topSymbol(topSymbol), savedSubstitution(0), preSolveSubstitution(0) { DebugAdvisory("Created ACU_UnificationSubproblem2() base " << ((void*) this) << " for topSymbol " << topSymbol); maximalSelections = 0; } ACU_UnificationSubproblem2::~ACU_UnificationSubproblem2() { delete maximalSelections; } void ACU_UnificationSubproblem2::markReachableNodes() { // // Protect dags in preSolveSubstitution. // int nrFragile = preSolveSubstitution.nrFragileBindings(); for (int i = 0; i < nrFragile; ++i) { DagNode* d = preSolveSubstitution.value(i); if (d != 0) d->mark(); } // // No need to mark savedSubstitution since its dags are a subset of those in // preSolveSubstitution; we get from preSolveSubstitution to savedSubstitution by // unsolving bindings. // } void ACU_UnificationSubproblem2::addUnification(DagNode* lhs, DagNode* rhs, bool marked, UnificationContext& solution) { Assert(lhs->symbol() == topSymbol, "bad lhs dag " << lhs); Assert(topSymbol->hasIdentity() || rhs->symbol() == topSymbol || dynamic_cast(rhs) != 0, "bad rhs for for non-collapse theory " << rhs); Assert(topSymbol->hasIdentity() || !marked, "bad mark for non-collapse theory"); int nrSubterms = subterms.size(); // // We start with all multiplicities as zero and increment or decrement them as we find subterms. // for (int& m : multiplicities) m = 0; // // We are guaranteed that the lhs has the form f(...) where f is our top symbol. // We first deal with the rhs. // if (rhs->symbol() == topSymbol) { // // The usual case where the unification looks like f(...) =? f(...) // We just insert the multiplicities into our table. // ArgVec rhsArgs = safeCast(ACU_DagNode*, rhs)->argArray; for (const ACU_Pair& i : rhsArgs) setMultiplicity(i.dagNode, - i.multiplicity, solution); } else { // // Must be of the form f(...) =? X // or a theory clash of the form f(...) =? g(...) // Term* identity = topSymbol->getIdentity(); if (identity != 0 && identity->equal(rhs)) ; // rhs disappears in our theory else { int subtermIndex = setMultiplicity(rhs, -1, solution); if (marked && subtermIndex != NONE) markedSubterms.insert(subtermIndex); // cannot be assigned multiple things } } // // Now deal with the lhs. // { ArgVec lhsArgs = safeCast(ACU_DagNode*, lhs)->argArray; for (const ACU_Pair& i : lhsArgs) setMultiplicity(i.dagNode, i.multiplicity, solution); } // // Some of the subterms might have cancelled - if they were newly introduced they are not needed. // killCancelledSubterms(nrSubterms); // // Check to see if everything cancelled. If something did not there we need // to record the Diophantine equation corresponding to this unification problem. // for (int m : multiplicities) { if (m != 0) { unifications.push_back(multiplicities); return; } } // // No non-zero entries so we can ignore unification problem. // } int ACU_UnificationSubproblem2::setMultiplicity(DagNode* dagNode, int multiplicity, UnificationContext& solution) { // // First we replace a variable with its current representative. Really we // should also do this for variables within aliens as well. // // While it is tempting to replace variables by whatever they are bound // to, this eager replacement will often create a problem as hard as the // one that produced the binding, leading to nontermination. For example: // // fmod FOO is // sort Foo . // ops a b c d : -> Foo . // op f : Foo Foo -> Foo [assoc comm] . // op g : Foo Foo -> Foo [assoc comm] . // vars X Y : Foo . // endfm // // unify X =? f(Y, a) /\ Y =? g(X, c) . // // By delaying variable replacement, we will reach a solved form with // a theory cycle which is then resolved by our cycle breaking code. // if (VariableDagNode* varDagNode = dynamic_cast(dagNode)) { varDagNode = varDagNode->lastVariableInChain(solution); // // Normally we don't care about variables bound into our theory since they // will be unsolved as part of the AC/ACU unification procedure to ensure // termination. The exception is variables bound to our identity. // if (Term* identity = topSymbol->getIdentity()) { if (DagNode* subject = solution.value(varDagNode->getIndex())) { if (identity->equal(subject)) return NONE; // identity elements are just eliminated } } // // Otherwise we work with the representative variable. // dagNode = varDagNode; } // // Now look for dag in list of nominally abstracted dags. // int nrSubterms = subterms.size(); for (int i = 0; i < nrSubterms; ++i) { if (dagNode->equal(subterms[i])) { multiplicities[i] += multiplicity; return i; } } // // Not found so make a new entry. // subterms.append(dagNode); multiplicities.append(multiplicity); return nrSubterms; } void ACU_UnificationSubproblem2::killCancelledSubterms(int nrOldSubterms) { int nrSubterms = subterms.size(); if (nrSubterms > nrOldSubterms) { // // We added subterms that need to be removed if they cancelled. // int destination = nrOldSubterms; for (int i = nrOldSubterms; i < nrSubterms; ++i) { int m = multiplicities[i]; if (m != 0) { // // Didn't cancel - need to preserve subterm and its multiplicity. // if (destination < i) { subterms[destination] = subterms[i]; multiplicities[destination] = m; } ++destination; } } if (destination < nrSubterms) { // // We killed some subterms; get rid of the surplus entries. // subterms.resize(destination); multiplicities.resize(destination); } } } void ACU_UnificationSubproblem2::unsolve(int index, UnificationContext& solution) { // // We take a solved form X = f(...), turn it into a Diophantine equation and // remove it from the current solution. // DagNode* variable = solution.getVariableDagNode(index); DagNode* value = solution.value(index); solution.bind(index, 0); Assert(variable != 0, "couldn't get variable for index " << index << " bound to " << value); DebugAdvisory("### unsolving " << variable << " <- " << value); // // Start with all multiplicities zero. // for (int& m : multiplicities) m = 0; // // Increment multiplicities for subterms of f(...) // ArgVec args = safeCast(ACU_DagNode*, value)->argArray; for (const ACU_Pair& i : args) setMultiplicity(i.dagNode, i.multiplicity, solution); // // Decrement multiplicity for X // setMultiplicity(variable, -1, solution); // // Record Diophantine equation (can never be all zero). // unifications.push_back(multiplicities); } bool ACU_UnificationSubproblem2::solve(bool findFirst, UnificationContext& solution, PendingUnificationStack& pending) { // // Check for degenerate case where all of the unification problems cancelled. // if (unifications.empty()) return findFirst; if (findFirst) { // // Save the current substitution // preSolveSubstitution.clone(solution); // // Unsolve any solved forms that are in our theory. This seemingly wasteful step // has to be done in order to avoid nontermination. // // The idea is that solved forms X = f(...) in our theory were created by us at some // earlier invocation and represent decisions made about the solution on the current // path. They must therefore be considered simultaneously with current unification // subproblems otherwise we might generate an additional binding for X which is // then resolved by creating yet another f-theory subproblem. // int nrFragile = solution.nrFragileBindings(); for (int i = 0; i < nrFragile; ++i) { DagNode* value = solution.value(i); if (value != 0 && value->symbol() == topSymbol) unsolve(i, solution); } if (!buildAndSolveDiophantineSystem(solution)) { // // Restore current solution and fail. // solution.restoreFromClone(preSolveSubstitution); return false; } if (topSymbol->hasIdentity()) { // // If we have an identity we use a more complex BDD based // approach to choosing selection from the Diophantine basis. // In the case that the identity axiom is sort preserving we // can restrict our attention to maximal vectors to avoid // a lot of redundant unifiers. // bdd legal = computeLegalSelections(); DebugAdvisory("legal = " << legal << " node count = " << bdd_nodecount(legal) << " path count = " << bdd_pathcount(legal)); int nrBasisElements = basis.size(); bdd maximal = legal; if (topSymbol->hasUnequalLeftIdentityCollapse()) { // // Can't ignore non-maximal solutions because // (1) Maximal solution may not have a sorting while a non-maximal solution may have. // (2) The sorting of a maximal solution may exclude a non-maximal solution it was covering. // DebugInfo("hasUnequalLeftIdentityCollapse() true so considering non-maximal selections"); } else { DebugInfo("hasUnequalLeftIdentityCollapse() false so considering only maximal selections"); // // Assume that each variable introduced for a Diophantine basis element will // be able to disappear by taking the basis element. Thus we only want maximal // vectors from legal. // for (int i = 0; i < nrBasisElements; ++i) { // // bigger = not(ith var) /\ (legal restricted to ith var true) // // i.e. bigger represents those vectors where the ith variable is false and we get // a legal solution by making it true. Clearly the original vector was not maximal, // even if it was a legal solution. // // We need to eliminate these vectors if we want maximal solutions, so we compute the // complement of this set of vectors and conjunct them in. // bdd notBigger = bdd_or(bdd_ithvar(i), bdd_not(bdd_restrict(legal, bdd_ithvar(i)))); maximal = bdd_and(maximal, notBigger); } } DebugAdvisory("maximal = " << maximal << " node count = " << bdd_nodecount(maximal) << " path count = " << bdd_pathcount(maximal)); maximalSelections = new AllSat(maximal, 0, nrBasisElements - 1); } // // Save state of the pending stack with the substitution so that // we can restore both in order to undo each of our solutions. // savedSubstitution.clone(solution); savedPendingState = pending.checkPoint(); } else { // // Restore pending stack and current substitution, implicitly deallocating // any fresh variables we introduced. // pending.restore(savedPendingState); solution.restoreFromClone(savedSubstitution); } // // Look for a solution in our theory. // while (topSymbol->hasIdentity() ? nextSelectionWithIdentity(findFirst) : nextSelection(findFirst)) { findFirst = false; if (buildSolution(solution, pending)) return true; // // Restore pending stack and current substitution, implicitly deallocating // any fresh variables we introduced. // pending.restore(savedPendingState); solution.restoreFromClone(savedSubstitution); } // // No more solutions; restore any solved forms that we unsolved. // solution.restoreFromClone(preSolveSubstitution); return false; } void ACU_UnificationSubproblem2::classify(int subtermIndex, UnificationContext& solution, bool& canTakeIdentity, int& upperBound, Symbol*& stableSymbol) { // // For a subterm that we have nominally abstraction by a Diophantine variable we determine: // (1) Is is possible that the subject can be unified against identity. // (2) Can we determine an upperbound on how many other subjects could be unified against it. // (3) Can we determine what it will only unify against something with a specific stable top symbol. // Term* identity = topSymbol->getIdentity(); // // Default determinations: // canTakeIdentity = (identity != 0); // can unify with identity if it exists upperBound = markedSubterms.contains(subtermIndex) ? 1 : UNBOUNDED; // marked subterms are bounded by 1 stableSymbol = 0; // no stable symbol // // Now we try to tighten these restrictions. // DagNode* subject = subterms[subtermIndex]; if (VariableDagNode* v = dynamic_cast(subject)) { // // If subterm is a variable we may be able to constrain it based on its sort. // VariableSymbol* variableSymbol = safeCast(VariableSymbol*, v->symbol()); Sort* variableSort = variableSymbol->getSort(); int variableSortBound = topSymbol->sortBound(variableSort); if (variableSortBound < upperBound) upperBound = variableSortBound; canTakeIdentity = canTakeIdentity && topSymbol->takeIdentity(variableSort); subject = solution.value(v->getIndex()); if (subject == 0) return; // unbound variable Assert(subject->symbol() != topSymbol, "variable " << (DagNode*) v << " still bound into our theory " << subject << " even after unsolving phase"); } // // Now we have a nonvariable, or a variable bound to a nonvariable. // We look to see if the top symbol is stable. // Symbol* symbol = subject->symbol(); DebugAdvisory("ACU_UnificationSubproblem2::classify() subject = " << subject << " symbol->isStable() = " << symbol->isStable() << " subject->isGround() = " << subject->isGround()); if (subject->isGround()) { upperBound = 1; // ground alien can unify with at most one thing canTakeIdentity = false; // identity should not appear as a subterm stableSymbol = symbol; } else if (symbol->isStable()) { // // Anything that unifies with subject must have symbol on top. // upperBound = 1; // stable symbol can unify with at most one thing canTakeIdentity = canTakeIdentity && (symbol == identity->symbol()); stableSymbol = symbol; } } bool ACU_UnificationSubproblem2::buildAndSolveDiophantineSystem(UnificationContext& solution) { #ifndef NO_ASSERT DebugAdvisory("building DiophantineSystem for ACU_UnificationSubproblem2 " << ((void*) this)); if (globalAdvisoryFlag) { for (int i = 0; i < subterms.length(); ++i) cerr << subterms[i] << '\t'; cerr << endl; } #endif // // Each distinct alien subdag from a unification problem that didn't get cancelled // is represented by a Diophantine variable. // int nrDioVars = subterms.size(); Assert(nrDioVars > 0, "shouldn't be called in degenerate case"); //if (nrDioVars == 1) // return false; // trivial failure // // Create the Diophantine system. // IntSystem system(nrDioVars); for (const Vector& i : unifications) system.insertEqn(i); // // Compute an upperbound on the assignment to each Diophantine variable. // upperBounds.resize(nrDioVars); // for basis selection use IntSystem::IntVec upperBnds(nrDioVars); // for Diophantine system use Vector stableSymbols(nrDioVars); // if we know we can only unify against a stable alien for (int i = 0; i < nrDioVars; ++i) { bool canTakeIdentity; int upperBound; classify(i, solution, canTakeIdentity, upperBound, stableSymbols[i]); DebugInfo("i = " << i << " subterms[i] = " << subterms[i] << " canTakeIdentity = " << canTakeIdentity << " upperBound = " << upperBound); if (!canTakeIdentity) needToCover.insert(i); // can't take identity so mark as uncovered and be sure to cover upperBounds[i] = upperBound; upperBnds[i] = upperBound; } system.setUpperBounds(upperBnds); // // Extract the basis. // Vector dioSol; for (int index = 0; system.findNextMinimalSolution(dioSol);) { #ifndef NO_ASSERT DebugAdvisory("added basis element for ACU_UnificationSubproblem2 " << ((void*) this)); if (globalAdvisoryFlag) { for (int i = 0; i < dioSol.length(); ++i) cerr << dioSol[i] << '\t'; cerr << endl; } #endif Symbol* existingStableSymbol = 0; for (int i = 0; i < nrDioVars; ++i) { int t = dioSol[i]; if (t != 0) { Symbol* stableSymbol = stableSymbols[i]; if (stableSymbol != 0) { // // We have a basis element that is going to force a term with a stable symbol to // unify with something. // if (existingStableSymbol == 0) existingStableSymbol = stableSymbol; else if (existingStableSymbol != stableSymbol) { // // Forced unification is guaranteed to fail. // DebugAdvisory("killing basis element, " << existingStableSymbol << " vs " << stableSymbol); goto killElement; } } } } { basis.push_front(Entry()); Entry& e = basis.front(); e.remainder = accumulator; // deep copy e.element.resize(nrDioVars); for (int i = 0; i < nrDioVars; ++i) { if ((e.element[i] = dioSol[i]) != 0) accumulator.insert(i); // subterm i is covered } e.index = index; ++index; } killElement: ; } // // Check that each term that needs to be covered is covered by at least one basis element. // if (!accumulator.contains(needToCover)) return false; // // Initialize totals vector and uncovered set. // totals.resize(nrDioVars); for (int i = 0; i < nrDioVars; ++i) totals[i] = 0; uncovered = needToCover; return true; } bool ACU_UnificationSubproblem2::nextSelection(bool findFirst) { int nrSubterms = subterms.size(); if (findFirst) { current = basis.begin(); forward: // // We keep adding basis elements to the selection as long as they don't violate // an upper bound. When we do hit a violation, if we find that a covering is // not possible without this element we backtrack. // for (; current != basis.end(); ++current) { if (includable(current)) { for (int i = 0; i < nrSubterms; ++i) { if (int v = current->element[i]) { totals[i] += v; uncovered.subtract(i); } } selection.append(current); } else { if (!(current->remainder.contains(uncovered))) goto backtrack; } } Assert(uncovered.empty(), "failed to cover"); return true; } else { backtrack: // // We backtrack by removing basis elements from the current selection. Each time // we remove an element, if we can still get a covering with later elements we // start forward again. // Assert(selection.size() > 0, "backtracking over empty selection"); for (int i = selection.size() - 1; i >= 0; --i) { current = selection[i]; for (int j = 0; j < nrSubterms; ++j) { if ((totals[j] -= current->element[j]) == 0) uncovered.insert(j); } if (current->remainder.contains(uncovered)) { ++current; selection.resize(i); goto forward; } } } return false; } bool ACU_UnificationSubproblem2::nextSelectionWithIdentity(bool /* findFirst */) { if (maximalSelections->nextAssignment()) { const Vector& assignment = maximalSelections->getCurrentAssignment(); selection.clear(); FOR_EACH_CONST(i, Basis, basis) { if (assignment[i->index]) selection.append(i); } return true; } return false; } bool ACU_UnificationSubproblem2::includable(Basis::const_iterator potential) { int nrSubterms = subterms.size(); for (int i = 0; i < nrSubterms; ++i) { if (totals[i] + potential->element[i] > upperBounds[i]) return false; } return true; } bdd ACU_UnificationSubproblem2::computeLegalSelections() { int nrBasisElements = basis.size(); BddUser::setNrVariables(nrBasisElements); bdd conjunction = bddtrue; Vector bounds; int nrSubterms = subterms.size(); for (int i = 0; i < nrSubterms; ++i) { int upperBound = upperBounds[i]; if (upperBound != UNBOUNDED) { // // Compute a BDD that ensures the selection of basis elements // keeps the assignment to the subterm at or below upper bound. // bounds.resize(upperBound + 1); for (int j = 0; j <= upperBound; ++j) bounds[j] = bddtrue; for (const Entry& k : basis) { int value = k.element[i]; if (value != 0) { for (int j = upperBound; j >= 0; --j) { if (j - value >= 0) bounds[j] = bdd_ite(bdd_ithvar(k.index), bounds[j - value], bounds[j]); else bounds[j] = bdd_ite(bdd_ithvar(k.index), bddfalse, bounds[j]); } } } DebugAdvisory("upperbound " << i << " bound = " << bounds[upperBound] << " node count = " << bdd_nodecount(bounds[upperBound]) << " path count = " << bdd_pathcount(bounds[upperBound])); conjunction = bdd_and(conjunction, bounds[upperBound]); } if (needToCover.contains(i)) { // // Compute a BDD that ensures the selection of basis elements // assigns at least one thing to the subterm. // bdd disjunction = bddfalse; for (const Entry& k : basis) { if (k.element[i] != 0) disjunction = bdd_or(disjunction, bdd_ithvar(k.index)); } DebugAdvisory("need to cover " << i << " disjunction = " << disjunction << " node count = " << bdd_nodecount(disjunction) << " path count = " << bdd_pathcount(disjunction)); conjunction = bdd_and(conjunction, disjunction); } } return conjunction; } int ACU_UnificationSubproblem2::reuseVariable(int selectionIndex) { // // Check to see if one the existing variables can be reused // as the variable for basisElement. // Basis::const_iterator b = selection[selectionIndex]; int selectionSize = selection.size(); int nrSubterms = subterms.size(); for (int i = 0; i < nrSubterms; ++i) { if (b->element[i] == 1) { if (dynamic_cast(subterms[i]) != 0) { // // Candidate variable; see if variable gets anything else // for (int j = 0; j < selectionSize; ++j) { if (j != selectionIndex && selection[j]->element[i] != 0) goto fail; } // // So subterm i is a variable that is assigned exactly the // variable that we are planning to create for basisElement. // We use it instead. // return i; } } fail: // // Try next subterm. // ; } return NONE; } bool ACU_UnificationSubproblem2::buildSolution(UnificationContext& solution, PendingUnificationStack& pending) { #ifndef NO_ASSERT DebugAdvisory("buildSolution() using basis elements:"); if (globalAdvisoryFlag) { int selectionSize = selection.size(); for (int j = 0; j < selectionSize; ++j) { int nrSubterms = subterms.size(); for (int i = 0; i < nrSubterms; ++i) cerr << selection[j]->element[i] << '\t'; cerr << endl; } } #endif // // First we allocate a fresh variable for each basis element selected. // ConnectedComponent* component = topSymbol->rangeComponent(); int selectionSize = selection.size(); Vector freshVariables(selectionSize); NatSet reusedVariables; for (int i = 0; i < selectionSize; ++i) { #define REUSE_VARIABLES #ifdef REUSE_VARIABLES int subtermIndex = reuseVariable(i); if (subtermIndex == NONE) freshVariables[i] = solution.makeFreshVariable(component); else { freshVariables[i] = subterms[subtermIndex]; reusedVariables.insert(subtermIndex); } #else freshVariables[i] = solution.makeFreshVariable(component); #endif } // // Now for each abstracted subterm we compute a solution in // the purified problem. // int nrSubterms = subterms.size(); for (int i = 0; i < nrSubterms; ++i) { if (reusedVariables.contains(i)) continue; // no point unifying a variable with itself bool inTheory = true; int nrElements = 0; int lastElement = NONE; for (int j = 0; j < selectionSize; ++j) { if (selection[j]->element[i] > 0) { ++nrElements; lastElement = j; } } Assert(nrElements <= upperBounds[i], "have at least " << nrElements << " assign variables vs upper bound of " << upperBounds[i] << " for subterm " << subterms[i]); DagNode* d; if (nrElements == 0) d = topSymbol->getIdentityDag(); else if (nrElements == 1 && selection[lastElement]->element[i] == 1) { d = freshVariables[lastElement]; inTheory = false; // we are assigning an alien term } else { ACU_DagNode* a = new ACU_DagNode(topSymbol, nrElements); int pos = 0; for (int j = 0; j < selectionSize; ++j) { int m = selection[j]->element[i]; if (m > 0) { a->argArray[pos].dagNode = freshVariables[j]; a->argArray[pos].multiplicity = m; ++pos; } } // // There is no guarantee that the fresh variables that we generate are // is the same order as needed for AC normal form - so we call this // private member function to fix this without too much overhead. // a->sortAndUniquize(); Assert(a->isTree() == false, "Oops we got a tree! " << a); d = a; } DagNode* subterm = subterms[i]; if (VariableDagNode* varSubterm = dynamic_cast(subterm)) { // // We need to handle unbound variable subterms that we unify with // something in our theory ourself to avoid generating another // problem in our theory. // VariableDagNode* repVar = varSubterm->lastVariableInChain(solution); if (solution.value(repVar->getIndex()) == 0 && inTheory) { solution.unificationBind(repVar, d); continue; } } DebugInfo("solving " << subterms[i] << " =? " << d); if (!(subterms[i]->computeSolvedForm(d, solution, pending))) return false; } return true; } Maude-Maude3.2/src/ACU_Theory/ACU_UnificationSubproblem2.hh000066400000000000000000000070671420036611000235170ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2008 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for unification subproblems in the AC and ACU theories. // It consists of the AC(U) symbol, a vector of abstracted subterms and a basis for the // Diophantine system corresponding the purified AC(U) unification problem. // #ifndef _ACU_UnificationSubproblem2_hh_ #define _ACU_UnificationSubproblem2_hh_ #include #include "unificationSubproblem.hh" #include "simpleRootContainer.hh" #include "natSet.hh" #include "bddUser.hh" #include "allSat.hh" #include "dagNode.hh" //#include "dagNodeSet.hh" #include "substitution.hh" #include "pendingUnificationStack.hh" class ACU_UnificationSubproblem2 : public UnificationSubproblem, private SimpleRootContainer { NO_COPYING(ACU_UnificationSubproblem2); public: ACU_UnificationSubproblem2(ACU_Symbol* topSymbol); ~ACU_UnificationSubproblem2(); void addUnification(DagNode* lhs, DagNode* rhs, bool marked, UnificationContext& solution); bool solve(bool findFirst, UnificationContext& solution, PendingUnificationStack& pending); #ifdef DUMP //void dump(ostream& s, const VariableInfo& variableInfo, int indentLevel); #endif private: // DagNodeSet subterms; struct Entry { Vector element; // practical basis elements will fit in 32-bit machine integers NatSet remainder; // which subterms will be assigned by remaining elements int index; }; typedef list Basis; typedef list NatSetList; void markReachableNodes(); int setMultiplicity(DagNode* dagNode, int multiplicity, UnificationContext& solution); void killCancelledSubterms(int nrOldSubterms); void unsolve(int index, UnificationContext& solution); void classify(int subtermIndex, UnificationContext& solution, bool& canTakeIdentity, int& upperBound, Symbol*& stableSymbol); bool buildAndSolveDiophantineSystem(UnificationContext& solution); bool nextSelection(bool findFirst); bool nextSelectionWithIdentity(bool findFirst); bool includable(Basis::const_iterator potential); bdd computeLegalSelections(); bool buildSolution(UnificationContext& solution, PendingUnificationStack& pending); int reuseVariable(int selectionIndex); ACU_Symbol* topSymbol; Vector subterms; list > unifications; Basis basis; Vector multiplicities; NatSet accumulator; Vector totals; Vector upperBounds; NatSet needToCover; NatSet uncovered; Vector selection; Basis::const_iterator current; Substitution savedSubstitution; Substitution preSolveSubstitution; PendingUnificationStack::Marker savedPendingState; // // Needed for identity case. // NatSetList old; NatSet selectionSet; AllSat* maximalSelections; NatSet markedSubterms; // indices of subterms that have been marked }; #endif Maude-Maude3.2/src/ACU_Theory/ACU_VarLhsAutomaton.cc000066400000000000000000000127421420036611000222030ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class ACU_VarLhsAutomaton. // // utility stuff #include "macros.hh" #include "indent.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "variable.hh" #include "ACU_Persistent.hh" #include "ACU_Theory.hh" // interface class definitions #include "associativeSymbol.hh" #include "dagNode.hh" #include "extensionInfo.hh" // core class definitions #include "variableInfo.hh" #include "substitution.hh" // variable class definitions #include "variableSymbol.hh" #include "variableTerm.hh" // ACU Red-Black class definitions #include "ACU_SlowIter.hh" // ACU theory class definitions #include "ACU_Symbol.hh" #include "ACU_DagNode.hh" #include "ACU_TreeDagNode.hh" #include "ACU_VarLhsAutomaton.hh" ACU_VarLhsAutomaton::ACU_VarLhsAutomaton(ACU_Symbol* symbol, bool matchAtTop, bool collapsePossible, int nrVariables, VariableTerm* stripper, VariableTerm* collector) : ACU_CollectorLhsAutomaton(symbol, matchAtTop, collapsePossible, nrVariables, collector), stripperVarIndex(stripper->getIndex()), stripperSort(stripper->getSort()), trueFailure(symbol->sortBound(stripperSort) == 1 || symbol->sortStructure(stripperSort) == AssociativeSymbol::PURE_SORT) { Assert(!(symbol->takeIdentity(stripperSort)), "stripper variable shouldn't be able take identity"); } bool ACU_VarLhsAutomaton::match(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo) { if (collectorFree(solution)) { if (subject->symbol() == getSymbol()) { // // Non-collapse case. // if (solution.value(stripperVarIndex) == 0) { // // Stripper variable is unbound so find the // first subterm it can take. // if (safeCast(ACU_BaseDagNode*, subject)->isTree()) { // // Red-black case. // ACU_TreeDagNode* s = safeCast(ACU_TreeDagNode*, subject); ACU_SlowIter i(s->getTree()); do { DagNode* d = i.getDagNode(); if (d->leq(stripperSort)) { if (!collect(i, s, solution)) goto fullMatch; // collect() destroys i solution.bind(stripperVarIndex, d); returnedSubproblem = 0; if (extensionInfo) { extensionInfo->setValidAfterMatch(true); extensionInfo->setMatchedWhole(true); } return true; } i.next(); } while (i.valid()); } else { // // ArgVec case. // ACU_DagNode* s = safeCast(ACU_DagNode*, subject); int nrArgs = s->argArray.length(); int i = 0; do { DagNode* d = s->argArray[i].dagNode; if (d->leq(stripperSort)) { if (!collect(i, s, solution)) goto fullMatch; // on a hiding to nothing solution.bind(stripperVarIndex, d); returnedSubproblem = 0; if (extensionInfo) { extensionInfo->setValidAfterMatch(true); extensionInfo->setMatchedWhole(true); } return true; } ++i; } while (i != nrArgs); } // // We didn't find any single subterm that the // stripper variable could be bound to. // If stripper variable had an element sort or a // pure sort, we can rule out multiple subterms being // bound to the stripper variable and declare failure. // if (trueFailure) return false; } } else { // // Collapse case. // if (!getCollapsePossible()) return false; Assert(extensionInfo == 0 && subject->getSortIndex() != Sort::SORT_UNKNOWN, "collapse to top not handled by ACU_VarLhsAutomaton"); DagNode* d = solution.value(stripperVarIndex); if (d == 0) { if (!(subject->leq(stripperSort))) return false; solution.bind(stripperVarIndex, subject); } else { if (!(d->equal(subject))) return false; } returnedSubproblem = 0; collapse(solution); return true; } } fullMatch: return ACU_LhsAutomaton::match(subject, solution, returnedSubproblem, extensionInfo); } #ifdef DUMP void ACU_VarLhsAutomaton::dump(ostream& s, const VariableInfo& variableInfo, int indentLevel) { s << Indent(indentLevel) << "Begin{ACU_VarLhsAutomaton}\n"; ++indentLevel; s << Indent(indentLevel) << "stripperVarIndex = " << stripperVarIndex << " \"" << variableInfo.index2Variable(stripperVarIndex) << '"' << "\tstripperSort = \"" << stripperSort << "\"\t" << "trueFailure = " << trueFailure << '\n'; ACU_CollectorLhsAutomaton::dump(s, variableInfo, indentLevel); s << Indent(indentLevel - 1) << "End{ACU_VarLhsAutomaton}\n"; } #endif Maude-Maude3.2/src/ACU_Theory/ACU_VarLhsAutomaton.hh000066400000000000000000000040461420036611000222130ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for ACU variable stripper-collector lhs automaton. // #ifndef _ACU_VarLhsAutomaton_hh_ #define _ACU_VarLhsAutomaton_hh_ #include "ACU_CollectorLhsAutomaton.hh" class ACU_VarLhsAutomaton : public ACU_CollectorLhsAutomaton { NO_COPYING(ACU_VarLhsAutomaton); public: ACU_VarLhsAutomaton(ACU_Symbol* symbol, bool matchAtTop, bool collapsePossible, int nrVariables, VariableTerm* stripper, VariableTerm* collector); // // Standard ACU_LhsAutomaton operations. // bool match(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo); #ifdef DUMP void dump(ostream& s, const VariableInfo& variableInfo, int indentLevel); #endif private: // // The stripper variable strips off one argument. It must not // be able to take the identity. // const int stripperVarIndex; Sort* const stripperSort; // // If stripper variable can take only one thing or it has a pure sort // then if there exists any assignment there will exist a singleton // assignment. Thus if we can't find a singleton assignment we can // return false. // const bool trueFailure; }; #endif Maude-Maude3.2/src/ACU_Theory/ChangeLog000077500000000000000000005651171420036611000177030ustar00rootroot000000000000002021-09-21 Steven Eker * ACU_ExtensionInfo.cc (ACU_ExtensionInfo::copy): take const arg * ACU_ExtensionInfo.hh (class ACU_ExtensionInfo): updated decl for copy() ===================================Maude137=========================================== 2021-06-02 Steven Eker * ACU_UnificationSubproblem2.cc (ACU_UnificationSubproblem2::solve): added comment to explain why we need a separate branch for the identity case 2021-05-11 Steven Eker * ACU_Subproblem.cc (ACU_Subproblem::ACU_Subproblem): deleted commented out print statement (ACU_Symbol::~ACU_Subproblem): deleted commented out print statement * ACU_Symbol.cc (ACU_Symbol::normalize): undid previous range-based for loop because iterators aren't safe here due to garbage collector (ACU_Symbol::copyReduceSubtermsAndNormalize): ditto (ACU_Symbol::reduceArgumentsAndNormalize): ditto (ACU_Symbol::eqRewrite): ditto (ACU_Symbol::memoStrategy): ditto 2021-04-14 Steven Eker * ACU_TreeMatcher.cc (ACU_LhsAutomaton::eliminateBoundVariables): use range-based for loop (ACU_LhsAutomaton::eliminateGroundAliens): use range-based for loop (ACU_LhsAutomaton::eliminateGroundedOutAliens): use range-based for loop (ACU_LhsAutomaton::makeHighMultiplicityAssignment): use range-based for loop (ACU_LhsAutomaton::greedyPureMatch): use range-based for loop (ACU_LhsAutomaton::treeMatch): use range-based for loop (2 places) * ACU_Term.cc (ACU_Term::compileRhs2): use range-based for loop (ACU_Term::ACU_Term): pre-increment (three versions) (ACU_Term::deepSelfDestruct): use range-based for loop (ACU_Term::normalizeAliensAndFlatten): pre-increment; pre-decrement (ACU_Term::normalize): pre-increment; pre-decrement * ACU_UnificationSubproblem2.cc (ACU_UnificationSubproblem2::addUnification): use range-based for loop (3 places) (ACU_UnificationSubproblem2::unsolve): use range-based for loop (ACU_UnificationSubproblem2::buildAndSolveDiophantineSystem): use range-based for loop (ACU_UnificationSubproblem2::markReachableNodes): pre-increment (ACU_UnificationSubproblem2::addUnification): use range-based for loop to clear multiplicities (ACU_UnificationSubproblem2::unsolve): use range-based for loop to clear multiplicities (ACU_UnificationSubproblem2::computeLegalSelections): use range-based for loop (2 places) 2021-04-13 Steven Eker * ACU_Matcher.cc (ACU_LhsAutomaton::handleElementVariables): insert missing & in range-based for loop * ACU_Symbol.cc (ACU_Symbol::stackArguments): use range-based for loop (ACU_Symbol::termify): use range-based for loop (ACU_Symbol::computeGeneralizedSort): use range-based for loop (ACU_Symbol::computeGeneralizedSort2): use range-based for loop (ACU_Symbol::normalize): use range-based for loop (ACU_Symbol::copyReduceSubtermsAndNormalize): use range-based for loop (ACU_Symbol::makeDagNode): pre-increment (both versions) (ACU_Symbol::reduceArgumentsAndNormalize): use range-based for loop (ACU_Symbol::eqRewrite): use range-based for loop (ACU_Symbol::memoStrategy): use range-based for loop (ACU_Symbol::stackArguments): pre-decrement (2 places) (ACU_Symbol::makeCanonical): pre-increment (ACU_Symbol::makeCanonicalCopy): pre-increment (ACU_Symbol::makeDagNode): replace ACU_DagNode::Pair with ACU_Pair (2 places, both versions) (ACU_Symbol::termify): replace ACU_DagNode::Pair with ACU_Pair (2 places) (ACU_Symbol::makeCanonicalCopy): replace ACU_DagNode::Pair with ACU_Pair * ACU_Subproblem.cc (ACU_Subproblem): use range-based for loop (2 places) (ACU_Subproblem::solveVariables): use range-based for loop (ACU_Subproblem::solveVariables): pre-increment (ACU_Subproblem::noVariableCase): pre-increment (4 places) (ACU_Subproblem::extractDiophantineSystem): pre-increment (3 places) (ACU_Subproblem::computeAssignment): pre-increment (2 places) (ACU_Subproblem::fillOutExtensionInfo): pre-increment * ACU_Matcher.cc (ACU_LhsAutomaton::eliminateGroundAliens): use range-based for loop (ACU_LhsAutomaton::eliminateGroundedOutAliens): use range-based for loop (ACU_LhsAutomaton::computeTotalMultiplicity): use range-based for loop (ACU_LhsAutomaton::match): use range-based for loop (ACU_LhsAutomaton::fullMatch): use range-based for loop (2 places) (ACU_LhsAutomaton::handleElementVariables): use range-based for loop 2021-04-12 Steven Eker * ACU_LazySubproblem.cc (~ACU_LazySubproblem): use range-based for loop * ACU_ExtensionInfo.cc (ACU_ExtensionInfo::buildMatchedPortion): use range-based for loop (3 places) (ACU_ExtensionInfo::buildUnmatchedPortion): use range-based for loop; rewrote excessively complicated first loop * ACU_DagNode.cc (ACU_DagNode::markArguments): use range-based for loop (ACU_DagNode::getHashValue): use range-based for loop (ACU_DagNode::clearCopyPointers2): use range-based for loop (ACU_DagNode::argVecComputeBaseSort): use range-based for loop (ACU_DagNode::computeBaseSortForGroundSubterms): use range-based for loop (ACU_DagNode::insertVariables2): use range-based for loop (ACU_DagNode::indexVariables2): use range-based for loop (ACU_DagNode::matchVariableWithExtension): post increment ===================================Maude136=========================================== 2020-12-11 Steven Eker * ACU_DagNode.cc (ACU_DagNode::instantiate2): take and pass maintainInvariants arg; only normalize and compute sort for ground dag if true (ACU_DagNode::instantiate2): remove comment about computing sorts in the narrowing case since now maintainInvariants will be false (ACU_DagNode::instantiateWithCopies2): pass maintainInvariants = false to instantiate() * ACU_DagNode.hh (class ACU_DagNode): updated decl for instantiate2() ===================================Maude132=========================================== 2020-06-18 Steven Eker * ACU_UnificationSubproblem2.cc (ACU_UnificationSubproblem2::buildSolution): turn cerr into DebugInfo() 2020-06-06 Steven Eker * ACU_UnificationSubproblem2.cc (ACU_UnificationSubproblem2::buildAndSolveDiophantineSystem): DebugAdvisory() -> DebugInfo() 2020-06-05 Steven Eker * ACU_UnificationSubproblem2.cc (ACU_UnificationSubproblem2::buildSolution): don't computeBaseSortForGroundSubterms for identity here * ACU_Symbol.cc (ACU_Symbol::makeUnificationSubproblem): call computeBaseSortForGroundSubterms for identity here * ACU_UnificationSubproblem2.hh (class ACU_UnificationSubproblem2): added decl for reuseVariable() * ACU_UnificationSubproblem2.cc (ACU_UnificationSubproblem2::setMultiplicity): replace variables bound to aliens by their bindings (ACU_UnificationSubproblem2::setMultiplicity): unmade above change and added detail comment with example to explain why eager replacement fails (ACU_UnificationSubproblem2::reuseVariable): added (ACU_UnificationSubproblem2::buildSolution): added optional code to use reuseVariable() optimization 2020-06-02 Steven Eker * ACU_DagNode.cc (ACU_DagNode::computeSolvedForm2): added DebugEnter() 2020-05-27 Steven Eker * ACU_UnificationSubproblem2.cc (ACU_UnificationSubproblem2::solve): added DebugInfo()s for branch on hasUnequalLeftIdentityCollapse() ===================================Maude128a=========================================== 2019-12-03 Steven Eker * ACU_BaseDagNode.cc (getSize): use safeCastNonNull<>() (2 places) ===================================Maude127=========================================== 2019-11-11 Steven Eker * ACU_DagNode.cc (computeBaseSortForGroundSubterms): no early termination in UNIMPLEMENTED case * ACU_UnificationSubproblem2.cc (buildSolution): pass false to warnAboutUnimplemented arg * ACU_DagNode.hh (ACU_BaseDagNode): updated decl for computeBaseSortForGroundSubterms() * ACU_DagNode.cc (computeBaseSortForGroundSubterms): take and pass warnAboutUnimplemented flag; simplified ===================================Maude125=========================================== 2019-07-24 Steven Eker * ACU_Term.cc (compareArguments): added comment about static analyzer warning * ACU_DagNode.cc (compareArguments): added comment about static analyzer warning ===================================Maude123=========================================== 2019-05-23 Steven Eker * ACU_UnificationSubproblem2.cc (buildSolution): fix compiler warnings ===================================Maude121=========================================== 2018-10-23 Steven Eker * ACU_Symbol.hh (AssociativeSymbol): added decl for stackPhysicalArguments() * ACU_Symbol.cc (stackPhysicalArguments): added 2018-10-18 Steven Eker * ACU_DagNode.cc (copyWithReplacement): added Assert() on argIndex ===================================Maude119=========================================== 2017-04-20 Steven Eker * ACU_Matcher.cc (buildBipartiteGraph): fixed symmetric bug (eliminateGroundedOutAliens): fixed symmetric bug (aliensOnlyMatch): fixed symmetric bug * ACU_GreedyMatcher.cc (greedyMatch): fixed symmetric bug * ACU_NGA_LhsAutomaton.cc (match): fixed two symmetric bugs * ACU_TreeMatcher.cc (eliminateGroundedOutAliens): fixed bug where we had the test for going past the last potential match the wrong way around (greedyMatch): fixed symmetric bug * ACU_DagOperations.cc (findFirstPotentialMatch): added comments * ACU_LazySubproblem.cc (solve): fix bug where we had the test for going pass last potential match the wrong way around 2017-04-19 Steven Eker * ACU_LazySubproblem.cc (solve): added comments; end search early, as soon as stripperTerm is definitely greater than subject on current path * ACU_TreeMatcher.cc (treeMatch): added comment (treeMatch): changed comments "could be smarter" to explanations of why it's not worth being smarter (3 places) * ACU_CollectorLhsAutomaton.cc (collect): added comments 2017-04-17 Steven Eker * ACU_LhsCompiler0.cc (tryToMakeCollectorLhsAutomaton): added support for ACU_BndVarLhsAutomaton * ACU_DagNode.hh (ACU_BaseDagNode): added friend class ACU_BndVarLhsAutomaton * ACU_Theory.hh: added class ACU_BndVarLhsAutomaton * ACU_BndVarLhsAutomaton.cc: created * ACU_BndVarLhsAutomaton.hh: created 2017-04-14 Steven Eker * ACU_VarLhsAutomaton.cc (match): updated comments ===================================Maude112a=========================================== 2017-02-23 Steven Eker * ACU_DagNode.cc (instantiateWithCopies2): ifdef'd out normal form, sort and ground flag computation and added comment to explain why 2017-02-21 Steven Eker * ACU_DagNode.hh (ACU_BaseDagNode): updated decl for instantiateWithReplacement() * ACU_DagNode.cc (instantiateWithReplacement): handle lazy contexts 2017-02-17 Steven Eker * ACU_TreeDagNode.hh (ACU_BaseDagNode): deleted decl for stackArguments() * ACU_TreeDagNode.cc (stackArguments): deleted * ACU_DagNode.cc (stackArguments): deleted * ACU_DagNode.hh (ACU_BaseDagNode): deleted decl for stackArguments() * ACU_Symbol.hh (AssociativeSymbol): updated decl for stackArguments() * ACU_Symbol.cc (stackArguments): handle respectFrozen and eagerContext arguments ===================================Maude111b=========================================== 2016-12-20 Steven Eker * ACU_TreeDagNode.cc (copyAll2): added missing return statement 2016-11-10 Steven Eker * ACU_TreeDagNode.hh (ACU_BaseDagNode): added decl for copyAll2() * ACU_TreeDagNode.cc (copyAll2): added * ACU_DagNode.hh (ACU_BaseDagNode): added decl for copyAll2() * ACU_DagNode.cc (copyAll2): added ===================================Maude111=========================================== 2016-05-18 Steven Eker * ACU_UnificationSubproblem2.cc (addUnification): check for subtermIndex != NONE (setMultiplicity): check for variable bound to identity; this fixes a bug introduced in Maude108 where classify assumes such things have already canceled ===================================Maude110=========================================== 2016-05-17 Steven Eker * ACU_Symbol.cc (computeGeneralizedSort2): fixed nasty FMR bug where we were appending a reference to the same Vector which became stale if the append forced reallocation 2016-03-24 Steven Eker * ACU_Symbol.cc (computeGeneralizedSort2): rewritten 2016-03-18 Steven Eker * ACU_Symbol.cc (computeGeneralizedSort2): added ===================================Maude109=========================================== 2015-08-07 Steven Eker * ACU_Symbol.cc (unificationPriority): make ACU have a lower priority than AC 2015-07-31 Steven Eker * ACU_UnificationSubproblem2.cc (classify): handle ground aliens specially 2015-07-30 Steven Eker * ACU_DagNode.cc (computeBaseSortForGroundSubterms): call setGround() in the ground case ===================================Maude108=========================================== 2014-06-20 Steven Eker * ACU_UnificationSubproblem2.cc (solve): added comment with new insight into why solved forms must be unsolved ===================================Maude104=========================================== 2013-02-28 Steven Eker * ACU_UnificationSubproblem2.cc (addUnification): call killCancelledSubterms() * ACU_UnificationSubproblem2.hh (SimpleRootContainer): added decl for killCancelledSubterms() * ACU_UnificationSubproblem2.cc (killCancelledSubterms): added 2013-02-27 Steven Eker * ACU_UnificationSubproblem2.cc (ACU_UnificationSubproblem2): removed pointless #ifndef (addUnification): code cleaning (markReachableNodes): code cleaning (solve): fix performance bug where we were checking subterms rather than unifications for emptiness to detect the degenerate case (markReachableNodes): protect preSolveSubstitution rather than savedSubstitution since it will have a superset of bindings 2013-02-07 Steven Eker * ACU_UnificationSubproblem2.cc: only bind variables to dags which are in our theory - leave everything else to computeSolvedForm() - This is to fix a bug where we bind a variable to itself, or form an occurs check problem in an alien theory ===================================Maude96c=========================================== 2012-07-10 Steven Eker * ACU_BaseDagNode.hh (DagNode): update comment on ASSIGNMENT now that we can have variables at the kind level, and thus we don't guarentee non-error sort this NormalizationStatus ===================================Maude96a=========================================== 2012-04-30 Steven Eker * ACU_Term.cc (ACU_Term): multiplicities version: fix Assert(), now that we can have a single argument with multiplicity >= 2 2012-04-13 Steven Eker * ACU_DagNode.hh (ACU_BaseDagNode): updated decl for instantiateWithReplacement(); added decl for instantiateWithCopies2() * ACU_DagNode.cc (instantiateWithReplacement): rewritten to respect eager positions (instantiateWithCopies2): added 2012-03-30 Steven Eker * ACU_Symbol.cc (termify): code cleaning 2012-03-29 Steven Eker * ACU_Symbol.hh (AssociativeSymbol): added decl for termify() * ACU_Term.hh (Term): added decl for new ctor * ACU_Term.cc (ACU_Term): added version that takes multiplicities * ACU_Symbol.cc (termify): added ===================================Maude96=========================================== 2011-11-22 Steven Eker * ACU_UnificationSubproblem2.cc (ACU_UnificationSubproblem2::solve): use restoreFromClone() to make sure that sort and dagnode information for variable created on the branch we are backtracking get purged from our UnificationContext object (4 places) ===================================Maude95c=========================================== 2010-12-09 Steven Eker * ACU_Symbol.cc (ACU_Symbol::postOpDeclarationPass): don't call rightIdentitySortCheck() since we are commutative ===================================Maude95b=========================================== 2010-10-19 Steven Eker * ACU_Symbol.cc (ACU_Symbol::makeCanonicalCopyEagerUptoReduced): becomes makeCanonicalCopy() * ACU_Symbol.hh (class ACU_Symbol): makeCanonicalCopyEagerUptoReduced() -> makeCanonicalCopy() ===================================Maude95a=========================================== 2010-09-29 Steven Eker * ACU_Symbol.cc (ACU_Symbol::makeCanonicalCopyEagerUptoReduced): simplifed now that we only get unreduced nodes; use getCanonicalCopyEagerUptoReduced(); fix bug where we were not copying flags and sort * ACU_Symbol.hh (class ACU_Symbol): added decl for makeCanonicalCopyEagerUptoReduced() * ACU_Symbol.cc (ACU_Symbol::makeCanonicalCopyEagerUptoReduced): added (ACU_Symbol::makeCanonical): removed commment out tree->array conversion 2010-09-23 Steven Eker * ACU_LazySubproblem.cc (ACU_LazySubproblem::bindCollector): fix bug where we weren't handling the case where our collector variable had become bound by our stripper automaton * ACU_LhsAutomaton.cc (ACU_LhsAutomaton::complete): fixed out of date comment 2010-09-10 Steven Eker * ACU_UnificationSubproblem2.cc (ACU_UnificationSubproblem2::solve): don't exclude the null solution in the unequal identity collapse case 2010-09-09 Steven Eker * ACU_UnificationSubproblem2.cc (ACU_UnificationSubproblem2::solve): check hasUnequalLeftIdentityCollapse() and force generation of non-maximal solutions when it is true 2010-08-18 Steven Eker * ACU_UnificationSubproblem2.cc (ACU_UnificationSubproblem2::nextSelectionWithIdentity): deleted commented out old verions * ACU_DagNode.cc (ACU_DagNode::nonVariableSize): deleted * ACU_DagNode.hh (class ACU_DagNode): deleted decl for nonVariableSize() ===================================Maude95=========================================== 2010-08-11 Steven Eker * ACU_DagNode.cc (ACU_DagNode::computeSolvedForm2): handle unification agaist bound variable by unifying against variables binding to avoid nontermination 2010-08-04 Steven Eker * ACU_UnificationSubproblem2.cc (ACU_UnificationSubproblem2::buildSolution): handle =? d the old way when the representative variable of is bound to avoid generating problems of the same size as we solve (ACU_UnificationSubproblem2::addUnification): handle variable rhs even when we don't have an identity 2010-08-03 Steven Eker * ACU_DagNode.cc (ACU_DagNode::computeSolvedForm2): rewritten to push problems of the form f(...) = X on the pending stack rather than pass them to VariableDagNode::computeSolvedForm2() * ACU_UnificationSubproblem2.hh (class ACU_UnificationSubproblem2): updated decl for addUnification() * ACU_UnificationSubproblem2.cc (ACU_UnificationSubproblem2::addUnification): handle marked argument 2010-07-29 Steven Eker * ACU_UnificationSubproblem2.hh (class ACU_UnificationSubproblem2): updated decl for classify(); deleleted decl for isRestrictedSubterm(); updated decl for unsolve(); updated decl for setMultiplicity() (class ACU_UnificationSubproblem2): deleted data member restrictedSubterms; added data member markedSubterms * ACU_UnificationSubproblem2.cc (ACU_UnificationSubproblem2::addUnification): take solution as argument (ACU_UnificationSubproblem2::addUnification): simplified; keep set of indices for marked subterms (ACU_UnificationSubproblem2::setMultiplicity): use representative variable in a chain; return subterm index (ACU_UnificationSubproblem2::unsolve): simplified; never fail - we let Diophantine solver worry about pathological X = f(..., X,...) case (ACU_UnificationSubproblem2::solve): simplified using new unsolve() symantics (ACU_UnificationSubproblem2::classify): simplified - no longer chase variable chains as we should only have representative variables in our system (ACU_UnificationSubproblem2::isRestrictedSubterm): deleted * ACU_UnificationSubproblem2.hh (class ACU_UnificationSubproblem2): updated decl for addUnification() 2010-07-21 Steven Eker * ACU_UnificationSubproblem2.cc (ACU_UnificationSubproblem2::buildAndSolveDiophantineSystem): comment out the case where with fail because we only have one Diophantine variable since even with no basis elements we can still get a unifier 2010-07-20 Steven Eker * ACU_UnificationSubproblem2.hh (class ACU_UnificationSubproblem2): added decl for isRestrictedSubterm * ACU_UnificationSubproblem2.cc (ACU_UnificationSubproblem2::classify): use equal() rather than == for checking for restricted subterms (ACU_UnificationSubproblem2::isRestrictedSubterm): added (ACU_UnificationSubproblem2::classify): rewritten using isRestrictedSubterm() to ensure that variables can be restricted 2010-07-19 Steven Eker * ACU_UnificationSubproblem2.cc (ACU_UnificationSubproblem2::markReachableNodes): fix bug where we were deleting maximalSelections here rather than in ~ACU_UnificationSubproblem2() 2010-07-09 Steven Eker * ACU_UnificationSubproblem2.cc (ACU_UnificationSubproblem2::buildSolution): add an Assert to detect trivial bounds violation (ACU_UnificationSubproblem2::computeLegalSelections): use index member of basis element rather than separately maintained index which is incorrect 2010-07-08 Steven Eker * ACU_UnificationSubproblem2.cc (ACU_UnificationSubproblem2::solve): set maximalSelections (ACU_UnificationSubproblem2::ACU_UnificationSubproblem2): clear maximalSelections * ACU_UnificationSubproblem2.hh (class ACU_UnificationSubproblem2): added data member maximalSelections * ACU_UnificationSubproblem2.cc (ACU_UnificationSubproblem2::addUnification): use hasIdentity() (ACU_UnificationSubproblem2::unsolve): use hasIdentity() (ACU_UnificationSubproblem2::solve): use hasIdentity() * ACU_DagNode.cc (ACU_DagNode::computeBaseSortForGroundSubterms): removed commented out code 2010-07-07 Steven Eker * ACU_UnificationSubproblem2.hh (class ACU_UnificationSubproblem2): added decl for computeLegalSelections() ===================================Maude94a=========================================== 2010-06-29 Steven Eker * ACU_Symbol.cc (ACU_Symbol::canResolveTheoryClash): added * ACU_DagNode.cc (ACU_DagNode::computeSolvedForm2): try using resolveTheoryClash() 2010-06-25 Steven Eker * ACU_UnificationSubproblem2.cc (ACU_UnificationSubproblem2::addUnification): handle the theory clash case where the rhs is actually our identity * ACU_DagNode.cc (ACU_DagNode::computeSolvedForm2): quick hack to handle theory clashes asymetrically * ACU_UnificationSubproblem2.hh (class ACU_UnificationSubproblem2): added data member restrictedSubterms * ACU_UnificationSubproblem2.cc (ACU_UnificationSubproblem2::unsolve): handle X = f(..., X, ...) case where collapse might be possible (ACU_UnificationSubproblem2::addUnification): rewritten to handle theory clash unifications (ACU_UnificationSubproblem2::classify): handle restricted subterms 2010-06-24 Steven Eker * ACU_UnificationSubproblem2.cc (ACU_UnificationSubproblem2::buildAndSolveDiophantineSystem): given each basis element a unique index * ACU_UnificationSubproblem2.hh (class ACU_UnificationSubproblem2): added index field to struct Entry * ACU_UnificationSubproblem2.cc (ACU_UnificationSubproblem2::nextSelectionWithIdentity): avoid generating subsets of previous selections * ACU_UnificationSubproblem2.hh (class ACU_UnificationSubproblem2): added data member old (class ACU_UnificationSubproblem2): added NatSetList typedef (class ACU_UnificationSubproblem2): added date member selectionSet * ACU_UnificationSubproblem2.cc (ACU_UnificationSubproblem2::buildAndSolveDiophantineSystem): change criteria for failing due to lack of coverage * ACU_UnificationSubproblem2.hh (class ACU_UnificationSubproblem2): added data member needToCover * ACU_UnificationSubproblem2.cc: fill out needToCover * ACU_UnificationSubproblem2.hh (class ACU_UnificationSubproblem2): added decl for nextSelectionWithIdentity() * ACU_UnificationSubproblem2.cc (ACU_UnificationSubproblem2::buildSolution): handle null assignments by using getIdentityDag() (ACU_UnificationSubproblem2::nextSelectionWithIdentity): added (ACU_UnificationSubproblem2::solve): use nextSelectionWithIdentity() in identity case 2010-06-23 Steven Eker * ACU_UnificationSubproblem2.hh (class ACU_UnificationSubproblem2): update decl for classify() * ACU_UnificationSubproblem2.cc (ACU_UnificationSubproblem2::classify): fixed bug where we were not checking for unbound variable (ACU_UnificationSubproblem2::classify): fixed bug where we assume we could treat our own top symbol as a stable symbol, even though in any combination of basis elements it could take multiple things and not be forced to unify against a single specific thing (ACU_UnificationSubproblem2::classify): pass canTakeIdentity flag rather than needToCover flag; fix bug where we could have left needToCover false even when there was no identity (ACU_UnificationSubproblem2::buildAndSolveDiophantineSystem): use new classify() semantics 2010-06-22 Steven Eker * ACU_UnificationSubproblem2.cc (ACU_UnificationSubproblem2::buildAndSolveDiophantineSystem): rewritten using classify() to fix bug in basis element killing code * ACU_UnificationSubproblem2.hh (class ACU_UnificationSubproblem2): added decl for classify() * ACU_UnificationSubproblem2.cc (ACU_UnificationSubproblem2::classify): added 2010-06-07 Steven Eker * ACU_UnificationSubproblem2.cc (ACU_UnificationSubproblem2::buildAndSolveDiophantineSystem): added code to exclude basis elements that force unresolvable theory clashes 2010-05-21 Steven Eker * ACU_DagNode.cc (ACU_DagNode::computeBaseSortForGroundSubterms): hack to allow unification to proceed on non-ground ACU dags ===================================Maude94=========================================== 2010-04-16 Steven Eker * ACU_LhsCompiler1.cc (ACU_Term::analyseConstraintPropagation): code cleaning 2010-04-15 Steven Eker * ACU_LhsCompiler2.cc (ACU_Term::findConstraintPropagationSequence): minor code cleaning 2010-04-14 Steven Eker * ACU_LhsCompiler2.cc (ACU_Term::findConstraintPropagationSequence): amongst sequences that bind uniquely the same number of variables, perfer the longer sequence * ACU_Term.hh (class ACU_Term): deleted decl for addIndependentAliens() * ACU_LhsCompiler2.cc (ACU_Term::compileAliensOnlyCase): code cleaning (ACU_Term::findConstraintPropagationSequence): rewritten to avoid exponential blow up in more cases. (ACU_Term::findConstraintPropagationSequence): allow current forceable NGA to be pruned if we've already explored a path and there is nothing to be gained by matching it now (ACU_Term::compileAliensOnlyCase): don't call addIndependentAliens() since we assume best sequence will already contain all forceable NGAs (ACU_Term::addIndependentAliens): deleted ===================================Maude93a=========================================== 2010-03-12 Steven Eker * ACU_RhsAutomaton.cc (ACU_RhsAutomaton::buildArguments): use nrArguments * ACU_Term.cc (ACU_Term::compileRhs2): rewritten to compile/build larger subterms first, to avoid quadratic conflict arcs on clt's example * ACU_RhsAutomaton.cc (ACU_RhsAutomaton::close): set nrArguments (ACU_RhsAutomaton::construct, ACU_RhsAutomaton::replace): use nrArguments rather than arguments.size() to avoid checking for a null Vector * ACU_RhsAutomaton.hh (class ACU_RhsAutomaton): added date element nrArguments ===================================Maude93=========================================== 2010-02-26 Steven Eker * ACU_DagOperations.cc (ACU_DagNode::binarySearch): removed setOnLs()/setOnGeq() since it seems to be a pessimization (both versions) 2010-02-24 Steven Eker * ACU_Normalize.cc (ACU_DagNode::copyAndBinaryInsert): use new binarySearch() convention 2010-02-19 Steven Eker * ACU_DagNode.hh (class ACU_DagNode): updated decl for DagNode* version of binarySearch() * ACU_DagOperations.cc (ACU_DagNode::binarySearch): rewrote DagNode* version (ACU_DagNode::eliminateSubject): use new binarySearch() convention * ACU_DagNode.hh (class ACU_DagNode): updated decl for Term* version of binarySearch() * ACU_GndLhsAutomaton.cc (ACU_GndLhsAutomaton::match): use new binarySearch() convention * ACU_Matcher.cc (ACU_LhsAutomaton::eliminateGroundAliens): use new binarySearch() convention * ACU_DagOperations.cc (ACU_DagNode::binarySearch): rewritten to return position rather than pass it back through a reference argument (ACU_DagNode::eliminateArgument): use new binarySearch semantics 2010-02-18 Steven Eker * ACU_DagOperations.cc (ACU_DagNode::binarySearch): use unsigned sum optimization in both versions 2010-01-06 Steven Eker * ACU_Term.cc (compileRhs2): experiment code to check my understanding of clt's extreme right nesting example ===================================Maude92c=========================================== 2009-12-09 Steven Eker * ACU_TreeDagNode.cc (makeCanonical): added * ACU_Symbol.cc (makeCanonical): use ACU_TreeDagNode::makeCanonical() 2009-12-03 Steven Eker * ACU_Symbol.hh (class ACU_Symbol): added decl for makeCanonical() * ACU_TreeDagNode.hh (class ACU_TreeDagNode): make ACU_Symbol a friend * ACU_Symbol.cc (makeCanonical): added ===================================Maude92b=========================================== 2008-12-22 Steven Eker * ACU_Symbol.cc (computeGeneralizedSort): new getSortFunction() convention 2008-12-19 Steven Eker * ACU_Subproblem.hh: derive from DelayedSubproblem ===================================Maude92=========================================== 2008-09-24 Steven Eker * ACU_Matcher.cc (fullMatch): fix bug where we weren't setting up the extensionInfo in the new fast success case 2008-09-23 Steven Eker * ACU_Matcher.cc (fullMatch): catch the case where we have no patterns, one variable that can't take identity, one subject and extension (fullMatch): catch the same case where we can take identity but we're not allowed to since there were only two things in the subject ===================================Maude91c=========================================== 2008-09-11 Steven Eker * ACU_DagNode.cc (computeBaseSortForGroundSubterms): added default case to avoid compiler warning 2008-05-08 Steven Eker * ACU_UnificationSubproblem2.cc (buildAndSolveDiophantineSystem): use IntSystem rather than MpzSystem (buildAndSolveDiophantineSystem): use new IntSystem semantics to avoid making a zero padded copy of each equation ===================================Maude91a=========================================== 2008-04-18 Steven Eker * ACU_Symbol.hh (class ACU_Symbol): added decl for unificationPriority() * ACU_Symbol.cc (unificationPriority): added ===================================Maude91=========================================== 2008-03-23 Steven Eker * ACU_DagNode.hh (class ACU_DagNode): ACU_UnificationSubproblem, ACU_UnificationWithExtensionSubproblem no longer friends * ACU_UnificationWithExtensionSubproblem.cc: deleted * ACU_UnificationWithExtensionSubproblem.hh: deleted * ACU_UnificationWithExtensionSubproblem.cc: deleted * ACU_UnificationWithExtensionSubproblem.hh: deleted * ACU_Theory.hh: removed classes ACU_UnificationSubproblem, ACU_UnificationWithUnificationSubproblem * ACU_DagNode.hh (class ACU_DagNode): deleted commented out decl for old version of computeSolvedForm2() * ACU_DagNode.cc (computeSolvedForm2): deleted commented out old version ===================================Maude90a=========================================== 2008-02-08 Steven Eker * ACU_UnificationSubproblem2.hh (class ACU_UnificationSubproblem2): added date member preSolveSubstitution; added decl for unsolve() * ACU_UnificationSubproblem2.cc (solve): unsolve solved forms in our theory (unsolve): added * ACU_DagNode.cc (computeSolvedForm2): Substitution -> UnificationContext * ACU_DagNode.hh (class ACU_DagNode): updated decl for computeSolvedForm2() 2008-02-05 Steven Eker * ACU_Symbol.cc (makeUnificationSubproblem): added * ACU_Symbol.hh (class ACU_Symbol): added decl for makeUnificationSubproblem() * ACU_DagNode.hh (class ACU_DagNode): updated decl for computeSolvedForm2() * ACU_DagNode.cc (computeSolvedForm2): rewritten 2008-02-04 Steven Eker * ACU_UnificationSubproblem2.cc: created * ACU_UnificationSubproblem2.hh: created 2008-01-17 Steven Eker * ACU_UnificationSubproblem.cc (ACU_UnificationSubproblem): initialize savedSubstitution with 0 entries rather than with a single entry (that will end up being marked in GC) ===================================Maude90=========================================== 2007-11-20 Steven Eker * ACU_UnificationSubproblem.cc (ACU_UnificationSubproblem): savedSubstitution needs to be at least size 1 in new Substitution handling (unificationSolve): fix bug by using clone() to restore old substitution 2007-11-07 Steven Eker * ACU_TreeDagNode.cc (indexVariables2): added * ACU_TreeDagNode.hh (class ACU_TreeDagNode): added decl for indexVariables2() 2007-11-05 Steven Eker * ACU_DagNode.cc (indexVariables2, instantiateWithReplacement): added (instantiate2): use isGround() rather than checking for an unknown sort (instantiate2): call setGround() * ACU_DagNode.hh (class ACU_DagNode): added decl for indexVariables2() and instantiateWithReplacement() 2007-11-01 Steven Eker * ACU_DagNode.cc (instantiate2): updated * ACU_DagNode.hh (class ACU_DagNode): updated decl for instantiate2() 2007-09-28 Steven Eker * ACU_UnificationSubproblem.cc (unificationSolve): replaced two clone() calls with copy() calls since when we copy back a saved substitution, both substitutions should have the same copy size ===================================Maude89h=========================================== 2007-08-24 Steven Eker * ACU_DagNode.cc (computeBaseSortForGroundSubterms): rewritten * ACU_DagNode.hh (class ACU_DagNode): updated decl for computeBaseSortForGroundSubterms() * ACU_UnificationSubproblem.cc (unificationSolve): added comments to indicate that fresh variables are deallocated when done with 2007-08-23 Steven Eker * ACU_UnificationSubproblem.cc (buildSolution): use sortAndUniquize() in place of dumbNormalizeAtTop() * ACU_DagNode.cc (computeSolvedForm): becomes computeSolvedForm2() * ACU_DagNode.hh (class ACU_DagNode): computeSolvedForm() -> computeSolvedForm2() 2007-08-21 Steven Eker * ACU_UnificationSubproblem.cc (initialize): simplify and comment (initialize): fix nasty bug by clearing previous selections 2007-08-17 Steven Eker * ACU_UnificationSubproblem.hh (class ACU_UnificationSubproblem): update decl for addBasisElement() * ACU_UnificationSubproblem.cc (addBasisElement): pass element by reference; made assignment in if statement obvious ===================================Maude89g=========================================== 2007-08-09 Steven Eker * ACU_DagNode.hh (class ACU_DagNode): added decl for dumbNormalizeAtTop() * ACU_DagNode.cc (instantiate2): use dumbNormalizeAtTop() to avoid getting a tree form * ACU_UnificationSubproblem.cc (buildSolution): use dumbNormalizeAtTop() to avoid getting a tree form * ACU_Normalize.cc (dumbNormalizeAtTop): added (normalizeAtTop): use dumbNormalizeAtTop() for general case * ACU_UnificationSubproblem.cc (buildSolution): added Assert() to protect against getting a tree form from normalizeAtTop() ===================================Maude89f=========================================== 2007-07-06 Steven Eker * ACU_DagNode.cc (computeSolvedForm): use ACU_UnificationWithExtensionSubproblem() * ACU_Theory.hh: added ACU_UnificationWithUnificationSubproblem 2007-06-29 Steven Eker * ACU_UnificationWithExtensionSubproblem.cc (generateUnificationSubproblem) (fillOutExtensionInfo, nextSelection): added 2007-06-28 Steven Eker * ACU_UnificationWithExtensionSubproblem.cc: created * ACU_UnificationWithExtensionSubproblem.hh: created * ACU_DagNode.hh (class ACU_DagNode): updated decl for computeSolvedForm() * ACU_DagNode.cc (computeSolvedForm): added extensionInfo arg ===================================Maude89c=========================================== 2007-03-16 Steven Eker * ACU_Symbol.cc (computeGeneralizedSort): reuse bddPair between iterations 2007-03-15 Steven Eker * ACU_Symbol.cc (computeGeneralizedSort): pass realToBdd by ref * ACU_Symbol.hh (class ACU_Symbol): fix decl for computeGeneralizedSort() ===================================Maude89a=========================================== 2007-03-14 Steven Eker * ACU_UnificationSubproblem.hh (class ACU_UnificationSubproblem): added decl for markReachableNodes() * ACU_UnificationSubproblem.cc (markReachableNodes): added * ACU_UnificationSubproblem.hh (class ACU_UnificationSubproblem): derive from SimpleRootContainer * ACU_UnificationSubproblem.cc (ACU_UnificationSubproblem): initialize savedSubstitution (unificationSolve): don't call deallocateFreshVariables(); restore original substitution after we're done with selection 2007-03-13 Steven Eker * ACU_Symbol.cc (computeGeneralizedSort): added * ACU_Symbol.hh (class ACU_Symbol): added decl for computeGeneralizedSort() * ACU_DagNode.hh (class ACU_DagNode): added decl for instantiate2() * ACU_DagNode.cc (instantiate2): added * ACU_UnificationSubproblem.cc (unificationSolve): keep a copy of the solution and restore is each time we give up on the current basis selection * ACU_UnificationSubproblem.hh (class ACU_UnificationSubproblem): added data member savedSubstitution * ACU_UnificationSubproblem.cc (buildSolution): added (unificationSolve): fix bug that we were clearing selection that we needed for backtracking * ACU_UnificationSubproblem.hh (class ACU_UnificationSubproblem): added decl for buildSolution() * ACU_DagNode.hh (class ACU_DagNode): ACU_UnificationSubproblem becomes a friend * ACU_Theory.hh: added class ACU_UnificationSubproblem 2007-03-12 Steven Eker * ACU_DagNode.cc (computeSolvedForm): use coverable() check * ACU_UnificationSubproblem.cc (coverable): added * ACU_DagNode.cc (computeSolvedForm): use ACU_UnificationSubproblem * ACU_UnificationSubproblem.cc: created * ACU_UnificationSubproblem.hh: created 2007-03-09 Steven Eker * ACU_DagNode.cc (computeBaseSortForGroundSubterms): added (computeSolvedForm): take car of upper bounds * ACU_DagNode.hh (class ACU_DagNode): added decl for computeBaseSortForGroundSubterms() * ACU_DagNode.cc (nonVariableSize): added (insertVariables2): added (computeSolvedForm): added stub * ACU_DagNode.hh (class ACU_DagNode): added decls for computeSolvedForm(), nonVariableSize(), insertVariables2() ===================================Maude89=========================================== 2006-10-10 Steven Eker * ACU_DagNode.hh: added declaration for getACU_DagNode() to appease gcc 4.1 ===================================Maude88b=========================================== 2005-10-06 Steven Eker * ACU_Term.cc (deepCopy2): fix bug where we were testing s rather than s2 for 0 ===================================Maude86c=========================================== 2005-07-28 Steven Eker * ACU_Term.hh (class ACU_Term): updated decl for SymbolMap* version of ctor * ACU_Term.cc (deepCopy2): handle translation to a non-ACU_Symbol (ACU_Term): force symbol arg to be a ACU_Symbol* 2005-07-01 Steven Eker * ACU_Term.hh (class ACU_Term): updated decls for deepCopy2() and SymbolMap* version of ctor * ACU_Term.cc (deepCopy2): rewritten (ACU_Term): (SymbolMap* version) rewritten ===================================Maude86b=========================================== 2003-08-28 Steven Eker * ACU_Symbol.hh (class ACU_Symbol): added decl for rewriteAtTopNoOwise() * ACU_Symbol.cc (complexStrategy): rewritten to use rewriteAtTopNoOwise() for first 0 in semi-eager case (memoStrategy): ditto (rewriteAtTopNoOwise): added ===================================Maude82=========================================== 2003-07-31 Steven Eker * ACU_LazySubproblem.cc (bindCollector): fixed nasty bug where we were binding local rather than solution (solve): need to retract() after a successful assert() followed by subproblem failure (2 places) ===================================Maude81=========================================== 2003-05-29 Steven Eker * ACU_TreeMatcher.cc (treeMatch): added extra Assert()s for FULL case * ACU_LhsAutomaton.cc (addTopVariable): update nrExpectedUnboundVariables (ACU_LhsAutomaton): clear nrExpectedUnboundVariables (addTopVariable): fix bug where we were not checking that multiplicity == 1 in order to set collectorSeen * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): data member nrExpectedUnboundVariables * ACU_LhsAutomaton.cc (complete): fix bug where we weren't checking that single nga had multiplicity 1 before enabling treeMatchOK in FULL case * ACU_TreeMatcher.cc (treeMatch): check for only 1 thing left in FULL case * ACU_LazySubproblem.cc (ACU_LazySubproblem): call ctors for matchTime and local (bindCollector): use checkSort() (bindCollector): added Assert() for empty tree * ACU_LhsAutomaton.cc (complete): allow the use of tree matching in some FULL cases * ACU_LazySubproblem.cc (bindCollector): simplified as collectorSort will never be 0 * ACU_TreeMatcher.cc (treeMatch): use ACU_LazySubproblem() * ACU_LazySubproblem.hh (class ACU_LazySubproblem): added decl for bindCollector() (class ACU_LazySubproblem): replaced topSymbol with subject; updated decls for bindCollector() and ctor * ACU_LazySubproblem.cc (ACU_LazySubproblem): init topSymbol * ACU_LazySubproblem.hh (class ACU_LazySubproblem): added data member topSymbol; updated decl for ctor * ACU_LazySubproblem.cc (ACU_LazySubproblem): remaining arg is now a const ACU_Tree&; use copy() to initialize matchTime (bindCollector): added * ACU_LazySubproblem.hh (class ACU_LazySubproblem): data member remaining becomes ACU_Tree; updated decl for ctor 2003-05-19 Steven Eker * ACU_Normalize.cc (normalizeAtTop): use useTree() (insertAlien): use useTree() * ACU_Symbol.hh (class ACU_Symbol): updated decl for ACU_Symbol() (useTree): added * ACU_Symbol.cc (ACU_Symbol): initialize useTreeFlag * ACU_Symbol.hh (class ACU_Symbol): added data member useTreeFlag 2003-05-16 Steven Eker * ACU_Symbol.cc (stackArguments): rewritten; handle tree case; use FOR_EACH_CONST() in ArgVec case (ruleRewrite): use ruleFree(); don't use getACU_DagNode() 2003-05-15 Steven Eker * ACU_Symbol.cc (reduceArgumentsAndNormalize): rewritten; now return true for collapse and false owise * ACU_Symbol.hh (class ACU_Symbol): added decls for normalize() and copyReduceSubtermsAndNormalize() * ACU_Symbol.cc (memoStrategy): rewritten (normalize): added (complexStrategy): simplified using normalize() (memoStrategy): simplified using normalize() (normalizeAndComputeTrueSort): simplified using normalize() (copyAndReduceSubterms): rewritten (copyAndReduceSubterms): becomes copyReduceSubtermsAndNormalize() (memoStrategy): simplified using copyReduceSubtermsAndNormalize() (complexStrategy): simplified using copyReduceSubtermsAndNormalize() * ACU_TreeDagNode.cc (treeToArgVec): pass ASSIGNMENT to ACU_DagNode() * ACU_Symbol.cc (reduceArgumentsAndNormalize): use isFresh() (eqRewrite): use isFresh() (complexStrategy): use isFresh() (memoStrategy): use isFresh() (2 places) (normalizeAndComputeTrueSort): rewritten; only call computeTrueSort() on args and normalize if our normalization status is FRESH * ACU_BaseDagNode.hh (isFresh): added * ACU_Symbol.cc (computeBaseSort): use isTree() 2003-05-14 Steven Eker * ACU_ExtensionInfo.hh (useUnmatched): deleted (class ACU_ExtensionInfo): deleted decls for convertToUnmatched(0 and useUnmatched() * ACU_ExtensionInfo.cc (buildMatchedPortion): rewritten using iterators (convertToUnmatched): deleted * ACU_DagNode.cc (partialReplace): need to set normalization status to FRESH * ACU_TreeMatcher.cc (makeHighMultiplicityAssignment): use new ACU_DagNode() convention (tryToBindLastVariable): use new ACU_DagNode() convention (forcedLoneVariableCase): use new ACU_DagNode() convention * ACU_Subproblem.cc (oneVariableCase): use new ACU_DagNode() convention (computeAssignment): use new ACU_DagNode() convention (solveVariables): don't call setNormalizationStatus() * ACU_NonLinearLhsAutomaton.cc (match): use new ACU_DagNode() convention * ACU_Matcher.cc (forcedLoneVariableCase): use new ACU_DagNode() convention * ACU_ExtensionInfo.cc (buildUnmatchedPortion): use new ACU_DagNode() convention * ACU_GreedyMatcher.cc (greedyPureMatch): use new ACU_DagNode() convention * ACU_CollectorLhsAutomaton.cc (collect): use new ACU_DagNode() convention * ACU_DagNode.hh (ACU_DagNode): take NormalizationStatus arg * ACU_ExtensionInfo.cc (buildUnmatchedPortion): rewritten to handle tree case and use iterators * ACU_ExtensionInfo.hh (getUnmatched): deleted * ACU_MergeSort.cc (flattenSortAndUniquize): moved here * ACU_Normalize.cc (copyAndBinaryInsert): moved here * ACU_DagNode.hh (class ACU_DagNode): deleted decls for extensionNormalizeAtTop() and binaryInsert() * ACU_DagNormalization.cc (extensionNormalizeAtTop): deleted (binaryInsert): deleted * ACU_Symbol.cc (reduceArgumentsAndNormalize): removed EXTENSION case (complexStrategy): test for ACU_BaseDagNode::FRESH (memoStrategy): removed EXTENSION case * ACU_BaseDagNode.hh (class ACU_BaseDagNode): deleted EXTENSION from enum NormalizationStatus * ACU_DagNode.cc (partialReplace): simplified using buildUnmatchedPortion(); don't use EXTENSION normalization status (partialConstruct): simplified using buildUnmatchedPortion() * ACU_ExtensionInfo.hh (class ACU_ExtensionInfo): added decl for buildUnmatchedPortion() * ACU_ExtensionInfo.cc (buildUnmatchedPortion): added 2003-05-13 Steven Eker * ACU_TreeDagNode.cc (copyEagerUptoReduced2): avoid treeToArgVec() in the case that our symbol is not eager (clearCopyPointers2): changed CantHappen() to Assert() now that we handle non-eager copies ourself * ACU_DagNode.cc (clearCopyPointers2): only need to clear copy pointer if we're eager - lazy argumnets don't get copied 2003-05-12 Steven Eker * ACU_Symbol.cc (eqRewrite): simplified (complexStrategy): rewritten to avoid converting from tree to argvec form unless we need to evaluate aour args * ACU_TreeDagNode.cc (getHashValue): cache hash value * ACU_TreeDagNode.hh (class ACU_TreeDagNode): deleted decl for treeComputeBaseSort() (class ACU_TreeDagNode): added data member hashCache * ACU_TreeDagNode.cc (treeComputeBaseSort): deleted * ACU_Symbol.cc (computeBaseSort): use ACU_Tree::computeBaseSort() * ACU_TreeMatcher.cc (tryToBindLastVariable): use ACU_Tree::computeBaseSort() * ACU_CollectorLhsAutomaton.cc (collect): (ACU_Tree version) simplified * ACU_LhsAutomaton.cc (complete): removed SAT_MULT test and comment * ACU_LhsCompiler0.cc (tryToMakeNonLinearLhsAutomaton): removed SAT_MULT test and comment * ACU_NonLinearLhsAutomaton.cc (ACU_NonLinearLhsAutomaton): removed SAT_MULT part of Assert() * ACU_TreeMatcher.cc (treeMatch): deleted SAT_MULT Assert() 2003-05-06 Steven Eker * ACU_DagOperations.cc (findFirstPotentialMatch): use Term::UNKNOWN 2003-05-05 Steven Eker * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): redBlackMatch() -> treeMatch() * ACU_TreeMatcher.cc (redBlackMatch): becomes treeMatch() * ACU_Matcher.cc (match): redBlackOK -> treeMatchOK, redBlackMatch() -> treeMatch() * ACU_LhsAutomaton.cc: redBlackOK -> treeMatchOK * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): redBlackOK -> treeMatchOK * ACU_TreeMatcher.cc: remamed from ACU_RedBlackMatcher.cc * ACU_RedBlackMatcher.cc (eliminateBoundVariables): use deleteMult() (makeHighMultiplicityAssignment): use class ACU_Tree (redBlackMatch): use getTree() (eliminateGroundAliens): use deleteMult() (eliminateGroundedOutAliens): use deleteMult() (greedyMatch): use deleteMult() (tryToBindVariable): use deleteMult() (tryToBindLastVariable): use deleteMult() (eliminateBoundVariables): use ACU_Tree::find() (eliminateGroundAliens): use ACU_Tree::find() (eliminateGroundedOutAliens): use ACU_Tree::findFirstPotentialMatch() (greedyMatch): use ACU_Tree::findFirstPotentialMatch() (tryToBindVariable): use ACU_Tree::findGeqMult() (tryToBindLastVariable): use getSoleDagNode() * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): current becomes an ACU_Tree * ACU_GndLhsAutomaton.cc (match): use getTree() * ACU_ExtensionInfo.cc (convertToUnmatched): use getTree() * ACU_Term.cc (compareArguments): use getTree() * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): updated decl for makeHighMultiplicityAssignment() * ACU_NGA_LhsAutomaton.cc (match): use getTree() * ACU_NonLinearLhsAutomaton.cc (match): use getTree() * ACU_VarLhsAutomaton.cc (match): use getTree() * ACU_Flatten.cc (flattenSortAndUniquize): use getTree() * ACU_Normalize.cc (normalizeAtTop): use class ACU_Tree * ACU_FastMerge.cc (fastMerge): use getTree() (2 versions) * ACU_DagNode.hh (class ACU_DagNode): replace struct Pair with a typedef from ACU_Pair * ACU_Normalize.cc (insertAlien): use class ACU_Tree * ACU_DagNode.cc (compareArguments): use getTree() * ACU_Convert.cc: deleted * ACU_DagNode.hh (class ACU_DagNode): deleted decls for makeTree(), pow2min1(), makeTree() * ACU_BaseDagNode.cc (getSize): use getTree() * ACU_TreeDagNode.cc (recComputeBaseSort): deleted (arguments): use tree data member (getHashValue): use tree data member (overwriteWithClone): use tree data member (makeClone): use tree data member (compareArguments): use tree data member (stackArguments): use tree data member (markArguments): use ACU_Tree::mark() (treeToArgVec): use tree data member * ACU_TreeDagNode.hh (class ACU_TreeDagNode): use ACU_Tree data element (getRoot): becomes getTree() (class ACU_TreeDagNode): deleted decl for recComputeBaseSort() * ACU_Symbol.hh (computeMultSortIndex): deleted (computeSortIndex): deleted ===================================Maude80a=========================================== 2003-05-02 Steven Eker * ACU_Symbol.hh (class ACU_Symbol): added decl for rewriteAtTop() * ACU_Symbol.cc (rewriteAtTop): added (eqRewrite): use rewriteAtTop() to avoid having an ACU_ExtensionInfo on our stack frame (eqRewrite): simplified; we no longer assume that if we have standard strategy and our subject was produced by an assignment that we cannot be equation free; mbs can prevent exact sort calculation and setting of reduced flag (reduceArgumentsAndNormalize): only remove identity in ACU_DagNode::EXTENSION case * ACU_DagNode.cc (markArguments): avoid recursing on the first arg that shares our symbol 2003-05-01 Steven Eker * ACU_TreeDagNode.cc (overwriteWithClone): use copySetRewritingFlags() (makeClone): use copySetRewritingFlags() * ACU_DagNode.cc (overwriteWithClone): use copySetRewritingFlags() and fastCopy() (makeClone): use copySetRewritingFlags() and fastCopy() 2003-04-30 Steven Eker * ACU_LhsCompiler3.cc (findLongestIncreasingSequence): added comment to explain why calling subsumes() is safe even in the presence of external agencies that can bind variables in the subsumer ===================================Maude80=========================================== 2003-03-28 Steven Eker * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): deleted decl for copyMultiplicity() * ACU_Matcher.cc (fullMatch): call addSubjects() here (aliensOnlyMatch): call addSubjects() here (buildBipartiteGraph): don't call addSubjects() here (aliensOnlyMatch): check for trivial graph (match): expand copyMultiplicity() here since it's only called from this one place (copyMultiplicity): deleted 2003-03-27 Steven Eker * ACU_Matcher.cc (fullMatch): check for trivial bipartite graph 2003-03-26 Steven Eker * ACU_Subproblem.hh (noPatterns): added * ACU_Matcher.cc (forcedLoneVariableCase): now handle identity case here; no longer local_inline (match): don't handle lone variable identity case here * ACU_RedBlackMatcher.cc (forcedLoneVariableCase): code cleaning * ACU_Theory.hh: deleted fwd decl for class ACU_AlienAlienLhsAutomaton * ACU_DagNode.hh (class ACU_DagNode): deleted decl for findFirstOccurrence() * ACU_DagOperations.cc (findFirstOccurrence): deleted * ACU_Term.hh (class ACU_Term): deleted decl for tryToMakeAlienAlienLhsAutomaton() * ACU_LhsCompiler0.cc (tryToMakeAlienAlienLhsAutomaton): deleted (tryToMakeSpecialCaseAutomaton): don't call tryToMakeAlienAlienLhsAutomaton() * ACU_AlienAlienLhsAutomaton.cc: deleted * ACU_AlienAlienLhsAutomaton.hh: deleted * ACU_Matcher.cc (buildBipartiteGraph): new ACU_Subproblem() convention to get arround the probelm that currentMultipplicities can change * ACU_DagNode.cc (matchVariableWithExtension): new ACU_Subproblem() convention * ACU_Subproblem.hh (class ACU_Subproblem): added decl for addSubjects(); updated decl for ctor * ACU_Subproblem.cc (addSubjects): added (ACU_Subproblem): don't set currentMultiplicity here * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): updated decl for buildBipartiteGraph() * ACU_Matcher.cc (buildBipartiteGraph): take SubproblemAccumulator arg (fullMatch): new buildBipartiteGraph() convention (aliensOnlyMatch): new buildBipartiteGraph() convention * ACU_Subproblem.hh (class ACU_Subproblem): added decl for removePatternNode() * ACU_Subproblem.cc (removePatternNode): added * ACU_Matcher.cc (buildBipartiteGraph): force patterns that only have a single edge 2003-03-25 Steven Eker * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): updated decls for forcedLoneVariableCase(), greedyPureMatch(), tryToBindLastVariable(), tryToBindVariable(), greedyMatch(), eliminateGroundedOutAliens(), eliminateGroundAliens(), eliminateBoundVariables() * ACU_RedBlackMatcher.cc (eliminateBoundVariables): simplified argument list (eliminateGroundAliens): simplified argument list (eliminateGroundedOutAliens): simplified argument list (greedyMatch): simplified argument list (greedyMatch): simpified call to greedyPureMatch() (tryToBindVariable): simplified argument list (makeHighMultiplicityAssignment): current -> root so we don't confuse arg with data member (tryToBindLastVariable): simplified argument list (greedyPureMatch): simplified argument list (greedyPureMatch): simplified calls to tryToBindLastVariable() and tryToBindVariable() (redBlackMatch): assignto data members rather than local variables for current and matchedMultiplicity (redBlackMatch): simplified calls to eliminateBoundVariables(), eliminateGroundAliens(), eliminateGroundedOutAliens(), forcedLoneVariableCase() and greedyMatch() (forcedLoneVariableCase): simplified argument list * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): added decl for red-black version of forcedLoneVariableCase() (class ACU_LhsAutomaton): added data members current, nrUnboundVariables and matchedMultiplicity so we don't have to drag these values around as arguments at match time * ACU_RedBlackMatcher.cc (forcedLoneVariableCase): added red-black version (redBlackMatch): use forcedLoneVariableCase() * ACU_Matcher.cc (match): pass returnedSubproblem arg to redBlackMatch() * ACU_RedBlackMatcher.cc (redBlackMatch): now take returnedSubproblem arg 2003-03-24 Steven Eker * ACU_AlienAlienLhsAutomaton.cc (match): use safeCast() * ACU_ExtensionInfo.cc (copy): use safeCast() * ACU_Matcher.cc (match): use safeCast() * ACU_Term.cc (normalizeAliensAndFlatten): use safeCast() (3 places) * ACU_DagNode.cc (partialReplace): use safeCast() (partialConstruct): use safeCast() (matchVariableWithExtension): use safeCast() * ACU_NonLinearLhsAutomaton.cc (match): use safeCast() (2 places) * ACU_GndLhsAutomaton.cc (ACU_GndLhsAutomaton): don't initialize trueFailure (match): test extensionInfo == 0 rather than trueFailure (dump): don't dump trueFailure * ACU_GndLhsAutomaton.hh (class ACU_GndLhsAutomaton): deleted data member trueFailure * ACU_CollectorLhsAutomaton.cc (ACU_CollectorLhsAutomaton): added Assert to check for sort constraint freeness (collect): don't check for sort constraint freeness (both versions) (collect): use getUniqueSortIndex() (both versions) * ACU_LhsCompiler0.cc (tryToMakeCollectorLhsAutomaton): require that top symbol be sort constraint free 2003-03-21 Steven Eker * ACU_Term.hh (class ACU_Term): added decl for tryToMakeSpecialCaseAutomaton() * ACU_LhsCompiler0.cc (tryToMakeSpecialCaseAutomaton): added (compileLhs2): simplified using tryToMakeSpecialCaseAutomaton() * ACU_NGA_LhsAutomaton.cc (match): call setValidAfterMatch() * ACU_VarLhsAutomaton.cc (match): call setValidAfterMatch() * ACU_GndLhsAutomaton.cc (match): call setValidAfterMatch() * ACU_TreeDagNode.hh (ACU_TreeDagNode): added Assert() to check that we don't make an ACU_TreeDagNode with single argument * ACU_NonLinearLhsAutomaton.cc (match): fixed symmetric bug (dump): dump pureSort (match): deleted superfluous setValidAfterMatch() * ACU_RedBlackMatcher.cc (greedyPureMatch): fixed bug where we were creating ACU node with single argument when setting extension * ACU_NonLinearLhsAutomaton.cc (match): restructured 2003-03-20 Steven Eker * ACU_Term.hh (class ACU_Term): updated decl for tryToMakeNonLinearLhsAutomaton() * ACU_LhsCompiler0.cc (tryToMakeNonLinearLhsAutomaton): don't take matchAtTop arg since now it must be true (tryToMakeNonLinearLhsAutomaton): allow LIMIT_SORT, check that multiplicity <= SAT_MULT; new ACU_NonLinearLhsAutomaton() calling convention (compileLhs2): use new tryToMakeNonLinearLhsAutomaton() convention * ACU_NonLinearLhsAutomaton.cc (match): check getMaxMult() here so that we can return false if there is no subject with enough multiplicity * ACU_NonLinearLhsAutomaton.hh (class ACU_NonLinearLhsAutomaton): updated decl for ctor * ACU_NonLinearLhsAutomaton.cc (ACU_NonLinearLhsAutomaton): don't take matchAtTop (must be true) or collapsePossible (must be false) * ACU_NonLinearLhsAutomaton.hh (class ACU_NonLinearLhsAutomaton): deleted data members topSymbol and matched; added data member pureSort (class ACU_NonLinearLhsAutomaton): deleted decl for treeMatch() * ACU_NonLinearLhsAutomaton.cc (match): use makeHighMultiplicityAssignment() rather than treeMatch() (match): deleted non-extension case; this will now be handled in the general greedy matcher (dump): don't dump topSymbol (match): use getSymbol rather than topSymbol (ACU_NonLinearLhsAutomaton): init pureSort; allow LIMIT_SORT (ACU_NonLinearLhsAutomaton): don't init topSymbol (treeMatch): deleted * ACU_Subproblem.cc (~ACU_Subproblem): use FOR_EACH_CONST (solveVariables): use FOR_EACH_CONST * ACU_RedBlackMatcher.cc (greedyMatch): new convention for greedyPureMatch() * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): updated decl for greedyPureMatch(); made makeHighMultiplicityAssignment() protected * ACU_RedBlackMatcher.cc (greedyPureMatch): return bool now that we no longer try to make a distiction between true failure and UNDECIDED * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): updated decls for decidePhase1FailureMode() and decidePhase2FailureMode() * ACU_GreedyMatcher.cc (decidePhase1FailureMode): rewritten (greedyPureMatch): use new decidePhase1FailureMode() convention (decidePhase2FailureMode): simplified to avoid nasty bug where a unit variable could be given a lower sort subject when it actually needs a higher sort subject in order for the match to succeed and we could end up returning false when a match is really possible (greedyPureMatch): use new decidePhase2FailureMode() convention 2003-03-19 Steven Eker * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): added decls for decidePhase1FailureMode() and decidePhase2FailureMode() * ACU_GreedyMatcher.cc (decidePhase1FailureMode): added (decidePhase2FailureMode): added (greedyPureMatch): use decidePhase1FailureMode() and decidePhase2FailureMode() * ACU_Matcher.cc (match): don't pass returnUndecidedOnFail arg to greedyPureMatch() * ACU_GreedyMatcher.cc (greedyMatch): don't pass returnUndecidedOnFail arg to greedyPureMatch() * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): updated decl for greedyPureMatch() * ACU_GreedyMatcher.cc (greedyPureMatch): don't take returnUndecidedOnFail since greedyMatch() already checks for true and wasted effort is slight and rare * ACU_Matcher.cc (eliminateGroundAliens): use FOR_EACH_CONST (eliminateGroundedOutAliens): use FOR_EACH_CONST (eliminateGroundedOutAliens): rewritten to be almost symmetric with red-black version (computeTotalMultiplicity): use FOR_EACH_CONST (copyMultiplicity): use FOR_EACH_CONST (fullMatch): use FOR_EACH_CONST (handleElementVariables): use FOR_EACH_CONST * ACU_GreedyMatcher.cc (greedyMatch): rewritten to be mostly symmetric with red-black version * ACU_LhsAutomaton.cc (dump): dump redBlackOK and collectorSeen * ACU_LhsCompiler3.cc (compileGreedyAndFullCases): new complete() convention * ACU_LhsCompiler2.cc (compileAliensOnlyCase): new complete() convention * ACU_LhsCompiler1.cc (compileLhs3): new complete() convention * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): updated decl for complete() * ACU_LhsAutomaton.cc (ACU_LhsAutomaton): init collectorSeen (addTopVariable): update collectorSeen (complete): new redBlackOK calculation * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): updated decl for addTopVariable() (class ACU_LhsAutomaton): added data member collectorSeen * ACU_LhsCompiler1.cc (compileLhs3): use new addTopVariable() convention * ACU_LhsAutomaton.cc (ACU_LhsAutomaton): init redBlackOK = true (addAbstractionVariable): falsify redBlackOK (addGroundedOutAlien): falsify redBlackOK if alien unstable (addNonGroundAlien): falsify redBlackOK if alien unstable 2003-03-18 Steven Eker * ACU_LhsCompiler3.cc (compileGreedyAndFullCases): use new complete() convention * ACU_LhsCompiler2.cc (compileAliensOnlyCase): use new complete() convention * ACU_LhsCompiler1.cc (compileLhs3): use new complete() convention * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): updated decl for complete() * ACU_LhsAutomaton.cc (complete): take redBlackPossible arg; we can't rely on strategy == LONE_VARIABLE beacuse of variable abstraction * ACU_LhsCompiler1.cc (compileLhs3): use empty() rather than length() == 0 2003-03-17 Steven Eker * ACU_TreeDagNode.cc (recComputeBaseSort): fixed nasty bug where we were using getLeft() twice instead of getRight() and computing the wrong sort * ACU_LhsAutomaton.cc (ACU_LhsAutomaton): don't set redBlackOK here (complete): set redBlackOK here * ACU_RedBlackMatcher.cc (redBlackMatch): call greedyMatch() 2003-03-12 Steven Eker * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): added decl for makeHighMultiplicityAssignment() (class ACU_LhsAutomaton): added data member matched * ACU_RedBlackMatcher.cc (makeHighMultiplicityAssignment): added (tryToBindLastVariable): added high multiplicity cases 2003-03-11 Steven Eker * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): added decl for tryToBindLastVariable() * ACU_RedBlackMatcher.cc (tryToBindLastVariable): added * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): updated decls for eliminateBoundVariables(), eliminateGroundAliens(), eliminateGroundedOutAliens() and greedyMatch(); added decl for tryToBindVariable() (class ACU_LhsAutomaton): updated decl for greedyPureMatch() * ACU_RedBlackMatcher.cc (eliminateBoundVariables): update matchedMultiplicity (eliminateGroundAliens): update matchedMultiplicity (greedyMatch): update matchedMultiplicity (tryToBindVariable): added * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): added decls for red-black versions of greedyPureMatch() and greedyMatch(); updated decl for eliminateBoundVariables() * ACU_RedBlackMatcher.cc (greedyMatch): added red-black version (eliminateBoundVariables): keep track of number of unbound variables rather than making a linked list of them. (eliminateBoundVariables): use iterators (eliminateBoundVariables): use FOR_EACH_CONST() macro (eliminateGroundAliens): use FOR_EACH_CONST() macro (eliminateGroundedOutAliens): use FOR_EACH_CONST() macro (greedyPureMatch): added red-black version 2003-03-10 Steven Eker * ACU_Matcher.cc (eliminateGroundAliens): use iterators (eliminateGroundedOutAliens): use iterators (eliminateGroundedOutAliens): rearrange tests; now only look at multiplicity after we have a match; if current multiplicity is too small we can rewturn false since ground out alien must match a unique subject subterm * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): added decls for red-black versions of eliminateBoundVariables(), eliminateGroundAliens() and eliminateGroundedOutAliens() * ACU_RedBlackMatcher.cc (eliminateBoundVariables): added red-black version (eliminateGroundAliens): added red-black version (eliminateGroundedOutAliens): added red-black version * ACU_LhsAutomaton.cc (ACU_LhsAutomaton): initialize redBlackOK * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): added decl for redBlackMatch() * ACU_RedBlackMatcher.cc (redBlackMatch): added stub * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): added data member redBlackOK * ACU_Matcher.cc (match): use redBlackOK and redBlackMatch() 2003-03-07 Steven Eker * ACU_NGA_LhsAutomaton.hh (class ACU_NGA_LhsAutomaton): delete data memeber trueFailure * ACU_NGA_LhsAutomaton.cc (ACU_NGA_LhsAutomaton): added Assert()s to check to stripper term is non-ground and stable (match): do full match if collect() fails; this fixes a nasty bug where we tried to continue but collect() has destroyed the iterator (ACU_NGA_LhsAutomaton): don't initialize trueFailure * ACU_VarLhsAutomaton.cc (ACU_VarLhsAutomaton): allow trueFailure if stripper variable has pure sort * ACU_LhsCompiler0.cc (tryToMakeCollectorLhsAutomaton): no longer require stripper variable to have unit or pure sort * ACU_VarLhsAutomaton.cc (match): do full match if collect() fails; this fixes a nasty bug where we tried to continue but collect() has destroyed the iterator (ACU_VarLhsAutomaton): changed definition of trueFailure to take account of the fact that failures due to collect() never test trueFailure (ACU_VarLhsAutomaton): added Assert() to check that stripper variable can't take identity * ACU_LhsCompiler0.cc (tryToMakeCollectorLhsAutomaton): chnage requirement on collect variable to have unbounded sort rather than pure or limit sort. The is a wweaker condition that is now allowed because we gave up on the fast sort computation trick. * ACU_GndLhsAutomaton.cc (ACU_GndLhsAutomaton): added Assert() to check that stripper term is ground * ACU_CollectorLhsAutomaton.cc (ACU_CollectorLhsAutomaton): added Assert() to check that collector has unbounded sort * ACU_NGA_LhsAutomaton.hh (class ACU_NGA_LhsAutomaton): deleted data member local * ACU_NGA_LhsAutomaton.cc (match): use getLocal() (ACU_NGA_LhsAutomaton): don't initialize local * ACU_LhsAutomaton.hh (getLocal): added (getLocal2): added * ACU_NGA_LhsAutomaton.hh (class ACU_NGA_LhsAutomaton): deleted data members topSymbol and collapsePossible; added data member trueFailure * ACU_NGA_LhsAutomaton.cc (match): use getSymbol() (match): use getCollapsePossible() (dump): don't dump topSymbol or collapsePossible (ACU_NGA_LhsAutomaton): don't initialize topSymbol or collapsePossible; initialize trueFailure (match): reorganized search loops using trueFailure 2003-03-06 Steven Eker * ACU_NGA_LhsAutomaton.cc (match): use new collapse() convention * ACU_GndLhsAutomaton.cc (ACU_GndLhsAutomaton): initialize trueFailure (match): use trueFailure (dump): dump trueFailure * ACU_GndLhsAutomaton.hh (class ACU_GndLhsAutomaton): added data member trueFailure * ACU_VarLhsAutomaton.cc (match): rewrote argVec case (dump): dump trueFailure * ACU_VarLhsAutomaton.hh (class ACU_VarLhsAutomaton): added data member trueFailure * ACU_VarLhsAutomaton.cc (ACU_VarLhsAutomaton): don't initialize topSymbol or collapsePossible (dump): don't dump topSymbol or collapsePossible (match): use use getSymbol() and getCollapsePossible(); use new collapse() convention (match): fixed bug where we were returing false even though assigning multiple things to stripper, or putting stuff in extension or applying a membership might have produced a match. (ACU_VarLhsAutomaton): initialize trueFailure * ACU_VarLhsAutomaton.hh (class ACU_VarLhsAutomaton): deleted data members topSymbol and collapsePossible * ACU_GndLhsAutomaton.cc (match): use new collapse() convention * ACU_CollectorLhsAutomaton.hh (collapse): use getSymbol() (class ACU_CollectorLhsAutomaton): updated decl for collapse() * ACU_GndLhsAutomaton.cc (ACU_GndLhsAutomaton): don't initialize topSymbol or collapsePossible (dump): don't dump topSymbol or collapsePossible (match): fixed bug where we assumed red-black collect failing implied no match, where as some of teh suff might have been put in the extension (match): use getSymbol() (two places) and getCollapsePossible() * ACU_GndLhsAutomaton.hh (class ACU_GndLhsAutomaton): deleted data members topSymbol and collapsePossible * ACU_LhsAutomaton.hh (getSymbol): added (getCollapsePossible): added * ACU_CollectorLhsAutomaton.cc (collect): major simplification; we no longer try to do sort check as we build, instead we use argVecComputeBaseSort() afterwards; this can lose in the case that we are not in an error free component (argVecComputeBaseSort() has to look at each arg) and we are not reduced (didn't need to have th exact base sort); but it simplifies things greatly (ACU_CollectorLhsAutomaton): swich of sort checks for kind variables 2003-03-05 Steven Eker * ACU_Symbol.cc (computeBaseSort): complete rewrite using argVecComputeBaseSort(); this fixes a nasty bug where we assumed that ACU_DagNodes with getNormalizationStatus() == ASSIGNMENT could not be in the error sort - no longer true since we allowed variables at the kind level * ACU_DagNode.cc (argVecComputeBaseSort): unroll first iteration of standand case loop to move initial case branch out of loop * ACU_DagNode.hh (class ACU_DagNode): added decl for argVecComputeBaseSort() * ACU_DagNode.cc (argVecComputeBaseSort): added * ACU_TreeDagNode.hh (class ACU_TreeDagNode): deleted decl for makeDelete(); updated decl for treeComputeBaseSort() * ACU_Symbol.cc (computeBaseSort): use new treeComputeBaseSort() convention * ACU_TreeDagNode.cc (treeComputeBaseSort): return index of computed sort rather than calling setSortIndex() (makeDelete): deleted * ACU_CollectorLhsAutomaton.cc (collect): (tree version) use treeComputeBaseSort(); don't use makeDelete(); use setSortIndex(); don't use repudiateSortInfo() * ACU_Symbol.cc (computeBaseSort): use treeComputeBaseSort() * ACU_TreeDagNode.hh (class ACU_TreeDagNode): updated decls for recComputeBaseSort() and treeComputeBaseSort() * ACU_TreeDagNode.cc (computeBaseSort): computeMultBaseSort() -> computeMultSortIndex(); computeBaseSort() -> computeSortIndex() (2 places) (computeBaseSort): becomes recComputeBaseSort() (computeBaseSort): treeComputeBaseSort() * ACU_NonLinearLhsAutomaton.cc (treeMatch): computeMultBaseSort() -> computeMultSortIndex() (2 places) * ACU_Symbol.hh (computeBaseSort): renamed to computeSortIndex() to avoid confusion (computeMultBaseSort): renamed to computeMultSortIndex() for the sake on consistancy * ACU_TreeDagNode.cc (computeBaseSort): use new computeMultBaseSort() calling convention * ACU_NonLinearLhsAutomaton.cc (treeMatch): use new computeMultBaseSort() calling convention (2 places) * ACU_Symbol.hh (computeMultBaseSort): rewritten (class ACU_Symbol): updated decl for computeMultBaseSort() 2003-03-04 Steven Eker * ACU_Term.hh (class ACU_Term): updated decl for tryToMakeAlienAlienLhsAutomaton() * ACU_LhsCompiler0.cc (compileLhs2): use new alien-alien automata convention (tryToMakeAlienAlienLhsAutomaton): use new ACU_AlienAlienLhsAutomaton() convention * ACU_AlienAlienLhsAutomaton.cc (ACU_AlienAlienLhsAutomaton): call ACU_LhsAutomaton() (match): call ACU_LhsAutomation::match() instead of fullMatch() (dump): call ACU_LhsAutomaton::dump() rather than HeuristicLhsAutomaton::dump() * ACU_AlienAlienLhsAutomaton.hh: derive from ACU_LhsAutomaton rather than HeuristicLhsAutomaton; updated decl for ctor * ACU_CollectorLhsAutomaton.cc (dump): call ACU_LhsAutomaton::dump() rather than HeuristicLhsAutomaton::dump() * ACU_LhsCompiler0.cc (tryToMakeCollectorLhsAutomaton): use new ACU_GndLhsAutomaton() convention (tryToMakeCollectorLhsAutomaton): use new ACU_VarLhsAutomaton() convention (tryToMakeCollectorLhsAutomaton): use new ACU_NGA_LhsAutomaton() convention (compileLhs2): use new compilation conventions for collector automata * ACU_NGA_LhsAutomaton.cc (ACU_NGA_LhsAutomaton): use new ACU_CollectorLhsAutomaton() convention (match): call ACU_LhsAutomation::match() instead of fullMatch() (3 places) * ACU_NGA_LhsAutomaton.hh (class ACU_NGA_LhsAutomaton): updated decl for ctor * ACU_VarLhsAutomaton.cc (ACU_VarLhsAutomaton): use new ACU_CollectorLhsAutomaton() convention (match): call ACU_LhsAutomation::match() instead of fullMatch() (2 places) * ACU_VarLhsAutomaton.hh (class ACU_VarLhsAutomaton): updated decl for ctor * ACU_GndLhsAutomaton.cc (ACU_GndLhsAutomaton): use new ACU_CollectorLhsAutomaton() convention (match): call ACU_LhsAutomation::match() instead of fullMatch() * ACU_GndLhsAutomaton.hh (class ACU_GndLhsAutomaton): updated decl for ctor * ACU_CollectorLhsAutomaton.cc (ACU_CollectorLhsAutomaton): call ACU_LhsAutomaton() * ACU_CollectorLhsAutomaton.hh (class ACU_CollectorLhsAutomaton): derive from ACU_LhsAutomaton rather than HeuristicLhsAutomaton; updated decl for ctor 2003-03-03 Steven Eker * ACU_LhsCompiler0.cc (compileLhs2): use new ACU_NonLinearLhsAutomaton convention (tryToMakeNonLinearLhsAutomaton): use new ACU_NonLinearLhsAutomaton convention * ACU_NonLinearLhsAutomaton.cc (ACU_NonLinearLhsAutomaton): call ACU_LhsAutomaton() (treeMatch): call ACU_LhsAutomaton::match() instead of fullMatch() (match): call ACU_LhsAutomaton::match() instead of fullMatch() (dump): call instead ACU_LhsAutomaton::dump() of HeuristicLhsAutomaton::dump() * ACU_NonLinearLhsAutomaton.hh (class ACU_NonLinearLhsAutomaton): derive from ACU_LhsAutomaton rather than HeuristicLhsAutomaton (class ACU_NonLinearLhsAutomaton): updated decl for ctor * ACU_LhsCompiler1.cc (compileLhs3): don't return automaton * ACU_Term.hh (class ACU_Term): updated decl for compileLhs3() * ACU_LhsCompiler1.cc (compileLhs3): take ACU_LhsAutomaton rather than creating it * ACU_LhsCompiler0.cc (compileLhs2): create ACU_LhsAutomaton; use new compileLhs3() convention * ACU_LhsCompiler1.cc (compileLhs3): use new ACU_LhsAutomaton() convention * ACU_LhsAutomaton.cc (ACU_LhsAutomaton): clear uniqueCollapseAutomaton rather than setting it * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): updated decl for ctor; added decl for addUniqueCollapseAutomaton() (addUniqueCollapseAutomaton): added 2003-02-25 Steven Eker * ACU_VarLhsAutomaton.cc: removed #pragma (match): updated Assert() * ACU_VarLhsAutomaton.hh: removed #pragma * ACU_TreeDagNode.cc (computeBaseSort): updated Assert() (treeToArgVec): updated Assert() * ACU_TreeDagArgumentIterator.cc (argument): updated Assert() (next): updated Assert() * ACU_Term.cc: removed #pragma (Term): updated Assert() (normalizeAliensAndFlatten): updated Assert() (compareArguments): updated Assert()s (both versions) (insertAbstractionVariables): updated DebugAdvisoryCheck() * ACU_Term.hh: removed #pragma * ACU_Symbol.cc: removed #pragma (makeDagNode): updated Assert() (computeBaseSort): updated Assert()s (normalizeAndComputeTrueSort): updated Assert() * ACU_Symbol.hh: removed #pragma * ACU_Subproblem.cc: removed #pragma * ACU_Subproblem.hh: removed #pragma * ACU_RhsAutomaton.cc: removed #pragma (buildArguments): updated Assert()s * ACU_RhsAutomaton.hh: removed #pragma * ACU_NonLinearLhsAutomaton.cc: removed #pragma (ACU_NonLinearLhsAutomaton): updated Assert() (fillOutExtensionInfo): updated Assert() (treeMatch): updated Assert()s (match): updated Assert()s * ACU_NonLinearLhsAutomaton.hh: removed #pragma * ACU_NGA_LhsAutomaton.cc: removed #pragma (match): updated Assert() * ACU_NGA_LhsAutomaton.hh: removed #pragma * ACU_MergeSort.cc (mergeSortAndUniquize): updated Assert() * ACU_Matcher.cc (eliminateGroundedOutAliens): updated Assert() (forcedLoneVariableCase): updated Assert()s (match): updated Assert()s * ACU_LhsCompiler3.cc (findGreedySequence): updated Assert() * ACU_LhsCompiler2.cc (compileAliensOnlyCase): updated Assert()s (findConstraintPropagationSequence): updated Assert() * ACU_LhsCompiler1.cc (compileLhs3): updated Assert() * ACU_LhsAutomaton.cc: removed #pragma (complete): updated Assert() * ACU_LhsAutomaton.hh: removed #pragma * ACU_GreedyMatcher.cc (greedyPureMatch): updated Assert()s * ACU_GndLhsAutomaton.cc: removed #pragma (match): updated Assert() * ACU_GndLhsAutomaton.hh: removed #pragma * ACU_ExtensionInfo.cc (buildMatchedPortion): updated Assert()s (convertToUnmatched): updated Assert()s * ACU_ExtensionInfo.hh (useUnmatched): updated Assert() * ACU_DagOperations.cc (findFirstOccurrence): updated Assert() (findFirstPotentialMatch): updated Assert() (binarySearch): updated Assert() (both versions) * ACU_DagNormalization.cc (extensionNormalizeAtTop): updated Assert() * ACU_DagNode.cc: removed #pragma (compareArguments): updated Assert()s (markArguments): updated Assert() (copyWithReplacement): updated Assert() (partialReplace): updated Assert()s (partialConstruct): updated Assert() * ACU_DagNode.hh: removed #pragma * ACU_DagArgumentIterator.cc: removed #pragma (argument): updated Assert() (next): updated Assert() * ACU_DagArgumentIterator.hh: removed #pragma * ACU_CollectorLhsAutomaton.cc: removed #pragma (collect): updated Assert()s * ACU_CollectorLhsAutomaton.hh: removed #pragma * ACU_CollapseMatcher.cc (uniqueCollapseMatch): updated Assert()s (multiwayCollapseMatch): updated Assert()s * ACU_ArgumentIterator.cc: removed #pragma (argument): updated Assert() (next): updated Assert() * ACU_ArgumentIterator.hh: removed #pragma * ACU_AlienAlienLhsAutomaton.cc: removed #pragma * ACU_AlienAlienLhsAutomaton.hh: removed #pragma ===================================Maude79=========================================== 2003-02-20 Steven Eker * ACU_Flatten.cc (flattenSortAndUniquize): use fastCopy(); handle ACU_TreeDagNode* case; don't bother trying to combine flattened in argument list with current run (flattenSortAndUniquize): can't use fastCopy() after all - need to multiply by multiplicity (flattenSortAndUniquize): removed optimize involving d+1 as it fails due to strict iterator checking * ACU_DagNormalization.cc (copyAndBinaryInsert): don't treat nrSourceArgs > 1 as a special case (extensionNormalizeAtTop): fixed longstanding performance bug where we were copying an argArray rather than taking its reference (extensionNormalizeAtTop): handle ACU_TreeDagNode* case 2003-02-13 Steven Eker * ACU_Convert.cc (makeTree): don't use fast version of ACU_RedBlackNode() since we don't have the maxMult value to hand 2003-02-12 Steven Eker * ACU_Flatten.cc (flattenSortAndUniquize): moved here * ACU_MergeSort.cc (mergeSortAndUniquize): moved here (sortAndUniquize): moved here * ACU_Convert.cc (makeTree): added optional code for checking red-black property * ACU_ExtensionInfo.cc (convertToUnmatched): reimplemented to handle unmatched dag root case 2003-02-11 Steven Eker * ACU_ExtensionInfo.cc (copy): reimplemented to handle unmatched dag root case (makeClone): reimplemented to handle unmatched dag root case (buildMatchedPortion): reimplemented to handle ACU_TreeDagNode case * ACU_DagNode.hh (class ACU_DagNode): deleted decl for makeExtensionInfo() * ACU_DagNode.cc (makeExtensionInfo): deleted * ACU_TreeDagNode.hh (class ACU_TreeDagNode): deleted decl for makeExtensionInfo() * ACU_TreeDagNode.cc (makeExtensionInfo): deleted * ACU_BaseDagNode.hh (class ACU_BaseDagNode): added decl for makeExtensionInfo() * ACU_BaseDagNode.cc (makeExtensionInfo): added * ACU_TreeDagNode.cc (partialConstruct): reimplemented without using treeToArgVec() * ACU_TreeDagNode.hh (class ACU_TreeDagNode): deleted decls for argVecToTree(), overwriteWithInsert() and makeTree() * ACU_TreeDagNode.cc (argVecToTree): deleted (pow2min1): deleted (makeTree): deleted (overwriteWithInsert): deleted * ACU_NewNormalize.cc: deleted * ACU_Normalize.cc (insertAlien): use makeTree() in place of argVecToTree() (2 places) (insertAlien): use consInsert() in place of overwriteWithInsert() (normalizeAtTop): use makeTree() in place of argVecToTree() (normalizeAtTop): removed alternative merge case code * ACU_DagNode.hh (class ACU_DagNode): added decl for makeTree() (both versions) and pow2min1() * ACU_Convert.cc: created * ACU_Normalize.cc (insertAlien): use CONVERT_THRESHOLD (insertAlien): fixed bug in alterate code when we fall below the threshold * ACU_DagNode.hh (class ACU_DagNode): added MERGE_THRESHOLD to enum Sizes; THRESHOLD -> CONVERT_THRESHOLD * ACU_Normalize.cc (normalizeAtTop): use MERGE_THRESHOLD 2003-02-10 Steven Eker * ACU_Normalize.cc (normalizeAtTop): don't convert back to re-black ofer merging two red-black trees * ACU_NonLinearLhsAutomaton.cc (treeMatch): setNormalizationStatus(ACU_DagNode::ASSIGNMENT) now that we are extract hi mult arguments in order 2003-02-07 Steven Eker * ACU_DagNode.hh (class ACU_DagNode): added ctor decl for Pair (Pair): added (Pair): added default ctor * ACU_NonLinearLhsAutomaton.hh (class ACU_NonLinearLhsAutomaton): added data member matched * ACU_NonLinearLhsAutomaton.cc (treeMatch): rewritten (match): use treeMatch() 2003-02-06 Steven Eker * ACU_NonLinearLhsAutomaton.hh (class ACU_NonLinearLhsAutomaton): added decl for treeMatch() * ACU_NonLinearLhsAutomaton.cc (treeMatch): added 2003-02-05 Steven Eker * ACU_TreeDagNode.cc (partialReplace): simplified using new ACU_Extension interface * ACU_NonLinearLhsAutomaton.cc (match): use new ACU_Extension interface * ACU_ExtensionInfo.hh (clearMatched): deleted (addMatched): deleted (getMatched): deleted (clear): set unmatched to 0 rather than clearing matched (reset): set unmatched to 0 rather than clearing matched (class ACU_ExtensionInfo): deleted data member matched; added data member unmatched (setUnmatched): added DagNode* version (getUnmatched): added DagNode* version (useUnmatched): use unmatched 2003-02-04 Steven Eker * ACU_Symbol.cc: (complexStrategy): use new normalizeAtTop() (2 places) (reduceArgumentsAndNormalize): use new normalizeAtTop() (eqRewrite): use new normalizeAtTop() (memoStrategy): use new normalizeAtTop() (3 places) (normalizeAndComputeTrueSort): use new normalizeAtTop() * ACU_DagNode.hh (class ACU_DagNode): added THRESHHOLD to enum Sizes * ACU_TreeDagNode.hh (class ACU_TreeDagNode): made ctor public * ACU_Normalize.cc (normalizeAtTop): reimplemented (insertAlien): added 2003-02-03 Steven Eker * ACU_Normalize.cc: created * ACU_DagNode.hh (fastCopy): moved here (fastCopy): added ACU_FastIter version (class ACU_DagNode): added decls for additional versions of fastMerge() * ACU_FastMerge.cc: created * ACU_TreeDagNode.cc (markArguments): rewritten to do a preorder traversal, ignoring marked red-black nodes (partialReplace): added replacement == matched arg heuristic 2003-01-31 Steven Eker * ACU_NewNormalize.cc (normalizeAtTop): fixed stupid brace bug in two red-black tree case * ACU_NonLinearLhsAutomaton.cc (match): fixed bug where we weren't dealing with the case that we matched everything * ACU_TreeDagNode.cc (partialReplace): fixed bug where we were not testing r->getMultiplicity() against 1 * ACU_NewNormalize.cc (normalizeAtTop): added code for two red-black trees case * ACU_Term.cc (analyseCollapses): becomes analyseCollapses2() * ACU_Term.hh (class ACU_Term): analyseCollapses() -> analyseCollapses2() * ACU_TreeDagArgumentIterator.cc: moved here * ACU_TreeDagArgumentIterator.hh: moved here * ACU_TreeDagNode.cc: moved here * ACU_TreeDagNode.hh: moved here * ACU_Theory.hh: added fwd decls for ACU_TreeDagNode and ACU_TreeDagArgumentIterator 2003-01-30 Steven Eker * ACU_CollectorLhsAutomaton.cc (collect): ACU_SlowIter -> ACU_Stack * ACU_CollectorLhsAutomaton.hh (class ACU_CollectorLhsAutomaton): ACU_SlowIter -> ACU_Stack * ACU_NGA_LhsAutomaton.cc (match): use ACU_RedBlackNode::findFirstPotentialMatch rather than ACU_TreeDagNode::findFirstPotentialMatch 2003-01-29 Steven Eker * ACU_VarLhsAutomaton.cc (match): getArgument() -> getDagNode() * ACU_Term.cc (compareArguments): getArgument() -> getDagNode() * ACU_NonLinearLhsAutomaton.cc (match): getArgument() -> getDagNode() * ACU_NGA_LhsAutomaton.cc (match): getArgument() -> getDagNode() (2 places) * ACU_DagNode.cc (compareArguments): getArgument() -> getDagNode() 2003-01-28 Steven Eker * ACU_ExtensionInfo.hh (class ACU_ExtensionInfo): added decl for convertToUnmatched() * ACU_ExtensionInfo.cc (convertToUnmatched): added * ACU_ExtensionInfo.hh (useUnmatched): added * ACU_NewNormalize.cc (normalizeAtTop): use isTree() (2 places) * ACU_DagNode.cc (getACU_DagNode): use isTree() * ACU_NonLinearLhsAutomaton.cc (match): added red-black case 2003-01-27 Steven Eker * ACU_VarLhsAutomaton.cc (match): added red-black case * ACU_GndLhsAutomaton.cc (match): added red-black case * ACU_NGA_LhsAutomaton.cc (match): fixed if nesting bug; it hadn't bitten because collect() seldom return false; * ACU_Symbol.cc (eqRewrite): use isTree() * ACU_NGA_LhsAutomaton.cc (match): use isTree() * ACU_ExtensionInfo.hh (clear): use getSize() (reset): use getSize() (clearMatched): added * ACU_BaseDagNode.cc: created * ACU_ExtensionInfo.hh (ACU_ExtensionInfo): take ACU_BaseDagNode* (class ACU_ExtensionInfo): added struct Matched and data member matched 2003-01-23 Steven Eker * ACU_DagNode.cc (compareArguments): rewritten to use left to right comparison and handle ACU_TreeDagNodes * ACU_Term.cc (compareArguments): (DagNode* version) rewritten to use left to right comparison and handle ACU_TreeDagNodes (compareArguments): (Term*) rewritten to use iterators and left to right comparison 2003-01-22 Steven Eker * ACU_BaseDagNode.hh (isTree): added 2003-01-14 Steven Eker * ACU_Symbol.cc (eqRewrite): fixed casting bug in tree case 2003-01-13 Steven Eker * ACU_Symbol.hh (computeBaseSort): added (computeMultBaseSort): added * ACU_ExtensionInfo.hh (ACU_ExtensionInfo): added ACU_TreeDagNode* version * ACU_Symbol.cc (eqRewrite): handle TREE case * ACU_CollectorLhsAutomaton.cc (collect): added ACU_TreeDagNode* version 2003-01-12 Steven Eker * ACU_NGA_LhsAutomaton.cc (match): added support for ACU_TreeDagNodes * ACU_CollectorLhsAutomaton.hh (class ACU_CollectorLhsAutomaton): added decl for ACU_TreeDagNode* version of collect 2003-01-10 Steven Eker * ACU_Symbol.cc (eqRewrite): rewritten to use new normalizeAtTop() * ACU_DagNode.hh (class ACU_DagNode): added decl for new version of normalizeAtTop() * ACU_NewNormalize.cc: created * ACU_DagNode.cc (getACU_DagNode): made into a global function * ACU_DagNode.hh (class ACU_DagNode): made getACU_DagNode() a friend function rather than a static member function * ACU_VarLhsAutomaton.cc (match): used getACU_DagNode() * ACU_Term.cc (compareArguments): used getACU_DagNode() + const_cast() * ACU_Subproblem.cc (solveVariables): used getACU_DagNode() * ACU_NonLinearLhsAutomaton.cc (match): used getACU_DagNode() * ACU_NGA_LhsAutomaton.cc (match): used getACU_DagNode() * ACU_Matcher.cc (match): used getACU_DagNode() * ACU_GndLhsAutomaton.cc (match): used getACU_DagNode() * ACU_AlienAlienLhsAutomaton.cc (match): used getACU_DagNode() * ACU_Term.hh (symbol): replaced static_cast() with safeCast() * ACU_Symbol.cc (ruleRewrite): used getACU_DagNode() (reduceArgumentsAndNormalize): used getACU_DagNode() (eqRewrite): used getACU_DagNode() (complexStrategy): used getACU_DagNode() (memoStrategy): used getACU_DagNode() (computeBaseSort): used getACU_DagNode() (normalizeAndComputeTrueSort): used getACU_DagNode() (stackArguments): used getACU_DagNode() * ACU_DagNormalization.cc (flattenSortAndUniquize): used getACU_DagNode() (normalizeAtTop): used getACU_DagNode() in many places (extensionNormalizeAtTop): used getACU_DagNode() * ACU_DagOperations.cc (eliminateSubject): use getACU_DagNode() rather than static_cast * ACU_DagNode.cc (compareArguments): handle TREE case * ACU_DagNode.hh (class ACU_DagNode): added decl for getACU_DagNode() * ACU_DagNode.cc (getACU_DagNode): added 2003-01-08 Steven Eker * ACU_Symbol.cc (eqRewrite): added crude hack to see if we can convert to re-black form and back * ACU_DagNode.hh (class ACU_DagNode): made ACU_TreeDagNode a friend * ACU_Theory.hh: added ACU_BaseDagNode; * ACU_DagNode.cc (~ACU_DagNode): deleted * ACU_DagNode.hh (class ACU_DagNode): rewritten, deriving from ACU_BaseDagNode * ACU_BaseDagNode.hh: created 2003-01-07 Steven Eker * ACU_LhsCompiler0.cc (tryToMakeCollectorLhsAutomaton): use new ACU_NGA_LhsAutomaton() convention * ACU_NGA_LhsAutomaton.cc (ACU_NGA_LhsAutomaton): replaced stripperTopSymbol with stripperTerm (match): rewritten using stripperTerm (dump): sump stripperTerm * ACU_NGA_LhsAutomaton.hh (class ACU_NGA_LhsAutomaton): replaced stripperTopSymbol with stripperTerm (class ACU_NGA_LhsAutomaton): updated decl for ACU_NGA_LhsAutomaton() * ACU_GreedyMatcher.cc (greedyMatch): use partialCompare() and findFirstPotentialMatch() * ACU_Matcher.cc (eliminateGroundedOutAliens): use partialCompare() and findFirstPotentialMatch() (aliensOnlyMatch): use partialCompare() and findFirstPotentialMatch() (buildBipartiteGraph): use partialCompare() and findFirstPotentialMatch() * ACU_LhsAutomaton.cc (addGroundedOutAlien): assign to term rather than topSymbol (addNonGroundAlien): assign to term rather than topSymbol * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): term replaces topSymbol in struct NonGroundAlien * ACU_DagOperations.cc (findFirstPotentialMatch): added ===================================Maude78================================================== 2003-01-02 Steven Eker * ACU_Term.hh (class ACU_Term): updated decl for tryToMakeCollectorLhsAutomaton() * ACU_LhsCompiler0.cc (compileLhs2): use new tryToMakeCollectorLhsAutomaton() calling convention (tryToMakeCollectorLhsAutomaton): Allow collector variable to occur in context and/or condition as long as stripper is a ground term and we have no extension. This is ok because the ground term must strip exactly one occurence of itself from subject with the rest of the subject providing a unique binding for the collector 2002-12-20 Steven Eker * ACU_CollectorLhsAutomaton.cc (collect): optimized no sort check case (collect): optimized sort check case 2002-12-19 Steven Eker * ACU_DagOperations.cc (binarySearch): (Term* version): use setOnLs(), setOnGeq() 2002-12-17 Steven Eker * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): added decl for handleElementVariables() * ACU_Matcher.cc (handleElementVariables): added (fullMatch): use handleElementVariables() (buildBipartiteGraph): don't handle element variables here * ACU_DagNormalization.cc (copyAndBinaryInsert): rewritten using resizeWithoutPreservation() (fastMerge): rewritten using resizeWithoutPreservation() 2002-12-16 Steven Eker * ACU_DagNormalization.cc (copyAndBinaryInsert): use fastCopy() in place of STL copy() (3 places) (fastMerge): use use fastCopy() in place of STL copy() (2 places) * ACU_DagNode.hh (class ACU_DagNode): added decl for fastCopy() * ACU_DagNormalization.cc (fastCopy): added * ACU_DagNode.cc (markArguments): rewritten to avoid seperate iteration count 2002-11-22 Steven Eker * ACU_Subproblem.hh (class ACU_Subproblem): added decl for noVariableCase(); updated decl for oneVariableCase() * ACU_Subproblem.cc (noVariableCase): added (oneVariableCase): generalized to handle the case where there may be multiple varibales but only one is unbound (extractDiophantineSystem): rewritten to handle a number of special cases efficiently * ACU_Matcher.cc (buildBipartiteGraph): use new addEdge() calling convention (buildBipartiteGraph): use new addEdge() calling convention * ACU_Subproblem.hh (class ACU_Subproblem): updated decl for addEdge() * ACU_Subproblem.cc (addEdge): take difference rather than global and local bindings 2002-11-21 Steven Eker * ACU_Matcher.cc (buildBipartiteGraph): fixed bug we introduced by checking for matchable outside of the right scope * ACU_Subproblem.hh (class ACU_Subproblem): updated decl for addPatternNode() * ACU_Subproblem.cc (addPatternNode): return index to created pattern node * ACU_Matcher.cc (buildBipartiteGraph): treat unbound variables that take exactly one subject as non-ground aliens (fullMatch): don't treat unbound variables that take exactly one subject as top variables 2002-11-20 Steven Eker * ACU_DagNode.cc (matchVariableWithExtension): now check & use sort bound 2002-11-19 Steven Eker * ACU_Subproblem.cc (oneVariableCase): partly optimized using iterators * ACU_DagNormalization.cc (copyAndBinaryInsert): rewritten using iterators and copy() algorithm template (copyAndBinaryInsert): put back missing expandBy() (fastMerge):rewritten using iterators and copy() algorithm template * ACU_NonLinearLhsAutomaton.hh (class ACU_NonLinearLhsAutomaton): updated decl for fillOutExtensionInfo() * ACU_NonLinearLhsAutomaton.cc (match): rewritten using iterators to replace CONST_ARG_VEC_HACK() (fillOutExtensionInfo): pass chosen as a const ArgVec::const_iterator (match): new fillOutExtensionInfo() calling convention 2002-11-18 Steven Eker * ACU_DagOperations.cc (findFirstOccurrence): replaced CONST_ARG_VEC_HACK() with const_iterator (binarySearch): (both versions) replaced CONST_ARG_VEC_HACK() with const_iterator * ACU_Matcher.cc (multiplicityChecks): rewritten using const_iterator in place of CONST_ARG_VEC_HACK() * ACU_NonLinearLhsAutomaton.cc (fillOutExtensionInfo): rewritten using const_iterator in place of CONST_ARG_VEC_HACK() * ACU_DagNode.cc (compareArguments): need to iterate backwards for consistancy * ACU_RhsAutomaton.cc (buildArguments): rewritten using iterator in place of ARG_VEC_HACK() * ACU_DagNode.cc (compareArguments): rewritten using iterators in place of CONST_ARG_VEC_HACK()s (partialReplace): rewritten using CONST_ARG_VEC_HACK()/ARG_VEC_HACK() * ACU_CollectorLhsAutomaton.cc (collect): rewritten using itterators in place of CONST_ARG_VEC_HACK()/ARG_VEC_HACK() ===================================Maude77================================================== 2002-11-07 Steven Eker * ACU_Subproblem.cc (solveVariables): DagNode::okToCollectGarbage() -> MemoryCell::okToCollectGarbage() 2002-11-06 Steven Eker * ACU_Subproblem.cc (oneVariableCase): try using set() rather than Pair(); on sparc this saves 1 ld instruction in loop - wins under quantify but loses in actual run - must be a sparc scheduling problem * ACU_DagNode.hh (Pair): deleted as it loses (set): added * ACU_Subproblem.cc (oneVariableCase): use ACU_DagNode::Pair() to see if enables g++ to generate better code * ACU_DagNode.hh (Pair): added * ACU_Subproblem.hh (class ACU_Subproblem): added decl for oneVariableCase() and updated decl for extractDiophantineSystem() * ACU_Subproblem.cc (oneVariableCase): added (extractDiophantineSystem): use oneVariableCase(); take RewritingContext& since we need to pass it to oneVariableCase() 2002-11-05 Steven Eker * ACU_Subproblem.cc (extractDiophantineSystem): deleted excessively cute trivial case code; if we have no subjects but can succeed by binding unbound variables to the identity, do the binding here rather than in solveVariables() (solveVariables): don't do identity binding in null system case; code reorganized to share unbinding loop (extractDiophantineSystem): use clear() * ACU_Matcher.cc (multiplicityChecks): replaced VECTOR_HACK() with Vector::iterator * ACU_RhsAutomaton.cc (buildArguments): replaced CONST_VECTOR_HACK() with Vector::const_iterator 2002-10-28 Steven Eker * ACU_LhsCompiler0.cc (compileLhs2): added DebugAdvisory() for when we fail to produce heuristic ACU automaton 2002-10-16 Steven Eker * ACU_Symbol.hh (class ACU_Symbol): postInterSymbolPass() -> postOpDeclarationPass() * ACU_Symbol.cc (postInterSymbolPass): becomes postOpDeclarationPass() since sort tables arem't computed at postInterSymbolPass time 2002-10-07 Steven Eker * ACU_DagNode.cc (copyWithReplacement): complex version: rewritten to fix a serious bug where we were relying on unstackable flags to figure out when args had been stacked and needed replacement. Since unstackable flags can be set after stacking this approach fails badly, corrupting the dag node 2002-10-04 Steven Eker * ACU_DagNode.hh (class ACU_DagNode): updated decl for the more complex copyWithReplacement() * ACU_DagNode.cc (copyWithReplacement): rewritten to handle situation where only some args are stacked. * ACU_Symbol.cc (stackArguments): we no longer stack all arguments; if we have frozen arguments we don't stack anything; otherwise we stack only those arguments that have not been flagged as unstackable 2002-10-03 Steven Eker * ACU_DagNode.hh (class ACU_DagNode): updated decl for stackArguments() * ACU_DagNode.cc (stackArguments): handle respectFrozen argument ===================================Maude76================================================== 2002-08-02 Steven Eker * ACU_Term.cc (compileRhs2): added code to flag last use of each source 2002-07-24 Steven Eker * ACU_LhsCompiler3.cc (findLongestIncreasingSequence): same as below * ACU_LhsCompiler0.cc (tryToMakeAlienAlienLhsAutomaton): pass sameVariableSet = true to calls of subsumes() since both subterms are from the same pattern ===================================Maude74================================================== 2002-05-13 Steven Eker * ACU_Symbol.hh (class ACU_Symbol): added decl for multiplicities version of makeDagNode() * ACU_Symbol.cc (makeDagNode): added multiplicities version; this is so that derived symbol classes can build new AC_DagNodes from old ones with reasonable efficiency 2002-05-10 Steven Eker * ACU_Symbol.hh (class ACU_Symbol): added decl for reduceArgumentsAndNormalize() (class ACU_Symbol): added defaults for strategy and memo args * ACU_Symbol.cc (reduceArgumentsAndNormalize): added; this is a special purpose function the all ACU builtin symbols to get an ACU dag in normal form ===================================Maude72================================================== 2002-03-11 Steven Eker * ACU_Term.cc: deleted explicit template instantiation * ACU_Subproblem.cc: deleted explicit template instantiation * ACU_RhsAutomaton.cc: deleted explicit template instantiation * ACU_DagNode.cc: deleted explicit template instantiation * ACU_LhsAutomaton.cc: deleted explicit template instantiations ===================================Maude71================================================== 2001-12-10 Steven Eker * ACU_DagNode.hh (class ACU_DagNode): made class ACU_DagArgumentIterator a friend * ACU_Term.hh (class ACU_Term): made class ACU_ArgumentIterator a friend ===================================Maude69================================================== 2001-04-03 Steven Eker * ACU_DagNode.hh (class ACU_DagNode): added decl for Vector version of copyWithReplacement() * ACU_DagNode.cc (copyWithReplacement): added (Vector version) ===================================Engine66================================================== 2001-03-08 Steven Eker * ACU_Symbol.hh (class ACU_Symbol): added decl for stackArguments() * ACU_Symbol.cc (stackArguments): added ===================================Engine65================================================== 2001-01-26 Steven Eker * ACU_DagNode.hh (class ACU_DagNode): updated decl for markArguments() and made it private * ACU_DagNode.cc (markArguments): rewritten with new semantics ===================================Engine64================================================== 2000-08-02 Steven Eker * ACU_DagNode.cc (matchVariableWithExtension): don't pass inErrorSort arg to ACU_Subproblem() * ACU_Subproblem.cc (ACU_Subproblem): no longer take inErrorSort arg (dump): don't dump inErrorSort data member (solveVariables): don't test inErrorSort (2 places) * ACU_Subproblem.hh (class ACU_Subproblem): ctor decl no longer has inErrorSort flag (class ACU_Subproblem): deleted data member inErrorSort * ACU_Matcher.cc (buildBipartiteGraph): don't pass inErrorSort flag to ACU_Subproblem() * ACU_LhsAutomaton.cc (ACU_LhsAutomaton): don't take inErrorSort arg (dump): don't dump inErrorSort data member * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): deleted data member inErrorSort (class ACU_LhsAutomaton): updared ctor decl * ACU_LhsCompiler1.cc (compileLhs3): no longer care if pattern is in error sort; don't pass inErrorSort flags to ACU_LhsAutomaton() * ACU_LhsCompiler0.cc (compileLhs2): no longer care if pattern is in error sort (tryToMakeNonLinearLhsAutomaton): no longer care if pattern is in error sort * ACU_Symbol.cc (complexStrategy): greatly simplified now that we no longer treat last strategy zero specially when term is in the error sort (memoStrategy): ditto * ACU_DagNode.hh (class ACU_DagNode): assumption "our sort (which may not be known) is not the error sort." for the ASSIGNMENT case is no longer true 2000-07-31 Steven Eker * ACU_Symbol.cc (computeBaseSort): don't handle union sorts ===================================Engine61================================================== 2000-07-28 Steven Eker * ACU_RhsAutomaton.cc (remapIndices): added * ACU_RhsAutomaton.hh (class ACU_RhsAutomaton): added decl for remapIndices() 2000-07-26 Steven Eker * ACU_LhsCompiler1.cc (compileLhs3): use getNrProtectedVariables() instead of nrVariables() * ACU_LhsCompiler0.cc (tryToMakeAlienAlienLhsAutomaton): use getNrProtectedVariables() instead of nrVariables() (tryToMakeCollectorLhsAutomaton): use getNrProtectedVariables() instead of nrVariables() * ACU_Term.cc (insertAbstractionVariables): use makeProtectedVariable() instead of makeAbstractionVariable() (compileRhs2): use makeConstructionIndex() instead of allocateIndex() 2000-07-25 Steven Eker * ACU_Term.cc (findAvailableTerms): don't insert ground terms into availableTerms since we can't do left->right sharing on them * ACU_LhsAutomaton.cc (dump): cast Bool member before print so they don't print out as chars * ACU_RhsAutomaton.cc (construct): don't call buildAliens() (replace): don't call buildAliens() (dump): don't call RhsAutomaton::dump() * ACU_Term.hh (class ACU_Term): deleted decl for compileRhs() * ACU_Term.cc (compileRhs): deleted ===================================Engine60================================================== 2000-07-18 Steven Eker * ACU_LhsCompiler0.cc (tryToMakeNonLinearLhsAutomaton): use getConditionVariables() (tryToMakeCollectorLhsAutomaton): use getConditionVariables() * ACU_LhsCompiler1.cc (compileLhs3): use getConditionVariables() 2000-07-12 Steven Eker * ACU_Term.cc (compileRhs2): call addRhsAutomaton() 2000-07-11 Steven Eker * ACU_Term.cc (findAvailableTerms): added (compileRhs2): added * ACU_Term.hh (class ACU_Term): added declarations for findAvailableTerms() and compileRhs2() ===================================Engine59================================================== 2000-07-05 Steven Eker * ACU_LhsCompiler0.cc (compileLhs2): call to compileLhs2() becomes call to compileLhs3() * ACU_LhsCompiler1.cc (compileLhs2): becomes compileLhs3() * ACU_Term.hh (class ACU_Term): old compileLhs2() -> compileLhs3() * ACU_LhsCompiler0.cc (compileLhs): becomes compileLhs2() * ACU_Term.hh (class ACU_Term): compileLhs() -> compileLhs2() 2000-06-23 Steven Eker * ACU_Term.cc (compileRhs): modifiedIndex() -> getModifiedIndex() * ACU_VarLhsAutomaton.cc (ACU_VarLhsAutomaton): index() -> getIndex() (ACU_VarLhsAutomaton): lookupSort() -> getSort() * ACU_LhsCompiler1.cc (analyseConstraintPropagation): index() -> getIndex() (compileLhs2): index() -> getIndex() * ACU_LhsCompiler0.cc (tryToMakeCollectorLhsAutomaton): index() -> getIndex() (tryToMakeNonLinearLhsAutomaton): index() -> getIndex() (tryToMakeNonLinearLhsAutomaton): lookupSort() -> getSort() (tryToMakeCollectorLhsAutomaton): lookupSort() -> getSort() * ACU_LhsAutomaton.cc (addTopVariable): lookupSort() -> getSort() (addTopVariable): index() -> getIndex() * ACU_CollectorLhsAutomaton.cc (ACU_CollectorLhsAutomaton): index() -> getIndex() (ACU_CollectorLhsAutomaton): lookupSort() -> getSort() ===================================Engine58================================================== 2000-03-17 Steven Eker * ACU_VarLhsAutomaton.hh (class ACU_VarLhsAutomaton): use NO_COPYING() macro; ifdef'd dump() decl * ACU_Term.cc (dump): ifdef'd * ACU_Term.hh (class ACU_Term): use NO_COPYING() macro; ifdef'd dump() decl * ACU_Subproblem.cc (dump): ifdef'd * ACU_Subproblem.hh (class ACU_Subproblem): use NO_COPYING() macro; ifdef'd dump() decl * ACU_RhsAutomaton.cc (dump): ifdef'd * ACU_RhsAutomaton.hh (class ACU_RhsAutomaton): use NO_COPYING() macro; ifdef'd dump() decl * ACU_NonLinearLhsAutomaton.cc (dump): ifdef'd * ACU_NonLinearLhsAutomaton.hh (class ACU_NonLinearLhsAutomaton): use NO_COPYING() macro; ifdef'd dump() decl * ACU_NGA_LhsAutomaton.cc (dump): ifdef'd * ACU_NGA_LhsAutomaton.hh (class ACU_NGA_LhsAutomaton): use NO_COPYING() macro; ifdef'd dump() decl * ACU_LhsAutomaton.cc (dump): ifdef'd * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): use NO_COPYING() macro; ifdef'd dump() decl * ACU_GndLhsAutomaton.cc (dump): ifdef'd * ACU_GndLhsAutomaton.hh (class ACU_GndLhsAutomaton): use NO_COPYING() macro; ifdef'd dump() decl * ACU_CollectorLhsAutomaton.cc (dump): ifdef'd * ACU_CollectorLhsAutomaton.hh (class ACU_CollectorLhsAutomaton): use NO_COPYING() macro; ifdef'd dump() decl * ACU_AlienAlienLhsAutomaton.cc (dump): ifdef'd * ACU_AlienAlienLhsAutomaton.hh (class ACU_AlienAlienLhsAutomaton): use NO_COPYING() macro; ifdef'd dump() decl * ACU_Symbol.cc (complexStrategy): AdvisoryCheck() -> IssueAdvisory() (memoStrategy): AdvisoryCheck() -> IssueAdvisory() 2000-03-13 Steven Eker * ACU_NonLinearLhsAutomaton.cc (match): fixed nasty bug: if (nrArgs == 1 || args[0].multiplicity == fastMult) should be if (nrArgs == 1 && args[0].multiplicity == fastMult) ===================================Engine56================================================== 2000-01-31 Steven Eker * ACU_Subproblem.cc (solveVariables): allow collection of garbage in fail case to avoid build up of failed solutions ===================================Engine54================================================== 1999-11-03 Steven Eker * ACU_Symbol.hh (class ACU_Symbol): added decl for memoStrategy() * ACU_Symbol.cc (memoStrategy): added (complexStrategy): simplified using revised MemoTable (memoStrategy): simplified using revised MemoTable 1999-11-01 Steven Eker * ACU_Symbol.cc (eqRewrite): use standardStrategy() 1999-10-29 Steven Eker * ACU_Symbol.cc (ACU_Symbol): use new AssociativeSymbol conventions ===================================Engine53================================================== 1999-10-26 Steven Eker * ACU_LhsCompiler1.cc (analyseConstraintPropagation): VariableTerm::dynamicCast() -> dynamic_cast() (compileLhs2): VariableTerm::dynamicCast() -> dynamic_cast() * ACU_LhsCompiler0.cc (tryToMakeNonLinearLhsAutomaton): VariableTerm::dynamicCast() -> dynamic_cast() (tryToMakeCollectorLhsAutomaton): VariableTerm::dynamicCast() -> dynamic_cast() (*2) * ACU_Term.cc (compileRhs): VariableTerm::dynamicCast() -> dynamic_cast() (insertAbstractionVariables): VariableTerm::dynamicCast() -> dynamic_cast() * ACU_Symbol.cc (ACU_Symbol): added memoFlag arg * ACU_Symbol.hh (class ACU_Symbol): added memoFlag arg to ctor decl 1999-10-19 Steven Eker * ACU_DagNode.cc (getHashValue): added * ACU_DagNode.hh (class ACU_DagNode): added decl for getHashValue() ===================================Engine52================================================== 1999-08-02 Steven Eker * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): decl for topVariableCompare() replaced by decl for topVariableLt() * ACU_LhsAutomaton.cc (complete): use STL sort function (topVariableCompare): becomes topVariableLt() * ACU_Term.hh (class ACU_Term): decl for pairCompare() replaced by decl for pairLt() * ACU_Term.cc (normalize): use STL sort function (pairCompare): becomes pairLt() 1999-06-08 Steven Eker * ACU_Symbol.hh (class ACU_Symbol): added decl for complexStrategy() * ACU_Symbol.cc (complexStrategy): added, taking guts from eqRewrite() (eqRewrite): rewritten using complexStrategy() * ACU_NonLinearLhsAutomaton.cc (match): CONST_ARG_VEC_HACK (fillOutExtensionInfo): CONST_ARG_VEC_HACK (match): fastMult hack - register copy of multiplicity to avoid reloading after writes to memory * ACU_VarLhsAutomaton.cc (match): very minor optimization using temporary to hold pointer to (potentially) stripped term * ACU_DagOperations.cc (eliminateSubject): updated calling convention for binarySearch() (2 places) (eliminateArgument): updated calling convention for binarySearch() * ACU_DagNormalization.cc (copyAndBinaryInsert): updated calling convention for binarySearch() (binaryInsert): updated calling convention for binarySearch() * ACU_GndLhsAutomaton.cc (match): updated calling convention for binarySearch() * ACU_NGA_LhsAutomaton.cc (match): updated calling convention for findFirstOccurrence() * ACU_Matcher.cc (eliminateGroundedOutAliens): updated calling convention for findFirstOccurrence() (aliensOnlyMatch): updated calling convention for findFirstOccurrence() (buildBipartiteGraph): updated calling convention for findFirstOccurrence() (eliminateGroundAliens): updated calling convention for binarySearch() * ACU_GreedyMatcher.cc (greedyMatch): updated calling convention for findFirstOccurrence() * ACU_AlienAlienLhsAutomaton.cc (match): updated calling convention for findFirstOccurrence() (2 places) * ACU_DagNode.hh (class ACU_DagNode): updated decls for findFirstOccurrence() and binarySearch (both versions) * ACU_DagOperations.cc (findFirstOccurrence): made into member function; use CONST_ARG_VEC_HACK() (binarySearch): (both versions): made into member function; use CONST_ARG_VEC_HACK() 1999-06-07 Steven Eker * ACU_CollectorLhsAutomaton.cc (collect): simplified the case where there's only one unstripped arg and no new ACU_DagNode is needed (collect): loses so try another rearrangement (collect): yet another rearrangement (collect): 4th attempt (collect): 5th attempt 1999-06-03 Steven Eker * ACU_DagNormalization.cc (fastMerge): take ACU_DagNode* rather than ArgVec& for both args (normalizeAtTop): updated calling convention for fastMerge() (flattenSortAndUniquize): fixed bug that we introduced, since we were originally calling mergeSortAndUniquize() on newArray rather than argArray; now swap them before the call. * ACU_DagNode.hh (class ACU_DagNode): updated copyAndBinaryInsert() decl * ACU_DagNormalization.cc (copyAndBinaryInsert): take ACU_DagNode* rather than ArgVec& as 1st arg (normalizeAtTop): pass ACU_DagNode* rather than ArgVec to copyAndBinaryInsert() (2 places) * ACU_DagNode.hh (class ACU_DagNode): updated decl for mergeSortAndUniquize() * ACU_DagNormalization.cc (mergeSortAndUniquize): get rid of runs arg and use runsBuffer directly (sortAndUniquize): don't pass runsBuffer to mergeSortAndUniquize() (flattenSortAndUniquize): don't pass runsBuffer to mergeSortAndUniquize() (extensionNormalizeAtTop): don't pass runsBuffer to mergeSortAndUniquize() * ACU_DagNode.hh (class ACU_DagNode): updated decl for mergeSortAndUniquize(), no longer static * ACU_DagNormalization.cc (mergeSortAndUniquize): removed argArray arg; now going to be a member function (sortAndUniquize): call mergeSortAndUniquize() like a member function (flattenSortAndUniquize): call mergeSortAndUniquize() like a member function (extensionNormalizeAtTop): call mergeSortAndUniquize() like a member function 1999-06-01 Steven Eker * ACU_DagNode.hh (class ACU_DagNode): update decl for binaryInsert() * ACU_DagNormalization.cc (binaryInsert): moved here as it its only used for normalization (binaryInsert): first arg deleted; made non-static (extensionNormalizeAtTop): use new binaryInsert() calling convention * ACU_DagNode.cc (partialReplace): added ARG_VEC_HACK (partialReplace): changed for() loop into do-while loop * ACU_CollectorLhsAutomaton.cc (collect): replaced SPEED_HACK with CONST_ARG_VEC_HACK and ARG_VEC_HACK for cleaness * ACU_DagNode.cc (compareArguments): replaced SPEED_HACK with CONST_ARG_VEC_HACKs for cleaness (markArguments): replaced SPEED_HACK with CONST_ARG_VEC_HACK for cleaness (markArguments): converted for() loop into do-while since we always have at least 1 arg * ACU_Matcher.cc (multiplicityChecks): replaced SPEED_HACKs with CONST_ARG_VEC_HACK and VECTOR_HACK for cleaness * ACU_RhsAutomaton.cc (buildArguments): replaced SPEED_HACK with ARG_VEC_HACK and CONST_VECTOR_HACK for cleaness * ACU_DagNormalization.cc (fastMerge): add heursitic to try and avoid full merge (fastMerge): removed previous heursitic as it seems to lose on average * ACU_DagNode.hh (class ACU_DagNode): added decl for fastMerge() * ACU_DagNormalization.cc (fastMerge): added (normalizeAtTop): call fastMerge() * ACU_DagNode.hh (class ACU_DagNode): updated decls for binarySearch() (both versions) and copyAndBinaryInsert() * ACU_DagNormalization.cc (copyAndBinaryInsert): use ARG_VEC_HACKs * ACU_DagOperations.cc (binarySearch): (both versions) made first arg const * ACU_DagNormalization.cc (normalizeAtTop): fix bug where we were using copyAndBinaryInsert() even when the arg to be flattened in had arity > 1 (copyAndBinaryInsert): make first arg const 1999-05-28 Steven Eker * ACU_DagNormalization.cc (copyAndBinaryInsert): fixed bug; we were searching in argArray rarther than source (normalizeAtTop): rearranged if statements to favor common cases * ACU_DagNode.hh (class ACU_DagNode): added decl for copyAndBinaryInsert() * ACU_DagNormalization.cc (fastNormalizeAtTop): added (copyAndBinaryInsert): added (flattenSortAndUniquize): no longer local inline (sortAndUniquize): no longer local inline (normalizeAtTop): incorporate fastNormalizeAtTop() (fastNormalizeAtTop): deleted 1999-05-16 Steven Eker * ACU_DagNode.cc (markArguments): added SPEED_HACK * ACU_AlienAlienLhsAutomaton.cc: find first occurence of second symbol before entering outermost loop * ACU_CollectorLhsAutomaton.cc (ACU_CollectorLhsAutomaton): set noSortChecks flag if the collector variable has a sort that is the unique maximal sort in an error free component (ACU_CollectorLhsAutomaton): indicate "sort checks off" by setting collectorSort to 0 (collect): handle "sort checks off" in the 3 cases with superfast loops in the main case (dump): handle "sort checks off" 1999-05-13 Steven Eker * ACU_DagNode.cc (makeClone): copy theory byte (overwriteWithClone): copy theory byte 1999-05-12 Steven Eker * ACU_Symbol.hh (class ACU_Symbol): computeTrueSort() -> normalizeAndComputeTrueSort() * ACU_Symbol.cc (computeTrueSort): become normalizeAndComputeTrueSort() (normalizeAndComputeTrueSort): use fastComputeTrueSort() 1999-05-11 Steven Eker * ACU_RhsAutomaton.cc (buildArguments): made local_inline (buildArguments): added SPEED_HACK ===================================Engine49================================================== 1999-04-18 Steven Eker * Unmade previous chnage in all files due to huge number of functions that should have been in-lined but weren't (ans not reported either!) length(), expandTo(), contractTo() 1999-03-14 Steven Eker * ACU_Subproblem.cc: try commenting out template decls * ACU_LhsAutomaton.cc: try commenting out template decls * ACU_RhsAutomaton.cc: try commenting out template decls * ACU_DagNode.cc: try commenting out template decls * ACU_Term.cc: try commenting out template decls ===================================Maude 1.0.2 released======================================= ===================================Maude 1.0.1 released======================================= 1999-02-18 Steven Eker * ACU_RhsAutomaton.cc (buildArguments): for() changed to do-while() ===================================VectorExperiment========================================== 1999-01-19 Steven Eker * ACU_LhsCompiler0.cc (tryToMakeAlienAlienLhsAutomaton): fixed nasty long running bug where we were not dealing correctly with UNDECIDED from Term::subsumes() 1999-01-16 Steven Eker * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): changed matchAtTop, inErrorSort and collapsePossible to Bool to save memory (class ACU_LhsAutomaton): changed matchStrategy to Byte to save memory * ACU_Term.hh (class ACU_Term): made Pair::abstractionVariableIndex a short to save memory ===================================Engine46================================================== Tue Dec 8 10:48:45 1998 Steven Eker * ACU_Term.cc (Term): fixed nasty bug where we were not copying multiplicity correctly ===================================Engine44================================================== Fri Nov 6 15:30:44 1998 Steven Eker * ACU_Term.cc (deepCopy): -> deepCopy2() * ACU_Term.hh (class ACU_Term): deepCopy() -> deepCopy2() ===================================Engine43================================================== Wed Oct 28 14:41:53 1998 Steven Eker * ACU_AlienAlienLhsAutomaton.cc (match): fixed nasty bug in extension setting code: e->setUnmatched(i, m); becomes e->setUnmatched(k, m); Thu Oct 8 13:41:45 1998 Steven Eker * ACU_Term.cc (compareArguments): (DagNode* version) added const_cast (compareArguments): (DagNode* version) removed const_cast, added const (compareArguments): (Term* version) added const * ACU_Term.hh: added #include "ACU_Symbol.hh" so that we can down cast everwhere in symbol() Fri Oct 2 11:20:43 1998 Steven Eker * ACU_Matcher.cc (multiplicityChecks): added SPEED_HACKS (multiplicityChecks): rewritten; simpler and much faster in the maxPatternMultiplicity > 1 fail case at the cost of being slightly slower (or maybe not?) in the success case. When maxPatternMultiplicity > 1 failure seems to be _much_ more likely. ===================================Engine41================================================== Tue Sep 22 14:52:16 1998 Steven Eker * ACU_Symbol.cc (computeBaseSort): use lastIndex heuristic in uniform sort structure case * ACU_CollectorLhsAutomaton.cc (collect): put collectorSort pointer into local variable to avoid reload; Use lastIndex heuristic to try and avoid sort comparisons; use leq(int, Sort*) instead of DagNode::Sort* where neccessary Fri Sep 18 11:28:08 1998 Steven Eker * ACU_DagNode.cc (overwriteWithClone): use setSortIndex() (makeClone): use setSortIndex() * ACU_Symbol.cc (computeBaseSort): rewritten using setSortIndex(), DagNode::leq(), traverse() and lookupSortIndex() Thu Sep 17 18:17:18 1998 Steven Eker * ACU_VarLhsAutomaton.cc (match): use DagNode::leq() (2 places) * ACU_NonLinearLhsAutomaton.cc (match): use DagNode::leq() (5 places) * ACU_Matcher.cc (forcedLoneVariableCase): use DagNode::leq() * ACU_GreedyMatcher.cc (greedyPureMatch): use DagNode::leq() (2 places) (greedyPureMatch): use leq(Sort*,Sort*) * ACU_CollectorLhsAutomaton.cc (collect): use DagNode::leq() (5 places) Fri Sep 11 17:26:33 1998 Steven Eker * ACU_Subproblem.cc (solveVariables): use new checkSort() convention * ACU_Matcher.cc (forcedLoneVariableCase): use new checkSort() convention * ACU_Symbol.cc (computeBaseSort): use <=(DagNode*,Sort&) (1 place) * ACU_VarLhsAutomaton.cc (match): use <=(DagNode*,Sort&) (2 places) * ACU_NonLinearLhsAutomaton.cc (match): use <=(DagNode*,Sort&) (5 places) * ACU_DagNode.cc (matchVariableWithExtension): pass sort rather than code to addTopVariable() * ACU_Matcher.cc (forcedLoneVariableCase): use <=(DagNode*,Sort&) (fullMatch): pass sort rather than code to addTopVariable() * ACU_GreedyMatcher.cc (greedyPureMatch): use <=(DagNode*,Sort&) (2 places) and <=(Sort&,Sort&) * ACU_CollectorLhsAutomaton.cc (collect): use <=(DagNode*,Sort&) (5 places) * ACU_Subproblem.cc (addTopVariable): store sort rather than sortCode (solveVariables): temporary hack: pass sort->code() to checkSort() (dump): sort rather than sortCode * ACU_Subproblem.hh (class ACU_Subproblem): struct TopVariable now has sort rather than sortCode; addTopVariable() decl updated Wed Sep 9 11:52:44 1998 Steven Eker * ACU_Symbol.cc (compileOpDeclarations): call commutativeSortCompletion() before Symbol::compileOpDeclarations() due to new implementation ===================================Engine40================================================== Mon Jul 20 19:35:25 1998 Steven Eker * ACU_Term.hh (class ACU_Term): added decl for new ctor * ACU_Term.cc (deepCopy): added (ACU_Term): added new ctor * ACU_Term.hh (class ACU_Term): added decl for deepCopy() ===================================Engine39================================================== Wed Jun 10 11:57:08 1998 Steven Eker * ACU_Symbol.cc (postInterSymbolPass): added to do identity stuff (compileOpDeclarations): don't do identity stuff here anymore * ACU_Term.hh (class ACU_Term): updated normalizeAliensAndFlatten() and normalize() decls * ACU_Term.cc: IntSet -> NatSet (normalize): go back to getIdentity(); set changed flag if normalization made any changes to term; clear changed otherwise (normalizeAliensAndFlatten): return flag to say wether we changed term * ACU_LhsCompiler3.cc: IntSet -> NatSet * ACU_LhsCompiler2.cc: IntSet -> NatSet * ACU_LhsCompiler1.cc: IntSet -> NatSet * ACU_LhsCompiler0.cc: IntSet -> NatSet * ACU_Term.hh: IntSet -> NatSet ===================================Engine38================================================== Wed Jun 3 16:29:33 1998 Steven Eker * ACU_Term.cc (normalize): use earlyGetIdentity() ===================================Engine37================================================== Fri Mar 6 17:22:37 1998 Steven Eker * ACU_DagOperations.cc (eliminateSubject): fixed nasty bug - test should be identity != 0 && identity->equal(target) and we had || Tue Feb 24 11:10:10 1998 Steven Eker * ACU_Matcher.cc (eliminateBoundVariables): simplify now that eliminateSubject() handle identity * ACU_DagOperations.cc (eliminateSubject): handle identity; this fixes a serious bug in ACU_Subproblem::extractDiophantineSystem() which assumed we were * ACU_Subproblem.cc (dump): added (dump): dump local bindings (solveVariables): fixed serious bug - in the trivial Diophantine system case where findFirst is false we must unbind any variables we bound to the identity the first time around before returning false. * ACU_Subproblem.hh (class ACU_Subproblem): added decl for dump() Fri Feb 20 17:27:13 1998 Steven Eker * ACU_DagNode.cc (stackArguments): only stack arguments that are not flagged as unstackable ===================================Engine36================================================== Sat Feb 14 14:45:02 1998 Steven Eker * ACU_LhsAutomaton.cc (ACU_LhsAutomaton): need to delete uniqueCollapseAutomaton and abstraction automata Thu Feb 12 17:50:45 1998 Steven Eker * ACU_NGA_LhsAutomaton.cc (~ACU_NGA_LhsAutomaton): added * ACU_NGA_LhsAutomaton.hh (class ACU_NGA_LhsAutomaton): added decl for ~ACU_NGA_LhsAutomaton() * ACU_AlienAlienLhsAutomaton.cc (~ACU_AlienAlienLhsAutomaton): add * ACU_AlienAlienLhsAutomaton.hh (class ACU_AlienAlienLhsAutomaton): added decl for ~ACU_AlienAlienLhsAutomaton() * ACU_LhsAutomaton.cc (ACU_LhsAutomaton): added * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): added decl for ~ACU_LhsAutomaton() Wed Feb 11 16:46:29 1998 Steven Eker * ACU_VarLhsAutomaton.cc (match): compare() != 0 replaced by !equal() * ACU_Term.cc (normalize): compare() == 0 replaced by equal() (2 places) * ACU_Matcher.cc (eliminateBoundVariables): compare() != 0 replaced by !equal() * ACU_GndLhsAutomaton.cc (match): compare() != 0 replaced by !equal() * ACU_CollapseMatcher.cc (uniqueCollapseMatch): compare() != 0 replaced by !equal() (multiwayCollapseMatch): compare() != 0 replaced by !equal() (multiwayCollapseMatch): compare() == 0 replaced by equal() (2 places) * ACU_NGA_LhsAutomaton.cc (match): use delete rather than calling deepSelfDestruct() * ACU_Matcher.cc (buildBipartiteGraph): use delete rather than calling deepSelfDestruct() * ACU_GreedyMatcher.cc (greedyMatch): use delete rather than calling deepSelfDestruct() * ACU_AlienAlienLhsAutomaton.cc (match): use delete rather than calling deepSelfDestruct() * ACU_Subproblem.hh (class ACU_Subproblem): deleted decl for deepSelfDestruct() * ACU_Subproblem.cc (deepSelfDestruct): deleted (~ACU_Subproblem): inserted bulk of code from old deepSelfDestruct(); use delete rather than calling deepSelfDestruct() ===================================Engine35================================================== Fri Jan 16 18:19:12 1998 Steven Eker * ACU_Term.cc (insertAbstractionVariables): changed AdvisoryCheck() to DebugAdvisoryCheck() Wed Dec 24 15:34:20 1997 Steven Eker * ACU_LhsAutomaton.cc (dump): dump uniqueCollapseAutomaton if it exists Tue Dec 23 12:38:55 1997 Steven Eker * ACU_LhsAutomaton.cc (dump): don't try to print name of an abstraction variable * ACU_LhsCompiler1.cc (compileLhs2): use greedySafe() * ACU_LhsCompiler0.cc (tryToMakeAlienAlienLhsAutomaton): use greedySafe() (tryToMakeCollectorLhsAutomaton): use greedySafe() Thu Dec 18 18:01:52 1997 Steven Eker * ACU_LhsAutomaton.cc (addTopVariable): use Term::takeIdentity() * ACU_LhsCompiler0.cc (tryToMakeNonLinearLhsAutomaton): use Term::takeIdentity() (tryToMakeCollectorLhsAutomaton): use Term::takeIdentity() Wed Dec 17 12:03:01 1997 Steven Eker * ACU_NonLinearLhsAutomaton.cc (match): check to see that we actually have a match before allocating ACU_DagNode in non ext case; the space for the ACU_DagNode can be very big and this case is likely to fail. * ACU_NonLinearLhsAutomaton.hh (class ACU_NonLinearLhsAutomaton): made varIndex, multiplicity, varSort, unitSort const Tue Dec 16 11:52:36 1997 Steven Eker * ACU_Term.hh (class ACU_Term): added decl for tryToMakeNonLinearLhsAutomaton() * ACU_LhsCompiler0.cc (compileLhs): major rewrite and simplification (tryToMakeNonLinearLhsAutomaton): added * ACU_NonLinearLhsAutomaton.cc (match): handle case where variable is bound (dump): call HeuristicLhsAutomaton::dump() * ACU_NonLinearLhsAutomaton.hh (class ACU_NonLinearLhsAutomaton): derive from HeuristicLhsAutomaton * ACU_AlienAlienLhsAutomaton.cc (complete): deleted (match): use fullMatch() (dump): call HeuristicLhsAutomaton::dump() * ACU_AlienAlienLhsAutomaton.hh (class ACU_AlienAlienLhsAutomaton): derive from HeuristicLhsAutomaton; deleted decl for complete(); data member fullAutomaton; * ACU_CollectorLhsAutomaton.cc (dump): call HeuristicLhsAutomaton::dump() (complete): deleted * ACU_CollectorLhsAutomaton.hh (class ACU_CollectorLhsAutomaton): derive from HeuristicLhsAutomaton (class ACU_CollectorLhsAutomaton): deleted decls for complete() and fullMatch() (fullMatch): deleted (class ACU_CollectorLhsAutomaton): deleted data member fullAutomaton * ACU_LhsCompiler0.cc (compileLhs): insert index of variable into boundUniquely when making a ACU_NonLinearLhsAutomaton * ACU_NonLinearLhsAutomaton.cc (match): fixed bug where we were forgetting to increment p when building new ACU_DagNode * ACU_LhsCompiler0.cc (compileLhs): added code to make ACU_NonLinearLhsAutomaton where appropriate Mon Dec 15 18:54:20 1997 Steven Eker * ACU_NonLinearLhsAutomaton.cc: created * ACU_NonLinearLhsAutomaton.hh (class ACU_NonLinearLhsAutomaton): created ===================================Engine34================================================== Thu Dec 11 18:24:11 1997 Steven Eker * ACU_Subproblem.cc (solveVariables): check that we actually have a sort before calling d->setReduced() since d->checkSort() is not guarenteed to leave a sort behind (in the presence of sort constraints). Fri Dec 5 11:23:05 1997 Steven Eker * ACU_DagOperations.cc (eliminateArgument): code cleaning * ACU_Symbol.cc (eqRewrite): optimized use of nrArgs (compileOpDeclarations): only call leftIdentitySortCheck() and rightIdentitySortCheck() if we actually have an identity * ACU_Symbol.hh (class ACU_Symbol): deleted utilityBuffer static class member decl * ACU_Symbol.cc (finalizeSortInfo): deleted (compileOpDeclarations): call leftIdentitySortCheck() and rightIdentitySortCheck() deleted utilityBuffer static class member (computeBaseSort): use local static sortIndexBuffer in place of utilityBuffer * ACU_Symbol.hh (class ACU_Symbol): deleted finalizeSortInfo() decl Thu Dec 4 12:52:46 1997 Steven Eker * ACU_Term.cc (compareArguments): compare multiplicity before actaul argument (dagNode version) (compareArguments): compare multiplicity before actaul argument (term version) * ACU_DagNode.cc (compareArguments): compare multiplicity before actaul argument; this may avoid comparison of argument in some cases. * ACU_Symbol.cc (ACU_Symbol): deleted inert arg * ACU_Symbol.hh (class ACU_Symbol): deleted inert arg from ctor decl Tue Dec 2 16:40:08 1997 Steven Eker * ACU_Symbol.cc (copyAndReduceSubterms): use DagNode::copyAndReduce() Mon Dec 1 11:33:38 1997 Steven Eker * ACU_Symbol.cc (eqRewrite): use getPermuteStrategy() (*3) * ACU_Term.cc (markEagerArguments): use getPermuteStrategy() (findEagerVariables): use getPermuteStrategy() * ACU_Symbol.cc (ACU_Symbol): PermuteSymbol -> AssociativeSymbol (eqRewrite): PermuteSymbol -> AssociativeSymbol (*3) * ACU_Term.cc (findEagerVariables): PermuteSymbol -> BinarySymbol (*3) (markEagerArguments): PermuteSymbol -> BinarySymbol * ACU_LhsCompiler0.cc (tryToMakeCollectorLhsAutomaton): PermuteSymbol -> AssociativeSymbol (*2) * ACU_LhsAutomaton.cc (addAbstractionVariable): PermuteSymbol -> AssociativeSymbol * ACU_GreedyMatcher.cc (greedyPureMatch): PermuteSymbol -> AssociativeSymbol (*4) * ACU_DagOperations.cc (eliminateArgument): use getPermuteStrategy() * ACU_DagNode.cc (copyEagerUptoReduced2): use getPermuteStrategy() * ACU_Symbol.hh (class ACU_Symbol): PermuteSymbol -> AssociativeSymbol * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): PermuteSymbol -> AssociativeSymbol Mon Nov 24 11:09:15 1997 Steven Eker * ACU_AlienAlienLhsAutomaton.cc (dump): implemented * ACU_DagNode.hh (class ACU_DagNode): ACU_FastLhsAutomaton no longer exists and hence is no longer a friend * ACU_RhsAutomaton.cc (buildAliens): deleted (dump): implemented * ACU_RhsAutomaton.hh (class ACU_RhsAutomaton): deleted aliens data member (addAlien): deleted * ACU_Term.hh (class ACU_Term): updated member function declarations * ACU_LhsCompiler0.cc (compileLhs): rewrutten (tryToMakeFastAutomation2): renamed to tryToMakeAlienAlienLhsAutomaton() (tryToMakeFastAutomaton): renamed to tryToMakeCollectorLhsAutomaton() (tryToMakeCollectorLhsAutomaton): rewrittten to use new derived classes * ACU_GndLhsAutomaton.cc: created * ACU_GndLhsAutomaton.hh (class ACU_GndLhsAutomaton): created * ACU_DagNode.hh (class ACU_DagNode): ACU_VarLhsAutomaton becomes a friend (class ACU_DagNode): ACU_GndLhsAutomaton becomes a friend * ACU_VarLhsAutomaton.hh (class ACU_VarLhsAutomaton): created * ACU_VarLhsAutomaton.cc: created * ACU_DagNode.hh (class ACU_DagNode): ACU_NGA_LhsAutomaton becomes a friend * ACU_CollectorLhsAutomaton.cc (complete): added (dump): now dump fullAutomaton * ACU_CollectorLhsAutomaton.hh (fullMatch): added * ACU_NGA_LhsAutomaton.hh (class ACU_NGA_LhsAutomaton): created * ACU_NGA_LhsAutomaton.cc: created Sun Nov 23 17:27:37 1997 Steven Eker * ACU_DagNode.hh (class ACU_DagNode): ACU_CollectorLhsAutomaton becomes a friend * ACU_FastLhsAutomaton.cc (dump): rewritten as a temporary hack 9this class will soon be split 3 ways) * ACU_FastLhsAutomaton.hh (class ACU_FastLhsAutomaton): updated dump() decl * ACU_AlienAlienLhsAutomaton.hh (class ACU_AlienAlienLhsAutomaton): updated dump() decl * ACU_LhsAutomaton.cc (dump): rewritten * ACU_RhsAutomaton.hh (class ACU_RhsAutomaton): updated dump() decl * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): updated dump() decl * ACU_CollectorLhsAutomaton.cc: created from ACU_FastLhsAutomaton.cc * ACU_CollectorLhsAutomaton.hh: created from ACU_FastLhsAutomaton.hh ===================================Engine33================================================== Fri Nov 21 14:28:50 1997 Steven Eker * ACU_DagNormalization.cc (extensionNormalizeAtTop): added * ACU_Symbol.cc (eqRewrite): have special handling for case when normalizationStatus == ACU_DagNode::EXTENSION * ACU_DagNode.cc (partialReplace): use setNormalizationStatus() * ACU_Subproblem.cc (solveVariables): use setNormalizationStatus() * ACU_GreedyMatcher.cc (greedyPureMatch): use setNormalizationStatus() * ACU_Matcher.cc (forcedLoneVariableCase): use setNormalizationStatus() * ACU_FastLhsAutomaton.cc (collect): use setNormalizationStatus() * ACU_DagNode.hh (ACU_DagNode): set theory byte to 0 * ACU_Symbol.cc (computeBaseSort): use getNormalizationStatus() (eqRewrite): use getNormalizationStatus() (3 times) * ACU_DagNode.hh (clearShortCircuit): deleted (setShortCircuit): deleted (getShortCircuit): deleted (getNormalizationStatus): added (setNormalizationStatus): added * ACU_DagNode.cc (partialReplace): made and unmade change to remove implicit flattening. The advantage of not implicitly flattening is that we don't mix sorted reduced stuff with unsorted undeduced stuff and thereby defeat are fast normalization. The problem is that we need an extra dag node, more match attempts and the new "not in error sort" semantics of the shortCircuit flag in unsafe here since the extension part could be in the error sort. Thu Nov 20 11:58:34 1997 Steven Eker * ACU_ExtensionInfo.hh (reset): added; allows extensionInfo to be prepared for use without wasting time clearing it. * ACU_AlienAlienLhsAutomaton.cc (match): put automata pointers into local variable to avoid gcc generating register reloads after function calls. Use ACU_ExtensionInfo::reset(). * ACU_LhsCompiler0.cc (tryToMakeFastAutomation2): fixed bug where we were compile same t1 twice and t2 not at all * ACU_AlienAlienLhsAutomaton.cc (match): handle cases where first/second symbol does not occcur in subject (match): fixed bug where we using wrong local substitution in 2nd match * ACU_LhsCompiler0.cc (tryToMakeFastAutomation2): added missing return for AlienAlien case * ACU_DagNode.hh (class ACU_DagNode): class ACU_AlienAlienLhsAutomaton becomes a friend * ACU_AlienAlienLhsAutomaton.hh (class ACU_AlienAlienLhsAutomaton): created * ACU_AlienAlienLhsAutomaton.cc (ACU_AlienAlienLhsAutomaton): created Tue Nov 18 18:25:08 1997 Steven Eker * ACU_Term.cc (dump): added (dumpArguments): deleted * ACU_Term.hh (class ACU_Term): dumpArguments() decl becomes dump() * ACU_Term.cc (dumpArguments): removed const; pass variableInfo by ref; switch varableInfo, indentLevel args * ACU_Term.hh (class ACU_Term): dumpArguments() decl now passes variableInfo by ref; removed const; switch varableInfo, indentLevel args Mon Nov 17 11:07:23 1997 Steven Eker * ACU_Subproblem.cc (computeAssignment): don't pass shortCircuit argument to ACU_DagNode() (solveVariables): setShortCircuit() * ACU_Matcher.cc (forcedLoneVariableCase): call setShortCircuit() * ACU_GreedyMatcher.cc (greedyPureMatch): call setShortCircuit() * ACU_FastLhsAutomaton.cc (collect): call setShortCircuit() * ACU_Symbol.cc (eqRewrite): use getShortCircuit() (three places) * ACU_DagNode.cc (partialReplace): call clearShortCircuit() * ACU_DagNode.hh (class ACU_DagNode): removed shortCircuit arg from ctor (class ACU_DagNode): added decls for getShortCircuit() and setShortCircuit() and clearShortCircuit() (class ACU_DagNode): deleted shortCircuit data member (ACU_DagNode): non longer intialize shortCircuit (setShortCircuit): added (getShortCircuit): added (clearShortCircuit): added Fri Nov 14 10:20:07 1997 Steven Eker * ACU_LhsAutomaton.cc (dump): dump collapsePossible * ACU_FastLhsAutomaton.cc (collect): added speed hack (dump): implemented * ACU_LhsCompiler0.cc: don't use fast automaton if we're in error sort and we have extension * ACU_FastLhsAutomaton.cc (collect): hand optimized * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): all todays changes unmade as they made things slower * ACU_Matcher.cc: all todays changes unmade as they made things slower * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): data memeber totalMultiplicity deleted (class ACU_LhsAutomaton): updated multiplicityChecks() decl * ACU_Matcher.cc (multiplicityChecks): rewritten; first case now just does copying without multiplicity checks in the case where they will all trvially succeed. Second case now has early failure when totalSubjectMultiplicity > totalUpperBound (multiplicityChecks): rewritten; now sets extensionInfo upperBound (match): pass extensionInfo to multiplicityChecks(); don't set extensionInfo upperBound * ACU_FastLhsAutomaton.cc (ACU_FastLhsAutomaton): changed stripperTopSymbol to stripperSymbol to avoid confusion with data member (match): make sure we actually bind stripper variable (match): bind collector variable in local rather than solution so it does not get overwritten when we copy local into solution * ACU_LhsCompiler0.cc (tryToMakeFastAutomation): pass !(collapseSymbols().empty()) for collapsePossible (2 places) Thu Nov 13 16:11:00 1997 Steven Eker * ACU_LhsCompiler0.cc: created * ACU_Term.hh (class ACU_Term): added decl for compileLhs2() * ACU_LhsCompiler1.cc (compileLhs2): created from old compileLhs(); now returns ACU_LhsAutomaton* * ACU_DagNode.hh (class ACU_DagNode): ACU_FastLhsAutomaton becomes a friend * ACU_FastLhsAutomaton.hh (class ACU_FastLhsAutomaton): created * ACU_FastLhsAutomaton.cc: created ===================================Engine32================================================== Fri Oct 31 16:56:23 1997 Steven Eker * ACU_CollapseMatcher.cc (multiwayCollapseMatch): removed buggy optimization where we were binding variables to identity in solution after they had been considered for match against whole subject; the problem is that solution gets returned to caller with these not always correct bindings (multiwayCollapseMatch): make use of the faxt that all variables with multiplicity > 1 will be bound to dentity once we reach the disjuction loop; use DisjunctiveSubproblemAccumulator to simplify code. (multiwayCollapseMatch): eliminated first flag by using empty() Wed Oct 29 10:30:51 1997 Steven Eker * ACU_DagNode.cc (matchVariableWithExtension): call extensionInfo->setValidAfterMatch(false) * ACU_CollapseMatcher.cc (multiwayCollapseMatch): don't call extensionInfo->clear() (multiwayCollapseMatch): use extensionInfo->validAfterMatch() (multiwayCollapseMatch): use extensionInfo->setValidAfterMatch(false) in place of extensionInfo->clear() (multiwayCollapseMatch): in the case where the subject is our identity we fix a bug by checking for extension info and calling extensionInfo->setValidAfterMatch(true) and extensionInfo->setMatchedWhole(true) if so. Previously we didn't worry about extension with the result that it was never set, allowing an uninitialized data read in partialConstruct() for example. (multiwayCollapseMatch): non viable variable that are unbound are bound to identity at the outset (that is unbound variables that have multiplicity > 1). The case where nrViableVariables == 0 contained a bug since we could still get a match if extension was present. The case where nrViableVariables == 1 clean up now we know that all other variables are bound to identity. * ACU_Subproblem.cc (fillOutExtensionInfo): use setMatchedWhole() in place of setWholeFlag() (2 places) (solveVariables): use setMatchedWhole() in place of setWholeFlag() * ACU_GreedyMatcher.cc (greedyPureMatch): call setValidAfterMatch(true) if we fill out the extension info * ACU_Matcher.cc (fullMatch): call setValidAfterMatch(false) since extension info will not be valid until solve phase * ACU_ExtensionInfo.cc (makeClone): use setValidAfterMatch(), validAfterMatch() and setMatchedWhole() (copy): use setValidAfterMatch(), validAfterMatch() and setMatchedWhole() Tue Oct 28 10:19:21 1997 Steven Eker * ACU_CollapseMatcher.cc (multiwayCollapseMatch): clear extension information if it exists before each call to matchVariable; only save extensionInfo in SubproblemDisjunction in the case where it is valid (regardless of whether subproblem == 0 because we can have the case where extensionInfo is valid but subproblem != 0); Before exiting with true we clear any old extension info that might exist be cause it will now be invalid (having been saved on one of the disjuction paths it cannot be globally valid). Mon Oct 27 11:43:56 1997 Steven Eker * ACU_CollapseMatcher.cc (multiwayCollapseMatch): save extensionInfo in SubproblemDisjunction in the case where subproblem == 0 * ACU_ExtensionInfo.hh (class ACU_ExtensionInfo): subject made non const in order to do copy() * ACU_ExtensionInfo.cc (makeClone): added (copy): added * ACU_ExtensionInfo.hh (class ACU_ExtensionInfo): added decls for makeClone() and copy() Fri Oct 24 13:07:30 1997 Steven Eker * ACU_Subproblem.cc (solveVariables): use ExtensionInfo::buildMatchedPortion() and DagNode::inErrorSort() instead of matchedPortionOK(); call fillOutExtensionInfo() first (matchedPortionOK): deleted * ACU_Subproblem.hh (class ACU_Subproblem): deleted decl for matchedPortionOK(); * ACU_CollapseMatcher.cc (multiwayCollapseMatch): use EqualitySubproblem instead of ExclusionSubproblem * ACU_DagNode.hh (class ACU_DagNode): class ACU_ExtensionInfo is now a friend * ACU_Symbol.cc (ruleRewrite): switched to new ACU_ExtensionInfo convention (eqRewrite): switched to new ACU_ExtensionInfo convention (3 places) * ACU_DagNode.cc (makeExtensionInfo): switched to new ACU_ExtensionInfo convention * ACU_Theory.cc: deleted * ACU_ExtensionInfo.cc: created * ACU_ExtensionInfo.hh (ACU_ExtensionInfo): ctor now takes subject rather than nrArgs; added decl for buildMatchedPortion() (clear): use subject data member (ACU_ExtensionInfo): store subject arg in data member Tue Oct 21 12:23:04 1997 Steven Eker * ACU_CollapseMatcher.cc (multiwayCollapseMatch): add exclusion subproblems to eliminate duplicate solutions in the case that the subject matches out identity with extension. * ACU_Term.cc (dagify2): switched to new convention * ACU_Term.hh (class ACU_Term): switched dagify2() decl to new convention Wed Oct 15 17:17:16 1997 Steven Eker * ACU_Subproblem.cc (solveVariables): use BinarySymbol::getIdentityDag() (2 places) (solveVariables): delete identityDag local variable * ACU_GreedyMatcher.cc (greedyPureMatch): use BinarySymbol::getIdentityDag() (greedyPureMatch): delete identityDag local variable * ACU_Matcher.cc (match): use BinarySymbol::getIdentityDag() * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): delete identityDag arg from bindUnboundVariablesToIdentity() * ACU_CollapseMatcher.cc (uniqueCollapseMatch): use BinarySymbol::getIdentityDag() (bindUnboundVariablesToIdentity): use BinarySymbol::getIdentityDag(); remove identityDag arg (multiwayCollapseMatch): use BinarySymbol::getIdentityDag() * ACU_LhsCompiler1.cc (analyseConstraintPropagation): use VariableTerm::dynamicCast() (compileLhs): use VariableTerm::dynamicCast() * ACU_Term.cc (mightCollapseToOurSymbol): deleted (mightMatchOurIdentity): deleted (analyseCollapses): use BinarySymbol::mightMatchOurIdentity() (insertAbstractionVariables): use BinarySymbol::mightMatchOurIdentity() (insertAbstractionVariables): use PermuteSymbol::mightCollapseToOurSymbol() (compileRhs): use VariableTerm::dynamicCast() (insertAbstractionVariables): use VariableTerm::dynamicCast() * ACU_Term.hh (class ACU_Term): deleted decls for mightCollapseToOurSymbol() and mightMatchOurIdentity() * ACU_Symbol.cc (~ACU_Symbol): deleted (compileOpDeclarations): use BinarySymbol::processIdentity() (eqRewrite): use getIdentity() (2 places) (computeTrueSort): use getIdentity() * ACU_Symbol.hh (class ACU_Symbol): delete dtor decl * ACU_Symbol.cc (ACU_Symbol): rewritten to use new PermuteSymbol conventions * ACU_Symbol.hh (class ACU_Symbol): removed constructor arg from ctor; deleted decls for getIdentity() and makeIdentityDag(); (class ACU_Symbol): deleted identity, identityAutomaton and identitySubstitution data members (getIdentity): deleted (makeIdentityDag): deleted Mon Oct 13 10:36:57 1997 Steven Eker * ACU_Term.cc (mightCollapseToOurSymbol): added (mightMatchOurIdentity): added (analyseCollapses): added (insertAbstractionVariables): added (determineCollapseSymbols): deleted * ACU_Term.hh (class ACU_Term): added decls for analyseCollapses() and insertAbstractionVariables(); delete decl for determineCollapseSymbols() * ACU_LhsAutomaton.cc (dump): index2Symbol() -> index2Variable() * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): VariableIndex -> VariableInfo * ACU_LhsAutomaton.cc (dump): VariableIndex -> VariableInfo * ACU_Term.cc (dumpArguments): VariableIndex -> VariableInfo (determineCollapseSymbols): VariableIndex -> VariableInfo (dumpArguments): VariableIndex -> VariableInfo * ACU_Term.hh (class ACU_Term): VariableIndex -> VariableInfo * ACU_Symbol.cc (compileOpDeclarations): VariableIndex -> VariableInfo ===================================Engine30================================================== Tue Oct 7 15:32:51 1997 Steven Eker * ACU_Symbol.hh (class ACU_Symbol): added decl for makeDagNode() * ACU_Symbol.cc (makeDagNode): added Fri Oct 3 19:26:11 1997 Steven Eker * ACU_Symbol.cc (compileOpDeclarations): DataSet -> TermSet * ACU_Term.cc (compileRhs): DataSet -> TermSet (dagify2): DataSet -> TermSet * ACU_Term.hh (class ACU_Term): DataSet -> TermSet ===================================Engine29================================================== Thu Oct 2 17:43:48 1997 Steven Eker * ACU_Symbol.cc (compileOpDeclarations): pass DataSet to compileRhs() * ACU_Term.hh (class ACU_Term): updated compileRhs() decl * ACU_Term.cc (compileRhs): adapted to use DataSet& compiled Tue Sep 30 12:18:57 1997 Steven Eker * ACU_Term.hh (class ACU_Term): dagify() decl changed to dagify2() * ACU_Term.cc (normalize): now compute hash values (dagify2): adapted from dagify() Thu Sep 25 16:38:20 1997 Steven Eker * ACU_Term.cc (determineCollapseSymbols): use getOpDeclarations() * ACU_Symbol.cc (specificRewrite): deleted * ACU_Symbol.hh (class ACU_Symbol): deleted decl for specificRewrite() ===================================Engine28================================================== Mon Aug 25 12:11:34 1997 Steven Eker * ACU_Symbol.cc (eqRewrite): fixed a bug where we could collapse to an unreduced subterm and stop rewriting at this node. We now return true in this case to force rewriting to continue. Tue Aug 19 15:27:21 1997 Steven Eker * ACU_DagNode.hh (nrArgs): added (getArgument): added (getMultiplicity): added (class ACU_DagNode): added decl for nrArgs(), getArgument(int i), getMultiplicity(int i). This provide a fast interface to the argument list for non ACU_Theory code that is ACU_Theory aware (maybe classes derived from ACU_Symbol). Fri Jul 25 18:04:23 1997 Steven Eker * ACU_DagNode.cc (partialReplace): removed Assert(getSortIndex() == Sort::SORT_UNKNOWN, cerr << "shouldn't have valid sort"); since if node was original created by matcher it may well have valid sort Thu Jul 24 11:20:50 1997 Steven Eker * ACU_GreedyMatcher.cc (greedyPureMatch): optimized vector accesses for assignment building (greedyPureMatch): optimized inner loop for assigning unassigned subjects * ACU_Subproblem.cc (computeAssignment): pass shortCircuit = true to ACU_DagNode() * ACU_GreedyMatcher.cc (greedyPureMatch): pass shortCircuit = true to ACU_DagNode() * ACU_Matcher.cc (forcedLoneVariableCase): pass shortCircuit = true to ACU_DagNode() * ACU_Symbol.cc (eqRewrite): added s->eliminateArgument(identity) calls after new normalizeAtTop() calls (eqRewrite): rewritten from scatch to make use of short circuit * ACU_DagNode.cc (partialReplace): clear shortCircuit flag * ACU_DagNode.hh (ACU_DagNode): set shortCircuit flag * ACU_Symbol.cc (eqRewrite): added normalizeAtTop() calls after sort computation for LAZY and SEMI_EAGER cases; this fixes a bug introduced by just-in-time normalization * ACU_DagNode.hh (class ACU_DagNode): added shortCircuit data member; the idea is to set this when an ACU_DagNode is created in the matcher cut down need for normalization checking Wed Jul 23 11:50:27 1997 Steven Eker * ACU_DagNode.cc (partialReplace): added call to repudiateSortInfo() * ACU_Term.cc (normalize): added full flag (normalize): don't call normalizeAliensAndFlatten() if full = false (normalizeAliensAndFlatten): pass full = true to normalize() * ACU_Term.hh (class ACU_Term): added full flag to normalize * ACU_Symbol.cc (ACU_Symbol): pass full = true to normalize() (compileOpDeclarations): deleted superfluous normalization call Mon Jul 21 10:24:23 1997 Steven Eker * ACU_RhsAutomaton.hh (class ACU_RhsAutomaton): updated buildArguments() decl * ACU_RhsAutomaton.cc (buildArguments): take argArray rather than node * ACU_Symbol.cc (computeTrueSort): now do normalization * ACU_DagNode.hh (class ACU_DagNode): deleted normalizeEagerUptoReduced2() and nonEagerInsert() decls * ACU_DagNode.cc (normalizeEagerUptoReduced2): deleted (partialReplace): no longer attempt to normalize node (partialConstruct): no longer attempt to normalize node (copyWithReplacement): no longer attempt to normalize node (nonEagerInsert): deleted * ACU_Term.cc (compileRhs): no longer pass normalize flag to ACU_RhsAutomaton (compileRhs): no longer pass term to addArgument() * ACU_RhsAutomaton.cc (ACU_RhsAutomaton): no longer initialize simpleCtor (buildArguments): no longer check for reduced args or return bool (construct): greatly simplified; no longer attempt normalization under any circumstance (replace): greatly simplified; no longer attempt normalization under any circumstance * ACU_RhsAutomaton.hh (class ACU_RhsAutomaton): removed simpleCtor member (class ACU_RhsAutomaton): changed buildArguments() decl ===================================Engine26b================================================== Fri Jul 18 16:11:45 1997 Steven Eker * ACU_RhsAutomaton.hh (class ACU_RhsAutomaton): (26) updated to agree with all the changes below * ACU_RhsAutomaton.cc (ACU_RhsAutomaton): (26b) stripped stable stuff; deleted normalize arg (addArgument): (26b) all stable stuff removed; term arg removed (close): (26b) all stable stuff removed (calculateFlattening): (26b) all stable stuff removed (normalizeBuildArguments): (26b) deleted (buildArguments): (26b) created from old fastBuildArguments) (calculateFlattening): (26b) deleted (buildArguments): (26b) now return allReducedFlag (tryToSetReducedFlag): (26b) deleted (allArgumentsReduced): (26b) deleted (replace): (26b) rewritten (construct): (26b) rewritten * ACU_RhsAutomaton.hh (class ACU_RhsAutomaton): (26b) stripped stable stuff (class ACU_RhsAutomaton): (26b) stripped normalize flag (class ACU_RhsAutomaton): (26b) removed normalize arg from ctor * ACU_DagNode.cc (normalizeEagerUpToReduced2): added (nonEagerInsert): use normalizeEagerUpToReduced() * ACU_DagNode.hh (class ACU_DagNode): added decl for normalizeEagerUpToReduced2() Thu Jul 17 10:38:22 1997 Steven Eker * ACU_DagNode.hh (class ACU_DagNode): added decl for nonEagerInsert() * ACU_DagNode.cc (nonEagerInsert): added (partialReplace): rewritten using nonEagerInsert() (partialConstruct): rewritten using nonEagerInsert() (copyWithReplacement): rewritten using nonEagerInsert() * ACU_RhsAutomaton.cc (addArgument): changed criteria for stable arg; must (1) be stable term; (2) not have our top symbol on top (+NEW*) (3) not have our identity's top symbol on top (*NEW*) (4) have a top symbol greater than that of last stable arg Condition (2) is necessary since we will no longer flatten rhs in eager context. Condition (3) allows us to restrict search for identity to case where we have unstable args. (normalizeBuildArguments): code for removing identity elements pushed into unstable case * ACU_Term.cc (compileRhs): calculate and pass normalize flag to ACU_RhsAutomaton() * ACU_RhsAutomaton.hh (class ACU_RhsAutomaton): runs -> runsBuffer (class ACU_RhsAutomaton): added and changed memebr function decls to agree with all the recent changes in ACU_RhsAutomaton.cc * ACU_RhsAutomaton.cc (normalizeBuildArguments): created from old buildArguments(); now do identity elimination (close): runs renamed to runsBuffer (replace): rewritten from scratch to be like new construct() (ACU_RhsAutomaton): initialize normalize flag Wed Jul 16 11:41:48 1997 Steven Eker * ACU_RhsAutomaton.cc (construct): fixed bug where we were applying tryToSetReducedFlag() to a non ACU dagnode produced by eliminateArgument(identity) (replace): fix bug similar to above (construct): rewritten from scratch to handle building dagNode in normalized or denormalized form depending on the circumstances (buildAliens): now much simpler; return void (allArgumentsReduced): added (calculateFlattening): added (fastBuildArguments): added (tryToSetReducedFlag): simplified Tue Jul 15 15:33:28 1997 Steven Eker * ACU_RhsAutomaton.cc (ACU_RhsAutomaton): simpleCtor initialization simplified * ACU_Symbol.cc (ACU_Symbol): added inert arg (eqRewrite): inert() call replaced by equationFree() call * ACU_Symbol.hh (class ACU_Symbol): added inert arg to ctor =====================================Engine26================================================= Mon Jul 14 10:48:39 1997 Steven Eker * ACU_DagNode.hh (class ACU_DagNode): changed decl for sortAndUniquize(); tidied private function decls * ACU_DagNormalization.cc (sortAndUniquize): code cleaned; make non-static; arg deleted; made local_inline (flattenSortAndUniquize): made local_inline (normalizeAtTop): deleted arg from sortAndUniquize() call Fri Jul 11 12:01:09 1997 Steven Eker * ACU_DagNode.hh (class ACU_DagNode): added decl for flattenSortAndUniquize() * ACU_DagNormalization.cc: created (normalizeAtTop): optimized; now use flattenSortAndUniquize() (flattenSortAndUniquize): added * ACU_DagOperations.cc: created * ACU_DagNode.cc: ACU specific functions split off into ACU_DagNormalization.cc and ACU_DagOperations.cc Wed Jul 9 10:53:22 1997 Steven Eker * ACU_RhsAutomaton.hh (class ACU_RhsAutomaton): added decl for tryToSetReducedFlag() * ACU_RhsAutomaton.cc (topSymbol): initialize simpleCtor (tryToSetReducedFlag): added * ACU_RhsAutomaton.hh (class ACU_RhsAutomaton): simpleStor flag added * ACU_Subproblem.cc (computeAssignment): added comment to note the fact that assigments are built in normal form (solveVariables): added topSymbol and buildReducedNodes local variables; now set reduced flags on nodes with our top symbol if the subject is reduced. * ACU_Matcher.cc (forcedLoneVariableCase): set reduced flag on created ACU dag node if subject is reduced and new dag node has its true sort after sort checkSort() * ACU_GreedyMatcher.cc (greedyPureMatch): if the subject is reduced and the top symbol is sort constraint free when we build assignments using the top symbols we compute their true sort (which is equal to their base sort) and set the reduced flag. This avoid unnecessary future normalization and matching attempts at the cost of a small matching overhead and having the matcher no longer oblivious to reduced flags and sort constraints. Ideally this optimization should only be done for assignments to variables that are "useful"; i.e. that appear in the rhs or condition. At some point we should add a "useful" flag to TopVariable or maybe a more sophisticated mechanism that would allow optimization of solutions. Tue Jul 1 10:19:58 1997 Steven Eker * ACU_DagNode.cc (compareArguments): use modified multiset ordering * ACU_Term.cc (compareArguments): use modified multiset ordering (compareArguments): use modified multiset ordering * ACU_DagNode.cc (sortAndUniquize): switched two tests on "r" because we now sort in ascending order (mergeSortAndUniquize): switched two tests on "r" because we now sort in ascending order (findFirstOccurrence): switched test on "r" because we now sort in ascending order (binarySearch): switched test on "r" because we now sort in ascending order (DagNode* version) (binarySearch): switched test on "r" because we now sort in ascending order (Term* version) Mon Jun 30 16:28:11 1997 Steven Eker * ACU_DagNode.cc (compareArguments): rewritten to do multiset ordering under the assumption that args are sorted in ascending order * ACU_RhsAutomaton.cc (buildArguments): changed comparison to r > 0 now that we want to swap args into ascending order (addArgument): changed test for adding new stable arg to < 0 since stable args will now be in ascending order of symbols * ACU_Term.cc (pairCompare): use ascending rather than descending order to sort ACU arg list (compareArguments): rewritten to do multiset ordering under the assumption that args are sorted in ascending order (Term* version) (compareArguments): rewritten to do multiset ordering under the assumption that args are sorted in ascending order (DagNode* version) Fri Jun 27 15:50:27 1997 Steven Eker * ACU_DagNode.hh (class ACU_DagNode): copyEagerUptoReduced2() and clearCopyPointers2() made private * ACU_DagNode.cc (eliminateArgument): use copyReducible() rather than copyUptoEager(); we weren't calling clearCopyPointers() which was a serious but subtle bug. (copyWithReplacement): use copyReducible() rather than copyUptoEager(); we weren't calling clearCopyPointers() (partialReplace): use copyReducible() rather than copyUptoEager(); we weren't calling clearCopyPointers() (partialConstruct): use copyReducible() rather than copyUptoEager(); we weren't calling clearCopyPointers() * ACU_Symbol.cc (copyAndReduceSubterms): use copyReducible() rather than copyUptoEager() and clearCopyPointers(); Wed Jun 25 15:15:12 1997 Steven Eker * ACU_Symbol.cc: added #include "variable.hh" Tue Jun 24 15:53:31 1997 Steven Eker * ACU_LhsAutomaton.cc (addTopVariable): changed Variable* to VariableTerm* * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): changed Variable* to VariableTerm* in addTopVariable() decl * ACU_Term.cc: added #include "variable.hh" * ACU_LhsCompiler1.cc (analyseConstraintPropagation): use VariableTerm::downCast() (compileLhs): use VariableTerm::downCast() * ACU_Term.cc (compileRhs): use VariableTerm::downCast() Thu Jun 19 10:38:03 1997 Steven Eker * ACU_Symbol.cc: deleted #include "unionFind.hh" Tue Jun 17 16:40:13 1997 Steven Eker * ACU_Symbol.cc (compileOpDeclarations): no longer do the assoc stuff here * ACU_Symbol.hh (class ACU_Symbol): deleted compileEquations() decl * ACU_Symbol.cc (finalizeSortInfo): added (compileEquations): deleted * ACU_Symbol.hh (class ACU_Symbol): added decl for finalizeSortInfo() Wed Jun 11 10:35:22 1997 Steven Eker * ACU_LhsCompiler1.cc (analyseConstraintPropagation): use willGroundOutMatch() (compileLhs): use willGroundOutMatch() * ACU_LhsCompiler2.cc (findConstraintPropagationSequence): use willGroundOutMatch() Tue Jun 10 10:24:35 1997 Steven Eker * ACU_LhsCompiler2.cc (findConstraintPropagationSequence): don't add in grounded out aliens unless they also "honor ground out match". Fri Jun 6 18:32:04 1997 Steven Eker * ACU_Term.hh (class ACU_Term): deleted addSubsumedAliens() decl * ACU_LhsCompiler2.cc (compileAliensOnlyCase): removed call to addSubsumedAliens(); We cannot safely add subsumed aliens for the following reason: Even though the subsumed alien will not steal the only match for its subsuming alien (unless there is no overall match) it could take the wrong match if there is a subproblem; and we would not discover this until the solve phase when it is too late. We could make the use of this optimization conditional on there being no subproblem at match time but this complicates what is a very minor infrequently usable optimization beyond its utility - so we ditch it altogether. (addSubsumedAliens): deleted * ACU_DagNode.hh (class ACU_DagNode): added matchVariableWithExtension() decl * ACU_Symbol.hh (class ACU_Symbol): deleted matchVariableWithExtension() decl * ACU_DagNode.cc (matchVariableWithExtension): added * ACU_Symbol.cc (matchVariableWithExtension): deleted Thu Jun 5 11:48:46 1997 Steven Eker * ACU_DagNode.cc (copyEagerUptoReduced2): adapted from old copyEagerUptoReduced() (clearCopyPointers2): adapted from old clearCopyPointers() * ACU_DagNode.hh (class ACU_DagNode): decls for clearCopyPointers() and copyEagerUptoReduced() changed * ACU_Subproblem.cc (solveVariables): don't pass context in call to computeAssignment() * ACU_Subproblem.hh (class ACU_Subproblem): updated computeAssignment() decl * ACU_Subproblem.cc (computeAssignment): no longer compute sort of returned DagNode (solveVariables): use inErrorSort() rather than computeTrueSortWhilePreservingContext() (solveVariables): use checkSort() now that assignment is no longer guarenteed to have a sort (computeAssignment): removed context arg as no longer needed * ACU_Symbol.cc (ACU_Symbol): don't pass stable arg to Symbol; in fact we were aleays passing true which was a bug! ==============================Engine24==================================== Tue Jun 3 17:01:31 1997 Steven Eker * ACU_CollapseMatcher.cc (uniqueCollapseMatch): now cope with abstraction variables (multiwayCollapseMatch): removed error check for matching identity at top because such a match may ultimately fail due to abstraction subproblems and is therefore not necessarily illegal. (collapseMatch): handle abstraction variables in multiway collapse case Mon Jun 2 11:16:05 1997 Steven Eker * ACU_Symbol.cc (compileOpDeclarations): move identity code here because we need sorts to be done before we can do collapse analysis * ACU_LhsAutomaton.cc (dump): handle abstraction variables * ACU_Matcher.cc (match): Assert in wrong place * ACU_Term.cc (determineCollapseSymbols): fixed bug where we had wrong test for setting p.collapseToOurSymbol * ACU_LhsAutomaton.cc (addAbstractionVariable): fixed bug where we were assigning tv.upperBound to itself rather than initializing it from upperBound arg * ACU_Matcher.cc (fullMatch): pass nrVariables arg to VariableAbstractionSubproblem() Fri May 30 11:56:07 1997 Steven Eker * ACU_LhsCompiler1.cc (compileLhs): check abstractionVariableIndex against NONE rather than 0 * ACU_Matcher.cc (match): handle the variable only case case where the last unbound variable is an abstraction variable and there is nothing to bind it to except identity (forcedLoneVariableCase): rewritten to deal with abstraction variables (fullMatch): deal with abstraction variables * ACU_LhsCompiler1.cc (compileLhs): rewritten to handle abstractionVariable and honorsGroundOutMatch() * ACU_LhsAutomaton.cc (addTopVariable): set abstracted to 0 * ACU_LhsCompiler1.cc (analyseConstraintPropagation): rewritten to handle abstractionVariable and honorsGroundOutMatch() * ACU_LhsAutomaton.cc (addAbstractionVariable): added * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): added abstracted field to struct TopVariable (class ACU_LhsAutomaton): added decl for addAbstractionVariable() Thu May 29 16:57:27 1997 Steven Eker * ACU_Term.cc (determineCollapseSymbols): major rewrite to set honorsGroundOutMatch and collapseToOurSymbol and matchOurIdentity flags (dumpArguments): print collapseToOurSymbol and matchOurIdentity * ACU_Term.hh (class ACU_Term): added collapseToOurSymbol and matchOurIdentity to struct Pair Wed May 28 11:29:39 1997 Steven Eker * ACU_Subproblem.cc (deepSelfDestruct): fixed long standing memory leak where we were deleting rather than deepSelfDestruct()ing edge subproblems * ACU_CollapseMatcher.cc (multiwayCollapseMatch): pass identityDag arg to bindUnboundVariablesToIdentity() (bindUnboundVariablesToIdentity): added identityDag arg * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): added identityDag arg to bindUnboundVariablesToIdentity() * ACU_LhsAutomaton.cc: added include for SubproblemDisjunction * ACU_CollapseMatcher.cc (multiwayCollapseMatch): now use SubproblemDisjunction rather than ACU_CollapseSubproblem Tue May 27 11:19:03 1997 Steven Eker * ACU_CollapseMatcher.cc (multiwayCollapseMatch): considerably simplified using DagNode::matchVariable() Fri May 23 14:18:00 1997 Steven Eker * ACU_CollapseSubproblem.cc: created * ACU_CollapseMatcher.cc (multiwayCollapseMatch): general case added * ACU_CollapseSubproblem.hh (class ACU_CollapseSubproblem): created * ACU_CollapseMatcher.cc (uniqueCollapseMatch): code cleaning; vi eliminated (bindUnboundVariablesToIdentity): added (multiwayCollapseMatch): implemented 1 bound variable, identity subject, 0 viable variables and 1 viable variable cases Thu May 22 10:48:52 1997 Steven Eker * ACU_Matcher.cc (match): Don't do matchAtTop assertion until we've established that the subject actualy has our symbol on top since an alien (e.g. free) symbol may not have extension. * ACU_LhsCompiler1.cc (compileLhs): fixed bug where we were using !empty rather than !empty() to decide whether collapse possible (compileLhs): uniqueCollapseAutomaton must be passed our matchAtTop flag to ensure matching with extension is performed if necessary. * ACU_CollapseMatcher.cc (multiwayCollapseMatch): added (uniqueCollapseMatch): added Wed May 21 15:19:01 1997 Steven Eker * ACU_LhsAutomaton.cc (ACU_LhsAutomaton): initialize uniqueCollapseAutomaton * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): add uniqueCollapseAutomaton arg to ctor decl * ACU_LhsCompiler1.cc (compileLhs): pass flag saying whether we could collapse to ACU_LhsAutomaton() (compileLhs): compute uniqueCollapseAutomaton if needed * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): add collapsePosible arg to ctor decl * ACU_LhsAutomaton.cc (ACU_LhsAutomaton): initialize collapse possible flag * ACU_Term.cc (determineCollapseSymbols): need to insert abstraction variables for subterms that can't collapse but which have our identity as their top symbol and are non-ground. (determineCollapseSymbols): non longer assume that a subterm might match the idenitity element because it has the same top symbol as the identity element - check to see also that it is non-ground. Tue May 20 16:24:31 1997 Steven Eker * ACU_Term.cc (dumpArguments): added * ACU_Term.hh (class ACU_Term): added decl for dumpArguments() * ACU_Matcher.cc (match): temporarily comment out unfinished collapse code so we can test variable abstraction * ACU_Term.cc (determineCollapseSymbols): rewritten to do selective variable abstraction Mon May 19 10:48:23 1997 Steven Eker * ACU_Term.cc (determineCollapseSymbols): now fill out uniqueCollapseSubtermIndex and abstractionVariableIndex * ACU_Term.hh (class ACU_Term): added uniqueCollapseSubtermIndex (class ACU_Term): added abstractionVariableIndex to Pair (no longer really a pair! If this works out we will rename it to Triple. Fri May 16 11:38:36 1997 Steven Eker * ACU_CollapseMatcher.cc: created * ACU_Matcher.cc (match): added call to collapseMatch() in the case where top symbol mis-matches and collapsePossible * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): added collapsePossible flag and uniqueCollapseAutomaton pointer * ACU_Term.cc (compileRhs): pass Term* rather than Symbol* for first arg of addArgument() * ACU_RhsAutomaton.hh (class ACU_RhsAutomaton): change decl for addArgument() * ACU_RhsAutomaton.cc (addArgument): rewritten to use se Term::stable() rather than Symbol::stable(). First arg is now a Term* * ACU_LhsAutomaton.cc (addGroundedOutAlien): use Term::stable() rather than Symbol::stable() (addNonGroundAlien): use Term::stable() rather than Symbol::stable() Wed May 14 15:42:04 1997 Steven Eker * ACU_Term.cc (analyseCollapses): deleted * ACU_Term.hh (class ACU_Term): deleted analyseCollapses() decl * ACU_Term.cc (determineCollapseSymbols): added * ACU_Term.hh (class ACU_Term): added decl for determineCollapseSymbols() * ACU_Symbol.cc (eqRewrite): changed comment on repudiate call now that inErrorSort() can leave sort info behind Tue May 13 10:29:27 1997 Steven Eker * ACU_LhsAutomaton.cc: comment out #include "sortCheckSubproblem.hh" * ACU_Matcher.cc (forcedLoneVariableCase): use DagNode::checkSort() to simplify code Fri May 9 15:55:04 1997 Steven Eker * ACU_Term.cc (analyseCollapses): fixed bug where we need to check multiplicity against 1 in order to return early Wed May 7 16:46:17 1997 Steven Eker * ACU_Term.cc (analyseCollapses): added Thu Apr 10 16:16:03 1997 Steven Eker * ACU_Matcher.cc (forcedLoneVariableCase): must repudiateSort() in the case where the base sort is not small enough and the top symbol is not sort constraint free as the base sort we calculated may not be the true sort and will inhibit the calculation of the true sort during the solution of the sort check subprblem. Wed Apr 2 16:54:05 1997 Steven Eker * ACU_Subproblem.cc (solveVariables): when solving a trivial system with extension, use extensionInfo->setWholeFlag(true) rather than extensionInfo->clear() (trying to fix UMR: Uninitialized memory read reported by purify). Fri Mar 28 16:51:53 1997 Steven Eker * ACU_DagNode.hh (class ACU_DagNode): decl for makeExtensionInfo() added * ACU_DagNode.cc (makeExtensionInfo): added Wed Mar 26 11:02:46 1997 Steven Eker * ACU_Matcher.cc (buildBipartiteGraph): rewritten to use findFirstOccurrence() (aliensOnlyMatch): rewritten to use findFirstOccurrence() (eliminateGroundedOutAliens): rewritten to use findFirstOccurrence() * ACU_GreedyMatcher.cc (greedyMatch): test top symbol before multiplicity Tue Mar 25 12:17:05 1997 Steven Eker * ACU_GreedyMatcher.cc (greedyMatch): rewritten to use findFirstOccurrence() * ACU_DagNode.hh (class ACU_DagNode): added decl for findFirstOccurrence() * ACU_DagNode.cc (findFirstOccurrence): added * ACU_Subproblem.cc (computeAssignment): initialized col to avoid spurious uninit warning from g++ * ACU_LhsCompiler3.cc (compileGreedyAndFullCases): pass term in addNonGroundAlien() call * ACU_LhsCompiler2.cc (compileAliensOnlyCase): pass term in addNonGroundAlien() calls * ACU_LhsCompiler1.cc (compileLhs): pass term in addGroundedOutAlien() call * ACU_LhsAutomaton.cc (addGroundedOutAlien): store topSymbol if stable, 0 otherwise (addNonGroundAlien): store topSymbol if stable, 0 otherwise * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): added topSymbol field to NonGroundAlien struct; added Term* alien arg to addGroundedOutAlien() and addNonGroundAlien() * ACU_GreedyMatcher.cc (greedyPureMatch): new condition for choosing between false and UNDECIDED when we can't find a variable to assign some subject to in phase 2. Fri Mar 21 18:54:28 1997 Steven Eker * ACU_GreedyMatcher.cc (greedyPureMatch): new technique for calculating failure mode in phase 1. (greedyMatch): call greedyPureMatch with extra arg * ACU_Matcher.cc (match): call greedyPureMatch with extra arg Thu Mar 20 16:05:15 1997 Steven Eker * ACU_Matcher.cc (multiplicityChecks): split off case where maxPatternMultiplicity = 1 * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): extensionInfo removed from multiplicityChecks and totalMultiplicity added as data member; the aim is to save the totalSubjectMultiplicity so we don't have to mess with extensionInfo until it is clear that it is needed. (After checking with quantify) Tue Mar 18 16:07:47 1997 Steven Eker * ACU_Symbol.cc (matchVariableWithExtension): set extensionInfo upperBound to avoid crashing when trying to build diophantine system Wed Feb 19 16:08:49 1997 Steven Eker * ACU_LhsCompiler3.cc (findFullSequence): remember to expand sequenece before putting stuff in it. Thu Feb 13 10:41:49 1997 Steven Eker * ACU_LhsCompiler1.cc (compileLhs): greedy = !inErrorSort Wed Feb 12 16:11:35 1997 Steven Eker * ACU_GreedyMatcher.cc (greedyPureMatch): make sure we don't assign to much to extension * ACU_Subproblem.cc (extractDiophantineSystem): use extensionInfo upper bound to bound extension row in diophantine system * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): amended multiplicityChecks() decl * ACU_ExtensionInfo.hh (setUpperBound): added (getUpperBound): added * ACU_Matcher.cc (match): pass extensionInfo to multiplicityChecks(); test extensionInfo rather than matchAtTop (multiplicityChecks): set upper bound on size of extension if necessary * ACU_Subproblem.hh (class ACU_Subproblem): identityDag deleted * ACU_Subproblem.cc (solveVariables): added code to bind variables to idenity in the case where ther are unbound variables and no system (solveVariables): handle the case where the sort of the dag node reeturn by computeAssignment() is unknown; this can only be the identity case (solveVariables): unbinding code simplified (extractDiophantineSystem): handle case where there are no unused subjects but all variables case take the identity by keeping track of nrNonIdentityVariables (computeAssignment): don't bother computing the sort of the identity dag since our lower bound condition guarentees that the variable can take the identity element (computeAssignment): return 0 in identity case (solveVariables): handle case where 0 is returned from computeAssignment() Fri Feb 7 14:49:35 1997 Steven Eker * ACU_Term.cc (findEagerVariables): static_cast removed for symbol() (markEagerArguments): static_cast removed for symbol() * ACU_DagNode.cc (copyEagerUptoReduced): static_cast removed for symbol() (overwriteWithClone): static_cast removed for symbol() (makeClone): static_cast removed for symbol() (copyWithReplacement): static_cast removed for symbol() (partialReplace): static_cast removed for symbol() (partialConstruct): static_cast removed for symbol() (eliminateArgument): static_cast removed for symbol() * ACU_DagNode.hh (symbol): added * ACU_Subproblem.hh (class ACU_Subproblem): identityDag pointer added * ACU_Subproblem.cc (addEdge): optimized (addTopVariable): optimized (extractDiophantineSystem): optimized (solveVariables): zero out idenity dag pointer since the identity element that it may point to may get garbage collected before in can be used (computeAssignment): handle identity case * ACU_Matcher.cc (fullMatch): pass 0 as lower bound for variables that can take identity * ACU_LhsCompiler1.cc (compileLhs): set error sort flag only if we are matching with extension. Prevent compiling with greedy strategy if we are in the error sort flag is set. This fixes a bug because the ACU greedy matcher does not do sort check for matched part. Thu Feb 6 16:46:16 1997 Steven Eker * ACU_GreedyMatcher.cc (greedyMatch): simplified (greedyPureMatch): deal with identity in first phase by allowing a variable with takeIdentity set to have no firstSubject if none can be found. (greedyPureMatch): in 3rd phase deal with variables that were assigned nothing by binding them to identity dag Wed Feb 5 11:57:26 1997 Steven Eker * ACU_Symbol.cc (ACU_Symbol): zero identityAutomaton and identitySubstitution. Handle no identity case. * ACU_Symbol.hh (makeIdentityDag): added * ACU_Symbol.cc (compileEquations): added code to compile a rhsAutomaton for our identity element. Handle no identity case * ACU_GreedyMatcher.cc: created * ACU_Matcher.cc (multiplicityChecks): totalPatternMultiplicity -> totalLowerBound (eliminateBoundVariables): handle the case where a top variable is bound to our identity (match): recognize and handle special case of one variable which can take identity vs no subjects (no extension case) Tue Feb 4 12:18:37 1997 Steven Eker * ACU_LhsAutomaton.cc (updateTotals): totalPatternMultiplicity -> totalLowerBound (addTopVariable): fill out takeIdentity field and take it into account when updating totals (dump): output takeIdenity field * ACU_LhsAutomaton.hh (class ACU_LhsAutomaton): takeIdentity field added to struct TopVariable (class ACU_LhsAutomaton): totalPatternMultiplicity -> totalLowerBound (since identity may result in some pattern variables not being counted) * ACU_LhsCompiler3.cc (findFullSequence): use weakConstraintPropogation() * ACU_LhsCompiler2.cc (compileAliensOnlyCase): use weakConstraintPropogation() * ACU_LhsCompiler1.cc (weakConstraintPropogation): added * ACU_LhsCompiler3.cc (compileGreedyAndFullCases): simplified using findFullSequence() (findFullSequence): added Fri Jan 31 17:07:29 1997 Steven Eker * ACU_LhsCompiler3.cc (compileGreedyAndFullCases): removed greedy argument; code cleaning (lengthCompare): deleted (findGreedySequence): no longer deal with fully independent aliens first as I can't see any justification for doing so (findIndependentSets): no longer sort independent sets by length (can't think of any justification). * ACU_LhsCompiler1.cc (compileLhs): compileGreedyAndFullCases() no longer takes greedy argument * ACU_LhsCompiler2.cc (compileAliensOnlyCase): code cleaning * ACU_LhsCompiler1.cc (compileLhs): code cleaning; make sure subproblemLikely is false in lone variable case Thu Jan 30 16:17:56 1997 Steven Eker * ACU_LhsCompiler3.cc: created (compileGreedyAndFullCases): added * ACU_Term.hh (symbol): added * ACU_LhsCompiler2.cc: created (compileAliensOnlyCase): added Mon Jan 27 10:59:41 1997 Steven Eker * ACU_LhsAutomaton.hh: created * ACU_LhsAutomaton.cc: created * ACU_Matcher.cc: created Thu Jan 16 18:17:11 1997 Steven Eker * ACU_RhsAutomaton.hh (class ACU_RhsAutomaton): topSymbol is ACU_Symbol* rather that Symbol* * ACU_RhsAutomaton.cc (construct): added call to eliminate identity elements (replace): added call to eliminate identity elements (ACU_RhsAutomaton): take ACU_Symbol* rather that Symbol* Mon Jan 13 12:53:38 1997 Steven Eker * ACU_RhsAutomaton.hh: created Fri Jan 10 11:15:42 1997 Steven Eker * ACU_Term.cc: created (normalize): now delete idenity elements, collapsing to subterm where necessary * ACU_DagNode.hh (class ACU_DagNode): enum NormalizationResult removed; declaration for eliminateArgument() added * ACU_DagNode.cc (copyWithReplacement): handle case where collapse is avoided because single remaining argument has multiplicity > 1 (partialReplace): handle case where collapse is avoided because single remaining argument has multiplicity > 1 (partialConstruct): handle case where collapse is avoided because single remaining argument has multiplicity > 1 (eliminateArgument): added to handle the removal of identity elements Thu Jan 9 15:40:11 1997 Steven Eker * ACU_DagNode.cc: created (overwriteWithClone): fixed serious bug where we were copying sort of overwritten node rather than overwriting node (mergeSortAndUniquize): old commented out flip code removed (eliminateSubject): unnecessary ACU_DagNode::'s removed (partialConstruct): handle case where replacement it the identity element (partialReplace): handle case where replacement it the identity element (copyWithReplacement): handle case where replacement it the identity element Wed Jan 8 10:26:06 1997 Steven Eker * ACU_Symbol.cc (eqRewrite): now cope with the possibility that whenever we normalize at top it is possible that we could collpase out of the current theory (computeBaseSort): added uniform sort code optimization; simplified uniform sort code computation by passing vectors of sort codes rather thhan vectors of vectors of int * ACU_DagNode.hh (class ACU_DagNode): added enum NormalizationResult * ACU_Symbol.cc: created (~ACU_Symbol): added (compileEquations): added as a hack to process identity element after all other op decl processing has been done. (ACU_Symbol): do normalization here to avoid problem of later identities that could possibly depend on this one. * ACU_DagArgumentIterator.cc: created * ACU_ArgumentIterator.hh (class ACU_ArgumentIterator): created * ACU_DagArgumentIterator.hh (class ACU_DagArgumentIterator): created * ACU_ArgumentIterator.cc: created * ACU_ExtensionInfo.hh (class ACU_ExtensionInfo): created * ACU_Theory.cc: created * ACU_Theory.hh: created * ACU_Term.hh (class ACU_Term): created * ACU_Symbol.hh (getIdentity): added * ACU_DagNode.hh (class ACU_DagNode): created * ACU_Symbol.hh (class ACU_Symbol): created Maude-Maude3.2/src/ACU_Theory/ChangeLog.AC_Theory000066400000000000000000000732451420036611000215100ustar00rootroot00000000000000Mon Feb 3 14:07:20 1997 Steven Eker * AC_DagNode.cc (overwriteWithClone): fixed serious bug where we were copying sort of overwritten node rather than overwriting node Tue Jan 7 10:56:15 1997 Steven Eker * AC_Symbol.cc (eqRewrite): Lazy case rewritten using inErrorSort() to fix two subtle bugs: (1) If after coputing base sort we were not in the error sort we would return with a possibly incorrect sort in the dag node which would be accepted as gospel by reduce(). (2) If after copying and reducing subterms the and normalizing at top the number of subterms changed, our extension information would be invalid. (eqRewrite): Semi-eager case: removed superfluous Assert and repudiateSortInfo(). (eqRewrite): replaced calls to repudiateSortInfo() since applyReplace() may compute true sort which is invalidated by rewriting below Tue Dec 24 17:27:21 1996 Steven Eker * AC_LhsAutomaton.cc (forcedLoneVariableCase): rewritten to use computeBaseSort() and sortConstraintFree() * AC_Subproblem.cc (matchedPortionOK): call to findBaseSort() replaced by call to computeBaseSort() (computeAssignment): computeSortWhilePreservingContext() -> computeTrueSortWhilePreservingContext() (solveVariables): computeSortWhilePreservingContext() -> computeTrueSortWhilePreservingContext() * AC_Symbol.hh (class AC_Symbol): findBaseSort() deleted * AC_Symbol.cc (eqRewrite): adapted from rewrite(); call to DagNode::computeSort() replaced by DagNode::computeTrueSort(); call to Symbol::computeSort() in lazy case replaced by Symbol::computeBaseSort(); (computeBaseSort): adapted from findBaseSort() (computeTrueSort): adapted from computeSort() * AC_Symbol.hh (class AC_Symbol): computeSort() replaced by computeBaseSort() and computeTrueSort(); rewrite() -> eqRewrite() Thu Dec 19 14:12:11 1996 Steven Eker * AC_DagNode.cc (makeClone): copy sort information to avoid recomputation Thu Dec 12 17:43:19 1996 Steven Eker * AC_DagNode.cc (overwriteWithClone): copy sort information; this is needed so then when we rewrite with a collapse equation we do not lose sort infomation with the possibility of infinite looping on foreign sort constraints Wed Dec 11 12:04:02 1996 Steven Eker * AC_Symbol.cc (findBaseSort): use sortConstraintFree() rather than obselete test Mon Dec 9 15:10:26 1996 Steven Eker * AC_Symbol.cc (computeSort): use new constrainToSmallerSort() calling convention Mon Nov 25 19:00:06 1996 Steven Eker * AC_Symbol.cc (AC_Symbol): added constructor arg Wed Nov 20 12:15:40 1996 Steven Eker * AC_Symbol.cc (matchVariableWithExtension): implemented Tue Nov 19 18:33:05 1996 Steven Eker * AC_Symbol.hh (class AC_Symbol): matchVariableWithExtension() added * AC_LhsAutomaton.cc (fullMatch): pass 1 as lowerBound to addTopVariable() * AC_Subproblem.cc (addTopVariable): lowerBound added (extractDiophantineSystem): use lowerBound * AC_Subproblem.hh (class AC_Subproblem): lowerBound added to addTopVariable() and struct TopVariable Thu Nov 14 18:01:50 1996 Steven Eker * AC_DagNode.cc (makeClone): added Tue Oct 15 17:16:01 1996 Steven Eker * AC_RhsAutomaton.cc (dump): added indentLevel arg * AC_LhsAutomaton.cc (dump): rewritten to do indentation Fri Oct 11 17:49:08 1996 Steven Eker * AC_Symbol.cc (partialReplace): deleted (partialConstruct): deleted * AC_DagNode.cc (copyWithReplacement): AC_DagNode:: removed from mergeSortAndUniquize() call (partialReplace): added (partialConstruct): added Fri Sep 27 11:24:48 1996 Steven Eker * AC_DagNode.cc (AC_DagNode): trackStorage call removed (markArguments): evacuate() call added * AC_DagNode.hh (DagNode): trackStorage call removed * AC_DagNode.cc (mergeSortAndUniquize): mergeBuffer made local automatic rather than class static Fri Aug 16 16:47:49 1996 Steven Eker * AC_Symbol.cc (specificRewrite): added Fri Aug 9 19:01:59 1996 Steven Eker * AC_Symbol.cc (partialConstruct): added (ruleRewrite): added * AC_DagNode.cc (stackArguments): added (copyWithReplacement): added Tue Aug 6 15:21:40 1996 Steven Eker * AC_LhsCompiler.cc: created by extracting compilation code from AC_Term.cc (analyseConstraintPropagation): matchAtTop arg removed (compileLhs): boundAbove arg reoved togtehr with code that updates it and passes it (findConstraintPropagationSequence): don't pass matchAtTop arg * AC_Term.hh (class AC_Term): removed boundAbove arg from compileLhs(); removed matchAtTop arg from analyseConstraintPropagation() Wed Jul 31 17:24:27 1996 Steven Eker * AC_Symbol.cc (makeTerm): added Thu Jul 18 16:45:12 1996 Steven Eker * AC_Term.cc (findLongestIncreasingSequence): fixed bug where we were not handling UNDECIDED value from subsumes() correctly (addSubsumedAliens): fixed bug where we were not handling UNDECIDED value from subsumes() correctly Fri Jun 28 17:13:03 1996 Steven Eker * AC_DagNode.cc (normalizeAtTop): else branch inside loop simplified * AC_Term.cc (findGreedySequence): ASsert() -> Assert() * AC_Symbol.cc: ASsert() -> Assert() Fri Jun 21 10:09:03 1996 Steven Eker * AC_Term.cc (compileLhs): heavy rewrite to use new compileLhs() and track subproblemLikely; use variableIndex.conditionVariables() * AC_Symbol.cc (compileOpDeclarations): use new PermuteSymbol functions (AC_Symbol): initialize BinarySymbol * AC_Symbol.hh (class AC_Symbol): now derived from PermuteSymbol * AC_Term.cc (addIndependentAliens): added (addSubsumedAliens): add; these two functions replace addForceableAliens() (addSubsumedAliens): fixed goto label bug (compileLhs): subsumed aliens cannot be allowed to affect baoundUniquely even though any variables they bind won't exists in their context or the condition since this would cause our internal consistancy checks to fail Thu Jun 20 14:12:21 1996 Steven Eker * AC_Term.cc (findConstraintPropagationSequence): fixed bug where we were swaping wrong element when adding grounded out stuff to sequence (findConstraintPropagationSequence): fix bug: i -> j in search for grounded out stuff * AC_LhsAutomaton.cc (buildBipartiteGraph): fixed bug where we were passing wrong pattern # to addEdge() when firstAlien != 0 * AC_Term.cc (findConstraintPropagationSequence): added (compileLhs): major rewrite (findGreedySequence): renamed (was findOptimalSequence()) (addForceableAliens): added (analyseConstraintPropagation): completely rewritten to match more powerful constraint propagation in compileLhs() Tue Jun 18 15:03:04 1996 Steven Eker * AC_DagNode.cc (compareArguments): added SPEED_HACK * AC_Term.cc (compareArguments): clean up both versions to make them look more like AC_DagNode::compareArguments() * AC_Term.hh (class AC_Term): revoked AC_ArgumentIterator friendship * AC_Term.cc (normalizeAliensAndFlatten): simplified and corrected possible bug arising from flattening in subterm with single arg of > 1 multiplicity * AC_DagNode.cc (compareArguments): optimized (mergeSortAndUniquize): use mergeBuffer; some code cleaning (normalizeAtTop): rewritten to avoid allocating destination vector (copyEagerUptoReduced): replaced C cast with static_cast (compareArguments): put const in static cast; (eliminateSubject): superfluous scope op deleted * AC_DagNode.hh (class AC_DagNode): added mergeBuffer * AC_DagNode.cc (sortAndUniquize): use runsBuffer * AC_DagNode.hh (class AC_DagNode): runsBuffer added * AC_Symbol.cc (findBaseSort): replaced sortIndexBuffer with utilityBuffer (partialReplace): replaced runs with utilityBuffer (partialReplace): remember to set utilityBuffer[0] = 0 * AC_Symbol.hh (class AC_Symbol): sortIndexBuffer and runs replaced by static Vector utilityBuffer Mon Jun 17 13:20:52 1996 Steven Eker * AC_DagNode.cc (sortAndUniquize): use AC_DagNode's runs vector (mergeSortAndUniquize): use static Vector and ensure we don't end up giving its allocated memory to the node we were working on * AC_Symbol.cc (partialReplace): use static runs vector (AC_Symbol): initialize runs buffer Sat Jun 15 14:11:03 1996 Steven Eker * AC_LhsAutomaton.cc (operator<<): added * AC_Term.cc (findLongestIncreasingSequence): a term can only subsume another for greedy matching if it has multiplicity 1 (compileLhs): fixed bug in the nrNonGroundAliens == 1 case Fri Jun 14 15:27:47 1996 Steven Eker * AC_Term.cc (compileLhs): rewrote to use new match strategies * AC_LhsAutomaton.cc (match): rewritten to use matchStrategy (greedyMatch): handle case where alien multiplicity > 1 (buildBipartiteGraph): matchable now a bool (forcedLoneVariableCase): removed returnedSubproblem = 0 (twice) (dump): removed linearUnconditional (AC_LhsAutomaton): removed linearUnconditional (topVariableCompare): now sort variables by decreasing multiplicity first (greedyPureMatch): handle variables with multiplicity > 1 * AC_LhsAutomaton.hh (class AC_LhsAutomaton): enum MatchStrategy added; linearUnconditional deleted Thu Jun 13 17:18:21 1996 Steven Eker * AC_LhsAutomaton.cc (aliensOnlyMatch): use SubproblemAccumulator (aliensOnlyMatch): fixed bug where we were only considering subject with = rather than >= multyiplicity (aliensOnlyMatch): avoid copying solution if local copy is known to be the same as current solution (greedyMatch): optimized use of scratch substitution Wed Jun 12 10:53:24 1996 Steven Eker * AC_LhsAutomaton.cc (aliensOnlyMatch): reorganised to use built in local Substitution (buildBipartiteGraph): reorganised to use built in local Substitution (greedyMatch): reorganised to use built in local and scratch Substitutions * AC_LhsAutomaton.hh (class AC_LhsAutomaton): added local and scratch data members to avoid run time allocation of substitutions * AC_LhsAutomaton.cc (AC_LhsAutomaton): added nrVariables arg, initialized local and scratch substitutions * AC_Term.cc (compileLhs): added nrVariables arg Sat Jun 8 15:54:31 1996 Steven Eker * AC_LhsAutomaton.cc (greedyMatch): return false if we couldn't find a match for an independent alien (dump): dump totalNonGroundAliensMultiplicity and nrIndependentAliens * AC_Term.cc (findIndependentSets): added (lengthCompare): added (findOptimalSequence): added (findLongestIncreasingSequence): added (compileLhs): added code for optimal sequence in greedy case * AC_LhsAutomaton.cc (addGroundedOutAlien): added * AC_Term.cc (compileLhs): rewritten; we deliberately introduce a bug in the case where the candidate is a non ground alien; this will be fixed when the constraint propagation code is revamped Fri Jun 7 14:14:38 1996 Steven Eker * AC_LhsAutomaton.cc (aliensOnlyMatch): use new SubproblemSequence constructor and semantics * AC_Theory.cc: Sequence's abolished throughout module * AC_Subproblem.cc (extractDiophantineSystem): use Vector.append() (twice) * AC_DagNode.cc (sortAndUniquize): use Vector.append() Thu Jun 6 12:25:45 1996 Steven Eker * AC_DagNode.cc (compareArguments): reversed size order REVERTING TO Engine13 AC_DagNode.cc AND AC_Term.cc; new orderings on multisets may be cheaper to compute but cause more shuffling of subterms and lower performance * AC_Term.cc (compareArguments): both versions: ordering changed to that on DagNodes (compareArguments): both versions: reversed size order * AC_DagNode.cc (compareArguments): optimized loop (compareArguments): changed ordering on multisets of subterms in the interest of more speed Wed Jun 5 18:27:19 1996 Steven Eker * AC_Subproblem.cc (extractDiophantineSystem): pass pre allocate sizes to diophantine system * AC_LhsAutomaton.cc (greedyPureMatch): modified to use new AC_ExtensionInfo semantics * AC_Subproblem.cc (fillOutExtensionInfo): modified to use new AC_ExtensionInfo semantics * AC_ExtensionInfo.hh (class AC_ExtensionInfo): revise to avoid allocating memeory for vector until it is clear it will actually be used (clear): don't set whole flag Sun Jun 2 17:08:38 1996 Steven Eker * AC_LhsAutomaton.cc (aliensOnlyMatch): added (buildBipartiteGraph): added (fullMatch): simplified, using buildBipartiteGraph() (match): major rewrite Sat Jun 1 14:53:43 1996 Steven Eker * AC_LhsAutomaton.cc (fullMatch): optimized use of local substitution * AC_Term.cc (compileLhs): dont pass linear unconditional arg * AC_LhsAutomaton.cc (addTopVariable): linearUnconditional arg removed; code cleaning (updateTotals): added (addGroundAlien): code cleaning (addNonGroundAlien): code cleaning (AC_LhsAutomaton): clear totalNonGroundAliensMultiplicity (addNonGroundAlien): update totalNonGroundAliensMultiplicity (multiplicityChecks): code cleaning (eliminateGroundAliens): code cleaning (forcedAliensCase): fixed bug where we were possibly trashing global solution whenever alien match failed (forcedAliensCase): deepSelfDestruct seq rather than delete it to avoid memory leak! (computeTotalMultiplicity): added (copyMultiplicity): renamed (match): code cleaning (greedyMatch): code cleaning (greedyPureMatch): code cleaning; use cheap failureMode optimization (dump): removed dump of TopVariable linearUnconditional field * AC_LhsAutomaton.hh (class AC_LhsAutomaton): added totalNonGroundAliensMultiplicity and nrIndependentNonGroundAliens data members; struct TopVariable loses its linearUnconditional flag * AC_LhsAutomaton.cc (fullMatch): serious memory leak where we forgetting to deepSelfDestruct subproblem on failure fixed (greedyMatch): fix memory leak where we were failing to deepSelfDestruct subproblem passes back to us Fri May 31 15:09:12 1996 Steven Eker * AC_LhsAutomaton.cc (AC_LhsAutomaton): store linearUnconditional flag (greedyMatch): added (copyMultiplicities): added (greedyPureMatch): removed linearUnconditional checks and multiplicity copying (match): added calls to copyMultiplicities() and additional linearUnconditional check (dump): now dump linearUnconditional flag * AC_Term.cc (compileLhs): pass linearUnconditional flag to AC_LhsAutomaton constructor * AC_LhsAutomaton.cc (forcedLoneVariableCase): hacked to use Sort* rather than SortCode (addTopVariable): store Sort* rather than SortCode (fullMatch): hacked for Sort* rather than SortCode (greedyPureMatch): hacked for Sort* rather than SortCode (dump): hacked for Sort* rather than SortCode (greedyPureMatch): temporrary warning about inefficiency added; code cleaning * AC_LhsAutomaton.hh (class AC_LhsAutomaton): struct TopVariable now hold Sort* rather than SortCode * AC_LhsAutomaton.cc (complete): added (topVariableCompare): added * AC_Term.cc (compileLhs): call AC_LhsAutomaton::complete() * AC_LhsAutomaton.cc (match): switched order of eliminateGroundAliens() and eliminateBoundVariables() (greedyPureMatch): added code to return false where possible if we fail to assign something to a variable Thu May 30 12:27:49 1996 Steven Eker * AC_LhsAutomaton.cc (dump): dump structure and linearUnconditional slots (greedyPureMatch): added (greedyPureMatch): bug fix: testing for bound rather than unbound variable in firstSubject assignment loop (match): need to clear returnedSubproblem if greedyPureMatch() succeeds * AC_Term.cc (compileLhs): pass linearUnconditional flag to addTopVariable * AC_LhsAutomaton.cc (addTopVariable): fill out structure slot (addTopVariable): take linearUnconditional arg and fill out linearUnconditional slot * AC_Symbol.cc (compileOpDeclarations): call associativeSortStructureAnalysis() * AC_Symbol.hh (sortStructure): added Wed May 29 16:32:51 1996 Steven Eker * AC_LhsAutomaton.cc (addTopVariable): code cleaning (eliminateGroundedOutAliens): code cleaning (forcedLoneVariableCase): much code cleaning (forcedAliensCase): added (AC_fullMatch): added * AC_LhsAutomaton.hh (class AC_LhsAutomaton): new fields added to struct TopVariable to make way for greedy pure matcher (class AC_LhsAutomaton): struct Subject added (class AC_LhsAutomaton): subjects and lastUnboundvariable data members added * AC_LhsAutomaton.cc (multiplicityChecks): added (eliminateBoundVariables): added (eliminateGroundAliens): added (eliminateGroundedOutAliens): added (forcedLoneVariableCase): added (match): major rewrite using new functions Tue May 28 11:52:29 1996 Steven Eker * AC_Term.cc (compileLhs): added code to detect opportunities to use greedy heuristic Fri May 24 11:07:17 1996 Steven Eker * AC_Subproblem.cc (matchedPortionOK): use findBaseSort(), context arg removed * AC_LhsAutomaton.cc (match): do necessary sort check on created AC_DagNode in "no aliens, 1 variable" case, using findBaseSort() and sortCheckSubproblem * AC_Symbol.hh (class AC_Symbol): added sortIndexBuffer data member * AC_Symbol.cc (findBaseSort): added (computeSort): reimplemented using findBaseSort() (findBaseSort): have sortIndexBuffer in AC_Symbol object rather than automatic to save a malloc() call * AC_Term.cc (analyseConstraintPropagation): reimplemented; assume Variable::analyseConstraintPropagation() works and use it to simplify code (compileLhs): changed to update boundUniquely correctly * AC_LhsAutomaton.cc (match): added code for "no aliens" case Thu May 23 10:19:28 1996 Steven Eker * AC_LhsAutomaton.cc (match): added code to deal with grounded out case without returning non-null subproblem (match): added code for the "no unbound variables" case * AC_Term.cc (compileLhs): do boundAbove.insert() after compileLhs(); is it really needed anyway? (compileLhs): insert(t->occursBelow()) not insert(occursBelow()) (compileLhs): fixed bug in test to determine if alien is grounded out * AC_LhsAutomaton.cc (dump): implemented, now take variableIndex arg Wed May 22 18:17:08 1996 Steven Eker * AC_LhsAutomaton.cc (match): eliminate grounded out aliens early on * AC_Term.cc (compileLhs): calculate grounded out arg for addNonGroundAlien() * AC_LhsAutomaton.hh (class AC_LhsAutomaton): store grounded out aliens in seperate vector * AC_LhsAutomaton.cc (addNonGroundAlien): take grounded out argument Mon May 20 10:20:56 1996 Steven Eker * AC_Subproblem.hh (class AC_Subproblem): secure member in struct TopVariable removed because DagRoots cannot be safely relocated * AC_Subproblem.cc (solveVariables): don't set secure * AC_Subproblem.hh (class AC_Subproblem): difference member of struct Edge is now a pointer to a LocalBinding since LocalBindings cannot be safely relocated when a vector expands * AC_Subproblem.cc (PatternNode::solve): use LocalBinding assert and retract (deepSelfDestruct): now delete difference along with subproblem (addEdge): use new operator- on Substitution (solve): check if difference is 0 before calling member functions on it * AC_Subproblem.hh (class AC_Subproblem): Edge struct now has LocalBinding member (rather that Substitution::Difference) Sat May 18 11:22:18 1996 Steven Eker * AC_Symbol.cc (rewrite): rewritten to use copyAndReduceSubterms() and to implement going eager on lazy AC symbols in the error sort Fri May 17 16:14:56 1996 Steven Eker * AC_Symbol.cc (copyAndReduceSubterms): added * AC_DagNode.cc: #include "dumpContext.hh" removed (normalizeAtTop): now return a bool; true if at least one flattening took place * AC_Subproblem.cc: #include "dumpContext.hh" removed * AC_LhsAutomaton.cc (dump): use streams * AC_RhsAutomaton.cc (dump): use streams Tue May 14 11:37:13 1996 Steven Eker * AC_RhsAutomaton.cc (buildArguments): treat two runs of length 1 as a special case to avoid expensive call to mergeSortAndUniquize() * AC_DagNode.cc (normalizeAtTop): must sortAndUniquize(argArray) after flattening * AC_RhsAutomaton.cc (buildArguments): removed const since we may need to write to "runs" vector * AC_Term.cc (compileRhs): pass symbol to addArgument() * AC_RhsAutomaton.cc (close): outlined; now flip unstable args back into original order; have a non-empty runs vector if there are any unstable args (addArgument): outline; stack stable args at front and unstable args at back; take symbols argument to make sure stable arg is less than last stable arg to really qualify for stable stack (Symbol): initialize new data members * AC_Term.cc (compileRhs): use addArgument(), close() and stable() * AC_RhsAutomaton.cc (topSymbol): now clears nrStable * AC_RhsAutomaton.hh (addArgument): created from setArgument(); now tracks stable arguments. (close): created from setDestination(); now sets up "runs" vector if needed; must be called _after_ all argumments have been added Mon May 13 13:44:57 1996 Steven Eker * AC_DagNode.cc (mergeSortAndUniquize): fixed bug where we were changing the value of d before we stored the position of the start of the odd run. Moved run position storage statement to start of basic block and then put an Assert in front of it to ensure we don't overwrite start position of previous odd run. (mergeSortAndUniquize): stripped out optimzation of back and forth copies because there is a serious bug: the copies may be needed in order to move elements backwards because the number of earlier elements shrunk during pass; we can't predict ahead of time whether the copy-back will need to happen so we can't omit the copy. * AC_Symbol.cc (partialReplace): use mergeSortAndUniquize() and binaryInsert() * AC_DagNode.cc (sortAndUniquize): now merge equal args and reverse out of order pairs of args to reduce number of runs (fastSortAndUniquize): deleted; old sortAndUniquize() deleted (sortAndUniquize): bug in recompuation of r fixed (mergeSortAndUniquize): avoid copying odd run if it will still be odd in next pass (or we avoided copying is last pass). This avoids copying a run back and forth without possibility of merging. (binaryInsert): added (pairCompare): deleted Sat May 11 16:32:40 1996 Steven Eker * AC_RhsAutomaton.cc (buildArguments): use new sortAndUniquize() * AC_DagNode.cc (mergeSortAndUniquize): added (sortAndUniquize): reimplemented using mergeSortAndUniquize() (normalizeAtTop): use new sortAndUniquize() * AC_Symbol.cc (AC_Symbol): pass stable = true Thu May 2 10:16:26 1996 Steven Eker * AC_Subproblem.cc (solveVariables): use computeSortWhilePreservingContext() to avoid corrupting current solution (computeAssignment): use computeSortWhilePreservingContext() to avoid corrupting current solution (matchedPortionOK): use computeSortWhilePreservingContext() to avoid corrupting current solution * AC_Symbol.cc (rewrite): repudiate sort in SEMI_EAGER case; this is because Symbol::applyReplace() may indirectly call AC_Subproblem::solveVariables() which under rare circumstances may compute a sort for the subject; which may have been invalidated by reducing the subjects arguments (and normalizing) (computeSort): now handle sort constraints * AC_Subproblem.cc (solveVariables): added check against whole subject being in the error sort in the case where the diophantine system is null. Wed May 1 10:39:56 1996 Steven Eker * AC_Subproblem.cc (solveVariables): fixed subtle bug where binding found for variables involved in old diophantine system were being eliminated from afterMultiplicity during formation of new diophantine system. * AC_Term.cc (compileLhs): fixed bug where we were passing boundUniquely rather than local to subautomaton compilation * AC_ExtensionInfo.hh (clear): added * AC_Subproblem.cc (extractDiophantineSystem): handle trvial system correctly (fillOutExtensionInfo): modified to use AC_ExtensionInfo.clear() (solveVariables): modified to deal with null system correctly; use AC_ExtensionInfo.clear() Tue Apr 30 15:20:45 1996 Steven Eker * AC_Subproblem.cc (AC_Subproblem): use initializers for const data members (deepSelfDestruct): implemented * AC_Subproblem.hh (class AC_Subproblem): rearranged data members, made some const * AC_Subproblem.cc (computeAssignment): added; bug where we failed to build AC binding for single subterm with > 1 multiplicity removed (solveVariables): use computeAssignment(), check sorts of variable bindings. (matchedPortionOK): added (solveVariables): use matchedPortionOK() (extractDiophantineSystem): added (fillOutExtensionInfo): added (solveVariables): use extractDiophantineSystem() and fillOutExtensionInfo() Mon Apr 29 10:45:06 1996 Steven Eker * AC_Subproblem.cc (solveVariables): added missing "return true" * AC_DagNode.cc (normalizeAtTop): may need to flatten even if expansion = 0 (subterm may only have 1 actual subterm but with > 1 multiplicity). needToFlatten flag added * AC_Symbol.cc (rewrite): update nrArgs after both normalizeAtTop() calls since flattening may increase number of args * AC_Subproblem.cc (solveVariables): use subject->symbol() in place of topSymbol (solveVariables): set extensionInfo whole flag correctly (solvePatterns): deal with the nrPatterns == 0 case (solveVariables): fixed for loop bug: nrRows -> nrColumns (solveVariables): fixed for loop bug: <= -> < (solveVariables): use nrVars instead of nrRows to take account of extension row (solveVariables): added extensionRow variable * AC_Subproblem.hh (class AC_Subproblem): topSymbol data member removed Fri Apr 26 11:04:19 1996 Steven Eker * AC_Term.cc (compileLhs): implemented (compileLhs): fixed trivial bug - missing '()'s after "theory" * AC_LhsAutomaton.cc (addNonGroundAlien): added (addGroundAlien): added (addTopVariable): added * AC_Symbol.hh (sortBound): added * AC_LhsAutomaton.cc (eliminateSubject): deleted (match): modified to use AC_DagNode::eliminateSubject() (match): modified to use new AC_Subproblem constructor * AC_DagNode.cc (eliminateSubject): added * AC_DagNode.hh (class AC_DagNode): eliminateSubject() added * AC_Subproblem.hh (class AC_Subproblem): "DagRoot secure" added to struct TopVariable. Thu Apr 25 10:48:32 1996 Steven Eker * AC_LhsAutomaton.cc (match): pass inErrorSort flag to AC_Subproblem() * AC_Subproblem.cc (AC_Subproblem): take extra arg to initialize errorSortFlag * AC_Subproblem.hh (class AC_Subproblem): inErrorSort flag added * AC_LhsAutomaton.hh (class AC_LhsAutomaton): inErrorSort flag added * AC_Symbol.cc (rewrite): optimization where we returned false immmediately from lazy case if there were no equations removed. This is done for consistancy with free case. (rewrite): rewritten so that users strategy is no longer abandoned if the top operator is found to be in ther error sort. This is done because its difficult to know what constitutes a lazy subterm when an existing lazy subterm rewrites into our theory. Tue Apr 23 11:04:38 1996 Steven Eker * AC_Subproblem.cc: Substitution& args replace by RewritingContext& args throughout (addPatternNode): added (addEdge): added (addTopVariable): added Mon Apr 22 14:25:11 1996 Steven Eker * AC_LhsAutomaton.cc (eliminateSubject): added Sat Apr 20 13:18:01 1996 Steven Eker * AC_DagNode.cc (binarySearch): added (binarySearch): added a term version Fri Apr 19 16:23:23 1996 Steven Eker * AC_Symbol.cc (computeSort): implemented Thu Apr 18 16:08:25 1996 Steven Eker * AC_Symbol.cc (partialReplace): implemented * AC_DagNode.cc (normalizeAtTop): added * AC_Symbol.cc (rewrite): implemented Wed Apr 17 14:45:08 1996 Steven Eker * AC_Symbol.cc (applyReplace): added (partialReplace): added (applyReplace): deleted * AC_ExtensionInfo.hh: created * AC_Subproblem.cc (solve): inserted calls to assert() and retract() * AC_Subproblem.hh (class AC_Subproblem): bound added to struct TopVariable Tue Apr 16 16:46:40 1996 Steven Eker * AC_Symbol.cc (compileOpDeclarations): added * AC_Symbol.hh (class AC_Symbol): compileOpDeclarations() added Fri Apr 12 14:40:40 1996 Steven Eker * AC_Term.cc (dagify): implemented (compileRhs): implemented (analyseConstraintPropagation): implemented * AC_RhsAutomaton.hh (addAlien): added (setArgument): added (replaces addArgument()) (setDestination): added * AC_RhsAutomaton.cc: heavily revised to allow sharing subDAGs with other automata (addArgument): added * AC_DagNode.cc (pairCompare): added (sortAndUniquize): added * AC_RhsAutomaton.hh: created * AC_RhsAutomaton.cc: created Wed Apr 10 11:41:46 1996 Steven Eker * AC_DagArgumentIterator.hh: created * AC_DagArgumentIterator.cc: created * AC_DagNode.hh: created * AC_DagNode.cc: created * AC_Term.cc (compareArguments): implemented * AC_Symbol.cc: created * AC_Theory.hh: created * AC_Term.hh: created * AC_Term.cc: created * AC_ArgumentIterator.hh: created * AC_ArgumentIterator.cc: created Fri Apr 5 17:19:02 1996 Steven Eker * AC_Symbol.hh: created Maude-Maude3.2/src/ACU_Theory/Makefile.am000066400000000000000000000031461420036611000201470ustar00rootroot00000000000000noinst_LIBRARIES = libACU_Theory.a libACU_Theory_a_CPPFLAGS = \ -I$(top_srcdir)/src/Utility \ -I$(top_srcdir)/src/Interface \ -I$(top_srcdir)/src/Core \ -I$(top_srcdir)/src/Variable \ -I$(top_srcdir)/src/ACU_Persistent \ -I$(top_srcdir)/src/FullCompiler libACU_Theory_a_SOURCES = \ ACU_Symbol.cc \ ACU_Term.cc \ ACU_BaseDagNode.cc \ ACU_DagNode.cc \ ACU_TreeDagNode.cc \ ACU_RhsAutomaton.cc \ ACU_LhsAutomaton.cc \ ACU_Subproblem.cc \ ACU_ExtensionInfo.cc \ ACU_CollectorLhsAutomaton.cc \ ACU_NGA_LhsAutomaton.cc \ ACU_VarLhsAutomaton.cc \ ACU_GndLhsAutomaton.cc \ ACU_NonLinearLhsAutomaton.cc \ ACU_ArgumentIterator.cc \ ACU_DagArgumentIterator.cc \ ACU_TreeDagArgumentIterator.cc \ ACU_LazySubproblem.cc \ ACU_UnificationSubproblem2.cc \ ACU_BndVarLhsAutomaton.cc EXTRA_DIST = \ ACU_LhsCompiler0.cc \ ACU_LhsCompiler1.cc \ ACU_LhsCompiler2.cc \ ACU_LhsCompiler3.cc \ ACU_Matcher.cc \ ACU_GreedyMatcher.cc \ ACU_CollapseMatcher.cc \ ACU_TreeMatcher.cc \ ACU_DagOperations.cc \ ACU_FastMerge.cc \ ACU_Normalize.cc \ ACU_MergeSort.cc \ ChangeLog.AC_Theory noinst_HEADERS = \ ACU_ArgumentIterator.hh \ ACU_BaseDagNode.hh \ ACU_CollectorLhsAutomaton.hh \ ACU_DagArgumentIterator.hh \ ACU_DagNode.hh \ ACU_ExtensionInfo.hh \ ACU_GndLhsAutomaton.hh \ ACU_LazySubproblem.hh \ ACU_LhsAutomaton.hh \ ACU_NGA_LhsAutomaton.hh \ ACU_NonLinearLhsAutomaton.hh \ ACU_RhsAutomaton.hh \ ACU_Subproblem.hh \ ACU_Symbol.hh \ ACU_Term.hh \ ACU_Theory.hh \ ACU_TreeDagArgumentIterator.hh \ ACU_TreeDagNode.hh \ ACU_VarLhsAutomaton.hh \ ACU_UnificationSubproblem2.hh \ ACU_BndVarLhsAutomaton.hh Maude-Maude3.2/src/ACU_Theory/Makefile.in000066400000000000000000002135051420036611000201620ustar00rootroot00000000000000# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/ACU_Theory ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_have_poll.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) AR = ar ARFLAGS = cru AM_V_AR = $(am__v_AR_@AM_V@) am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) am__v_AR_0 = @echo " AR " $@; am__v_AR_1 = libACU_Theory_a_AR = $(AR) $(ARFLAGS) libACU_Theory_a_LIBADD = am_libACU_Theory_a_OBJECTS = libACU_Theory_a-ACU_Symbol.$(OBJEXT) \ libACU_Theory_a-ACU_Term.$(OBJEXT) \ libACU_Theory_a-ACU_BaseDagNode.$(OBJEXT) \ libACU_Theory_a-ACU_DagNode.$(OBJEXT) \ libACU_Theory_a-ACU_TreeDagNode.$(OBJEXT) \ libACU_Theory_a-ACU_RhsAutomaton.$(OBJEXT) \ libACU_Theory_a-ACU_LhsAutomaton.$(OBJEXT) \ libACU_Theory_a-ACU_Subproblem.$(OBJEXT) \ libACU_Theory_a-ACU_ExtensionInfo.$(OBJEXT) \ libACU_Theory_a-ACU_CollectorLhsAutomaton.$(OBJEXT) \ libACU_Theory_a-ACU_NGA_LhsAutomaton.$(OBJEXT) \ libACU_Theory_a-ACU_VarLhsAutomaton.$(OBJEXT) \ libACU_Theory_a-ACU_GndLhsAutomaton.$(OBJEXT) \ libACU_Theory_a-ACU_NonLinearLhsAutomaton.$(OBJEXT) \ libACU_Theory_a-ACU_ArgumentIterator.$(OBJEXT) \ libACU_Theory_a-ACU_DagArgumentIterator.$(OBJEXT) \ libACU_Theory_a-ACU_TreeDagArgumentIterator.$(OBJEXT) \ libACU_Theory_a-ACU_LazySubproblem.$(OBJEXT) \ libACU_Theory_a-ACU_UnificationSubproblem2.$(OBJEXT) \ libACU_Theory_a-ACU_BndVarLhsAutomaton.$(OBJEXT) libACU_Theory_a_OBJECTS = $(am_libACU_Theory_a_OBJECTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = \ ./$(DEPDIR)/libACU_Theory_a-ACU_ArgumentIterator.Po \ ./$(DEPDIR)/libACU_Theory_a-ACU_BaseDagNode.Po \ ./$(DEPDIR)/libACU_Theory_a-ACU_BndVarLhsAutomaton.Po \ ./$(DEPDIR)/libACU_Theory_a-ACU_CollectorLhsAutomaton.Po \ ./$(DEPDIR)/libACU_Theory_a-ACU_DagArgumentIterator.Po \ ./$(DEPDIR)/libACU_Theory_a-ACU_DagNode.Po \ ./$(DEPDIR)/libACU_Theory_a-ACU_ExtensionInfo.Po \ ./$(DEPDIR)/libACU_Theory_a-ACU_GndLhsAutomaton.Po \ ./$(DEPDIR)/libACU_Theory_a-ACU_LazySubproblem.Po \ ./$(DEPDIR)/libACU_Theory_a-ACU_LhsAutomaton.Po \ ./$(DEPDIR)/libACU_Theory_a-ACU_NGA_LhsAutomaton.Po \ ./$(DEPDIR)/libACU_Theory_a-ACU_NonLinearLhsAutomaton.Po \ ./$(DEPDIR)/libACU_Theory_a-ACU_RhsAutomaton.Po \ ./$(DEPDIR)/libACU_Theory_a-ACU_Subproblem.Po \ ./$(DEPDIR)/libACU_Theory_a-ACU_Symbol.Po \ ./$(DEPDIR)/libACU_Theory_a-ACU_Term.Po \ ./$(DEPDIR)/libACU_Theory_a-ACU_TreeDagArgumentIterator.Po \ ./$(DEPDIR)/libACU_Theory_a-ACU_TreeDagNode.Po \ ./$(DEPDIR)/libACU_Theory_a-ACU_UnificationSubproblem2.Po \ ./$(DEPDIR)/libACU_Theory_a-ACU_VarLhsAutomaton.Po am__mv = mv -f AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(libACU_Theory_a_SOURCES) DIST_SOURCES = $(libACU_Theory_a_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ $(top_srcdir)/mkinstalldirs ChangeLog DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ BUDDY_LIB = @BUDDY_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FLEX = @FLEX@ GCC_LIBS = @GCC_LIBS@ GMP_LIBS = @GMP_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSIGSEGV_LIB = @LIBSIGSEGV_LIB@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TECLA_LIBS = @TECLA_LIBS@ VERSION = @VERSION@ YICES2_LIB = @YICES2_LIB@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LIBRARIES = libACU_Theory.a libACU_Theory_a_CPPFLAGS = \ -I$(top_srcdir)/src/Utility \ -I$(top_srcdir)/src/Interface \ -I$(top_srcdir)/src/Core \ -I$(top_srcdir)/src/Variable \ -I$(top_srcdir)/src/ACU_Persistent \ -I$(top_srcdir)/src/FullCompiler libACU_Theory_a_SOURCES = \ ACU_Symbol.cc \ ACU_Term.cc \ ACU_BaseDagNode.cc \ ACU_DagNode.cc \ ACU_TreeDagNode.cc \ ACU_RhsAutomaton.cc \ ACU_LhsAutomaton.cc \ ACU_Subproblem.cc \ ACU_ExtensionInfo.cc \ ACU_CollectorLhsAutomaton.cc \ ACU_NGA_LhsAutomaton.cc \ ACU_VarLhsAutomaton.cc \ ACU_GndLhsAutomaton.cc \ ACU_NonLinearLhsAutomaton.cc \ ACU_ArgumentIterator.cc \ ACU_DagArgumentIterator.cc \ ACU_TreeDagArgumentIterator.cc \ ACU_LazySubproblem.cc \ ACU_UnificationSubproblem2.cc \ ACU_BndVarLhsAutomaton.cc EXTRA_DIST = \ ACU_LhsCompiler0.cc \ ACU_LhsCompiler1.cc \ ACU_LhsCompiler2.cc \ ACU_LhsCompiler3.cc \ ACU_Matcher.cc \ ACU_GreedyMatcher.cc \ ACU_CollapseMatcher.cc \ ACU_TreeMatcher.cc \ ACU_DagOperations.cc \ ACU_FastMerge.cc \ ACU_Normalize.cc \ ACU_MergeSort.cc \ ChangeLog.AC_Theory noinst_HEADERS = \ ACU_ArgumentIterator.hh \ ACU_BaseDagNode.hh \ ACU_CollectorLhsAutomaton.hh \ ACU_DagArgumentIterator.hh \ ACU_DagNode.hh \ ACU_ExtensionInfo.hh \ ACU_GndLhsAutomaton.hh \ ACU_LazySubproblem.hh \ ACU_LhsAutomaton.hh \ ACU_NGA_LhsAutomaton.hh \ ACU_NonLinearLhsAutomaton.hh \ ACU_RhsAutomaton.hh \ ACU_Subproblem.hh \ ACU_Symbol.hh \ ACU_Term.hh \ ACU_Theory.hh \ ACU_TreeDagArgumentIterator.hh \ ACU_TreeDagNode.hh \ ACU_VarLhsAutomaton.hh \ ACU_UnificationSubproblem2.hh \ ACU_BndVarLhsAutomaton.hh all: all-am .SUFFIXES: .SUFFIXES: .cc .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/ACU_Theory/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/ACU_Theory/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libACU_Theory.a: $(libACU_Theory_a_OBJECTS) $(libACU_Theory_a_DEPENDENCIES) $(EXTRA_libACU_Theory_a_DEPENDENCIES) $(AM_V_at)-rm -f libACU_Theory.a $(AM_V_AR)$(libACU_Theory_a_AR) libACU_Theory.a $(libACU_Theory_a_OBJECTS) $(libACU_Theory_a_LIBADD) $(AM_V_at)$(RANLIB) libACU_Theory.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libACU_Theory_a-ACU_ArgumentIterator.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libACU_Theory_a-ACU_BaseDagNode.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libACU_Theory_a-ACU_BndVarLhsAutomaton.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libACU_Theory_a-ACU_CollectorLhsAutomaton.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libACU_Theory_a-ACU_DagArgumentIterator.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libACU_Theory_a-ACU_DagNode.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libACU_Theory_a-ACU_ExtensionInfo.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libACU_Theory_a-ACU_GndLhsAutomaton.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libACU_Theory_a-ACU_LazySubproblem.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libACU_Theory_a-ACU_LhsAutomaton.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libACU_Theory_a-ACU_NGA_LhsAutomaton.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libACU_Theory_a-ACU_NonLinearLhsAutomaton.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libACU_Theory_a-ACU_RhsAutomaton.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libACU_Theory_a-ACU_Subproblem.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libACU_Theory_a-ACU_Symbol.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libACU_Theory_a-ACU_Term.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libACU_Theory_a-ACU_TreeDagArgumentIterator.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libACU_Theory_a-ACU_TreeDagNode.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libACU_Theory_a-ACU_UnificationSubproblem2.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libACU_Theory_a-ACU_VarLhsAutomaton.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` libACU_Theory_a-ACU_Symbol.o: ACU_Symbol.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Theory_a-ACU_Symbol.o -MD -MP -MF $(DEPDIR)/libACU_Theory_a-ACU_Symbol.Tpo -c -o libACU_Theory_a-ACU_Symbol.o `test -f 'ACU_Symbol.cc' || echo '$(srcdir)/'`ACU_Symbol.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Theory_a-ACU_Symbol.Tpo $(DEPDIR)/libACU_Theory_a-ACU_Symbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_Symbol.cc' object='libACU_Theory_a-ACU_Symbol.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Theory_a-ACU_Symbol.o `test -f 'ACU_Symbol.cc' || echo '$(srcdir)/'`ACU_Symbol.cc libACU_Theory_a-ACU_Symbol.obj: ACU_Symbol.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Theory_a-ACU_Symbol.obj -MD -MP -MF $(DEPDIR)/libACU_Theory_a-ACU_Symbol.Tpo -c -o libACU_Theory_a-ACU_Symbol.obj `if test -f 'ACU_Symbol.cc'; then $(CYGPATH_W) 'ACU_Symbol.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_Symbol.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Theory_a-ACU_Symbol.Tpo $(DEPDIR)/libACU_Theory_a-ACU_Symbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_Symbol.cc' object='libACU_Theory_a-ACU_Symbol.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Theory_a-ACU_Symbol.obj `if test -f 'ACU_Symbol.cc'; then $(CYGPATH_W) 'ACU_Symbol.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_Symbol.cc'; fi` libACU_Theory_a-ACU_Term.o: ACU_Term.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Theory_a-ACU_Term.o -MD -MP -MF $(DEPDIR)/libACU_Theory_a-ACU_Term.Tpo -c -o libACU_Theory_a-ACU_Term.o `test -f 'ACU_Term.cc' || echo '$(srcdir)/'`ACU_Term.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Theory_a-ACU_Term.Tpo $(DEPDIR)/libACU_Theory_a-ACU_Term.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_Term.cc' object='libACU_Theory_a-ACU_Term.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Theory_a-ACU_Term.o `test -f 'ACU_Term.cc' || echo '$(srcdir)/'`ACU_Term.cc libACU_Theory_a-ACU_Term.obj: ACU_Term.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Theory_a-ACU_Term.obj -MD -MP -MF $(DEPDIR)/libACU_Theory_a-ACU_Term.Tpo -c -o libACU_Theory_a-ACU_Term.obj `if test -f 'ACU_Term.cc'; then $(CYGPATH_W) 'ACU_Term.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_Term.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Theory_a-ACU_Term.Tpo $(DEPDIR)/libACU_Theory_a-ACU_Term.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_Term.cc' object='libACU_Theory_a-ACU_Term.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Theory_a-ACU_Term.obj `if test -f 'ACU_Term.cc'; then $(CYGPATH_W) 'ACU_Term.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_Term.cc'; fi` libACU_Theory_a-ACU_BaseDagNode.o: ACU_BaseDagNode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Theory_a-ACU_BaseDagNode.o -MD -MP -MF $(DEPDIR)/libACU_Theory_a-ACU_BaseDagNode.Tpo -c -o libACU_Theory_a-ACU_BaseDagNode.o `test -f 'ACU_BaseDagNode.cc' || echo '$(srcdir)/'`ACU_BaseDagNode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Theory_a-ACU_BaseDagNode.Tpo $(DEPDIR)/libACU_Theory_a-ACU_BaseDagNode.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_BaseDagNode.cc' object='libACU_Theory_a-ACU_BaseDagNode.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Theory_a-ACU_BaseDagNode.o `test -f 'ACU_BaseDagNode.cc' || echo '$(srcdir)/'`ACU_BaseDagNode.cc libACU_Theory_a-ACU_BaseDagNode.obj: ACU_BaseDagNode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Theory_a-ACU_BaseDagNode.obj -MD -MP -MF $(DEPDIR)/libACU_Theory_a-ACU_BaseDagNode.Tpo -c -o libACU_Theory_a-ACU_BaseDagNode.obj `if test -f 'ACU_BaseDagNode.cc'; then $(CYGPATH_W) 'ACU_BaseDagNode.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_BaseDagNode.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Theory_a-ACU_BaseDagNode.Tpo $(DEPDIR)/libACU_Theory_a-ACU_BaseDagNode.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_BaseDagNode.cc' object='libACU_Theory_a-ACU_BaseDagNode.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Theory_a-ACU_BaseDagNode.obj `if test -f 'ACU_BaseDagNode.cc'; then $(CYGPATH_W) 'ACU_BaseDagNode.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_BaseDagNode.cc'; fi` libACU_Theory_a-ACU_DagNode.o: ACU_DagNode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Theory_a-ACU_DagNode.o -MD -MP -MF $(DEPDIR)/libACU_Theory_a-ACU_DagNode.Tpo -c -o libACU_Theory_a-ACU_DagNode.o `test -f 'ACU_DagNode.cc' || echo '$(srcdir)/'`ACU_DagNode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Theory_a-ACU_DagNode.Tpo $(DEPDIR)/libACU_Theory_a-ACU_DagNode.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_DagNode.cc' object='libACU_Theory_a-ACU_DagNode.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Theory_a-ACU_DagNode.o `test -f 'ACU_DagNode.cc' || echo '$(srcdir)/'`ACU_DagNode.cc libACU_Theory_a-ACU_DagNode.obj: ACU_DagNode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Theory_a-ACU_DagNode.obj -MD -MP -MF $(DEPDIR)/libACU_Theory_a-ACU_DagNode.Tpo -c -o libACU_Theory_a-ACU_DagNode.obj `if test -f 'ACU_DagNode.cc'; then $(CYGPATH_W) 'ACU_DagNode.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_DagNode.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Theory_a-ACU_DagNode.Tpo $(DEPDIR)/libACU_Theory_a-ACU_DagNode.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_DagNode.cc' object='libACU_Theory_a-ACU_DagNode.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Theory_a-ACU_DagNode.obj `if test -f 'ACU_DagNode.cc'; then $(CYGPATH_W) 'ACU_DagNode.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_DagNode.cc'; fi` libACU_Theory_a-ACU_TreeDagNode.o: ACU_TreeDagNode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Theory_a-ACU_TreeDagNode.o -MD -MP -MF $(DEPDIR)/libACU_Theory_a-ACU_TreeDagNode.Tpo -c -o libACU_Theory_a-ACU_TreeDagNode.o `test -f 'ACU_TreeDagNode.cc' || echo '$(srcdir)/'`ACU_TreeDagNode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Theory_a-ACU_TreeDagNode.Tpo $(DEPDIR)/libACU_Theory_a-ACU_TreeDagNode.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_TreeDagNode.cc' object='libACU_Theory_a-ACU_TreeDagNode.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Theory_a-ACU_TreeDagNode.o `test -f 'ACU_TreeDagNode.cc' || echo '$(srcdir)/'`ACU_TreeDagNode.cc libACU_Theory_a-ACU_TreeDagNode.obj: ACU_TreeDagNode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Theory_a-ACU_TreeDagNode.obj -MD -MP -MF $(DEPDIR)/libACU_Theory_a-ACU_TreeDagNode.Tpo -c -o libACU_Theory_a-ACU_TreeDagNode.obj `if test -f 'ACU_TreeDagNode.cc'; then $(CYGPATH_W) 'ACU_TreeDagNode.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_TreeDagNode.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Theory_a-ACU_TreeDagNode.Tpo $(DEPDIR)/libACU_Theory_a-ACU_TreeDagNode.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_TreeDagNode.cc' object='libACU_Theory_a-ACU_TreeDagNode.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Theory_a-ACU_TreeDagNode.obj `if test -f 'ACU_TreeDagNode.cc'; then $(CYGPATH_W) 'ACU_TreeDagNode.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_TreeDagNode.cc'; fi` libACU_Theory_a-ACU_RhsAutomaton.o: ACU_RhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Theory_a-ACU_RhsAutomaton.o -MD -MP -MF $(DEPDIR)/libACU_Theory_a-ACU_RhsAutomaton.Tpo -c -o libACU_Theory_a-ACU_RhsAutomaton.o `test -f 'ACU_RhsAutomaton.cc' || echo '$(srcdir)/'`ACU_RhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Theory_a-ACU_RhsAutomaton.Tpo $(DEPDIR)/libACU_Theory_a-ACU_RhsAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_RhsAutomaton.cc' object='libACU_Theory_a-ACU_RhsAutomaton.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Theory_a-ACU_RhsAutomaton.o `test -f 'ACU_RhsAutomaton.cc' || echo '$(srcdir)/'`ACU_RhsAutomaton.cc libACU_Theory_a-ACU_RhsAutomaton.obj: ACU_RhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Theory_a-ACU_RhsAutomaton.obj -MD -MP -MF $(DEPDIR)/libACU_Theory_a-ACU_RhsAutomaton.Tpo -c -o libACU_Theory_a-ACU_RhsAutomaton.obj `if test -f 'ACU_RhsAutomaton.cc'; then $(CYGPATH_W) 'ACU_RhsAutomaton.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_RhsAutomaton.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Theory_a-ACU_RhsAutomaton.Tpo $(DEPDIR)/libACU_Theory_a-ACU_RhsAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_RhsAutomaton.cc' object='libACU_Theory_a-ACU_RhsAutomaton.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Theory_a-ACU_RhsAutomaton.obj `if test -f 'ACU_RhsAutomaton.cc'; then $(CYGPATH_W) 'ACU_RhsAutomaton.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_RhsAutomaton.cc'; fi` libACU_Theory_a-ACU_LhsAutomaton.o: ACU_LhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Theory_a-ACU_LhsAutomaton.o -MD -MP -MF $(DEPDIR)/libACU_Theory_a-ACU_LhsAutomaton.Tpo -c -o libACU_Theory_a-ACU_LhsAutomaton.o `test -f 'ACU_LhsAutomaton.cc' || echo '$(srcdir)/'`ACU_LhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Theory_a-ACU_LhsAutomaton.Tpo $(DEPDIR)/libACU_Theory_a-ACU_LhsAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_LhsAutomaton.cc' object='libACU_Theory_a-ACU_LhsAutomaton.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Theory_a-ACU_LhsAutomaton.o `test -f 'ACU_LhsAutomaton.cc' || echo '$(srcdir)/'`ACU_LhsAutomaton.cc libACU_Theory_a-ACU_LhsAutomaton.obj: ACU_LhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Theory_a-ACU_LhsAutomaton.obj -MD -MP -MF $(DEPDIR)/libACU_Theory_a-ACU_LhsAutomaton.Tpo -c -o libACU_Theory_a-ACU_LhsAutomaton.obj `if test -f 'ACU_LhsAutomaton.cc'; then $(CYGPATH_W) 'ACU_LhsAutomaton.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_LhsAutomaton.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Theory_a-ACU_LhsAutomaton.Tpo $(DEPDIR)/libACU_Theory_a-ACU_LhsAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_LhsAutomaton.cc' object='libACU_Theory_a-ACU_LhsAutomaton.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Theory_a-ACU_LhsAutomaton.obj `if test -f 'ACU_LhsAutomaton.cc'; then $(CYGPATH_W) 'ACU_LhsAutomaton.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_LhsAutomaton.cc'; fi` libACU_Theory_a-ACU_Subproblem.o: ACU_Subproblem.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Theory_a-ACU_Subproblem.o -MD -MP -MF $(DEPDIR)/libACU_Theory_a-ACU_Subproblem.Tpo -c -o libACU_Theory_a-ACU_Subproblem.o `test -f 'ACU_Subproblem.cc' || echo '$(srcdir)/'`ACU_Subproblem.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Theory_a-ACU_Subproblem.Tpo $(DEPDIR)/libACU_Theory_a-ACU_Subproblem.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_Subproblem.cc' object='libACU_Theory_a-ACU_Subproblem.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Theory_a-ACU_Subproblem.o `test -f 'ACU_Subproblem.cc' || echo '$(srcdir)/'`ACU_Subproblem.cc libACU_Theory_a-ACU_Subproblem.obj: ACU_Subproblem.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Theory_a-ACU_Subproblem.obj -MD -MP -MF $(DEPDIR)/libACU_Theory_a-ACU_Subproblem.Tpo -c -o libACU_Theory_a-ACU_Subproblem.obj `if test -f 'ACU_Subproblem.cc'; then $(CYGPATH_W) 'ACU_Subproblem.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_Subproblem.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Theory_a-ACU_Subproblem.Tpo $(DEPDIR)/libACU_Theory_a-ACU_Subproblem.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_Subproblem.cc' object='libACU_Theory_a-ACU_Subproblem.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Theory_a-ACU_Subproblem.obj `if test -f 'ACU_Subproblem.cc'; then $(CYGPATH_W) 'ACU_Subproblem.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_Subproblem.cc'; fi` libACU_Theory_a-ACU_ExtensionInfo.o: ACU_ExtensionInfo.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Theory_a-ACU_ExtensionInfo.o -MD -MP -MF $(DEPDIR)/libACU_Theory_a-ACU_ExtensionInfo.Tpo -c -o libACU_Theory_a-ACU_ExtensionInfo.o `test -f 'ACU_ExtensionInfo.cc' || echo '$(srcdir)/'`ACU_ExtensionInfo.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Theory_a-ACU_ExtensionInfo.Tpo $(DEPDIR)/libACU_Theory_a-ACU_ExtensionInfo.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_ExtensionInfo.cc' object='libACU_Theory_a-ACU_ExtensionInfo.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Theory_a-ACU_ExtensionInfo.o `test -f 'ACU_ExtensionInfo.cc' || echo '$(srcdir)/'`ACU_ExtensionInfo.cc libACU_Theory_a-ACU_ExtensionInfo.obj: ACU_ExtensionInfo.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Theory_a-ACU_ExtensionInfo.obj -MD -MP -MF $(DEPDIR)/libACU_Theory_a-ACU_ExtensionInfo.Tpo -c -o libACU_Theory_a-ACU_ExtensionInfo.obj `if test -f 'ACU_ExtensionInfo.cc'; then $(CYGPATH_W) 'ACU_ExtensionInfo.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_ExtensionInfo.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Theory_a-ACU_ExtensionInfo.Tpo $(DEPDIR)/libACU_Theory_a-ACU_ExtensionInfo.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_ExtensionInfo.cc' object='libACU_Theory_a-ACU_ExtensionInfo.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Theory_a-ACU_ExtensionInfo.obj `if test -f 'ACU_ExtensionInfo.cc'; then $(CYGPATH_W) 'ACU_ExtensionInfo.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_ExtensionInfo.cc'; fi` libACU_Theory_a-ACU_CollectorLhsAutomaton.o: ACU_CollectorLhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Theory_a-ACU_CollectorLhsAutomaton.o -MD -MP -MF $(DEPDIR)/libACU_Theory_a-ACU_CollectorLhsAutomaton.Tpo -c -o libACU_Theory_a-ACU_CollectorLhsAutomaton.o `test -f 'ACU_CollectorLhsAutomaton.cc' || echo '$(srcdir)/'`ACU_CollectorLhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Theory_a-ACU_CollectorLhsAutomaton.Tpo $(DEPDIR)/libACU_Theory_a-ACU_CollectorLhsAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_CollectorLhsAutomaton.cc' object='libACU_Theory_a-ACU_CollectorLhsAutomaton.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Theory_a-ACU_CollectorLhsAutomaton.o `test -f 'ACU_CollectorLhsAutomaton.cc' || echo '$(srcdir)/'`ACU_CollectorLhsAutomaton.cc libACU_Theory_a-ACU_CollectorLhsAutomaton.obj: ACU_CollectorLhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Theory_a-ACU_CollectorLhsAutomaton.obj -MD -MP -MF $(DEPDIR)/libACU_Theory_a-ACU_CollectorLhsAutomaton.Tpo -c -o libACU_Theory_a-ACU_CollectorLhsAutomaton.obj `if test -f 'ACU_CollectorLhsAutomaton.cc'; then $(CYGPATH_W) 'ACU_CollectorLhsAutomaton.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_CollectorLhsAutomaton.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Theory_a-ACU_CollectorLhsAutomaton.Tpo $(DEPDIR)/libACU_Theory_a-ACU_CollectorLhsAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_CollectorLhsAutomaton.cc' object='libACU_Theory_a-ACU_CollectorLhsAutomaton.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Theory_a-ACU_CollectorLhsAutomaton.obj `if test -f 'ACU_CollectorLhsAutomaton.cc'; then $(CYGPATH_W) 'ACU_CollectorLhsAutomaton.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_CollectorLhsAutomaton.cc'; fi` libACU_Theory_a-ACU_NGA_LhsAutomaton.o: ACU_NGA_LhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Theory_a-ACU_NGA_LhsAutomaton.o -MD -MP -MF $(DEPDIR)/libACU_Theory_a-ACU_NGA_LhsAutomaton.Tpo -c -o libACU_Theory_a-ACU_NGA_LhsAutomaton.o `test -f 'ACU_NGA_LhsAutomaton.cc' || echo '$(srcdir)/'`ACU_NGA_LhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Theory_a-ACU_NGA_LhsAutomaton.Tpo $(DEPDIR)/libACU_Theory_a-ACU_NGA_LhsAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_NGA_LhsAutomaton.cc' object='libACU_Theory_a-ACU_NGA_LhsAutomaton.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Theory_a-ACU_NGA_LhsAutomaton.o `test -f 'ACU_NGA_LhsAutomaton.cc' || echo '$(srcdir)/'`ACU_NGA_LhsAutomaton.cc libACU_Theory_a-ACU_NGA_LhsAutomaton.obj: ACU_NGA_LhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Theory_a-ACU_NGA_LhsAutomaton.obj -MD -MP -MF $(DEPDIR)/libACU_Theory_a-ACU_NGA_LhsAutomaton.Tpo -c -o libACU_Theory_a-ACU_NGA_LhsAutomaton.obj `if test -f 'ACU_NGA_LhsAutomaton.cc'; then $(CYGPATH_W) 'ACU_NGA_LhsAutomaton.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_NGA_LhsAutomaton.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Theory_a-ACU_NGA_LhsAutomaton.Tpo $(DEPDIR)/libACU_Theory_a-ACU_NGA_LhsAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_NGA_LhsAutomaton.cc' object='libACU_Theory_a-ACU_NGA_LhsAutomaton.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Theory_a-ACU_NGA_LhsAutomaton.obj `if test -f 'ACU_NGA_LhsAutomaton.cc'; then $(CYGPATH_W) 'ACU_NGA_LhsAutomaton.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_NGA_LhsAutomaton.cc'; fi` libACU_Theory_a-ACU_VarLhsAutomaton.o: ACU_VarLhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Theory_a-ACU_VarLhsAutomaton.o -MD -MP -MF $(DEPDIR)/libACU_Theory_a-ACU_VarLhsAutomaton.Tpo -c -o libACU_Theory_a-ACU_VarLhsAutomaton.o `test -f 'ACU_VarLhsAutomaton.cc' || echo '$(srcdir)/'`ACU_VarLhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Theory_a-ACU_VarLhsAutomaton.Tpo $(DEPDIR)/libACU_Theory_a-ACU_VarLhsAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_VarLhsAutomaton.cc' object='libACU_Theory_a-ACU_VarLhsAutomaton.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Theory_a-ACU_VarLhsAutomaton.o `test -f 'ACU_VarLhsAutomaton.cc' || echo '$(srcdir)/'`ACU_VarLhsAutomaton.cc libACU_Theory_a-ACU_VarLhsAutomaton.obj: ACU_VarLhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Theory_a-ACU_VarLhsAutomaton.obj -MD -MP -MF $(DEPDIR)/libACU_Theory_a-ACU_VarLhsAutomaton.Tpo -c -o libACU_Theory_a-ACU_VarLhsAutomaton.obj `if test -f 'ACU_VarLhsAutomaton.cc'; then $(CYGPATH_W) 'ACU_VarLhsAutomaton.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_VarLhsAutomaton.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Theory_a-ACU_VarLhsAutomaton.Tpo $(DEPDIR)/libACU_Theory_a-ACU_VarLhsAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_VarLhsAutomaton.cc' object='libACU_Theory_a-ACU_VarLhsAutomaton.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Theory_a-ACU_VarLhsAutomaton.obj `if test -f 'ACU_VarLhsAutomaton.cc'; then $(CYGPATH_W) 'ACU_VarLhsAutomaton.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_VarLhsAutomaton.cc'; fi` libACU_Theory_a-ACU_GndLhsAutomaton.o: ACU_GndLhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Theory_a-ACU_GndLhsAutomaton.o -MD -MP -MF $(DEPDIR)/libACU_Theory_a-ACU_GndLhsAutomaton.Tpo -c -o libACU_Theory_a-ACU_GndLhsAutomaton.o `test -f 'ACU_GndLhsAutomaton.cc' || echo '$(srcdir)/'`ACU_GndLhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Theory_a-ACU_GndLhsAutomaton.Tpo $(DEPDIR)/libACU_Theory_a-ACU_GndLhsAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_GndLhsAutomaton.cc' object='libACU_Theory_a-ACU_GndLhsAutomaton.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Theory_a-ACU_GndLhsAutomaton.o `test -f 'ACU_GndLhsAutomaton.cc' || echo '$(srcdir)/'`ACU_GndLhsAutomaton.cc libACU_Theory_a-ACU_GndLhsAutomaton.obj: ACU_GndLhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Theory_a-ACU_GndLhsAutomaton.obj -MD -MP -MF $(DEPDIR)/libACU_Theory_a-ACU_GndLhsAutomaton.Tpo -c -o libACU_Theory_a-ACU_GndLhsAutomaton.obj `if test -f 'ACU_GndLhsAutomaton.cc'; then $(CYGPATH_W) 'ACU_GndLhsAutomaton.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_GndLhsAutomaton.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Theory_a-ACU_GndLhsAutomaton.Tpo $(DEPDIR)/libACU_Theory_a-ACU_GndLhsAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_GndLhsAutomaton.cc' object='libACU_Theory_a-ACU_GndLhsAutomaton.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Theory_a-ACU_GndLhsAutomaton.obj `if test -f 'ACU_GndLhsAutomaton.cc'; then $(CYGPATH_W) 'ACU_GndLhsAutomaton.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_GndLhsAutomaton.cc'; fi` libACU_Theory_a-ACU_NonLinearLhsAutomaton.o: ACU_NonLinearLhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Theory_a-ACU_NonLinearLhsAutomaton.o -MD -MP -MF $(DEPDIR)/libACU_Theory_a-ACU_NonLinearLhsAutomaton.Tpo -c -o libACU_Theory_a-ACU_NonLinearLhsAutomaton.o `test -f 'ACU_NonLinearLhsAutomaton.cc' || echo '$(srcdir)/'`ACU_NonLinearLhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Theory_a-ACU_NonLinearLhsAutomaton.Tpo $(DEPDIR)/libACU_Theory_a-ACU_NonLinearLhsAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_NonLinearLhsAutomaton.cc' object='libACU_Theory_a-ACU_NonLinearLhsAutomaton.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Theory_a-ACU_NonLinearLhsAutomaton.o `test -f 'ACU_NonLinearLhsAutomaton.cc' || echo '$(srcdir)/'`ACU_NonLinearLhsAutomaton.cc libACU_Theory_a-ACU_NonLinearLhsAutomaton.obj: ACU_NonLinearLhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Theory_a-ACU_NonLinearLhsAutomaton.obj -MD -MP -MF $(DEPDIR)/libACU_Theory_a-ACU_NonLinearLhsAutomaton.Tpo -c -o libACU_Theory_a-ACU_NonLinearLhsAutomaton.obj `if test -f 'ACU_NonLinearLhsAutomaton.cc'; then $(CYGPATH_W) 'ACU_NonLinearLhsAutomaton.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_NonLinearLhsAutomaton.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Theory_a-ACU_NonLinearLhsAutomaton.Tpo $(DEPDIR)/libACU_Theory_a-ACU_NonLinearLhsAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_NonLinearLhsAutomaton.cc' object='libACU_Theory_a-ACU_NonLinearLhsAutomaton.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Theory_a-ACU_NonLinearLhsAutomaton.obj `if test -f 'ACU_NonLinearLhsAutomaton.cc'; then $(CYGPATH_W) 'ACU_NonLinearLhsAutomaton.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_NonLinearLhsAutomaton.cc'; fi` libACU_Theory_a-ACU_ArgumentIterator.o: ACU_ArgumentIterator.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Theory_a-ACU_ArgumentIterator.o -MD -MP -MF $(DEPDIR)/libACU_Theory_a-ACU_ArgumentIterator.Tpo -c -o libACU_Theory_a-ACU_ArgumentIterator.o `test -f 'ACU_ArgumentIterator.cc' || echo '$(srcdir)/'`ACU_ArgumentIterator.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Theory_a-ACU_ArgumentIterator.Tpo $(DEPDIR)/libACU_Theory_a-ACU_ArgumentIterator.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_ArgumentIterator.cc' object='libACU_Theory_a-ACU_ArgumentIterator.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Theory_a-ACU_ArgumentIterator.o `test -f 'ACU_ArgumentIterator.cc' || echo '$(srcdir)/'`ACU_ArgumentIterator.cc libACU_Theory_a-ACU_ArgumentIterator.obj: ACU_ArgumentIterator.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Theory_a-ACU_ArgumentIterator.obj -MD -MP -MF $(DEPDIR)/libACU_Theory_a-ACU_ArgumentIterator.Tpo -c -o libACU_Theory_a-ACU_ArgumentIterator.obj `if test -f 'ACU_ArgumentIterator.cc'; then $(CYGPATH_W) 'ACU_ArgumentIterator.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_ArgumentIterator.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Theory_a-ACU_ArgumentIterator.Tpo $(DEPDIR)/libACU_Theory_a-ACU_ArgumentIterator.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_ArgumentIterator.cc' object='libACU_Theory_a-ACU_ArgumentIterator.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Theory_a-ACU_ArgumentIterator.obj `if test -f 'ACU_ArgumentIterator.cc'; then $(CYGPATH_W) 'ACU_ArgumentIterator.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_ArgumentIterator.cc'; fi` libACU_Theory_a-ACU_DagArgumentIterator.o: ACU_DagArgumentIterator.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Theory_a-ACU_DagArgumentIterator.o -MD -MP -MF $(DEPDIR)/libACU_Theory_a-ACU_DagArgumentIterator.Tpo -c -o libACU_Theory_a-ACU_DagArgumentIterator.o `test -f 'ACU_DagArgumentIterator.cc' || echo '$(srcdir)/'`ACU_DagArgumentIterator.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Theory_a-ACU_DagArgumentIterator.Tpo $(DEPDIR)/libACU_Theory_a-ACU_DagArgumentIterator.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_DagArgumentIterator.cc' object='libACU_Theory_a-ACU_DagArgumentIterator.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Theory_a-ACU_DagArgumentIterator.o `test -f 'ACU_DagArgumentIterator.cc' || echo '$(srcdir)/'`ACU_DagArgumentIterator.cc libACU_Theory_a-ACU_DagArgumentIterator.obj: ACU_DagArgumentIterator.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Theory_a-ACU_DagArgumentIterator.obj -MD -MP -MF $(DEPDIR)/libACU_Theory_a-ACU_DagArgumentIterator.Tpo -c -o libACU_Theory_a-ACU_DagArgumentIterator.obj `if test -f 'ACU_DagArgumentIterator.cc'; then $(CYGPATH_W) 'ACU_DagArgumentIterator.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_DagArgumentIterator.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Theory_a-ACU_DagArgumentIterator.Tpo $(DEPDIR)/libACU_Theory_a-ACU_DagArgumentIterator.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_DagArgumentIterator.cc' object='libACU_Theory_a-ACU_DagArgumentIterator.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Theory_a-ACU_DagArgumentIterator.obj `if test -f 'ACU_DagArgumentIterator.cc'; then $(CYGPATH_W) 'ACU_DagArgumentIterator.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_DagArgumentIterator.cc'; fi` libACU_Theory_a-ACU_TreeDagArgumentIterator.o: ACU_TreeDagArgumentIterator.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Theory_a-ACU_TreeDagArgumentIterator.o -MD -MP -MF $(DEPDIR)/libACU_Theory_a-ACU_TreeDagArgumentIterator.Tpo -c -o libACU_Theory_a-ACU_TreeDagArgumentIterator.o `test -f 'ACU_TreeDagArgumentIterator.cc' || echo '$(srcdir)/'`ACU_TreeDagArgumentIterator.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Theory_a-ACU_TreeDagArgumentIterator.Tpo $(DEPDIR)/libACU_Theory_a-ACU_TreeDagArgumentIterator.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_TreeDagArgumentIterator.cc' object='libACU_Theory_a-ACU_TreeDagArgumentIterator.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Theory_a-ACU_TreeDagArgumentIterator.o `test -f 'ACU_TreeDagArgumentIterator.cc' || echo '$(srcdir)/'`ACU_TreeDagArgumentIterator.cc libACU_Theory_a-ACU_TreeDagArgumentIterator.obj: ACU_TreeDagArgumentIterator.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Theory_a-ACU_TreeDagArgumentIterator.obj -MD -MP -MF $(DEPDIR)/libACU_Theory_a-ACU_TreeDagArgumentIterator.Tpo -c -o libACU_Theory_a-ACU_TreeDagArgumentIterator.obj `if test -f 'ACU_TreeDagArgumentIterator.cc'; then $(CYGPATH_W) 'ACU_TreeDagArgumentIterator.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_TreeDagArgumentIterator.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Theory_a-ACU_TreeDagArgumentIterator.Tpo $(DEPDIR)/libACU_Theory_a-ACU_TreeDagArgumentIterator.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_TreeDagArgumentIterator.cc' object='libACU_Theory_a-ACU_TreeDagArgumentIterator.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Theory_a-ACU_TreeDagArgumentIterator.obj `if test -f 'ACU_TreeDagArgumentIterator.cc'; then $(CYGPATH_W) 'ACU_TreeDagArgumentIterator.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_TreeDagArgumentIterator.cc'; fi` libACU_Theory_a-ACU_LazySubproblem.o: ACU_LazySubproblem.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Theory_a-ACU_LazySubproblem.o -MD -MP -MF $(DEPDIR)/libACU_Theory_a-ACU_LazySubproblem.Tpo -c -o libACU_Theory_a-ACU_LazySubproblem.o `test -f 'ACU_LazySubproblem.cc' || echo '$(srcdir)/'`ACU_LazySubproblem.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Theory_a-ACU_LazySubproblem.Tpo $(DEPDIR)/libACU_Theory_a-ACU_LazySubproblem.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_LazySubproblem.cc' object='libACU_Theory_a-ACU_LazySubproblem.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Theory_a-ACU_LazySubproblem.o `test -f 'ACU_LazySubproblem.cc' || echo '$(srcdir)/'`ACU_LazySubproblem.cc libACU_Theory_a-ACU_LazySubproblem.obj: ACU_LazySubproblem.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Theory_a-ACU_LazySubproblem.obj -MD -MP -MF $(DEPDIR)/libACU_Theory_a-ACU_LazySubproblem.Tpo -c -o libACU_Theory_a-ACU_LazySubproblem.obj `if test -f 'ACU_LazySubproblem.cc'; then $(CYGPATH_W) 'ACU_LazySubproblem.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_LazySubproblem.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Theory_a-ACU_LazySubproblem.Tpo $(DEPDIR)/libACU_Theory_a-ACU_LazySubproblem.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_LazySubproblem.cc' object='libACU_Theory_a-ACU_LazySubproblem.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Theory_a-ACU_LazySubproblem.obj `if test -f 'ACU_LazySubproblem.cc'; then $(CYGPATH_W) 'ACU_LazySubproblem.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_LazySubproblem.cc'; fi` libACU_Theory_a-ACU_UnificationSubproblem2.o: ACU_UnificationSubproblem2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Theory_a-ACU_UnificationSubproblem2.o -MD -MP -MF $(DEPDIR)/libACU_Theory_a-ACU_UnificationSubproblem2.Tpo -c -o libACU_Theory_a-ACU_UnificationSubproblem2.o `test -f 'ACU_UnificationSubproblem2.cc' || echo '$(srcdir)/'`ACU_UnificationSubproblem2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Theory_a-ACU_UnificationSubproblem2.Tpo $(DEPDIR)/libACU_Theory_a-ACU_UnificationSubproblem2.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_UnificationSubproblem2.cc' object='libACU_Theory_a-ACU_UnificationSubproblem2.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Theory_a-ACU_UnificationSubproblem2.o `test -f 'ACU_UnificationSubproblem2.cc' || echo '$(srcdir)/'`ACU_UnificationSubproblem2.cc libACU_Theory_a-ACU_UnificationSubproblem2.obj: ACU_UnificationSubproblem2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Theory_a-ACU_UnificationSubproblem2.obj -MD -MP -MF $(DEPDIR)/libACU_Theory_a-ACU_UnificationSubproblem2.Tpo -c -o libACU_Theory_a-ACU_UnificationSubproblem2.obj `if test -f 'ACU_UnificationSubproblem2.cc'; then $(CYGPATH_W) 'ACU_UnificationSubproblem2.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_UnificationSubproblem2.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Theory_a-ACU_UnificationSubproblem2.Tpo $(DEPDIR)/libACU_Theory_a-ACU_UnificationSubproblem2.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_UnificationSubproblem2.cc' object='libACU_Theory_a-ACU_UnificationSubproblem2.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Theory_a-ACU_UnificationSubproblem2.obj `if test -f 'ACU_UnificationSubproblem2.cc'; then $(CYGPATH_W) 'ACU_UnificationSubproblem2.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_UnificationSubproblem2.cc'; fi` libACU_Theory_a-ACU_BndVarLhsAutomaton.o: ACU_BndVarLhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Theory_a-ACU_BndVarLhsAutomaton.o -MD -MP -MF $(DEPDIR)/libACU_Theory_a-ACU_BndVarLhsAutomaton.Tpo -c -o libACU_Theory_a-ACU_BndVarLhsAutomaton.o `test -f 'ACU_BndVarLhsAutomaton.cc' || echo '$(srcdir)/'`ACU_BndVarLhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Theory_a-ACU_BndVarLhsAutomaton.Tpo $(DEPDIR)/libACU_Theory_a-ACU_BndVarLhsAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_BndVarLhsAutomaton.cc' object='libACU_Theory_a-ACU_BndVarLhsAutomaton.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Theory_a-ACU_BndVarLhsAutomaton.o `test -f 'ACU_BndVarLhsAutomaton.cc' || echo '$(srcdir)/'`ACU_BndVarLhsAutomaton.cc libACU_Theory_a-ACU_BndVarLhsAutomaton.obj: ACU_BndVarLhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libACU_Theory_a-ACU_BndVarLhsAutomaton.obj -MD -MP -MF $(DEPDIR)/libACU_Theory_a-ACU_BndVarLhsAutomaton.Tpo -c -o libACU_Theory_a-ACU_BndVarLhsAutomaton.obj `if test -f 'ACU_BndVarLhsAutomaton.cc'; then $(CYGPATH_W) 'ACU_BndVarLhsAutomaton.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_BndVarLhsAutomaton.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libACU_Theory_a-ACU_BndVarLhsAutomaton.Tpo $(DEPDIR)/libACU_Theory_a-ACU_BndVarLhsAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_BndVarLhsAutomaton.cc' object='libACU_Theory_a-ACU_BndVarLhsAutomaton.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libACU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libACU_Theory_a-ACU_BndVarLhsAutomaton.obj `if test -f 'ACU_BndVarLhsAutomaton.cc'; then $(CYGPATH_W) 'ACU_BndVarLhsAutomaton.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_BndVarLhsAutomaton.cc'; fi` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/libACU_Theory_a-ACU_ArgumentIterator.Po -rm -f ./$(DEPDIR)/libACU_Theory_a-ACU_BaseDagNode.Po -rm -f ./$(DEPDIR)/libACU_Theory_a-ACU_BndVarLhsAutomaton.Po -rm -f ./$(DEPDIR)/libACU_Theory_a-ACU_CollectorLhsAutomaton.Po -rm -f ./$(DEPDIR)/libACU_Theory_a-ACU_DagArgumentIterator.Po -rm -f ./$(DEPDIR)/libACU_Theory_a-ACU_DagNode.Po -rm -f ./$(DEPDIR)/libACU_Theory_a-ACU_ExtensionInfo.Po -rm -f ./$(DEPDIR)/libACU_Theory_a-ACU_GndLhsAutomaton.Po -rm -f ./$(DEPDIR)/libACU_Theory_a-ACU_LazySubproblem.Po -rm -f ./$(DEPDIR)/libACU_Theory_a-ACU_LhsAutomaton.Po -rm -f ./$(DEPDIR)/libACU_Theory_a-ACU_NGA_LhsAutomaton.Po -rm -f ./$(DEPDIR)/libACU_Theory_a-ACU_NonLinearLhsAutomaton.Po -rm -f ./$(DEPDIR)/libACU_Theory_a-ACU_RhsAutomaton.Po -rm -f ./$(DEPDIR)/libACU_Theory_a-ACU_Subproblem.Po -rm -f ./$(DEPDIR)/libACU_Theory_a-ACU_Symbol.Po -rm -f ./$(DEPDIR)/libACU_Theory_a-ACU_Term.Po -rm -f ./$(DEPDIR)/libACU_Theory_a-ACU_TreeDagArgumentIterator.Po -rm -f ./$(DEPDIR)/libACU_Theory_a-ACU_TreeDagNode.Po -rm -f ./$(DEPDIR)/libACU_Theory_a-ACU_UnificationSubproblem2.Po -rm -f ./$(DEPDIR)/libACU_Theory_a-ACU_VarLhsAutomaton.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/libACU_Theory_a-ACU_ArgumentIterator.Po -rm -f ./$(DEPDIR)/libACU_Theory_a-ACU_BaseDagNode.Po -rm -f ./$(DEPDIR)/libACU_Theory_a-ACU_BndVarLhsAutomaton.Po -rm -f ./$(DEPDIR)/libACU_Theory_a-ACU_CollectorLhsAutomaton.Po -rm -f ./$(DEPDIR)/libACU_Theory_a-ACU_DagArgumentIterator.Po -rm -f ./$(DEPDIR)/libACU_Theory_a-ACU_DagNode.Po -rm -f ./$(DEPDIR)/libACU_Theory_a-ACU_ExtensionInfo.Po -rm -f ./$(DEPDIR)/libACU_Theory_a-ACU_GndLhsAutomaton.Po -rm -f ./$(DEPDIR)/libACU_Theory_a-ACU_LazySubproblem.Po -rm -f ./$(DEPDIR)/libACU_Theory_a-ACU_LhsAutomaton.Po -rm -f ./$(DEPDIR)/libACU_Theory_a-ACU_NGA_LhsAutomaton.Po -rm -f ./$(DEPDIR)/libACU_Theory_a-ACU_NonLinearLhsAutomaton.Po -rm -f ./$(DEPDIR)/libACU_Theory_a-ACU_RhsAutomaton.Po -rm -f ./$(DEPDIR)/libACU_Theory_a-ACU_Subproblem.Po -rm -f ./$(DEPDIR)/libACU_Theory_a-ACU_Symbol.Po -rm -f ./$(DEPDIR)/libACU_Theory_a-ACU_Term.Po -rm -f ./$(DEPDIR)/libACU_Theory_a-ACU_TreeDagArgumentIterator.Po -rm -f ./$(DEPDIR)/libACU_Theory_a-ACU_TreeDagNode.Po -rm -f ./$(DEPDIR)/libACU_Theory_a-ACU_UnificationSubproblem2.Po -rm -f ./$(DEPDIR)/libACU_Theory_a-ACU_VarLhsAutomaton.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-noinstLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: Maude-Maude3.2/src/AU_Persistent/000077500000000000000000000000001420036611000166725ustar00rootroot00000000000000Maude-Maude3.2/src/AU_Persistent/AU_Deque.cc000066400000000000000000000051301420036611000206300ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class AU_Deque. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "AU_Persistent.hh" // interface class definitions #include "symbol.hh" // AU stack class definitions #include "AU_Deque.hh" int AU_Deque::computeBaseSort(Symbol* symbol) const { #ifdef CHECK_DEQUE checkIntegrity(); #endif //cerr << "AU_Deque::computeBaseSort()\n"; //cerr << "left = " << left << " right = " << right << endl; if (left != 0) { int index = left->getSortIndex(); //cerr << "left index = " << index << endl; if (index == Sort::SORT_UNKNOWN) index = left->fwdComputeBaseSort(symbol); //cerr << "left index now = " << index << endl; #ifdef CHECK_DEQUE checkIntegrity(); #endif if (right == 0) return index; int index2 = right->getSortIndex(); //cerr << "right index = " << index2 << endl; if (index2 == Sort::SORT_UNKNOWN) index2 = right->revComputeBaseSort(symbol); //cerr << "right index now = " << index2 << endl; #ifdef CHECK_DEQUE checkIntegrity(); #endif return symbol->traverse(symbol->traverse(0, index), index2); } Assert(right != 0, "no args"); int index = right->getSortIndex(); //cerr << "Right index = " << index << endl; if (index == Sort::SORT_UNKNOWN) index = right->revComputeBaseSort(symbol); //cerr << "Right index now = " << index << endl; #ifdef CHECK_DEQUE checkIntegrity(); #endif return index; } #ifdef CHECK_DEQUE void AU_Deque::checkIntegrity() const { int l = AU_StackNode::checkIntegrity(left); int r = AU_StackNode::checkIntegrity(right); Assert(nrElements == l + r, "bad deque size: " << nrElements << " != " << l << " + " << r); } #endif Maude-Maude3.2/src/AU_Persistent/AU_Deque.hh000066400000000000000000000124031420036611000206430ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for deques of arguments with constant time copy. // #ifndef _AU_Deque_hh_ #define _AU_Deque_hh_ #include "argVec.hh" #include "AU_StackNode.hh" class AU_Deque { public: AU_Deque(const ArgVec& source); int length() const; void copyToArgVec(ArgVec& dest) const; DagNode* topLeft(); void popLeft(); void pushLeft(DagNode* dagNode); void pushLeft(const AU_Deque& other); void pushLeft(const ArgVec& argArray); DagNode* topRight(); void popRight(); void pushRight(DagNode* dagNode); void pushRight(const AU_Deque& other); void pushRight(const ArgVec& argArray); int computeBaseSort(Symbol* symbol) const; void mark(); #ifdef CHECK_DEQUE void checkIntegrity() const; #endif private: int nrElements; AU_StackNode* left; AU_StackNode* right; friend class AU_DequeIter; }; inline AU_Deque::AU_Deque(const ArgVec& source) { nrElements = source.length(); Assert(nrElements >= 2, "need at least 2 arguments"); int nrLeftElements = nrElements / 2; ArgVec::const_iterator splitPoint = source.begin() + nrLeftElements; left = AU_StackNode::fwdMake(nrLeftElements, splitPoint); right = AU_StackNode::revMake(nrElements - nrLeftElements, splitPoint); #ifdef CHECK_DEQUE checkIntegrity(); #endif } inline int AU_Deque::length() const { return nrElements; } inline void AU_Deque::mark() { #ifdef CHECK_DEQUE checkIntegrity(); #endif if (left != 0) left->mark(); if (right != 0) right->mark(); } inline void AU_Deque::copyToArgVec(ArgVec& dest) const { #ifdef CHECK_DEQUE checkIntegrity(); #endif Assert(dest.length() == nrElements, "size mismatch()"); if (left != 0) left->fwdCopy(dest.begin()); if (right != 0) right->revCopy(dest.end()); } inline DagNode* AU_Deque::topLeft() { #ifdef CHECK_DEQUE checkIntegrity(); #endif Assert(nrElements > 0, "empty deque"); if (left == 0) { if (nrElements == 1) { left = right; right = 0; } else right = right->split(nrElements, left); #ifdef CHECK_DEQUE checkIntegrity(); #endif } return left->first(); } inline void AU_Deque::popLeft() { #ifdef CHECK_DEQUE checkIntegrity(); #endif Assert(left != 0, "no elements on left stack"); left = AU_StackNode::pop(left); --nrElements; #ifdef CHECK_DEQUE checkIntegrity(); #endif } inline void AU_Deque::pushLeft(DagNode* dagNode) { #ifdef CHECK_DEQUE checkIntegrity(); #endif left = AU_StackNode::push(left, dagNode); ++nrElements; #ifdef CHECK_DEQUE checkIntegrity(); #endif } inline void AU_Deque::pushLeft(const AU_Deque& other) { #ifdef CHECK_DEQUE checkIntegrity(); #endif left = AU_StackNode::prepend(left, other.nrElements, other.left, other.right); nrElements += other.nrElements; // other could be us! #ifdef CHECK_DEQUE checkIntegrity(); #endif } inline void AU_Deque::pushLeft(const ArgVec& argArray) { #ifdef CHECK_DEQUE checkIntegrity(); #endif int n = argArray.length(); left = AU_StackNode::fwdJoin(n, argArray.end(), left); nrElements += n; #ifdef CHECK_DEQUE checkIntegrity(); #endif } inline DagNode* AU_Deque::topRight() { #ifdef CHECK_DEQUE checkIntegrity(); #endif Assert(nrElements > 0, "empty deque"); if (right == 0) { if (nrElements == 1) { right = left; left = 0; } else left = left->split(nrElements, right); #ifdef CHECK_DEQUE checkIntegrity(); #endif } return right->first(); } inline void AU_Deque::popRight() { #ifdef CHECK_DEQUE checkIntegrity(); #endif Assert(right != 0, "no elements on right stack"); right = AU_StackNode::pop(right); --nrElements; #ifdef CHECK_DEQUE checkIntegrity(); #endif } inline void AU_Deque::pushRight(DagNode* dagNode) { #ifdef CHECK_DEQUE checkIntegrity(); #endif right = AU_StackNode::push(right, dagNode); ++nrElements; #ifdef CHECK_DEQUE checkIntegrity(); #endif } inline void AU_Deque::pushRight(const AU_Deque& other) { #ifdef CHECK_DEQUE checkIntegrity(); #endif right = AU_StackNode::prepend(right, other.nrElements, other.right, other.left); nrElements += other.nrElements; // other could be us! #ifdef CHECK_DEQUE checkIntegrity(); #endif } inline void AU_Deque::pushRight(const ArgVec& argArray) { #ifdef CHECK_DEQUE checkIntegrity(); #endif int n = argArray.length(); right = AU_StackNode::revJoin(n, argArray.begin(), right); nrElements += n; #ifdef CHECK_DEQUE checkIntegrity(); #endif } #endif Maude-Maude3.2/src/AU_Persistent/AU_DequeIter.cc000066400000000000000000000027571420036611000214700ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class AU_DequeIter. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "AU_Persistent.hh" // AU persistent class definitions #include "AU_DequeIter.hh" void AU_DequeIter::reverseRight() { revIndex = (nrElementsRemaining - 1) / AU_StackNode::ELEMENTS_PER_NODE; reversed.resize(revIndex); AU_StackNode* p = right; for (Vector::iterator b = reversed.begin();; ++b) { AU_StackNode* n = p->next; if (n == 0) break; *b = p; p = n; } current = p; index = AU_StackNode::ELEMENTS_PER_NODE - 1; } Maude-Maude3.2/src/AU_Persistent/AU_DequeIter.hh000066400000000000000000000041761420036611000214770ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for iterators for AU deques. // #ifndef _AU_DequeIter_hh_ #define _AU_DequeIter_hh_ #include "AU_Deque.hh" class AU_DequeIter { NO_COPYING(AU_DequeIter); public: AU_DequeIter(const AU_Deque& deque); bool valid() const; DagNode* getDagNode() const; void next(); private: void reverseRight(); int nrElementsRemaining; AU_StackNode* current; AU_StackNode* right; int index; Vector reversed; int revIndex; }; inline AU_DequeIter::AU_DequeIter(const AU_Deque& deque) { nrElementsRemaining = deque.nrElements; right = deque.right; current = deque.left; if (current == 0) reverseRight(); else { revIndex = -1; index = current->firstUsed(); } } inline bool AU_DequeIter::valid() const { return nrElementsRemaining > 0; } inline DagNode* AU_DequeIter::getDagNode() const { return current->args[index]; } inline void AU_DequeIter::next() { if (--nrElementsRemaining > 0) { if (revIndex < 0) { if (++index == AU_StackNode::ELEMENTS_PER_NODE) { current = current->next; if (current == 0) reverseRight(); else index = 0; } } else { if (--index < 0) { current = reversed[--revIndex]; index = AU_StackNode::ELEMENTS_PER_NODE - 1; } } } } #endif Maude-Maude3.2/src/AU_Persistent/AU_Persistent.hh000066400000000000000000000020441420036611000217400ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Forward declarations for peristent representation of // AU arguments lists. // #ifndef _AU_Persistent_hh_ #define _AU_Persistent_hh_ class AU_StackNode; class AU_Deque; class AU_DequeIter; #endif Maude-Maude3.2/src/AU_Persistent/AU_StackArgVec.cc000066400000000000000000000072731420036611000217340ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Stack <-> ArgVec conversion. // AU_StackNode* AU_StackNode::fwdMake(int nrElements, ArgVec::const_iterator s, AU_StackNode* d) { Assert(nrElements >= 1, "no elements"); for (;;) { AU_StackNode* t = d; d = new AU_StackNode; d->next = t; int i = ELEMENTS_PER_NODE - 1; if (nrElements < ELEMENTS_PER_NODE) { do { --s; d->args[i] = *s; --i; } while (--nrElements > 0); do d->args[i] = 0; while (--i >= 0); break; } else { do { --s; d->args[i] = *s; } while (--i >= 0); nrElements -= ELEMENTS_PER_NODE; if (nrElements == 0) break; } } return d; } AU_StackNode* AU_StackNode::fwdJoin(int nrElements, ArgVec::const_iterator s, AU_StackNode* d) { Assert(nrElements >= 1, "no elements"); if (d != 0) { int f = d->firstUsed(); if (f > 0) { d = d->partialClone(f); do { --s; d->args[--f] = *s; if (--nrElements == 0) { while (f > 0) d->args[--f] = 0; return d; } } while (f > 0); } } return fwdMake(nrElements, s, d); } AU_StackNode* AU_StackNode::revMake(int nrElements, ArgVec::const_iterator s, AU_StackNode* d) { Assert(nrElements >= 1, "no elements"); for (;;) { AU_StackNode* t = d; d = new AU_StackNode; d->next = t; int i = ELEMENTS_PER_NODE - 1; if (nrElements < ELEMENTS_PER_NODE) { do { d->args[i] = *s; ++s; --i; } while (--nrElements > 0); do d->args[i] = 0; while (--i >= 0); break; } else { do { d->args[i] = *s; ++s; } while (--i >= 0); nrElements -= ELEMENTS_PER_NODE; if (nrElements == 0) break; } } return d; } AU_StackNode* AU_StackNode::revJoin(int nrElements, ArgVec::const_iterator s, AU_StackNode* d) { Assert(nrElements >= 1, "no elements"); if (d != 0) { int f = d->firstUsed(); if (f > 0) { d = d->partialClone(f); do { d->args[--f] = *s; ++s; if (--nrElements == 0) { while (f > 0) d->args[--f] = 0; return d; } } while (f > 0); } } return revMake(nrElements, s, d); } void AU_StackNode::fwdCopy(ArgVec::iterator s) const { const AU_StackNode* d = this; int i = firstUsed(); for(;;) { *s = d->args[i]; if (++i == ELEMENTS_PER_NODE) { d = d->next; if (d == 0) break; i = 0; } ++s; } } void AU_StackNode::revCopy(ArgVec::iterator s) const { const AU_StackNode* d = this; int i = firstUsed(); for(;;) { --s; *s = d->args[i]; if (++i == ELEMENTS_PER_NODE) { d = d->next; if (d == 0) break; i = 0; } } } Maude-Maude3.2/src/AU_Persistent/AU_StackNode.cc000066400000000000000000000162261420036611000214500ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class AU_StackNode. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "AU_Persistent.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" // AU stack class definitions #include "AU_StackNode.hh" // our stuff #include "AU_StackArgVec.cc" #include "AU_StackSort.cc" #ifdef CHECK_DEQUE int AU_StackNode::checkIntegrity(AU_StackNode* p) { int count = 0; if (p != 0) { int i = 0; while (p->args[i] == 0) { Assert(i < ELEMENTS_PER_NODE - 1, "empty AU_StackNode"); ++i; } while (p != 0) { while (i < ELEMENTS_PER_NODE) { DagNode* d = p->args[i]; Assert(d != 0, "zero DagNode*"); Symbol* s= d->symbol(); Assert(s != 0, "zero Symbol*"); int nrArgs = s->arity(); Assert(nrArgs >= 0 && nrArgs < 20, "bad symbol"); ++count; ++i; } i = 0; p = p->next; } } return count; } #endif void AU_StackNode::mark() { if (isMarked()) return; setMarked(); for (int i = firstUsed(); i < ELEMENTS_PER_NODE; ++i) args[i]->mark(); for (AU_StackNode* p = next; p != 0 && !(p->isMarked()); p = p->next) { p->setMarked(); for (int i = 0; i < ELEMENTS_PER_NODE; ++i) p->args[i]->mark(); } } local_inline AU_StackNode* AU_StackNode::fwdCopy(int nrElements, AU_StackNode* tail, AU_StackNode const*& sp, int& si) { Assert(nrElements >= 1, "no elements to copy"); // // Return a stack containing first nrElements elements from (sp, si) // with last next pointer pointing at tail. Return next // element via (sp, si) pair with sp = 0 if no next element. // int nrElementsInFirstNode = 1 + (nrElements - 1) % ELEMENTS_PER_NODE; nrElements -= nrElementsInFirstNode; AU_StackNode* start = new AU_StackNode; AU_StackNode* dp = start; int di = ELEMENTS_PER_NODE - nrElementsInFirstNode; for (int i = 0; i < di; i++) dp->args[i] = 0; for(;;) { dp->args[di] = sp->args[si]; if (++si == ELEMENTS_PER_NODE) { sp = sp->next; si = 0; } if (++di == ELEMENTS_PER_NODE) { if (nrElements == 0) break; nrElements -= ELEMENTS_PER_NODE; Assert(nrElements >= 0, "not enough elements for new stack node"); dp = dp->next = new AU_StackNode; di = 0; } } dp->next = tail; return start; } local_inline AU_StackNode* AU_StackNode::revCopy(const AU_StackNode* sp, int si) { Assert(sp != 0, "no elements to copy"); // // Return a stack containing all the elements from (sp, si) // in reverse order. // AU_StackNode* dp = 0; int di; goto start; for(;;) { if (--di < 0) { start: AU_StackNode* t = new AU_StackNode; t->next = dp; dp = t; di = ELEMENTS_PER_NODE - 1; } dp->args[di] = sp->args[si]; if (++si == ELEMENTS_PER_NODE) { sp = sp->next; if (sp == 0) break; si = 0; } } while (--di >= 0) dp->args[di] = 0; return dp; } AU_StackNode* AU_StackNode::split(int nrElements, AU_StackNode*& rev) const { Assert(nrElements >= 2, "need at least 2 elements to split"); const AU_StackNode* sp = this; int si = firstUsed(); AU_StackNode* fwd = fwdCopy(nrElements / 2, 0, sp, si); rev = revCopy(sp, si); return fwd; } AU_StackNode* AU_StackNode::pop(AU_StackNode* base) { int f = base->firstUsed(); if (f == ELEMENTS_PER_NODE - 1) return base->next; AU_StackNode* p = new AU_StackNode; int i = 0; do p->args[i] =0; while (++i <= f); do p->args[i] = base->args[i]; while (++i < ELEMENTS_PER_NODE); p->next = base->next; return p; } AU_StackNode* AU_StackNode::push(AU_StackNode* base, DagNode* dagNode) { AU_StackNode* dp = new AU_StackNode; dp->next = base; int di = ELEMENTS_PER_NODE - 1; if (base != 0) { int f = base->firstUsed(); if (f > 0) { do dp->args[di] = base->args[di]; while (--di >= f); dp->next = base->next; } } Assert(0 <= di && di < ELEMENTS_PER_NODE, "di bad " << di); dp->args[di] = dagNode; while (--di >= 0) dp->args[di] = 0; return dp; } AU_StackNode* AU_StackNode::prepend(AU_StackNode* base, int nrElements, const AU_StackNode* fwd, const AU_StackNode* rev) { Assert(nrElements >= 1, "no elements to prepend"); // // Create a first new stack node and copy in any leftover // element from our first node. // AU_StackNode* dp = new AU_StackNode; dp->next = base; int di = ELEMENTS_PER_NODE; if (base != 0) { int f = base->firstUsed(); if (f > 0) { do { --di; dp->args[di] = base->args[di]; } while (di > f); dp->next = base->next; } } Assert(1 <= di && di <= ELEMENTS_PER_NODE, "di bad " << di); // // There is room for di elements in *dp. // if (rev != 0) { // // Prepend contents of rev stack in reverse order. // --di; int ri = rev->firstUsed(); nrElements -= (ELEMENTS_PER_NODE - ri); for(;;) { dp->args[di] = rev->args[ri]; if (++ri == ELEMENTS_PER_NODE) { rev = rev->next; if (rev == 0) break; ri = 0; nrElements -= ELEMENTS_PER_NODE; } if (--di < 0) { AU_StackNode* t = dp; dp = new AU_StackNode; dp->next = t; di = ELEMENTS_PER_NODE - 1; } } Assert(0 <= di && di < ELEMENTS_PER_NODE, "di bad " << di); // // di slots left in *dp; if fwd stack empty, clear them // and return. // if (fwd == 0) { while (--di >= 0) dp->args[di] = 0; return dp; } } Assert(nrElements >= 1, "nrElements bad " << nrElements); Assert(0 <= di && di <= ELEMENTS_PER_NODE, "di bad " << di); // // We have nrElements elements on the fwd stack. We want to // put the first (nrElements - di) elements into new nodes and // the last di elements (0 padded if nrElements < di) into *dp. // AU_StackNode* start = dp; nrElements -= di; if (nrElements > 0) { int si = fwd->firstUsed(); start = fwdCopy(nrElements, dp, fwd, si); } // // Need to copy the last di elements from fwd to *dp; may include // some nulls if fwd didn't contain at least di elements. // for (int fi = ELEMENTS_PER_NODE - 1; di > 0; --fi) { --di; dp->args[di] = fwd->args[fi]; } return start; } Maude-Maude3.2/src/AU_Persistent/AU_StackNode.hh000077500000000000000000000111401420036611000214530ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for nodes in persistent stacks. // #ifndef _AU_StackNode_hh_ #define _AU_StackNode_hh_ #include "argVec.hh" #include "symbol.hh" // HACK #include "dagNode.hh" // HACK #include "memoryCell.hh" class AU_StackNode { NO_COPYING(AU_StackNode); public: AU_StackNode(){} DagNode* first() const; int firstUsed() const; AU_StackNode* split(int nrElements, AU_StackNode*& rev) const; static AU_StackNode* pop(AU_StackNode* base); static AU_StackNode* push(AU_StackNode* base, DagNode* dagNode); static AU_StackNode* prepend(AU_StackNode* base, int nrElements, const AU_StackNode* fwd, const AU_StackNode* rev); void fwdCopy(ArgVec::iterator s) const; void revCopy(ArgVec::iterator s) const; static AU_StackNode* fwdJoin(int nrElements, ArgVec::const_iterator s, AU_StackNode* d); static AU_StackNode* revJoin(int nrElements, ArgVec::const_iterator s, AU_StackNode* d); static AU_StackNode* fwdMake(int nrElements, ArgVec::const_iterator s, AU_StackNode* d = 0); static AU_StackNode* revMake(int nrElements, ArgVec::const_iterator s, AU_StackNode* d = 0); int fwdComputeBaseSort(Symbol* symbol); int revComputeBaseSort(Symbol* symbol); int getSortIndex() const; void mark(); void* operator new(size_t size); #ifdef CHECK_DEQUE static int checkIntegrity(AU_StackNode* p); #endif private: enum Values { ELEMENTS_PER_NODE = 4 }; static AU_StackNode* fwdCopy(int nrElements, AU_StackNode* tail, AU_StackNode const*& sp, int& si); static AU_StackNode* revCopy(const AU_StackNode* sp, int si); void setMarked(); bool isMarked() const; void setSortIndex(int sortIndex); AU_StackNode* partialClone(int f); // // Get pointer to MemoryInfo object associated with us. // MemoryInfo* getMemoryInfo(); const MemoryInfo* getMemoryInfo() const; DagNode* args[ELEMENTS_PER_NODE]; AU_StackNode* next; friend class AU_DequeIter; }; inline void* AU_StackNode::operator new(size_t size) { Assert(size <= sizeof(MemoryCell), "stack node too big"); void* m = MemoryCell::allocateMemoryCell(); // // MemoryCell::allocateMemoryCell() no longer sets the half word to // Sort::SORT_UNKNOWN. This responsibility is shifted to us. // MemoryCell::getMemoryInfo(m)->setHalfWord(Sort::SORT_UNKNOWN); // // MemoryCell::allocateMemoryCell() no longer clears the memory // cell flags. This responsibility is shifted to us. // MemoryCell::getMemoryInfo(m)->clearAllFlags(); return m; } inline MemoryInfo* AU_StackNode::getMemoryInfo() { return MemoryCell::getMemoryInfo(this); } inline const MemoryInfo* AU_StackNode::getMemoryInfo() const { return MemoryCell::getMemoryInfo(this); } inline void AU_StackNode::setMarked() { getMemoryInfo()->setMarked(); } inline bool AU_StackNode::isMarked() const { return getMemoryInfo()->isMarked(); } inline void AU_StackNode::setSortIndex(int sortIndex) { getMemoryInfo()->setHalfWord(sortIndex); } inline int AU_StackNode::getSortIndex() const { return getMemoryInfo()->getHalfWord(); } inline DagNode* AU_StackNode::first() const { for (DagNode* const* p = args;; ++p) { Assert(p - args < ELEMENTS_PER_NODE, "didn't find non-null pointer"); DagNode* t = *p; if (t != 0) return t; } } inline int AU_StackNode::firstUsed() const { for (int i = 0;; ++i) { Assert(i < ELEMENTS_PER_NODE, "didn't find non-null pointer"); if (args[i] != 0) return i; } } inline AU_StackNode* AU_StackNode::partialClone(int f) { AU_StackNode* d = new AU_StackNode; do d->args[f] = args[f]; while (++f < ELEMENTS_PER_NODE); d->next = next; return d; } #endif Maude-Maude3.2/src/AU_Persistent/AU_StackSort.cc000066400000000000000000000104601420036611000215040ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Sort computations on presistent stacks. // int AU_StackNode::fwdComputeBaseSort(Symbol* symbol) { AU_StackNode* p = this; AU_StackNode* n; int index = Sort::SORT_UNKNOWN; // // First we perform pointer reversal on all nodes except the first // that need their sort calculated. // for (AU_StackNode* i = p->next; i != 0 && (index = i->getSortIndex()) == Sort::SORT_UNKNOWN; i = n) { n = i->next; i->next = p; p = i; } // // Now we traverse the reversed linked list, filling in sort // information and restoring next pointers. // // p points to the last node that needs to have its sort calculated // and next pointer restored. n is the old next pointer value that // needs to be restored. // for (AU_StackNode* i = p; i != this; i = p) { { int index2 = i->args[ELEMENTS_PER_NODE - 1]->getSortIndex(); index = (index == Sort::SORT_UNKNOWN) ? index2 : symbol->traverse(symbol->traverse(0, index2), index); } for (int j = ELEMENTS_PER_NODE - 2; j >= 0; --j) { int index2 = i->args[j]->getSortIndex(); index = symbol->traverse(symbol->traverse(0, index2), index); } i->setSortIndex(index); p = i->next; i->next = n; n = i; } // // Compute sort for this node. // int index2 = args[ELEMENTS_PER_NODE - 1]->getSortIndex(); index = (index == Sort::SORT_UNKNOWN) ? index2 : symbol->traverse(symbol->traverse(0, index2), index); for (int j = ELEMENTS_PER_NODE - 2; j >= 0; --j) { DagNode* d = args[j]; if (d == 0) break; int index2 = d->getSortIndex(); index = symbol->traverse(symbol->traverse(0, index2), index); } setSortIndex(index); return index; } int AU_StackNode::revComputeBaseSort(Symbol* symbol) { // // This function is symmetric to the above - we just swap the args // to the sort calculation function. // AU_StackNode* p = this; AU_StackNode* n; int index = Sort::SORT_UNKNOWN; // // First we perform pointer reversal on all nodes except the first // that need their sort calculated. // for (AU_StackNode* i = p->next; i != 0 && (index = i->getSortIndex()) == Sort::SORT_UNKNOWN; i = n) { n = i->next; i->next = p; p = i; } // // Now we traverse the reversed linked list, filling in sort // information and restoring next pointers. // // p points to the last node that needs to have its sort calculated // and next pointer restored. n is the old next pointer value that // needs to be restored. // for (AU_StackNode* i = p; i != this; i = p) { { int index2 = i->args[ELEMENTS_PER_NODE - 1]->getSortIndex(); index = (index == Sort::SORT_UNKNOWN) ? index2 : symbol->traverse(symbol->traverse(0, index), index2); } for (int j = ELEMENTS_PER_NODE - 2; j >= 0; --j) { int index2 = i->args[j]->getSortIndex(); index = symbol->traverse(symbol->traverse(0, index), index2); } i->setSortIndex(index); p = i->next; i->next = n; n = i; } // // Compute sort for this node. // int index2 = args[ELEMENTS_PER_NODE - 1]->getSortIndex(); index = (index == Sort::SORT_UNKNOWN) ? index2 : symbol->traverse(symbol->traverse(0, index), index2); for (int j = ELEMENTS_PER_NODE - 2; j >= 0; --j) { DagNode* d = args[j]; if (d == 0) break; int index2 = d->getSortIndex(); index = symbol->traverse(symbol->traverse(0, index), index2); } setSortIndex(index); return index; } Maude-Maude3.2/src/AU_Persistent/ChangeLog000077500000000000000000000106071420036611000204530ustar00rootroot000000000000002019-07-01 Steven Eker * AU_StackNode.hh: rewritten using new MemoryCell definition ===================================Maude123================================== 2013-09-26 Steven Eker * AU_StackNode.hh (new): set half word to SORT_UNKNOWN rather than relying on allocateMemoryCell() (new): call initFlags() (new): clean up; update comments; initFlags() becomes clearAllFlags() 2004-06-08 Steven Eker * AU_StackSort.cc (revComputeBaseSort): fixed nasty bug where we were failing to take account of a sort calculated for part of a list and therefore ignored that part of the list for sort calculation purposes (fwdComputeBaseSort): fixed symmetric bug ===================================Maude84c================================== 2003-04-23 Steven Eker * AU_Deque.hh (copyFromArgVec): make into ctor 2003-04-22 Steven Eker * AU_StackNode.cc (mark): fixed nasty bug where we were not marking ourself (checkIntegrity): fixed bug where we were alloing zero args in non-start node * AU_Deque.cc (computeBaseSort): use checkIntegrity() * AU_Deque.hh (class AU_Deque): added decl for checkIntegrity() * AU_Deque.cc (checkIntegrity): added * AU_StackNode.hh (class AU_StackNode): added decl for checkIntegrity() * AU_StackNode.cc (checkIntegrity): added 2003-04-21 Steven Eker * AU_Deque.hh (topRight): added (topLeft): added * AU_StackNode.hh (class AU_StackNode): updatede decl for split() * AU_StackNode.cc (split): switch method fo returning pointers * AU_StackNode.hh (class AU_StackNode): added decl for pop() * AU_StackNode.cc (pop): added * AU_Deque.hh (popRight): added (popLeft): added 2003-04-18 Steven Eker * AU_StackNode.cc (push): fixed nasty bug where we were forgetting to clear unused elements * AU_StackSort.cc (revComputeBaseSort): code cleaning (fwdComputeBaseSort): code cleaning 2003-04-17 Steven Eker * AU_StackSort.cc (fwdComputeBaseSort): fixed bug where we were starting at ELEMENTS_PER_NODE rather than ELEMENTS_PER_NODE - 1 (2 places) (revComputeBaseSort): fixed symmetric bug * AU_Deque.hh (pushRight): added argArray version (pushLeft): added argArray version * AU_StackNode.hh (class AU_StackNode): added decls for fwdJoin() and revJoin() * AU_StackArgVec.cc (fwdJoin): added (revJoin): added * AU_StackNode.hh (class AU_StackNode): updated decls for fwdMake() and revMake() (partialClone): added * AU_StackArgVec.cc (revMake): take AU_StackNode* arg (fwdMake): take AU_StackNode* arg 2003-04-16 Steven Eker * AU_Deque.hh (pushLeft): added DagNode* version (pushRight): added DagNode* version * AU_StackNode.cc (push): added * AU_StackNode.hh (class AU_StackNode): added decl for push() * AU_Deque.hh (pushLeft): added AU_Deque version (pushRight): added AU_Deque version * AU_StackNode.hh (class AU_StackNode): updated decl for prepend() * AU_StackNode.cc (prepend): rewritten to used explicit base pointer rather than this pointer; work correctly with null base pointer 2003-04-15 Steven Eker * AU_Deque.hh (class AU_Deque): updated decl for computeBaseSort() * AU_Deque.cc (computeBaseSort): made const * AU_StackArgVec.cc (fwdMake): fix bug where we were checking i > 0 rather than i >= 0 (2 places) (revMake): fix symmetric bug * AU_DequeIter.cc (reverseRight): fixed bug where we were incorrectly setting index 2003-04-14 Steven Eker * AU_Deque.hh (length): made const * AU_StackNode.hh (setSortIndex): added (getSortIndex): added * AU_StackSort.cc: created * AU_Deque.cc: created * AU_Deque.hh: created * AU_StackArgVec.cc: created * AU_DequeIter.cc (reverseRight): rewritten * AU_Persistent.hh: created 2003-04-11 Steven Eker * AU_DequeIter.hh: created * AU_DequeIter.cc: created * AU_StackNode.hh (class AU_StackNode): make class AU_DequeIter a friend * AU_Deque.hh: created * AU_StackNode.cc (mark): added * AU_StackNode.hh (new): added (getMemoryCell): added (2 versions) (setMarked): added (isMarked): added (class AU_StackNode): added decl for mark() * AU_StackNode.cc (revCopy): added (split): rewritten 2003-04-10 Steven Eker * AU_StackNode.hh: created * AU_StackNode.cc: created Maude-Maude3.2/src/AU_Persistent/Makefile.am000066400000000000000000000007111420036611000207250ustar00rootroot00000000000000noinst_LIBRARIES = libAU_Persistent.a libAU_Persistent_a_CPPFLAGS = \ -I$(top_srcdir)/src/Utility \ -I$(top_srcdir)/src/Interface \ -I$(top_srcdir)/src/Core \ -I$(top_srcdir)/src/Variable \ -I$(top_srcdir)/src/FullCompiler libAU_Persistent_a_SOURCES = \ AU_StackNode.cc \ AU_Deque.cc \ AU_DequeIter.cc EXTRA_DIST = \ AU_StackArgVec.cc \ AU_StackSort.cc noinst_HEADERS = \ AU_Deque.hh \ AU_DequeIter.hh \ AU_Persistent.hh \ AU_StackNode.hh Maude-Maude3.2/src/AU_Persistent/Makefile.in000066400000000000000000000577671420036611000207650ustar00rootroot00000000000000# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/AU_Persistent ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_have_poll.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) AR = ar ARFLAGS = cru AM_V_AR = $(am__v_AR_@AM_V@) am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) am__v_AR_0 = @echo " AR " $@; am__v_AR_1 = libAU_Persistent_a_AR = $(AR) $(ARFLAGS) libAU_Persistent_a_LIBADD = am_libAU_Persistent_a_OBJECTS = \ libAU_Persistent_a-AU_StackNode.$(OBJEXT) \ libAU_Persistent_a-AU_Deque.$(OBJEXT) \ libAU_Persistent_a-AU_DequeIter.$(OBJEXT) libAU_Persistent_a_OBJECTS = $(am_libAU_Persistent_a_OBJECTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/libAU_Persistent_a-AU_Deque.Po \ ./$(DEPDIR)/libAU_Persistent_a-AU_DequeIter.Po \ ./$(DEPDIR)/libAU_Persistent_a-AU_StackNode.Po am__mv = mv -f AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(libAU_Persistent_a_SOURCES) DIST_SOURCES = $(libAU_Persistent_a_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ $(top_srcdir)/mkinstalldirs ChangeLog DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ BUDDY_LIB = @BUDDY_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FLEX = @FLEX@ GCC_LIBS = @GCC_LIBS@ GMP_LIBS = @GMP_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSIGSEGV_LIB = @LIBSIGSEGV_LIB@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TECLA_LIBS = @TECLA_LIBS@ VERSION = @VERSION@ YICES2_LIB = @YICES2_LIB@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LIBRARIES = libAU_Persistent.a libAU_Persistent_a_CPPFLAGS = \ -I$(top_srcdir)/src/Utility \ -I$(top_srcdir)/src/Interface \ -I$(top_srcdir)/src/Core \ -I$(top_srcdir)/src/Variable \ -I$(top_srcdir)/src/FullCompiler libAU_Persistent_a_SOURCES = \ AU_StackNode.cc \ AU_Deque.cc \ AU_DequeIter.cc EXTRA_DIST = \ AU_StackArgVec.cc \ AU_StackSort.cc noinst_HEADERS = \ AU_Deque.hh \ AU_DequeIter.hh \ AU_Persistent.hh \ AU_StackNode.hh all: all-am .SUFFIXES: .SUFFIXES: .cc .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/AU_Persistent/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/AU_Persistent/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libAU_Persistent.a: $(libAU_Persistent_a_OBJECTS) $(libAU_Persistent_a_DEPENDENCIES) $(EXTRA_libAU_Persistent_a_DEPENDENCIES) $(AM_V_at)-rm -f libAU_Persistent.a $(AM_V_AR)$(libAU_Persistent_a_AR) libAU_Persistent.a $(libAU_Persistent_a_OBJECTS) $(libAU_Persistent_a_LIBADD) $(AM_V_at)$(RANLIB) libAU_Persistent.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAU_Persistent_a-AU_Deque.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAU_Persistent_a-AU_DequeIter.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAU_Persistent_a-AU_StackNode.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` libAU_Persistent_a-AU_StackNode.o: AU_StackNode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Persistent_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libAU_Persistent_a-AU_StackNode.o -MD -MP -MF $(DEPDIR)/libAU_Persistent_a-AU_StackNode.Tpo -c -o libAU_Persistent_a-AU_StackNode.o `test -f 'AU_StackNode.cc' || echo '$(srcdir)/'`AU_StackNode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libAU_Persistent_a-AU_StackNode.Tpo $(DEPDIR)/libAU_Persistent_a-AU_StackNode.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='AU_StackNode.cc' object='libAU_Persistent_a-AU_StackNode.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Persistent_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libAU_Persistent_a-AU_StackNode.o `test -f 'AU_StackNode.cc' || echo '$(srcdir)/'`AU_StackNode.cc libAU_Persistent_a-AU_StackNode.obj: AU_StackNode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Persistent_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libAU_Persistent_a-AU_StackNode.obj -MD -MP -MF $(DEPDIR)/libAU_Persistent_a-AU_StackNode.Tpo -c -o libAU_Persistent_a-AU_StackNode.obj `if test -f 'AU_StackNode.cc'; then $(CYGPATH_W) 'AU_StackNode.cc'; else $(CYGPATH_W) '$(srcdir)/AU_StackNode.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libAU_Persistent_a-AU_StackNode.Tpo $(DEPDIR)/libAU_Persistent_a-AU_StackNode.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='AU_StackNode.cc' object='libAU_Persistent_a-AU_StackNode.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Persistent_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libAU_Persistent_a-AU_StackNode.obj `if test -f 'AU_StackNode.cc'; then $(CYGPATH_W) 'AU_StackNode.cc'; else $(CYGPATH_W) '$(srcdir)/AU_StackNode.cc'; fi` libAU_Persistent_a-AU_Deque.o: AU_Deque.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Persistent_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libAU_Persistent_a-AU_Deque.o -MD -MP -MF $(DEPDIR)/libAU_Persistent_a-AU_Deque.Tpo -c -o libAU_Persistent_a-AU_Deque.o `test -f 'AU_Deque.cc' || echo '$(srcdir)/'`AU_Deque.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libAU_Persistent_a-AU_Deque.Tpo $(DEPDIR)/libAU_Persistent_a-AU_Deque.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='AU_Deque.cc' object='libAU_Persistent_a-AU_Deque.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Persistent_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libAU_Persistent_a-AU_Deque.o `test -f 'AU_Deque.cc' || echo '$(srcdir)/'`AU_Deque.cc libAU_Persistent_a-AU_Deque.obj: AU_Deque.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Persistent_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libAU_Persistent_a-AU_Deque.obj -MD -MP -MF $(DEPDIR)/libAU_Persistent_a-AU_Deque.Tpo -c -o libAU_Persistent_a-AU_Deque.obj `if test -f 'AU_Deque.cc'; then $(CYGPATH_W) 'AU_Deque.cc'; else $(CYGPATH_W) '$(srcdir)/AU_Deque.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libAU_Persistent_a-AU_Deque.Tpo $(DEPDIR)/libAU_Persistent_a-AU_Deque.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='AU_Deque.cc' object='libAU_Persistent_a-AU_Deque.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Persistent_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libAU_Persistent_a-AU_Deque.obj `if test -f 'AU_Deque.cc'; then $(CYGPATH_W) 'AU_Deque.cc'; else $(CYGPATH_W) '$(srcdir)/AU_Deque.cc'; fi` libAU_Persistent_a-AU_DequeIter.o: AU_DequeIter.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Persistent_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libAU_Persistent_a-AU_DequeIter.o -MD -MP -MF $(DEPDIR)/libAU_Persistent_a-AU_DequeIter.Tpo -c -o libAU_Persistent_a-AU_DequeIter.o `test -f 'AU_DequeIter.cc' || echo '$(srcdir)/'`AU_DequeIter.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libAU_Persistent_a-AU_DequeIter.Tpo $(DEPDIR)/libAU_Persistent_a-AU_DequeIter.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='AU_DequeIter.cc' object='libAU_Persistent_a-AU_DequeIter.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Persistent_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libAU_Persistent_a-AU_DequeIter.o `test -f 'AU_DequeIter.cc' || echo '$(srcdir)/'`AU_DequeIter.cc libAU_Persistent_a-AU_DequeIter.obj: AU_DequeIter.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Persistent_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libAU_Persistent_a-AU_DequeIter.obj -MD -MP -MF $(DEPDIR)/libAU_Persistent_a-AU_DequeIter.Tpo -c -o libAU_Persistent_a-AU_DequeIter.obj `if test -f 'AU_DequeIter.cc'; then $(CYGPATH_W) 'AU_DequeIter.cc'; else $(CYGPATH_W) '$(srcdir)/AU_DequeIter.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libAU_Persistent_a-AU_DequeIter.Tpo $(DEPDIR)/libAU_Persistent_a-AU_DequeIter.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='AU_DequeIter.cc' object='libAU_Persistent_a-AU_DequeIter.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Persistent_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libAU_Persistent_a-AU_DequeIter.obj `if test -f 'AU_DequeIter.cc'; then $(CYGPATH_W) 'AU_DequeIter.cc'; else $(CYGPATH_W) '$(srcdir)/AU_DequeIter.cc'; fi` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/libAU_Persistent_a-AU_Deque.Po -rm -f ./$(DEPDIR)/libAU_Persistent_a-AU_DequeIter.Po -rm -f ./$(DEPDIR)/libAU_Persistent_a-AU_StackNode.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/libAU_Persistent_a-AU_Deque.Po -rm -f ./$(DEPDIR)/libAU_Persistent_a-AU_DequeIter.Po -rm -f ./$(DEPDIR)/libAU_Persistent_a-AU_StackNode.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-noinstLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: Maude-Maude3.2/src/AU_Theory/000077500000000000000000000000001420036611000160045ustar00rootroot00000000000000Maude-Maude3.2/src/AU_Theory/AU_ArgumentIterator.cc000066400000000000000000000027011420036611000221740ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class AU_ArgumentIterator. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "AU_Theory.hh" // AU theory class definitions #include "AU_ArgumentIterator.hh" bool AU_ArgumentIterator::valid() const { return position < argArray.length(); } Term* AU_ArgumentIterator::argument() const { Assert(position < argArray.length(), "no args left"); return argArray[position].term; } void AU_ArgumentIterator::next() { Assert(position < argArray.length(), "no args left"); ++position; } Maude-Maude3.2/src/AU_Theory/AU_ArgumentIterator.hh000066400000000000000000000026301420036611000222070ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for argument iterator for AU terms. // #ifndef _AU_ArgumentIterator_hh_ #define _AU_ArgumentIterator_hh_ #include "rawArgumentIterator.hh" #include "AU_Term.hh" class AU_ArgumentIterator : public RawArgumentIterator { public: AU_ArgumentIterator(const Vector& arguments); bool valid() const; Term* argument() const; void next(); private: const Vector& argArray; int position; }; inline AU_ArgumentIterator::AU_ArgumentIterator(const Vector& arguments) : argArray(arguments) { position = 0; } #endif Maude-Maude3.2/src/AU_Theory/AU_BaseDagNode.hh000066400000000000000000000051201420036611000210040ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Base class for DAG nodes in the A, AU, AUl and theories. // #ifndef _AU_BaseDagNode_hh_ #define _AU_BaseDagNode_hh_ #include "dagNode.hh" class AU_BaseDagNode : public DagNode { NO_COPYING(AU_BaseDagNode); public: enum NormalizationStatus { // // Default: no guarantees. // FRESH = 0, // // Node was produced by an assignment in AU matcher: // (a) all arguments are reduced up to strategy of our symbol // (this only holds if it was true of subject before matching); // (b) all arguments have their true sort; and // (c) argument list in theory normal form. // ASSIGNMENT = 1, // // As above but arguments are stored in a deque (AU_DequeNode) // rather than in an ArgVec (AU_DagNode). // DEQUE = 2 }; AU_BaseDagNode(AU_Symbol* symbol); AU_Symbol* symbol() const; NormalizationStatus getNormalizationStatus() const; void setNormalizationStatus(NormalizationStatus status); bool isDeque() const; bool isFresh() const; bool isProducedByAssignment() const; }; inline AU_BaseDagNode::AU_BaseDagNode(AU_Symbol* symbol) : DagNode(symbol) { } inline AU_Symbol* AU_BaseDagNode::symbol() const { return safeCast(AU_Symbol*, DagNode::symbol()); } inline AU_BaseDagNode::NormalizationStatus AU_BaseDagNode::getNormalizationStatus() const { return static_cast(getTheoryByte()); } inline bool AU_BaseDagNode::isDeque() const { return getTheoryByte() == DEQUE; } inline bool AU_BaseDagNode::isFresh() const { return getTheoryByte() == FRESH; } inline bool AU_BaseDagNode::isProducedByAssignment() const { return getTheoryByte() == ASSIGNMENT; } inline void AU_BaseDagNode::setNormalizationStatus(NormalizationStatus status) { setTheoryByte(status); } #endif Maude-Maude3.2/src/AU_Theory/AU_CollapseMatcher.cc000066400000000000000000000240661420036611000217560ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for matching where AU top symbol collapses. // bool AU_LhsAutomaton::uniqueCollapseMatch(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo) { // // Because one subterm cannot take the identity element we can only // collapse to that subterm. // Every other subterm will be a variable that can take identity. For a // match to be possible it either must be already bound to identity or is // now bound to identity. // Term* identity = topSymbol->getIdentity(); int rigidLength = rigidPart.length(); for (int i = 0; i < rigidLength; i++) { Subterm& r = rigidPart[i]; if (r.type == VARIABLE && r.variable.takeIdentity) { int index = r.variable.index; DagNode* d = solution.value(index); if (d == 0) { // // The only way an unbound variable that can take // identity can be in the rigid part is if it is // supposed to be bound by the unique subterm we will // collapse to. We need to bind it to identity to ensure // we don't produce a false match by binding it to // something else. // solution.bind(index, topSymbol->getIdentityDag()); } else { if(!(identity->equal(d))) return false; } Assert(!r.variable.abstracted, "abstraction varible in rigid part"); } } SubproblemAccumulator subproblems; int flexLength = flexPart.length(); for (int i = 0; i < flexLength; i++) { Subterm& f = flexPart[i]; if (f.type == VARIABLE && f.variable.takeIdentity) { // // BUG: If f is an awkward variable or awkward abstraction variable // then it could be our uniqueCollapseSubterm even though // f.variable.takeIdentity is true. Need to find a clean way of // handling awkward variables. // // 11/6/08: This probably isn't a bug since awkward variables no longer get // their takeIdentity flags set to true. // int index = f.variable.index; DagNode* d = solution.value(index); if (d == 0) solution.bind(index, topSymbol->getIdentityDag()); else { if(!(identity->equal(d))) return false; } if (f.variable.abstracted != 0) { Subproblem* subproblem; if(!(f.variable.abstracted->match(solution.value(index), solution, subproblem))) return false; subproblems.add(subproblem); } } } Subproblem* subproblem; if (!(uniqueCollapseAutomaton->match(subject,solution, subproblem, extensionInfo))) return false; subproblems.add(subproblem); returnedSubproblem = subproblems.extractSubproblem(); return true; } void AU_LhsAutomaton::bindUnboundVariablesToIdentity(Substitution& solution, int exception) { int nrFlexVariables = flexPart.length(); for (int i = 0; i < nrFlexVariables; i++) { Assert(flexPart[i].type == VARIABLE && flexPart[i].variable.takeIdentity, "non variable in multiway collapse"); if (i != exception) { int index = flexPart[i].variable.index; if (solution.value(index) == 0) solution.bind(index, topSymbol->getIdentityDag()); } } } bool AU_LhsAutomaton::multiwayCollapseMatch(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo) { Term* identity = topSymbol->getIdentity(); int matchingVariable = NONE; bool rigidMatchingVariable = false; int rigidLength = rigidPart.length(); for (int i = 0; i < rigidLength; i++) { Assert(rigidPart[i].type == VARIABLE, "non variable in multiway collapse"); TopVariable& tv = rigidPart[i].variable; Assert(tv.takeIdentity, "variable can't take identity"); DagNode* d = solution.value(tv.index); Assert(d != 0, "unbound variable that can take identity in rigid part"); if (!(identity->equal(d))) { if (matchingVariable != NONE) // repeated variable fails 2nd time around return false; matchingVariable = i; rigidMatchingVariable = true; } } int lastViableVariable = NONE; int nrViableVariables = 0; int nrFlexVariables = flexPart.length(); for (int i = 0; i < nrFlexVariables; i++) { Assert(flexPart[i].type == VARIABLE, "non variable in multiway collapse"); TopVariable& tv = flexPart[i].variable; Assert(tv.takeIdentity, "variable can't take identity"); DagNode* d = solution.value(tv.index); if (d != 0) { if (!(identity->equal(d))) { if (matchingVariable != NONE) // repeated variable fails 2nd time around return false; matchingVariable = i; } } else { // // If variable is repeated under AU symbol then we will have // nrViableVariables >= 2 and we will get failure when we try to // match repeated variable against non-identity because it // will already be bound to identity by other instance. Somewhat // inefficient especially if alien extension is involved but // this is a rare case. // lastViableVariable = i; ++nrViableVariables; } } if (matchingVariable != NONE) { // // Exactly one variable was bound to something other than our identity. // TopVariable& mv = rigidMatchingVariable ? rigidPart[matchingVariable].variable : flexPart[matchingVariable].variable; bool r = subject->matchVariable(mv.index, mv.sort, matchAtTop, solution, returnedSubproblem, extensionInfo); if (r) bindUnboundVariablesToIdentity(solution, NONE); return r; } // // At this point all variables are either: // (a) bound to our identity; or // (b) unbound. // if (identity->equal(subject)) { // // Subject is our identity; we must still deal with alien extension. // returnedSubproblem = 0; bindUnboundVariablesToIdentity(solution, NONE); if (extensionInfo != 0) { extensionInfo->setValidAfterMatch(true); extensionInfo->setMatchedWhole(true); } return true; } if (nrViableVariables == 0) { // // All variables are bound to our identity and the subject is not // our identity. We can succeed only if we have entension and the // subject contains our identity. // if (extensionInfo == 0) return false; TopVariable& tv = flexPart[0].variable; // pick any since they are all bound to identity Assert(identity->equal(solution.value(tv.index)), "should be identity"); return subject->matchVariable(tv.index, tv.sort, matchAtTop, solution, returnedSubproblem, extensionInfo); } if (nrViableVariables == 1) { // // All variables except one are bound to our identity and the // subject is not our identity. The last viable variable must match // the subject (with extension if present). // This case need to make good on our constraint propagation // guarantee when we have no extension. // TopVariable& vv = flexPart[lastViableVariable].variable; return subject->matchVariable(vv.index, vv.sort, matchAtTop, solution, returnedSubproblem, extensionInfo); } // // General case: multiple unbound variable instances that can take identity. // Any bound variables are already bound to identity. // DisjunctiveSubproblemAccumulator alternatives(solution); for (int i = 0; i < nrFlexVariables; i++) { TopVariable& tv = flexPart[i].variable; if (solution.value(tv.index) == 0) { local.copy(solution); bindUnboundVariablesToIdentity(local, i); Subproblem* subproblem; if (subject->matchVariable(tv.index, tv.sort, matchAtTop, local, subproblem, extensionInfo)) { if (!(alternatives.empty()) && extensionInfo != 0) { // // Need to exclude the case where subject = id + ext and // we match our chosen variable against our identity // in all but the first branch to avoid duplicate solutions. // SubproblemAccumulator subproblems; subproblems.add(subproblem); subproblems.add(new EqualitySubproblem(identity, tv.index, false)); subproblem = subproblems.extractSubproblem(); } alternatives.addOption(local, subproblem, extensionInfo); continue; } } } return alternatives.extract(solution, returnedSubproblem, extensionInfo); } bool AU_LhsAutomaton::collapseMatch(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo) { if (uniqueCollapseAutomaton != 0) return uniqueCollapseMatch(subject, solution, returnedSubproblem, extensionInfo); Subproblem* subproblem; if (!multiwayCollapseMatch(subject, solution, subproblem, extensionInfo)) return false; SubproblemAccumulator subproblems; subproblems.add(subproblem); int nrVariables = solution.nrFragileBindings(); int nrFlexVariables = flexPart.length(); for (int i = 0; i < nrFlexVariables; i++) { Assert(flexPart[i].type == VARIABLE, "non variable in multiway collapse"); TopVariable& tv = flexPart[i].variable; if (tv.abstracted != 0) { subproblems.add(new VariableAbstractionSubproblem(tv.abstracted, tv.index, nrVariables)); } } returnedSubproblem = subproblems.extractSubproblem(); return true; } Maude-Maude3.2/src/AU_Theory/AU_DagArgumentIterator.cc000066400000000000000000000027701420036611000226160ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class AU_DagArgumentIterator. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "AU_Theory.hh" // A theory class definitions #include "AU_Symbol.hh" #include "AU_DagNode.hh" #include "AU_DagArgumentIterator.hh" bool AU_DagArgumentIterator::valid() const { return position < argArray.length(); } DagNode* AU_DagArgumentIterator::argument() const { Assert(position < argArray.length(), "no args left"); return argArray[position]; } void AU_DagArgumentIterator::next() { Assert(position < argArray.length(), "no args left"); ++position; } Maude-Maude3.2/src/AU_Theory/AU_DagArgumentIterator.hh000066400000000000000000000026211420036611000226230ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for argument iterator for AU dag nodes. // #ifndef _AU_DagArgumentIterator_hh_ #define _AU_DagArgumentIterator_hh_ #include "rawDagArgumentIterator.hh" class AU_DagArgumentIterator : public RawDagArgumentIterator { public: AU_DagArgumentIterator(const ArgVec& arguments); bool valid() const; DagNode* argument() const; void next(); private: const ArgVec& argArray; int position; }; inline AU_DagArgumentIterator::AU_DagArgumentIterator(const ArgVec& arguments) : argArray(arguments) { position = 0; } #endif Maude-Maude3.2/src/AU_Theory/AU_DagNode.cc000077500000000000000000000340551420036611000202130ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2021 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class AU_DagNode. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "variable.hh" #include "AU_Theory.hh" // interface class definitions #include "term.hh" // core class definitions #include "substitution.hh" #include "pendingUnificationStack.hh" #include "unificationContext.hh" // variable class definitions #include "variableSymbol.hh" #include "variableDagNode.hh" // AU theory class definitions #include "AU_Symbol.hh" #include "AU_DagNode.hh" #include "AU_DequeDagNode.hh" #include "AU_DagArgumentIterator.hh" #include "AU_ExtensionInfo.hh" #include "AU_Subproblem.hh" // our stuff #include "AU_Normalize.cc" #include "AU_DagOperations.cc" AU_DagNode* getAU_DagNode(DagNode* d) { if (safeCast(AU_BaseDagNode*, d)->isDeque()) return AU_DequeDagNode::dequeToArgVec(safeCast(AU_DequeDagNode*, d)); return safeCast(AU_DagNode*, d); } RawDagArgumentIterator* AU_DagNode::arguments() { return new AU_DagArgumentIterator(argArray); } size_t AU_DagNode::getHashValue() { size_t hashValue = symbol()->getHashValue(); for (DagNode* d : argArray) hashValue = hash(hashValue, d->getHashValue()); return hashValue; } int AU_DagNode::compareArguments(const DagNode* other) const { if (safeCast(const AU_BaseDagNode*, other)->isDeque()) return - safeCast(const AU_DequeDagNode*, other)->compare(this); const ArgVec& argArray2 = safeCast(const AU_DagNode*, other)->argArray; int r = argArray.length() - argArray2.length(); if (r != 0) return r; ArgVec::const_iterator j = argArray2.begin(); for (DagNode* d : argArray) { int r = d->compare(*j); if (r != 0) return r; ++j; } Assert(j == argArray2.end(), "iterator problem"); return 0; } DagNode* AU_DagNode::markArguments() { Assert(argArray.length() > 0, "no arguments"); argArray.evacuate(); // // We avoid recursing on the first subterm that shares our symbol. // Symbol* s = symbol(); DagNode* r = 0; for (DagNode* d : argArray) { if (r == 0 && d->symbol() == s) r = d; else d->mark(); } return r; } DagNode* AU_DagNode::copyEagerUptoReduced2() { int nrArgs = argArray.length(); AU_Symbol* s = symbol(); AU_DagNode* n = new AU_DagNode(s, nrArgs); if (s->getPermuteStrategy() == BinarySymbol::EAGER) { for (int i = 0; i < nrArgs; ++i) n->argArray[i] = argArray[i]->copyEagerUptoReduced(); } else copy(argArray.begin(), argArray.end(), n->argArray.begin()); return n; } DagNode* AU_DagNode::copyAll2() { int nrArgs = argArray.length(); AU_Symbol* s = symbol(); AU_DagNode* n = new AU_DagNode(s, nrArgs); for (int i = 0; i < nrArgs; ++i) n->argArray[i] = argArray[i]->copyAll(); return n; } void AU_DagNode::clearCopyPointers2() { for (DagNode* d : argArray) d->clearCopyPointers(); } void AU_DagNode::overwriteWithClone(DagNode* old) { AU_DagNode* d = new(old) AU_DagNode(symbol(), argArray.length()); d->copySetRewritingFlags(this); d->setNormalizationStatus(getNormalizationStatus()); d->setSortIndex(getSortIndex()); copy(argArray.begin(), argArray.end(), d->argArray.begin()); } DagNode* AU_DagNode::makeClone() { int nrArgs = argArray.length(); AU_DagNode* d = new AU_DagNode(symbol(), nrArgs); d->copySetRewritingFlags(this); d->setNormalizationStatus(getNormalizationStatus()); d->setSortIndex(getSortIndex()); copy(argArray.begin(), argArray.end(), d->argArray.begin()); return d; } DagNode* AU_DagNode::copyWithReplacement(int argIndex, DagNode* replacement) { int nrArgs = argArray.length(); AU_DagNode* n = new AU_DagNode(symbol(), nrArgs); ArgVec& args2 = n->argArray; for (int i = 0; i < nrArgs; ++i) args2[i] = (i == argIndex) ? replacement : argArray[i]; return n; } DagNode* AU_DagNode::copyWithReplacement(Vector& redexStack, int first, int last) { int nrArgs = argArray.length(); AU_DagNode* n = new AU_DagNode(symbol(), nrArgs); ArgVec& args = n->argArray; int nextReplacementIndex = redexStack[first].argIndex(); for (int i = 0; i < nrArgs; ++i) { if (i == nextReplacementIndex) { args[i] = redexStack[first].node(); ++first; nextReplacementIndex = (first <= last) ? redexStack[first].argIndex() : NONE; } else args[i] = argArray[i]; } return n; } void AU_DagNode::partialReplace(DagNode* replacement, ExtensionInfo* extensionInfo) { AU_ExtensionInfo* e = safeCast(AU_ExtensionInfo*, extensionInfo); int first = e->firstMatched(); int last = e->lastMatched(); argArray[first++] = replacement; int nrArgs = argArray.length(); for (++last; last < nrArgs; ++last) argArray[first++] = argArray[last]; argArray.contractTo(first); repudiateSortInfo(); // probably not set but be safe if (isProducedByAssignment()) // we _were_ in theory normal form { if (replacement->symbol() == symbol() || // replacement is in our theory -> we are no longer in theory normal form !(replacement->isReduced())) // replacement is not reduced -> we are no longer in theory normal form setNormalizationStatus(FRESH); } } DagNode* AU_DagNode::partialConstruct(DagNode* replacement, ExtensionInfo* extensionInfo) { AU_ExtensionInfo* e = safeCast(AU_ExtensionInfo*, extensionInfo); int first = e->firstMatched(); int last = e->lastMatched(); int nrArgs = argArray.length(); AU_DagNode* n = new AU_DagNode(symbol(), nrArgs + first - last); ArgVec& args2 = n->argArray; for (int i = 0; i < first; ++i) args2[i] = argArray[i]; args2[first++] = replacement; for (++last; last < nrArgs; ++last) args2[first++] = argArray[last]; return n; } ExtensionInfo* AU_DagNode::makeExtensionInfo() { return new AU_ExtensionInfo(this); } bool AU_DagNode::matchVariableWithExtension(int index, const Sort* sort, Substitution& /* solution */, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo) { // // This code could be much more sophisticated: in particular we could look for // the variable having too smaller sort and return false; the subject having // total subterm multiplicity of 2 and return unique solution. // AU_ExtensionInfo* e = safeCast(AU_ExtensionInfo*, extensionInfo); AU_Subproblem* subproblem = new AU_Subproblem(this, 0, argArray.length() - 1, 1, e); int min = symbol()->oneSidedId() ? 1 : 2; subproblem->addTopVariable(0, index, min, UNBOUNDED, const_cast(sort)); // HACK subproblem->complete(); returnedSubproblem = subproblem; extensionInfo->setValidAfterMatch(false); return true; } // // Unification code. // DagNode::ReturnResult AU_DagNode::computeBaseSortForGroundSubterms(bool warnAboutUnimplemented) { AU_Symbol* s = symbol(); // // If we have an identity we bail to backstop version since AU/AUl/AUr is not // currently supported for unification. // if (s->oneSidedId()) return DagNode::computeBaseSortForGroundSubterms(warnAboutUnimplemented); ReturnResult result = GROUND; for (DagNode* d : argArray) { ReturnResult r = d->computeBaseSortForGroundSubterms(warnAboutUnimplemented); if (r > result) result = r; // NONGROUND dominates GROUND, UNIMPLEMENTED dominates NONGROUND } if (result == GROUND) { s->computeBaseSort(this); setGround(); } return result; } bool AU_DagNode::computeSolvedForm2(DagNode* rhs, UnificationContext& solution, PendingUnificationStack& pending) { DebugEnter(this << " =? " << rhs); // // If we have a one-sided identity we bail. // if (symbol()->oneSidedId()) return DagNode::computeSolvedForm2(rhs, solution, pending); if (symbol() == rhs->symbol()) { // // AU unification problems with the same top symbol need to be collected and solved // simultaneously for termination reasons. // pending.push(symbol(), this, rhs); return true; } if (VariableDagNode* v = dynamic_cast(rhs)) { VariableDagNode* r = v->lastVariableInChain(solution); if (DagNode* value = solution.value(r->getIndex())) return computeSolvedForm2(value, solution, pending); // // We now treat unification problems f(...) =? X where X's representative // variable is unbound as full AU unification problems now that the variable // theory no longer resolves such problems and we require // purification. // pending.push(symbol(), this, rhs); return true; } return pending.resolveTheoryClash(this, rhs); } void AU_DagNode::insertVariables2(NatSet& occurs) { for (DagNode* d : argArray) d->insertVariables(occurs); } DagNode* AU_DagNode::instantiate2(const Substitution& substitution, bool maintainInvariants) { AU_Symbol* s = symbol(); int nrArgs = argArray.length(); for (int i = 0; i < nrArgs; ++i) { if (DagNode* n = argArray[i]->instantiate(substitution, maintainInvariants)) { // // Argument changed under instantiation - need to make a new // dagnode. // bool ground = true; AU_DagNode* d = new AU_DagNode(s, nrArgs); // // Copy the arguments we already looked at. // for (int j = 0; j < i; ++j) { if (!(argArray[j]->isGround())) ground = false; d->argArray[j] = argArray[j]; } // // Handle current argument. // d->argArray[i] = n; if (!(n->isGround())) ground = false; // // Handle remaining arguments. // for (++i; i < nrArgs; ++i) { DagNode* a = argArray[i]; if (DagNode* n = a->instantiate(substitution, maintainInvariants)) a = n; if (!(a->isGround())) ground = false; d->argArray[i] = a; } if (maintainInvariants) { // // Normalize the new dagnode. We pass the dumb flag as true to prevent deque // formation. If it doesn't collapse and all its arguments are ground we // compute its base sort, and set ground flag. // if (d->normalizeAtTop(true) != COLLAPSED && ground) { s->computeBaseSort(d); d->setGround(); } Assert(d->isDeque() == false, "Oops we got a deque! " << d); } else { if (ground) d->setGround(); } return d; } } return 0; // unchanged } // // Narrowing code. // bool AU_DagNode::indexVariables2(NarrowingVariableInfo& indices, int baseIndex) { bool ground = true; for (DagNode* d : argArray) { if (!(d->indexVariables(indices, baseIndex))) ground = false; } return ground; } DagNode* AU_DagNode::instantiateWithReplacement(const Substitution& substitution, const Vector* eagerCopies, int argIndex, DagNode* newDag) { int nrArgs = argArray.length(); AU_DagNode* n = new AU_DagNode(symbol(), nrArgs); ArgVec& args2 = n->argArray; bool eager = (eagerCopies != 0) && symbol()->getPermuteStrategy() == BinarySymbol::EAGER; for (int i = 0; i < nrArgs; ++i) { DagNode* d; if (i == argIndex) d = newDag; else { d = argArray[i]; SAFE_INSTANTIATE(d, eager, substitution, *eagerCopies); } args2[i] = d; } return n; } DagNode* AU_DagNode::instantiateWithCopies2(const Substitution& substitution, const Vector& eagerCopies) { AU_Symbol* s = symbol(); bool eager = s->getPermuteStrategy() == BinarySymbol::EAGER; int nrArgs = argArray.length(); for (int i = 0; i < nrArgs; ++i) { DagNode* a = argArray[i]; DagNode* n = eager ? a->instantiateWithCopies(substitution, eagerCopies) : a->instantiate(substitution, false); if (n != 0) { // // Argument changed under instantiation - need to make a new // dagnode. // //bool ground = true; AU_DagNode* d = new AU_DagNode(s, nrArgs); // // Copy the arguments we already looked at. // for (int j = 0; j < i; ++j) { //if (!(argArray[j]->isGround())) // ground = false; d->argArray[j] = argArray[j]; } // // Handle current argument. // d->argArray[i] = n; //if (!(n->isGround())) // ground = false; // // Handle remaining arguments. // for (++i; i < nrArgs; ++i) { DagNode* a = argArray[i]; SAFE_INSTANTIATE(a, eager, substitution, eagerCopies); //if (!(a->isGround())) // ground = false; d->argArray[i] = a; } // // Currently the only user of this function is PositionState::rebuildAndInstantiateDag() // via instantiateWithCopies(), SAFE_INSTANTIATE() and instantiateWithReplacement(), // and this is only used for various kinds of narrowing steps. These are followed // by reduction so we don't need to worry about: // normal forms // sort computations // ground flags // // If this changes in the future the following will be needed: // #if 0 // // Normalize the new dagnode. We pass the dumb flag as true to prevent deque // formation. If it doesn't collapse and all its arguments are ground we // compute its base sort, and set ground flag. // if (d->normalizeAtTop(true) != COLLAPSED && ground) { s->computeBaseSort(d); d->setGround(); } Assert(d->isDeque() == false, "Oops we got a deque! " << d); #endif return d; } } return 0; // unchanged } Maude-Maude3.2/src/AU_Theory/AU_DagNode.hh000077500000000000000000000116641420036611000202260ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2020 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for DAG nodes in the A, AUl, AUr and AU theories. // #ifndef _AU_DagNode_hh_ #define _AU_DagNode_hh_ #include "AU_BaseDagNode.hh" #include "argVec.hh" class AU_DagNode : public AU_BaseDagNode { NO_COPYING(AU_DagNode); public: AU_DagNode(AU_Symbol* symbol, int size); // // Functions required by theory interface. // RawDagArgumentIterator* arguments(); size_t getHashValue(); int compareArguments(const DagNode* other) const; void overwriteWithClone(DagNode* old); DagNode* makeClone(); DagNode* copyWithReplacement(int argIndex, DagNode* replacement); DagNode* copyWithReplacement(Vector& redexStack, int first, int last); // // Functions required to handle extension information. // bool matchVariableWithExtension(int index, const Sort* sort, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo); void partialReplace(DagNode* replacement, ExtensionInfo* extensionInfo); DagNode* partialConstruct(DagNode* replacement, ExtensionInfo* extensionInfo); ExtensionInfo* makeExtensionInfo(); // // Although we currently don't support unification or narrowing in AU nodes // we still need some functionality from the unification and narrowing interfaces // to allow narrowing to happen below us or in a sibling branch. // // Unification member functions. // DagNode* instantiate2(const Substitution& substitution, bool maintainInvariants); // // Supported for A only. // ReturnResult computeBaseSortForGroundSubterms(bool warnAboutUnimplemented); bool computeSolvedForm2(DagNode* rhs, UnificationContext& solution, PendingUnificationStack& pending); void insertVariables2(NatSet& occurs); // // Interface for narrowing. // bool indexVariables2(NarrowingVariableInfo& indices, int baseIndex); DagNode* instantiateWithReplacement(const Substitution& substitution, const Vector* eagerCopies, int argIndex, DagNode* newDag); DagNode* instantiateWithCopies2(const Substitution& substitution, const Vector& eagerCopies); // // Functions particular to AU_DagNode. // void setProducedByAssignment(); private: enum NormalizationResult { COLLAPSED, DEQUED, NORMAL, FLATTENED }; // // Functions required by theory interface. // DagNode* markArguments(); DagNode* copyEagerUptoReduced2(); DagNode* copyAll2(); void clearCopyPointers2(); // // Functions particular to AU_DagNode. // bool disappear(AU_Symbol* s, ArgVec::const_iterator i); NormalizationResult normalizeAtTop(bool dumb = false); bool eliminateForward(DagNode* target, int& pos, int limit) const; bool eliminateBackward(DagNode* target, int& pos, int limit) const; DagNode* makeFragment(int start, int nrSubterms, bool extraId) const; ArgVec argArray; friend class AU_Symbol; // to reduce subterms prior to rewriting friend class AU_Term; // for term->DAG conversion & comparison friend class AU_LhsAutomaton; // for matching DAG subject friend class AU_RhsAutomaton; // for constructing replacement DAG friend class AU_Layer; // for constructing substitution friend class AU_Subproblem; // for constructing substitution friend class AU_ExtensionInfo; // for constructing matched portion friend class AU_DequeDagNode; // for conversion & comparison friend class AU_UnificationSubproblem; friend class AU_UnificationSubproblem2; }; AU_DagNode* getAU_DagNode(DagNode* dagNode); inline AU_DagNode::AU_DagNode(AU_Symbol* symbol, int size) : AU_BaseDagNode(symbol), argArray(size) { setNormalizationStatus(FRESH); } inline void AU_DagNode::setProducedByAssignment() { setNormalizationStatus(ASSIGNMENT); #ifndef NO_ASSERT // // Look for Riesco 1/18/10 bug. // for (int i = 0; i < argArray.length(); ++i) { DagNode* d = argArray[i]; Assert(d->getSortIndex() != Sort::SORT_UNKNOWN, "AU_DagNode::setProducedByAssignment(): unknown sort for AU argument " << d << " at index " << i << " in subject " << this); } #endif } #endif Maude-Maude3.2/src/AU_Theory/AU_DagOperations.cc000066400000000000000000000077251420036611000214520ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Code to manipulate AU argument lists taking account of // all the complexities introduced by one sided identities. // bool AU_DagNode::eliminateForward(DagNode* target, int& pos, int limit) const { int last = argArray.length() - 1; // // pos may point to 1 beyond limit to indicate that target must match nothing. // Assert(pos >= 0 && limit <= last && pos <= limit + 1, "bad pos or limit"); AU_Symbol* s = symbol(); bool leftId = s->leftId(); bool rightId = s->rightId(); Term* identity = s->getIdentity(); if (target->symbol() == s) { const ArgVec args2 = getAU_DagNode(target)->argArray; int start = 0; int finish = args2.length() - 1; if (rightId) { if (!leftId && pos > 0 && identity->equal(args2[start])) ++start; // skip over leading identity in target } else { if (leftId && pos + finish <= last && identity->equal(args2[finish])) --finish; // skip over trailing identity in target } if (pos + (finish - start) > limit) return false; for (int i = start; i <= finish; i++) { if (!(args2[i]->equal(argArray[pos]))) return false; ++pos; } return true; } else { if (((pos > 0 && rightId) || (pos <= last && leftId)) && identity->equal(target)) return true; if (pos <= limit && target->equal(argArray[pos])) { ++pos; return true; } return false; } } bool AU_DagNode::eliminateBackward(DagNode* target, int& pos, int limit) const { int last = argArray.length() - 1; // // pos may point to 1 before limit to indicate that target must match nothing. // Assert(pos <= last && limit >= 0 && pos >= limit - 1, "bad pos or limit"); AU_Symbol* s = symbol(); bool leftId = s->leftId(); bool rightId = s->rightId(); Term* identity = s->getIdentity(); if (target->symbol() == s) { const ArgVec args2 = getAU_DagNode(target)->argArray; int start = 0; int finish = args2.length() - 1; if (rightId) { if (!leftId && pos - finish >= 0 && identity->equal(args2[start])) ++start; // skip over leading identity in target } else { if (leftId && pos < last && identity->equal(args2[finish])) --finish; // skip over trailing identity in target } if (pos - (finish - start) < limit) return false; for (int i = finish; i >= start; i--) { if (!(args2[i]->equal(argArray[pos]))) return false; --pos; } return true; } else { if (((pos >= 0 && rightId) || (pos < last && leftId)) && identity->equal(target)) return true; if (pos >= limit && target->equal(argArray[pos])) { --pos; return true; } return false; } } DagNode* AU_DagNode::makeFragment(int start, int nrSubterms, bool extraId) const { Assert(nrSubterms > 0, "no subterms"); if (extraId) ++nrSubterms; if (nrSubterms == 1) return argArray[start]; AU_Symbol* s = symbol(); AU_DagNode* d = new AU_DagNode(s, nrSubterms); int i = 0; if (extraId) d->argArray[s->leftId() ? --nrSubterms : i++] = s->getIdentityDag(); for (; i < nrSubterms; i++, start++) d->argArray[i] = argArray[start]; return d; } Maude-Maude3.2/src/AU_Theory/AU_DequeDagArgumentIterator.cc000066400000000000000000000026541420036611000236030ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class AU_DequeDagArgumentIterator. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "AU_Persistent.hh" // AU theory class definitions #include "AU_DequeDagArgumentIterator.hh" bool AU_DequeDagArgumentIterator::valid() const { return iter.valid(); } DagNode* AU_DequeDagArgumentIterator::argument() const { Assert(valid(), "no args left"); return iter.getDagNode(); } void AU_DequeDagArgumentIterator::next() { Assert(valid(), "no args left"); iter.next(); } Maude-Maude3.2/src/AU_Theory/AU_DequeDagArgumentIterator.hh000066400000000000000000000026551420036611000236160ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for argument iterator for AU deque dag nodes. // #ifndef _AU_DequeDagArgumentIterator_hh_ #define _AU_DequeDagArgumentIterator_hh_ #include "rawDagArgumentIterator.hh" #include "AU_DequeIter.hh" class AU_DequeDagArgumentIterator : public RawDagArgumentIterator { NO_COPYING(AU_DequeDagArgumentIterator); public: AU_DequeDagArgumentIterator(const AU_Deque& deque); bool valid() const; DagNode* argument() const; void next(); private: AU_DequeIter iter; }; inline AU_DequeDagArgumentIterator::AU_DequeDagArgumentIterator(const AU_Deque& deque) : iter(deque) { } #endif Maude-Maude3.2/src/AU_Theory/AU_DequeDagNode.cc000066400000000000000000000114441420036611000211710ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class AU_DequeDagNode. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "AU_Persistent.hh" #include "AU_Theory.hh" // interface class definitions #include "term.hh" // AU persistent class definitions #include "AU_DequeIter.hh" // AU theory class definitions #include "AU_Symbol.hh" #include "AU_DagNode.hh" #include "AU_DequeDagNode.hh" #include "AU_DequeDagArgumentIterator.hh" #include "AU_ExtensionInfo.hh" RawDagArgumentIterator* AU_DequeDagNode::arguments() { return new AU_DequeDagArgumentIterator(deque); } size_t AU_DequeDagNode::getHashValue() { size_t hashValue = symbol()->getHashValue(); for (AU_DequeIter i(deque); i.valid(); i.next()) hashValue = hash(hashValue, i.getDagNode()->getHashValue()); return hashValue; } int AU_DequeDagNode::compareArguments(const DagNode* other) const { if (safeCast(const AU_BaseDagNode*, other)->isDeque()) { const AU_DequeDagNode* d2 = safeCast(const AU_DequeDagNode*, other); int r = deque.length() - d2->deque.length(); if (r != 0) return r; AU_DequeIter i(deque); AU_DequeIter j(d2->deque); do { int r = (i.getDagNode())->compare(j.getDagNode()); if (r != 0) return r; i.next(); j.next(); } while (i.valid()); Assert(!j.valid(), "iterator problem"); } else { const ArgVec& argArray2 = safeCast(const AU_DagNode*, other)->argArray; int r = deque.length() - argArray2.length(); if (r != 0) return r; AU_DequeIter i(deque); ArgVec::const_iterator j = argArray2.begin(); do { int r = (i.getDagNode())->compare(*j); if (r != 0) return r; i.next(); ++j; } while (i.valid()); Assert(j == argArray2.end(), "iterator problem"); } return 0; } DagNode* AU_DequeDagNode::markArguments() { deque.mark(); return 0; } DagNode* AU_DequeDagNode::copyEagerUptoReduced2() { // // Don't both trying to preserve deque in the case of // a lazy operator, since we cannot do greedy matching with // extension we will be forced to ArgVec representation when // we try to reduce at this node. // return dequeToArgVec(this)->copyEagerUptoReduced2(); } DagNode* AU_DequeDagNode::copyAll2() { return dequeToArgVec(this)->copyAll2(); } void AU_DequeDagNode::clearCopyPointers2() { CantHappen("Should not be copying on AU_DequeDagNode"); } void AU_DequeDagNode::overwriteWithClone(DagNode* old) { AU_DequeDagNode* d = new(old) AU_DequeDagNode(symbol(), deque); d->copySetRewritingFlags(this); d->setSortIndex(getSortIndex()); } DagNode* AU_DequeDagNode::makeClone() { AU_DequeDagNode* d = new AU_DequeDagNode(symbol(), deque); d->copySetRewritingFlags(this); d->setSortIndex(getSortIndex()); return d; } DagNode* AU_DequeDagNode::copyWithReplacement(int argIndex, DagNode* replacement) { return dequeToArgVec(this)->copyWithReplacement(argIndex, replacement); // HACK } DagNode* AU_DequeDagNode::copyWithReplacement(Vector& redexStack, int first, int last) { return dequeToArgVec(this)->copyWithReplacement(redexStack, first, last); } ExtensionInfo* AU_DequeDagNode::makeExtensionInfo() { return new AU_ExtensionInfo(dequeToArgVec(this)); } AU_DagNode* AU_DequeDagNode::dequeToArgVec(AU_DequeDagNode* original) { AU_Symbol* s = original->symbol(); AU_Deque c = original->deque; // deep copy int sortIndex = original->getSortIndex(); bool redFlag = original->isReduced(); AU_DagNode* d = new(original) AU_DagNode(s, c.length()); c.copyToArgVec(d->argArray); d->setSortIndex(sortIndex); if (redFlag) d->setReduced(); return d; } // // Narrowing code. // bool AU_DequeDagNode::indexVariables2(NarrowingVariableInfo& indices, int baseIndex) { // // Just revert to argvec ACU representation and use its code. // return dequeToArgVec(this)->indexVariables2(indices, baseIndex); } Maude-Maude3.2/src/AU_Theory/AU_DequeDagNode.hh000066400000000000000000000051531420036611000212030ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for A and AU dag nodes based on persistent deques. // #ifndef _AU_DequeDagNode_hh_ #define _AU_DequeDagNode_hh_ #include "AU_BaseDagNode.hh" #include "AU_Deque.hh" class AU_DequeDagNode : public AU_BaseDagNode { NO_COPYING(AU_DequeDagNode); public: AU_DequeDagNode(AU_Symbol* symbol, const AU_Deque& original); // // Functions required by theory interface. // RawDagArgumentIterator* arguments(); size_t getHashValue(); int compareArguments(const DagNode* other) const; void overwriteWithClone(DagNode* old); DagNode* makeClone(); DagNode* copyWithReplacement(int argIndex, DagNode* replacement); DagNode* copyWithReplacement(Vector& redexStack, int first, int last); // // Functions required to handle extension information. // ExtensionInfo* makeExtensionInfo(); // // Interface for narrowing. // // This is needed to remove any deque nodes from dag being narrowed since // unification and narrowing functionality doesn't support them. // bool indexVariables2(NarrowingVariableInfo& indices, int baseIndex); // // Functions particular to AU_DequeDagNode. // int nrArgs() const; const AU_Deque& getDeque() const; static AU_DagNode* dequeToArgVec(AU_DequeDagNode* original); private: // // Functions required by theory interface. // DagNode* markArguments(); DagNode* copyEagerUptoReduced2(); DagNode* copyAll2(); void clearCopyPointers2(); AU_Deque deque; }; inline AU_DequeDagNode::AU_DequeDagNode(AU_Symbol* symbol, const AU_Deque& original) : AU_BaseDagNode(symbol), deque(original) { setNormalizationStatus(DEQUE); } inline int AU_DequeDagNode::nrArgs() const { return deque.length(); } inline const AU_Deque& AU_DequeDagNode::getDeque() const { return deque; } #endif Maude-Maude3.2/src/AU_Theory/AU_DequeMatcher.cc000066400000000000000000000112131420036611000212450ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2021 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for A/AU matcher that works on deques. // int AU_LhsAutomaton::dequeMatch(AU_DequeDagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem) { // // We only handle lone variable case. // Assert(flexPart.length() == 1, "bad flex part length " << flexPart.length()); Assert(flexPart[0].type == VARIABLE, "flex part not a variable"); // // First match rigid part. // AU_Deque remainder(subject->getDeque()); int nrArgs = remainder.length(); if (nrArgs < wholeLowerBound || nrArgs > wholeUpperBound) return false; SubproblemAccumulator subproblems; Term* identity = topSymbol->getIdentity(); for (const Subterm& i : rigidPart) { switch (i.type) { case VARIABLE: { const TopVariable& tv = i.variable; DagNode* b = solution.value(tv.index); if (b != 0) { // // Bound variable case. // if (b->symbol() == topSymbol) return UNDECIDED; if (identity == 0 || !(identity->equal(b))) { if (tv.takeIdentity) { // // Need to redo bounds check as something that // might have taken identity used up an argument. // --nrArgs; if (nrArgs < wholeLowerBound) return false; } if (i.leftEnd) { if (b->equal(remainder.topLeft())) remainder.popLeft(); else return false; } else { if (b->equal(remainder.topRight())) remainder.popRight(); else return false; } } } else { // // Unbound non-identity unit variable case. // Assert(tv.upperBound == 1, "unbound non-unit variable in rigid part"); Assert(!(tv.takeIdentity), "unbound variable which can take identity in rigid part"); DagNode* d; if (i.leftEnd) { d = remainder.topLeft(); if (!(d->leq(tv.sort))) return false; remainder.popLeft(); } else { d = remainder.topRight(); if (!(d->leq(tv.sort))) return false; remainder.popRight(); } solution.bind(tv.index, d); } break; } case GROUND_ALIEN: { if (i.leftEnd) { if (i.groundAlien->equal(remainder.topLeft())) remainder.popLeft(); else return false; } else { if (i.groundAlien->equal(remainder.topRight())) remainder.popRight(); else return false; } break; } case NON_GROUND_ALIEN: { Subproblem* sp; if (i.leftEnd) { if (i.alienAutomaton->match(remainder.topLeft(), solution, sp)) remainder.popLeft(); else return false; } else { if (i.alienAutomaton->match(remainder.topRight(), solution, sp)) remainder.popRight(); else return false; } subproblems.add(sp); break; } } } // // Now deal with flex part. // Assert(remainder.length() >= flexLowerBound, "lower bound problem"); if (remainder.length() > flexUpperBound) return false; DagNode* d; switch (remainder.length()) { case 0: { Assert(identity != 0, "no identity"); d = topSymbol->getIdentityDag(); break; } case 1: { d = remainder.topLeft(); break; } default: { d = new AU_DequeDagNode(topSymbol, remainder); break; } } TopVariable& tv = flexPart[0].variable; DagNode* b = solution.value(tv.index); if (b == 0) { Subproblem* sp; if (tv.abstracted != 0) { if (!(tv.abstracted->match(d, solution, sp))) return false; } else { if (!(d->checkSort(tv.sort, sp))) return false; if (subject->isReduced() && d->getSortIndex() != Sort::SORT_UNKNOWN) d->setReduced(); solution.bind(tv.index, d); } subproblems.add(sp); } else { if (!(b->equal(d))) return false; } returnedSubproblem = subproblems.extractSubproblem(); return true; } Maude-Maude3.2/src/AU_Theory/AU_ExtensionInfo.cc000066400000000000000000000042551420036611000214760ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class AU_ExtensionInfo. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "AU_Theory.hh" // A theory class definitions #include "AU_Symbol.hh" #include "AU_DagNode.hh" #include "AU_ExtensionInfo.hh" DagNode* AU_ExtensionInfo::buildMatchedPortion() const { if (matchedWhole()) return subject; int nrSubterms = last - first + 1; Assert(nrSubterms + extraIdentityFlag >= 2, "at least 2 subterms must be matched"); return subject->makeFragment(first, nrSubterms, extraIdentityFlag); } ExtensionInfo* AU_ExtensionInfo::makeClone() const { AU_ExtensionInfo* e = new AU_ExtensionInfo(subject); e->setValidAfterMatch(validAfterMatch()); bool whole = matchedWhole(); e->setMatchedWhole(whole); if (!whole) { e->first = first; e->last = last; e->extraIdentityFlag = extraIdentityFlag; } return e; } void AU_ExtensionInfo::copy(const ExtensionInfo* extensionInfo) { const AU_ExtensionInfo* e = safeCast(const AU_ExtensionInfo*, extensionInfo); setValidAfterMatch(e->validAfterMatch()); bool whole = e->matchedWhole(); setMatchedWhole(whole); subject = e->subject; if (!whole) { first = e->first; last = e->last; extraIdentityFlag = e->extraIdentityFlag; } } Maude-Maude3.2/src/AU_Theory/AU_ExtensionInfo.hh000066400000000000000000000043441420036611000215070ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class to record what part of an AU theory dag node was matched. // #ifndef _AU_ExtensionInfo_hh_ #define _AU_ExtensionInfo_hh_ #include "extensionInfo.hh" class AU_ExtensionInfo : public ExtensionInfo { public: AU_ExtensionInfo(AU_DagNode* subject); DagNode* buildMatchedPortion() const; ExtensionInfo* makeClone() const; void copy(const ExtensionInfo* extensionInfo); void setFirstMatched(int firstMatched); void setLastMatched(int lastMatched); void setExtraIdentity(bool flag); int firstMatched() const; int lastMatched() const; bool bigEnough() const; private: AU_DagNode* subject; int first; int last; bool extraIdentityFlag; // portion matched contains an identity not present in subject. }; inline AU_ExtensionInfo::AU_ExtensionInfo(AU_DagNode* subject) : subject(subject) { } inline void AU_ExtensionInfo::setFirstMatched(int firstMatched) { first = firstMatched; } inline void AU_ExtensionInfo::setLastMatched(int lastMatched) { last = lastMatched; setMatchedWhole(first == 0 && last == subject->argArray.length() - 1); } inline void AU_ExtensionInfo::setExtraIdentity(bool flag) { extraIdentityFlag = flag; } inline int AU_ExtensionInfo::firstMatched() const { return first; } inline int AU_ExtensionInfo::lastMatched() const { return last; } inline bool AU_ExtensionInfo::bigEnough() const { return last - first + 1 + extraIdentityFlag >= 2; } #endif Maude-Maude3.2/src/AU_Theory/AU_FullMatcher.cc000066400000000000000000000177271420036611000211240ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for full A/AU matcher flex part. // bool AU_LhsAutomaton::fullMatch(AU_DagNode* subject, Substitution& solution, SubproblemAccumulator& subproblems, AU_ExtensionInfo* extensionInfo) { AU_Subproblem* subproblem = buildLeftmostPath(subject, solution, extensionInfo); if (subproblem == 0) return false; subproblems.add(subproblem); addVariableBlocks(solution, subproblem, subproblems); addRemainingPaths(subject, solution, subproblem); subproblem->complete(); if (extensionInfo != 0) extensionInfo->setValidAfterMatch(false); return true; } void AU_LhsAutomaton::addVariableBlocks(Substitution& solution, AU_Subproblem* subproblem, SubproblemAccumulator& subproblems) { int nrVariables = solution.nrFragileBindings(); int layerNr = 0; bool rigidEncountered = false; int skip; for (int i = flexLeftPos; i <= flexRightPos; i += skip) { Subterm& f = flexPart[i]; skip = f.blockLength; if (skip == NOT_FIXED) { skip = 1; TopVariable& tv = f.variable; int index = tv.index; DagNode* d = solution.value(index); if (d == 0) { if (rigidEncountered) { rigidEncountered = false; ++layerNr; } subproblem->addTopVariable(layerNr, index, tv.takeIdentity || tv.awkward ? 0 : 1, tv.upperBound, tv.sort); if (tv.abstracted != 0) { subproblems.add (new VariableAbstractionSubproblem(tv.abstracted, index, nrVariables)); } continue; } else if (tv.nastyBinding != NONE) { if (rigidEncountered) { rigidEncountered = false; ++layerNr; } subproblem->addTopVariable(layerNr, index, tv.nastyBinding - 1, tv.nastyBinding, tv.sort); continue; } } rigidEncountered = true; } } bool AU_LhsAutomaton::fullMatchRigidBlock(AU_DagNode* subject, Substitution& solution, RigidBlock& block, int minShift, int maxShift, int& matchShift, Subproblem*& subproblem) { Assert(minShift <= maxShift, "bad shift range"); Assert(block.start <= block.end, "bad block range"); int shiftFactor; for (int i = minShift; i <= maxShift; i += shiftFactor) { local.copy(solution); // make a local copy for matching at shift i if (fullMatchRigidBlock2(subject, block, i, subproblem, shiftFactor)) { matchShift = i; return true; } } return false; } bool AU_LhsAutomaton::fullMatchRigidBlock2(AU_DagNode* subject, RigidBlock& block, int nextSubject, Subproblem*& subproblem, int& shiftFactor) { ArgVec& args = subject->argArray; SubproblemAccumulator subproblems; shiftFactor = 1; // default shift increment int skip; for (int i = block.start; i <= block.end; i += skip) { Subterm& f = flexPart[i]; skip = f.blockLength; if (skip == NOT_FIXED) { DagNode* d = local.value(f.variable.index); Assert(d != 0, "unbound variable in rigid block"); if (!(subject->eliminateForward(d, nextSubject, rightPos))) // better limit? return false; skip = 1; } else { int sf; int t = fullMatchFixedLengthBlock(args, i, nextSubject, subproblems, sf); if (sf > shiftFactor) shiftFactor = sf; if (!t) return false; nextSubject += skip; } } subproblem = subproblems.extractSubproblem(); return true; } bool AU_LhsAutomaton::fullMatchFixedLengthBlock(ArgVec& args, int blockStart, int attemptedShift, SubproblemAccumulator& subproblems, int& shiftFactor) { // // could we merge this with greedyMatchFixedLengthBlock()? // pass subproblems as a pointer and have it 0 for greedy // // for (int i = flexPart[blockStart].blockLength - 1; i >= 0; i--) { Subterm& f = flexPart[blockStart + i]; DagNode* d = args[attemptedShift + i]; Assert(d->getSortIndex() != Sort::SORT_UNKNOWN, "unknown sort for AU argument " << d << " at index " << attemptedShift + i << " topSymbol = " << topSymbol << " blockStart = " << blockStart); shiftFactor = f.shiftFactor; switch (f.type) { case VARIABLE: { Assert(f.variable.upperBound == 1 && !f.variable.takeIdentity, "non-unit variable in fixed length block"); DagNode* v = local.value(f.variable.index); if (v == 0) { if (d->leq(f.variable.sort)) local.bind(f.variable.index, d); else return false; } else { Assert(v->symbol() != topSymbol, "illegal binding to unit variable"); if (!(v->equal(d))) return false; } break; } case GROUND_ALIEN: { if (!(f.groundAlien->equal(d))) return false; break; } case NON_GROUND_ALIEN: { Subproblem* sp; if (!(f.alienAutomaton->match(d, local, sp))) return false; subproblems.add(sp); break; } } } return true; } AU_Subproblem* AU_LhsAutomaton::buildLeftmostPath(AU_DagNode* subject, Substitution& solution, AU_ExtensionInfo* extensionInfo) { int nrRigid = rigidBlocks.length(); Assert(extensionInfo != 0 || nrRigid == 0 || (rigidBlocks[0].start > flexLeftPos && rigidBlocks[nrRigid - 1].end < flexRightPos), "missing unbound variable(s)"); int spare = rightPos - leftPos + 1 - nrSubjectsUsed; if (spare < 0) return 0; int nextSubject = leftPos; AU_Subproblem* subproblem = new AU_Subproblem(subject, leftPos, rightPos, nrRigid + 1, extensionInfo); for (int i = 0; i < nrRigid; i++) { RigidBlock& r = rigidBlocks[i]; int min = nextSubject + r.nrSubjectsToLeave; int max = min + spare; int matchShift; Subproblem* sp; if (!fullMatchRigidBlock(subject, solution, r, min, max, matchShift, sp)) { delete subproblem; return 0; } r.firstMatch = matchShift; nextSubject = matchShift + r.nrSubjectsForUs; spare -= matchShift - min; subproblem->addNode(i, local - solution, sp, matchShift, nextSubject - 1); } return subproblem; } void AU_LhsAutomaton::addRemainingPaths(AU_DagNode* subject, Substitution& solution, AU_Subproblem* subproblem) { int firstUnusable = rightPos + 1 - nrSubjectsForRightVars; for (int i = rigidBlocks.length() - 1; i >= 0; i--) { RigidBlock& r = rigidBlocks[i]; int max = firstUnusable - r.nrSubjectsForUs; int min = r.firstMatch + 1; firstUnusable = r.firstMatch; while (max >= min) { int matchShift; Subproblem* sp; if (fullMatchRigidBlock(subject, solution, r, min, max, matchShift, sp)) { subproblem->addNode(i, local - solution, sp, matchShift, matchShift + r.nrSubjectsForUs - 1); firstUnusable = matchShift; min = matchShift + 1; } else break; } firstUnusable -= r.nrSubjectsToLeave; } } Maude-Maude3.2/src/AU_Theory/AU_GreedyMatcher.cc000066400000000000000000000252531420036611000214320ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for greedy A/AU matcher flex part. // int AU_LhsAutomaton::greedyMatch(AU_DagNode* subject, Substitution& solution, AU_ExtensionInfo* extensionInfo) { local.copy(solution); int t = greedyMatchBlocks(subject, extensionInfo); if (t != true) return t; solution.copy(local); greedyBindVariables(subject, solution); if (extensionInfo != 0) { extensionInfo->setExtraIdentity(false); extensionInfo->setValidAfterMatch(true); Assert(extensionInfo->bigEnough(), "didn't match enough of subject"); } return true; } void AU_LhsAutomaton::greedyBindVariables(AU_DagNode* subject, Substitution& solution) { bool buildReducedNodes = subject->isReduced() && topSymbol->sortConstraintFree(); int skip; for (int i = flexLeftPos; i <= flexRightPos; i += skip) { Subterm& f = flexPart[i]; skip = f.blockLength; if (skip == NOT_FIXED) { skip = 1; TopVariable& tv = f.variable; int index = tv.index; DagNode* d = solution.value(index); if (d == 0) { int nrSubjects = tv.lastSubject - tv.firstSubject + 1; Assert(nrSubjects >= 0, "-ve number of subjects " << nrSubjects); if (nrSubjects == 0) solution.bind(index, topSymbol->getIdentityDag()); else if (nrSubjects == 1) solution.bind(index, subject->argArray[tv.firstSubject]); else { AU_DagNode* n = new AU_DagNode(topSymbol, nrSubjects); for (int j = 0; j < nrSubjects; j++) n->argArray[j] = subject->argArray[tv.firstSubject + j]; n->setProducedByAssignment(); if (buildReducedNodes) { topSymbol->computeBaseSort(n); n->setReduced(); } solution.bind(index, n); } } } } } int AU_LhsAutomaton::greedyMatchRigidBlock(AU_DagNode* subject, RigidBlock& block, int minShift, int maxShift, int& matchShift) { Assert(minShift <= maxShift, "bad shift range"); Assert(block.start <= block.end, "bad block range"); int shiftFactor; for (int i = minShift; i <= maxShift; i += shiftFactor) { scratch.copy(local); // make a scratch copy for matching at shift i int t = greedyMatchRigidBlock2(subject, block, i, shiftFactor); if (t == UNDECIDED) return UNDECIDED; if (t == true) { matchShift = i; local.copy(scratch); return true; } } return false; } int AU_LhsAutomaton::greedyMatchRigidBlock2(AU_DagNode* subject, RigidBlock& block, int nextSubject, int& shiftFactor) { ArgVec& args = subject->argArray; shiftFactor = 1; // default shift increment int skip; for (int i = block.start; i <= block.end; i += skip) { Subterm& f = flexPart[i]; skip = f.blockLength; if (skip == NOT_FIXED) { DagNode* d = scratch.value(f.variable.index); Assert(d != 0, "unbound variable in rigid block"); if (!(subject->eliminateForward(d, nextSubject, rightPos))) // better limit? return false; skip = 1; } else { int sf; int t = greedyMatchFixedLengthBlock(args, i, nextSubject, sf); if (sf > shiftFactor) shiftFactor = sf; if (t != true) return t; nextSubject += skip; } } return true; } int AU_LhsAutomaton::greedyMatchFixedLengthBlock(ArgVec& args, int blockStart, int attemptedShift, int& shiftFactor) { for (int i = flexPart[blockStart].blockLength - 1; i >= 0; i--) { Subterm& f = flexPart[blockStart + i]; DagNode* d = args[attemptedShift + i]; shiftFactor = f.shiftFactor; switch (f.type) { case VARIABLE: { Assert(f.variable.upperBound == 1 && !f.variable.takeIdentity, "non-unit variable in fixed length block"); DagNode* v = scratch.value(f.variable.index); if (v == 0) { if (d->leq(f.variable.sort)) scratch.bind(f.variable.index, d); else return false; } else { Assert(v->symbol() != topSymbol, "illegal binding to unit variable"); if (!(v->equal(d))) return false; } break; } case GROUND_ALIEN: { if (!(f.groundAlien->equal(d))) return false; break; } case NON_GROUND_ALIEN: { Subproblem* sp; if (!(f.alienAutomaton->match(d, scratch, sp))) return false; if (sp != 0) { delete sp; return UNDECIDED; } break; } } } return true; } int AU_LhsAutomaton::greedyMatchBlocks(AU_DagNode* subject, AU_ExtensionInfo* extensionInfo) { int nrRigid = rigidBlocks.length(); Assert(extensionInfo != 0 || nrRigid == 0 || (rigidBlocks[0].start > flexLeftPos && rigidBlocks[nrRigid - 1].end < flexRightPos), "missing unbound variable(s)"); int spare = rightPos - leftPos + 1 - nrSubjectsUsed; if (spare < 0) return false; int varStart = flexLeftPos; int nextSubject = leftPos; for (int i = 0; i < nrRigid; i++) { // // First match rigid block. // RigidBlock& r = rigidBlocks[i]; int min = nextSubject + r.nrSubjectsToLeave; int max = min + spare; int matchShift; int t = greedyMatchRigidBlock(subject, r, min, max, matchShift); if (t != true) return t; int surplus = matchShift - min; // // Now match preceeding variable block. // bool b = greedyMatchVariableBlock(subject->argArray, varStart, r.start - varStart, nextSubject, matchShift - nextSubject, surplus, i == 0 && extensionInfo != 0, false, extensionInfo); if (!b) return UNDECIDED; r.firstMatch = matchShift; spare -= surplus; varStart = r.end + 1; nextSubject = matchShift + r.nrSubjectsForUs; } // // Match last variable block. // int nrSubjectsRemaining = rightPos - nextSubject + 1; bool b = greedyMatchVariableBlock(subject->argArray, varStart, flexRightPos - varStart + 1, nextSubject, nrSubjectsRemaining, nrSubjectsRemaining - nrSubjectsForRightVars, extensionInfo != 0 && nrRigid == 0, extensionInfo != 0, extensionInfo); return b ? int(true) : UNDECIDED; } bool AU_LhsAutomaton::greedyMatchVariableBlock(ArgVec& args, int blockStart, int blockLength, int firstSubject, int nrSubjects, int spare, bool leftExtend, bool rightExtend, AU_ExtensionInfo* extensionInfo) { // // Handle pathological case where we have to match no subjects. // if (nrSubjects == 0) { for (int i = 0; i < blockLength; i++) { TopVariable& tv = flexPart[blockStart + i].variable; if (tv.takeIdentity) { tv.firstSubject = firstSubject; // take nothing tv.lastSubject = firstSubject - 1; //DebugAdvisory("1 tv.firstSubject " << tv.firstSubject); } else return false; } if (leftExtend) extensionInfo->setFirstMatched(0); else if (rightExtend) extensionInfo->setLastMatched(args.length() - 1); return true; } // // Normal case. // int pos = firstSubject; for (int i = 0; i < blockLength; i++) { TopVariable& tv = flexPart[blockStart + i].variable; if (tv.takeIdentity) { if (spare == 0 || !(args[pos]->leq(tv.sort))) { tv.firstSubject = pos; // take nothing tv.lastSubject = pos - 1; //DebugAdvisory("2 tv.firstSubject " << tv.firstSubject); } else { if (leftExtend) { // // Now we have committed to giving a subterm (rather than // an identity) to a variable we can no longer give subterms // to the left extension. // extensionInfo->setFirstMatched(pos); leftExtend = false; } tv.firstSubject = tv.lastSubject = pos++; // take first available --spare; //DebugAdvisory("3 tv.firstSubject " << tv.firstSubject); } } else { for (; !(args[pos]->leq(tv.sort)); pos++, spare--) { // // Can't assign current subterm to current variable so // we must find a way to dispose of it. // if (spare == 0) return false; // can't afford to dispose of it so fail if (!leftExtend) { if (i == 0) return false; TopVariable& pv = flexPart[blockStart + i - 1].variable; if (args[pos]->leq(pv.sort)) pv.lastSubject = pos; else return false; // previous variable cannot take it so fail } } if (leftExtend) { // // Now we have committed to giving a subterm (rather than // an identity) to a variable we can no longer give subterms // to the left extension. // extensionInfo->setFirstMatched(pos); leftExtend = false; } tv.firstSubject = tv.lastSubject = pos++; //DebugAdvisory("4 tv.firstSubject " << tv.firstSubject); } } if (leftExtend) { // // Left extension gets the whole thing. // Assert(!rightExtend, "whole subject in extension should not happen in greedy match"); DebugAdvisoryCheck(blockLength == 0, "worst case scenario for AU greedy match"); extensionInfo->setFirstMatched(firstSubject + nrSubjects); return true; } if (blockLength > 0) { // // Try to assign spare subterms to last variable // TopVariable& lv = flexPart[blockStart + blockLength - 1].variable; for (; spare > 0; spare--, pos++) { Assert(pos < firstSubject + nrSubjects, "pos overrun"); if (!(args[pos]->leq(lv.sort))) { if (rightExtend) break; else return false; } } lv.lastSubject = pos - 1; } if (rightExtend) extensionInfo->setLastMatched(pos - 1); return true; } Maude-Maude3.2/src/AU_Theory/AU_Layer.cc000066400000000000000000000252731420036611000177650ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class AU_Layer. // // utility stuff #include "macros.hh" #include "vector.hh" #include "sequencePartition.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "AU_Theory.hh" // interface class definitions #include "symbol.hh" #include "term.hh" #include "subproblem.hh" // core class definitions #include "rewritingContext.hh" #include "localBinding.hh" // AU theory class definitions #include "AU_Symbol.hh" // HACK #undef assert #include "AU_DagNode.hh" #include "AU_ExtensionInfo.hh" #include "AU_Layer.hh" AU_Layer::AU_Layer() { leftExtend = false; rightExtend = false; totalLowerBound = 0; totalUpperBound = 0; partition = 0; } AU_Layer::~AU_Layer() { int nrNodes = nodes.length(); for (int i = 0; i < nrNodes; i++) { Node& n = nodes[i]; delete n.difference; delete n.subproblem; } delete partition; } void AU_Layer::initialize(AU_DagNode* subjectDag) { subject = subjectDag; lastSubjectSubterm = subjectDag->argArray.length() - 1; AU_Symbol* s = subjectDag->symbol(); oneSidedId = s->oneSidedId(); leftId = s->leftId(); } void AU_Layer::initializeFirst(int first, AU_ExtensionInfo* extension) { firstSubterm = first; if (extension != 0) { extensionInfo = extension; leftExtend = true; totalUpperBound = UNBOUNDED; } } void AU_Layer::initializeLast(int last, AU_ExtensionInfo* extension) { lastSubterm = last; if (extension != 0) { extensionInfo = extension; rightExtend = true; totalUpperBound = UNBOUNDED; } } void AU_Layer::addTopVariable(int index, int lowerBound, int upperBound, Sort* sort) { int nrVariables = prevVariables.length(); prevVariables.expandBy(1); TopVariable& tv = prevVariables[nrVariables]; tv.index = index; tv.lowerBound = lowerBound; tv.upperBound = upperBound; tv.sort = sort; totalLowerBound += lowerBound; totalUpperBound = uplus(totalUpperBound, upperBound); } void AU_Layer::addNode(LocalBinding* difference, Subproblem* subproblem, int firstSubterm, int lastSubterm) { int nrNodes = nodes.length(); nodes.expandBy(1); Node& n = nodes[nrNodes]; n.difference = difference; n.subproblem = subproblem; n.firstSubterm = firstSubterm; n.lastSubterm = lastSubterm; n.downTarget = UNDEFINED; } void AU_Layer::link(AU_Layer& nextLayer) { int nrNodes = nodes.length(); int j = 0; int nextStart = nextLayer.nodes[j].firstSubterm - nextLayer.totalLowerBound; for (int i = 0; i < nrNodes; i++) { int lastSubterm = nodes[i].lastSubterm; while (nextStart <= lastSubterm) { ++j; Assert(j < nextLayer.nodes.length(), "could not find a valid target for node " << i); nextStart = nextLayer.nodes[j].firstSubterm - nextLayer.totalLowerBound; } nodes[i].downTarget = j; } } bool AU_Layer::solvePatterns(bool findFirst, RewritingContext& solution, AU_Layer& nextLayer) { if (solvePatterns2(findFirst, solution)) { Node& n = nodes[selectedNode]; lastSubterm = n.firstSubterm - 1; nextLayer.firstSubterm = n.lastSubterm + 1; nextLayer.selectedNode = n.downTarget; return true; } return false; } bool AU_Layer::solvePatterns2(bool findFirst, RewritingContext& solution) { int nrNodes = nodes.length(); for(; selectedNode < nrNodes; selectedNode++) { Node& n = nodes[selectedNode]; if (findFirst) { int d = n.firstSubterm - firstSubterm; Assert(d >= totalLowerBound, "insufficient subterms for previous variables"); if (d > totalUpperBound) break; if (n.difference != 0 && !(n.difference->assert(solution))) continue; } if (n.subproblem == 0) { if (findFirst) return true; } else { if (n.subproblem->solve(findFirst, solution)) return true; } if (n.difference != 0) n.difference->retract(solution); findFirst = true; } return false; } bool AU_Layer::solveVariables(bool findFirst, RewritingContext& solution) { if (findFirst) partition = buildPartition(solution); while (solvePartition(findFirst)) { if (bindVariables(solution)) return true; MemoryCell::okToCollectGarbage(); // to avoid build up of failed solutions findFirst = false; } unbindVariables(solution); delete partition; partition = 0; return false; } bool AU_Layer::solvePartition(bool findFirst) { if (oneSidedId) { int nrVariables = prevVariables.length(); if (!findFirst) { // // See if we can change existing solution by messing with extra // identities. // int nrVariables = prevVariables.length(); for (int i = nrVariables - 1; i >= 0; i--) { TopVariable& tv = prevVariables[i]; if (tv.boundByUs && !(tv.extraId)) { int start = firstSubterm + partition->start(i + leftExtend); int end = firstSubterm + partition->end(i + leftExtend); int nrSubterms = end - start + 1; if (nrSubterms > 0 && nrSubterms < tv.upperBound && (leftId ? (end < lastSubjectSubterm) : (start > 0))) { tv.extraId = true; for (i++; i < nrVariables; i++) { TopVariable& v = prevVariables[i]; if (v.boundByUs) v.extraId = false; } return true; } } } } for (int i = 0; i < nrVariables; i++) { TopVariable& tv = prevVariables[i]; if (tv.boundByUs) tv.extraId = false; } } return partition->solve(); } SequencePartition* AU_Layer::buildPartition(const Substitution& solution) { AU_Symbol* s = subject->symbol(); int nrVariables = prevVariables.length(); int nrParts = nrVariables + leftExtend + rightExtend; Assert(nrParts > 0, "no parts"); SequencePartition* p = new SequencePartition(lastSubterm - firstSubterm + 1, nrParts); if (leftExtend) p->insertPart(0, UNBOUNDED); for (int i = 0; i < nrVariables; i++) { TopVariable& v = prevVariables[i]; int min = v.lowerBound; int max = v.upperBound; DagNode* d = solution.value(v.index); if (d != 0) { v.boundByUs = false; bool leftExtreme = (i == 0 && firstSubterm == 0); bool rightExtreme = (i == nrVariables - 1 && lastSubterm == lastSubjectSubterm); bool nasty; min = max = s->calculateNrSubjectsMatched(d, leftExtreme, rightExtreme, nasty); DebugAdvisoryCheck(!nasty, "nasty binding of " << d << " to variable with index " << v.index << " detected in solve phase"); if (nasty && (leftId ? rightExtend : leftExtend)) { // // Because extension may take extreme end, matching one // less subterm is possible. // --min; } } else { v.boundByUs = true; // // Check for early occurrence of same variable in this block. // for (int j = 0; j < i; j++) { if (prevVariables[j].index == v.index) { v.boundByUs = false; break; } } } p->insertPart(min, max); } if (rightExtend) p->insertPart(0, UNBOUNDED); return p; } bool AU_Layer::bindVariables(RewritingContext& solution) { bool buildReducedNodes = subject->isReduced(); AU_Symbol* topSymbol = subject->symbol(); int nrVariables = prevVariables.length(); for (int i = 0; i < nrVariables; i++) { int start = firstSubterm + partition->start(i + leftExtend); int end = firstSubterm + partition->end(i + leftExtend); TopVariable& tv = prevVariables[i]; if (tv.boundByUs) { int nrSubterms = end - start + 1; if (nrSubterms == 0) { if (oneSidedId) { if (leftId ? (end == lastSubjectSubterm) : (start == 0)) return false; // can't assign one sided identity } solution.bind(tv.index, topSymbol->getIdentityDag()); } else { DagNode* d = subject->makeFragment(start, nrSubterms, oneSidedId && prevVariables[i].extraId); if (!(d->checkSort(tv.sort, solution))) return false; if (d->symbol() == topSymbol) { // // makeFragment() will have produced an AU_DagNode* // safeCast(AU_DagNode*, d)->setProducedByAssignment(); if (buildReducedNodes && d->getSortIndex() != Sort::SORT_UNKNOWN) d->setReduced(); } solution.bind(tv.index, d); } } else { DagNode* d = solution.value(tv.index); Assert(d != 0, "variable should be bound"); if (!(subject->eliminateForward(d, start, end) && start == end + 1)) return false; } } if (leftExtend) { if (!leftId) extensionInfo->setExtraIdentity(false); Assert(firstSubterm == 0, "non zero firstSubterm in left extension case"); int first = partition->end(0) + 1; extensionInfo->setFirstMatched(first); if (oneSidedId && !leftId && first != 0 && nrVariables > 0) { int nrMatched = partition->end(1) - first + 1; DagNode* d = solution.value(prevVariables[0].index); if (nrMatched == 0 || (d->symbol() == topSymbol && static_cast(d)->argArray.length() > nrMatched)) // FIX extensionInfo->setExtraIdentity(true); } } if (rightExtend) { if (leftId) extensionInfo->setExtraIdentity(false); int last = firstSubterm + partition->start(nrVariables + leftExtend) - 1; extensionInfo->setLastMatched(last); if (oneSidedId && leftId && last != lastSubjectSubterm && nrVariables > 0) { int nrMatched = partition->start(nrVariables + leftExtend) - partition->start(nrVariables - 1 + leftExtend); DagNode* d = solution.value(prevVariables[0].index); if (nrMatched == 0 || (d->symbol() == topSymbol && static_cast(d)->argArray.length() > nrMatched)) // FIX extensionInfo->setExtraIdentity(true); } } return true; } void AU_Layer::unbindVariables(RewritingContext& solution) { int nrVariables = prevVariables.length(); for (int i = 0; i < nrVariables; i++) { TopVariable& v = prevVariables[i]; if (v.boundByUs) solution.bind(v.index, 0); } } Maude-Maude3.2/src/AU_Theory/AU_Layer.hh000066400000000000000000000063371420036611000177770ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for a layer of nodes in an AU_Subproblem. // #ifndef _AU_Layer_hh_ #define _AU_Layer_hh_ #include "sequencePartition.hh" class AU_Layer { public: AU_Layer(); ~AU_Layer(); void initialize(AU_DagNode* subjectDag); void initializeFirst(int first, AU_ExtensionInfo* extension); void initializeLast(int last, AU_ExtensionInfo* extension); void addTopVariable(int index, int lowerBound, int upperBound, Sort* sort); void addNode(LocalBinding* difference, Subproblem* subproblem, int firstSubterm, int lastSubterm); void link(AU_Layer& nextLayer); void reset(); bool solvePatterns(bool findFirst, RewritingContext& solution, AU_Layer& nextLayer); bool solveVariables(bool findFirst, RewritingContext& solution); private: struct TopVariable { int index; int lowerBound; int upperBound; Sort* sort; // // For solve-time use // Bool boundByUs; Bool extraId; }; struct Node { LocalBinding* difference; Subproblem* subproblem; int firstSubterm; int lastSubterm; int downTarget; }; bool solvePatterns2(bool findFirst, RewritingContext& solution); SequencePartition* buildPartition(const Substitution& solution); bool solvePartition(bool findFirst); bool bindVariables(RewritingContext& solution); void unbindVariables(RewritingContext& solution); const AU_DagNode* subject; int lastSubjectSubterm; // index of last subterm in subject Bool oneSidedId; // true if subject has a one sided identity Bool leftId; // true if subject has left identity only Bool leftExtend; // have left extension before variable block Bool rightExtend; // have right extension after variable block int totalLowerBound; // sum of lowerBounds for prevVariables int totalUpperBound; // sum of upperBounds for prevVariables + extension AU_ExtensionInfo* extensionInfo; // for layers with leftExtend/rightExtend only Vector prevVariables; // variable block before rigid block Vector nodes; // nodes for a rigid blocks possible matchings // // For solve-time use // int selectedNode; // currently selected node int firstSubterm; // first subject subterm for variables int lastSubterm; // last subject subterm for variables SequencePartition* partition; // partitioning of subterms amongst variables }; inline void AU_Layer::reset() { selectedNode = 0; } #endif Maude-Maude3.2/src/AU_Theory/AU_LhsAutomaton.cc000066400000000000000000000242571420036611000213300ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class AU_LhsAutomaton. // // utility stuff #include "macros.hh" #include "vector.hh" #include "indent.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "variable.hh" #include "AU_Persistent.hh" #include "AU_Theory.hh" // interface class definitions #include "associativeSymbol.hh" #include "dagNode.hh" #include "term.hh" // core class definitions #include "variableSymbol.hh" #include "variableTerm.hh" #include "variableInfo.hh" #include "subproblemSequence.hh" #include "subproblemDisjunction.hh" #include "subproblemAccumulator.hh" #include "disjunctiveSubproblemAccumulator.hh" #include "substitution.hh" #include "localBinding.hh" #include "variableAbstractionSubproblem.hh" #include "equalitySubproblem.hh" // AU theory class definitions #include "AU_Symbol.hh" #include "AU_DagNode.hh" #include "AU_DequeDagNode.hh" #include "AU_LhsAutomaton.hh" #include "AU_Subproblem.hh" #include "AU_ExtensionInfo.hh" // our stuff #include "AU_DequeMatcher.cc" #include "AU_GreedyMatcher.cc" #include "AU_Matcher.cc" #include "AU_CollapseMatcher.cc" #include "AU_FullMatcher.cc" AU_LhsAutomaton::AU_LhsAutomaton(AU_Symbol* symbol, bool matchAtTop, bool collapsePossible, LhsAutomaton* uniqueCollapseAutomaton, int nrVariables) : topSymbol(symbol), matchAtTop(matchAtTop), collapsePossible(collapsePossible), uniqueCollapseAutomaton(uniqueCollapseAutomaton), local(nrVariables), scratch(nrVariables) { wholeLowerBound = 0; wholeUpperBound = matchAtTop ? UNBOUNDED : 0; flexLowerBound = 0; flexUpperBound = matchAtTop ? UNBOUNDED : 0; } AU_LhsAutomaton::~AU_LhsAutomaton() { delete uniqueCollapseAutomaton; int nrRigid = rigidPart.length(); for (int i = 0; i < nrRigid; i++) { Subterm& r = rigidPart[i]; if (r.type == NON_GROUND_ALIEN) delete r.alienAutomaton; } int nrFlex = flexPart.length(); for (int i = 0; i < nrFlex; i++) { Subterm& f = flexPart[i]; if (f.type == VARIABLE) delete f.variable.abstracted; else if (f.type == NON_GROUND_ALIEN) delete f.alienAutomaton; } } void AU_LhsAutomaton::updateWholeBounds(int min, int max) { wholeLowerBound += min; wholeUpperBound = uplus(wholeUpperBound, max); } void AU_LhsAutomaton::updateFlexBounds(int min, int max) { flexLowerBound += min; flexUpperBound = uplus(flexUpperBound, max); } void AU_LhsAutomaton::addRigidVariable(const VariableTerm* variable, bool leftEnd, bool idPossible) { Sort* s = variable->getSort(); int upperBound = topSymbol->sortBound(s); bool takeIdentity = idPossible && topSymbol->takeIdentity(s); updateWholeBounds(takeIdentity ? 0 : 1, upperBound); int nrRigid = rigidPart.length(); rigidPart.expandBy(1); Subterm& r = rigidPart[nrRigid]; r.type = VARIABLE; r.leftEnd = leftEnd; r.variable.index = variable->getIndex(); r.variable.sort = s; r.variable.upperBound = upperBound; r.variable.takeIdentity = takeIdentity; r.variable.awkward = false; r.variable.abstracted = 0; } void AU_LhsAutomaton::addRigidGroundAlien(Term* alien, bool leftEnd) { updateWholeBounds(1, 1); int nrRigid = rigidPart.length(); rigidPart.expandBy(1); Subterm& r = rigidPart[nrRigid]; r.type = GROUND_ALIEN; r.leftEnd = leftEnd; r.groundAlien = alien; } void AU_LhsAutomaton::addRigidNonGroundAlien(LhsAutomaton* automaton, bool leftEnd) { updateWholeBounds(1, 1); int nrRigid = rigidPart.length(); rigidPart.expandBy(1); Subterm& r = rigidPart[nrRigid]; r.type = NON_GROUND_ALIEN; r.leftEnd = leftEnd; r.alienAutomaton = automaton; } void AU_LhsAutomaton::addFlexVariable(const VariableTerm* variable, int shiftFactor, bool idPossible) { Sort* s = variable->getSort(); int upperBound = topSymbol->sortBound(s); bool takeIdentity = idPossible && topSymbol->takeIdentity(s); int lowerBound = takeIdentity ? 0 : 1; updateWholeBounds(lowerBound, upperBound); updateFlexBounds(lowerBound, upperBound); int nrFlex = flexPart.length(); flexPart.expandBy(1); Subterm& f = flexPart[nrFlex]; f.type = VARIABLE; f.shiftFactor = shiftFactor; f.variable.index = variable->getIndex(); f.variable.sort = s; f.variable.upperBound = upperBound; f.variable.takeIdentity = takeIdentity; f.variable.awkward = matchAtTop && !idPossible && topSymbol->takeIdentity(s); f.variable.abstracted = 0; } void AU_LhsAutomaton::addFlexAbstractionVariable(int index, Sort* sort, int upperBound, bool takeIdentity, bool awkward, LhsAutomaton* abstracted) { int lowerBound = takeIdentity ? 0 : 1; updateWholeBounds(lowerBound, upperBound); updateFlexBounds(lowerBound, upperBound); int nrFlex = flexPart.length(); flexPart.expandBy(1); Subterm& f = flexPart[nrFlex]; f.type = VARIABLE; f.shiftFactor = UNDEFINED; f.variable.index = index; f.variable.sort = sort; f.variable.upperBound = upperBound; f.variable.takeIdentity = takeIdentity; f.variable.awkward = awkward; f.variable.abstracted = abstracted; } void AU_LhsAutomaton::addFlexGroundAlien(Term* alien, int shiftFactor) { updateWholeBounds(1, 1); updateFlexBounds(1, 1); int nrFlex = flexPart.length(); flexPart.expandBy(1); Subterm& f = flexPart[nrFlex]; f.type = GROUND_ALIEN; f.shiftFactor = shiftFactor; f.groundAlien = alien; } void AU_LhsAutomaton::addFlexNonGroundAlien(LhsAutomaton* automaton, int shiftFactor) { updateWholeBounds(1, 1); updateFlexBounds(1, 1); int nrFlex = flexPart.length(); flexPart.expandBy(1); Subterm& f = flexPart[nrFlex]; f.type = NON_GROUND_ALIEN; f.shiftFactor = shiftFactor; f.alienAutomaton = automaton; } void AU_LhsAutomaton::complete(MatchStrategy strategy) { int nrFixed = 0; for(int i = flexPart.length() - 1; i >= 0; i--) { Subterm& f = flexPart[i]; if (f.shiftFactor < 0) { f.blockLength = NOT_FIXED; nrFixed = 0; } else f.blockLength = ++nrFixed; } matchStrategy = strategy; } #ifdef DUMP void AU_LhsAutomaton::dump(ostream& s, const VariableInfo& variableInfo, int indentLevel) { s << Indent(indentLevel) << "Begin{AU_LhsAutomaton}\n"; ++indentLevel; s << Indent(indentLevel) << "topSymbol = \"" << topSymbol << "\"\tmatchAtTop = " << matchAtTop << "\tcollapsePossible = " << collapsePossible << "\tmatchStrategy = " << matchStrategy << '\n'; if (uniqueCollapseAutomaton != 0) { s << Indent(indentLevel) << "uniqueCollapseAutomaton =\n"; uniqueCollapseAutomaton->dump(s, variableInfo, indentLevel + 1); } s << Indent(indentLevel) << "wholeLowerBound = " << wholeLowerBound << "\twholeUpperBound = " << wholeUpperBound << '\n'; s << Indent(indentLevel) << "flexLowerBound = " << flexLowerBound << "\tflexUpperBound = " << flexUpperBound << '\n'; s << Indent(indentLevel) << "rigidPart:\n"; ++indentLevel; for (int i = 0; i < rigidPart.length(); i++) { Subterm& r = rigidPart[i]; s << Indent(indentLevel) << "type = " << r.type << "\tleftEnd = " << r.leftEnd; switch (r.type) { case VARIABLE: { s << "\tindex = " << r.variable.index << " \"" << variableInfo.index2Variable(r.variable.index) << "\"\n"; s << Indent(indentLevel) << "sort = " << r.variable.sort << "\tupperBound = " << r.variable.upperBound << "\ttakeIdentity = " << r.variable.takeIdentity << '\n'; break; } case GROUND_ALIEN: { s << "\tgroundAlien = " << r.groundAlien << '\n'; break; } case NON_GROUND_ALIEN: { s << "\talienAutomaton =\n"; r.alienAutomaton->dump(s, variableInfo, indentLevel + 1); break; } } } s << Indent(indentLevel - 1) << "flex part:\n"; for (int i = 0; i < flexPart.length(); i++) { Subterm& f = flexPart[i]; s << Indent(indentLevel) << "type = " << f.type << "\tshiftFactor = " << f.shiftFactor << "\tblockLength = " << f.blockLength; switch (f.type) { case VARIABLE: { s << "\tindex = " << f.variable.index; if (f.variable.abstracted == 0) s << " \"" << variableInfo.index2Variable(f.variable.index) << '"'; s << '\n' << Indent(indentLevel) << "sort = " << f.variable.sort << "\tupperBound = " << f.variable.upperBound << "\ttakeIdentity = " << bool(f.variable.takeIdentity) << "\tawkward = " << bool(f.variable.awkward) << '\n'; if (f.variable.abstracted != 0) { s << Indent(indentLevel) << "abstracted = " << '\n'; f.variable.abstracted->dump(s, variableInfo, indentLevel + 1); } break; } case GROUND_ALIEN: { s << "\tgroundAlien = " << f.groundAlien << '\n'; break; } case NON_GROUND_ALIEN: { s << "\talienAutomaton =\n"; f.alienAutomaton->dump(s, variableInfo, indentLevel + 1); break; } } } s << Indent(indentLevel - 2) << "End{AU_LhsAutomaton}\n"; } ostream& operator<<(ostream& s, AU_LhsAutomaton::MatchStrategy strategy) { static const char* const names[] = {"GROUND_OUT", "LONE_VARIABLE", "FAST_LONE_VARIABLE", "GREEDY", "FULL"}; s << names[strategy]; return s; } ostream& operator<<(ostream& s, AU_LhsAutomaton::SubtermType type) { static const char* const names[] = {"VARIABLE", "GROUND_ALIEN", "NON_GROUND_ALIEN"}; s << names[type]; return s; } #endif Maude-Maude3.2/src/AU_Theory/AU_LhsAutomaton.hh000066400000000000000000000232141420036611000213320ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for left hand side automata in the A, AUl, AUr and AU theories. // #ifndef _AU_LhsAutomaton_hh_ #define _AU_LhsAutomaton_hh_ #include "lhsAutomaton.hh" class AU_LhsAutomaton : public LhsAutomaton { NO_COPYING(AU_LhsAutomaton); public: enum MatchStrategy { // // Ground out case: no extension and no flex part; everything is in // the rigid part. // GROUND_OUT, // // Lone variable case: no extension and flex part consists of a single // variable that is forced to match whatever is left after the rigid part // has been matched. // LONE_VARIABLE, // // Fast lone variable case: as above but variable has a PURE_SORT // and is not an abstraction variable. // FAST_LONE_VARIABLE, // // Greedy case: In the flex part, the intersection of each subterm's variables // with union of its context variables and the condition variables contains // only variables guaranteed to be bound once the rigid part has been matched. // None of the subautomata for the flex part are likely to return subproblems and // each variable in the subterm that is not guaranteed to be bound has either a // LIMIT_SORT or a PURE_SORT or has upperBound = 1. // GREEDY, // // Full case: if other cases don't apply; build a DAG which provides a // compact representation of the possibly exponential number of matching // possibilities and pass it back as a subproblem. // FULL }; // // Operations to build an AU_LhsAutomaton // AU_LhsAutomaton(AU_Symbol* symbol, bool matchAtTop, bool collapsePossible, LhsAutomaton* uniqueCollapseAutomaton, int nrVariables); ~AU_LhsAutomaton(); void addRigidVariable(const VariableTerm* variable, bool leftEnd, bool idPossible); void addRigidGroundAlien(Term* alien, bool leftEnd); void addRigidNonGroundAlien(LhsAutomaton* automaton, bool leftEnd); void addFlexVariable(const VariableTerm* variable, int shiftFactor, bool idPossible); void addFlexAbstractionVariable(int index, Sort* sort, int upperBound, bool takeIdentity, bool awkward, LhsAutomaton* abstracted); void addFlexGroundAlien(Term* alien, int shiftFactor); void addFlexNonGroundAlien(LhsAutomaton* automaton, int shiftFactor); void complete(MatchStrategy strategy); // // Standard LhsAutomaton operations // bool match(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo); #ifdef DUMP void dump(ostream& s, const VariableInfo& variableInfo, int indentLevel); #endif private: enum SubtermType { VARIABLE, GROUND_ALIEN, NON_GROUND_ALIEN }; enum Special { STALLED = -1, NOT_FIXED = -1 }; struct TopVariable { short index; Bool takeIdentity; // take identity instead of piece of subject (always) Bool awkward; // take identity instead of piece of subject (special) Sort* sort; int upperBound; LhsAutomaton* abstracted; // automaton for abstracted term // // Data storage for full match time use, flex part only // int nastyBinding; // if >= 0, minimum number of subterms // that binding might match // // Data storage for greedy match time use, flex part only // int firstSubject; int lastSubject; }; struct Subterm { SubtermType type; int shiftFactor; // for flex part only union { bool leftEnd; // for rigid part only int blockLength; // for flex part only; +ve for fixed start, -1 for variable }; union { TopVariable variable; Term* groundAlien; LhsAutomaton* alienAutomaton; }; }; // // Rigid blocks within the flex part are only determined at match time // since they depend on what variables are bound. // struct RigidBlock { int start; // index into flexPart int end; // index into flexPart int nrSubjectsForUs; // needed because value of bound variable may be in our theory int nrSubjectsToLeave; // for preceeding variables int firstMatch; // first matching shift for this rigid block }; void updateWholeBounds(int min, int max); void updateFlexBounds(int min, int max); // // First rigid part matcher and preprocessing code. // bool matchRigidPart(AU_DagNode* subject, Substitution& solution, SubproblemAccumulator& subproblems); bool checkForRigidEnds(AU_DagNode* subject, Substitution& solution, SubproblemAccumulator& subproblems); int checkLeftEnd(AU_DagNode* subject, Substitution& solution, SubproblemAccumulator& subproblems, int& mustLeave, bool& rightStalled); int checkRightEnd(AU_DagNode* subject, Substitution& solution, SubproblemAccumulator& subproblems, int& mustLeave, bool& leftStalled); bool forcedLoneVariableCase(AU_DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem); void determineRigidBlocks(Substitution& solution); // // Greedy Matcher. // int greedyMatch(AU_DagNode* subject, Substitution& solution, AU_ExtensionInfo* extensionInfo); void greedyBindVariables(AU_DagNode* subject, Substitution& solution); int greedyMatchRigidBlock(AU_DagNode* subject, RigidBlock& block, int minShift, int maxShift, int& matchShift); int greedyMatchRigidBlock2(AU_DagNode* subject, RigidBlock& block, int nextSubject, int& shiftFactor); int greedyMatchFixedLengthBlock(ArgVec& args, int blockStart, int attemptedShift, int& shiftFactor); int greedyMatchBlocks(AU_DagNode* subject, AU_ExtensionInfo* extensionInfo); bool greedyMatchVariableBlock(ArgVec& args, int blockStart, int blockLength, int firstSubject, int nrSubjects, int spare, bool leftExtend, bool rightExtend, AU_ExtensionInfo* extensionInfo); // // Full Matcher. // void addVariableBlocks(Substitution& solution, AU_Subproblem* subproblem, SubproblemAccumulator& subproblems); bool fullMatchRigidBlock(AU_DagNode* subject, Substitution& solution, RigidBlock& block, int minShift, int maxShift, int& matchShift, Subproblem*& subproblem); bool fullMatchRigidBlock2(AU_DagNode* subject, RigidBlock& block, int nextSubject, Subproblem*& subproblem, int& shiftFactor); bool fullMatchFixedLengthBlock(ArgVec& args, int blockStart, int attemptedShift, SubproblemAccumulator& subproblems, int& shiftFactor); AU_Subproblem* buildLeftmostPath(AU_DagNode* subject, Substitution& solution, AU_ExtensionInfo* extensionInfo); void addRemainingPaths(AU_DagNode* subject, Substitution& solution, AU_Subproblem* subproblem); bool fullMatch(AU_DagNode* subject, Substitution& solution, SubproblemAccumulator& subproblems, AU_ExtensionInfo* extensionInfo); // // Collapse matcher. // bool collapseMatch(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo); bool uniqueCollapseMatch(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo); bool multiwayCollapseMatch(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo); void bindUnboundVariablesToIdentity(Substitution& solution, int exception); int dequeMatch(AU_DequeDagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem); AU_Symbol* const topSymbol; const bool matchAtTop; const bool collapsePossible; LhsAutomaton* const uniqueCollapseAutomaton; MatchStrategy matchStrategy; int wholeLowerBound; int wholeUpperBound; int flexLowerBound; int flexUpperBound; Vector rigidPart; Vector flexPart; // // Data storage for match-time use. // // Left and right limits of subject not matched by rigid part. // int leftPos; int rightPos; // // Left and right limits of flex part not used up. // int flexLeftPos; int flexRightPos; // // Rigid blocks within flex part determined by examining variable // bindings at match time. // Vector rigidBlocks; // // Minimum number of subjects needed for flex part. // int nrSubjectsUsed; // // Minimum number of subjects needed for variables to the right of // last rigid block. // int nrSubjectsForRightVars; // // Throw away substitutions for exploring match space. // Substitution local; Substitution scratch; friend ostream& operator<<(ostream& s, SubtermType type); }; #ifdef DUMP ostream& operator<<(ostream& s, AU_LhsAutomaton::MatchStrategy strategy); ostream& operator<<(ostream& s, AU_LhsAutomaton::SubtermType type); #endif #endif Maude-Maude3.2/src/AU_Theory/AU_LhsCompiler.cc000066400000000000000000000372371420036611000211350ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation of match compilation for A, AUl, AUr and AU theories. // struct AU_Term::CP_Sequence { Vector sequence; // true = take left term, false = take right term NatSet bound; int cardinality; int firstFlex; }; local_inline bool AU_Term::unitVariable(VariableTerm* vt, int index) const { if (vt == 0) return false; AU_Symbol* s = symbol(); Sort* vs = vt->getSort(); // // A unit variable has a bound of one imposed by its sort and it cannot take an // identity either because a suitable left/right identity doesn't exist or // its sort is too low. // return (s->sortBound(vs) == 1 && !(idPossible(index) && s->takeIdentity(vs))); } void AU_Term::analyseConstraintPropagation(NatSet& boundUniquely) const { CP_Sequence bestSequence; findConstraintPropagationSequence(boundUniquely, bestSequence); boundUniquely = bestSequence.bound; // deep copy if (bestSequence.sequence.length() == argArray.length() - 1) { AU_Symbol* s = symbol(); // // Lone variable or abstracted term in flex part. We // can only guarentee unique binding if our top symbol // does not have a one sided identity. // if (!(s->oneSidedId())) argArray[bestSequence.firstFlex].term->analyseConstraintPropagation(boundUniquely); } } LhsAutomaton* AU_Term::compileLhs2(bool matchAtTop, const VariableInfo& variableInfo, NatSet& boundUniquely, bool& subproblemLikely) { AU_Symbol* s = symbol(); bool oneSidedIdentity = s->oneSidedId(); LhsAutomaton* uniqueCollapseAutomaton = 0; if (uniqueCollapseSubtermIndex != NONE) { // // Maybe we should add the variable(s) which will be bound to identity // to this local bound uniquely. // NatSet local(boundUniquely); bool spl; uniqueCollapseAutomaton = argArray[uniqueCollapseSubtermIndex].term-> compileLhs(matchAtTop, variableInfo, local, spl); } AU_LhsAutomaton* a = new AU_LhsAutomaton(s, matchAtTop, !(collapseSymbols().empty()), uniqueCollapseAutomaton, variableInfo.getNrProtectedVariables()); subproblemLikely = false; int leftPos = 0; int rightPos = argArray.length() - 1; if (!matchAtTop) { // // Build rigid part. // CP_Sequence bestSequence; findConstraintPropagationSequence(boundUniquely, bestSequence); int nrRigid = bestSequence.sequence.length(); for (int i = 0; i < nrRigid; i++) { bool leftEnd = bestSequence.sequence[i]; int j = leftEnd ? leftPos++ : rightPos--; Term* t = argArray[j].term; VariableTerm* v = dynamic_cast(t); if (v != 0) { a->addRigidVariable(v, leftEnd, idPossible(j)); boundUniquely.insert(v->getIndex()); } else if (t->ground()) a->addRigidGroundAlien(t, leftEnd); else { bool spl; LhsAutomaton* subAutomaton = t->compileLhs(false, variableInfo, boundUniquely, spl); a->addRigidNonGroundAlien(subAutomaton, leftEnd); subproblemLikely = subproblemLikely || spl; } } Assert(boundUniquely == bestSequence.bound, "bound clash"); // // Build flex part (special cases). // int nrFlex = rightPos - leftPos + 1; if (nrFlex == 0) { a->complete(AU_LhsAutomaton::GROUND_OUT); return a; } if (nrFlex == 1 && !oneSidedIdentity) { Assert(!matchAtTop, "shouldn't match at top"); Tuple& t = argArray[leftPos]; if (t.abstractionVariableIndex == NONE) { VariableTerm* vt = dynamic_cast(t.term); a->addFlexVariable(vt, UNDEFINED, idPossible(leftPos)); boundUniquely.insert(vt->getIndex()); a->complete((s->sortStructure(vt->getSort()) == AssociativeSymbol::PURE_SORT) ? AU_LhsAutomaton::FAST_LONE_VARIABLE : AU_LhsAutomaton::LONE_VARIABLE); } else { bool matchOurIdentity = t.matchOurIdentity && idPossible(leftPos); Assert(t.collapseToOurSymbol || matchOurIdentity, "should not use abstraction variable"); bool spl; a->addFlexAbstractionVariable (t.abstractionVariableIndex, t.term->getComponent()->sort(Sort::ERROR_SORT), t.collapseToOurSymbol ? UNBOUNDED : 1, matchOurIdentity, false, t.term->compileLhs(false, variableInfo, boundUniquely, spl)); subproblemLikely = subproblemLikely || spl; a->complete(AU_LhsAutomaton::LONE_VARIABLE); } return a; } } // // Build flex part (general case). // // Greedy matcher: // (1) does not check to see if matched portion is in error sort; // (2) cannot handle the intricacies involved in one sided identity theories; // (3) does not check that enough has been matched if extension present. // bool greedy = !oneSidedIdentity && (!matchAtTop || collapseSymbols().empty()); int fixedLengthBlockStart = NONE; for (int i = leftPos; i <= rightPos; i++) { Tuple& t = argArray[i]; greedy = greedy && t.abstractionVariableIndex == NONE && t.term->greedySafe(variableInfo, boundUniquely); // // Check if thing we match will be of fixed size. // bool fixedSize = (t.abstractionVariableIndex == NONE); VariableTerm* vt = dynamic_cast(t.term); if (vt != 0) { Sort* vs = vt->getSort(); bool ip = idPossible(i); bool ti = s->takeIdentity(vs); bool awkward = matchAtTop && !ip && ti; greedy = greedy && !awkward; if (((matchAtTop || ip) && ti) || s->sortBound(vs) > 1) { fixedSize = false; greedy = greedy && (boundUniquely.contains(vt->getIndex()) || s->sortStructure(vs) >= AssociativeSymbol::LIMIT_SORT); } } // // If not fixed size, see if we ended a fixed size block; then add // flex variable or flex abstraction variable. Otherwise see if we need // to start a fixed length block. // if (!fixedSize) { if (fixedLengthBlockStart != NONE) { bool spl; addFixedLengthBlock(a, fixedLengthBlockStart, i - fixedLengthBlockStart, variableInfo, boundUniquely, spl); greedy = greedy && !spl; fixedLengthBlockStart = NONE; } bool ip = idPossible(i); if (t.abstractionVariableIndex == NONE) a->addFlexVariable(vt, UNDEFINED, ip); else { bool matchOurIdentity = ip && t.matchOurIdentity; bool awkward = matchAtTop && !ip && t.matchOurIdentity; Assert(t.collapseToOurSymbol || matchOurIdentity || awkward, "should not use abstraction variable"); NatSet local(boundUniquely); bool spl; a->addFlexAbstractionVariable (t.abstractionVariableIndex, t.term->getComponent()->sort(Sort::ERROR_SORT), t.collapseToOurSymbol ? UNBOUNDED : 1, matchOurIdentity, awkward, t.term->compileLhs(false, variableInfo, local, spl)); } } else { if (fixedLengthBlockStart == NONE) fixedLengthBlockStart = i; } } // // Handle any remaining fixed length block. // if (fixedLengthBlockStart != NONE) { Assert(matchAtTop, "ended flex part with fixed length block"); bool spl; addFixedLengthBlock(a, fixedLengthBlockStart, argArray.length() - fixedLengthBlockStart, variableInfo, boundUniquely, spl); greedy = greedy && !spl; } // // Finish up by decideding on a match strategy. // if (!greedy) subproblemLikely = true; a->complete(greedy ? AU_LhsAutomaton::GREEDY : AU_LhsAutomaton::FULL); return a; } void AU_Term::addFixedLengthBlock(AU_LhsAutomaton* a, int blockStart, int blockLength, const VariableInfo& variableInfo, const NatSet& boundUniquely, bool& subproblemLikely) { // // For each possible shift factor sh from 1 to blockLength - 1 we // find the index of the rightmost pattern p such that if the p matches // some subject s (possibly with a subproblem that may or not be soluble), // the pattern q that is sh places to the left of p will fail early // on s, thus ruling out a shift of sh during matching. // Vector largestIndexThatFails(blockLength); for (int shift = 1; shift < blockLength; shift++) { largestIndexThatFails[shift] = -1; // default; shift is never ruled out for (int i = blockLength - 1; i >= shift; i--) { int b = blockStart + i; Term* p = argArray[b].term; // assume p matched subject Term* q = argArray[b - shift].term; // q will get p's subject after a shift if (q->earlyMatchFailOnInstanceOf(p)) { largestIndexThatFails[shift] = i; break; } } } // // For each pattern p we find the smallest shift that is not ruled out // when a match for that pattern fails and matches for all the patterns // to the right of it succeed (modulo a possible subproblem). // subproblemLikely = false; for (int i = 0; i < blockLength; i++) { int b = blockStart + i; Term* p = argArray[b].term; int shift = 1; for (; shift < blockLength; shift++) { // // A shift can be ruled out because a match to the right // of p; // if (i < largestIndexThatFails[shift]) continue; // // Or because the p is more general than the pattern // that will get it's subject after the shift. Here we need // to be careful because variables bound by an external agency // can invalidate subsumption. We rely on the convention that // the external agency adds any variables that it might bind // to the set of condition variables. // if (i >= shift && p->occursBelow().disjoint(variableInfo.getConditionVariables()) && p->subsumes(argArray[b - shift].term, true)) continue; else break; } VariableTerm* v = dynamic_cast(p); if (v != 0) a->addFlexVariable(v, shift, false); else if (p->ground()) a->addFlexGroundAlien(p, shift); else { NatSet local(boundUniquely); bool spl; LhsAutomaton* subAutomaton = p->compileLhs(false, variableInfo, local, spl); a->addFlexNonGroundAlien(subAutomaton, shift); subproblemLikely = subproblemLikely || spl; } } } void AU_Term::findConstraintPropagationSequence(const NatSet& boundUniquely, CP_Sequence& bestSequence) const { DebugAdvisory("toplevel findConstraintPropagationSequence() - array length = " << argArray.length() << " subterm = " << this); Vector currentSequence; bestSequence.cardinality = -1; findConstraintPropagationSequence(currentSequence, boundUniquely, 0, argArray.length() - 1, bestSequence); } void AU_Term::findConstraintPropagationSequence(const Vector& currentSequence, const NatSet& boundUniquely, int leftPos, int rightPos, CP_Sequence& bestSequence) const { if (leftPos <= rightPos) { // // Try to grow search tree. // // (1) If left or right term is not abstracted and grounds out // match it next and don't consider other possibilities. // const Tuple& lt = argArray[leftPos]; bool leftBad = lt.collapseToOurSymbol || (lt.matchOurIdentity && idPossible(leftPos)); if (!leftBad && boundUniquely.contains(lt.term->occursBelow())) { DebugAdvisory("lower level findConstraintPropagationSequence() - ground out left " << leftPos); Vector newSequence(currentSequence); newSequence.append(true); findConstraintPropagationSequence(newSequence, boundUniquely, leftPos + 1, rightPos, bestSequence); return; } const Tuple& rt = argArray[rightPos]; bool rightBad = (leftPos == rightPos) || rt.collapseToOurSymbol || (rt.matchOurIdentity && idPossible(rightPos)); if (!rightBad && boundUniquely.contains(rt.term->occursBelow())) { DebugAdvisory("lower level findConstraintPropagationSequence() - ground out right " << rightPos); Vector newSequence(currentSequence); newSequence.append(false); findConstraintPropagationSequence(newSequence, boundUniquely, leftPos, rightPos - 1, bestSequence); return; } // // (2) If left or right term is a variable of unit sort which cannot take // identity match it next and don't consider other possibilities. // VariableTerm* ltVar = dynamic_cast(lt.term); if (unitVariable(ltVar, leftPos)) { DebugAdvisory("lower level findConstraintPropagationSequence() - unit var left " << leftPos); Vector newSequence(currentSequence); newSequence.append(true); NatSet newBound(boundUniquely); newBound.insert(ltVar->getIndex()); findConstraintPropagationSequence(newSequence, newBound, leftPos + 1, rightPos, bestSequence); return; } VariableTerm* rtVar = dynamic_cast(rt.term); if (leftPos < rightPos && unitVariable(rtVar, rightPos)) { DebugAdvisory("lower level findConstraintPropagationSequence() - unit var right " << rightPos); Vector newSequence(currentSequence); newSequence.append(false); NatSet newBound(boundUniquely); newBound.insert(rtVar->getIndex()); findConstraintPropagationSequence(newSequence, newBound, leftPos, rightPos - 1, bestSequence); return; } // // If left or right term is a non-abstracted alien then consider // matching it next but also consider other possibilities. // bool growth = false; if (!leftBad && ltVar == 0) { DebugAdvisory("lower level findConstraintPropagationSequence() - alien left " << leftPos); Vector newSequence(currentSequence); newSequence.append(true); NatSet newBound(boundUniquely); lt.term->analyseConstraintPropagation(newBound); findConstraintPropagationSequence(newSequence, newBound, leftPos + 1, rightPos, bestSequence); growth = true; } if (bestSequence.sequence.length() >= argArray.length() - 1) { // // All arguments or all arguments but one have a forced match (with the left over argument taking what is left). // There will be no branching at match time, so considering an alternative order is a waste of time. // DebugAdvisory("lower level findConstraintPropagationSequence() - aborting right branch"); return; } if (!rightBad && rtVar == 0) { DebugAdvisory("lower level findConstraintPropagationSequence() - alien right " << rightPos); Vector newSequence(currentSequence); newSequence.append(false); NatSet newBound(boundUniquely); rt.term->analyseConstraintPropagation(newBound); findConstraintPropagationSequence(newSequence, newBound, leftPos, rightPos - 1, bestSequence); growth = true; } if (growth) return; } int n = boundUniquely.cardinality(); if (n > bestSequence.cardinality || (n == bestSequence.cardinality && currentSequence.length() > bestSequence.sequence.length())) { bestSequence.sequence = currentSequence; // deep copy bestSequence.bound = boundUniquely; // deep copy bestSequence.cardinality = n; bestSequence.firstFlex = leftPos <= rightPos ? leftPos : NONE; } } Maude-Maude3.2/src/AU_Theory/AU_Matcher.cc000066400000000000000000000336631420036611000202760ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2021 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for common parts of A/AU matcher. // bool AU_LhsAutomaton::match(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo) { if (subject->symbol() != topSymbol) { if (collapsePossible) return collapseMatch(subject, solution, returnedSubproblem, extensionInfo); return false; } Assert(matchAtTop == (extensionInfo != 0), "matchAtTop disagreement"); if (safeCast(AU_BaseDagNode*, subject)->isDeque()) { AU_DequeDagNode* t = safeCast(AU_DequeDagNode*, subject); if (matchStrategy == LONE_VARIABLE || matchStrategy == FAST_LONE_VARIABLE) { int r = dequeMatch(t, solution, returnedSubproblem); if (r == true || r == false) return r; } (void) AU_DequeDagNode::dequeToArgVec(t); } AU_DagNode* s = safeCast(AU_DagNode*, subject); int nrArgs = s->argArray.length(); if (nrArgs < wholeLowerBound || nrArgs > wholeUpperBound) return false; leftPos = 0; rightPos = nrArgs - 1; flexLeftPos = 0; flexRightPos = flexPart.length() - 1; SubproblemAccumulator subproblems; AU_ExtensionInfo* e = safeCast(AU_ExtensionInfo*, extensionInfo); if (e == 0) { if (!matchRigidPart(s, solution, subproblems) || (flexPart.length() != 0 && !checkForRigidEnds(s, solution, subproblems))) return false; int flexRemaining = flexRightPos - flexLeftPos + 1; if (flexRemaining == 0) { DebugAdvisoryCheck(matchStrategy == GROUND_OUT, "match strategy changed from " << matchStrategy << " to GROUND_OUT at match time (top symbol = \"" << topSymbol << "\")"); if (rightPos - leftPos + 1 != 0) return false; goto success; } if (flexRemaining == 1 && !(topSymbol->oneSidedId())) { DebugAdvisoryCheck(matchStrategy == LONE_VARIABLE || matchStrategy == FAST_LONE_VARIABLE, "match strategy changed from " << matchStrategy << " to LONE_VARIABLE at match time (top symbol = \"" << topSymbol << "\")"); Subproblem* sp; if (!forcedLoneVariableCase(s, solution, sp)) return false; subproblems.add(sp); goto success; } } Assert(matchStrategy != GROUND_OUT && matchStrategy != LONE_VARIABLE && matchStrategy != FAST_LONE_VARIABLE, "bad strategy"); determineRigidBlocks(solution); if (matchStrategy == GREEDY) { int r = greedyMatch(s, solution, e); if (r == false) return false; if (r == true) goto success; } if (!fullMatch(s, solution, subproblems, e)) return false; success: returnedSubproblem = subproblems.extractSubproblem(); return true; } bool AU_LhsAutomaton::matchRigidPart(AU_DagNode* subject, Substitution& solution, SubproblemAccumulator& subproblems) { ArgVec& args = subject->argArray; for (const Subterm& i : rigidPart) { switch (i.type) { case VARIABLE: { const TopVariable& tv = i.variable; DagNode* b = solution.value(tv.index); if (b != 0) { // // Bound variable case. // if (i.leftEnd) { if (!(subject->eliminateForward(b, leftPos, rightPos - flexLowerBound))) return false; } else { if (!(subject->eliminateBackward(b, rightPos, leftPos + flexLowerBound))) return false; } } else { // // Unbound non-identity unit variable case. // Assert(tv.upperBound == 1, "unbound non-unit variable in rigid part"); Assert(!(tv.takeIdentity), "unbound variable which can take identity in rigid part"); if (rightPos - leftPos < flexLowerBound) return false; DagNode* d = args[i.leftEnd ? leftPos++ : rightPos--]; if (!(d->leq(tv.sort))) return false; solution.bind(tv.index, d); } break; } case GROUND_ALIEN: { if (rightPos - leftPos < flexLowerBound || !(i.groundAlien->equal(args[i.leftEnd ? leftPos++ : rightPos--]))) return false; break; } case NON_GROUND_ALIEN: { Subproblem* sp; if (rightPos - leftPos < flexLowerBound || !(i.alienAutomaton-> match(args[i.leftEnd ? leftPos++ : rightPos--], solution, sp))) return false; subproblems.add(sp); break; } } } return rightPos - leftPos + 1 <= flexUpperBound; } bool AU_LhsAutomaton::checkForRigidEnds(AU_DagNode* subject, Substitution& solution, SubproblemAccumulator& subproblems) { int mustLeave = flexLowerBound; bool leftStalled = false; bool rightStalled = false; for(;;) { switch(checkLeftEnd(subject, solution, subproblems, mustLeave, rightStalled)) { case false: return false; case true: { if (flexLeftPos++ == flexRightPos) return true; break; } case STALLED: { if (rightStalled) return true; leftStalled = true; break; } } switch(checkRightEnd(subject, solution, subproblems, mustLeave, leftStalled)) { case false: return false; case true: { if (flexLeftPos == flexRightPos--) return true; break; } case STALLED: { if (leftStalled) return true; rightStalled = true; break; } } } } int AU_LhsAutomaton::checkLeftEnd(AU_DagNode* subject, Substitution& solution, SubproblemAccumulator& subproblems, int& mustLeave, bool& rightStalled) { Subterm& f = flexPart[flexLeftPos]; switch (f.type) { case VARIABLE: { TopVariable& tv = f.variable; DagNode* b = solution.value(tv.index); if (b != 0) { if (!tv.takeIdentity) --mustLeave; return subject->eliminateForward(b, leftPos, rightPos - mustLeave); } else if (tv.upperBound == 1 && !(tv.takeIdentity)) { if (rightPos - leftPos < --mustLeave) return false; DagNode* d = subject->argArray[leftPos++]; if (!(d->leq(tv.sort))) return false; solution.bind(tv.index, d); break; } return STALLED; } case GROUND_ALIEN: { return rightPos - leftPos >= --mustLeave && f.groundAlien->equal(subject->argArray[leftPos++]); } case NON_GROUND_ALIEN: { Subproblem* sp; if (rightPos - leftPos < --mustLeave || !(f.alienAutomaton->match(subject->argArray[leftPos++], solution, sp))) return false; subproblems.add(sp); rightStalled = false; // we may have bound variable stalling right end break; } } return true; } int AU_LhsAutomaton::checkRightEnd(AU_DagNode* subject, Substitution& solution, SubproblemAccumulator& subproblems, int& mustLeave, bool& leftStalled) { Subterm& f = flexPart[flexRightPos]; switch (f.type) { case VARIABLE: { TopVariable& tv = f.variable; DagNode* b = solution.value(tv.index); if (b != 0) { if (!tv.takeIdentity) --mustLeave; return subject->eliminateBackward(b, rightPos, leftPos + mustLeave); } else if (tv.upperBound == 1 && !(tv.takeIdentity)) { if (rightPos - leftPos < --mustLeave) return false; DagNode* d = subject->argArray[rightPos--]; if (!(d->leq(tv.sort))) return false; solution.bind(tv.index, d); break; } return STALLED; } case GROUND_ALIEN: { return rightPos - leftPos >= --mustLeave && f.groundAlien->equal(subject->argArray[rightPos--]); } case NON_GROUND_ALIEN: { Subproblem* sp; if (rightPos - leftPos < --mustLeave || !(f.alienAutomaton->match(subject->argArray[rightPos--], solution, sp))) return false; leftStalled = false; // we may have bound variable stalling left end subproblems.add(sp); break; } } return true; } bool AU_LhsAutomaton::forcedLoneVariableCase(AU_DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem) { Assert(flexPart[flexLeftPos].type == VARIABLE, "lone variable is not a variable"); returnedSubproblem = 0; ArgVec& args = subject->argArray; int nrSubjectsRemaining = rightPos - leftPos + 1; TopVariable& loneVariable = flexPart[flexLeftPos].variable; Assert(solution.value(loneVariable.index) == 0, "lone variable bound"); if (nrSubjectsRemaining == 0) { if (!(loneVariable.takeIdentity)) return false; DagNode* d = topSymbol->getIdentityDag(); solution.bind(loneVariable.index, d); return (loneVariable.abstracted == 0) ? true : loneVariable.abstracted->match(d, solution, returnedSubproblem); } else if (nrSubjectsRemaining == 1) { DagNode* d = args[leftPos]; solution.bind(loneVariable.index, d); // presuming we succeed return (loneVariable.abstracted == 0) ? (d->leq(loneVariable.sort)) : loneVariable.abstracted->match(d, solution, returnedSubproblem); } else if (matchStrategy != FAST_LONE_VARIABLE) { // // General lone variable case. // // We construct the binding for the lone variable and then // check its sort, possibly creating a sort check subproblem. // AU_DagNode* d = new AU_DagNode(topSymbol, nrSubjectsRemaining); int pos = 0; for (int i = leftPos; i <= rightPos; i++) d->argArray[pos++] = args[i]; Assert(pos == nrSubjectsRemaining, "inconsistant number of subterms"); solution.bind(loneVariable.index, d); if (loneVariable.abstracted != 0) return loneVariable.abstracted->match(d, solution, returnedSubproblem); if (d->checkSort(loneVariable.sort, returnedSubproblem)) { d->setProducedByAssignment(); if (subject->isReduced() && d->getSortIndex() != Sort::SORT_UNKNOWN) d->setReduced(); return true; } } else { // // Fast lone variable case. // // We know the sort of binding will <= that of that lone // variable, iff each of the subterm sorts are <= that // of the lone variable, so we only need look at the sorts // of the subterms. // AU_DagNode* d = new AU_DagNode(topSymbol, nrSubjectsRemaining); int lastIndex = Sort::SORT_UNKNOWN; const Sort* cs = loneVariable.sort; ArgVec::iterator j = d->argArray.begin(); const ArgVec::const_iterator e = args.begin() + rightPos + 1; for (ArgVec::const_iterator i = args.begin() + leftPos; i != e; ++i, ++j) { DagNode* sd = *i; int index = sd->getSortIndex(); Assert(index != Sort::SORT_UNKNOWN, "bad sort"); if (index != lastIndex) { if (!(leq(index, cs))) return false; lastIndex = index; } *j = sd; } Assert(j == d->argArray.end(), "iterator problem"); d->setProducedByAssignment(); if (subject->isReduced() && topSymbol->sortConstraintFree()) { topSymbol->computeBaseSort(d); d->setReduced(); } solution.bind(loneVariable.index, d); return true; } return false; } void AU_LhsAutomaton::determineRigidBlocks(Substitution& solution) { RigidBlock r; r.start = NONE; r.nrSubjectsForUs = 0; r.nrSubjectsToLeave = 0; r.firstMatch = NONE; // to avoid compiler warning rigidBlocks.clear(); nrSubjectsUsed = 0; int lastFlexPart = flexPart.length() - 1; int skip; for (int i = flexLeftPos; i <= flexRightPos; i += skip) { Subterm& f = flexPart[i]; skip = f.blockLength; if (skip == NOT_FIXED) { skip = 1; f.variable.nastyBinding = NONE; DagNode* d = solution.value(f.variable.index); if (d == 0) { // // Unbound variable terminates current rigid block (if there is one). // We treat variables with nasty bindings as being unbound // since we can't be sure how many subjects they will match. // if (r.start != NONE) { r.end = i - 1; rigidBlocks.append(r); r.start = NONE; r.nrSubjectsForUs = 0; r.nrSubjectsToLeave = 0; } if (!(f.variable.takeIdentity)) { ++r.nrSubjectsToLeave; // for this unbound variable ++nrSubjectsUsed; } } else { bool nasty; int n = topSymbol-> calculateNrSubjectsMatched(d, i == 0, i == lastFlexPart, nasty); nrSubjectsUsed += n; if (nasty) { DebugAdvisoryCheck(false, "nasty binding of " << d << " to variable with index " << f.variable.index << " detected in match phase"); Assert(matchAtTop, "can't have nasty binding without extension"); // // Unbound variable terminates current rigid block (if there is one). // We treat variables with nasty bindings as being unbound // since we can't be sure how many subjects they will match. // if (r.start != NONE) { r.end = i - 1; rigidBlocks.append(r); r.start = NONE; r.nrSubjectsForUs = 0; r.nrSubjectsToLeave = 0; } r.nrSubjectsToLeave += n; f.variable.nastyBinding = n; } else { r.nrSubjectsForUs += n; if (r.start == NONE) r.start = i; } } } else { r.nrSubjectsForUs += skip; nrSubjectsUsed += skip; if (r.start == NONE) r.start = i; } } // // End of flex part terminates current rigid block (if there is one). // if (r.start != NONE) { Assert(matchAtTop, "missing extension"); r.end = flexRightPos; rigidBlocks.append(r); nrSubjectsForRightVars = 0; } else nrSubjectsForRightVars = r.nrSubjectsToLeave; } Maude-Maude3.2/src/AU_Theory/AU_Normalize.cc000066400000000000000000000142461420036611000206470ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Normalization for AU_DagNodes. // bool AU_DagNode::disappear(AU_Symbol* s, ArgVec::const_iterator i) { return (s->rightId() && i != argArray.begin()) || (s->leftId() && i + 1 != argArray.end()); } AU_DagNode::NormalizationResult AU_DagNode::normalizeAtTop(bool dumb) { AU_Symbol* s = symbol(); Term* identity = s->getIdentity(); int expansion = 0; int nrIdentities = 0; int maxDeque = 0; ArgVec::const_iterator maxDequeIter; // gcc gives uninitialized warning // // First examine the argument list looking for either our top symbol // or our identity. // { FOR_EACH_CONST(i, ArgVec, argArray) { DagNode* d = *i; if (d->symbol() == s) { if (safeCast(AU_BaseDagNode*, d)->isDeque()) { // // Since we have at least one deque we won't use // expansion and therefore don't waste time // updating it. // int nrArgs = safeCast(AU_DequeDagNode*, d)->nrArgs(); if (nrArgs > maxDeque) { maxDeque = nrArgs; maxDequeIter = i; } } else expansion += safeCast(AU_DagNode*, d)->argArray.length() - 1; } else if (identity != 0 && identity->equal(d) && disappear(s, i)) ++nrIdentities; } } // // Now deal efficiently with all the special cases. // if (maxDeque > 0) { // // We had at least 1 deque in argument list. We push // all the remaining arguments onto the largest such // deque. We never deal with one sided identities in this // case. // AU_Deque flat(safeCast(AU_DequeDagNode*, *maxDequeIter)->getDeque()); { // // Push stuff on the left of the largest deque. // const ArgVec::const_iterator b = argArray.begin(); for (ArgVec::const_iterator i = maxDequeIter; i != b;) { --i; DagNode* d = *i; if (d->symbol() == s) { if (safeCast(AU_BaseDagNode*, d)->isDeque()) flat.pushLeft(safeCast(AU_DequeDagNode*, d)->getDeque()); else flat.pushLeft(safeCast(AU_DagNode*, d)->argArray); } else if (!(nrIdentities > 0 && identity->equal(d))) flat.pushLeft(d); } } { // // Push stuff on the right of the largest deque. // const ArgVec::const_iterator e = argArray.end(); for (ArgVec::const_iterator i = maxDequeIter + 1; i != e; ++i) { DagNode* d = *i; if (d->symbol() == s) { if (safeCast(AU_BaseDagNode*, d)->isDeque()) flat.pushRight(safeCast(AU_DequeDagNode*, d)->getDeque()); else flat.pushRight(safeCast(AU_DagNode*, d)->argArray); } else if (!(nrIdentities > 0 && identity->equal(d))) flat.pushRight(d); } } (void) new (this) AU_DequeDagNode(symbol(), flat); Assert(!dumb, "shouldn't be here if we're in dumb mode"); MemoryCell::okToCollectGarbage(); // needed because of pathological nesting return DEQUED; } if (expansion == 0) { // // No flattening. // if (nrIdentities != 0) { // // But have to remove identities. // int p = 0; FOR_EACH_CONST(i, ArgVec, argArray) { DagNode* d = *i; if (!(identity->equal(d) && disappear(s, i))) argArray[p++] = d; } if (p < 2) { // // Eliminating identity causes AU dag node to collapse to its // remaining argument or 1st argument of all arguments were // identity. // DagNode* remaining = (s->getPermuteStrategy() == BinarySymbol::EAGER) ? argArray[0] : argArray[0]->copyReducible(); remaining->overwriteWithClone(this); return COLLAPSED; } argArray.contractTo(p); } return NORMAL; } // // We need to flatten. // int nrArgs = argArray.length(); if (nrIdentities == 0) { // // No identities: in place flattening. // argArray.expandBy(expansion); int p = nrArgs + expansion - 1; for (int i = nrArgs - 1; i >= 0; i--) { Assert(p >= i, "loop invarient failed"); DagNode* d = argArray[i]; if (d->symbol() == s) { ArgVec& argArray2 = safeCast(AU_DagNode*, d)->argArray; for (int j = argArray2.length() - 1; j >= 0; j--) argArray[p--] = argArray2[j]; } else argArray[p--] = argArray[i]; } Assert(p == -1, "bad argArray length"); } else { // // Identities: flatten into auxiliary buffer. // ArgVec buffer(nrArgs + expansion - nrIdentities); int p = 0; FOR_EACH_CONST(i, ArgVec, argArray) { DagNode* d = *i; if (d->symbol() == s) { ArgVec& argArray2 = safeCast(AU_DagNode*, d)->argArray; for (DagNode* e : argArray2) buffer[p++] = e; } else if (!(identity->equal(d) && disappear(s, i))) buffer[p++] = d; } Assert(p == nrArgs + expansion - nrIdentities, "bad buffer size"); argArray.swap(buffer); } // // If we're in dumb mode then there may be a lot of partially built // instantiated dags lying around that are vunerable to garbage collection. // if (!dumb) MemoryCell::okToCollectGarbage(); // needed because of pathological nesting // // This is the one place where deques can come into existence. // if (!dumb && s->useDeque()) { AU_Deque flat(argArray); (void) new (this) AU_DequeDagNode(symbol(), flat); return DEQUED; } return FLATTENED; } Maude-Maude3.2/src/AU_Theory/AU_RhsAutomaton.cc000066400000000000000000000056321420036611000213320ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class AU_RhsAutomaton. // // utility stuff #include "macros.hh" #include "vector.hh" #include "indent.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "AU_Theory.hh" // core class definitions #include "substitution.hh" #include "variableInfo.hh" // AU theory class definitions #include "AU_Symbol.hh" #include "AU_DagNode.hh" #include "AU_RhsAutomaton.hh" AU_RhsAutomaton::AU_RhsAutomaton(AU_Symbol* symbol, int nrArgs) : topSymbol(symbol), arguments(0, nrArgs) { } void AU_RhsAutomaton::remapIndices(VariableInfo& variableInfo) { destination = variableInfo.remapIndex(destination); int nrArgs = arguments.length(); for (int i = 0; i < nrArgs; i++) arguments[i] = variableInfo.remapIndex(arguments[i]); } local_inline void AU_RhsAutomaton::buildArguments(ArgVec& argArray, Substitution& matcher) const { Vector::const_iterator j = arguments.begin(); const Vector::const_iterator e = j + nrArguments; Assert(nrArguments > 0, "no args"); ArgVec::iterator i = argArray.begin(); do { *i = matcher.value(*j); ++i; ++j; } while (j != e); Assert(i == argArray.end(), "iterator inconsistent"); } DagNode* AU_RhsAutomaton::construct(Substitution& matcher) { AU_DagNode* n = new AU_DagNode(topSymbol, nrArguments); buildArguments(n->argArray, matcher); matcher.bind(destination, n); return n; } void AU_RhsAutomaton::replace(DagNode* old, Substitution& matcher) { buildArguments((new(old) AU_DagNode(topSymbol, nrArguments))->argArray, matcher); } #ifdef DUMP void AU_RhsAutomaton::dump(ostream& s, const VariableInfo& variableInfo, int indentLevel) { s << Indent(indentLevel) << "Begin{AU_RhsAutomaton}\n"; ++indentLevel; s << Indent(indentLevel) << "[" << destination << "] <= " << topSymbol << '('; int nrArgs = arguments.length(); for (int i = 0; i < nrArgs; i++) { s << '[' << arguments[i] << "]"; if (i + 1 < nrArgs) s << ", "; } s << ")\n"; s << Indent(indentLevel - 1) << "End{AU_RhsAutomaton}\n"; } #endif Maude-Maude3.2/src/AU_Theory/AU_RhsAutomaton.hh000066400000000000000000000035321420036611000213410ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for right hand side automata in the the A, AUl, AUr and AU theories. // #ifndef _AU_RhsAutomaton_hh_ #define _AU_RhsAutomaton_hh_ #include "rhsAutomaton.hh" class AU_RhsAutomaton : public RhsAutomaton { NO_COPYING(AU_RhsAutomaton); public: AU_RhsAutomaton(AU_Symbol* symbol, int nrArgs); void remapIndices(VariableInfo& variableInfo); DagNode* construct(Substitution& matcher); void replace(DagNode* old, Substitution& matcher); void addArgument(int index); void close(int destinationIndex); #ifdef DUMP void dump(ostream& s, const VariableInfo& variableInfo, int indentLevel); #endif private: void buildArguments(ArgVec& argArray, Substitution& matcher) const; AU_Symbol* const topSymbol; Vector arguments; int nrArguments; int destination; }; inline void AU_RhsAutomaton::addArgument(int index) { arguments.append(index); } inline void AU_RhsAutomaton::close(int destinationIndex) { destination = destinationIndex; nrArguments = arguments.size(); } #endif Maude-Maude3.2/src/AU_Theory/AU_Subproblem.cc000066400000000000000000000067241420036611000210230ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class AU_Subproblem. // // utility stuff #include "macros.hh" #include "vector.hh" #include "sequencePartition.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "AU_Theory.hh" // interface class definitions #include "symbol.hh" // core class definitions #include "rewritingContext.hh" #include "localBinding.hh" // AU theory class definitions #include "AU_Symbol.hh" #include "AU_DagNode.hh" #include "AU_ExtensionInfo.hh" #include "AU_Subproblem.hh" AU_Subproblem::AU_Subproblem(AU_DagNode* subject, int firstSubterm, int lastSubterm, int nrLayers, AU_ExtensionInfo* extensionInfo) : extensionInfo(extensionInfo), layers(nrLayers) { Assert(extensionInfo == 0 || (firstSubterm == 0 && lastSubterm == subject->argArray.length() - 1), "extension disagreement"); for (int i = 0; i < nrLayers; i++) layers[i].initialize(subject); layers[0].initializeFirst(firstSubterm, extensionInfo); layers[nrLayers - 1].initializeLast(lastSubterm, extensionInfo); } void AU_Subproblem::complete() { int nrPatternLayers = layers.length() - 1; // last layer has no patterns for (int i = 1; i < nrPatternLayers; i++) layers[i - 1].link(layers[i]); } bool AU_Subproblem::solve(bool findFirst, RewritingContext& solution) { if (!findFirst && solveVariables(false, solution)) return true; for (;;) { if (!solvePatterns(findFirst, solution)) return false; if (solveVariables(true, solution)) return true; findFirst = false; } } bool AU_Subproblem::solvePatterns(bool findFirst, RewritingContext& solution) { int nrPatternLayers = layers.length() - 1; // last layer has no patterns if (nrPatternLayers == 0) return findFirst; int i = findFirst ? 0 : nrPatternLayers - 1; if (findFirst) layers[0].reset(); for(;;) { findFirst = layers[i].solvePatterns(findFirst, solution, layers[i + 1]); if (findFirst) { if (++i == nrPatternLayers) break; } else { if (--i < 0) break; } } return findFirst; } bool AU_Subproblem::solveVariables(bool findFirst, RewritingContext& solution) { int nrVariableLayers = layers.length(); int i = findFirst ? 0 : nrVariableLayers - 1; for(;;) { findFirst = layers[i].solveVariables(findFirst, solution); if (findFirst) { if (++i == nrVariableLayers) { if (extensionInfo == 0 ||extensionInfo->bigEnough()) return true; --i; findFirst = false; } } else { if (--i < 0) break; } } return false; } Maude-Maude3.2/src/AU_Theory/AU_Subproblem.hh000066400000000000000000000045751420036611000210370ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for subproblems in the the A, AUl, AUr and AU theories. // They consist of a directed acyclic graph and a set of sequence // partitioning problems. // #ifndef _AU_Subproblem_hh_ #define _AU_Subproblem_hh_ #include "subproblem.hh" #include "AU_Layer.hh" class AU_Subproblem : public Subproblem { public: AU_Subproblem(AU_DagNode* subject, int firstSubterm, int lastSubterm, int nrBlockPairs, AU_ExtensionInfo* extensionInfo); bool solve(bool findFirst, RewritingContext& solution); void addTopVariable(int layerNr, int index, int lowerBound, int upperBound, Sort* sort); void addNode(int layerNr, LocalBinding* difference, Subproblem* subproblem, int firstSubterm, int lastSubterm); void complete(); private: bool solvePatterns(bool findFirst, RewritingContext& solution); bool solveVariables(bool findFirst, RewritingContext& solution); AU_ExtensionInfo* const extensionInfo; // extension information object to be filled in Vector layers; // layers of directed acyclic graph }; inline void AU_Subproblem::addTopVariable(int layerNr, int index, int lowerBound, int upperBound, Sort* sort) { layers[layerNr].addTopVariable(index, lowerBound, upperBound, sort); } inline void AU_Subproblem::addNode(int layerNr, LocalBinding* difference, Subproblem* subproblem, int firstSubterm, int lastSubterm) { layers[layerNr].addNode(difference, subproblem, firstSubterm, lastSubterm); } #endif Maude-Maude3.2/src/AU_Theory/AU_Symbol.cc000077500000000000000000000464421420036611000201620ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2021 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class AU_Symbol. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "variable.hh" #include "AU_Persistent.hh" #include "AU_Theory.hh" // core class definitions #include "hashConsSet.hh" #include "sortBdds.hh" // AU persistent class definitions #include "AU_DequeIter.hh" // AU theory class definitions #include "AU_Symbol.hh" #include "AU_DagNode.hh" #include "AU_DequeDagNode.hh" #include "AU_Term.hh" #include "AU_ExtensionInfo.hh" #include "AU_UnificationSubproblem2.hh" AU_Symbol::AU_Symbol(int id, const Vector& strategy, bool memoFlag, bool leftId, bool rightId, Term* identity) : AssociativeSymbol(id, strategy, memoFlag, identity), leftIdFlag(leftId), rightIdFlag(rightId), oneSidedIdFlag(leftId ^ rightId) { // // We only use the deque representaton for arguments if we // don't need to deal with the complexities of: // (1) a one sided identity // (2) a lazy or semi-eager strategy // (3) memoization // (4) rewriting at the top // // (1) is rare and (2) and (3) don't make sense without (4). // (4) can't be checked until the compileEquations() pass. // (4) might not be so rare but there is no fast deque based // matching algorithm that works with extension. // useDequeFlag = !oneSidedIdFlag && standardStrategy(); } void AU_Symbol::postOpDeclarationPass() { processIdentity(); if (leftIdFlag) leftIdentitySortCheck(); if (rightIdFlag) rightIdentitySortCheck(); } void AU_Symbol::compileEquations() { AssociativeSymbol::compileEquations(); if (!equationFree()) useDequeFlag = false; } DagNode* AU_Symbol::ruleRewrite(DagNode* subject, RewritingContext& context) { if (ruleFree()) return 0; AU_ExtensionInfo extensionInfo(getAU_DagNode(subject)); return applyRules(subject, context, &extensionInfo); } Term* AU_Symbol::makeTerm(const Vector& args) { return new AU_Term(this, args); } DagNode* AU_Symbol::makeDagNode(const Vector& args) { int nrArgs = args.length(); AU_DagNode* a = new AU_DagNode(this, nrArgs); copy(args.begin(), args.end(), a->argArray.begin()); return a; } bool AU_Symbol::rewriteAtTop(AU_DagNode* subject, RewritingContext& context) { // // We have a separate function for this to keep AU_ExtensionInfo // off of the eqRewrite() stack frame since recursion through // eqRewrite() can get very deep. // AU_ExtensionInfo extensionInfo(subject); return applyReplace(subject, context, &extensionInfo); } bool AU_Symbol::rewriteAtTopNoOwise(AU_DagNode* subject, RewritingContext& context) { // // Same idea as above. // AU_ExtensionInfo extensionInfo(subject); return applyReplaceNoOwise(subject, context, &extensionInfo); } bool AU_Symbol::eqRewrite(DagNode* subject, RewritingContext& context) { Assert(this == subject->symbol(), "bad symbol"); if (standardStrategy()) { if (safeCast(AU_BaseDagNode*, subject)->isDeque()) { Assert(equationFree(), "deque with equations"); return false; } else { AU_DagNode* s = safeCast(AU_DagNode*, subject); if (s->isFresh()) { // // Not safe to use iterator because reduce() can // call garbage collector which can relocate argArray. // int nrArgs = s->argArray.length(); for (int i = 0; i < nrArgs; i++) s->argArray[i]->reduce(context); // // We always need to renormalize at the top because // shared subterms may have rewritten. // if (s->normalizeAtTop() <= AU_DagNode::DEQUED) return false; // COLLAPSED or DEQUED } // // Even we were created by an assignment we could // be equation-free and not reduced because our true // sort was not known because of a membership axiom. // if (equationFree()) return false; #ifndef NO_ASSERT // // Look for Riesco 1/18/10 bug. // for (int i = 0; i < s->argArray.length(); i++) { DagNode* d = s->argArray[i]; Assert(d->getSortIndex() != Sort::SORT_UNKNOWN, "AU_Symbol::eqRewrite(): unknown sort for AU argument " << d << " at index " << i << " in subject " << subject << " s->getNormalizationStatus() = " << s->getNormalizationStatus()); } #endif return rewriteAtTop(s, context); } } return complexStrategy(safeCast(AU_DagNode*, subject), context); } bool AU_Symbol::complexStrategy(AU_DagNode* subject, RewritingContext& context) { if (isMemoized()) { MemoTable::SourceSet from; bool result = memoStrategy(from, subject, context); memoEnter(from, subject); // // We may need to return true in the case we collapse to // a unreduced subterm. // return result; } if (subject->isFresh()) { int nrArgs = subject->argArray.length(); for (int i = 0; i < nrArgs; i++) subject->argArray[i]->computeTrueSort(context); // // If we collapse to one of our subterms which has not been reduced // we pretend that we did a rewrite so that the reduction process // continues. // if (subject->normalizeAtTop() == AU_DagNode::COLLAPSED) return !(subject->isReduced()); } if (getPermuteStrategy() == LAZY) { if (rewriteAtTop(subject, context)) return true; return false; } // // Semi-eager case. // if (rewriteAtTopNoOwise(subject, context)) return true; copyAndReduceSubterms(subject, context); if (subject->normalizeAtTop() == AU_DagNode::COLLAPSED) return false; subject->repudiateSortInfo(); // rewriteAtTopNoOwise() might have left sort behind return rewriteAtTop(subject, context); } bool AU_Symbol::memoStrategy(MemoTable::SourceSet& from, DagNode* subject, RewritingContext& context) { AU_DagNode* s = safeCast(AU_DagNode*, subject); ArgVec& args = s->argArray; PermuteStrategy strat = getPermuteStrategy(); if (strat == EAGER) { if (s->isFresh()) { int nrArgs = args.length(); for (int i = 0; i < nrArgs; i++) args[i]->reduce(context); // // We always need to renormalize at the top because // shared subterms may have rewritten. // if (s->normalizeAtTop() == AU_DagNode::COLLAPSED) return false; } } else { if (s->isFresh()) { int nrArgs = args.length(); for (int i = 0; i < nrArgs; i++) args[i]->computeTrueSort(context); // // If we collapse to one of our subterms which has not been reduced // we pretend that we did a rewrite so that the reduction process // continues. // if (s->normalizeAtTop() == AU_DagNode::COLLAPSED) return !(s->isReduced()); // the only place we might return true } if (memoRewrite(from, subject, context)) return false; if (getPermuteStrategy() == LAZY) { if (rewriteAtTop(s, context)) subject->reduce(context); return false; } // // Semi-eager case. // if (rewriteAtTopNoOwise(s, context)) { subject->reduce(context); return false; } copyAndReduceSubterms(s, context); if (s->normalizeAtTop() == AU_DagNode::COLLAPSED) return false; s->repudiateSortInfo(); // rewriteAtTopNoOwise() might have left sort behind } if (!memoRewrite(from, subject, context) && rewriteAtTop(s, context)) subject->reduce(context); return false; } void AU_Symbol::copyAndReduceSubterms(AU_DagNode* subject, RewritingContext& context) { ArgVec& args = subject->argArray; int nrArgs = args.length(); for (int i = 0; i < nrArgs; i++) args[i] = args[i]->copyAndReduce(context); } void AU_Symbol::computeBaseSort(DagNode* subject) { Assert(this == subject->symbol(), "bad symbol"); if (safeCast(AU_BaseDagNode*, subject)->isDeque()) { subject->setSortIndex(safeCast(AU_DequeDagNode*, subject)-> getDeque().computeBaseSort(this)); return; } ArgVec& args = safeCast(AU_DagNode*, subject)->argArray; if (const Sort* uniSort = uniformSort()) { // // If symbol has a uniform sort structure do a fast sort computation. // if (!(uniSort->component()->errorFree())) { // // Check we're not in the error sort. // int lastIndex = Sort::SORT_UNKNOWN; for (DagNode* d : args) { int index = d->getSortIndex(); if (index != lastIndex) { if (!(leq(index, uniSort))) { subject->setSortIndex(Sort::ERROR_SORT); return; } lastIndex = index; } } } subject->setSortIndex(uniSort->index()); return; } // // Standard sort calculation. // int sortIndex = Sort::SORT_UNKNOWN; for (DagNode* d : args) { int t = d->getSortIndex(); Assert(t != Sort::SORT_UNKNOWN, "bad sort index"); sortIndex = (sortIndex == Sort::SORT_UNKNOWN) ? t : traverse(traverse(0, sortIndex), t); } subject->setSortIndex(sortIndex); } void AU_Symbol::normalizeAndComputeTrueSort(DagNode* subject, RewritingContext& context) { Assert(this == subject->symbol(), "bad symbol"); if (safeCast(AU_BaseDagNode*, subject)->isFresh()) { // // Make sure each subterm has its true sort. // AU_DagNode* s = safeCast(AU_DagNode*, subject); ArgVec& args = s->argArray; int nrArgs = args.length(); for (int i = 0; i < nrArgs; i++) args[i]->computeTrueSort(context); // // Put subject in normal form (could collapse to a subterm). // if (s->normalizeAtTop() == AU_DagNode::COLLAPSED) return; } // // Finally compute subjects true sort. // fastComputeTrueSort(subject, context); } int AU_Symbol::calculateNrSubjectsMatched(DagNode* d, bool leftEnd, // match starts at left extreme bool rightEnd, // match end at right extreme bool& nasty) { nasty = false; Term* identity = getIdentity(); if (d->symbol() == this) { if (safeCast(AU_BaseDagNode*, d)->isDeque()) return safeCast(AU_DequeDagNode*, d)->nrArgs(); ArgVec& args = safeCast(AU_DagNode*, d)->argArray; int nrArgs = args.length(); if (oneSidedIdFlag) { if (rightIdFlag) { if (identity->equal(args[0])) { if (leftEnd) nasty = true; else --nrArgs; // identity may not match anything } } else { if (identity->equal(args[nrArgs - 1])) { if (rightEnd) nasty = true; else --nrArgs; // identity may not match anything } } } return nrArgs; } if (identity != 0 && identity->equal(d)) { if (!(oneSidedIdFlag && (rightIdFlag ? leftEnd : rightEnd))) return 0; nasty = true; } return 1; } void AU_Symbol::stackArguments(DagNode* subject, Vector& stack, int parentIndex, bool respectFrozen, bool eagerContext) { if (respectFrozen && !(getFrozen().empty())) // under A, any frozen argument affects all return; bool eager = eagerContext && (getPermuteStrategy() == EAGER); if (safeCast(AU_BaseDagNode*, subject)->isDeque()) { // // Deque case. // //Assert(getPermuteStrategy() == EAGER, "non eager strategy with deque"); int j = 0; for (AU_DequeIter i(safeCast(AU_DequeDagNode*, subject)->getDeque()); i.valid(); i.next(), ++j) { DagNode* d = i.getDagNode(); if (!(d->isUnstackable())) stack.append(RedexPosition(d, parentIndex, j, eager)); } } else { // // ArgVec case. // ArgVec& args = safeCast(AU_DagNode*, subject)->argArray; int nrArgs = args.length(); for (int i = 0; i < nrArgs; i++) { DagNode* d = args[i]; if (!(d->isUnstackable())) stack.append(RedexPosition(d, parentIndex, i, eager)); } } } Term* AU_Symbol::termify(DagNode* dagNode) { Vector arguments; if (safeCast(AU_BaseDagNode*, dagNode)->isDeque()) { const AU_Deque& deque = safeCast(const AU_DequeDagNode*, dagNode)->getDeque(); for (AU_DequeIter i(deque); i.valid(); i.next()) { DagNode* a = i.getDagNode(); arguments.append(a->symbol()->termify(a)); } } else { const ArgVec& argArray = safeCast(const AU_DagNode*, dagNode)->argArray; for (DagNode* a : argArray) arguments.append(a->symbol()->termify(a)); } return new AU_Term(this, arguments); } // // Unification code. // void AU_Symbol::computeGeneralizedSort(const SortBdds& sortBdds, const Vector& realToBdd, DagNode* subject, Vector& generalizedSort) { Assert(safeCast(AU_BaseDagNode*, subject)->isDeque() == false, "Deque case not implemented: " << subject << " " << static_cast(dynamic_cast(subject)) << " " << static_cast(dynamic_cast(subject))); const Vector& sortFunction = sortBdds.getSortFunction(this); int nrBdds = sortFunction.size(); // number of bits/bdds to represent kind ArgVec& args = safeCast(AU_DagNode*, subject)->argArray; bool firstArg = true; bddPair* argMap = bdd_newpair(); for (DagNode* d : args) { // // Get generalized sort of argument. // Vector argGenSort; d->computeGeneralizedSort(sortBdds, realToBdd, argGenSort); Assert((int) argGenSort.size() == nrBdds, "nrBdds clash"); if (firstArg) { firstArg = false; generalizedSort = argGenSort; // deep copy } else { // // Map input variables to BDDs for current generalized sort, and generalized sort of argument. // for (int j = 0; j < nrBdds; ++j) { bdd_setbddpair(argMap, j, generalizedSort[j]); bdd_setbddpair(argMap, nrBdds + j, argGenSort[j]); } // // Use the sort function to compute a new generalized sort. // for (int j = 0; j < nrBdds; ++j) generalizedSort[j] = bdd_veccompose(sortFunction[j], argMap); } } bdd_freepair(argMap); } // experimental code void AU_Symbol::computeGeneralizedSort2(const SortBdds& sortBdds, const Vector& realToBdd, DagNode* subject, Vector& outputBdds) { Assert(safeCast(AU_BaseDagNode*, subject)->isDeque() == false, "Deque case not implemented: " << subject << " " << static_cast(dynamic_cast(subject)) << " " << static_cast(dynamic_cast(subject))); Vector inputBdds; // assemble input to our sort function Vector middleBdds; // put our output here if we're not finished ArgVec& args = safeCast(AU_DagNode*, subject)->argArray; int lastArg = args.length() - 1; for (int i = 0;; i++) { // // Generalized sort of ith argument. // args[i]->computeGeneralizedSort2(sortBdds, realToBdd, inputBdds); if (i == lastArg) { // // Final application of our sort function with result // directly appended to outputBdds. // sortBdds.operatorCompose(this, inputBdds, outputBdds); break; } else if (i > 0) { // // Middle case - write result to middleBdds. // middleBdds.clear(); sortBdds.operatorCompose(this, inputBdds, middleBdds); // // middleBdds become first part of inputBdds. // inputBdds.swap(middleBdds); } } } bool AU_Symbol::canResolveTheoryClash() { // // We don't put this in parent class because returning true has // the obligation to handle clashing in our unification subproblems. // return getIdentity() != 0; } UnificationSubproblem* AU_Symbol::makeUnificationSubproblem() { if (getIdentity() != 0) { // // Because AU_UnificationSubproblem2 may introduce the // identity element we make sure it had its sort computed // and its ground flag set. // DagNode* id = getIdentityDag(); if (!(id->isGround())) id->computeBaseSortForGroundSubterms(false); } return new AU_UnificationSubproblem2(this); } // // Hash cons code. // DagNode* AU_Symbol::makeCanonical(DagNode* original, HashConsSet* hcs) { if (safeCast(AU_BaseDagNode*, original)->isDeque()) { // // Never use deque form as canonical. // const AU_DequeDagNode* d = safeCast(const AU_DequeDagNode*, original); const AU_Deque& deque = d->getDeque(); AU_DagNode* n = new AU_DagNode(this, deque.length()); n->copySetRewritingFlags(original); n->setSortIndex(original->getSortIndex()); ArgVec::iterator j = n->argArray.begin(); for (AU_DequeIter i(deque); i.valid(); i.next(), ++j) *j = hcs->getCanonical(hcs->insert(i.getDagNode())); n->setProducedByAssignment(); // deque form must be theory normal return n; } const AU_DagNode* d = safeCast(const AU_DagNode*, original); int nrArgs = d->argArray.size(); for (int i = 0; i < nrArgs; i++) { DagNode* b = d->argArray[i]; DagNode* c = hcs->getCanonical(hcs->insert(b)); if (c != b) { // // Detected a non-canonical argument so need to make a new node. // AU_DagNode* n = new AU_DagNode(this, nrArgs); n->copySetRewritingFlags(original); n->setSortIndex(original->getSortIndex()); for (int j = 0; j < i; ++j) n->argArray[j] = d->argArray[j]; n->argArray[i] = c; for (++i; i < nrArgs; i++) n->argArray[i] = hcs->getCanonical(hcs->insert(d->argArray[i])); n->setProducedByAssignment(); // only theory normal dags will be hash cons'd return n; } } return original; // can use the original dag node as the canonical version } DagNode* AU_Symbol::makeCanonicalCopy(DagNode* original, HashConsSet* hcs) { // // We have a unreduced node - copy forced. // if (safeCast(AU_BaseDagNode*, original)->isDeque()) { // // Never use deque form as canonical for unreduced. // const AU_DequeDagNode* d = safeCast(const AU_DequeDagNode*, original); const AU_Deque& deque = d->getDeque(); AU_DagNode* n = new AU_DagNode(this, deque.length()); n->copySetRewritingFlags(original); n->setSortIndex(original->getSortIndex()); ArgVec::iterator j = n->argArray.begin(); for (AU_DequeIter i(deque); i.valid(); i.next(), ++j) *j = hcs->getCanonical(hcs->insert(i.getDagNode())); n->setProducedByAssignment(); // deque form must be theory normal return n; } const AU_DagNode* d = safeCast(const AU_DagNode*, original); int nrArgs = d->argArray.size(); AU_DagNode* n = new AU_DagNode(this, nrArgs); n->copySetRewritingFlags(original); n->setSortIndex(original->getSortIndex()); for (int i = 0; i < nrArgs; i++) n->argArray[i] = hcs->getCanonical(hcs->insert(d->argArray[i])); n->setProducedByAssignment(); // only theory normal dags will be hash cons'd return n; } Maude-Maude3.2/src/AU_Theory/AU_Symbol.hh000066400000000000000000000075131420036611000201650ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for symbols belonging to the A, AUl, AUr and AU theories. // #ifndef _AU_Symbol_hh_ #define _AU_Symbol_hh_ #include "associativeSymbol.hh" class AU_Symbol : public AssociativeSymbol { public: AU_Symbol(int id, const Vector& strategy, bool memoFlag, bool leftId = false, bool rightId = false, Term* identity = 0); // // Member functions required by theory interface. // Term* makeTerm(const Vector& args); DagNode* makeDagNode(const Vector& args); void computeBaseSort(DagNode* subject); void normalizeAndComputeTrueSort(DagNode* subject, RewritingContext& context); bool eqRewrite(DagNode* subject, RewritingContext& context); DagNode* ruleRewrite(DagNode* subject, RewritingContext& context); void stackArguments(DagNode* subject, Vector& stack, int parentIndex, bool respectFrozen, bool eagerContext); Term* termify(DagNode* dagNode); // // Member functions overiding default handling. // void postOpDeclarationPass(); void compileEquations(); // // Member functions particular to AU_Symbol. // bool leftId() const; bool rightId() const; bool oneSidedId() const; bool useDeque() const; int calculateNrSubjectsMatched(DagNode* d, bool leftEnd, // match starts at left extreme bool rightEnd, // match end at right extreme bool& nasty); // // Unification stuff (A only). // void computeGeneralizedSort(const SortBdds& sortBdds, const Vector& realToBdd, DagNode* subject, Vector& generalizedSort); void computeGeneralizedSort2(const SortBdds& sortBdds, const Vector& realToBdd, DagNode* subject, Vector& outputBdds); UnificationSubproblem* makeUnificationSubproblem(); // int unificationPriority() const; // happy with default for the moment bool canResolveTheoryClash(); // // Hash cons stuff. // DagNode* makeCanonical(DagNode* original, HashConsSet* hcs); DagNode* makeCanonicalCopy(DagNode* original, HashConsSet* hcs); private: bool rewriteAtTop(AU_DagNode* subject, RewritingContext& context); bool rewriteAtTopNoOwise(AU_DagNode* subject, RewritingContext& context); bool complexStrategy(AU_DagNode* subject, RewritingContext& context); bool memoStrategy(MemoTable::SourceSet& from, DagNode* subject, RewritingContext& context); void copyAndReduceSubterms(AU_DagNode* subject, RewritingContext& context); const Bool leftIdFlag; const Bool rightIdFlag; const Bool oneSidedIdFlag; // // Deque represention of arguments can be used if there is no // one-sided identity, no fancy strategy and there are no equations // at the top. // Bool useDequeFlag; }; inline bool AU_Symbol::leftId() const { return leftIdFlag; } inline bool AU_Symbol::rightId() const { return rightIdFlag; } inline bool AU_Symbol::oneSidedId() const { return oneSidedIdFlag; } inline bool AU_Symbol::useDeque() const { return useDequeFlag; } #endif Maude-Maude3.2/src/AU_Theory/AU_Term.cc000066400000000000000000000335401420036611000176140ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2021 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class AU_Term. // // utility stuff #include "macros.hh" #include "vector.hh" #include "indent.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "variable.hh" #include "AU_Persistent.hh" #include "AU_Theory.hh" // core class definitions #include "variableTerm.hh" #include "rewritingContext.hh" #include "equation.hh" #include "symbolMap.hh" #include "termBag.hh" #include "rhsBuilder.hh" // variable class definitions #include "variableTerm.hh" // AU persistent class definitions #include "AU_DequeIter.hh" // AU theory class definitions #include "AU_Symbol.hh" #include "AU_DagNode.hh" #include "AU_DequeDagNode.hh" #include "AU_Term.hh" #include "AU_ArgumentIterator.hh" #include "AU_LhsAutomaton.hh" #include "AU_RhsAutomaton.hh" // our stuff #include "AU_LhsCompiler.cc" AU_Term::AU_Term(AU_Symbol* symbol, const Vector& arguments) : Term(symbol), argArray(arguments.length()) { int nrArgs = arguments.length(); Assert(nrArgs >= 2, "insufficient arguments"); for (int i = 0; i < nrArgs; i++) argArray[i].term = arguments[i]; } AU_Term::AU_Term(const AU_Term& original, AU_Symbol* symbol, SymbolMap* translator) : Term(symbol), argArray(original.argArray.length()) { int nrArgs = original.argArray.length(); for (int i = 0; i < nrArgs; i++) argArray[i].term = original.argArray[i].term->deepCopy(translator); } RawArgumentIterator* AU_Term::arguments() { return new AU_ArgumentIterator(argArray); } void AU_Term::deepSelfDestruct() { for (const Tuple& t : argArray) t.term->deepSelfDestruct(); delete this; } Term* AU_Term::deepCopy2(SymbolMap* translator) const { AU_Symbol* s = symbol(); if (translator != 0) { Symbol* s2 = translator->translate(s); if (s2 == 0) { int nrArgs = argArray.length(); if (nrArgs == 2) return translator->translateTerm(this); // // Tricky situtation - we have to use translateTerm() since // we are translating to a term but we have more than 2 // 2 arguments. We resolve it by creating a temporary // expanded term. // Vector args(2); args[0] = argArray[0].term; for (int i = 1; i < nrArgs; ++i) { args[1] = argArray[i].term; args[0] = new AU_Term(s, args); } Term* t = args[0]; Term* r = translator->translateTerm(t); for (int i = 1; i < nrArgs; ++i) { Term* n = safeCast(AU_Term*, t)->argArray[0].term; delete t; t = n; } return r; } s = dynamic_cast(s2); if (s == 0) { // // Another tricky situation - we are translating to a non-AU_Symbol. // Vector args(2); args[0] = argArray[0].term->deepCopy(translator); int nrArgs = argArray.length(); for (int i = 1; i < nrArgs; ++i) { args[1] = argArray[i].term->deepCopy(translator); args[0] = s2->makeTerm(args); } return args[0]; } } return new AU_Term(*this, s, translator); } Term* AU_Term::normalize(bool full, bool& changed) { changed = false; AU_Symbol* s = symbol(); int nrArgs = argArray.length(); // // Pass 1: normalize arguments and calculate number of extra arguments that // will result from flattening. // int expansion = 0; for (int i = 0; i < nrArgs; i++) { bool subtermChanged; Term* t = argArray[i].term->normalize(full, subtermChanged); if (subtermChanged) changed = true; argArray[i].term = t; if (full && t->symbol() == s) expansion += safeCast(AU_Term*, t)->argArray.length() - 1; } // // Pass 2: flatten at the top. // if (expansion > 0) { changed = true; argArray.expandBy(expansion); int p = nrArgs + expansion - 1; for (int i = nrArgs - 1; i >= 0; i--) { Assert(p >= i, "loop invariant broken"); Term* t = argArray[i].term; if (t->symbol() == s) { Vector& argArray2 = safeCast(AU_Term*, t)->argArray; for (int j = argArray2.length() - 1; j >= 0; j--) argArray[p--].term = argArray2[j].term; delete t; } else argArray[p--].term = t; } nrArgs += expansion; } // // Pass 3: remove identity elements. // Term* identity = s->getIdentity(); if (identity != 0) { Term* savedId = 0; int p = 0; for (int i = 0; i < nrArgs; i++) { Term* t = argArray[i].term; if (identity->equal(t) && idPossible(i)) { if (savedId == 0) savedId = t; else t->deepSelfDestruct(); changed = true; continue; } argArray[p].term = t; ++p; } if (p == 0) { // // All arguments were identity elements so we collapse to the saved one. // delete this; return savedId; } if (savedId != 0) savedId->deepSelfDestruct(); // don't need it if (p == 1) { // // Only one non-identity argument left so collapse to it. // Term* t = argArray[0].term; delete this; return t; } argArray.contractTo(p); nrArgs = p; } // // Pass 4: compute hash value. // unsigned int hashValue = s->getHashValue(); for (const Tuple& t : argArray) hashValue = hash(hashValue, t.term->getHashValue()); setHashValue(hashValue); return this; } int AU_Term::compareArguments(const Term* other) const { const Vector& argArray2 = safeCast(const AU_Term*, other)->argArray; int r = argArray.length() - argArray2.length(); if (r != 0) return r; Vector::const_iterator j = argArray2.begin(); Vector::const_iterator i = argArray.begin(); const Vector::const_iterator e = argArray.end(); do { r = i->term->compare(j->term); if (r != 0) return r; ++j; ++i; } while (i != e); Assert(j == argArray2.end(), "iterator problem"); return 0; } int AU_Term::compareArguments(const DagNode* other) const { int len = argArray.length(); if (safeCast(const AU_BaseDagNode*, other)->isDeque()) { const AU_DequeDagNode* d2 = safeCast(const AU_DequeDagNode*, other); int r = len - d2->nrArgs(); if (r != 0) return r; AU_DequeIter j(d2->getDeque()); Vector::const_iterator i = argArray.begin(); const Vector::const_iterator e = argArray.end(); do { r = i->term->compare(j.getDagNode()); if (r != 0) return r; j.next(); ++i; } while (i != e); Assert(!j.valid(), "iterator problem"); } else { const ArgVec& argArray2 = safeCast(const AU_DagNode*, other)->argArray; int r = len - argArray2.length(); if (r != 0) return r; ArgVec::const_iterator j = argArray2.begin(); Vector::const_iterator i = argArray.begin(); const Vector::const_iterator e = argArray.end(); do { r = i->term->compare(*j); if (r != 0) return r; ++j; ++i; } while (i != e); Assert(j == argArray2.end(), "iterator problem"); } return 0; } void AU_Term::findEagerVariables(bool atTop, NatSet& eagerVariables) const { BinarySymbol::PermuteStrategy strat = symbol()->getPermuteStrategy(); if (strat == BinarySymbol::EAGER || (strat == BinarySymbol::SEMI_EAGER && !atTop)) { for (const Tuple& t : argArray) t.term->findEagerVariables(false, eagerVariables); } } void AU_Term::markEagerArguments(int nrVariables, const NatSet& eagerVariables, Vector& problemVariables) { if (symbol()->getPermuteStrategy() == BinarySymbol::EAGER) { for (const Tuple& t : argArray) t.term->markEager(nrVariables, eagerVariables, problemVariables); } } DagNode* AU_Term::dagify2() { int nrArgs = argArray.length(); AU_DagNode* d = new AU_DagNode(symbol(), nrArgs); ArgVec& p = d->argArray; for (int i = 0; i < nrArgs; i++) p[i] = argArray[i].term->dagify(); return d; } void AU_Term::analyseCollapses2() { // // (1) Analyse our subterms. // for (const Tuple& t : argArray) t.term->analyseCollapses(); // // (2) Does our top symbol have an identity? // uniqueCollapseSubtermIndex = NONE; AU_Symbol* s = symbol(); if (s->getIdentity() == 0) return; // if no identity element then we can't collapse // // (3) Can we collapse? // int nrArgs = argArray.length(); int firstNonIdArg = NONE; for (int i = 0; i < nrArgs; i++) { Term* t = argArray[i].term; if (idPossible(i) && s->mightMatchOurIdentity(t)) continue; if (firstNonIdArg != NONE) return; // can't collapse firstNonIdArg = i; } // // (4) If so, what to? // if (firstNonIdArg != NONE) { // // Can only collapse to firstNonIdArg. // uniqueCollapseSubtermIndex = firstNonIdArg; addCollapseSymbol(argArray[firstNonIdArg].term->symbol()); addCollapseSymbols(argArray[firstNonIdArg].term->collapseSymbols()); } else { // // Can collapse to any of our arguments. // for (const Tuple& i : argArray) { Term* t = i.term; addCollapseSymbol(t->symbol()); addCollapseSymbols(t->collapseSymbols()); } } } void AU_Term::insertAbstractionVariables(VariableInfo& variableInfo) { AU_Symbol* s = symbol(); bool honorsGroundOutMatch = true; int nrArgs = argArray.length(); for (int i = 0; i < nrArgs; i++) { Tuple& t = argArray[i]; t.term->insertAbstractionVariables(variableInfo); if (!(t.term->honorsGroundOutMatch())) honorsGroundOutMatch = false; t.abstractionVariableIndex = NONE; t.collapseToOurSymbol = false; t.matchOurIdentity = false; if (dynamic_cast(t.term) == 0) { // // We don't bother checking wether we have a left identity // or a right identity because we may end up matching with // extension. // t.matchOurIdentity = s->mightMatchOurIdentity(t.term); t.collapseToOurSymbol = s->mightCollapseToOurSymbol(t.term); if (t.matchOurIdentity || t.collapseToOurSymbol) { t.abstractionVariableIndex = variableInfo.makeProtectedVariable(); honorsGroundOutMatch = false; DebugAdvisory("Introduced abstraction variable for " << t.term << " in " << this << '.'); } } } setHonorsGroundOutMatch(honorsGroundOutMatch); } void AU_Term::findAvailableTerms(TermBag& availableTerms, bool eagerContext, bool atTop) { if (ground()) return; if (!atTop) availableTerms.insertMatchedTerm(this, eagerContext); BinarySymbol::PermuteStrategy strat = symbol()->getPermuteStrategy(); bool argEager = eagerContext && (strat == BinarySymbol::EAGER || (strat == BinarySymbol::SEMI_EAGER && !atTop)); for (const Tuple& t : argArray) t.term->findAvailableTerms(availableTerms, argEager); } int AU_Term::compileRhs2(RhsBuilder& rhsBuilder, VariableInfo& variableInfo, TermBag& availableTerms, bool eagerContext) { int nrArgs = argArray.length(); // // We want to minimize conflict between slots to avoid quadratic number of // conflict arcs on giant right hand sides. The heuristic we use is crude: // we sort in order of arguments by number of symbol occurences, and build // largest first. // typedef pair IntPair; typedef Vector PairVec; PairVec order(nrArgs); for (int i = 0; i < nrArgs; i++) { order[i].first = - argArray[i].term->computeSize(); // larger terms to the front order[i].second = i; } sort(order.begin(), order.end()); // // Compile each argument in largest first order. // bool argEager = eagerContext && symbol()->getPermuteStrategy() == BinarySymbol::EAGER; Vector sources(nrArgs); for (const IntPair& p : order) { int j = p.second; sources[j] = argArray[j].term->compileRhs(rhsBuilder, variableInfo, availableTerms, argEager); } // // Now add sources to automaton in original order, and flag last use // of each source for conflict arc generation. // AU_RhsAutomaton* automaton = new AU_RhsAutomaton(symbol(), nrArgs); for (int i = 0; i < nrArgs; i++) { int index = sources[i]; automaton->addArgument(index); variableInfo.useIndex(index); } // // Complete the automaton and add it to the rhs builder. // int destination = variableInfo.makeConstructionIndex(); automaton->close(destination); rhsBuilder.addRhsAutomaton(automaton); return destination; } #ifdef DUMP void AU_Term::dump(ostream& s, const VariableInfo& variableInfo, int indentLevel) { s << Indent(indentLevel) << "Begin{AU_Term}\n"; ++indentLevel; dumpCommon(s, variableInfo, indentLevel); s << Indent(indentLevel) << "arguments:\n"; ++indentLevel; for (const Tuple& p : argArray) { s << Indent(indentLevel) << "collapseToOurSymbol = " << bool(p.collapseToOurSymbol) << "\tmatchOurIdentity = " << bool(p.matchOurIdentity); if (p.abstractionVariableIndex != NONE) s << "\tabstractionVariableIndex = " << p.abstractionVariableIndex; s << '\n'; p.term->dump(s, variableInfo, indentLevel); } s << Indent(indentLevel - 2) << "End{AU_Term}\n"; } #endif Maude-Maude3.2/src/AU_Theory/AU_Term.hh000066400000000000000000000072561420036611000176330ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for terms in the A, AUl, AUr and AU theories. // #ifndef _AU_Term_hh_ #define _AU_Term_hh_ #include "term.hh" #include "variable.hh" #include "AU_Symbol.hh" class AU_Term : public Term { NO_COPYING(AU_Term); public: AU_Term(AU_Symbol* symbol, const Vector& arguments); // // Functions required by theory interface. // RawArgumentIterator* arguments(); void deepSelfDestruct(); Term* deepCopy2(SymbolMap* translator) const; Term* normalize(bool full, bool& changed); int compareArguments(const Term* other) const; int compareArguments(const DagNode* other) const; void findEagerVariables(bool atTop, NatSet& eagerVariables) const; void analyseConstraintPropagation(NatSet& boundUniquely) const; void analyseCollapses2(); void insertAbstractionVariables(VariableInfo& variableInfo); LhsAutomaton* compileLhs2(bool matchAtTop, const VariableInfo& variableInfo, NatSet& boundUniquely, bool& subproblemLikely); void markEagerArguments(int nrVariables, const NatSet& eagerVariables, Vector& problemVariables); DagNode* dagify2(); void findAvailableTerms(TermBag& availableTerms, bool eagerContext, bool atTop); int compileRhs2(RhsBuilder& rhsBuilder, VariableInfo& variableInfo, TermBag& availableTerms, bool eagerContext); #ifdef DUMP void dump(ostream& s, const VariableInfo& variableInfo, int indentLevel); #endif // // Functions particular to AU_Term. // AU_Symbol* symbol() const; bool idPossible(int index) const; private: struct Tuple { Term* term; short abstractionVariableIndex; // if subterm could enter our theory // we abstract it Bool collapseToOurSymbol; // 1st possible reason for variable abstraction Bool matchOurIdentity; // 2nd possible reason for variable abstraction }; struct CP_Sequence; AU_Term(const AU_Term& original, AU_Symbol* symbol, SymbolMap* translator); bool unitVariable(VariableTerm* vt, int index) const; void findConstraintPropagationSequence(const NatSet& boundUniquely, CP_Sequence& bestSequence) const; void findConstraintPropagationSequence(const Vector& currentSequence, const NatSet& boundUniquely, int leftPos, int rightPos, CP_Sequence& bestSequence) const; void addFixedLengthBlock(AU_LhsAutomaton* a, int blockStart, int blockEnd, const VariableInfo& variableInfo, const NatSet& boundUniquely, bool& subproblemLikely); Vector argArray; int uniqueCollapseSubtermIndex; friend class AU_ArgumentIterator; }; inline AU_Symbol* AU_Term::symbol() const { return safeCast(AU_Symbol*, Term::symbol()); } inline bool AU_Term::idPossible(int index) const { return (index > 0 && symbol()->rightId()) || (index < argArray.length() - 1 && symbol()->leftId()); } #endif Maude-Maude3.2/src/AU_Theory/AU_Theory.hh000066400000000000000000000024121420036611000201630ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Forward declarations for AU theory classes. // #ifndef _AU_Theory_hh_ #define _AU_Theory_hh_ class AU_Symbol; class AU_Term; class AU_ArgumentIterator; class AU_BaseDagNode; class AU_DagNode; class AU_DequeDagNode; class AU_DagArgumentIterator; class AU_DequeDagArgumentIterator; class AU_LhsAutomaton; class AU_RhsAutomaton; class AU_Layer; class AU_Subproblem; class AU_ExtensionInfo; class AU_UnificationSubproblem; #endif Maude-Maude3.2/src/AU_Theory/AU_UnificationSubproblem2.cc000077500000000000000000000440741420036611000233010ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2021 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class ACU_UnificationSubproblem2. // // utility stuff #include "macros.hh" #include "vector.hh" #include "indent.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "variable.hh" #include "AU_Persistent.hh" #include "AU_Theory.hh" // interface class definitions #include "argVec.hh" #include "associativeSymbol.hh" #include "dagNode.hh" #include "subproblem.hh" // core class definitions #include "variableInfo.hh" #include "unificationContext.hh" #include "localBinding.hh" // variable class definitions #include "variableSymbol.hh" #include "variableDagNode.hh" // AU theory class definitions #include "AU_Symbol.hh" #include "AU_DagNode.hh" #include "AU_UnificationSubproblem2.hh" AU_UnificationSubproblem2::AU_UnificationSubproblem2(AU_Symbol* topSymbol) : topSymbol(topSymbol), preSolveSubstitution(0), savedSubstitution(0) { wordSystem = 0; } AU_UnificationSubproblem2::~AU_UnificationSubproblem2() { delete wordSystem; } void AU_UnificationSubproblem2::markReachableNodes() { // // Protect dags in preSolveSubstitution. // int nrFragile = preSolveSubstitution.nrFragileBindings(); for (int i = 0; i < nrFragile; i++) { DagNode* d = preSolveSubstitution.value(i); if (d != 0) d->mark(); } // // No need to mark savedSubstitution since its dags are a subset of those in // preSolveSubstitution; we get from preSolveSubstitution to savedSubstitution by // unsolving bindings. // } void AU_UnificationSubproblem2::addUnification(DagNode* lhs, DagNode* rhs, bool marked, UnificationContext& solution) { DebugEnter(lhs << " =? " << rhs << " marked = " << marked); Assert(lhs->symbol() == topSymbol, "bad lhs dag " << lhs); Assert(topSymbol->hasIdentity() || rhs->symbol() == topSymbol || dynamic_cast(rhs) != 0, "bad rhs for for non-collapse theory " << rhs); Assert(topSymbol->hasIdentity() || !marked, "bad mark for non-collapse theory"); // // Store unification problem as an abstract equation or assignment. // WordSystem::Word lhsAbstract; assocToAbstract(lhs, lhsAbstract, solution); if (rhs->symbol() == topSymbol) { WordSystem::Word rhsAbstract; assocToAbstract(rhs, rhsAbstract, solution); if (lhsAbstract.empty()) { if (rhsAbstract.empty()) ; // ignore unification else nullEquations.push_back(rhsAbstract); } else { if (rhsAbstract.empty()) nullEquations.push_back(lhsAbstract); else { unifications.push_back(Unification()); Unification& u = unifications.back(); u.lhs.swap(lhsAbstract); u.rhs.swap(rhsAbstract); } } } else { Term* identity = topSymbol->getIdentity(); int rhsIndex = (identity != 0 && identity->equal(rhs)) ? NONE : dagToAbstract(rhs, solution); if (lhsAbstract.empty()) { if (rhsIndex == NONE) ; // ignore unification of identity with identity else { // // We don't bother recording rhsIndex as marked because it's // going to be forced to identity, so the issue of it taking // more than one lhs subterm is moot. // WordSystem::Word rhsAbstract(1); rhsAbstract[0] = rhsIndex; nullEquations.push_back(rhsAbstract); } } else { if (rhsIndex == NONE) nullEquations.push_back(lhsAbstract); else { assignments.push_back(Assignment()); Assignment& a = assignments.back(); a.variable = rhsIndex; a.value.swap(lhsAbstract); if (marked) markedSubterms.insert(rhsIndex); } } } } int AU_UnificationSubproblem2::dagToAbstract(DagNode* dagNode, UnificationContext& solution) { // // First we replace a variable with its current representative. Really we should also // do this for variables within aliens as well. // // It is very tempting to replace variables by what they are bound to, but // this fails. If we have a binding X |-> f(...) then the f-theory has already // been solved. Thowing f(...) back into the mix means we will need to solve // it again, and if there is a cycle between two or more theories that are // doing eager replacement we won't terminate. Such cycles need to be handled // by the cycle breaking code after the solved form has been computed. // // Of course new f-theory terms could be exposed by delayering, resulting in // the f-theory being solved again, but because terms have finite depth this // can only happen a finite number of times. // if (VariableDagNode* varDagNode = dynamic_cast(dagNode)) { varDagNode = varDagNode->lastVariableInChain(solution); // // Normally we don't care about variables bound into our theory since they // will be unsolved as part of the A/AU unification procedure to ensure // termination. The exception is variables bound to our identity. // if (Term* identity = topSymbol->getIdentity()) { if (DagNode* subject = solution.value(varDagNode->getIndex())) { if (identity->equal(subject)) return NONE; // identity elements are just eliminated } } // // Otherwise we work with the representative variable. // dagNode = varDagNode; } // // Now look for dag in list of nominally abstracted dags. // int nrSubterms = subterms.size(); for (int i = 0; i < nrSubterms; ++i) { if (dagNode->equal(subterms[i])) return i; } // // Not found so make a new entry. // subterms.append(dagNode); return nrSubterms; } void AU_UnificationSubproblem2::assocToAbstract(DagNode* dagNode, WordSystem::Word& word, UnificationContext& solution) { AU_DagNode* a = safeCast(AU_DagNode*, dagNode); int nrArgs = a->argArray.length(); for (int i = 0; i < nrArgs; ++i) { int index = dagToAbstract(a->argArray[i], solution); if (index != NONE) word.append(index); } } void AU_UnificationSubproblem2::makeWordSystem(UnificationContext& solution) { int nrVariables = subterms.size(); int nrEquations = unifications.size(); // // If we have an identity and the sort structure is such that // it won't prevent fresh variables from taking identity or fail // solutions that include extra variables that could take identity // we can attempt to reduce the number of redundant unifiers found. // bool identityOptimizations = topSymbol->hasIdentity() && !(topSymbol->hasUnequalLeftIdentityCollapse()) && !(topSymbol->hasUnequalRightIdentityCollapse()); wordSystem = new WordSystem(nrVariables, nrEquations, identityOptimizations); // // Insert constraints for: // * variables with a sort derived upper-bound // * variables abstracting stable aliens // * variables bound to stable aliens // // The satisfaction of these constraints avoids some trivial // failures do to order-sorted considerations or theory // clashes that would otherwise be discovered later. // Term* identity = topSymbol->getIdentity(); for (int i = 0; i < nrVariables; ++i) { DagNode* dagNode = subterms[i]; //cout << "dealing with subterm " << dagNode << endl; if (VariableDagNode* varDagNode = dynamic_cast(dagNode)) { DagNode* value = solution.value(varDagNode->getIndex()); if (value != 0) { // // Variable is bound; see if it bound to a ground alien. // Symbol* symbol = value->symbol(); if (value->isGround()) { // FIXME: in one-side identity case, we could have the identity // itself as a ground alien; need to decide how we pass // uncanceled identity elements into WordSystem wordSystem->setTheoryConstraint(i, symbol->getIndexWithinModule()); continue; } // // Otherwise see if it bound to a stable alien. // if (symbol->isStable()) { wordSystem->setTheoryConstraint(i, symbol->getIndexWithinModule()); if (identity != 0 && symbol == identity->symbol()) { // // We are bound to a stable alien that has the same // top symbol as our identity. We need to check // the sort of the variable. // VariableSymbol* variableSymbol = safeCast(VariableSymbol*, varDagNode->symbol()); Sort* variableSort = variableSymbol->getSort(); if (topSymbol->takeIdentity(variableSort)) wordSystem->setTakeEmpty(i); } continue; } // fall into unbound variable case } // // See if the variable has an upper-bound on the number // of subterms under our symbol that it can take, derived // from its sort. The classic case is a variable of an // element sort that cannot take our symbol. // VariableSymbol* variableSymbol = safeCast(VariableSymbol*, varDagNode->symbol()); Sort* variableSort = variableSymbol->getSort(); if (markedSubterms.contains(i)) wordSystem->setUpperBound(i, 1); // must collapse to avoid nontermination else { int variableSortBound = topSymbol->sortBound(variableSort); if (variableSortBound != UNBOUNDED) wordSystem->setUpperBound(i, variableSortBound); } if (identity != 0 && topSymbol->takeIdentity(variableSort)) wordSystem->setTakeEmpty(i); } else { Symbol* symbol = dagNode->symbol(); if (dagNode->isGround()) { // FIXME: in one-side identity case, we could have the identity // itself as a ground alien; need to decide how we pass // uncanceled identity elements into WordSystem wordSystem->setTheoryConstraint(i, symbol->getIndexWithinModule()); continue; } if (symbol->isStable()) { wordSystem->setTheoryConstraint(i, symbol->getIndexWithinModule()); if (identity != 0 && symbol == identity->symbol()) { // // We are have a stable alien that has the same // top symbol as our identity. We must assume it could unify // with our identity. // wordSystem->setTakeEmpty(i); } continue; } // // Unstable alien; if we have an identity we must assume it could // unify with the identity. // if (markedSubterms.contains(i)) wordSystem->setUpperBound(i, 1); // must collapse to avoid nontermination if (identity != 0) wordSystem->setTakeEmpty(i); } } // // Insert null equations // { for (const Word& w : nullEquations) { wordSystem->addNullEquation(w); DebugInfo("added null equation for " << w); } } // // Insert abstract assignments. // { for (Assignment& a : assignments) { wordSystem->addAssignment(a.variable, a.value); DebugInfo("added assignment x" << a.variable << " |-> " << a.value); } } // // Insert abstract equations. // { int counter = 0; for (Unification& u : unifications) { wordSystem->addEquation(counter, u.lhs, u.rhs); ++counter; DebugInfo("added equation " << u.lhs << " =? " << u.rhs); } } } void AU_UnificationSubproblem2::unsolve(int index, UnificationContext& solution) { // // We take a solved form X |-> f(...), turn it into abstract assignment and // remove it from the current solution. // DagNode* variable = solution.getVariableDagNode(index); DagNode* value = solution.value(index); solution.bind(index, 0); Assert(variable != 0, "couldn't get variable for index " << index << " bound to " << value); DebugAdvisory("### unsolving " << variable << " <- " << value); assignments.push_back(Assignment()); Assignment& a = assignments.back(); a.variable = dagToAbstract(variable, solution); assocToAbstract(value, a.value, solution); } bool AU_UnificationSubproblem2::solve(bool findFirst, UnificationContext& solution, PendingUnificationStack& pending) { if (findFirst) { // // Save the current substitution // preSolveSubstitution.clone(solution); // // Unsolve any solved forms that are in our theory. This seemingly wasteful step // has to be done in order to avoid nontermination. // // The idea is that solved forms X = f(...) in our theory were created by us at some // earlier invocation and represent decisions made about the solution on the current // path. They must therefore be considered simultaneously with current unification // subproblems otherwise we might generate an additional binding for X which is // then resolved by creating yet another f-theory subproblem. // int nrFragile = solution.nrFragileBindings(); for (int i = 0; i < nrFragile; ++i) { DagNode* value = solution.value(i); if (value != 0 && value->symbol() == topSymbol) unsolve(i, solution); } // // Make an abstract system of word equations. // makeWordSystem(solution); // // Save state of the pending stack with the substitution so that // we can restore both in order to undo each of our solutions. // savedSubstitution.clone(solution); savedPendingState = pending.checkPoint(); } else { // // Restore pending stack and current substitution, implicitly deallocating // any fresh variables we introduced. // pending.restore(savedPendingState); solution.restoreFromClone(savedSubstitution); } for (;;) { int result = wordSystem->findNextSolution(); if (result & WordSystem::INCOMPLETE) pending.flagAsIncomplete(topSymbol); if (!(result & WordSystem::SUCCESS)) break; if (buildSolution(solution, pending)) return true; // // Restore pending stack and current substitution, implicitly deallocating // any fresh variables we introduced. // pending.restore(savedPendingState); solution.restoreFromClone(savedSubstitution); } // // No more solutions; restore any solved forms that we unsolved. // solution.restoreFromClone(preSolveSubstitution); return false; } DagNode* AU_UnificationSubproblem2::abstractToFreshVariable(int variableIndex, UnificationContext& solution) { DagNode*& d = freshVariables[variableIndex]; if (d == 0) d = solution.makeFreshVariable(topSymbol->rangeComponent()); return d; } bool AU_UnificationSubproblem2::buildSolution(UnificationContext& solution, PendingUnificationStack& pending) { // // Not all fresh variables created by the word system need appear in the final solution; some // may have been eliminated by being assigned to. So we created Maude fresh variables // for them on demand. // int nrFreshVariables = wordSystem->getNrVariables(); freshVariables.resize(nrFreshVariables); for (int i = 0; i < nrFreshVariables; ++i) freshVariables[i] = 0; NatSet reusedVariables; int nrVariables = subterms.size(); #define REUSE_VARIABLES #ifdef REUSE_VARIABLES for (int i = 0; i < nrVariables; ++i) { // // Look for abstracted variables whose abstract variable is assigned // exactly one thing. The abstracted variable can be used in place // of the fresh variable we would otherwise create for the abstract // variable. // const WordSystem::Word& value = wordSystem->getAssignment(i); if (value.size() == 1) { if (VariableDagNode* v = dynamic_cast(subterms[i])) { int abstractVariable = value[0]; if (freshVariables[abstractVariable] == 0) { freshVariables[abstractVariable] = v; reusedVariables.insert(i); DebugInfo("using original variable index " << i << ", " << subterms[i] << " instead of a fresh variable for abstract variable " << abstractVariable); } } } } #endif // // We then go through each original variable and unify its subterm against the associative // term with fresh variable arguments corresponding to the word system solution. // for (int i = 0; i < nrVariables; ++i) { if (reusedVariables.contains(i)) continue; // no point unifying a variable with itself bool inTheory = true; // // Convert abstract assignment to Maude dag. // DagNode* d; const WordSystem::Word& value = wordSystem->getAssignment(i); int nrArgs = value.size(); if (nrArgs == 0) d = topSymbol->getIdentityDag(); else if (nrArgs == 1) { d = abstractToFreshVariable(value[0], solution); inTheory = false; // we are assigning an alien term } else { AU_DagNode* a = new AU_DagNode(topSymbol, nrArgs); for (int j = 0; j < nrArgs; ++j) a->argArray[j] = abstractToFreshVariable(value[j], solution); d = a; } DagNode* subterm = subterms[i]; if (VariableDagNode* varSubterm = dynamic_cast(subterm)) { // // We need to handle unbound variable subterms that we unify with something in our // theory ourself to avoid generating another problem in our theory. // // It is possible that other unifications generated by earlier iterations of this // loop merged another variable with our varSubterm so that it is no longer at the // end of its chain. // VariableDagNode* repVar = varSubterm->lastVariableInChain(solution); if (solution.value(repVar->getIndex()) == 0 && inTheory) { solution.unificationBind(repVar, d); continue; } } // // Now unify with abstracted subterm. // DebugInfo("unifying " << subterm << " =? " << d); if (!(subterm->computeSolvedForm(d, solution, pending))) return false; } return true; } Maude-Maude3.2/src/AU_Theory/AU_UnificationSubproblem2.hh000077500000000000000000000054631420036611000233120ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2015 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for unification subproblems in the A theory. // #ifndef _AU_UnificationSubproblem2_hh_ #define _AU_UnificationSubproblem2_hh_ #include #include "unificationSubproblem.hh" #include "simpleRootContainer.hh" #include "natSet.hh" #include "dagNode.hh" #include "substitution.hh" #include "pendingUnificationStack.hh" #include "wordSystem.hh" class AU_UnificationSubproblem2 : public UnificationSubproblem, private SimpleRootContainer { NO_COPYING(AU_UnificationSubproblem2); public: AU_UnificationSubproblem2(AU_Symbol* topSymbol); ~AU_UnificationSubproblem2(); void addUnification(DagNode* lhs, DagNode* rhs, bool marked, UnificationContext& solution); bool solve(bool findFirst, UnificationContext& solution, PendingUnificationStack& pending); private: typedef WordSystem::Word Word; struct Assignment { int variable; WordSystem::Word value; }; struct Unification { WordSystem::Word lhs; WordSystem::Word rhs; }; void markReachableNodes(); int dagToAbstract(DagNode* dagNode, UnificationContext& solution); void assocToAbstract(DagNode* dagNode, WordSystem::Word& word, UnificationContext& solution); void makeWordSystem(UnificationContext& solution); void unsolve(int index, UnificationContext& solution); DagNode* abstractToFreshVariable(int variableIndex, UnificationContext& solution); bool buildSolution(UnificationContext& solution, PendingUnificationStack& pending); AU_Symbol* const topSymbol; Vector subterms; list assignments; list unifications; WordSystem* wordSystem; Vector freshVariables; // // For backtracking. // Substitution preSolveSubstitution; Substitution savedSubstitution; PendingUnificationStack::Marker preSolveState; PendingUnificationStack::Marker savedPendingState; // // Needed for identity case. // list nullEquations; NatSet markedSubterms; // indices of subterms that have been marked }; #endif Maude-Maude3.2/src/AU_Theory/ChangeLog000077500000000000000000002476371420036611000176040ustar00rootroot000000000000002021-09-21 Steven Eker * AU_ExtensionInfo.cc (AU_ExtensionInfo::copy): take const arg * AU_ExtensionInfo.hh (class AU_ExtensionInfo): updated decl for copy() 2021-05-11 Steven Eker * AU_Term.cc (AU_Term::deepSelfDestruct): use range-based for loop (AU_Term::normalize): use range-based for loop (AU_Term::findEagerVariables): use range-based for loop (AU_Term::markEagerArguments): use range-based for loop (AU_Term::analyseCollapses2): use range-based for loop (2 places) (AU_Term::findAvailableTerms): use range-based for loop (AU_Term::compileRhs2): added typedef IntPair; use range-based for loop (AU_Term::dump): use range-based for loop * AU_UnificationSubproblem2.cc: deleted FOR_EACH() macro * AU_Normalize.cc (AU_DagNode::normalizeAtTop): use range-based for loop 2021-05-10 Steven Eker * AU_Symbol.cc (AU_Symbol::computeBaseSort): use range-based for loop (2 places) (AU_Symbol::termify): use range-based for loop (AU_Symbol::computeGeneralizedSort): use range-based for loop * AU_Matcher.cc (AU_LhsAutomaton::matchRigidPart): use range-based for loop * AU_DagNode.cc (AU_DagNode::copyEagerUptoReduced2): pre-increment (AU_DagNode::copyAll2): pre-increment (AU_DagNode::copyWithReplacement): pre-increment (AU_DagNode::copyWithReplacement): pre-increment (AU_DagNode::partialReplace): pre-increment (2 places) (AU_DagNode::partialConstruct): pre-increment (3 places) (AU_DagNode::computeBaseSortForGroundSubterms): use range-based for loop (AU_DagNode::insertVariables2): use range-based for loop (AU_DagNode::indexVariables2): use range-based for loop (AU_DagNode::instantiateWithReplacement): pre-increment * AU_DequeMatcher.cc (AU_LhsAutomaton::dequeMatch): use range-based for loop * AU_DagNode.cc (AU_DagNode::getHashValue): use range-based for loop (AU_DagNode::compareArguments): use range-based for loop (AU_DagNode::markArguments): use range-based for loop (AU_DagNode::clearCopyPointers2): use range-based for loop ===================================Maude136=========================================== 2020-12-11 Steven Eker * AU_DagNode.cc (AU_DagNode::instantiate2): take and pass maintainInvariants flag; only normalize and compute sorts for ground dag if maintainInvariants == true (AU_DagNode::instantiateWithCopies2): pass maintainInvariants = false to instantiate() * AU_DagNode.hh (class AU_DagNode): updated decl for instantiate2() ===================================Maude132=========================================== 2020-07-01 Steven Eker * AU_UnificationSubproblem2.cc (AU_UnificationSubproblem2::addUnification): fix bug where inserting into markedSubterms wasn't conditional on the equation being marked 2020-06-30 Steven Eker * AU_UnificationSubproblem2.cc (AU_UnificationSubproblem2::addUnification): record marked subterms (AU_UnificationSubproblem2::makeWordSystem): require marked subterms to take at most one thing * AU_UnificationSubproblem2.hh (class AU_UnificationSubproblem2): added data member markedSubterms 2020-06-23 Steven Eker * AU_UnificationSubproblem2.cc (AU_UnificationSubproblem2::addUnification): check rhs alien in case it our identity (AU_UnificationSubproblem2::makeWordSystem): use range-base for loops for inserting assignments and equations; added DebugInfo()s * AU_UnificationSubproblem2.hh (class AU_UnificationSubproblem2): added typedef for Word * AU_UnificationSubproblem2.cc (AU_UnificationSubproblem2::makeWordSystem): insert null equation * AU_Symbol.cc (AU_Symbol::canResolveTheoryClash): added * AU_Symbol.hh (class AU_Symbol): uncomment canResolveTheoryClash() decl * AU_DagNode.cc (AU_DagNode::computeSolvedForm2): added DebugEnter() * AU_UnificationSubproblem2.hh (class AU_UnificationSubproblem2): added data member nullEquations * AU_UnificationSubproblem2.cc (AU_UnificationSubproblem2::dagToAbstract): return NONE for variables bound to our identity (AU_UnificationSubproblem2::assocToAbstract): handle NONE as an index (AU_UnificationSubproblem2::addUnification): rewritten to handle empty abstract words and NULL abstract rhs 2020-06-19 Steven Eker * AU_Symbol.cc (AU_Symbol::makeUnificationSubproblem): call computeBaseSortForGroundSubterms() for identity if it exists and it hasn't been done yet 2020-06-18 Steven Eker * AU_UnificationSubproblem2.cc (AU_UnificationSubproblem2::buildSolution): if we have the empty word, don't fall into the general case (AU_UnificationSubproblem2::buildSolution): restructure to resemble ACU version; use unificationBind() for binding unbound variables to identity * AU_DagNode.cc (AU_DagNode::computeBaseSortForGroundSubterms): warn about unimplemented for one-sided identity (AU_DagNode::computeSolvedForm2): bail on the one-sided identity case * AU_UnificationSubproblem2.cc (AU_UnificationSubproblem2::buildSolution): deal with empty assignment in solution by assigning identity dag 2020-06-12 Steven Eker * AU_UnificationSubproblem2.cc (AU_UnificationSubproblem2::makeWordSystem): call setTakeEmpty() for subterms that could possibly unify with our identity 2020-06-08 Steven Eker * AU_UnificationSubproblem2.cc (AU_UnificationSubproblem2::buildSolution): added code to reuse variables that would otherwise get assigned a single fresh variable 2020-06-06 Steven Eker * AU_UnificationSubproblem2.cc (AU_UnificationSubproblem2::dagToAbstract): added comment to explain why we can't use a variables binding because it would amount to eager replacement and potentially cause nontermination 2020-05-29 Steven Eker * AU_DagNode.cc (AU_DagNode::computeBaseSortForGroundSubterms): commented out the code warning about AU unimplemented (AU_DagNode::computeSolvedForm2): comment out code that bails on AU case ===================================Maude128a=========================================== 2019-09-11 Steven Eker * AU_UnificationSubproblem2.cc (makeWordSystem): use setUpperBound() and setTheoryConstraint() rather than addConstraint() ===================Maude124 (integrated with Maude128 on 2019-12-18)================== 2019-11-11 Steven Eker * AU_DagNode.cc (computeBaseSortForGroundSubterms): take and pass warnAboutUnimplemented; simplified (computeBaseSortForGroundSubterms): no early termination in UNIMPLEMENTED case * AU_DagNode.hh (AU_BaseDagNode): updated decl for computeBaseSortForGroundSubterms() ===================================Maude125=========================================== 2017-04-25 Steven Eker * AU_DagNode.cc (instantiateWithCopies2): fixed bug where return d was inside the ifdef'd code ===================================Maude112b=========================================== 2017-04-14 Steven Eker * AU_Matcher.cc (forcedLoneVariableCase): added comments ===================================Maude112a=========================================== 2017-02-23 Steven Eker * AU_DagNode.cc (instantiateWithCopies2): ifdef'd out normal form, sort and ground flag computation and added comment to explain why 2017-02-21 Steven Eker * AU_DagNode.hh (AU_BaseDagNode): updated decl for instantiateWithReplacement() * AU_DagNode.cc (instantiateWithReplacement): handle lazy contexts 2017-02-17 Steven Eker * AU_DequeDagNode.cc (stackArguments): deleted * AU_DequeDagNode.hh (AU_BaseDagNode): deleted decl for stackArguments() * AU_DagNode.hh (AU_BaseDagNode): deleted decl for stackArguments() * AU_DagNode.cc (stackArguments): deleted * AU_Symbol.hh (AssociativeSymbol): updated decl for stackArguments() * AU_Symbol.cc (stackArguments): support respectFrozen and eagerContext flags ===================================Maude111b=========================================== 2016-11-10 Steven Eker * AU_DequeDagNode.cc (copyEagerUptoReduced2): added commment to explain why we don't bother trying to preserve deque form * AU_DequeDagNode.hh (AU_BaseDagNode): added decl for copyAll2() * AU_DequeDagNode.cc (copyAll2): added * AU_DagNode.hh (AU_BaseDagNode): added decl for copyAll2() * AU_DagNode.cc (copyAll2): added ===================================Maude111=========================================== 2016-03-24 Steven Eker * AU_Symbol.cc (computeGeneralizedSort2): code cleaning 2016-03-23 Steven Eker * AU_Symbol.cc (computeGeneralizedSort2): added 2015-08-07 Steven Eker * AU_OldUnificationAlgorithm.cc: deleted * AU_NewUnificationAlgorithm.cc: deleted * AU_UnificationSubproblem.cc: deleted * AU_UnificationSubproblem.hh: deleted 2015-08-06 Steven Eker * AU_UnificationSubproblem2.cc (solve): pass topSymbol to flagAsIncomplete 2015-07-30 Steven Eker * AU_DagNode.cc (computeBaseSortForGroundSubterms): call setGround() in the ground case 2015-07-29 Steven Eker * AU_UnificationSubproblem2.cc (makeWordSystem): use constrained variables to abstract ground terms even when their top symbol is not stable (makeWordSystem): same trick for variables bound to ground terms 2015-07-24 Steven Eker * AU_UnificationSubproblem2.cc (solve): use new WordSystem return convention 2015-07-22 Steven Eker * AU_UnificationSubproblem2.cc (solve): call flagAsIncomplete() rather than issuing a warning 2015-07-17 Steven Eker * AU_UnificationSubproblem2.cc (solve): handle new WordSystem return value 2015-07-16 Steven Eker * AU_UnificationSubproblem2.cc (makeWordSystem): fixed a bug where we were taking the symbol from the wrong dag to check for stability when adding constraints 2015-07-10 Steven Eker * AU_UnificationSubproblem2.cc (makeWordSystem): fix code for getting the sort of a variable * AU_Symbol.cc (makeUnificationSubproblem): use AU_UnificationSubproblem2 * AU_DagNode.hh (AU_BaseDagNode): AU_UnificationSubproblem2 becomes a friend * AU_UnificationSubproblem2.hh (SimpleRootContainer): added decls for dagToAbstract(), assocToAbstract(), makeWordSystem(), unsolve(), abstractToFreshVariable(), buildSolution() * AU_UnificationSubproblem2.cc (buildSolution): implemented (makeWordSystem): insert constraints for variables bound to stable aliens 2015-07-02 Steven Eker * AU_UnificationSubproblem2.cc: created * AU_UnificationSubproblem2.hh: created ===================================Maude108=========================================== 2014-11-18 Steven Eker * AU_NewUnificationAlgorithm.cc (simplify): unify with purified lhs on first pass 2014-11-17 Steven Eker * AU_UnificationSubproblem.hh (SimpleRootContainer): added decls for constrained() and updateBounds() * AU_NewUnificationAlgorithm.cc (computeBounds): check for variables at that are bound to a term headed by our top symbol (solve): do computeBounds() first so we can make use of any known bounds when disposing of f(...) =? X type unifications (updateBounds): added (simplify): handle constrained cases first (purifyAndBind): call updateBounds() (constrained): added() 2014-11-14 Steven Eker * AU_UnificationSubproblem.hh (SimpleRootContainer): adde decls for handleNonlinearVariable() and computeBounds() * AU_NewUnificationAlgorithm.cc (computeBounds): added (findUpperBound): added new version (handleNonlinearVariable): added (solve): call computeBounds() (flattenDag): call handleNonlinearVariable() in 3 places (flattenUnifications): no need to check for null return from flattenDag() * AU_UnificationSubproblem.hh (SimpleRootContainer): added data member bounds 2014-11-07 Steven Eker * AU_NewUnificationAlgorithm.cc (solve): need to undo old solution before we look for a new one * AU_UnificationSubproblem.hh (SimpleRootContainer): added decl for dump() * AU_NewUnificationAlgorithm.cc (dump): added * AU_UnificationSubproblem.hh (SimpleRootContainer): added declarations for makeSequenceAssignmentProblems(), flattenUnifications(), flattenDag() * AU_NewUnificationAlgorithm.cc (makeSequenceAssignments): added (makeSequenceAssignmentProblems): added 2014-11-06 Steven Eker * AU_NewUnificationAlgorithm.cc (flattenUnifications): added * AU_UnificationSubproblem.cc: moved unification code from two different algorithm out in to two different files (markReachableNodes): need to protect dags in local unifications for the new algorithm since it creates new local unifications and modifies existing ones * AU_NewUnificationAlgorithm.cc: created the hold code for second associative unification algorithm * AU_OldUnificationAlgorithm.cc: created to hold code from first associative unification algorithm ===================================Maude106=========================================== 2014-06-30 Steven Eker * AU_UnificationSubproblem.cc (purifyAndBind): rewritten to no longer do flattening (simplify): use new purifyAndBind() convention (interflattenBindings): added * AU_UnificationSubproblem.hh (SimpleRootContainer): added decls for hasArgumentBoundInTheory() and flatten() * AU_UnificationSubproblem.cc (hasArgumentBoundInTheory): added (flatten): addded 2014-06-27 Steven Eker * AU_UnificationSubproblem.hh (SimpleRootContainer): added decls for purifyAndBind() and simplify() * AU_UnificationSubproblem.cc (purifyAndBind): added (simplify): added 2014-06-23 Steven Eker * AU_UnificationSubproblem.cc (resolve): added comments and DebugAdvisory() ===================================Maude104=========================================== 2014-04-04 Steven Eker * AU_UnificationSubproblem.cc (checkAndInsertVariable): check for bound variables (markReachableNodes): implemented * AU_UnificationSubproblem.hh (SimpleRootContainer): added decls for checkAndInsertVariable(), checkArgumentList(), checkForCollapseAndNonLinearVariables() * AU_UnificationSubproblem.cc (checkAndInsertVariable) (checkArgumentList, checkForCollapseAndNonLinearVariables): added (solve): call checkForCollapseAndNonLinearVariables() 2014-04-03 Steven Eker * AU_DagNode.cc (computeSolvedForm2): bail in the case we have an identity element * AU_UnificationSubproblem.hh (SimpleRootContainer): added data member preSolveState * AU_UnificationSubproblem.cc (solve): support unifications of the form f(...) = X (solve): save and restore preSolveState - this is because purification may create problems on the pending stack that must retracted 2014-04-01 Steven Eker * AU_UnificationSubproblem.hh (SimpleRootContainer): added decls for findNextSolution() and new buildSolution() * AU_UnificationSubproblem.cc (AU_UnificationSubproblem): delete problems from struct Unification and not main object (AU_UnificationSubproblem): don't clear problem field (addUnification): clear problem field (buildSolution): added 3 arg version (findNextSolution): added * AU_UnificationSubproblem.hh (SimpleRootContainer): added problem member to struct Unification; removed problem field from class * AU_UnificationSubproblem.cc (solve): pass findFirst to findNextSolution() (resolve): avoid binding a variable to itself 2014-03-31 Steven Eker * AU_UnificationSubproblem.cc (resolve): added (buildSolution): added * AU_UnificationSubproblem.hh (SimpleRootContainer): added decls for buildSolution(), resolve(); added data members savesSubstitution, preSolveSubstitution, savedPendingState 2014-03-28 Steven Eker * AU_UnificationSubproblem.cc (findUpperBound): added * AU_UnificationSubproblem.hh (SimpleRootContainer): added decl for findUpperBound() * AU_DagNode.cc (computeBaseSortForGroundSubterms): added (computeSolvedForm2): added (insertVariables2): added * AU_DagNode.hh (AU_BaseDagNode): added decls for computeBaseSortForGroundSubterms(), computeSolvedForm2(), insertVariables2() * AU_UnificationSubproblem.cc: created a stub * AU_Symbol.hh (AssociativeSymbol): added decls for computeGeneralizedSort(), makeUnificationSubproblem() * AU_Theory.hh: added AU_UnificationSubproblem * AU_UnificationSubproblem.hh: created a stub * AU_Symbol.cc (computeGeneralizedSort): added (makeUnificationSubproblem): added ===================================Maude102=========================================== 2012-04-13 Steven Eker * AU_DagNode.hh (AU_BaseDagNode): added decl for instantiateWithCopies2(); updated decl for instantiateWithReplacement() * AU_DagNode.cc (instantiateWithCopies2): added (instantiateWithReplacement): rewritten to respect eager positions 2012-03-30 Steven Eker * AU_Symbol.hh (AssociativeSymbol): added decl for termify() * AU_Symbol.cc (termify): added ===================================Maude96=========================================== 2010-10-19 Steven Eker * AU_Symbol.cc (AU_Symbol::makeCanonicalCopyEagerUptoReduced): becomes makeCanonicalCopy() with change of semantics * AU_Symbol.hh (class AU_Symbol): makeCanonicalCopyEagerUptoReduced() -> makeCanonicalCopy() ===================================Maude95a=========================================== 2010-09-29 Steven Eker * AU_Symbol.cc (AU_Symbol::makeCanonicalCopyEagerUptoReduced): simplified now that we only deal with unreduced dag nodes; use getCanonicalCopyEagerUptoReduced() * AU_Symbol.hh (class AU_Symbol): added decl for makeCanonicalCopyEagerUptoReduced() * AU_Symbol.cc (AU_Symbol::makeCanonicalCopyEagerUptoReduced): added ===================================Maude95=========================================== 2010-03-17 Steven Eker * AU_DagNode.hh (AU_DagNode::setProducedByAssignment): clean up check for bug below * AU_BaseDagNode.hh (AU_BaseDagNode::isProducedByAssignment): added * AU_DagNode.cc (AU_DagNode::partialReplace): fix nasty bug where we had are normlization status set to ASSIGNMENT but replacement violated the guarantees offered by this status 2010-03-16 Steven Eker * AU_DagNode.cc (AU_DagNode::overwriteWithClone) (AU_DagNode::makeClone): use setNormalizationStatus()/getNormalizationStatus() instead of setTheoryByte()/getTheoryByte() * AU_Symbol.cc (AU_Symbol::makeCanonical): don't call setProducedByAssignment() until we have filled out arguements (AU_Symbol::makeCanonical): ditto * AU_Matcher.cc (AU_LhsAutomaton::forcedLoneVariableCase): don't call setProducedByAssignment() until we have filled out arguements * AU_Symbol.cc (AU_Symbol::eqRewrite): added look to check for Riesco 1/18/10 buga * AU_FullMatcher.cc (AU_LhsAutomaton::fullMatchFixedLengthBlock): added Assert() to check for argument with missing sort information 2010-03-12 Steven Eker * AU_RhsAutomaton.cc (AU_RhsAutomaton::replace) (AU_RhsAutomaton::construct): use nrArguments (AU_RhsAutomaton::buildArguments): use nrArguments * AU_RhsAutomaton.hh (class AU_RhsAutomaton): added data member nrArguments (AU_RhsAutomaton::close): set nrArguments * AU_RhsAutomaton.cc (AU_RhsAutomaton::buildArguments): rewrite to use iterators; made local_inline * AU_Term.cc (AU_Term::compileRhs2): rewritten to compile/build largest arguments first - this fixes a potential compilation performance issue ===================================Maude93=========================================== 2009-12-22 Steven Eker * AU_Symbol.hh (class AU_Symbol): added decl for makeCanonical() * AU_Symbol.cc (makeCanonical): added ===================================Maude92b=========================================== 2009-11-04 Steven Eker * AU_LhsCompiler.cc (findConstraintPropagationSequence): added DebugAdvisory()'s to both versions to try and locate serious performance bug (findConstraintPropagationSequence): added an optimization where we don't bother looking at the right alien if we forced all or all but one arguments using the left alien (unitVariable): added comment ===================================Maude92a=========================================== 2008-11-06 Steven Eker * AU_Term.cc (normalize): fix a nasty bug where we were collapsing to a subterm that had already been self destructed in the all identity case ===================================Maude91d=========================================== 2008-09-11 Steven Eker * AU_Matcher.cc (determineRigidBlocks): initialized firstMatch field to avoid compiler warning ===================================Maude91a=========================================== 2007-11-20 Steven Eker * AU_Term.cc (normalize): fix memory leak by calling deepSelfDestruct() on removed identities 2007-11-15 Steven Eker * AU_Normalize.cc (normalizeAtTop): don't allow garbage collection when we're in dumb mode 2007-11-09 Steven Eker * AU_DagNode.cc (instantiate2): pass dumb=true to normalizeAtTop(); call setGround() * AU_DagNode.hh (class AU_DagNode): updated decl for normalizeAtTop() with dumb flag defaulting to false * AU_Normalize.cc (normalizeAtTop): take dumb flag; only use deques when dumb flag is false 2007-11-07 Steven Eker * AU_DagNode.cc (instantiateWithReplacement): fix bug where we were making a cyclic dag * AU_DequeDagNode.hh (class AU_DequeDagNode): added decl for indexVariables2() * AU_DequeDagNode.cc (indexVariables2): added 2007-11-05 Steven Eker * AU_DagNode.cc (copyEagerUptoReduced2): remove unneeded cast (indexVariables2, instantiateWithReplacement): added * AU_DagNode.hh (class AU_DagNode): added declarations for instantiate2(), indexVariables2(), instantiateWithReplacement() ===================================Maude89h=========================================== 2006-09-26 Steven Eker * AU_CollapseMatcher.cc (uniqueCollapseMatch): we have to bind an unbound variable that can take identity in the rigid part otherwise it could be bound to something other than identity later on (we know it will be bound later on because it is in the rigid part). 2006-09-25 Steven Eker * AU_CollapseMatcher.cc (uniqueCollapseMatch): handle the case where a variable that can take identity ends up in the rigid part because we expect it to be bound by some other term in the rigid part 2005-07-28 Steven Eker * AU_Term.cc (deepCopy2): rewritten to handle translation to non-AU_Symbol * AU_Term.hh (class AU_Term): updated decl for SymbolMap* version of ctor * AU_Term.cc (AU_Term): SymbolMap* version: require symbol to be an AU_Symbol 2005-07-01 Steven Eker * AU_Term.hh (class AU_Term): updated decls for deepCopy2() and SymbolMap* version of ctor * AU_Term.cc (deepCopy2): rewritten (AU_Term): rewritten ===================================Maude86b=========================================== 2005-02-18 Steven Eker * AU_GreedyMatcher.cc (greedyMatchVariableBlock): commented out 4 DebugAdvisory()s ===================================Maude86=========================================== 2003-08-29 Steven Eker * AU_Symbol.hh (class AU_Symbol): added decl for rewriteAtTopNoOwise() * AU_Symbol.cc (rewriteAtTopNoOwise): added (complexStrategy): rewritten using rewriteAtTopNoOwise() (memoStrategy): rewritten using rewriteAtTopNoOwise() ===================================Maude82=========================================== 2003-05-28 Steven Eker * AU_Layer.cc (solveVariables): use MemoryCell::okToCollectGarbage() ===================================Maude80b=========================================== 2003-05-01 Steven Eker * AU_Matcher.cc (determineRigidBlocks): use clear() * AU_DequeDagNode.cc (overwriteWithClone): use copySetRewritingFlags() (makeClone): use copySetRewritingFlags() * AU_DagNode.cc (overwriteWithClone): use copySetRewritingFlags() (makeClone): use copySetRewritingFlags() 2003-04-30 Steven Eker * AU_LhsCompiler.cc (addFixedLengthBlock): fixed (invisible) bug where we had the earlyMatchFailOnInstanceOf() the wrong way around (addFixedLengthBlock): rewrote shift calculation inner loop to make it more understandable (addFixedLengthBlock): rewrote shift calculation inner loop to fix bug where the metalevel binds a variable that invalidates the subsumption and we end up with too big of a shift * AU_Layer.cc (bindVariables): use safeCast() on result of makeFragment() * AU_Matcher.cc (match): use safeCast() 2003-04-29 Steven Eker * AU_GreedyMatcher.cc (greedyMatchVariableBlock): fix bug in the case where a variable has to take the identity by setting it to [pos, pos-1] rather than [pos+1, pos]; this is important since last variable in bloack can have its lastSubject set to pos-1 in the code that assigns spare subterms * AU_Symbol.cc (calculateNrSubjectsMatched): fixed bug where we weren't handling the case that d points to a AU_DequeDagNode; use safeCast() * AU_GreedyMatcher.cc (greedyBindVariables): added Assert() to catch -ve number of subjects assigned to a variable * AU_LhsAutomaton.hh (class AU_LhsAutomaton): deleted decl for calculateNrSubjectsMatched() * AU_DequeMatcher.cc (dequeMatch): fixed bug wherewe weren't checking that there was enough arguments before handling a variable bound to an alien (dequeMatch): changed way of keeping track of bounds 2003-04-28 Steven Eker * AU_Symbol.cc (stackArguments): handle deque case properly rather than converting to AU_DagNode (normalizeAndComputeTrueSort): only do arg sort computations and normalizeAtTop() if the subject is fresh (computeBaseSort): rewritten using FOR_EACH_CONST() * AU_DequeDagNode.cc (stackArguments): fixed bug where we weren't initializing j * AU_Term.cc (deepSelfDestruct): use FOR_EACH_CONST() (normalize): use FOR_EACH_CONST() (findEagerVariables): use FOR_EACH_CONST() (markEagerArguments): use FOR_EACH_CONST() (analyseCollapses2): use FOR_EACH_CONST() (2 places) (dump): use FOR_EACH_CONST() (findAvailableTerms): use FOR_EACH_CONST() (compileRhs2): use FOR_EACH_CONST() (2 places) * AU_ExtensionInfo.cc (copy): use safeCast() * AU_DagNode.cc (partialReplace): use safeCast() (partialConstruct): use safeCast() (matchVariableWithExtension): use safeCast() * AU_Term.cc (normalize): use safeCast() (2 places) 2003-04-25 Steven Eker * AU_Symbol.cc (complexStrategy): simplified using rewriteAtTop() (complexStrategy): simplified using rewriteAtTop() * AU_Symbol.hh (class AU_Symbol): updated decl for complexStrategy() * AU_Symbol.cc (makeDagNode): use STL copy() (eqRewrite): need to check for equationFree() even in assignment case because reduce flag may not have be set because sort was not known because of an mb. (ruleRewrite): check for ruleFree() (AU_Symbol): set useDequeFlag only if we have standardStrategy() (eqRewrite): safeCast() to AU_DagNode* in the complexStrategy() case * AU_DagNode.cc (overwriteWithClone): use STL copy() (makeClone): use STL copy() (copyEagerUptoReduced2): use STL copy() 2003-04-24 Steven Eker * AU_Term.hh (symbol): use safeCast() * AU_DagNode.hh (class AU_DagNode): added decl for disappear() * AU_Normalize.cc (normalizeAtTop): rewritten (disappear): added * AU_BaseDagNode.cc: deleted * AU_DagNode.hh (class AU_DagNode): class AU_BaseDagNode no longer a friend * AU_BaseDagNode.cc (makeExtensionInfo): deleted (getSize): deleted * AU_BaseDagNode.hh (class AU_BaseDagNode): deleted decls for makeExtensionInfo() and getSize() * AU_DequeDagNode.cc (matchVariableWithExtension): deleted (makeExtensionInfo): added * AU_DequeDagNode.hh (class AU_DequeDagNode): added decl for makeExtensionInfo(); deleted decl for matchVariableWithExtension() * AU_Matcher.cc (matchRigidPart): use FOR_EACH_CONST * AU_DagNode.cc (overwriteWithClone): fixed bug where we weren't incrementing j (makeClone): fix symmetric bug 2003-04-23 Steven Eker * AU_DequeDagNode.cc (getHashValue): implemented properly * AU_Normalize.cc (normalizeAtTop): use AU_Deque ctor * AU_Symbol.hh (class AU_Symbol): added decl for rewriteAtTop() * AU_Symbol.cc (rewriteAtTop): added (eqRewrite): use rewriteAtTop(); assume deque form never needs to be rewritten * AU_Normalize.cc (normalizeAtTop): use useDeque() * AU_DagNode.cc (getHashValue): use FOR_EACH_CONST() (compareArguments): use FOR_EACH_CONST() (clearCopyPointers2): use FOR_EACH_CONST() (overwriteWithClone): use FOR_EACH_CONST() (makeClone): use FOR_EACH_CONST() * AU_DagNode.hh (setProducedByAssignment): use setNormalizationStatus() (producedByAssignment): deleted (nrArgs): deleted (getArgument): deleted (AU_BaseDagNode): use setNormalizationStatus() * AU_Symbol.hh (class AU_Symbol): added decl for compileEquations() * AU_Symbol.cc (AU_Symbol): init useDequeFlag (compileEquations): added * AU_Symbol.hh (class AU_Symbol): added data member useDequeFlag (useDeque): added * AU_DagNode.cc (markArguments): rewritten to avoid recursing on the first arg that shares our symbol 2003-04-22 Steven Eker * AU_DequeMatcher.cc (dequeMatch): fixed bug where we weren't assigning to returnedSubproblem in the success case 2003-04-21 Steven Eker * AU_DagOperations.cc (eliminateBackward): first arg no longer const (eliminateForward): first arg no longer const * AU_DagNode.hh (class AU_DagNode): updated decls for eliminateForward() and eliminateBackward() * AU_DequeMatcher.cc: created * AU_Normalize.cc (normalizeAtTop): use safeCast() (2 places) * AU_DagOperations.cc (eliminateForward): use getAU_DagNode() rather than static_cast - fixes a bug (eliminateBackward): ditto * AU_LhsAutomaton.hh (class AU_LhsAutomaton): added decl for dequeMatch() * AU_Matcher.cc (match): handle deque form via dequeMatch() * AU_Normalize.cc (normalizeAtTop): only convert to deque form if symbol is equationFree() * AU_Symbol.hh (class AU_Symbol): added decl for complexStrategy() * AU_Symbol.cc (complexStrategy): added (memoStrategy): use isFresh() (memoStrategy): check for DEQUED (eqRewrite): rewritten to handle deque case * AU_BaseDagNode.hh (isFresh): added 2003-04-18 Steven Eker * AU_DequeDagNode.cc (dequeToArgVec): fixed buf where we weren't preserving sort index and reduced flag * AU_Normalize.cc (normalizeAtTop): fixed bug where we were setting e to argArray.begin() 2003-04-17 Steven Eker * AU_Symbol.cc (computeBaseSort): fixed bug where we were falling into AU_DagNode* case * AU_Normalize.cc (normalizeAtTop): temporary hack to force everything into deque form for testing * AU_DequeDagNode.hh (AU_DequeDagNode): initialize deque with copy ctor rather than assignment 2003-04-16 Steven Eker * AU_Normalize.cc: created * AU_DequeDagNode.hh (AU_DequeDagNode): take AU_Deque arg * AU_DequeDagNode.cc (makeClone): use new ctor * AU_DagNode.hh (class AU_DagNode): added DEQUED to enum NormalizationResult 2003-04-15 Steven Eker * AU_Symbol.cc (ruleRewrite): use getAU_DagNode() (eqRewrite): use getAU_DagNode() (memoStrategy): use getAU_DagNode() (computeBaseSort): handle AU_DequeDagNode; use safeCast() (normalizeAndComputeTrueSort): use getAU_DagNode() (stackArguments): use getAU_DagNode() * AU_Matcher.cc (match): use getAU_DagNode() * AU_DagNode.cc (copyEagerUptoReduced2): use safeCast() * AU_Term.cc (compareArguments): code cleaning * AU_DequeDagNode.cc (compareArguments): code cleaning * AU_BaseDagNode.cc (makeExtensionInfo): use getAU_DagNode() (getSize): handle ACU_TreeDagNode * AU_DagNode.hh: added decl for getAU_DagNode() * AU_DagNode.cc (getAU_DagNode): added 2003-04-14 Steven Eker * AU_DequeDagNode.cc (arguments): use AU_DequeDagArgumentIterator() * AU_Theory.hh: added class AU_DequeDagArgumentIterator * AU_DequeDagArgumentIterator.cc: created * AU_DequeDagArgumentIterator.hh: created * AU_DequeDagNode.hh (getDeque): added * AU_Term.cc (compareArguments): (Term* version) use iterators; use new ordering (compareArguments): (DagNode* version) use iterators; use new ordering; handle AU_DequeDagNodes * AU_DagNode.cc (compareArguments): check for deque; use new ordering * AU_Theory.hh: added class AU_BaseDagNode and class AU_DequeDagNode * AU_DagNode.hh (class AU_DagNode): made AU_DequeDagNode a friend * AU_DequeDagNode.hh: created * AU_DequeDagNode.cc: created 2003-04-11 Steven Eker * AU_DagNode.hh (symbol): deleted (producedByAssignment): sue new theory byte semantics (setProducedByAssignment): use new theory byte semantics (class AU_DagNode): derive from AU_BaseDagNode (AU_BaseDagNode): call AU_BaseDagNode(); use new theory byte semantics * AU_BaseDagNode.hh (_AU_BaseDagNode_hh_): created * AU_DagNode.hh (class AU_DagNode): delete decl for ~AU_DagNode() * AU_DagNode.cc (~AU_DagNode): deleted ===================================Maude80=========================================== 2003-03-28 Steven Eker * AU_Symbol.cc (computeBaseSort): fixed bug: we can't rely on producedByAssignment() to know that we're not in the error sort in the uniform sort case, since now we can have variables and assignments at the kind level; instead we check for the uniform sorts component being errorFree() 2003-02-25 Steven Eker * AU_Layer.cc (buildPartition): updated DebugAdvisoryCheck() (bindVariables): updated Assert()s * AU_Term.cc: removed #pragma (Term): updated Assert() (normalize): updated Assert() (insertAbstractionVariables): DebugAdvisoryCheck() -> DebugAdvisory() * AU_Term.hh: removed #pragma * AU_Symbol.cc: removed #pragma (eqRewrite): updated Assert() (computeBaseSort): updated Assert()s (normalizeAndComputeTrueSort): updated Assert() * AU_Symbol.hh: removed #pragma * AU_Subproblem.cc: removed #pragma (AU_Subproblem): updated Assert() * AU_Subproblem.hh: removed #pragma * AU_RhsAutomaton.cc: removed #pragma * AU_RhsAutomaton.hh: removed #pragma * AU_Matcher.cc (match): updated Assert()s, DebugAdvisoryCheck()s (matchRigidPart): updated Assert()s (forcedLoneVariableCase): updated Assert()s (determineRigidBlocks): updated Assert()s, DebugAdvisoryCheck() * AU_LhsCompiler.cc (compileLhs2): updated Assert()s * AU_LhsAutomaton.cc: removed #pragma * AU_LhsAutomaton.hh: removed #pragma * AU_Layer.cc: removed #pragma (link): updated Assert() (solvePatterns2): updated Assert() (buildPartition): updated Assert() * AU_Layer.hh: removed #pragma * AU_GreedyMatcher.cc (greedyMatch): updated Assert() (greedyMatchRigidBlock): updated Assert()s (greedyMatchRigidBlock2): updated Assert() (greedyMatchFixedLengthBlock): updated Assert()s (greedyMatchBlocks): updated Assert() (greedyMatchVariableBlock): updated Asserts(), DebugAdvisoryCheck() * AU_FullMatcher.cc (fullMatchRigidBlock): updated Assert()s (fullMatchRigidBlock2): updated Assert() (fullMatchFixedLengthBlock): updated Assert()s (buildLeftmostPath): updated Assert() * AU_ExtensionInfo.cc: removed #pragma (buildMatchedPortion): updated Assert() * AU_ExtensionInfo.hh: removed #pragma * AU_DagOperations.cc (eliminateForward): updated Assert() (eliminateBackward): updated Assert() (makeFragment): updated Assert() * AU_DagNode.cc: removed #pragma (compareArguments): updated Assert() (markArguments): updated Assert() (normalizeAtTop): updated Assert()s * AU_DagNode.hh: removed #pragma * AU_DagArgumentIterator.cc: removed #pragma (argument): updated Assert() (next): updated Assert() * AU_DagArgumentIterator.hh: removed #pragma * AU_CollapseMatcher.cc (uniqueCollapseMatch): updated Assert() (bindUnboundVariablesToIdentity): updated Assert() (multiwayCollapseMatch): updated Assert()s (collapseMatch): updated Assert() * AU_ArgumentIterator.cc: removed #pragma (argument): updated Assert() (next): updated Assert() * AU_ArgumentIterator.hh: removed #pragma ===================================Maude79=========================================== 2003-01-31 Steven Eker * AU_Term.cc (analyseCollapses): becomes analyseCollapses2() * AU_Term.hh (class AU_Term): analyseCollapses() -> analyseCollapses2() 2002-11-20 Steven Eker * AU_Matcher.cc (forcedLoneVariableCase): replaced rawBasePointer() calls with iterators 2002-11-18 Steven Eker * AU_DagNode.cc (compareArguments): use const_iterators in place of CONST_ARG_VEC_HACK()s (markArguments): use const_iterators in place of CONST_ARG_VEC_HACK()s 2002-10-16 Steven Eker * AU_Symbol.hh (class AU_Symbol): postInterSymbolPass() -> postOpDeclarationPass() * AU_Symbol.cc (postInterSymbolPass): becomes postOpDeclarationPass() since sort tables arem't computed at postInterSymbolPass time 2002-10-04 Steven Eker * AU_DagNode.hh (class AU_DagNode): updated decl for complex version of copyWithReplacement() * AU_DagNode.cc (copyWithReplacement): complex version: deal with case where only some args are stacked * AU_Symbol.cc (stackArguments): don't stack any args in frozen case; otherwise only stack arguments that are not unstackable 2002-10-03 Steven Eker * AU_DagNode.hh (class AU_DagNode): updated decl for stackArguments() * AU_DagNode.cc (stackArguments): handle respectFrozen arg ===================================Maude76================================================== 2002-08-02 Steven Eker * AU_Term.cc (compileRhs2): added code to flag last use of each source 2002-07-24 Steven Eker * AU_LhsCompiler.cc (addFixedLengthBlock): updated call to subsumes(); this does not fix the potential bug 2002-07-22 Steven Eker * AU_LhsCompiler.cc (addFixedLengthBlock): added comment about a possible bug ===================================Maude74================================================== 2002-03-29 Steven Eker * AU_LhsAutomaton.hh (class AU_LhsAutomaton): fixed return type for greedyMatchFixedLengthBlock() decl * AU_GreedyMatcher.cc (greedyMatchFixedLengthBlock): fixed a really nasty bug where we are declared as returning bool but occasionally need to return UNDECIDED (= -1). When this happens we end up returning true, without binding variables/returning subproblems; return type becomes int ===================================Maude71a================================================== 2002-03-11 Steven Eker * AU_Term.cc: deleted explicit template instantiation * AU_Subproblem.cc: deleted explicit template instantiation * AU_LhsAutomaton.cc: deleted explicit template instantiations * AU_Layer.cc: deleted explicit template instantiations ===================================Maude71================================================== 2002-01-29 Steven Eker * AU_LhsAutomaton.hh (class AU_LhsAutomaton): added friend decl for SubtermType << function ===================================Maude70================================================== 2001-12-10 Steven Eker * AU_Term.hh (class AU_Term): make class AU_ArgumentIterator a friend ===================================Maude69================================================== 2001-04-03 Steven Eker * AU_DagNode.cc (copyWithReplacement): added (Vector version) * AU_DagNode.hh (class AU_DagNode): added decl for Vector version of copyWithReplacement() ===================================Engine66================================================== 2001-03-08 Steven Eker * AU_Symbol.hh (class AU_Symbol): added decl for stackArguments() * AU_Symbol.cc (stackArguments): added ===================================Engine65================================================== 2001-01-26 Steven Eker * AU_DagNode.hh (class AU_DagNode): updated markArguments() decl and made it private * AU_DagNode.cc (markArguments): rewritten with new semantics ===================================Engine64================================================== 2000-08-04 Steven Eker * AU_DagNode.cc (matchVariableWithExtension): don't pass inErrorSort to AU_Subproblem() * AU_Subproblem.cc (AU_Subproblem): don't handle inErrorSort arg (solveVariables): don't check inErrorSort * AU_Subproblem.hh (class AU_Subproblem): ctor no longer takes inErrorSort arg; deleted inErrorSort data member * AU_LhsCompiler.cc (compileLhs2): don't pass inErrorSort arg to AU_LhsAutomaton(); don't use it to determine greediness either * AU_FullMatcher.cc (buildLeftmostPath): don't pass inErrorSort arg to AU_Subproblem() * AU_LhsAutomaton.cc (AU_LhsAutomaton): don't handle inErrorSort arg (dump): don't dump inErrorSort * AU_LhsAutomaton.hh (class AU_LhsAutomaton): ctor decl no longer takes inErrorSort arg (class AU_LhsAutomaton): deleted inErrorSort data member 2000-08-02 Steven Eker * AU_Symbol.cc (eqRewrite): greatly simplified now that we no longer treat last strategy zero specially when term is in the error sort (memoStrategy): ditto 2000-07-31 Steven Eker * AU_Symbol.cc (computeBaseSort): don't handle union sorts ===================================Engine61================================================== 2000-07-28 Steven Eker * AU_RhsAutomaton.cc (remapIndices): added * AU_RhsAutomaton.hh (class AU_RhsAutomaton): added decl for remapIndices() 2000-07-26 Steven Eker * AU_LhsCompiler.cc (compileLhs2): use getNrProtectedVariables() instead of nrVariables() * AU_Term.cc (compileRhs2): use makeConstructionIndex() instead of allocateIndex() (insertAbstractionVariables): use makeProtectedVariable() instead of makeAbstractionVariable() 2000-07-25 Steven Eker * AU_Term.cc (findAvailableTerms): don't insert ground terms into availableTerms since we can't do left->right sharing on them * AU_RhsAutomaton.cc (construct): don't call buildAliens() (replace): don't call buildAliens() (dump): don't call RhsAutomaton::dump() * AU_Term.hh (class AU_Term): delete decl for compileRhs() * AU_Term.cc (compileRhs): deleted ===================================Engine60================================================== 2000-07-18 Steven Eker * AU_RhsAutomaton.hh (class AU_RhsAutomaton): removed extraneous decl for dump() 2000-07-11 Steven Eker * AU_Term.cc (findAvailableTerms): added (compileRhs2): added * AU_Term.hh (class AU_Term): added decls for findAvailableTerms() and compileRhs2() ===================================Engine59================================================== 2000-07-05 Steven Eker * AU_LhsCompiler.cc (compileLhs): becomes compileLhs2() * AU_Term.hh (class AU_Term): compileLhs() -> compileLhs2() 2000-06-26 Steven Eker * AU_LhsCompiler.cc (compileLhs): index() -> getIndex() (findConstraintPropagationSequence): index() -> getIndex() (unitVariable): lookupSort() -> getSort() (compileLhs): lookupSort() -> getSort() * AU_LhsAutomaton.cc (addRigidVariable): index() -> getIndex() (addRigidVariable): lookupSort() -> getSort() (addFlexVariable): lookupSort() -> getSort() (addFlexVariable): index() -> getIndex() * AU_Term.cc (compileRhs): modifiedIndex() -> getModifiedIndex() ===================================Engine58================================================== 2000-03-17 Steven Eker * AU_Term.cc (dump): ifdef'd * AU_Term.hh (class AU_Term): use NO_COPYING() macro; ifdef'd dump() decl * AU_RhsAutomaton.cc (dump): ifdef'd * AU_RhsAutomaton.hh (class AU_RhsAutomaton): use NO_COPYING() macro; ifdef'd dump() decl * AU_LhsAutomaton.cc (dump): ifdef'd * AU_LhsAutomaton.hh (class AU_LhsAutomaton): use NO_COPYING() macro; ifdef'd dump() decl * AU_Symbol.cc (eqRewrite): AdvisoryCheck() -> IssueAdvisory() (memoStrategy): AdvisoryCheck() -> IssueAdvisory() 2000-03-14 Steven Eker * AU_Layer.cc (solveVariables): call DagNode::okToCollectGarbage() after every failed call to bindVariables() to prevent build up of failed solutions ===================================Engine56================================================== 1999-11-03 Steven Eker * AU_Symbol.hh (class AU_Symbol): added decl for memoStrategy() * AU_Symbol.cc (eqRewrite): call memoStrategy() (memoStrategy): added 1999-10-29 Steven Eker * AU_Symbol.cc (AU_Symbol): use new AssociativeSymbol conventions ===================================Engine53================================================== 1999-10-26 Steven Eker * AU_LhsCompiler.cc (compileLhs): VariableTerm::dynamicCast() -> dynamic_cast() (*3) (addFixedLengthBlock): VariableTerm::dynamicCast() -> dynamic_cast() (findConstraintPropagationSequence): VariableTerm::dynamicCast() -> dynamic_cast() (*2) * AU_Term.cc (compileRhs): VariableTerm::dynamicCast() -> dynamic_cast() (insertAbstractionVariables): VariableTerm::dynamicCast() -> dynamic_cast() * AU_Symbol.cc (AU_Symbol): aded memoFlag arg * AU_Symbol.hh (class AU_Symbol): added memoFlag arg to ctor decl 1999-10-19 Steven Eker * AU_DagNode.hh (class AU_DagNode): added decl for getHashValue() * AU_DagNode.cc (getHashValue): added ===================================Engine52================================================== 1999-08-05 Steven Eker * AU_LhsAutomaton.cc (updateWholeBounds): plus() -> uplus() (updateFlexBounds): plus() -> uplus() * AU_Layer.cc (addTopVariable): plus() -> uplus() ===================================Engine51================================================== 1999-06-01 Steven Eker * AU_DagNode.cc (compareArguments): SPEED_HACK replaced by CONST_ARG_VEC_HACKs (markArguments): added CONST_ARG_VEC_HACK; turned for() loop into do while since we always have at least 2 arguments 1999-05-13 Steven Eker * AU_DagNode.cc (overwriteWithClone): copy theory byte (makeClone): copy theory byte 1999-05-12 Steven Eker * AU_Symbol.hh (class AU_Symbol): computeTrueSort() -> normalizeAndComputeTrueSort() * AU_Symbol.cc (computeTrueSort): become normalizeAndComputeTrueSort (normalizeAndComputeTrueSort): use fastComputeTrueSort() ===================================Engine49================================================== 1999-04-21 Steven Eker * AU_Term.cc (normalize): handle all identity case - fixing long standing bug ===================================Engine48================================================== ===================================Maude 1.0.2 released======================================= ===================================Maude 1.0.1 released======================================= 1999-03-02 Steven Eker * AU_Matcher.cc (forcedLoneVariableCase): fixed nasty bug in FAST_LONE_VARIABLE case where we were using wrong index var for destination * AU_LhsCompiler.cc (compileLhs): added code to generate fast lone variable case * AU_LhsAutomaton.cc (operator<<): added FAST_LONE_VARIABLE case * AU_Matcher.cc (forcedLoneVariableCase): added FAST_LONE_VARIABLE case (match): add FAST_LONE_VARIABLE to DebugAdvisoryCheck() and Assert() * AU_LhsAutomaton.hh (class AU_LhsAutomaton): added FAST_LONE_VARIABLE to MatchStrategy * AU_LhsAutomaton.cc (addRigidVariable): don't init structure field (addFlexVariable): don't init structure field (addFlexAbstractionVariable): don't init structure field (dump): don't print structure field (2 places) * AU_LhsAutomaton.hh (class AU_LhsAutomaton): deleted structure field from struct TopVariablesince in's not used - we decide at compile time whether we can use greedy algorithm based on sort structures. make index field a short so we can share space with flags and avoid hole with attendent purify warnings. 1999-02-27 Steven Eker * AU_DagNode.cc (normalizeAtTop): fixed bug in identity test (2 places) 1999-02-26 Steven Eker * AU_DagNode.cc (normalizeAtTop): need to be able to collect garbage in identity + expansion case (normalizeAtTop): added Assert to check buffer size in expansion + identities case * AU_Symbol.cc (eqRewrite): use new normalizeAtTop() semantics and return value (4 places) (computeTrueSort): use new normalizeAtTop() semantics and return value * AU_DagNode.hh (class AU_DagNode): added enum NormalizationResult (class AU_DagNode): updated decl for normalizeAtTop(); deleted decl for eliminateIdentity() * AU_DagNode.cc (normalizeAtTop): now do identity elimination (eliminateIdentity): deleted ===================================VectorExperiment========================================== Fri Nov 6 16:18:30 1998 Steven Eker * AU_Term.cc (deepCopy): -> deepCopy2() * AU_Term.hh (class AU_Term): deepCopy() -> deepCopy2() ===================================Engine43================================================== Thu Oct 8 14:00:28 1998 Steven Eker * AU_DagOperations.cc (eliminateForward): removed const_cast and added const * AU_Term.cc (compareArguments): (Term* version) added const_cast (compareArguments): (DagNode* version) added const_cast (compareArguments): removed const_cast and added const * AU_DagNode.cc (matchVariableWithExtension): static_cast -> const_cast * AU_DagOperations.cc (eliminateForward): inserted const_cast (eliminateBackward): inserted const_cast ===================================Engine41================================================== Wed Sep 23 09:50:26 1998 Steven Eker * AU_Symbol.cc (computeBaseSort): implemented lastIndex heuristic for uniSort case Fri Sep 18 14:21:32 1998 Steven Eker * AU_Symbol.cc (computeBaseSort): rewritten using setSortIndex(), lookupSortIndex(), traverse() and DagNode::leq() * AU_DagNode.cc (overwriteWithClone): use setSortIndex() (makeClone): use setSortIndex() * AU_Matcher.cc (matchRigidPart): use DagNode::leq() (checkLeftEnd): use DagNode::leq() (checkRightEnd): use DagNode::leq() (forcedLoneVariableCase): use DagNode::leq() * AU_GreedyMatcher.cc (greedyMatchFixedLengthBlock): use DagNode::leq() (greedyMatchVariableBlock): use DagNode::leq() (4 places) * AU_FullMatcher.cc (fullMatchFixedLengthBlock): use DagNode::leq() Fri Sep 11 18:11:19 1998 Steven Eker * AU_Matcher.cc (forcedLoneVariableCase): use new checkSort() convention * AU_Layer.cc (bindVariables): use new checkSort() convention * AU_Symbol.cc (computeBaseSort): use <=(DagNode*,Sort&) * AU_Matcher.cc (matchRigidPart): use <=(DagNode*,Sort&) (checkLeftEnd): use <=(DagNode*,Sort&) (checkRightEnd): use <=(DagNode*,Sort&) (forcedLoneVariableCase): use <=(DagNode*,Sort&) * AU_GreedyMatcher.cc (greedyMatchFixedLengthBlock): use <=(DagNode*,Sort&) (greedyMatchVariableBlock): use <=(DagNode*,Sort&) (4 places) * AU_FullMatcher.cc (fullMatchFixedLengthBlock): use <=(DagNode*,Sort&) ===================================Engine40================================================== Mon Jul 20 19:51:03 1998 Steven Eker * AU_Term.cc (AU_Term): new ctor added * AU_Term.hh (class AU_Term): added decls for deepCopy() and new ctor ===================================Engine39================================================== Wed Jun 10 14:31:27 1998 Steven Eker * AU_Term.cc (normalize): don't use earlyGetIdentity() * AU_Symbol.hh (class AU_Symbol): changed compileOpDeclarations() decl to postInterSymbolPass() * AU_Symbol.cc (compileOpDeclarations): changed to postInterSymbolPass() * AU_Term.hh (class AU_Term): updated normalize() decl * AU_Term.cc: IntSet -> NatSet (normalize): compute and set changed flag * AU_LhsCompiler.cc: IntSet -> NatSet * AU_Term.hh: IntSet -> NatSet ===================================Engine38================================================== Wed Jun 3 16:34:14 1998 Steven Eker * AU_Term.cc (normalize): use earlyGetIdentity() Fri Feb 20 17:31:47 1998 Steven Eker * AU_DagNode.cc (stackArguments): only stack arguments that are not flagged as unstackable ===================================Engine36================================================== Mon Feb 16 16:21:14 1998 Steven Eker * AU_LhsAutomaton.cc (AU_LhsAutomaton): fixed bug where we were deleting rigid part 2nd time instead of flex part Thu Feb 12 11:53:39 1998 Steven Eker * AU_FullMatcher.cc (determineRigidBlocks): moved to AU_Matcher.cc as this is now called only in match() * AU_LhsAutomaton.cc (~AU_LhsAutomaton): added * AU_LhsAutomaton.hh (class AU_LhsAutomaton): added decl for ~AU_LhsAutomaton() * AU_Term.cc (normalize): compare() == 0 changed to equal() * AU_Symbol.cc (calculateNrSubjectsMatched): compare() == 0 changed to equal() (3 places) * AU_Matcher.cc (matchRigidPart): compare() != 0 changed to !equal() (checkLeftEnd): compare() == 0 changed to equal() (checkRightEnd): compare() == 0 changed to equal() * AU_GreedyMatcher.cc (greedyMatchFixedLengthBlock): compare() != 0 changed to !equal() (2 places) * AU_FullMatcher.cc (fullMatchFixedLengthBlock): compare() != 0 changed to !equal() (2 places) * AU_DagOperations.cc (eliminateForward): compare() == 0 changed to equal() (4 places) (eliminateForward): compare() != 0 changed to !equal() * AU_DagNode.cc (eliminateIdentity): compare() == 0 changed to equal() * AU_CollapseMatcher.cc (uniqueCollapseMatch): compare() != 0 changed to !equal() (2 places) (multiwayCollapseMatch): compare() != 0 changed to !equal() (2 places) (multiwayCollapseMatch): compare() == 0 changed to equal() (2 places) Wed Feb 11 16:58:12 1998 Steven Eker * AU_GreedyMatcher.cc (greedyMatchFixedLengthBlock): need to call delete sp if we get a subproblem in the NON_GROUND_ALIEN case. This was a serious memory leak bug. * AU_FullMatcher.cc (buildLeftmostPath): use delete rather than calling deepSelfDestruct() * AU_Layer.cc (AU_Layer): use delete rather than calling deepSelfDestruct() * AU_Subproblem.hh (class AU_Subproblem): deleted decl for deepSelfDestruct() * AU_Subproblem.cc (deepSelfDestruct): deleted Tue Feb 10 15:24:31 1998 Steven Eker * AU_GreedyMatcher.cc (greedyMatch): don't call determineRigidBlocks() * AU_FullMatcher.cc (fullMatch): don't call determineRigidBlocks() * AU_Matcher.cc (match): call determineRigidBlocks() =============================Engine35======================================================== Fri Feb 6 11:40:28 1998 Steven Eker * AU_LhsCompiler.cc (compileLhs): avoid using greedy strategy if with are matching at top and we can collapse since greedy matcher does not ensure that enough has been matched if matching with extension. This is implicitly ensured if we cannot collapse. * AU_GreedyMatcher.cc (greedyMatchFixedLengthBlock): use scratch, not local for matching (greedyMatchRigidBlock): copy scratch back into local after success * AU_LhsAutomaton.hh (class AU_LhsAutomaton): updated greedy matcher function decls * AU_GreedyMatcher.cc (greedyMatchBlocks): if we have no rigid blocks, last and only variable can have both left and right extension (greedyMatchVariableBlock): major rewrite to handle subtleties introduced by extension Thu Feb 5 15:10:01 1998 Steven Eker * AU_GreedyMatcher.cc: created Wed Feb 4 17:59:13 1998 Steven Eker * AU_Layer.hh (class AU_Layer): added data member lastSubjectSubterm (class AU_Layer): deleted decl for computeAssignment() (class AU_Layer): updated decl for solvePartition() * AU_Layer.cc (bindVariables): no need to compute lastSubjectSubterm anymore (bindVariables): reorganization of loop; call to computeAssignment eliminated (computeAssignment): deleted (buildPartition): no need to compute lastSubjectSubterm anymore (solvePartition): removed lastSubjectSubterm arg (solvePartition): reorganized extraId calculations; now check that what a variable is already given by partition is strictly below its upperBound brefore considering it as a candidate for getting an extra identity (solveVariables): don't pass lastSubjectSubterm to solvePartition(); don't compute lastSubjectSubterm (link): simplified inner loop (initialize): initialize lastSubjectSubterm (AU_Layer): don't bother initializing oneSidedId and leftId as these will be initialized in initialize() Tue Feb 3 18:42:21 1998 Steven Eker * AU_Layer.hh (class AU_Layer): deleted decl for flagOneSidedId() (class AU_Layer): added decl for initialize() * AU_Layer.cc (flagOneSidedId): deleted * AU_Subproblem.hh (class AU_Subproblem): deleted data member subject * AU_Subproblem.cc (solveVariables): don't pass subject to AU_Layer::solveVariables() (AU_Subproblem): call AU_Layer::initialize() (complete): don't call AU_Layer::flagOneSidedId() (AU_Subproblem): don't initialize subject * AU_Layer.cc (bindVariables): don't pass subject to computeAssignment() (solveVariables): don't pass subject to bindVariables() or buildPartition() * AU_Layer.hh (class AU_Layer): update decls for solveVariables(), buildPartition(), bindVariables() and computeAssignment() * AU_Layer.cc (solveVariables): removed subject arg (buildPartition): removed subject arg (bindVariables): removed subject arg (computeAssignment): removed subject arg * AU_Layer.hh (class AU_Layer): added data member subject; reorganized data members * AU_Layer.cc (initialize): added Mon Feb 2 11:39:27 1998 Steven Eker * AU_Subproblem.cc (AU_Subproblem): don't initialize firstSubterm and lastSubterm * AU_Subproblem.hh (class AU_Subproblem): deleted data members firstSubterm and lastSubterm as they are never used one they have been copied into appropriate layers Fri Jan 30 11:36:21 1998 Steven Eker * AU_Layer.hh (firstSubtermMatched): deleted (lastSubtermMatched): deleted (class AU_Layer): deleted decls for firstSubtermMatched() and lastSubtermMatched() * AU_Subproblem.hh (class AU_Subproblem): deleted decl for fillOutExtensionInfo() * AU_Subproblem.cc (fillOutExtensionInfo): deleted * AU_DagNode.hh (class AU_DagNode): deleted decls for eliminateSubject() and checkArguments() * AU_DagNode.cc (checkArguments): deleted (eliminateSubject): deleted * AU_Layer.cc (bindVariables): deal with leftExtend/rightExtend correctly when nrVariables == 0 (bindVariables): in right extend case it need not be that firstSubterm == 0 * AU_Subproblem.cc (solveVariables): use bigEnough() and buildMatchedPortion() rather than callingfillOutExtensionInfo() * AU_ExtensionInfo.hh (bigEnough): added (class AU_ExtensionInfo): added decl for bigEnough() (setLastMatched): call setMatchedWhole(); * AU_Layer.cc (bindVariables): set left, right and extraIdentity extensionInfo * AU_Subproblem.cc (AU_Subproblem): pass extensionInfo to initializeFirst() and initializeLast() * AU_Layer.hh (class AU_Layer): updated initializeFirst() and initializeLast() decls * AU_Layer.cc (initializeFirst): set extensionInfo if needed (initializeFirst): set extensionInfo if needed * AU_Layer.hh (class AU_Layer): added data member extensionInfo * AU_DagOperations.cc (makeFragment): fixed initialization bug; greatly simplified * AU_ExtensionInfo.cc (buildMatchedPortion): greatly simplified and bug removed by using DagNode::makeFragment() * AU_Layer.cc (computeAssignment): use DagNode::makeFragment() * AU_DagNode.hh (class AU_DagNode): added decl for makeFragment() * AU_DagOperations.cc (makeFragment): added Thu Jan 29 10:17:25 1998 Steven Eker * AU_FullMatcher.cc (determineRigidBlocks): rewritten to fix horrible bug where we were incrementing r.nrSubjectsToLeave before finishing current block so we were in effect incrementing nrSubjectsToLeave for wrong block * AU_Layer.cc (computeAssignment): fixed bug that aflicted left id case * AU_Layer.hh (class AU_Layer): flagOneSidedId() decl updated * AU_Layer.cc (flagOneSidedId): name clash problem; leftId arg changed to leftIdFlag * AU_Subproblem.cc (complete): nrLayers, not nrPatternLayers for loop inserting oneSidedId info * AU_FullMatcher.cc (addVariableBlocks): awkward variables get a lower bound of 0 rather than 1 * AU_Layer.cc (bindVariables): rewritten using DagNode::eliminateForward() (computeAssignment): handle extra id case (bindVariables): deal with the case where variable can take one sided identity because it is at the wrong extreme end (solvePartition): fixed i++ instead of i-- bug * AU_Layer.hh (class AU_Layer): updated solvePartition() decl * AU_Layer.cc (solvePartition): take lastSubjectSubterm arg; use this to help determine if a variable can take an extra identity in the one sided identity case. Wed Jan 28 11:32:50 1998 Steven Eker * AU_Layer.cc (buildPartition): rewritten to take account of nasty bindings; no longer return 0 under any circumstances (solveVariables): don't bother checking for 0 partition (buildPartition): added DebugAdvisoryCheck for nast binding * AU_Layer.hh (class AU_Layer): added decl for solvePartition() (class AU_Layer): added decl for flagOneSidedId() * AU_LhsAutomaton.hh (class AU_LhsAutomaton): deleted decl for calculateNrSubjectsMatched() * AU_FullMatcher.cc (determineRigidBlocks): use AU_Symbol::calculateNrSubjectsMatched() (calculateNrSubjectsMatched): deleted * AU_Symbol.hh (class AU_Symbol): added decl for calculateNrSubjectsMatched() * AU_Symbol.cc (calculateNrSubjectsMatched): added * AU_Subproblem.cc (complete): call link() rather than complete (complete): call flagOneSidedId() * AU_Layer.cc (complete): renamed to link() (flagOneSidedId): added (AU_Layer): clear oneSidedId and leftId * AU_Layer.hh (class AU_Layer): added data members oneSidedId and leftId; (class AU_Layer): complete renamed to link() * AU_Layer.cc (solvePartition): added (solvePartition): added to handle extra identities (solveVariables): use solvePartition() * AU_Layer.hh (class AU_Layer): added extraId field to TopVariable * AU_ExtensionInfo.cc (buildMatchedPortion): simplified using oneSidedId() Tue Jan 27 11:01:55 1998 Steven Eker * AU_FullMatcher.cc (addVariableBlocks): use NOT_FIXED (determineRigidBlocks): use NOT_FIXED (fullMatchRigidBlock2): use NOT_FIXED (buildLeftmostPath): removed comment on nextSubject update since nasty binding will now never occur rigid block * AU_LhsAutomaton.cc (complete): use NOT_FIXED * AU_LhsAutomaton.hh (class AU_LhsAutomaton): added Special value NOT_FIXED = -1 * AU_FullMatcher.cc (addVariableBlocks): missing continue in nasty case added (determineRigidBlocks): Assert() that if we have a nasty binding we must have extension. (determineRigidBlocks): rewritten; make sure that in nasty case we incresse r.nrSubjectsToLeave rather than r.nrSubjectsForUs (calculateNrSubjectsMatched): return max # of subject we could match in the nasty case instead of min (addVariableBlocks): adjusted as f.variable.nastyBinding now holds max rather than min * AU_LhsAutomaton.hh (class AU_LhsAutomaton): updated calculateNrSubjectsMatched() decl * AU_FullMatcher.cc (determineRigidBlocks): handle variables with nasty binding by treating them as if they are unbound. (determineRigidBlocks): added DebugAdvisoryCheck()s for nasty bindings (calculateNrSubjectsMatched): pass back nasty flag; DebugAdvisoryCheck()s removed (addVariableBlocks): handle variables with nasty bindings * AU_LhsAutomaton.hh (class AU_LhsAutomaton): added nastyBinding field to struct TopVariable * AU_FullMatcher.cc (calculateNrSubjectsMatched): added DebugAdvisoryCheck()s for nasty bindings; now decrement nrArgs in this case Mon Jan 26 18:07:45 1998 Steven Eker * AU_FullMatcher.cc (determineRigidBlocks): assert that if last rigid block is terminated by end of (unused) flex part rather than by an unbound variable then we must have extension Fri Jan 23 18:20:51 1998 Steven Eker * AU_FullMatcher.cc (buildLeftmostPath): added Assert to check that there are unbound variable(s) before first rigid block and after last rigid block if there is no extension. (buildLeftmostPath): removed code for special case where flex part consists of a single rigid block (and no extension) since this case can no longer occur (buildLeftmostPath): removed code for adjusting min and max shifts where ther was no extension and no unbound variables before first rigid block or after last rigid block since these cases can no longer occur (addRemainingPaths): removed code for case where these are no unbound variables to the left of 1st rigid block (and no extension) since this case can no longer occur (fullMatchRigidBlock2): use eliminateForward() in place of eliminateSubject(); rather aribitrarily pass limit = rightPos to avoid triggering eliminateForward() precondition Assert() - may be we should be smarter? Thu Jan 22 11:03:55 1998 Steven Eker * AU_FullMatcher.cc (calculateNrSubjectsMatched): added (determineRigidBlocks): rewritten using calculateNrSubjectsMatched() Wed Jan 21 11:05:37 1998 Steven Eker * AU_Matcher.cc (match): added DebugAdvisoryCheck()s for match time match strategy changes (matchRigidPart): fixed compare() == 0 bug (should have been !=) * AU_FullMatcher.cc (addVariableBlocks): use flexLeftPos and flexRightPos to determine to section of flex part to be examined for variables (determineRigidBlocks): use flexLeftPos and flexRightPos to determine to section of flex part to be examined for rigid blocks and end of last rigid block if we don't end in a non-rigid variable (buildLeftmostPath): use flexRightPos rather than last Tue Jan 20 11:24:48 1998 Steven Eker * AU_LhsAutomaton.hh (class AU_LhsAutomaton): added enum Special with single constant STALLED * AU_Matcher.cc (checkLeftEnd): added (checkRightEnd): added (checkForRigidEnds): complete rewritten yet again, this time using checkLeftEnd() and checkRightEnd() to eliminate a rats nest of gotos * AU_LhsAutomaton.hh (class AU_LhsAutomaton): added data members flexLeftPos and flexRightPos * AU_Matcher.cc (match): added code to check nrArgs against whole bounds (match): Only call matchRigidPart in no extension case; tidied no extension case (matchRigidPart): removed code that checked nrArgs against whole bounds (checkForRigidEnds): heavily rewritten with stalled flags and new exit conditions for loop Mon Jan 19 10:58:34 1998 Steven Eker * AU_Matcher.cc (matchRigidPart): tidied up; nrSubtermsRemaining deleted (match): now call checkForRigidEnds() in lone variable case just in case lone variable is bound. (matchRigidPart): more tidying (forcedLoneVariableCase): assert that lone variable is unbound; lone variable bound case code deleted as this case will now be caught by checkForRigidEnds() and transformed into ground out case. * AU_LhsAutomaton.hh (class AU_LhsAutomaton): added decl for checkForRigidEnds(); deleted decl for matchRigidSubterm() * AU_Matcher.cc (match): rewritten; we now try to force ends of flex part if there is no extension (forcedLoneVariableCase): use flexPart[flexLeftPos] rather than flexPart[0]; no longer assert that flex part has length 1 (matchRigidPart): restored old version as there is not going to be enough overlap with checkForRigidInFlex() to make it worth pulling common parts into another function (checkForRigidInFlex): added (match): completely rewritten to use checkForRigidEnds() (checkForRigidInFlex): renamed to checkForRigidEnds() (matchRigidSubterm): deleted * AU_LhsAutomaton.hh (class AU_LhsAutomaton): added decl for matchRigidSubterm(); deleted decl for boundsChecks() * AU_Matcher.cc (matchRigidSubterm): added (matchRigidPart): rewrittem using matchRigidSubterm Fri Jan 16 16:23:14 1998 Steven Eker * AU_Term.cc (insertAbstractionVariables): changed AdvisoryCheck() to DebugAdvisoryCheck() * AU_Subproblem.cc (fillOutExtensionInfo): call setExtraIdentity(false) as a temporary hack * AU_LhsCompiler.cc (compileLhs): use oneSidedId() (analyseConstraintPropagation): use oneSidedId() * AU_DagNode.cc (matchVariableWithExtension): use oneSidedId() * AU_Symbol.cc (AU_Symbol): initialize oneSidedIdFlag * AU_Symbol.hh (oneSidedId): added (class AU_Symbol): added data member oneSidedIdFlag and decl for oneSidedId() * AU_DagNode.cc (partialReplace): removed Assert that we don't replace a single arg (partialConstruct): removed Assert that we don't replace a single arg (matchVariableWithExtension): allow variable to match just one thing if we have a one sided identity * AU_ExtensionInfo.cc (makeClone): copy extraIdentityFlag (copy): copy extraIdentityFlag (buildMatchedPortion): handle extra identity case * AU_ExtensionInfo.hh (setExtraIdentity): added (class AU_ExtensionInfo): added data member extraIdentityFlag and decl for setExtraIdentity() Tue Jan 13 10:57:17 1998 Steven Eker * AU_LhsCompiler.cc (compileLhs): don't employ greedy or lone variable strategies if we have a one sided identity (analyseConstraintPropagation): don't propagate constraints on a lone variable if we have a one sided identity * AU_DagOperations.cc (eliminateForward): fixed bugs where we were not testing compare result against 0 (eliminateBackward): fixed symmtric bugs * AU_Matcher.cc (matchRigidPart): rewrote bound variable case using eliminateForward() and eliminateBackward() Mon Jan 12 17:44:19 1998 Steven Eker * AU_DagNode.hh (class AU_DagNode): added decls for eliminateForward() and eliminateBackward() * AU_DagOperations.cc (eliminateForward): added; the idea is that this function will match a target (typically avariable binding) against our dag node from a given position taking into to account the following possibilities: (a) the target might be our identity (b) the target might have our top symbol (c) the target might have our top symbol and have our identity underneath it (in first or last position). This pathogical case arises if we have a one sided identity. (eliminateBackward): added; symmetric to eliminateForward() for use in matchinging the rigid part. Fri Jan 9 11:13:19 1998 Steven Eker * AU_LhsAutomaton.cc (dump): use bool() to make takeIdentity and awkward flags print correctly * AU_Layer.cc (buildPartition): handle case where variable is bound to identity (may be by previous subproblem). Thu Jan 8 11:03:26 1998 Steven Eker * AU_Subproblem.cc (fillOutExtensionInfo): rewritten; only check matched portion if pattern ws in the error sort. * AU_Layer.cc (bindVariables): don't return out of loop with anything other than false otherwise we may return a solution with unbound variables Wed Jan 7 15:25:37 1998 Steven Eker * AU_FullMatcher.cc (fullMatchRigidBlock2): implemented (fullMatchFixedLengthBlock): implemented (fullMatch): need to call AU_Subproblem::complete() after subproblem has all the nodes added to do downTarget calculations * AU_DagNode.cc (eliminateSubject): handle the possibility that the target may be our identity * AU_FullMatcher.cc (addRemainingPaths): implemented * AU_LhsAutomaton.hh (class AU_LhsAutomaton): added data member nrSubjectsForRightVars * AU_FullMatcher.cc (determineRigidBlocks): treat awkward variables bound to identity as if they were bound to an alien (buildLeftmostPath): implemented (determineRigidBlocks): calculate nrSubjectsForRightVars Fri Jan 2 14:30:02 1998 Steven Eker * AU_LhsCompiler.cc (compileLhs): chnaged code to reflect new conventions for addFlexVariable() and addRigidVariable() regarding awkward variables * AU_LhsAutomaton.hh (class AU_LhsAutomaton): updated addFlexAbstractionVariable() decl * AU_LhsAutomaton.cc (addRigidVariable): set awkward = false (addFlexVariable): set awkward flag correctly (dump): print awkward flag (addFlexAbstractionVariable): take awkward arg and set awkward flag * AU_LhsAutomaton.hh (class AU_LhsAutomaton): added awkward flag to struct TopVariable * AU_CollapseMatcher.cc (uniqueCollapseMatch): deal with rigid part since it is NOT the case that the rigid part need be empty for collapse to occur. (multiwayCollapseMatch): deal with rigid part; in particular the case where we have a matching variable in the rigid part. nrTopVariables replaced by nrFlexVariables throughout file. (bindUnboundVariablesToIdentity): assert that variables in flex part can take identity. (multiwayCollapseMatch): changed many comments to reflect that repeated variables are not a problem and that they are handled correctly implicity though in some cases inefficiently. Removed some commented out code related to repeated variables Wed Dec 24 14:26:24 1997 Steven Eker * AU_LhsAutomaton.hh (class AU_LhsAutomaton): added decls for uniqueCollapseMatch() and multiwayCollapseMatch() * AU_CollapseMatcher.cc: created * AU_FullMatcher.cc (determineRigidBlocks): take identity into account when calculating number of subjects used up by variable and rigid blocks. * AU_LhsAutomaton.hh (class AU_LhsAutomaton): struct RigidBlock now has nrSubjectsForUs rather than nrExtraSubjects since bound variable may be bound to our identity * AU_FullMatcher.cc (fullMatch): need to add our AU_Subproblem to subproblems before we let addVariableBlocks() add variable abstraction subproblems * AU_LhsAutomaton.hh (class AU_LhsAutomaton): updated decl for addVariableBlocks() * AU_FullMatcher.cc: created * AU_LhsAutomaton.cc (dump): dump uniqueCollapseAutomaton if it exists * AU_LhsCompiler.cc (compileLhs): make uniqueCollapseAutomaton if needed * AU_LhsAutomaton.cc (AU_LhsAutomaton): added uniqueCollapseAutomaton arg * AU_LhsAutomaton.hh (class AU_LhsAutomaton): added data member uniqueCollapseAutomaton (class AU_LhsAutomaton): added uniqueCollapseAutomaton arg to ctor decl Tue Dec 23 10:58:30 1997 Steven Eker * AU_LhsAutomaton.cc (addFlexAbstractionVariable): removed shiftFactor arg (dump): don't try to print name of an abstraction variable * AU_LhsAutomaton.hh (class AU_LhsAutomaton): removed shiftFactor arg from addFlexAbstractionVariable() decl * AU_LhsCompiler.cc (compileLhs): when we add a flex variable in the general case we have to pass idPossible = true if matchAtTop because of extension. (compileLhs): don't pass shiftFactor to addFlexAbstractionVariable() since this will always be UNDEFINED (2 places). (addFixedLengthBlock): always pass idPossible = false to addFlexVariable() variable in fixed part can never take identity. * AU_Term.hh (class AU_Term): updated unitVariable() decl * AU_LhsCompiler.cc (compileLhs): handle flex lengths of 0 and 1 specially. (compileLhs): use greedySafe() (compileLhs): added Asserts (findConstraintPropagationSequence): code cleaning (compileLhs): code cleaning (unitVariable): removed matchAtTop argument and simplified; made local_inline (findConstraintPropagationSequence): don't pass matchAtTop argument to unitVariable() (compileLhs): rewritten; now explicity look for awkward variables; Mon Dec 22 14:40:40 1997 Steven Eker * AU_LhsCompiler.cc (compileLhs): handle identity/variable abstraction in flex part. * AU_Term.hh (class AU_Term): added decl for unitVariable() * AU_LhsCompiler.cc (unitVariable): added (findConstraintPropagationSequence): simplified using unitVariable() Fri Dec 19 10:18:25 1997 Steven Eker * AU_Term.hh (idPossible): made const (class AU_Term): updated decl for idPossible() * AU_LhsCompiler.cc (compileLhs): simplfied using idPossible() (2 places) (addFixedLengthBlock): simplfied using idPossible() (findConstraintPropagationSequence): rewritten do deal with abstracted aliens and variables that can take identity * AU_Term.cc (normalize): use idPossible() (analyseCollapses): use idPossible() (analyseCollapses): simplified * AU_Term.hh (idPossible): added (class AU_Term): added decl for idPossible() * AU_LhsCompiler.cc (compileLhs): pass idPossible args to addRigidVariable() and addFlexVariable() (addFixedLengthBlock): pass idPossible args to addFlexVariable() * AU_LhsAutomaton.hh (class AU_LhsAutomaton): updated decls for addRigidVariable() and addFlexVariable() * AU_LhsAutomaton.cc (addRigidVariable): added idPossible arg so that we can rule out left end variable taking id if left id missing and similarly with right (addFlexVariable): added idPossible arg Thu Dec 18 11:32:31 1997 Steven Eker * AU_LhsCompiler.cc (compileLhs): pass collapsePossible flag to AU_LhsAutomaton (compileLhs): inErrorSort implies not greedy * AU_LhsAutomaton.cc (dump): updated * AU_LhsAutomaton.hh (class AU_LhsAutomaton): added decl for addFlexAbstractionVariable() * AU_LhsAutomaton.cc (AU_LhsAutomaton): take collapsePossible arg (addRigidVariable): deal with variables that may take identity; clear abstracted pointer. (addFlexVariable): deal with variables that may take identity; clear abstracted pointer. (addFlexAbstractionVariable): added * AU_LhsAutomaton.hh (class AU_LhsAutomaton): added collapsePossible arg to ctor * AU_LhsCompiler.cc: created (analyseConstraintPropagation): handle the case where flex part conatins a lone abstracted term * AU_Term.cc (normalize): handle collapse case Sun Dec 14 15:28:05 1997 Steven Eker * AU_Layer.cc (bindVariables): handle the case where a variable is already bound to our identity. * AU_Subproblem.cc (solvePatterns): use AU_Layer::reset() * AU_Layer.hh (reset): added (class AU_Layer): added reset() decl (class AU_Layer): class AU_Subproblem is no longer a friend * AU_Subproblem.cc (AU_Subproblem): use initializeFirst() and initializeLast() * AU_Layer.hh (class AU_Layer): added decls for initializeFirst() and initializeLast() * AU_Layer.cc (initializeFirst): added (initializeLast): added * AU_Subproblem.cc (fillOutExtensionInfo): use firstSubtermMatched() and lastSubtermMatched(); * AU_Layer.hh (lastSubtermMatched): added (firstSubtermMatched): added (class AU_Subproblem): added decls Sat Dec 13 17:03:07 1997 Steven Eker * AU_DagNode.cc (matchVariableWithExtension): pass Sort* rather than SortCode to addTopVariable(); (matchVariableWithExtension): call complete(); * AU_Subproblem.hh (class AU_Subproblem): added decl for fillOutExtensionInfo() * AU_Subproblem.cc (fillOutExtensionInfo): added (solveVariables): simplify using fillOutExtensionInfo() Fri Dec 12 16:49:13 1997 Steven Eker * AU_Subproblem.cc (solveVariables): check to see if matched portion in error sort (solveVariables): check to see if matched portion is too small (less than two terms). This is possible because pattern could be variable or parts of big pattern could match take identity. * AU_Subproblem.hh (class AU_Subproblem): added decl for complete() * AU_Subproblem.cc (complete): added (addNode): deleted * AU_Subproblem.hh (addNode): added * AU_Layer.cc (solvePatterns2): use Assert(d >= totalLowerBound) rather than Assert(d >= prevVariables.length()) since some variables may be able to take identity and may not need any subterm (addTopVariable): update totalLowerBound (AU_Layer): initialize totalLowerBound * AU_Layer.hh (class AU_Layer): added decls for addTopVariable(), addNode(), complete() (class AU_Layer): added data member totalLowerBound * AU_Layer.cc (addNode): added (complete): added * AU_Subproblem.hh (class AU_Subproblem): deleted ~AU_Subproblem() decl * AU_Subproblem.cc (~AU_Subproblem): deleted (addTopVariable): deleted * AU_Subproblem.hh (addTopVariable): added (class AU_Subproblem): updated addTopVariable() decl * AU_Layer.cc (addTopVariable): added Thu Dec 11 18:08:35 1997 Steven Eker * AU_DagNode.hh (class AU_DagNode): AU_Layer replaces AU_Subproblem as a friend (class AU_DagNode): checkArguments() 1st arg made const * AU_Layer.cc: heavily rewritten to handle identity case Wed Dec 10 11:12:56 1997 Steven Eker * AU_Layer.cc: created * AU_Layer.hh (class AU_Layer): created * AU_Subproblem.hh (class AU_Subproblem): redesigned using AU_Layer * AU_Subproblem.cc: created * AU_DagNode.hh (class AU_DagNode): target arg of checkArguments() should be a reference * AU_DagNode.cc (checkArguments): added Tue Dec 9 16:07:04 1997 Steven Eker * AU_DagNode.hh (class AU_DagNode): added checkArguments() decl * AU_Matcher.cc (forcedLoneVariableCase): heavily rewritten * AU_LhsAutomaton.hh (class AU_LhsAutomaton): deleted boundsChecks() decl (class AU_LhsAutomaton): added collapseMatch() decl * AU_Matcher.cc: created (boundsChecks): deleted (match): heavily rewritten (matchRigidPart): heavily rewritten; removed several bugs inherited from A_Theory version Mon Dec 8 10:59:23 1997 Steven Eker * AU_Term.cc (dump): added (analyseCollapses): added (normalize): make sure we contract argArray after deleting identity elements (insertAbstractionVariables): added * AU_Term.hh (class AU_Term): added decls for analyseCollapses() insertAbstractionVariables(), and dump() * AU_Term.cc: created (normalize): fixed serious bug that was hand over from A_Term: we use wrong argArray length for computing hash value. * AU_ArgumentIterator.hh (class AU_ArgumentIterator): use AU_Term::tuple (AU_ArgumentIterator): use AU_Term::tuple * AU_ArgumentIterator.cc (argument): use AU_Term::tuple * AU_Term.hh (class AU_Term): added struct Tuple, argArray becomes Vector Sun Dec 7 15:02:26 1997 Steven Eker * AU_DagNode.cc (overwriteWithClone): don't put symbol() in local Symbol* variable (makeClone): don't put symbol() in local Symbol* variable * AU_DagNode.hh (class AU_DagNode): ctor takes AU_Symbol* rather than Symbol* * AU_RhsAutomaton.cc: created * AU_RhsAutomaton.hh (class AU_RhsAutomaton): created * AU_ArgumentIterator.cc: created * AU_Subproblem.hh (class AU_Subproblem): created * AU_ArgumentIterator.hh (class AU_ArgumentIterator): created Fri Dec 5 10:46:19 1997 Steven Eker * AU_Term.hh (class AU_Term): created * AU_ExtensionInfo.cc: created * AU_ExtensionInfo.hh (class AU_ExtensionInfo): created * AU_DagArgumentIterator.cc: created * AU_DagNode.hh (symbol): added * AU_DagArgumentIterator.hh (class AU_DagArgumentIterator): created * AU_Theory.hh: created * AU_DagNode.cc: created * AU_Symbol.cc (eqRewrite): rewritten along the lines of ACU_Symbol::eqRewrite() (computeBaseSort): use producedByAssignment() optimization in uniform sort case * AU_DagNode.hh (class AU_DagNode): created * AU_Symbol.cc (computeBaseSort): use local static sortIndexBuffer in place of utilityBuffer deleted utilityBuffer * AU_Symbol.hh (class AU_Symbol): deleted utilityBuffer decl * AU_Symbol.cc: created * AU_Symbol.hh (class AU_Symbol): created Maude-Maude3.2/src/AU_Theory/ChangeLog.A_Theory000066400000000000000000000605541420036611000213010ustar00rootroot00000000000000Fri Dec 5 11:25:01 1997 Steven Eker * A_Symbol.cc (finalizeSortInfo): deleted * A_Symbol.hh (class A_Symbol): deleted finalizeSortInfo() decl Thu Dec 4 12:54:26 1997 Steven Eker * A_Symbol.cc (A_Symbol): deleted inert arg * A_Symbol.hh (class A_Symbol): deleted inert arg from ctor decl Tue Dec 2 16:41:48 1997 Steven Eker * A_Symbol.cc (copyAndReduceSubterms): use DagNode::copyAndReduce() Mon Dec 1 12:11:25 1997 Steven Eker * A_Symbol.cc (eqRewrite): use getPermuteStrategy() * A_GreedyMatcher.cc (greedyMatchVariableBlock): PermuteSymbol -> AssociativeSymbol (*3) * A_DagNode.cc (copyEagerUptoReduced2): use getPermuteStrategy(); PermuteSymbol -> BinarySymbol * A_LhsCompiler.cc (compileLhs): PermuteSymbol -> AssociativeSymbol * A_Term.cc (findEagerVariables): use getPermuteStrategy(); PermuteSymbol -> BinarySymbol (*3) (markEagerArguments): use getPermuteStrategy(); PermuteSymbol -> BinarySymbol * A_LhsAutomaton.hh (class A_LhsAutomaton): PermuteSymbol -> AssociativeSymbol * A_Symbol.cc (A_Symbol): PermuteSymbol -> AssociativeSymbol (eqRewrite): remove PermuteSymbol context (*3) * A_Symbol.hh (class A_Symbol): PermuteSymbol -> AssociativeSymbol Tue Nov 25 11:58:40 1997 Steven Eker * A_RhsAutomaton.cc (buildAliens): deleted (dump): implemented * A_RhsAutomaton.hh (class A_RhsAutomaton): updated dump() decl; deleted addAlien(), buildAliens() decls; deleted aliens data member (addAlien): deleted * A_LhsAutomaton.cc (dump): updated * A_LhsAutomaton.hh (class A_LhsAutomaton): updated dump() decl ===============================Engine33=================================================== Tue Nov 11 17:04:26 1997 Steven Eker * A_LhsAutomaton.cc (forcedLoneVariableCase): fixed long standing bug; in lone variable bound case if b->symbol() != topSymbol then we need to check for nrSubjects != 1 to return false and not nrSubjects == 1 ===============================Engine31=================================================== Wed Oct 29 15:35:35 1997 Steven Eker * A_Subproblem.cc (solveVariableBlocks): setWholeFlag() -> setMatchedWhole() * A_DagNode.cc (matchVariableWithExtension): call setValidAfterMatch(false) * A_GreedyMatcher.cc (greedyMatch): setWholeFlag() -> setMatchedWhole() (7 places) (greedyMatch): call setValidAfterMatch(true) if there is extension info * A_FullMatcher.cc (fullMatch): call setValidAfterMatch(false) if there is extension information * A_LhsAutomaton.cc (match): move matchAtTop == (extensionInfo != 0) assertion to after check of top symbol since caller need not know that we can't collapse and could fail to pass us extensionInfo if subject was in a theory without extension. * A_ExtensionInfo.cc (copy): use setValidAfterMatch(), validAfterMatch() and setMatchedWhole() (makeClone): use setValidAfterMatch(), validAfterMatch() and setMatchedWhole() Mon Oct 27 11:54:51 1997 Steven Eker * A_ExtensionInfo.cc (makeClone): added (copy): added * A_ExtensionInfo.hh (class A_ExtensionInfo): added decls for makeClone() and copy() (class A_ExtensionInfo): subject made non const in order to do copy Fri Oct 24 14:59:25 1997 Steven Eker * A_Symbol.cc (ruleRewrite): use new A_ExtensionInfo ctor (eqRewrite): use new A_ExtensionInfo ctor (3 places) * A_DagNode.cc (makeExtensionInfo): use new A_ExtensionInfo ctor * A_DagNode.hh (class A_DagNode): class A_ExtensionInfo is now a friend * A_Theory.cc: deleted * A_ExtensionInfo.cc: created * A_ExtensionInfo.hh (class A_ExtensionInfo): added data member subject and decls for explicit ctor and buildMatchedPortion() (A_ExtensionInfo): added Tue Oct 21 12:32:51 1997 Steven Eker * A_Term.cc (dagify2): switched to new convention * A_Term.hh (class A_Term): switched dagify2() decl to new convention Wed Oct 15 16:12:36 1997 Steven Eker * A_LhsCompiler.cc (compileLhs): use VariableTerm::dynamicCast() (2 places) (addFixedLengthBlock): use VariableTerm::dynamicCast() (findConstraintPropagationSequence): use VariableTerm::dynamicCast() (2 places) * A_Term.cc (compileRhs): use VariableTerm::dynamicCast() * A_Symbol.cc (A_Symbol): rewritten for new symbol conventions * A_Symbol.hh (class A_Symbol): removed constructor arg from ctor Fri Oct 10 18:42:16 1997 Steven Eker * A_LhsAutomaton.hh (class A_LhsAutomaton): VariableIndex -> VariableInfo * A_LhsAutomaton.cc (dump): VariableIndex -> VariableInfo (dump): index2Symbol() -> index2Variable() ===============================Engine30=================================================== Tue Oct 7 15:38:16 1997 Steven Eker * A_Symbol.cc (makeDagNode): added * A_Symbol.hh (class A_Symbol): added decl for makeDagNode() Fri Oct 3 19:35:02 1997 Steven Eker * A_Term.cc (compileRhs): DataSet -> TermSet (dagify2): DataSet -> TermSet * A_Term.hh (class A_Term): DataSet -> TermSet ===============================Engine29=================================================== Thu Oct 2 18:01:02 1997 Steven Eker * A_Term.hh (class A_Term): updated compileRhs() decl * A_Term.cc (compileRhs): adapted to use DataSet& compiled Tue Sep 30 12:39:29 1997 Steven Eker * A_Term.hh (class A_Term): dagify() decl chaged to dagify2() * A_Term.cc (normalize): now calculate hash value (dagify2): adapted from dagify() Thu Sep 25 16:49:08 1997 Steven Eker * A_Symbol.hh (class A_Symbol): deleted decl for specificRewrite() * A_Symbol.cc (specificRewrite): deleted ===============================Engine28=================================================== Tue Aug 19 12:37:48 1997 Steven Eker * A_DagNode.hh (getArgument): added (nrArgs): added (class A_DagNode): added nrArgs() and getArgument() decls as fast theory specific interface to argument list for code outside the A_Theory that is A_Theory aware (maybe classes derived from A_Symbol). Fri Jul 25 18:02:05 1997 Steven Eker * A_DagNode.cc (partialReplace): removed Assert(getSortIndex() == Sort::SORT_UNKNOWN, cerr << "shouldn't have valid sort"); since if node was original created by matcher it may well have valid sort Thu Jul 24 11:39:15 1997 Steven Eker * A_Symbol.cc (eqRewrite): added normalizeAtTop() calls after sort computation for LAZY and SEMI_EAGER cases; this fixes a bug introduced by just-in-time normalization Wed Jul 23 11:46:25 1997 Steven Eker * A_DagNode.cc (partialReplace): added call to repudiateSortInfo() * A_Term.cc (normalize): added full flag; only do flattening if full flag true * A_Term.hh (class A_Term): added full flag to normalize() Mon Jul 21 11:27:59 1997 Steven Eker * A_Symbol.cc (computeTrueSort): do normalization * A_DagNode.cc (partialReplace): simplified; no longer normalize (partialConstruct): simplified; no longer normalize (copyWithReplacement): simplified; no longer normalize (partialReplace): put in Assert to ensure we don't have a valid sort * A_RhsAutomaton.hh (class A_RhsAutomaton): updated buildAliens() decl * A_RhsAutomaton.cc (buildAliens): simplified; no longer do flattening calcs (buildArguments): simplified; no longer flatten (replace): simplified (construct): simplified ===============================Engine26b=================================================== Tue Jul 15 15:42:42 1997 Steven Eker * A_Symbol.cc (A_Symbol): added inert arg (eqRewrite): changed inert() call to equationFree() * A_Symbol.hh (class A_Symbol): added inert arg to ctor ================================Engine26==================================================== Fri Jun 27 16:13:40 1997 Steven Eker * A_DagNode.hh (class A_DagNode): copyEagerUptoReduced2() and clearCopyPointers2() made private * A_Symbol.cc (copyAndReduceSubterms): copyEagerUptoReduced() and clearCopyPointers() replaced by copyReducible() Wed Jun 25 15:16:51 1997 Steven Eker * A_Symbol.cc: added #include "variable.hh" Tue Jun 24 16:22:21 1997 Steven Eker * A_LhsAutomaton.hh (class A_LhsAutomaton): Variable* -> VariableTerm* for addRigidVariable() and addFlexVariable() decls * A_LhsAutomaton.cc (addRigidVariable): use VariableTerm* (addFlexVariable): use VariableTerm* * A_LhsCompiler.cc (analyseConstraintPropagation): use VariableTerm::downCast() (compileLhs): use VariableTerm::downCast() (addFixedLengthBlock): use VariableTerm::downCast() (findConstraintPropagationSequence): use VariableTerm::downCast() * A_Term.cc: added #include "variableTerm.hh" (compileRhs): use VariableTerm::downCast() Thu Jun 19 10:38:43 1997 Steven Eker * A_Symbol.cc: deleted #include "unionFind.hh" Tue Jun 17 16:55:43 1997 Steven Eker * A_Symbol.hh (class A_Symbol): deleted decl for compileOpDeclarations() * A_Symbol.cc (compileOpDeclarations): deleted * A_Symbol.hh (class A_Symbol): added decl for finalizeSortInfo() * A_Symbol.cc (finalizeSortInfo): added Fri Jun 6 18:44:49 1997 Steven Eker * A_DagNode.hh (class A_DagNode): matchVariableWithExtension() decl added * A_Symbol.hh (class A_Symbol): matchVariableWithExtension() decl deleted * A_DagNode.cc (matchVariableWithExtension): added * A_Symbol.cc (matchVariableWithExtension): deleted Thu Jun 5 11:55:09 1997 Steven Eker * A_DagNode.cc (copyEagerUptoReduced2): adapted from old copyEagerUptoReduced() (clearCopyPointers2): adapted from old clearCopyPointers() * A_DagNode.hh (class A_DagNode): decls for clearCopyPointers() and copyEagerUptoReduced() changed * A_Subproblem.hh (class A_Subproblem): updated computeAssignment() decl * A_Subproblem.cc (bindVariables): use checkSort() to check the sort of DagNode returned from computeAssignment(); don't pass context to computeAssignment() (computeAssignment): deleted context arg; don't compute sort of newly created DagNode * A_Symbol.cc (A_Symbol): don't pass stable arg to PermuteSymbol() ==============================Engine24==================================== Wed May 14 15:43:13 1997 Steven Eker * A_Symbol.cc (eqRewrite): changed comment on repudiate call now that inErrorSort() can leave sort info behind Tue May 13 10:41:19 1997 Steven Eker * Makefile: make libA_Theory.a instead of libAC_Theory.a * A_LhsAutomaton.cc (forcedLoneVariableCase): use DagNode::checkProblem() to simplify code Commented out "sortCheckSubproblem.hh" Thu Apr 10 16:19:35 1997 Steven Eker * A_LhsAutomaton.cc (forcedLoneVariableCase): must repudiateSort() in the case where the base sort is not small enough and the top symbol is not sort constraint free as the base sort we calculated may not be the true sort and will inhibit the calculation of the true sort during the solution of the sort check subprblem. Fri Mar 28 16:55:19 1997 Steven Eker * A_DagNode.cc (makeExtensionInfo): added * A_DagNode.hh (class A_DagNode): added decl for makeExtensionInfo() Thu Jan 9 15:45:25 1997 Steven Eker * A_DagNode.cc (overwriteWithClone): fixed serious bug where we were copying sort of overwritten node rather than overwriting node Tue Jan 7 11:39:30 1997 Steven Eker * A_Symbol.cc (eqRewrite): fixed bug in lazy case where we were computing a base sort and then returning with out repudiating it if it was not the error sort. Use new inerrorSort() function. (eqRewrite): removed superfluous repudiateSortInfo() from semi-eager case. (eqRewrite): replaced calls to repudiateSortInfo() since applyReplace() may compute true sort which may then have been invalidated by rewriting below Tue Dec 24 18:04:23 1996 Steven Eker * A_LhsAutomaton.cc (forcedLoneVariableCase): rewritten to use computeBaseSort() and sortConstraintFree() * A_Subproblem.cc (computeAssignment): computeSortWhilePreservingContext() -> computeTrueSortWhilePreservingContext() * A_Symbol.cc (eqRewrite): adapted from rewrite(); use computeTrueSort() and computeBaseSort() (computeTrueSort): adapted from computeSort() (computeBaseSort): adapted from findBaseSort() * A_Symbol.hh (class A_Symbol): computeSort() replaced by computeBaseSort() and computeTrueSort(); findBaseSort() deleted (class A_Symbol): rewrite() -> eqRewrite() Thu Dec 19 14:17:24 1996 Steven Eker * A_DagNode.cc (makeClone): copy sort information to avoid recomputation Thu Dec 12 17:49:03 1996 Steven Eker * A_DagNode.cc (overwriteWithClone): copy sort information; this is needed so then when we rewrite with a collapse equation we do not lose sort infomation with the possibility of infinite looping on foreign sort constraints Wed Dec 11 11:55:43 1996 Steven Eker * A_Symbol.cc (findBaseSort): sortConstraintFree() used in place of obsolete test (2 places) Mon Dec 9 14:40:21 1996 Steven Eker * A_Symbol.cc (computeSort): modified to use new constrainToSmallerSort() convections Mon Dec 2 11:07:58 1996 Steven Eker * A_Subproblem.cc (addTopVariable): put bounds args in the correct order! * A_Symbol.cc (rewrite): use inert() rather then checking for equations because there may be foreign equations * A_FullMatcher.cc (addVariableBlocks): updated addTopVariable() call * A_Subproblem.cc (buildPartition): make use of lowerBound in TopVariable struct (addTopVariable): store lowerBound * A_Subproblem.hh (class A_Subproblem): added lowerBound to TopVariable struct Wed Nov 27 17:10:12 1996 Steven Eker * A_Symbol.cc (matchVariableWithExtension): implemented * A_Symbol.hh (class A_Symbol): matchVariableWithExtension() added Mon Nov 25 19:01:59 1996 Steven Eker * A_Symbol.cc (A_Symbol): added constructor arg Thu Nov 14 18:07:59 1996 Steven Eker * A_DagNode.cc (makeClone): added Tue Oct 29 17:05:54 1996 Steven Eker * A_Symbol.cc (rewrite): updates to nrArgs removed as nrArgs is not used afterwards; Assert checking that sort is invalid after applyReduce() in semi-eager case removed since applyReduce() may have good reasons for computing and storing the subjects sorts (e.g. a lhs that parses to the error sort or a foreign lhs that is (or collapses to) a variable). Tue Oct 15 17:48:41 1996 Steven Eker * A_RhsAutomaton.cc (dump): added indentLevel arg * A_LhsAutomaton.cc (dump): rewritten to handle indentation Fri Oct 11 16:44:55 1996 Steven Eker * A_Symbol.cc (partialConstruct): deleted (partialReplace): deleted * A_DagNode.cc (partialReplace): added (partialConstruct): added Wed Oct 2 19:01:26 1996 Steven Eker * A_DagNode.cc (normalizeAtTop): added call to DagNode::okToCollectGarbage() Tue Oct 1 14:22:11 1996 Steven Eker * A_DagNode.cc (normalizeAtTop): removed trackStorage() call * A_Symbol.cc (partialReplace): removed trackStorage() call * A_DagNode.cc (markArguments): call to evacuate() added * A_DagNode.hh (A_DagNode): removed trackStorage() call * A_DagNode.cc (A_DagNode): removed trackStorage() call * A_Term.cc: Vector -> ArgVec * A_Symbol.cc: Vector -> ArgVec * A_Subproblem.cc: Vector -> ArgVec * A_RhsAutomaton.cc: Vector -> ArgVec * A_LhsAutomaton.cc: Vector -> ArgVec * A_GreedyMatcher.cc: Vector -> ArgVec * A_FullMatcher.cc: Vector -> ArgVec * A_DagNode.cc: Vector -> ArgVec * A_RhsAutomaton.hh (class A_RhsAutomaton): Vector -> ArgVec * A_DagNode.hh (class A_DagNode): Vector -> ArgVec * A_LhsAutomaton.hh (class A_LhsAutomaton): Vector -> ArgVec * A_DagArgumentIterator.hh (class A_DagArgumentIterator): Vector -> ArgVec Wed Sep 25 14:21:39 1996 Steven Eker * A_DagNode.cc (stackArguments): added (copyWithReplacement): added * A_Symbol.cc (ruleRewrite): added (specificRewrite): added (partialConstruct): added Tue Sep 24 14:41:39 1996 Steven Eker * A_Subproblem.cc (addNode): remember last blockPair has dummy pattern part with no targets; so we have to change test to blockNr + 1 < blockPairs.length() - 1 * A_FullMatcher.cc (buildLeftmostPath): deal with cases where first rigid block has no (unbound) variables to the left of it, last rigid block has no (unbound) variables to the right of it, and single rigid block has no (unbound) variables either side of it (addRemainingPaths): implemented * A_Subproblem.cc (bindVariables): Asserts regarding part length replaced by if statements that return false: non-linear variable blocks can cause bound variable to have wrong length part (bindVariables): fix index: i -> j * A_Subproblem.hh (class A_Subproblem): deleted boundVariablesOK() decl * A_Subproblem.cc (bindVariables): major rewrite; now does the work of boundVariablesOK() as well (buildPartition): set boundByUs flag correctly in non-linear variable block case (solveVariableBlock): removed unbindVariables() temp fix Mon Sep 23 17:50:22 1996 Steven Eker * A_Subproblem.cc (solvePatternBlock): Assert condition should be >= instead of > (deepSelfDestruct): don't deepSelfDestruct() null subproblem (solveVariableBlock): big mess regarding bound and unbound variables in different involacations on same subproblem; temp fix is to unbind variables at start of non-first invocation (solvePatternBlocks): need to initialize selectedNode first first blockPair correctly * A_FullMatcher.cc (buildLeftmostPath): nrRigid + 1 block pairs in subproblem (buildLeftmostPath): formula for nextSubject fixed Fri Sep 20 16:11:55 1996 Steven Eker * A_Subproblem.cc: finally compiled after much rewriting (addNode): added (addTopVariable): added Fri Sep 13 18:29:49 1996 Steven Eker * A_FullMatcher.cc (determineRigidBlocks): calculate rigid blocks in new way Thu Sep 12 18:24:34 1996 Steven Eker * A_Subproblem.hh (class A_Subproblem): added BlockPair struct to try to simplify VariableBlock/RigidBlock handling Wed Sep 11 19:24:04 1996 Steven Eker * A_LhsAutomaton.hh (class A_LhsAutomaton): added struct RigidBlock plus match-time storage for rigidBlocks Thu Aug 29 12:13:34 1996 Steven Eker * A_Subproblem.hh (class A_Subproblem): have at most two edges exits from each node; a down edge and a right edge. Tue Aug 6 15:58:22 1996 Steven Eker * A_LhsCompiler.cc (findConstraintPropagationSequence): matchAtTop arg removed from calls to analyseConstraintPropagation() * A_Term.hh (class A_Term): boundAbove arg removed from addFixedLengthBlock() * A_LhsCompiler.cc: created by extracting match compilation code form A_Term.cc (analyseConstraintPropagation): matchAtTop arg removed (compileLhs): boundAbove arg and code with updated it and passed it deleted (addFixedLengthBlock): boundAbove arg and code with updated it and passed it deleted * A_Term.hh (class A_Term): matchAtTop arg removed from analyseConstraintPropagation(); boundAbove arg removed from compileLhs() Wed Jul 31 17:37:28 1996 Steven Eker * A_Symbol.cc (makeTerm): added Fri Jul 26 16:49:46 1996 Steven Eker * A_GreedyMatcher.cc (greedyMatch): set extension whole flag correctly (greedyMatch): need to update spare in the case that we enf the main loop with a rigid block still to process * A_Term.cc (compileLhs): call addFixedLengthBlock() with boundAbove, boundUniquely the right way around (compileLhs): allow flex part to end with fixed length block if we have extension (compileLhs): need to compile fixed length block that ends the flex part if we have extension * A_GreedyMatcher.cc (greedyMatch): heavily revised; now store "spare" rather than "rigidBlockSubjectsNeeded" (greedyMatchVariableBlock): calculate spare correctly Thu Jul 25 11:13:37 1996 Steven Eker * A_GreedyMatcher.cc (greedyMatchFixedLengthBlock): no longer do substitution copying; pass back shift factor rather than next shift; code simplified (greedyMatchRigidBlock): do substitution copying (greedyMatch): heavily revised; variableBlockLength no longer needed * A_LhsAutomaton.cc (complete): code corrected to do blockLengths for fixed length in _flex_ part (not rigid part!) Wed Jul 24 16:44:37 1996 Steven Eker * A_LhsAutomaton.cc (dump): rewritten (complete): added code to fill in blockLength for each rigid subterm * A_Subproblem.cc: created * A_Subproblem.hh (class A_Subproblem): created Mon Jul 22 10:44:25 1996 Steven Eker * A_DagNode.cc (eliminateSubject): rewritten, now only eliminates target from fixed position (eliminateSubject): rewritten; now only examines single position Sat Jul 20 18:02:24 1996 Steven Eker * A_LhsAutomaton.hh (class A_LhsAutomaton): maxMatchable field in struct Subterm deleted * A_GreedyMatcher.cc (greedyMatchVariableBlock): extensionInfo parameter deleted (greedyMatch): rewritten yet again; now group bound variables with fixed length blocks to make rigid blocks which are matched as whoel units Fri Jul 19 10:34:55 1996 Steven Eker * A_GreedyMatcher.cc (greedyMatchVariableBlock): rewritten from scratch (greedyMatch): heavily rewritten * A_LhsAutomaton.cc: split off greedy matcher into A_GreedyMatcher.cc Thu Jul 18 14:28:16 1996 Steven Eker * A_Term.cc (addFixedLengthBlock): added * A_Term.hh (symbol): added * A_Term.cc (findConstraintPropagationSequence): when two sequences bind the same number of variables uniquely; choose the longer sequenece. Store the position of the first flex arg in bestSequence structure so we can propagate it easily in the lone variable case (analyseConstraintPropagation): add lone variable in flex part to those variables that we guarantee to bind uniquely Tue Jul 16 19:13:08 1996 Steven Eker * A_LhsAutomaton.cc (greedyMatchVariableBlock): rewritten Mon Jul 15 16:31:25 1996 Steven Eker * A_LhsAutomaton.cc (greedyMatchFixedLengthBlock2): renamed from matchFixedLengthBlock() Thu Jul 11 10:42:29 1996 Steven Eker * A_LhsAutomaton.cc (updateWholeBounds): use plus() to simplify (updateFlexBounds): use plus() to simplify * A_ExtensionInfo.hh (setMatched): deleted (setFirstMatched): added (setLastMatched): added * A_DagNode.cc (eliminateSubject): added * A_LhsAutomaton.cc (nextMatchForFixedLengthBlock): added (matchFixedLengthBlock): added (compareArgArrays): added Tue Jul 9 17:20:35 1996 Steven Eker * A_Symbol.cc (findBaseSort): added code to use uniform sort structure if it exists Sat Jul 6 17:24:21 1996 Steven Eker * A_Symbol.cc (partialReplace): dded code to track storage during expansion * A_DagNode.cc (normalizeAtTop): added code to track storage during expansion Fri Jul 5 17:46:56 1996 Steven Eker * A_LhsAutomaton.cc (A_LhsAutomaton): fixed flex bound initilaization problem * A_Term.cc (findConstraintPropagationSequence): added Wed Jul 3 11:41:32 1996 Steven Eker * A_Term.cc (compileLhs): crude implementation (analyseConstraintPropagation): implemented * A_LhsAutomaton.cc (updateWholeBounds): added (updateFlexBounds): added (addRigidVariable): added (addFlexVariable): added (addRigidGroundAlien): added (addRigidNonGroundAlien): added (addFlexGroundAlien): added (addFlexNonGroundAlien): added (complete): added Tue Jul 2 16:06:28 1996 Steven Eker * A_LhsAutomaton.cc (forcedLoneVariableCase): completed Sat Jun 29 15:31:14 1996 Steven Eker * A_LhsAutomaton.cc (matchRigidPart): added Maude-Maude3.2/src/AU_Theory/Makefile.am000077500000000000000000000021521420036611000200430ustar00rootroot00000000000000noinst_LIBRARIES = libAU_Theory.a libAU_Theory_a_CPPFLAGS = \ -I$(top_srcdir)/src/Utility \ -I$(top_srcdir)/src/Interface \ -I$(top_srcdir)/src/Core \ -I$(top_srcdir)/src/Variable \ -I$(top_srcdir)/src/AU_Persistent \ -I$(top_srcdir)/src/FullCompiler libAU_Theory_a_SOURCES = \ AU_Symbol.cc \ AU_DagNode.cc \ AU_DequeDagNode.cc \ AU_Term.cc \ AU_DagArgumentIterator.cc \ AU_DequeDagArgumentIterator.cc \ AU_ExtensionInfo.cc \ AU_RhsAutomaton.cc \ AU_LhsAutomaton.cc \ AU_ArgumentIterator.cc \ AU_Layer.cc \ AU_Subproblem.cc \ AU_UnificationSubproblem2.cc EXTRA_DIST = \ AU_DagOperations.cc \ AU_Normalize.cc \ AU_LhsCompiler.cc \ AU_Matcher.cc \ AU_CollapseMatcher.cc \ AU_FullMatcher.cc \ AU_GreedyMatcher.cc \ AU_DequeMatcher.cc \ ChangeLog.A_Theory noinst_HEADERS = \ AU_ArgumentIterator.hh \ AU_BaseDagNode.hh \ AU_DagArgumentIterator.hh \ AU_DagNode.hh \ AU_DequeDagArgumentIterator.hh \ AU_DequeDagNode.hh \ AU_ExtensionInfo.hh \ AU_Layer.hh \ AU_LhsAutomaton.hh \ AU_RhsAutomaton.hh \ AU_Subproblem.hh \ AU_Symbol.hh \ AU_Term.hh \ AU_Theory.hh \ AU_UnificationSubproblem2.hh Maude-Maude3.2/src/AU_Theory/Makefile.in000066400000000000000000001430451420036611000200600ustar00rootroot00000000000000# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/AU_Theory ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_have_poll.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) AR = ar ARFLAGS = cru AM_V_AR = $(am__v_AR_@AM_V@) am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) am__v_AR_0 = @echo " AR " $@; am__v_AR_1 = libAU_Theory_a_AR = $(AR) $(ARFLAGS) libAU_Theory_a_LIBADD = am_libAU_Theory_a_OBJECTS = libAU_Theory_a-AU_Symbol.$(OBJEXT) \ libAU_Theory_a-AU_DagNode.$(OBJEXT) \ libAU_Theory_a-AU_DequeDagNode.$(OBJEXT) \ libAU_Theory_a-AU_Term.$(OBJEXT) \ libAU_Theory_a-AU_DagArgumentIterator.$(OBJEXT) \ libAU_Theory_a-AU_DequeDagArgumentIterator.$(OBJEXT) \ libAU_Theory_a-AU_ExtensionInfo.$(OBJEXT) \ libAU_Theory_a-AU_RhsAutomaton.$(OBJEXT) \ libAU_Theory_a-AU_LhsAutomaton.$(OBJEXT) \ libAU_Theory_a-AU_ArgumentIterator.$(OBJEXT) \ libAU_Theory_a-AU_Layer.$(OBJEXT) \ libAU_Theory_a-AU_Subproblem.$(OBJEXT) \ libAU_Theory_a-AU_UnificationSubproblem2.$(OBJEXT) libAU_Theory_a_OBJECTS = $(am_libAU_Theory_a_OBJECTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = \ ./$(DEPDIR)/libAU_Theory_a-AU_ArgumentIterator.Po \ ./$(DEPDIR)/libAU_Theory_a-AU_DagArgumentIterator.Po \ ./$(DEPDIR)/libAU_Theory_a-AU_DagNode.Po \ ./$(DEPDIR)/libAU_Theory_a-AU_DequeDagArgumentIterator.Po \ ./$(DEPDIR)/libAU_Theory_a-AU_DequeDagNode.Po \ ./$(DEPDIR)/libAU_Theory_a-AU_ExtensionInfo.Po \ ./$(DEPDIR)/libAU_Theory_a-AU_Layer.Po \ ./$(DEPDIR)/libAU_Theory_a-AU_LhsAutomaton.Po \ ./$(DEPDIR)/libAU_Theory_a-AU_RhsAutomaton.Po \ ./$(DEPDIR)/libAU_Theory_a-AU_Subproblem.Po \ ./$(DEPDIR)/libAU_Theory_a-AU_Symbol.Po \ ./$(DEPDIR)/libAU_Theory_a-AU_Term.Po \ ./$(DEPDIR)/libAU_Theory_a-AU_UnificationSubproblem2.Po am__mv = mv -f AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(libAU_Theory_a_SOURCES) DIST_SOURCES = $(libAU_Theory_a_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ $(top_srcdir)/mkinstalldirs ChangeLog DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ BUDDY_LIB = @BUDDY_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FLEX = @FLEX@ GCC_LIBS = @GCC_LIBS@ GMP_LIBS = @GMP_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSIGSEGV_LIB = @LIBSIGSEGV_LIB@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TECLA_LIBS = @TECLA_LIBS@ VERSION = @VERSION@ YICES2_LIB = @YICES2_LIB@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LIBRARIES = libAU_Theory.a libAU_Theory_a_CPPFLAGS = \ -I$(top_srcdir)/src/Utility \ -I$(top_srcdir)/src/Interface \ -I$(top_srcdir)/src/Core \ -I$(top_srcdir)/src/Variable \ -I$(top_srcdir)/src/AU_Persistent \ -I$(top_srcdir)/src/FullCompiler libAU_Theory_a_SOURCES = \ AU_Symbol.cc \ AU_DagNode.cc \ AU_DequeDagNode.cc \ AU_Term.cc \ AU_DagArgumentIterator.cc \ AU_DequeDagArgumentIterator.cc \ AU_ExtensionInfo.cc \ AU_RhsAutomaton.cc \ AU_LhsAutomaton.cc \ AU_ArgumentIterator.cc \ AU_Layer.cc \ AU_Subproblem.cc \ AU_UnificationSubproblem2.cc EXTRA_DIST = \ AU_DagOperations.cc \ AU_Normalize.cc \ AU_LhsCompiler.cc \ AU_Matcher.cc \ AU_CollapseMatcher.cc \ AU_FullMatcher.cc \ AU_GreedyMatcher.cc \ AU_DequeMatcher.cc \ ChangeLog.A_Theory noinst_HEADERS = \ AU_ArgumentIterator.hh \ AU_BaseDagNode.hh \ AU_DagArgumentIterator.hh \ AU_DagNode.hh \ AU_DequeDagArgumentIterator.hh \ AU_DequeDagNode.hh \ AU_ExtensionInfo.hh \ AU_Layer.hh \ AU_LhsAutomaton.hh \ AU_RhsAutomaton.hh \ AU_Subproblem.hh \ AU_Symbol.hh \ AU_Term.hh \ AU_Theory.hh \ AU_UnificationSubproblem2.hh all: all-am .SUFFIXES: .SUFFIXES: .cc .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/AU_Theory/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/AU_Theory/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libAU_Theory.a: $(libAU_Theory_a_OBJECTS) $(libAU_Theory_a_DEPENDENCIES) $(EXTRA_libAU_Theory_a_DEPENDENCIES) $(AM_V_at)-rm -f libAU_Theory.a $(AM_V_AR)$(libAU_Theory_a_AR) libAU_Theory.a $(libAU_Theory_a_OBJECTS) $(libAU_Theory_a_LIBADD) $(AM_V_at)$(RANLIB) libAU_Theory.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAU_Theory_a-AU_ArgumentIterator.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAU_Theory_a-AU_DagArgumentIterator.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAU_Theory_a-AU_DagNode.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAU_Theory_a-AU_DequeDagArgumentIterator.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAU_Theory_a-AU_DequeDagNode.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAU_Theory_a-AU_ExtensionInfo.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAU_Theory_a-AU_Layer.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAU_Theory_a-AU_LhsAutomaton.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAU_Theory_a-AU_RhsAutomaton.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAU_Theory_a-AU_Subproblem.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAU_Theory_a-AU_Symbol.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAU_Theory_a-AU_Term.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libAU_Theory_a-AU_UnificationSubproblem2.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` libAU_Theory_a-AU_Symbol.o: AU_Symbol.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libAU_Theory_a-AU_Symbol.o -MD -MP -MF $(DEPDIR)/libAU_Theory_a-AU_Symbol.Tpo -c -o libAU_Theory_a-AU_Symbol.o `test -f 'AU_Symbol.cc' || echo '$(srcdir)/'`AU_Symbol.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libAU_Theory_a-AU_Symbol.Tpo $(DEPDIR)/libAU_Theory_a-AU_Symbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='AU_Symbol.cc' object='libAU_Theory_a-AU_Symbol.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libAU_Theory_a-AU_Symbol.o `test -f 'AU_Symbol.cc' || echo '$(srcdir)/'`AU_Symbol.cc libAU_Theory_a-AU_Symbol.obj: AU_Symbol.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libAU_Theory_a-AU_Symbol.obj -MD -MP -MF $(DEPDIR)/libAU_Theory_a-AU_Symbol.Tpo -c -o libAU_Theory_a-AU_Symbol.obj `if test -f 'AU_Symbol.cc'; then $(CYGPATH_W) 'AU_Symbol.cc'; else $(CYGPATH_W) '$(srcdir)/AU_Symbol.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libAU_Theory_a-AU_Symbol.Tpo $(DEPDIR)/libAU_Theory_a-AU_Symbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='AU_Symbol.cc' object='libAU_Theory_a-AU_Symbol.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libAU_Theory_a-AU_Symbol.obj `if test -f 'AU_Symbol.cc'; then $(CYGPATH_W) 'AU_Symbol.cc'; else $(CYGPATH_W) '$(srcdir)/AU_Symbol.cc'; fi` libAU_Theory_a-AU_DagNode.o: AU_DagNode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libAU_Theory_a-AU_DagNode.o -MD -MP -MF $(DEPDIR)/libAU_Theory_a-AU_DagNode.Tpo -c -o libAU_Theory_a-AU_DagNode.o `test -f 'AU_DagNode.cc' || echo '$(srcdir)/'`AU_DagNode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libAU_Theory_a-AU_DagNode.Tpo $(DEPDIR)/libAU_Theory_a-AU_DagNode.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='AU_DagNode.cc' object='libAU_Theory_a-AU_DagNode.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libAU_Theory_a-AU_DagNode.o `test -f 'AU_DagNode.cc' || echo '$(srcdir)/'`AU_DagNode.cc libAU_Theory_a-AU_DagNode.obj: AU_DagNode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libAU_Theory_a-AU_DagNode.obj -MD -MP -MF $(DEPDIR)/libAU_Theory_a-AU_DagNode.Tpo -c -o libAU_Theory_a-AU_DagNode.obj `if test -f 'AU_DagNode.cc'; then $(CYGPATH_W) 'AU_DagNode.cc'; else $(CYGPATH_W) '$(srcdir)/AU_DagNode.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libAU_Theory_a-AU_DagNode.Tpo $(DEPDIR)/libAU_Theory_a-AU_DagNode.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='AU_DagNode.cc' object='libAU_Theory_a-AU_DagNode.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libAU_Theory_a-AU_DagNode.obj `if test -f 'AU_DagNode.cc'; then $(CYGPATH_W) 'AU_DagNode.cc'; else $(CYGPATH_W) '$(srcdir)/AU_DagNode.cc'; fi` libAU_Theory_a-AU_DequeDagNode.o: AU_DequeDagNode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libAU_Theory_a-AU_DequeDagNode.o -MD -MP -MF $(DEPDIR)/libAU_Theory_a-AU_DequeDagNode.Tpo -c -o libAU_Theory_a-AU_DequeDagNode.o `test -f 'AU_DequeDagNode.cc' || echo '$(srcdir)/'`AU_DequeDagNode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libAU_Theory_a-AU_DequeDagNode.Tpo $(DEPDIR)/libAU_Theory_a-AU_DequeDagNode.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='AU_DequeDagNode.cc' object='libAU_Theory_a-AU_DequeDagNode.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libAU_Theory_a-AU_DequeDagNode.o `test -f 'AU_DequeDagNode.cc' || echo '$(srcdir)/'`AU_DequeDagNode.cc libAU_Theory_a-AU_DequeDagNode.obj: AU_DequeDagNode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libAU_Theory_a-AU_DequeDagNode.obj -MD -MP -MF $(DEPDIR)/libAU_Theory_a-AU_DequeDagNode.Tpo -c -o libAU_Theory_a-AU_DequeDagNode.obj `if test -f 'AU_DequeDagNode.cc'; then $(CYGPATH_W) 'AU_DequeDagNode.cc'; else $(CYGPATH_W) '$(srcdir)/AU_DequeDagNode.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libAU_Theory_a-AU_DequeDagNode.Tpo $(DEPDIR)/libAU_Theory_a-AU_DequeDagNode.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='AU_DequeDagNode.cc' object='libAU_Theory_a-AU_DequeDagNode.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libAU_Theory_a-AU_DequeDagNode.obj `if test -f 'AU_DequeDagNode.cc'; then $(CYGPATH_W) 'AU_DequeDagNode.cc'; else $(CYGPATH_W) '$(srcdir)/AU_DequeDagNode.cc'; fi` libAU_Theory_a-AU_Term.o: AU_Term.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libAU_Theory_a-AU_Term.o -MD -MP -MF $(DEPDIR)/libAU_Theory_a-AU_Term.Tpo -c -o libAU_Theory_a-AU_Term.o `test -f 'AU_Term.cc' || echo '$(srcdir)/'`AU_Term.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libAU_Theory_a-AU_Term.Tpo $(DEPDIR)/libAU_Theory_a-AU_Term.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='AU_Term.cc' object='libAU_Theory_a-AU_Term.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libAU_Theory_a-AU_Term.o `test -f 'AU_Term.cc' || echo '$(srcdir)/'`AU_Term.cc libAU_Theory_a-AU_Term.obj: AU_Term.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libAU_Theory_a-AU_Term.obj -MD -MP -MF $(DEPDIR)/libAU_Theory_a-AU_Term.Tpo -c -o libAU_Theory_a-AU_Term.obj `if test -f 'AU_Term.cc'; then $(CYGPATH_W) 'AU_Term.cc'; else $(CYGPATH_W) '$(srcdir)/AU_Term.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libAU_Theory_a-AU_Term.Tpo $(DEPDIR)/libAU_Theory_a-AU_Term.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='AU_Term.cc' object='libAU_Theory_a-AU_Term.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libAU_Theory_a-AU_Term.obj `if test -f 'AU_Term.cc'; then $(CYGPATH_W) 'AU_Term.cc'; else $(CYGPATH_W) '$(srcdir)/AU_Term.cc'; fi` libAU_Theory_a-AU_DagArgumentIterator.o: AU_DagArgumentIterator.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libAU_Theory_a-AU_DagArgumentIterator.o -MD -MP -MF $(DEPDIR)/libAU_Theory_a-AU_DagArgumentIterator.Tpo -c -o libAU_Theory_a-AU_DagArgumentIterator.o `test -f 'AU_DagArgumentIterator.cc' || echo '$(srcdir)/'`AU_DagArgumentIterator.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libAU_Theory_a-AU_DagArgumentIterator.Tpo $(DEPDIR)/libAU_Theory_a-AU_DagArgumentIterator.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='AU_DagArgumentIterator.cc' object='libAU_Theory_a-AU_DagArgumentIterator.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libAU_Theory_a-AU_DagArgumentIterator.o `test -f 'AU_DagArgumentIterator.cc' || echo '$(srcdir)/'`AU_DagArgumentIterator.cc libAU_Theory_a-AU_DagArgumentIterator.obj: AU_DagArgumentIterator.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libAU_Theory_a-AU_DagArgumentIterator.obj -MD -MP -MF $(DEPDIR)/libAU_Theory_a-AU_DagArgumentIterator.Tpo -c -o libAU_Theory_a-AU_DagArgumentIterator.obj `if test -f 'AU_DagArgumentIterator.cc'; then $(CYGPATH_W) 'AU_DagArgumentIterator.cc'; else $(CYGPATH_W) '$(srcdir)/AU_DagArgumentIterator.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libAU_Theory_a-AU_DagArgumentIterator.Tpo $(DEPDIR)/libAU_Theory_a-AU_DagArgumentIterator.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='AU_DagArgumentIterator.cc' object='libAU_Theory_a-AU_DagArgumentIterator.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libAU_Theory_a-AU_DagArgumentIterator.obj `if test -f 'AU_DagArgumentIterator.cc'; then $(CYGPATH_W) 'AU_DagArgumentIterator.cc'; else $(CYGPATH_W) '$(srcdir)/AU_DagArgumentIterator.cc'; fi` libAU_Theory_a-AU_DequeDagArgumentIterator.o: AU_DequeDagArgumentIterator.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libAU_Theory_a-AU_DequeDagArgumentIterator.o -MD -MP -MF $(DEPDIR)/libAU_Theory_a-AU_DequeDagArgumentIterator.Tpo -c -o libAU_Theory_a-AU_DequeDagArgumentIterator.o `test -f 'AU_DequeDagArgumentIterator.cc' || echo '$(srcdir)/'`AU_DequeDagArgumentIterator.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libAU_Theory_a-AU_DequeDagArgumentIterator.Tpo $(DEPDIR)/libAU_Theory_a-AU_DequeDagArgumentIterator.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='AU_DequeDagArgumentIterator.cc' object='libAU_Theory_a-AU_DequeDagArgumentIterator.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libAU_Theory_a-AU_DequeDagArgumentIterator.o `test -f 'AU_DequeDagArgumentIterator.cc' || echo '$(srcdir)/'`AU_DequeDagArgumentIterator.cc libAU_Theory_a-AU_DequeDagArgumentIterator.obj: AU_DequeDagArgumentIterator.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libAU_Theory_a-AU_DequeDagArgumentIterator.obj -MD -MP -MF $(DEPDIR)/libAU_Theory_a-AU_DequeDagArgumentIterator.Tpo -c -o libAU_Theory_a-AU_DequeDagArgumentIterator.obj `if test -f 'AU_DequeDagArgumentIterator.cc'; then $(CYGPATH_W) 'AU_DequeDagArgumentIterator.cc'; else $(CYGPATH_W) '$(srcdir)/AU_DequeDagArgumentIterator.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libAU_Theory_a-AU_DequeDagArgumentIterator.Tpo $(DEPDIR)/libAU_Theory_a-AU_DequeDagArgumentIterator.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='AU_DequeDagArgumentIterator.cc' object='libAU_Theory_a-AU_DequeDagArgumentIterator.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libAU_Theory_a-AU_DequeDagArgumentIterator.obj `if test -f 'AU_DequeDagArgumentIterator.cc'; then $(CYGPATH_W) 'AU_DequeDagArgumentIterator.cc'; else $(CYGPATH_W) '$(srcdir)/AU_DequeDagArgumentIterator.cc'; fi` libAU_Theory_a-AU_ExtensionInfo.o: AU_ExtensionInfo.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libAU_Theory_a-AU_ExtensionInfo.o -MD -MP -MF $(DEPDIR)/libAU_Theory_a-AU_ExtensionInfo.Tpo -c -o libAU_Theory_a-AU_ExtensionInfo.o `test -f 'AU_ExtensionInfo.cc' || echo '$(srcdir)/'`AU_ExtensionInfo.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libAU_Theory_a-AU_ExtensionInfo.Tpo $(DEPDIR)/libAU_Theory_a-AU_ExtensionInfo.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='AU_ExtensionInfo.cc' object='libAU_Theory_a-AU_ExtensionInfo.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libAU_Theory_a-AU_ExtensionInfo.o `test -f 'AU_ExtensionInfo.cc' || echo '$(srcdir)/'`AU_ExtensionInfo.cc libAU_Theory_a-AU_ExtensionInfo.obj: AU_ExtensionInfo.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libAU_Theory_a-AU_ExtensionInfo.obj -MD -MP -MF $(DEPDIR)/libAU_Theory_a-AU_ExtensionInfo.Tpo -c -o libAU_Theory_a-AU_ExtensionInfo.obj `if test -f 'AU_ExtensionInfo.cc'; then $(CYGPATH_W) 'AU_ExtensionInfo.cc'; else $(CYGPATH_W) '$(srcdir)/AU_ExtensionInfo.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libAU_Theory_a-AU_ExtensionInfo.Tpo $(DEPDIR)/libAU_Theory_a-AU_ExtensionInfo.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='AU_ExtensionInfo.cc' object='libAU_Theory_a-AU_ExtensionInfo.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libAU_Theory_a-AU_ExtensionInfo.obj `if test -f 'AU_ExtensionInfo.cc'; then $(CYGPATH_W) 'AU_ExtensionInfo.cc'; else $(CYGPATH_W) '$(srcdir)/AU_ExtensionInfo.cc'; fi` libAU_Theory_a-AU_RhsAutomaton.o: AU_RhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libAU_Theory_a-AU_RhsAutomaton.o -MD -MP -MF $(DEPDIR)/libAU_Theory_a-AU_RhsAutomaton.Tpo -c -o libAU_Theory_a-AU_RhsAutomaton.o `test -f 'AU_RhsAutomaton.cc' || echo '$(srcdir)/'`AU_RhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libAU_Theory_a-AU_RhsAutomaton.Tpo $(DEPDIR)/libAU_Theory_a-AU_RhsAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='AU_RhsAutomaton.cc' object='libAU_Theory_a-AU_RhsAutomaton.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libAU_Theory_a-AU_RhsAutomaton.o `test -f 'AU_RhsAutomaton.cc' || echo '$(srcdir)/'`AU_RhsAutomaton.cc libAU_Theory_a-AU_RhsAutomaton.obj: AU_RhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libAU_Theory_a-AU_RhsAutomaton.obj -MD -MP -MF $(DEPDIR)/libAU_Theory_a-AU_RhsAutomaton.Tpo -c -o libAU_Theory_a-AU_RhsAutomaton.obj `if test -f 'AU_RhsAutomaton.cc'; then $(CYGPATH_W) 'AU_RhsAutomaton.cc'; else $(CYGPATH_W) '$(srcdir)/AU_RhsAutomaton.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libAU_Theory_a-AU_RhsAutomaton.Tpo $(DEPDIR)/libAU_Theory_a-AU_RhsAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='AU_RhsAutomaton.cc' object='libAU_Theory_a-AU_RhsAutomaton.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libAU_Theory_a-AU_RhsAutomaton.obj `if test -f 'AU_RhsAutomaton.cc'; then $(CYGPATH_W) 'AU_RhsAutomaton.cc'; else $(CYGPATH_W) '$(srcdir)/AU_RhsAutomaton.cc'; fi` libAU_Theory_a-AU_LhsAutomaton.o: AU_LhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libAU_Theory_a-AU_LhsAutomaton.o -MD -MP -MF $(DEPDIR)/libAU_Theory_a-AU_LhsAutomaton.Tpo -c -o libAU_Theory_a-AU_LhsAutomaton.o `test -f 'AU_LhsAutomaton.cc' || echo '$(srcdir)/'`AU_LhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libAU_Theory_a-AU_LhsAutomaton.Tpo $(DEPDIR)/libAU_Theory_a-AU_LhsAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='AU_LhsAutomaton.cc' object='libAU_Theory_a-AU_LhsAutomaton.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libAU_Theory_a-AU_LhsAutomaton.o `test -f 'AU_LhsAutomaton.cc' || echo '$(srcdir)/'`AU_LhsAutomaton.cc libAU_Theory_a-AU_LhsAutomaton.obj: AU_LhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libAU_Theory_a-AU_LhsAutomaton.obj -MD -MP -MF $(DEPDIR)/libAU_Theory_a-AU_LhsAutomaton.Tpo -c -o libAU_Theory_a-AU_LhsAutomaton.obj `if test -f 'AU_LhsAutomaton.cc'; then $(CYGPATH_W) 'AU_LhsAutomaton.cc'; else $(CYGPATH_W) '$(srcdir)/AU_LhsAutomaton.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libAU_Theory_a-AU_LhsAutomaton.Tpo $(DEPDIR)/libAU_Theory_a-AU_LhsAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='AU_LhsAutomaton.cc' object='libAU_Theory_a-AU_LhsAutomaton.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libAU_Theory_a-AU_LhsAutomaton.obj `if test -f 'AU_LhsAutomaton.cc'; then $(CYGPATH_W) 'AU_LhsAutomaton.cc'; else $(CYGPATH_W) '$(srcdir)/AU_LhsAutomaton.cc'; fi` libAU_Theory_a-AU_ArgumentIterator.o: AU_ArgumentIterator.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libAU_Theory_a-AU_ArgumentIterator.o -MD -MP -MF $(DEPDIR)/libAU_Theory_a-AU_ArgumentIterator.Tpo -c -o libAU_Theory_a-AU_ArgumentIterator.o `test -f 'AU_ArgumentIterator.cc' || echo '$(srcdir)/'`AU_ArgumentIterator.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libAU_Theory_a-AU_ArgumentIterator.Tpo $(DEPDIR)/libAU_Theory_a-AU_ArgumentIterator.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='AU_ArgumentIterator.cc' object='libAU_Theory_a-AU_ArgumentIterator.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libAU_Theory_a-AU_ArgumentIterator.o `test -f 'AU_ArgumentIterator.cc' || echo '$(srcdir)/'`AU_ArgumentIterator.cc libAU_Theory_a-AU_ArgumentIterator.obj: AU_ArgumentIterator.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libAU_Theory_a-AU_ArgumentIterator.obj -MD -MP -MF $(DEPDIR)/libAU_Theory_a-AU_ArgumentIterator.Tpo -c -o libAU_Theory_a-AU_ArgumentIterator.obj `if test -f 'AU_ArgumentIterator.cc'; then $(CYGPATH_W) 'AU_ArgumentIterator.cc'; else $(CYGPATH_W) '$(srcdir)/AU_ArgumentIterator.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libAU_Theory_a-AU_ArgumentIterator.Tpo $(DEPDIR)/libAU_Theory_a-AU_ArgumentIterator.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='AU_ArgumentIterator.cc' object='libAU_Theory_a-AU_ArgumentIterator.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libAU_Theory_a-AU_ArgumentIterator.obj `if test -f 'AU_ArgumentIterator.cc'; then $(CYGPATH_W) 'AU_ArgumentIterator.cc'; else $(CYGPATH_W) '$(srcdir)/AU_ArgumentIterator.cc'; fi` libAU_Theory_a-AU_Layer.o: AU_Layer.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libAU_Theory_a-AU_Layer.o -MD -MP -MF $(DEPDIR)/libAU_Theory_a-AU_Layer.Tpo -c -o libAU_Theory_a-AU_Layer.o `test -f 'AU_Layer.cc' || echo '$(srcdir)/'`AU_Layer.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libAU_Theory_a-AU_Layer.Tpo $(DEPDIR)/libAU_Theory_a-AU_Layer.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='AU_Layer.cc' object='libAU_Theory_a-AU_Layer.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libAU_Theory_a-AU_Layer.o `test -f 'AU_Layer.cc' || echo '$(srcdir)/'`AU_Layer.cc libAU_Theory_a-AU_Layer.obj: AU_Layer.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libAU_Theory_a-AU_Layer.obj -MD -MP -MF $(DEPDIR)/libAU_Theory_a-AU_Layer.Tpo -c -o libAU_Theory_a-AU_Layer.obj `if test -f 'AU_Layer.cc'; then $(CYGPATH_W) 'AU_Layer.cc'; else $(CYGPATH_W) '$(srcdir)/AU_Layer.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libAU_Theory_a-AU_Layer.Tpo $(DEPDIR)/libAU_Theory_a-AU_Layer.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='AU_Layer.cc' object='libAU_Theory_a-AU_Layer.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libAU_Theory_a-AU_Layer.obj `if test -f 'AU_Layer.cc'; then $(CYGPATH_W) 'AU_Layer.cc'; else $(CYGPATH_W) '$(srcdir)/AU_Layer.cc'; fi` libAU_Theory_a-AU_Subproblem.o: AU_Subproblem.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libAU_Theory_a-AU_Subproblem.o -MD -MP -MF $(DEPDIR)/libAU_Theory_a-AU_Subproblem.Tpo -c -o libAU_Theory_a-AU_Subproblem.o `test -f 'AU_Subproblem.cc' || echo '$(srcdir)/'`AU_Subproblem.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libAU_Theory_a-AU_Subproblem.Tpo $(DEPDIR)/libAU_Theory_a-AU_Subproblem.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='AU_Subproblem.cc' object='libAU_Theory_a-AU_Subproblem.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libAU_Theory_a-AU_Subproblem.o `test -f 'AU_Subproblem.cc' || echo '$(srcdir)/'`AU_Subproblem.cc libAU_Theory_a-AU_Subproblem.obj: AU_Subproblem.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libAU_Theory_a-AU_Subproblem.obj -MD -MP -MF $(DEPDIR)/libAU_Theory_a-AU_Subproblem.Tpo -c -o libAU_Theory_a-AU_Subproblem.obj `if test -f 'AU_Subproblem.cc'; then $(CYGPATH_W) 'AU_Subproblem.cc'; else $(CYGPATH_W) '$(srcdir)/AU_Subproblem.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libAU_Theory_a-AU_Subproblem.Tpo $(DEPDIR)/libAU_Theory_a-AU_Subproblem.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='AU_Subproblem.cc' object='libAU_Theory_a-AU_Subproblem.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libAU_Theory_a-AU_Subproblem.obj `if test -f 'AU_Subproblem.cc'; then $(CYGPATH_W) 'AU_Subproblem.cc'; else $(CYGPATH_W) '$(srcdir)/AU_Subproblem.cc'; fi` libAU_Theory_a-AU_UnificationSubproblem2.o: AU_UnificationSubproblem2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libAU_Theory_a-AU_UnificationSubproblem2.o -MD -MP -MF $(DEPDIR)/libAU_Theory_a-AU_UnificationSubproblem2.Tpo -c -o libAU_Theory_a-AU_UnificationSubproblem2.o `test -f 'AU_UnificationSubproblem2.cc' || echo '$(srcdir)/'`AU_UnificationSubproblem2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libAU_Theory_a-AU_UnificationSubproblem2.Tpo $(DEPDIR)/libAU_Theory_a-AU_UnificationSubproblem2.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='AU_UnificationSubproblem2.cc' object='libAU_Theory_a-AU_UnificationSubproblem2.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libAU_Theory_a-AU_UnificationSubproblem2.o `test -f 'AU_UnificationSubproblem2.cc' || echo '$(srcdir)/'`AU_UnificationSubproblem2.cc libAU_Theory_a-AU_UnificationSubproblem2.obj: AU_UnificationSubproblem2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libAU_Theory_a-AU_UnificationSubproblem2.obj -MD -MP -MF $(DEPDIR)/libAU_Theory_a-AU_UnificationSubproblem2.Tpo -c -o libAU_Theory_a-AU_UnificationSubproblem2.obj `if test -f 'AU_UnificationSubproblem2.cc'; then $(CYGPATH_W) 'AU_UnificationSubproblem2.cc'; else $(CYGPATH_W) '$(srcdir)/AU_UnificationSubproblem2.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libAU_Theory_a-AU_UnificationSubproblem2.Tpo $(DEPDIR)/libAU_Theory_a-AU_UnificationSubproblem2.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='AU_UnificationSubproblem2.cc' object='libAU_Theory_a-AU_UnificationSubproblem2.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libAU_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libAU_Theory_a-AU_UnificationSubproblem2.obj `if test -f 'AU_UnificationSubproblem2.cc'; then $(CYGPATH_W) 'AU_UnificationSubproblem2.cc'; else $(CYGPATH_W) '$(srcdir)/AU_UnificationSubproblem2.cc'; fi` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/libAU_Theory_a-AU_ArgumentIterator.Po -rm -f ./$(DEPDIR)/libAU_Theory_a-AU_DagArgumentIterator.Po -rm -f ./$(DEPDIR)/libAU_Theory_a-AU_DagNode.Po -rm -f ./$(DEPDIR)/libAU_Theory_a-AU_DequeDagArgumentIterator.Po -rm -f ./$(DEPDIR)/libAU_Theory_a-AU_DequeDagNode.Po -rm -f ./$(DEPDIR)/libAU_Theory_a-AU_ExtensionInfo.Po -rm -f ./$(DEPDIR)/libAU_Theory_a-AU_Layer.Po -rm -f ./$(DEPDIR)/libAU_Theory_a-AU_LhsAutomaton.Po -rm -f ./$(DEPDIR)/libAU_Theory_a-AU_RhsAutomaton.Po -rm -f ./$(DEPDIR)/libAU_Theory_a-AU_Subproblem.Po -rm -f ./$(DEPDIR)/libAU_Theory_a-AU_Symbol.Po -rm -f ./$(DEPDIR)/libAU_Theory_a-AU_Term.Po -rm -f ./$(DEPDIR)/libAU_Theory_a-AU_UnificationSubproblem2.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/libAU_Theory_a-AU_ArgumentIterator.Po -rm -f ./$(DEPDIR)/libAU_Theory_a-AU_DagArgumentIterator.Po -rm -f ./$(DEPDIR)/libAU_Theory_a-AU_DagNode.Po -rm -f ./$(DEPDIR)/libAU_Theory_a-AU_DequeDagArgumentIterator.Po -rm -f ./$(DEPDIR)/libAU_Theory_a-AU_DequeDagNode.Po -rm -f ./$(DEPDIR)/libAU_Theory_a-AU_ExtensionInfo.Po -rm -f ./$(DEPDIR)/libAU_Theory_a-AU_Layer.Po -rm -f ./$(DEPDIR)/libAU_Theory_a-AU_LhsAutomaton.Po -rm -f ./$(DEPDIR)/libAU_Theory_a-AU_RhsAutomaton.Po -rm -f ./$(DEPDIR)/libAU_Theory_a-AU_Subproblem.Po -rm -f ./$(DEPDIR)/libAU_Theory_a-AU_Symbol.Po -rm -f ./$(DEPDIR)/libAU_Theory_a-AU_Term.Po -rm -f ./$(DEPDIR)/libAU_Theory_a-AU_UnificationSubproblem2.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-noinstLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: Maude-Maude3.2/src/BuiltIn/000077500000000000000000000000001420036611000155135ustar00rootroot00000000000000Maude-Maude3.2/src/BuiltIn/ACU_NumberOpSymbol.cc000066400000000000000000000166611420036611000214410ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2020 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class ACU_NumberOpSymbol. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "freeTheory.hh" #include "ACU_Persistent.hh" #include "ACU_Theory.hh" #include "builtIn.hh" // interface class definitions #include "term.hh" // core class definitions #include "rewritingContext.hh" #include "symbolMap.hh" #include "dagArgumentIterator.hh" // ACU theory class definitions #include "ACU_Symbol.hh" #include "ACU_DagNode.hh" // built in stuff #include "bindingMacros.hh" #include "succSymbol.hh" #include "minusSymbol.hh" #include "ACU_NumberOpSymbol.hh" ACU_NumberOpSymbol::ACU_NumberOpSymbol(int id) : ACU_Symbol(id) { op = NONE; succSymbol = 0; minusSymbol = 0; } bool ACU_NumberOpSymbol::attachData(const Vector& opDeclaration, const char* purpose, const Vector& data) { BIND_OP(purpose, ACU_NumberOpSymbol, op, data); return ACU_Symbol::attachData(opDeclaration, purpose, data); } bool ACU_NumberOpSymbol::attachSymbol(const char* purpose, Symbol* symbol) { BIND_SYMBOL(purpose, symbol, succSymbol, SuccSymbol*); BIND_SYMBOL(purpose, symbol, minusSymbol, MinusSymbol*); return ACU_Symbol::attachSymbol(purpose, symbol); } void ACU_NumberOpSymbol::copyAttachments(Symbol* original, SymbolMap* map) { ACU_NumberOpSymbol* orig = safeCast(ACU_NumberOpSymbol*, original); op = orig->op; COPY_SYMBOL(orig, succSymbol, map, SuccSymbol*); COPY_SYMBOL(orig, minusSymbol, map, MinusSymbol*); ACU_Symbol::copyAttachments(original, map); } void ACU_NumberOpSymbol::getDataAttachments(const Vector& opDeclaration, Vector& purposes, Vector >& data) { int nrDataAttachments = purposes.length(); purposes.resize(nrDataAttachments + 1); purposes[nrDataAttachments] = "ACU_NumberOpSymbol"; data.resize(nrDataAttachments + 1); data[nrDataAttachments].resize(1); const char*& d = data[nrDataAttachments][0]; switch (op) { CODE_CASE(d, '+', 0, "+") CODE_CASE(d, '*', 0, "*") CODE_CASE(d, '|', 0, "|") CODE_CASE(d, '&', 0, "&") CODE_CASE(d, 'x', 'o', "xor") CODE_CASE(d, 'g', 'c', "gcd") CODE_CASE(d, 'l', 'c', "lcm") CODE_CASE(d, 'm', 'i', "min") CODE_CASE(d, 'm', 'a', "max") default: CantHappen("bad number op"); } ACU_Symbol::getDataAttachments(opDeclaration, purposes, data); } void ACU_NumberOpSymbol::getSymbolAttachments(Vector& purposes, Vector& symbols) { APPEND_SYMBOL(purposes, symbols, succSymbol); APPEND_SYMBOL(purposes, symbols, minusSymbol); ACU_Symbol::getSymbolAttachments(purposes, symbols); } bool ACU_NumberOpSymbol::eqRewrite(DagNode* subject, RewritingContext& context) { Assert(this == subject->symbol(), "bad symbol"); if (reduceArgumentsAndNormalize(subject, context)) return false; // collapsed under us return eqRewrite2(subject, context); // keep our stack frame small } bool ACU_NumberOpSymbol::eqRewrite2(DagNode* subject, RewritingContext& context) { // // If we are aborting we don't want to eagerly compute with // our numerical arguments and then throw the result away since // the unreduced dag node might normalize into our parent // which would do the same eager computation etc forming a // potentially very expensive cascade. We must do this check // after we have reduced our arguments otherwise we wouldn't // notice an abort that occurred "on the way up". // if (RewritingContext::getTraceStatus() && context.traceAbort()) return false; if (succSymbol != 0) { mpz_class accumulator; NatSet unused; int usedMultiplicity = 0; ACU_DagNode* d = getACU_DagNode(subject); int nrArgs = d->nrArgs(); for (int i = 0; i < nrArgs; i++) { DagNode* a = d->getArgument(i); Symbol* s = a->symbol(); if ((s == minusSymbol) ? minusSymbol->isNeg(a) : succSymbol->isNat(a)) { mpz_class storage; const mpz_class& n = (s == minusSymbol) ? minusSymbol->getNeg(a, storage) : succSymbol->getNat(a); int m = d->getMultiplicity(i); if (usedMultiplicity == 0) { usedMultiplicity = m; accumulator = n; if (--m == 0) continue; } else usedMultiplicity += m; switch (op) { case '+': { if (m == 1) accumulator += n; else accumulator += n * m; break; } case '*': { if (m == 1) accumulator *= n; else { mpz_class t; mpz_pow_ui (t.get_mpz_t(), n.get_mpz_t(), m); accumulator *= t; } break; } case '|': { accumulator |= n; break; } case '&': { accumulator &= n; break; } case CODE('x', 'o'): { if (m & 1) accumulator ^= n; break; } case CODE('g', 'c'): { mpz_gcd(accumulator.get_mpz_t(), accumulator.get_mpz_t(), n.get_mpz_t()); break; } case CODE('l', 'c'): { mpz_lcm(accumulator.get_mpz_t(), accumulator.get_mpz_t(), n.get_mpz_t()); break; } case CODE('m', 'i'): { if (n < accumulator) accumulator = n; break; } case CODE('m', 'a'): { if (n > accumulator) accumulator = n; break; } } } else unused.insert(i); } if (usedMultiplicity >= 2) { Assert(minusSymbol != 0 || accumulator >= 0, "can't make -ve int"); if (unused.empty()) { return (accumulator >= 0) ? succSymbol->rewriteToNat(subject, context, accumulator) : context.builtInReplace(subject, minusSymbol->makeNegDag(accumulator)); } // // Not everything was a number - need to make a new dag node by // copying unused arguments and including accumulated result. // int nrNewArgs = unused.size() + 1; Vector dagNodes(nrNewArgs); Vector multiplicities(nrNewArgs); int j = 0; for (int index : unused) { dagNodes[j] = d->getArgument(index); multiplicities[j] = d->getMultiplicity(index); ++j; } dagNodes[j] = (accumulator >= 0) ? succSymbol->makeNatDag(accumulator) : minusSymbol->makeNegDag(accumulator); multiplicities[j] = 1; return context.builtInReplace(subject, makeDagNode(dagNodes, multiplicities)); } } return ACU_Symbol::eqRewrite(subject, context); } Maude-Maude3.2/src/BuiltIn/ACU_NumberOpSymbol.hh000066400000000000000000000033631420036611000214460ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for symbols for built in ACU operations on numbers. // #ifndef _ACU_NumberOpSymbol_hh_ #define _ACU_NumberOpSymbol_hh_ #include "ACU_Symbol.hh" class ACU_NumberOpSymbol : public ACU_Symbol { public: ACU_NumberOpSymbol(int id); bool attachData(const Vector& opDeclaration, const char* purpose, const Vector& data); bool attachSymbol(const char* purpose, Symbol* symbol); void copyAttachments(Symbol* original, SymbolMap* map); void getDataAttachments(const Vector& opDeclaration, Vector& purposes, Vector >& data); void getSymbolAttachments(Vector& purposes, Vector& symbols); bool eqRewrite(DagNode* subject, RewritingContext& context); private: bool eqRewrite2(DagNode* subject, RewritingContext& context); int op; SuccSymbol* succSymbol; MinusSymbol* minusSymbol; }; #endif Maude-Maude3.2/src/BuiltIn/CUI_NumberOpSymbol.cc000066400000000000000000000076711420036611000214520ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class CUI_NumberOpSymbol. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "freeTheory.hh" #include "CUI_Theory.hh" // interface class definitions #include "term.hh" // core class definitions #include "rewritingContext.hh" #include "symbolMap.hh" // CUI theory class definitions #include "CUI_Symbol.hh" #include "CUI_DagNode.hh" // built in stuff #include "bindingMacros.hh" #include "succSymbol.hh" #include "CUI_NumberOpSymbol.hh" CUI_NumberOpSymbol::CUI_NumberOpSymbol(int id, Axioms axioms) : CUI_Symbol(id, standard, false, axioms) { op = NONE; succSymbol = 0; } bool CUI_NumberOpSymbol::attachData(const Vector& opDeclaration, const char* purpose, const Vector& data) { BIND_OP(purpose, CUI_NumberOpSymbol, op, data); return CUI_Symbol::attachData(opDeclaration, purpose, data); } bool CUI_NumberOpSymbol::attachSymbol(const char* purpose, Symbol* symbol) { BIND_SYMBOL(purpose, symbol, succSymbol, SuccSymbol*); return CUI_Symbol::attachSymbol(purpose, symbol); } void CUI_NumberOpSymbol::copyAttachments(Symbol* original, SymbolMap* map) { CUI_NumberOpSymbol* orig = safeCast(CUI_NumberOpSymbol*, original); op = orig->op; COPY_SYMBOL(orig, succSymbol, map, SuccSymbol*); CUI_Symbol::copyAttachments(original, map); } void CUI_NumberOpSymbol::getDataAttachments(const Vector& opDeclaration, Vector& purposes, Vector >& data) { int nrDataAttachments = purposes.length(); purposes.resize(nrDataAttachments + 1); purposes[nrDataAttachments] = "CUI_NumberOpSymbol"; data.resize(nrDataAttachments + 1); data[nrDataAttachments].resize(1); const char*& d = data[nrDataAttachments][0]; switch (op) { CODE_CASE(d, 's', 'd', "sd") default: CantHappen("bad number op"); } CUI_Symbol::getDataAttachments(opDeclaration, purposes, data); } void CUI_NumberOpSymbol::getSymbolAttachments(Vector& purposes, Vector& symbols) { APPEND_SYMBOL(purposes, symbols, succSymbol); CUI_Symbol::getSymbolAttachments(purposes, symbols); } bool CUI_NumberOpSymbol::eqRewrite(DagNode* subject, RewritingContext& context) { Assert(this == subject->symbol(), "bad symbol"); CUI_DagNode* d = safeCast(CUI_DagNode*, subject); bool specialEval = true; // // Evaluate our arguments and check that they are both numbers. // for (int i = 0; i < 2; i++) { DagNode* a = d->getArgument(i); a->reduce(context); if (!(succSymbol != 0 && succSymbol->isNat(a))) specialEval = false; } if (specialEval) { const mpz_class& a0 = succSymbol->getNat(d->getArgument(0)); const mpz_class& a1 = succSymbol->getNat(d->getArgument(1)); mpz_class r; switch (op) { case CODE('s', 'd'): { r = abs(a0 - a1); break; } default: CantHappen("bad number op"); } return succSymbol->rewriteToNat(subject, context, r); } return CUI_Symbol::eqRewrite(subject, context); } Maude-Maude3.2/src/BuiltIn/CUI_NumberOpSymbol.hh000066400000000000000000000032451420036611000214550ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for symbols for built in CUI operations on numbers. // #ifndef _CUI_NumberOpSymbol_hh_ #define _CUI_NumberOpSymbol_hh_ #include "CUI_Symbol.hh" class CUI_NumberOpSymbol : public CUI_Symbol { public: CUI_NumberOpSymbol(int id, Axioms axioms); bool attachData(const Vector& opDeclaration, const char* purpose, const Vector& data); bool attachSymbol(const char* purpose, Symbol* symbol); void copyAttachments(Symbol* original, SymbolMap* map); void getDataAttachments(const Vector& opDeclaration, Vector& purposes, Vector >& data); void getSymbolAttachments(Vector& purposes, Vector& symbols); bool eqRewrite(DagNode* subject, RewritingContext& context); private: int op; SuccSymbol* succSymbol; }; #endif Maude-Maude3.2/src/BuiltIn/ChangeLog000077500000000000000000002410441420036611000172750ustar00rootroot000000000000002021-09-07 Steven Eker * randomOpSymbol.cc: use mt19937::result_type for RandomOpSymbol::globalSeed * randomOpSymbol.hh (class RandomOpSymbol): use std::mt19937 in place of MTRand * randomOpSymbol.cc (RandomOpSymbol::eqRewrite): use std::mt19937 in place of MTRand (RandomOpSymbol::RandomOpSymbol): use std::mt19937 in place of MTRand ===================================Maude137=========================================== 2021-03-02 Steven Eker * succSymbol.hh (class SuccSymbol): added decl for getScaledSignedInt64() * succSymbol.cc (SuccSymbol::getScaledSignedInt64): added ===================================Maude134=========================================== 2020-12-14 Steven Eker * succSymbol.hh (class SuccSymbol): use Ruben's hack to fix the lack of a conversion from long long int to mpz_class on 32-bit machines via a new inline function ===================================Maude132-32=========================================== 2020-09-28 Steven Eker * matrixOpSymbol.cc (MatrixOpSymbol::eqRewrite): use range-based for loop * ACU_NumberOpSymbol.cc (ACU_NumberOpSymbol::eqRewrite2): use range-based for loop ===================================Maude131=========================================== 2020-04-22 Steven Eker * minusSymbol.hh (class MinusSymbol): added decl for makeIntDag() * minusSymbol.cc (MinusSymbol::makeIntDag): added ===================================Maude128a=========================================== 2019-12-17 Steven Eker * floatOpSymbol.cc (isNaN): use ::isnan() to avoid ambiguity with older compilers ===================================Maude128=========================================== 2019-12-06 Steven Eker * counterSymbol.hh (NumberOpSymbol): commented out declarations for saveHiddenState(), restoreHiddenState() (NumberOpSymbol): commented out typedef MpzStack, data member currentValueStack * counterSymbol.cc (saveHiddenState, restoreHiddenState): commented out ===================================Maude127=========================================== 2019-05-24 Steven Eker * floatOpSymbol.cc (eqRewrite, safePow): finite() -> isfinite() * floatSymbol.cc (fillInSortInfo, computeBaseSort): finite() -> isfinite() 2019-01-30 Steven Eker * stringDagNode.cc (StringDagNode): fix bad Assert() caught by new compiler ===================================Maude121=========================================== 2018-08-13 Steven Eker * stringOpSymbol.hh (FreeSymbol): added decls for upperCase(), lowerCase() * stringOpSymbol.cc (eqRewrite, getDataAttachments): added support for upperCase() and lowerCase() (upperCase, lowerCase): added ===================================Maude118=========================================== 2018-08-03 Steven Eker * bindingMacros.hh (BIND_SYMBOL2): added; this version checks nrArgs 2018-03-26 Steven Eker * floatOpSymbol.cc (safePow, eqRewrite): use isNaN() macro to avoid ambiguity between C and C++ definitions of isnan() that appear with -std=gnu++11 ===================================Maude115=========================================== 2017-07-25 Steven Eker * minusSymbol.hh (NumberOpSymbol): added decl for getSignedInt64() * minusSymbol.cc (getSignedInt64): added ===================================Maude115=========================================== 2017-03-10 Steven Eker * branchSymbol.hh (FreeSymbol): updated decl for stackArguments() * branchSymbol.cc (stackArguments): handle respectFrozen and eagerContext arguments ===================================Maude111b=========================================== 2015-12-18 Steven Eker * matrixOpSymbol.cc (downAlgorithm): use Rope * stringDagNode.cc (getHashValue): use prefix Rope::const_iterator increment * stringTerm.cc (normalize): use prefix Rope::const_iterator increment * stringOpSymbol.cc (ropeToNumber): use new makeZeroTerminatedString() member function (eqRewrite): use new makeZeroTerminatedString() member function (ropeToNumber): use two argument substr() * stringOpSymbol.hh: crope -> Rope throughout * stringOpSymbol.cc: crope -> Rope throughout 2015-12-17 Steven Eker * stringDagNode.cc: crope -> Rope throughout * stringDagNode.hh: crope -> Rope throughout * stringTerm.cc: crope -> Rope throughout * stringTerm.hh: crope -> Rope throughout ===================================Maude108a=========================================== 2014-05-19 Steven Eker * divisionSymbol.cc (makeRatDag): allow 0/n (makeRatTerm): allow 0/n 2014-05-05 Steven Eker * bindingMacros.hh (BIND_OP3): added (CODE3): added (CODE_CASE3): added ===================================Maude103=========================================== 2014-02-18 Steven Eker * equalityExtor.cc (execute): rewritten; use tail call * equalityExtorFinal.cc (execute): use tail call * equalitySymbol.cc (generateFinalInstruction) (generateInstruction): added * equalitySymbol.hh (FreeSymbol): added decls for generateFinalInstruction(), generateInstruction() * builtIn.hh: added classes EqualityExtor and EqualityExtorFinal * equalityExtorFinal.cc: created * equalityExtorFinal.hh: created * equalityExtor.cc (EqualityExtor): call stackMachineCompile * equalitySymbol.hh (stackMachineCompile): added * equalitySymbol.cc (stackMachinePostProcess): deleted * equalitySymbol.hh (FreeSymbol): stackMachinePostProcess() becomes stackMachineCompile() * equalityExtor.cc (execute): use getEqualInstructionSequence(), getNotEqualInstructionSequence() * equalitySymbol.hh (FreeSymbol): added declaration for stackMachinePostProcess() (getEqualInstructionSequence, getNotEqualInstructionSequence): added * equalitySymbol.cc (stackMachinePostProcess): added 2014-02-12 Steven Eker * equalityExtor.hh: created * equalityExtor.cc: created ===================================Maude101=========================================== 2012-03-30 Steven Eker * floatSymbol.hh (NA_Symbol): added decl for termify() * floatSymbol.cc (termify): added * stringSymbol.hh (NA_Symbol): added decl for termify() * stringSymbol.cc (termify): added ===================================Maude96=========================================== 2011-12-31 Steven Eker * stringOpSymbol.cc (StringOpSymbol::eqRewrite): use makeZeroTerminatedString() in place of c_str() (StringOpSymbol::ropeToNumber): use makeZeroTerminatedString() in place of c_str() (2 places) * matrixOpSymbol.cc (MatrixOpSymbol::downAlgorithm): use makeZeroTerminatedString() instead of c_str() since we now distrust the latter ===================================Maude95c=========================================== 2010-10-19 Steven Eker * stringSymbol.cc (StringSymbol::makeCanonicalCopyEagerUptoReduced): deleted * stringSymbol.hh (class StringSymbol): deleted decl for makeCanonicalCopyEagerUptoReduced() * floatSymbol.cc (FloatSymbol::makeCanonicalCopyEagerUptoReduced): deleted * floatSymbol.hh (class FloatSymbol): deleted decl for makeCanonicalCopyEagerUptoReduced() ===================================Maude95a=========================================== 2010-09-29 Steven Eker * stringSymbol.hh (class StringSymbol): added decl for makeCanonicalCopyEagerUptoReduced() * stringSymbol.cc (StringSymbol::makeCanonicalCopyEagerUptoReduced): added * floatSymbol.hh (class FloatSymbol): added decl for makeCanonicalCopyEagerUptoReduced() * floatSymbol.cc (FloatSymbol::makeCanonicalCopyEagerUptoReduced): added ===================================Maude95=========================================== 2010-05-07 Steven Eker * branchSymbol.cc (BranchSymbol::attachTerm): added DebugAdvisory() ===================================Maude93d=========================================== 2009-03-21 Steven Eker * floatOpSymbol.cc (eqRewrite): fix bug where we were treating floor() with an unevaluated argument as float() 2008-12-22 Steven Eker * branchSymbol.hh (class BranchSymbol): deleted decls for fillInSortInfo() and computeBaseSort() * branchSymbol.cc (compileOpDeclarations): add fake declarations to encode our sort structure (computeBaseSort): deleted (fillInSortInfo): deleted 2008-09-11 Steven Eker * numberOpSymbol.cc (eqRewrite): assign dummy value to b in default case to silence compiler warning * floatOpSymbol.cc (eqRewrite): assign dummy values to r in default cases to silence compiler warning * stringOpSymbol.cc (eqRewrite): assign dummy values to r in default cases to silence compiler warning * floatDagNode.hh (class FloatDagNode): use anonymous union so I can get the bit pattern for hashing without breaking strict-aliasing rules under gcc 4 * floatDagNode.cc (getHashValue): remove the reinterpret_cast<> now I have an anonymous union * floatTerm.cc (normalize): remove the reinterpret_cast<> now I have an anonymous union * floatTerm.hh (class FloatTerm): use anonymous union so I can get the bit pattern for hashing without breaking strict-aliasing rules under gcc 4 2008-09-04 Steven Eker * stringOpSymbol.cc (eqRewrite): ifdef out the kudge that was avoiding Rope::c_str() (ropeToNumber): ifdef out similar kudges 2008-05-09 Steven Eker * matrixOpSymbol.cc (eqRewrite): pass NONE rather than UNBOUNDED to represent unbounded upper bound ===================================Maude91a=========================================== 2008-04-10 Steven Eker * matrixOpSymbol.cc (MACRO): added * matrixOpSymbol.hh (class MatrixOpSymbol): added decl for copyAttachments() ===================================Maude91=========================================== 2007-09-06 Steven Eker * branchSymbol.cc (computeBaseSort): added explanation of what it does following coverity inspection ===================================Maude89h=========================================== 2007-01-18 Steven Eker * branchSymbol.cc (compileOpDeclarations): call FreeSymbol::compileOpDeclarations() as a quick hack to get unification working ===================================Maude88d=========================================== 2006-11-14 Steven Eker * floatOpSymbol.cc (getDataAttachments): added min and max cases (eqRewrite): added min and max cases ===================================Maude88c=========================================== 2006-09-22 Steven Eker * floatTerm.cc (instantiate2): added * stringTerm.cc (instantiate2): added * floatTerm.hh (class FloatTerm): added decl for instantiate2() * stringTerm.hh (class StringTerm): added decl for instantiate2() 2005-09-08 Steven Eker * matrixOpSymbol.cc (eqRewrite): use GCD where algorithm == SYSTEMS_CHOICE and number of variables is <= number of equations + 1 2005-09-07 Steven Eker * matrixOpSymbol.cc (eqRewrite): init maxRowNr and maxColNr to -1 here; check that maxRowNr is >= 0 after downing stuff (downMatrix): don't init matrix, maxRowNr and maxColNr here (eqRewrite): revert to returning empty homogenous set if inhomogenous set is empty 2005-08-25 Steven Eker * matrixOpSignature.cc (MACRO): added stringSymbol * matrixOpSymbol.hh (class MatrixOpSymbol): added enum Algorithm and decl for downAlgorithm() * matrixOpSymbol.cc (downAlgorithm): addded (eqRewrite): use downAlgorithm() 2005-08-23 Steven Eker * matrixOpSymbol.cc (eqRewrite): code cleaning (upSet): code cleaning (upVector): code cleaning (downVector): clear vec (downVectorEntry): clear new vec entries after resize() (downMatrix): clear matrix (downMatrixEntry): optimize 2005-08-18 Steven Eker * matrixOpSymbol.hh (class MatrixOpSymbol): updated dec for upVector() * matrixOpSymbol.cc (upVector): work with IntVec (eqRewrite): use class MpzSystem * matrixOpSymbol.hh (class MatrixOpSymbol): added typedef IntVec 2005-08-17 Steven Eker * matrixOpSymbol.hh (class MatrixOpSymbol): updated decls for typedef SparseVector; deleted decl for downMatrixEntry(); updated decls for downVectorEntry() and downVector() * matrixOpSymbol.cc (downCoeff): deleted (downMatrixEntry): use getNumber() (downVectorEntry): rewritten (downVector): updated * numberOpSymbol.cc (getNumber): added * numberOpSymbol.hh (class NumberOpSymbol): added decl for getNumber() ===================================Maude86c=========================================== 2004-10-28 Steven Eker * matrixOpSymbol.cc (eqRewrite): quick hack to test DiophantineSystem3 2004-10-14 Steven Eker * matrixOpSymbol.cc (getDataAttachments): return natSystemSolve as data (eqRewrite): return nonempty homogenous solution set only if inhomogenous nonempty 2004-09-16 Steven Eker * matrixOpSymbol.cc (downMatrixEntry): fixed bug where we were returning true even after failing (upVector): fixed bug where we were generating null pointer vector entries 2004-09-15 Steven Eker * matrixOpSymbol.hh (class MatrixOpSymbol): added decls for new member functions * matrixOpSymbol.cc (downVector): added (downVectorEntry): added (downCoeff): added (downMatrixEntry): added (downMatrix): added * numberOpSymbol.hh (class NumberOpSymbol): commented out declarations for makeNegDag(), isNeg(), getNeg() (getMinusSymbol): added * matrixOpSymbol.cc (upSet): added (upVector): added 2004-09-14 Steven Eker * matrixOpSymbol.cc: created * matrixOpSymbol.hh: created * matrixOpSignature.cc: created 2004-09-09 Steven Eker * floatOpSymbol.cc (getDataAttachments): fixed bug where we were returning NumberSymbol rather than FloatOpSymbol 2004-08-24 Steven Eker * ACU_NumberOpSymbol.cc (getDataAttachments): handle min and max (eqRewrite2): added min and max ===================================Maude85=========================================== 2004-06-29 Steven Eker * floatOpSymbol.cc (safePow): fixed 0.0 ^ -1.0 = Infinity issue on certain plaforms ===================================Maude84d=========================================== 2004-06-14 Steven Eker * randomOpSymbol.cc (attachData): call NumberOpSymbol::attachData() for consistancy (getDataAttachments): call NumberOpSymbol::getDataAttachments() for consistancy * counterSymbol.cc (attachData): call NumberOpSymbol::attachData() for consistancy (getDataAttachments): call NumberOpSymbol::getDataAttachments() for consistancy * numberOpSymbol.cc (getDataAttachments): handle NONE case gracefully 2004-06-07 Steven Eker * counterSymbol.cc (resetRules): call NumberOpSymbol::resetRules() (saveHiddenState): added (restoreHiddenState): added * counterSymbol.hh (class CounterSymbol): added decl for saveHiddenState() and restoreHiddenState(); added data member currentValueStack * counterSymbol.cc (reset): becomes resetRules() * counterSymbol.hh (class CounterSymbol): replace reset() decl with resetRules() decl 2004-06-03 Steven Eker * builtIn.hh: added decls for class RandomOpSymbol and class CounterSymbol * numberOpSymbol.hh: #include "gmpxx.h" * counterSymbol.hh: created * counterSymbol.cc: created 2004-06-02 Steven Eker * randomOpSymbol.hh (setGlobalSeed): added * randomOpSymbol.cc: created * randomOpSymbol.hh: created ===================================Maude84c=========================================== 2004-05-06 Steven Eker * ACU_NumberOpSymbol.cc (getDataAttachments): fixed bug where we were reporting our id hook as NumberOpSymbol * CUI_NumberOpSymbol.cc (getDataAttachments): fixed bug where we were reporting our id hook as NumberOpSymbol * numberOpSymbol.cc (eqRewrite): added more detailed CantHappen() message ===================================Maude84a=========================================== 2003-11-10 Steven Eker * stringOpSymbol.cc (getDataAttachments): fixed bug where we were returning NumberOpSymbol rather than StringOpSymbol 2003-11-06 Steven Eker * branchSymbol.cc (getDataAttachments): added (getTermAttachments): added * branchSymbol.hh (class BranchSymbol): added decls for getDataAttachments() and getTermAttachments() * equalitySymbol.cc (getDataAttachments): added (getTermAttachments): added * equalitySymbol.hh (class EqualitySymbol): added decls for getDataAttachments() and getTermAttachments() 2003-11-05 Steven Eker * floatOpSymbol.cc (getDataAttachments): added (getSymbolAttachments): added (getTermAttachments): added * stringOpSymbol.cc (getDataAttachments): added (getSymbolAttachments): added (getTermAttachments): added * stringOpSymbol.hh (class StringOpSymbol): added decls for getDataAttachments(), getSymbolAttachments(), getTermAttachments() * floatOpSymbol.hh (class FloatOpSymbol): added decls for getDataAttachments(), getSymbolAttachments(), getTermAttachments() * divisionSymbol.hh (class DivisionSymbol): added decls for getDataAttachments() and getSymbolAttachments() * divisionSymbol.cc (getDataAttachments): added (getSymbolAttachments): added * minusSymbol.cc (getDataAttachments): added * minusSymbol.hh (class MinusSymbol): added decl for getDataAttachments() * ACU_NumberOpSymbol.cc (getDataAttachments): added (getSymbolAttachments): added * ACU_NumberOpSymbol.hh (class ACU_NumberOpSymbol): added decls for getDataAttachments() and getSymbolAttachments() * CUI_NumberOpSymbol.cc (getDataAttachments): added (getSymbolAttachments): added * CUI_NumberOpSymbol.hh (class CUI_NumberOpSymbol): added decls for getDataAttachments() and getSymbolAttachments() * numberOpSymbol.cc (getDataAttachments): added (getSymbolAttachments): added (getTermAttachments): added * numberOpSymbol.hh (class NumberOpSymbol): added decls for getDataAttachments(), getSymbolAttachments(), getTermAttachments() * succSymbol.cc (getDataAttachments): added (getTermAttachments): added * bindingMacros.hh (APPEND_DATA): added * succSymbol.hh (class SuccSymbol): added decls for getDataAttachments() and getTermAttachments() * bindingMacros.hh (APPEND_TERM): added 2003-11-03 Steven Eker * bindingMacros.hh (APPEND_SYMBOL): added 2003-10-23 Steven Eker * equalitySymbol.hh (class EqualitySymbol): updated decl for EqualitySymbol() * equalitySymbol.cc (EqualitySymbol): don't take term args * branchSymbol.hh (class BranchSymbol): updated decl for BranchSymbol() * branchSymbol.cc (BranchSymbol): take nrArgs arg rather than term arg * equalitySymbol.hh (class EqualitySymbol): deleted decl for ~EqualitySymbol() * equalitySymbol.cc (~EqualitySymbol): deleted now we no longer need to prevent deep self destruction of equalTerm and notEqualTerm * branchSymbol.cc (~BranchSymbol): deepSelfDestruct() test terms 2003-10-15 Steven Eker * equalitySymbol.cc (attachData): added (copyAttachments): added (attachTerm): added * equalitySymbol.hh (class EqualitySymbol): added declarations for attachData(), attachTerm(), copyAttachments() 2003-10-14 Steven Eker * branchSymbol.cc (attachData): added (attachTerm): added (copyAttachments): added * branchSymbol.hh (class BranchSymbol): added declarations for attachData(), attachTerm(), copyAttachments() ===================================Maude83=========================================== 2003-07-28 Steven Eker * floatSymbol.cc: need to include mathStuff.hh 2003-07-25 Steven Eker * floatSymbol.cc: removed #include and #include * floatOpSymbol.cc: use mathStuff.hh 2003-07-16 Steven Eker * stringOpSymbol.hh: use ropeStuff.hh * stringDagNode.hh: use ropeStuff.hh * stringTerm.hh: use ropeStuff.hh ===================================Maude81=========================================== 2003-05-30 Steven Eker * equalitySymbol.cc (domainSortAlwaysLeqThan): added * equalitySymbol.hh (class EqualitySymbol): added decl for domainSortAlwaysLeqThan() * branchSymbol.cc (rangeSortNeverLeqThan): added (rangeSortAlwaysLeqThan): added (domainSortAlwaysLeqThan): added * branchSymbol.hh (class BranchSymbol): added decls for rangeSortNeverLeqThan(), rangeSortAlwaysLeqThan(), domainSortAlwaysLeqThan() 2003-05-15 Steven Eker * ACU_NumberOpSymbol.cc (eqRewrite2): fix bug in case that some args aren't numbers * ACU_NumberOpSymbol.hh (class ACU_NumberOpSymbol): added decl for eqRewrite2() * ACU_NumberOpSymbol.cc (eqRewrite2): added; do most of the work here to avoid a large stack frame for eqRewrite() (eqRewrite): use new reduceArgumentsAndNormalize() convention; use eqRewrite2() (eqRewrite2): use getACU_DagNode(), getArgument(), getMultiplicity() ===================================Maude80a=========================================== 2003-05-01 Steven Eker * floatDagNode.cc (overwriteWithClone): rewritten (makeClone): rewritten * stringDagNode.cc (overwriteWithClone): rewritten (makeClone): rewritten ===================================Maude80=========================================== 2003-02-25 Steven Eker * stringOpSymbol.cc (fwdFind): static_cast(start) to avoid NONE being converted to unsigned * succSymbol.cc: removed #pragma (makeNatTerm): updated Assert() (makeNatDag): updated Assert() (getNat): updated Assert()s (both versions) (rewriteToNat): updated Assert()s * succSymbol.hh: removed #pragma * stringTerm.cc: removed #pragma * stringTerm.hh: removed #pragma * stringSymbol.cc: removed #pragma * stringSymbol.hh: removed #pragma * stringOpSymbol.cc: removed #pragma (eqRewrite): updated Assert()s * stringOpSymbol.hh: removed #pragma * stringDagNode.cc: removed #pragma * stringDagNode.hh: removed #pragma * sortTestSymbol.cc: removed #pragma (eqRewrite): updated Assert() * sortTestSymbol.hh: removed #pragma * numberOpSymbol.cc: removed #pragma (eqRewrite): updated Assert()s * numberOpSymbol.hh: removed #pragma * minusSymbol.cc: removed #pragma (makeNegDag): updated Assert() (isNeg): updated Assert() (both versions) (getNeg): updated Assert() (both versions) * minusSymbol.hh: removed #pragma * floatTerm.cc: removed #pragma * floatTerm.hh: removed #pragma * floatSymbol.cc: removed #pragma * floatSymbol.hh: removed #pragma * floatOpSymbol.cc: removed #pragma (eqRewrite): updated Assert()s; Assert() -> CantHappen() (*2) * floatOpSymbol.hh: removed #pragma * floatDagNode.cc: removed #pragma * floatDagNode.hh: removed #pragma * equalitySymbol.cc: removed #pragma (eqRewrite): updated Assert() * equalitySymbol.hh: removed #pragma * divisionSymbol.cc: removed #pragma (eqRewrite): updated Assert()s (makeRatDag): updated Assert() (isRat): updated Assert() (both versions) (getRat): updated Assert()s (both versions) (makeRatTerm): updated Assert() * divisionSymbol.hh: removed #pragma * branchSymbol.cc: removed #pragma (fillInSortInfo): updated Assert()s (eqRewrite): updated Assert() (computeBaseSort): updated Assert() * branchSymbol.hh: removed #pragma * CUI_NumberOpSymbol.cc: removed #pragma (eqRewrite): updated Assert() * CUI_NumberOpSymbol.hh: removed #pragma * ACU_NumberOpSymbol.cc: removed #pragma (eqRewrite): updated Assert()s * ACU_NumberOpSymbol.hh: removed #pragma ===================================Maude79=========================================== 2003-01-08 Steven Eker * ACU_NumberOpSymbol.cc (eqRewrite): rewritten to avoid making use of ACU_DagNode; less efficient - need to revisit this once red-black stuff is working ===================================Maude76================================================== 2002-11-25 Steven Eker * stringDagNode.cc (StringDagNode): commented out Assert() to avoid accessing MemoryCell::Word * stringTerm.hh: added using namespace __gnu_cxx to for g++3.2 * stringDagNode.hh: added using namespace __gnu_cxx to for g++3.2 2002-11-05 Steven Eker * stringOpSymbol.cc (fwdFind): changed semantics for empty pattern case (revFind): changed smenatics for empty pattern case (fwdFind): fixed wrap around bug introduced when we optimized the tests in previous change; added comment since this is a bug we fixed on 2001-01-17 and them optimized away the fix 2002-10-22 Steven Eker * stringOpSymbol.cc (eqRewrite): removed Assert(false,...) that could be reached if 1st arg was bad; converted other Assert(false,...)s to CantHappen()s 2002-10-09 Steven Eker * ACU_NumberOpSymbol.cc (eqRewrite): added check for abort after redcuing arguments and before doing expensive eager numerical calculations. This partly fixes the slow abort problem but cascading ACU normalizations during an abort can still be expensive 2002-10-04 Steven Eker * branchSymbol.cc (stackArguments): only stack args that aren't frozen or unstackable ===================================Maude76================================================== 2002-09-04 Steven Eker * floatSymbol.hh (class FloatSymbol): added decl for isConstructor() * floatSymbol.cc (isConstructor): added * stringSymbol.hh (class StringSymbol): added decl for isConstructor() * stringSymbol.cc (isConstructor): added 2002-08-26 Steven Eker * stringSymbol.cc (compileOpDeclarations): use new getOpDeclarations() semantics * floatSymbol.cc (compileOpDeclarations): use new getOpDeclarations() semantics * branchSymbol.cc (fillInSortInfo): use new getOpDeclarations() semantics (computeBaseSort): use new getOpDeclarations() semantics ===================================Maude75================================================== 2002-07-25 Steven Eker * builtIn.hh: deleted forward decls for classes MachineIntegerSymbol, MachineIntegerTerm, MachineIntegerDagNode and MachineIntegerOpSymbol * stringOpSymbol.cc (StringOpSymbol): don't clear machineIntegerSymbol (attachSymbol): don't bind machineIntegerSymbol (copyAttachments): don't copy machineIntegerSymbol (eqRewrite): deleted machineInt operation (eqRewrite): deleted string operation for machineInts * stringOpSymbol.hh (class StringOpSymbol): deleted data member machineIntegerSymbol * floatOpSymbol.cc (FloatOpSymbol): don't clear machineIntegerSymbol (attachSymbol): don't bind machineIntegerSymbol (copyAttachments): don't copy machineIntegerSymbol (eqRewrite): deleted machineInt operation (eqRewrite): deleted float operation for machineInts * floatOpSymbol.hh (class FloatOpSymbol): deleted data member machineIntegerSymbol ===================================Maude74================================================== 2002-06-12 Steven Eker * floatOpSymbol.cc (eqRewrite): support float(Rat) operation 2002-06-11 Steven Eker * floatOpSymbol.hh (class FloatOpSymbol): added data members succSymbol, minusSymbol and divisionSymbol * floatOpSymbol.cc (attachSymbol): handle succSymbol, minusSymbol and divisionSymbol (copyAttachments): handle succSymbol, minusSymbol and divisionSymbol (FloatOpSymbol): clear succSymbol, minusSymbol and divisionSymbol (eqRewrite): support rat(Float) op * stringOpSymbol.cc (eqRewrite): use Uint for substr index and length; use fits_uint_p(), get_ui() and UINT_MAX (substring): we no longer allow -ve index (fwdFind): we no longer allow -ve start (revFind): we no longer allow -ve start * stringOpSymbol.hh (class StringOpSymbol): updated decls for substring(), fwdFind() and revFind() (class StringOpSymbol): make ropeToNumber() static * stringOpSymbol.cc (substring): Int64 -> crope::size_type (fwdFind): Int64 -> crope::size_type (revFind): Int64 -> crope::size_type * stringOpSymbol.hh (class StringOpSymbol): added decl for ropeToNumber() * stringOpSymbol.cc (ropeToNumber): added (eqRewrite): support string(Rat, Nat) and rat(String, Nat) ops 2002-06-10 Steven Eker * stringOpSymbol.hh (class StringOpSymbol): added data member divisionSymbol * stringOpSymbol.cc: MachineFloat -> Float (StringOpSymbol): clear divisionSymbol (attachSymbol): handle divisionSymbol * stringOpSymbol.hh (class StringOpSymbol): data member machineFloatSymbol becomes floatSymbol * machineFloatOpSymbol.cc: MachineFloat -> Float; becomes floatOpSymbol.cc * machineFloatOpSymbol.hh: MachineFloat -> Float; becomes floatOpSymbol.hh * machineFloatDagNode.cc: MachineFloat -> Float; becomes floatDagNode.cc * machineFloatDagNode.hh: MachineFloat -> Float; becomes floatDagNode.hh * machineFloatTerm.cc: MachineFloat -> Float; becomes floatTerm.cc * machineFloatTerm.hh: MachineFloat -> Float; becomes floatTerm.hh * machineFloatSymbol.cc: MachineFloat -> Float; becomes floatSymbol.cc * machineFloatSymbol.hh: MachineFloat -> Float; becomes floatSymbol.hh * stringOpSymbol.hh (class StringOpSymbol): added data member minusSymbol * stringOpSymbol.cc (eqRewrite): machineFloat op becomes float (eqRewrite): converted decFloat to use Ints (StringOpSymbol): clear minusSymbol (attachSymbol): handle minusSymbol (copyAttachments): handle minusSymbol 2002-06-07 Steven Eker * succSymbol.hh (class SuccSymbol): added decl for getSignedInt64() * succSymbol.cc (getSignedInt64): added * succSymbol.hh (class SuccSymbol): added decl for getSignedInt() * succSymbol.cc (getSignedInt): added 2002-06-06 Steven Eker * stringOpSymbol.cc (eqRewrite): use Nats for substr (eqRewrite): use Nats for find and rfind (eqRewrite): use Nats for char 2002-06-05 Steven Eker * stringOpSymbol.cc (StringOpSymbol): init succSymbol (attachSymbol): handle succSymbol (copyAttachments): copy succSymbol (eqRewrite): use Nats for length and ascii ops * stringOpSymbol.hh (class StringOpSymbol): added data member succSymbol ===================================Maude73================================================== 2002-06-03 Steven Eker * numberOpSymbol.cc (eqRewrite): handle -1^bignum, 0^bignum, 1^bignum and 0 << bignum 2002-05-23 Steven Eker * divisionSymbol.cc (isRat): added Term* version (getRat): added Term* version * divisionSymbol.hh (class DivisionSymbol): added decl for Term* versions of isRat() and getRat() * minusSymbol.cc (isNeg): added Term* version (getNeg): added Term* version * minusSymbol.hh (class MinusSymbol): added decls for Term* versions of isNeg() and getNeg() * divisionSymbol.cc (getRat): added (makeRatTerm): added 2002-05-22 Steven Eker * divisionSymbol.cc (eqRewrite): use succSymbol->rewriteToNat() * CUI_NumberOpSymbol.cc (eqRewrite): use succSymbol->rewriteToNat() * ACU_NumberOpSymbol.cc (eqRewrite): use succSymbol->rewriteToNat() * numberOpSymbol.cc (eqRewrite): use succSymbol->rewriteToNat() * succSymbol.hh (class SuccSymbol): added decl for rewriteToNat() * succSymbol.cc (rewriteToNat): added * divisionSymbol.cc (eqRewrite): added optimization to avoid trying to simplify the same rational twice 2002-05-21 Steven Eker * divisionSymbol.cc: (isRat) don't treat 0 / NzNat as a Rat (eqRewrite): use isRat(); no longer try to simplify 0 / NzNat since it is not in ctor form. (eqRewrite): use makeRatDag() * minusSymbol.cc (isNeg): don't treat - 0 as neg since some caller expect to find a SuccSymbol under the MinusSymbol in the true case. * builtIn.hh: added fwd decl for class DivisionSymbol * divisionSymbol.hh: created * divisionSymbol.cc: created 2002-05-20 Steven Eker * minusSymbol.hh (class MinusSymbol): added decl for makeIntTerm() * minusSymbol.cc (makeIntTerm): added * succSymbol.cc (makeNatTerm): put more info in Assert() 2002-05-17 Steven Eker * numberOpSymbol.cc (eqRewrite): added abs operation * minusSymbol.cc (attachData): convert MinusSymbol attachment into NumberOpSymbol attachment * ACU_NumberOpSymbol.cc (attachSymbol): use MinusSymbol* (copyAttachments): use MinusSymbol* * ACU_NumberOpSymbol.hh (class ACU_NumberOpSymbol): minusSymbol now has type MinusSymbol* * numberOpSymbol.cc (copyAttachments): use MinusSymbol* * minusSymbol.hh: created * minusSymbol.cc: created * builtIn.hh: added fwd decl for MinusSymbol * numberOpSymbol.cc (makeNegDag): deleted (isNeg): deleted (getNeg): deleted (attachSymbol): use MinusSymbol* * numberOpSymbol.hh (getSuccSymbol): added (class NumberOpSymbol): minusSymbol now has type MinusSymbol* 2002-05-16 Steven Eker * numberOpSymbol.cc (eqRewrite): rewritten to handle -ve Ints * numberOpSymbol.hh (class NumberOpSymbol): updated decls * numberOpSymbol.cc (makeIntDag): becomes makeNegDag(); simplified for -ve case * ACU_NumberOpSymbol.cc (eqRewrite): use isNeg(), getNeg() and makeNegDag() * numberOpSymbol.cc (getInt): becomes getNeg(); simplified for -ve case (isInt): becomes isNeg(); simplified for -ve case * ACU_NumberOpSymbol.cc (eqRewrite): rewritten using isInt(), getInt() and makeIntDag() * numberOpSymbol.cc (makeIntDag): added (isInt): added (getInt): added * numberOpSymbol.hh (class NumberOpSymbol): added decls for makeIntDag(), isInt(), getInt() 2002-05-15 Steven Eker * numberOpSymbol.cc (eqRewrite): fix bad CODE for quo * CUI_NumberSymbol.hh: created * CUI_NumberSymbol.cc: created 2002-05-14 Steven Eker * numberOpSymbol.cc (eqRewrite): added div, mod, gcd, lcm, ^, << and >> cases (eqRewrite): have >> case work correctly even for extreme values of 2nd arg (eqRewrite): added - and modular exponent cases (eqRewrite): div becomes quo (eqRewrite): added divides case 2002-05-13 Steven Eker * ACU_NumberOpSymbol.cc (eqRewrite): updated usedMultiplicity (attachData): fixed bug where we were looking for hook named NumberOpSymbol rather than ACU_NumberOpSymbol (eqRewrite): handle the high multiplicity case for * (eqRewrite): added gcd and lcm cases (eqRewrite): fixed bug in xor case (eqRewrite): handle the case where >= 2 but not all of the args are numbers 2002-05-10 Steven Eker * builtIn.hh: added fwd decl for ACU_NumberOpSymbol * ACU_NumberOpSymbol.hh: created * ACU_NumberOpSymbol.cc: created 2002-05-09 Steven Eker * succSymbol.hh (class SuccSymbol): added decl for attachData() * succSymbol.cc (attachData): added in order to deal with null data attach * bindingMacros.hh (NULL_DATA): added * numberOpSymbol.hh: created * numberOpSymbol.cc: created * builtIn.hh: added forwards decls for SuccSymbol and NumberOpSymbol * succSymbol.hh: created * succSymbol.cc: created ===================================Maude72================================================== 2002-02-05 Steven Eker * stringOpSymbol.hh (class StringOpSymbol): deleted static data member eagerStrategy * stringOpSymbol.cc (StringOpSymbol): deleted strategy argument passed to FreeSymbol() * sortTestSymbol.hh (class SortTestSymbol): deleted static data member eagerStrategy * sortTestSymbol.cc (SortTestSymbol): use standard instead of eagerStrategy * machineIntegerOpSymbol.hh (class MachineIntegerOpSymbol): deleted static data member eagerStrategy * machineIntegerOpSymbol.cc (MachineIntegerOpSymbol): deleted strategy argument passed to FreeSymbol() * machineFloatOpSymbol.hh (class MachineFloatOpSymbol): deleted static data member eagerStrategy * machineFloatOpSymbol.cc (MachineFloatOpSymbol): deleted strategy argument passed to FreeSymbol() * branchSymbol.hh (class BranchSymbol): deleted static data member eagerStrategy * branchSymbol.cc (BranchSymbol): deleted strategy argument passed to FreeSymbol() 2002-01-30 Steven Eker * stringTerm.hh: ifdef LIBv3 for libstdc++-v3 * stringDagNode.hh: ifdef LIBv3 for libstdc++-v3 * stringOpSymbol.hh: ifdef LIBv3 for libstdc++-v3 ===================================Maude70================================================== 2002-01-25 Steven Eker * stringOpSymbol.cc (eqRewrite): undid hack because it doesn't work - for unknown reasons; reverted to old library (eqRewrite): redid hack; fixed \0 termination bug in second copy of hack 2002-01-24 Steven Eker * stringOpSymbol.cc (eqRewrite): fixed bug where we weren't \0 terminating our temporary C-string copy of left arg rope; bug was introduced by hack below 2001-12-10 Steven Eker * stringDagNode.hh: #include -> #include * stringOpSymbol.cc (eqRewrite): added hacks to get around the problem of Rope::c_str() not working in libstdc++-v3 * stringTerm.hh: #include -> #include ===================================Maude69================================================== 2001-03-16 Steven Eker * stringOpSymbol.cc (rewriteToString): incrementCount() -> incrementEqCount() * sortTestSymbol.cc (eqRewrite): incrementCount() -> incrementEqCount() * machineIntegerOpSymbol.cc (eqRewrite): simplified using rewriteToMachineInteger() * machineIntegerSymbol.cc (rewriteToMachineInteger): incrementCount() -> incrementEqCount() * machineFloatSymbol.cc (rewriteToMachineFloat): incrementCount() -> incrementEqCount() 2001-03-08 Steven Eker * branchSymbol.hh (class BranchSymbol): added decl for stackArguments() * branchSymbol.cc (stackArguments): added ===================================Engine65================================================== 2001-02-16 Steven Eker * stringOpSymbol.cc (eqRewrite): put result of left + right in a local variable for safety (eqRewrite): put result of int64ToString() into a local variable for safety (eqRewrite): use safeCast() for down casting in many places 2001-02-12 Steven Eker * bindingMacros.hh (BIND_OP): return true in op == t case 2001-01-19 Steven Eker * stringOpSymbol.cc (attachData): simplified using BIND_OP; call FreeSymbol::attachData() (attachSymbol): call FreeSymbol::copyAttachments() (attachTerm): don't self destruct term; call FreeSymbol::attachTerm() (copyAttachments): simplified using COPY_SYMBOL and COPY_TERM; call FreeSymbol::copyAttachments() * machineFloatOpSymbol.cc (attachData): simplified using BIND_OP; call FreeSymbol::attachData() (attachSymbol): call FreeSymbol::copyAttachments() (attachTerm): don't self destruct term; call FreeSymbol::attachTerm() (copyAttachments): simplified using COPY_SYMBOL and COPY_TERM; call FreeSymbol::copyAttachments() * machineIntegerOpSymbol.cc (attachData): simplified using BIND_OP; call FreeSymbol::attachData() * bindingMacros.hh (BIND_OP): added (BIND_OP): added * machineIntegerOpSymbol.cc (copyAttachments): simplified using COPY_SYMBOL and COPY_TERM (copyAttachments): call FreeSymbol::copyAttachments() (attachTerm): don't self destruct term; call FreeSymbol::attachTerm() (attachSymbol): call FreeSymbol::attachSymbol() * bindingMacros.hh (COPY_SYMBOL): added (COPY_TERM): added 2001-01-17 Steven Eker * stringOpSymbol.cc (fwdFind): protect against wrap-around when start is close to the maximum 64 signed int (substring): protect against wrap-around when length or index are close to the minimum 64 signed int;protect against wrap-around when length is close to the maximum 64 signed int * machineFloatOpSymbol.cc (postInterSymbolPass): simplified using PREPARE_TERM() * machineIntegerOpSymbol.cc (postInterSymbolPass): simplified using PREPARE_TERM() * stringOpSymbol.cc (postInterSymbolPass): simplified using PREPARE_TERM() * bindingMacros.hh (PREPARE_TERM): added 2001-01-12 Steven Eker * machineFloatOpSymbol.hh (class MachineFloatOpSymbol): deleted decls for fixUp() and copyFixUp() * machineFloatOpSymbol.cc (fixUp): deleted (copyFixUp): deleted (attachSymbol): simplified using BIND_SYMBOL() (attachTerm): simplified using BIND_TERM(); self-destruct term in the case we don't recognize purpose * stringOpSymbol.hh (class StringOpSymbol): deleted decls for fixUp() and copyFixUp() * machineIntegerOpSymbol.cc (attachTerm): self-destruct term in the case we don't recognize purpose * stringOpSymbol.cc (attachSymbol): simplified using BIND_SYMBOL() (attachTerm): simplified using BIND_TERM(); self-destruct term in the case we don't recognize purpose so that when we return false caller knows they don't have to garbage collect term (fixUp): deleted (copyFixUp): deleted * machineIntegerOpSymbol.hh (class MachineIntegerOpSymbol): deleted decls for fixUp() and copyFixUp() * bindingMacros.hh (BIND_SYMBOL): created * machineIntegerOpSymbol.cc (fixUp): deleted (copyFixUp): deleted (attachSymbol): simplified using BIND_SYMBOL() (attachTerm): simplified using BIND_TERM() 2001-01-10 Steven Eker * stringOpSymbol.cc (StringOpSymbol): initialize op, stringSymbol, machineIntegerSymbol, machineFloatSymbol, decFloatSymbol (attachData): added (attachSymbol): added (attachTerm): added (copyAttachments): added * machineFloatOpSymbol.cc (MachineFloatOpSymbol): initialize op, machineFloatSymbol, machineIntegerSymbol (attachData): added (attachSymbol): added (attachTerm): added (copyAttachments): added * machineFloatOpSymbol.hh (class MachineFloatOpSymbol): added decls for attachData(), attachSymbol(), attachTerm(), copyAttachments() * machineIntegerOpSymbol.cc (attachData): added purpose arg * machineIntegerOpSymbol.hh (class MachineIntegerOpSymbol): added purpose argument to attachData() decl 2001-01-09 Steven Eker * machineIntegerOpSymbol.cc (MachineIntegerOpSymbol): initialize op = NONE and machineIntegerSymbol = 0 (attachTerm): handle the case where we are handed multiple terms with the same purpose - ok if they are equal, error otherwise * machineIntegerOpSymbol.hh (class MachineIntegerOpSymbol): added declarations for attachData(), attachSymbol(), attachTerm(), copyAttachments() * machineIntegerOpSymbol.cc (attachData): added (attachTerm): added (attachSymbol): added (copyAttachments): added ===================================Engine64================================================== 2000-06-21 Steven Eker * machineFloatOpSymbol.cc (eqRewrite): check for wrap around in float to int conversion (happens on alpha and linux with -O2) * machineFloatOpSymbol.hh (class MachineFloatOpSymbol): added decl for use safePow() * machineFloatOpSymbol.cc (safePow): added (eqRewrite): use safePow() 2000-06-20 Steven Eker * machineFloatOpSymbol.cc (eqRewrite): define +/-Infinity ^ X properly (eqRewrite): check arguments to asin and acos (eqRewrite): define atan2(+/-Infinity, +/-Infinity) * machineFloatOpSymbol.hh (class MachineFloatOpSymbol): added decl for isOdd() * machineFloatOpSymbol.cc (eqRewrite): fix pow() again (we had it wrong the first time) (isOdd): added (eqRewrite): define -Infinity ^ X properly (eqRewrite): use isOdd 2000-06-19 Steven Eker * stringOpSymbol.cc (fixUp): save decFloatSymbol (copyFixUp): copy decFloatSymbol * stringOpSymbol.hh (class StringOpSymbol): added data member decFloatSymbol (class StringOpSymbol): upaded decl for fixUp() * stringOpSymbol.cc (eqRewrite): implemented decFloat operation 2000-06-14 Steven Eker * machineFloatOpSymbol.cc (eqRewrite): check for errno != 0 and NaN in result (eqRewrite): don't check for errno != 0 after all: solaris sets this for log(0) and pow() overflows whereas linux does not. Instead we check the inputs to functions whose output in extreme cases varies between platforms (eqRewrite): fix pow() result in the case that first arg is -ve and pow() produces wrongly sign result; goto failure if sign cannot be reliably determined 2000-06-13 Steven Eker * machineFloatTerm.cc (MachineFloatTerm): don't allow -0.0 to be stored * machineFloatDagNode.cc (MachineFloatDagNode): don't allow -0.0 to be stored * stringOpSymbol.cc (fixUp): store machineFloatSymbol (copyFixUp): copy machineFloatSymbol (eqRewrite): added code for MachineFloat <-> String * stringOpSymbol.hh (class StringOpSymbol): added data member machineFloatSymbol; updated decl for ctor 2000-06-12 Steven Eker * machineFloatOpSymbol.cc (eqRewrite): use rewriteToMachineFloat() (eqRewrite): handle machine integer to machine float conversion * machineFloatSymbol.hh (class MachineFloatSymbol): added decl for rewriteToMachineFloat() * machineFloatSymbol.cc (rewriteToMachineFloat): added * stringOpSymbol.hh (class StringOpSymbol): deleted decl for rewriteToMachineInteger() * stringOpSymbol.cc (eqRewrite): use MachineIntegerSymbol::rewriteToMachineInteger() (3 places) (rewriteToMachineInteger): deleted * machineFloatOpSymbol.cc (eqRewrite): support machine float to machine integer conversion * machineIntegerSymbol.hh (class MachineIntegerSymbol): added decl for rewriteToMachineInteger() * machineIntegerSymbol.cc (rewriteToMachineInteger): added * machineFloatOpSymbol.cc (fixUp): save machineIntegerSym (copyFixUp): copy machineIntegerSym * machineFloatOpSymbol.hh (class MachineFloatOpSymbol): added data member machineIntegerSymbol; updated decl for fixUp() 2000-06-09 Steven Eker * machineIntegerSymbol.cc (fillInSortInfo): use getValue() rather than isZero() * machineIntegerTerm.hh (isZero): deleted * machineFloatOpSymbol.hh: created * machineFloatOpSymbol.cc: created * machineFloatTerm.cc: created * machineFloatTerm.hh: created * builtIn.hh: added forward decls for MachineFloat classes * machineFloatDagNode.cc: created * machineFloatSymbol.cc: created * machineFloatDagNode.hh: created * machineFloatSymbol.hh: created 2000-05-16 Steven Eker * stringOpSymbol.cc (eqRewrite): parse becomes machineInt, format becomes string 2000-05-09 Steven Eker * stringOpSymbol.cc (eqRewrite): add code for format and parse operations 2000-04-25 Steven Eker * stringOpSymbol.cc (eqRewrite): added functionality for char() and ascii() ops * builtIn.hh: added forward decls for class StringSymbol, class StringTerm, class StringDagNode, class StringOpSymbol * stringOpSymbol.cc (fixUp): take StringSymbol* arg (copyFixUp): cast to StringSymbol* * stringOpSymbol.hh (class StringOpSymbol): updated fixUp() decl (class StringOpSymbol): stringSymbol becomes a StringSymbol* * stringDagNode.cc (StringDagNode): take StringSymbol* arg (overwriteWithClone): cast to StringSymbol* (makeClone): cast to StringSymbol* * stringDagNode.hh (class StringDagNode): updated decl for StringDagNode() * stringTerm.cc (StringTerm): take StringSymbol* arg (deepCopy2): cast to StringSymbol* (overwriteWithDagNode): cast to StringSymbol* (makeDagNode): cast to StringSymbol* * stringTerm.hh (class StringTerm): updated decl for StringTerm() * stringSymbol.hh: created * stringSymbol.cc: created 2000-04-24 Steven Eker * stringDagNode.cc (StringDagNode): call setCallDtor() so that crope can be destructed on garbage collection 2000-04-12 Steven Eker * stringOpSymbol.cc (substring): return crope rather than const crope& * stringOpSymbol.hh (class StringOpSymbol): substring() must return crope rather than const crope& 2000-04-11 Steven Eker * stringOpSymbol.cc: created * stringOpSymbol.hh: created 2000-04-10 Steven Eker * stringDagNode.cc: created * stringDagNode.hh: created 2000-04-07 Steven Eker * stringTerm.cc: created * stringTerm.hh: created ===================================Maude 1.0.5 finished======================================= 2000-03-14 Steven Eker * branchSymbol.cc (computeBaseSort): code cleaning ===================================Engine56================================================== 2000-01-28 Steven Eker * equalitySymbol.cc (generateCode): call generateIncrement() (generateCode): don't call generateIncrement() after all as generateRhs() does so 2000-01-27 Steven Eker * equalitySymbol.hh (class EqualitySymbol): added decl for generateCode() * equalitySymbol.cc (generateCode): added ===================================Engine54================================================== 1999-10-29 Steven Eker * machineIntegerDagNode.cc (getHashValue): cast to int before hashing * machineIntegerTerm.cc (normalize): cast to int before hashing * machineIntegerDagNode.cc (MachineIntegerDagNode): int -> Int64 * machineIntegerDagNode.hh (class MachineIntegerDagNode): int -> Int64 * machineIntegerOpSymbol.cc (eqRewrite): specialEval becomes a bool; int -> Int64 * machineIntegerTerm.cc (MachineIntegerTerm): int -> Int64 (compareArguments): (both versions) int -> Int64 * machineIntegerTerm.hh (class MachineIntegerTerm): int -> Int64 (getValue): int -> Int64 ===================================Engine53================================================== 1999-10-25 Steven Eker * sortTestSymbol.cc (eqRewrite): updated call to tracePreEqRewrite() * machineIntegerOpSymbol.cc (eqRewrite): updated call to tracePreEqRewrite() 1999-10-19 Steven Eker * machineIntegerDagNode.cc (getHashValue): added * machineIntegerDagNode.hh (class MachineIntegerDagNode): added decl for getHashValue() 1999-10-14 Steven Eker * sortTestSymbol.cc (eqRewrite): call constrainToExactSort(t, context); ===================================Engine52================================================== 1999-04-26 Steven Eker * branchSymbol.cc (compileSortConstraints): deleted (compileEquations): deleted (fillInSortInfo): added extra assert for component of 2nd arg * branchSymbol.hh (class BranchSymbol): deleted decls for compileEquations() and compileSortConstraints() * branchSymbol.cc (eqRewrite): call FreeSymbol::eqRewrite(subject, context) if we can't match 1st arg * sortTestSymbol.cc (makeLazyStrategy): made lazyStrategy a local static (fillInSortInfo): deleted (computeBaseSort): deleted (compileOpDeclarations): deleted (compileSortConstraints): deleted (acceptEquation): added * sortTestSymbol.hh (class SortTestSymbol): added decl for acceptEquation(); deleted decls for fillInSortInfo(), computeBaseSort(), compileOpDeclarations(), compileSortConstraints() (makeLazyStrategy): moved to sortTestSymbol.cc * equalitySymbol.cc (computeBaseSort): deleted (compileOpDeclarations): deleted (compileSortConstraints): deleted; fixes nasty bug where we dump core on uncompiled sort constraints (fillInSortInfo): deleted (acceptEquation): added * equalitySymbol.hh (class EqualitySymbol): added decl for acceptEquation(); deleted decls for fillInSortInfo(), computeBaseSort(), compileOpDeclarations(), compileSortConstraints() 1999-04-22 Steven Eker * machineIntegerSymbol.cc (compileOpDeclarations): don't do default sort processing anymore since rangeComponent() and domainComponent() no longer require this 1999-04-20 Steven Eker * equalitySymbol.cc (fillInSortInfo): use correct arg of op decl (computeBaseSort): use correct arg of op decl (fillInSortInfo): use domainComponent() in asserts * branchSymbol.cc (fillInSortInfo): use domainComponent() * branchSymbol.hh (class BranchSymbol): deleted data members expectedSort and range (class BranchSymbol): updated decl for ctor (class BranchSymbol): deleted decls for rangeComponent() and domainComponent() * branchSymbol.cc (rangeComponent): deleted; default will now work (domainComponent): deleted; default will now work (BranchSymbol): don't take range arg or initialize range (computeBaseSort): use (default) rangeComponent() rather than range data member (computeBaseSort): use getOpDeclarations() rather than expectedSort (fillInSortInfo): use getOpDeclarations() rather than expectedSort (BranchSymbol): don't take testSort arg or initialize expectedSort * equalitySymbol.hh (class EqualitySymbol): delete rangeSort and argComponent data members (class EqualitySymbol): delete obsolete strategy stuff (class EqualitySymbol): update ctor decl (class EqualitySymbol): deleted decls for rangeComponent() and domainComponent() * equalitySymbol.cc (domainComponent): deleted; default will now work (rangeComponent): deleted; default will now work (EqualitySymbol): don't take or initialize argComponent (fillInSortInfo): use getOpDeclarations() rather than rangeSort (fillInSortInfo): split Assert to check both args against op decl (computeBaseSort): use getOpDeclarations() rather than rangeSort (EqualitySymbol): don't initialize range sort or take resultSort arg * sortTestSymbol.hh (class SortTestSymbol): deleted rangeSort data member (class SortTestSymbol): updated ctor decl (class SortTestSymbol): deleted decls for rangeComponent() and domainComponent() * sortTestSymbol.cc (rangeComponent): (instance version) deleted (fillInSortInfo): use getOpDeclarations() rather than rangeSort (computeBaseSort): use getOpDeclarations() rather than rangeSort (rangeComponent): deleted; default will now work (domainComponent): deleted; default will now work (SortTestSymbol): don't initialize rangeSort; don't take resultSort arg * sortTestSymbol.hh (class SortTestSymbol): deleted decl for rangeComponent() instance version * branchSymbol.cc (rangeComponent): (instance version) deleted (computeBaseSort): don't use (instance version) rangeComponent() * branchSymbol.hh (class BranchSymbol): deleted decl for rangeComponent() instance version * equalitySymbol.cc (rangeComponent): (instance version) deleted * equalitySymbol.hh (class EqualitySymbol): deleted decl for rangeComponent() instance version * machineIntegerDagNode.cc (specialPrint): deleted * machineIntegerDagNode.hh (class MachineIntegerDagNode): decl for specialPrint() * machineIntegerTerm.cc (specialPrint): deleted * machineIntegerTerm.hh (class MachineIntegerTerm): deleted decl for specialPrint() 1999-04-19 Steven Eker * branchSymbol.cc: use equal() rather than compare() for checking 1st arg against test terms * equalitySymbol.cc (eqRewrite): call computeTrueSort() on bith args inorder to force normalization; we don't actually use the sorts; this fixes a bug that we shared with OBJ3 === op ===================================Engine48================================================== ===================================Maude 1.0.2 released======================================= ===================================Maude 1.0.1 released======================================= 1999-02-27 Steven Eker * branchSymbol.cc (fillInSortInfo): fixed bad Assert() test ===================================VectorExperiment========================================== 1999-02-04 Steven Eker * sortTestSymbol.cc (parse): deleted (fillInSortInfo): added * sortTestSymbol.hh (class SortTestSymbol): deleted decl for parse(); added decl for fillInSortInfo() * equalitySymbol.cc (parse): deleted (fillInSortInfo): added * equalitySymbol.hh (class EqualitySymbol): deleted decl for parse(); added decl for fillInSortInfo() * machineIntegerSymbol.cc (parse): deleted (fillInSortInfo): added * machineIntegerSymbol.hh (class MachineIntegerSymbol): deleted decl for parse(); added decl for fillInSortInfo() * branchSymbol.cc (parse): deleted (fillInSortInfo): added * branchSymbol.hh (class BranchSymbol): deleted decl for parse(); added decl for fillInSortInfo() ===================================Engine47================================================== ===================================Maude 1.00 released======================================= 1999-01-22 Steven Eker * branchSymbol.cc (BranchSymbol): don't delete TestTerms for the moment - another HACK * equalitySymbol.hh (class EqualitySymbol): added decl for ~EqualitySymbol() * equalitySymbol.cc (~EqualitySymbol): added so we can zero out terms in CachedDags to avoid them being deep self destructed; this is a hack - need to find a better solution after release. * branchSymbol.cc (BranchSymbol): use deep copy rather than loop =================================Engine46================================================== Sun Dec 13 16:44:05 1998 Steven Eker * machineIntegerOpSymbol.cc (copyFixUp): fixed bug where we we setting trueTerm twice and not setting falseTerm Thu Dec 10 14:33:33 1998 Steven Eker * sortTestSymbol.cc (rangeComponent): added (no args version) (domainComponent): added * sortTestSymbol.hh (class SortTestSymbol): added decls for rangeComponent() (no args version) and domainComponent() * branchSymbol.cc (domainComponent): added (rangeComponent): added (no args version) (BranchSymbol): handle range arg * branchSymbol.hh (class BranchSymbol): added decls for rangeComponent() (no args version) and domainComponent() (class BranchSymbol): added range arg to ctor (class BranchSymbol): added range data member * equalitySymbol.hh (class EqualitySymbol): added data member argComponent; deleted data member eagerFlag * equalitySymbol.cc (EqualitySymbol): handle argComponent (rangeComponent): added (no args version) (domainComponent): added * equalitySymbol.hh (class EqualitySymbol): added decls for rangeComponent() (no args version) and domainComponent() (class EqualitySymbol): added argComponent arg to ctor Tue Dec 8 11:45:16 1998 Steven Eker * machineIntegerOpSymbol.hh (getFalseTerm): deleted (getTrueTerm): deleted (getMachineIntegerSymbol): deleted (getOp): deleted (class MachineIntegerOpSymbol): updated decls * machineIntegerOpSymbol.cc (copyFixUp): replaces new version of fixUp() Mon Dec 7 11:44:21 1998 Steven Eker * machineIntegerOpSymbol.hh (class MachineIntegerOpSymbol): added decl for new version of fixUp() * machineIntegerOpSymbol.cc (fixUp): added 2nd version that takes an op code rather than a name * machineIntegerOpSymbol.hh (getOp): added (getMachineIntegerSymbol): added (getTrueTerm): added (getFalseTerm): added =================================Engine44================================================== Wed Nov 25 17:22:39 1998 Steven Eker * sortTestSymbol.cc (eqRewrite): call traceAbort() * machineIntegerOpSymbol.cc (eqRewrite): return result of builtInReplace() since this may now be false in abort case (eqRewrite): call traceAbort() in the case that our result is a in place construction of a MachineIntegerDagNode * branchSymbol.cc (eqRewrite): return result of builtInReplace() since this may now be false in abort case * equalitySymbol.cc (eqRewrite): return result of builtInReplace() since this may now be false in abort case Mon Nov 16 10:13:54 1998 Steven Eker * branchSymbol.cc (eqRewrite): simplified using RewritingContext::builtInReplace() * machineIntegerOpSymbol.cc (eqRewrite): simplified using RewritingContext::builtInReplace() * equalitySymbol.cc (eqRewrite): simplified using RewritingContext::builtInReplace() * machineIntegerOpSymbol.cc (eqRewrite): use getTraceStatus() instead of traceStatus() * sortTestSymbol.cc (eqRewrite): use getTraceStatus() instead of traceStatus() * equalitySymbol.cc (eqRewrite): use getTraceStatus() instead of traceStatus() * branchSymbol.cc (eqRewrite): use getTraceStatus() instead of traceStatus() Fri Nov 6 16:30:22 1998 Steven Eker * machineIntegerTerm.cc (deepCopy): -> deepCopy2() * machineIntegerTerm.hh (class MachineIntegerTerm): deepCopy() -> deepCopy2() =================================Engine43================================================== Thu Oct 15 14:58:33 1998 Steven Eker * machineIntegerOpSymbol.cc: becomes postInterSymbolPass() (postInterSymbolPass): use CachedDag::normalize() and prepare() * machineIntegerOpSymbol.hh (class MachineIntegerOpSymbol): interSymbolPass() decl becomes postInterSymbolPass() decl * equalitySymbol.hh (class EqualitySymbol): interSymbolPass() decl becomes postInterSymbolPass() decl * equalitySymbol.cc (interSymbolPass): becomes postInterSymbolPass() (postInterSymbolPass): use CachedDag::normalize() and prepare() Wed Oct 14 11:23:44 1998 Steven Eker * machineIntegerOpSymbol.hh (class MachineIntegerOpSymbol): deleted decl for dtor * machineIntegerOpSymbol.cc (MachineIntegerOpSymbol): simplified (~MachineIntegerOpSymbol): deleted (interSymbolPass): use CachedDag::getTerm() and setTerm() (reset): use CachedDag::reset() (fixUp): use CachedDag::setTerm() (eqRewrite): simplified using CachedDag::getDag() * machineIntegerOpSymbol.hh (class MachineIntegerOpSymbol): use CachedDag rather than DagRoot and Term* * equalitySymbol.hh (class EqualitySymbol): deleted decl for dtor * equalitySymbol.cc (EqualitySymbol): use CachedDag ctor (~EqualitySymbol): deleted (default will do) (reset): use CachedDag::reset() (eqRewrite): simplified using CachedDag::getDag() (interSymbolPass): use CachedDag::getTerm() and setTerm() * equalitySymbol.hh (class EqualitySymbol): use CachedDag rather than DagRoot and Term* =================================Engine42================================================== Thu Oct 8 14:35:23 1998 Steven Eker * machineIntegerDagNode.cc (compareArguments): added const * machineIntegerTerm.cc (compareArguments): (DagNode* version) inserted const (compareArguments): (Term* version) inserted const =================================Engine41================================================== Fri Sep 18 17:07:45 1998 Steven Eker * branchSymbol.cc (parse): use new setSortInfo() conventions, ConnectedComponent::getLeqSorts(), findIndex() (computeBaseSort): use setSortIndex(), ConnectedComponent::getLeqSorts(), findIndex() * equalitySymbol.cc (parse): use new setSortInfo() convention (computeBaseSort): se setSortIndex() * sortTestSymbol.cc (parse): use new setSortInfo() convention (eqRewrite): use DagNode::leq() (computeBaseSort): use setSortIndex() * machineIntegerSymbol.cc (parse): use new setSortInfo() convention (computeBaseSort): use setSortIndex() Fri Sep 11 18:31:56 1998 Steven Eker * sortTestSymbol.cc (eqRewrite): use <=(DagNode*,Sort&) Fri Jul 31 15:34:46 1998 Steven Eker * machineIntegerTerm.hh (class MachineIntegerTerm): added decl for getValue() (getValue): added Wed Jul 29 14:33:30 1998 Steven Eker * machineIntegerSymbol.cc (compileOpDeclarations): need to do default processing in order for rangeComponent() to work * machineIntegerSymbol.hh (class MachineIntegerSymbol): deletede decl for fixUp() * machineIntegerSymbol.cc (compileOpDeclarations): added (fixUp): deleted * machineIntegerSymbol.hh (class MachineIntegerSymbol): added decl for compileOpDeclarations(); Tue Jul 21 10:51:19 1998 Steven Eker * machineIntegerOpSymbol.cc (eqRewrite): use Terms and DagRoots rather than symbols for true/false results * machineIntegerOpSymbol.hh (class MachineIntegerOpSymbol): added data members trueDag and falseDag * machineIntegerOpSymbol.cc (~MachineIntegerOpSymbol): added (interSymbolPass): added (reset): added * machineIntegerOpSymbol.hh (class MachineIntegerOpSymbol): deleted decl for setSymbols(); added decl for fixUp(); updated decl for ctor (class MachineIntegerOpSymbol): trueSymbol -> trueTerm; falseSymbol -> falseTerm (class MachineIntegerOpSymbol): added decl for dtor; interSymbolPass() and reset() * machineIntegerOpSymbol.cc (fixUp): added (setSymbols): deleted (MachineIntegerOpSymbol): now just take name and arity * machineIntegerSymbol.hh (class MachineIntegerSymbol): updated ctor decl; added decl for fixUp(); * machineIntegerSymbol.cc (fixUp): added (MachineIntegerSymbol): so longer set sort info or pass it to NA_Symbol() * machineIntegerTerm.hh (class MachineIntegerTerm): added * machineIntegerTerm.cc (deepCopy): added Fri Jul 17 10:16:13 1998 Steven Eker * equalitySymbol.cc (EqualitySymbol): rewritten (~EqualitySymbol): added (interSymbolPass): added (reset): added (eqRewrite): obey general FreeSymbol strategy (eqRewrite): generate result DagNode and use overwriteWithClone() (eqRewrite): don't copy sort info when making dag * equalitySymbol.hh (class EqualitySymbol): deleted data members equalResult, notEqualResult and eager flag; added data members equalTerm, notEqualTerm, equalDag, notEqualDag (class EqualitySymbol): added decls for interSymbolPass() and reset() (class EqualitySymbol): take strategy arg rather than eager arg; args eq and neq become Term* (makeLazyStrategy): deleted (class EqualitySymbol): deleted decl for makeLazyStrategy() and static members eagerStrategy and lazyStrategy =================================Engine39================================================== Tue Jul 7 17:41:16 1998 Steven Eker * machineIntegerOpSymbol.hh (class MachineIntegerOpSymbol): added decl for setSymbols() * machineIntegerOpSymbol.cc (MachineIntegerOpSymbol): no longer initialize symbol pointers like constants (setSymbols): added * machineIntegerOpSymbol.hh (class MachineIntegerOpSymbol): removed const from symbol pointers to allow them to be initialized later; added defualt value of 0 for machineIntegerSymbol so we can call ctor without supplying necessary symbols Wed Jun 10 18:23:46 1998 Steven Eker * machineIntegerTerm.hh (class MachineIntegerTerm): updated normalize() decl * machineIntegerTerm.cc (normalize): clear changed flag =================================Engine38================================================== Fri Feb 13 14:42:16 1998 Steven Eker * branchSymbol.cc (~BranchSymbol): added to self destruct test terms * branchSymbol.hh (class BranchSymbol): added decl for ~BranchSymbol(); Thu Feb 12 14:51:37 1998 Steven Eker * equalitySymbol.cc (eqRewrite): compare() == 0 changed to equal() =================================Engine35================================================== Thu Dec 4 14:30:33 1997 Steven Eker * machineIntegerOpSymbol.cc (MachineIntegerOpSymbol): don't pass inert arg to FreeSymbol() * sortTestSymbol.cc (SortTestSymbol): don't pass inert arg to FreeSymbol() * equalitySymbol.cc (EqualitySymbol): don't pass inert arg to FreeSymbol() * branchSymbol.cc (BranchSymbol): don't pass inert arg to FreeSymbol() Wed Oct 15 16:40:07 1997 Steven Eker * machineIntegerOpSymbol.cc (MachineIntegerOpSymbol): remove constructor arg from call to FreeSymbol() * branchSymbol.cc (BranchSymbol): remove constructor arg from call to FreeSymbol() * sortTestSymbol.cc (SortTestSymbol): remove constructor arg from call to FreeSymbol() * equalitySymbol.cc (EqualitySymbol): remove constructor arg from call to FreeSymbol() =================================Engine30================================================== Wed Oct 1 16:38:08 1997 Steven Eker * sortTestSymbol.hh (eager): added (sort): added Tue Sep 30 14:30:53 1997 Steven Eker * machineIntegerTerm.hh (class MachineIntegerTerm): added decl for normalize() * machineIntegerTerm.cc (normalize): added in order to compute distict hash value =================================Engine28================================================== Fri Aug 29 16:31:24 1997 Steven Eker * sortTestSymbol.cc (eqRewrite): rewritten using FreeDagNode::getArgument() * equalitySymbol.cc (eqRewrite): rewritten using FreeDagNode::getArgument() (computeBaseSort): simplified * branchSymbol.cc (eqRewrite): rewritten using FreeDagNode::getArgument() (computeBaseSort): rewritten using FreeDagNode::getArgument() (rangeComponent): rewritten using FreeDagNode::getArgument() Thu Aug 28 11:07:50 1997 Steven Eker * machineIntegerOpSymbol.hh (class MachineIntegerOpSymbol): update MachineIntegerOpSymbol() decl * machineIntegerOpSymbol.cc (MachineIntegerOpSymbol): now take arity argument; (eqRewrite): rewritten to use CODE() macro, remove u- and add >> and << =================================Engine27================================================== Tue Aug 12 17:19:15 1997 Steven Eker * machineIntegerSymbol.cc (computeBaseSort): use getValue() rather than isZero() * machineIntegerOpSymbol.cc (eqRewrite): use getValue() rather than acessing MachineIntegerDagNode private part * machineIntegerDagNode.hh (class MachineIntegerDagNode): removed friend class MachineIntegerOpSymbol * machineIntegerDagNode.cc: delete #include "intSet.hh" * machineIntegerDagNode.hh (isZero): replaced with getValue(); typically most applications of machine int (eg meta level) will need at least this. (class MachineIntegerDagNode): delete decl for isZero(), added decl for getValue() * builtIn.hh: added decls for MachineIntegerSymbol, MachineIntegerTerm, MachineIntegerDagNode and MachineIntegerOpSymbol Tue Aug 5 16:12:57 1997 Steven Eker * machineIntegerOpSymbol.cc (eqRewrite): use getArgument() rather than argArray() Mon Aug 4 11:10:25 1997 Steven Eker * machineIntegerOpSymbol.cc (eqRewrite): split call to context.tracePreEqRewrite() so that we don't call it in a div by zero situation * machineIntegerOpSymbol.hh (class MachineIntegerOpSymbol): NA_Symbol -> MachineIntegerSymbol in ctor decl (class MachineIntegerOpSymbol): NA_Symbol -> MachineIntegerSymbol for data member * machineIntegerOpSymbol.cc (MachineIntegerOpSymbol): NA_Symbol -> MachineIntegerSymbol * machineIntegerTerm.hh (class MachineIntegerTerm): NA_Symbol -> MachineIntegerSymbol in ctor decl * machineIntegerTerm.cc (overwriteWithDagNode): NA_Symbol -> MachineIntegerSymbol (makeDagNode): NA_Symbol -> MachineIntegerSymbol (MachineIntegerTerm): NA_Symbol -> MachineIntegerSymbol * machineIntegerDagNode.hh (class MachineIntegerDagNode): NA_Symbol -> MachineIntegerSymbol in ctor decl * machineIntegerDagNode.cc (makeClone): NA_Symbol -> MachineIntegerSymbol (overwriteWithClone): NA_Symbol -> MachineIntegerSymbol (MachineIntegerDagNode): NA_Symbol -> MachineIntegerSymbol * machineIntegerDagNode.hh (isZero): added * machineIntegerTerm.hh (isZero): added * machineIntegerSymbol.cc: created * machineIntegerSymbol.hh (class MachineIntegerSymbol): created Thu Jul 31 10:33:28 1997 Steven Eker * machineIntegerOpSymbol.cc: created * machineIntegerOpSymbol.hh (class MachineIntegerOpSymbol): created * machineIntegerDagNode.cc: created * machineIntegerDagNode.hh (class MachineIntegerDagNode): created Wed Jul 30 19:27:49 1997 Steven Eker * machineIntegerTerm.hh (class MachineIntegerTerm): created * machineIntegerTerm.cc: created Wed Jul 23 11:59:39 1997 Steven Eker * metaRewriteSymbol.cc (pullDown2): pass full = false to normalize() =================================Engine26b================================================== Tue Jul 15 15:47:24 1997 Steven Eker * sortTestSymbol.cc (SortTestSymbol): pass inert = false * branchSymbol.cc (BranchSymbol): pass inert = false * metaRewriteSymbol.cc (MetaRewriteSymbol): pass inert = false * equalitySymbol.cc (EqualitySymbol): pass inert = false ================================Engine26===================================================== Mon Jun 30 10:59:50 1997 Steven Eker * metaRewriteSymbol.cc (pullDown): if symbol pulled down is a variable, set index to 0 to avoid uninitialized read in Variable::markEagerArguments(). This is a horrible hack the will disappear when this code is replaced by the new meta-level (pullDown): horrible hack removed in favour of change to Variable::markEagerArguments() whcih also works for top level reduction terms. Wed Jun 25 12:04:00 1997 Steven Eker * metaRewriteSymbol.cc (eqRewrite): pass purpose arg to makeSubcontext() Tue Jun 24 16:35:39 1997 Steven Eker * metaRewriteSymbol.cc: added #include "variable.hh" Thu Apr 10 18:34:40 1997 Steven Eker * metaRewriteSymbol.cc (errorRewrite): deepSelfDestruct t rather than relying on pushdUp2() to do it (eqRewrite): deepSelfDestruct t rather than relying on pushdUp2() to do it (pushUp2): don't deepSelfDestruct t (errorRewrite): increment rewrite count; handle tracing for the meta-*() ---> error* step. (eqRewrite): no longer start by incrementing rewrite count (eqRewrite): major rehack to handle tracing Tue Apr 8 14:38:01 1997 Steven Eker * branchSymbol.cc (eqRewrite): added tracing * sortTestSymbol.cc (eqRewrite): added tracing * equalitySymbol.cc (eqRewrite): added tracing Fri Apr 4 17:58:06 1997 Steven Eker * metaRewriteSymbol.cc (eqRewrite): removed trace flag from RewritingContext constructor calls Tue Apr 1 15:19:16 1997 Steven Eker * metaRewriteSymbol.cc (eqRewrite): heavily rewritten to use pushUpSubstitution() * metaRewriteSymbol.hh (class MetaRewriteSymbol): added decl for pushUpSubstitution() * metaRewriteSymbol.cc (pushUpSubstitution): added Mon Mar 31 10:28:16 1997 Steven Eker * metaRewriteSymbol.cc (errorRewrite): context arg removed (eqRewrite): removed context arg from errorRewrite() call * metaRewriteSymbol.hh (class MetaRewriteSymbol): added errorRewrite() decl * metaRewriteSymbol.cc (errorRewrite): added (eqRewrite): use errorRewrite() Fri Mar 28 16:08:10 1997 Steven Eker * metaRewriteSymbol.cc (pushUp2): added (pullDown2): added (eqRewrite): rewritten to use Rule::apply() (eqRewrite): in meta-apply() case use result of apply in final reduce! (pullDownSubstitution): added (pullDownAssignment): added (pushUp2): now take Term* rather than DagNode* (eqRewrite): meta-rewrite2 partly implemented (pullDownSubstitution): remember to move to next assignment within loop Thu Mar 27 16:23:48 1997 Steven Eker * metaRewriteSymbol.cc (MetaRewriteSymbol): added params for symbols needed to implement meta-apply2 (eqRewrite): use arity rather than applyFlag to determine which operator we are * metaRewriteSymbol.hh (class MetaRewriteSymbol): added data members for symbols needed to implement meta-apply2 Fri Jan 3 15:28:16 1997 Steven Eker * metaRewriteSymbol.cc (eqRewrite): fixed bug where we were failing to evaluate 3rd arg of meta-apply Tue Dec 24 18:33:42 1996 Steven Eker * sortTestSymbol.cc (eqRewrite): call to computeSort() replaced by computeTrueSort() * metaRewriteSymbol.cc (eqRewrite): name change from rewrite() * metaRewriteSymbol.hh (class MetaRewriteSymbol): rewrite() -> eqRewrite() * sortTestSymbol.cc (computeBaseSort): adapted from computeSort(); now we assume that subterms are correctly sorted * sortTestSymbol.hh (class SortTestSymbol): computeSort() -> computeBaseSort(); rewrite() -> eqRewrite() * equalitySymbol.cc (computeBaseSort): adapted from computeSort(); now we assume that subterms are correctly sorted; how should sorting work on ERROR_SORT? * equalitySymbol.hh (class EqualitySymbol): computeSort() -> computeBaseSort(); rewrite() -> eqRewrite() * branchSymbol.cc (computeBaseSort): adapted from computeSort(); now we assume that subterms are correctly sorted * branchSymbol.hh (class BranchSymbol): computeSort() -> computeBaseSort(); rewrite() -> eqRewrite() Mon Nov 25 19:08:24 1996 Steven Eker * sortTestSymbol.cc (SortTestSymbol): added constructor arg * metaRewriteSymbol.cc (MetaRewriteSymbol): added constructor arg * equalitySymbol.cc (EqualitySymbol): added constructor arg * branchSymbol.cc (BranchSymbol): added constructor arg Sun Aug 25 11:24:07 1996 Steven Eker * metaRewriteSymbol.cc (rewrite): added code to re-reduce result after a sucessful rewrite Thu Aug 15 11:35:27 1996 Steven Eker * metaRewriteSymbol.cc (pullDown): fixed infinite loop bug (MetaRewriteSymbol): apply flag added (rewrite): extended to handle apply case * builtIn.hh: added fwd decl of MetaRewriteSymbol * metaRewriteSymbol.cc: created * metaRewriteSymbol.hh (class MetaRewriteSymbol): created Fri Aug 2 16:02:34 1996 Steven Eker * sortTestSymbol.cc (SortTestSymbol): new strategy passing code * branchSymbol.cc (BranchSymbol): new strategy passing code * sortTestSymbol.hh (makeLazyStrategy): added * equalitySymbol.cc (EqualitySymbol): new strategy passing code * equalitySymbol.hh (makeLazyStrategy): added * sortTestSymbol.cc (compileSortConstraints): added (compileEquations): added (compileOpDeclarations): added * equalitySymbol.cc (compileSortConstraints): added (compileEquations): added (compileOpDeclarations): added * branchSymbol.cc (compileSortConstraints): added (compileEquations): added (compileOpDeclarations): added Thu Feb 8 11:11:19 1996 Steven Eker * branchSymbol.cc (computeSort): use dagNode::computeSort() * sortTestSymbol.cc (computeSort): use new dagNode::computeSort() (rewrite): now call dagNode::computeSort() on subterm in the lazy case * equalitySymbol.cc (computeSort): use new dagNode::computeSort() on arguments. * sortTestSymbol.hh: added lazyStrategy, eager parameter * equalitySymbol.cc: added lazyStrategy, eager parameter and code to store and handle it * equalitySymbol.hh: added lazyStrategy, eager parameter * sortTestSymbol.cc: added lazyStrategy, eager parameter and code to store and handle it Wed Feb 7 14:38:50 1996 Steven Eker * builtIn.hh: created * sortTestSymbol.cc: created * sortTestSymbol.hh: created Fri Feb 2 15:36:04 1996 Steven Eker * branchSymbol.hh: changed parse() parameters * branchSymbol.cc (parse): rewritten * equalitySymbol.cc (parse): rewritten * equalitySymbol.hh: changed parse() parameters Thu Feb 1 15:08:27 1996 Steven Eker * branchSymbol.cc (parse): added * branchSymbol.hh: parse() added * equalitySymbol.cc (parse): added * equalitySymbol.hh: parse() added Thu Jan 11 18:11:32 1996 Steven Eker * equalitySymbol.cc (computeSort): DagNode::SORT_UNKNOWN -> Sort::SORT_UNKNOWN * branchSymbol.cc (computeSort): DagNode::SORT_UNKNOWN -> Sort::SORT_UNKNOWN Wed Jan 10 17:21:28 1996 Steven Eker * branchSymbol.cc (BranchSymbol): don't pass sharable argument * equalitySymbol.cc (EqualitySymbol): don't pass sharable argument Thu Dec 14 12:17:30 1995 Steven Eker * equalitySymbol.cc (EqualitySymbol): store resultSort (rangeComponent): added (computeSort): implemented * equalitySymbol.hh (EqualitySymbol) added resultSort argument plus storage. Also rangeComponent() added. * branchSymbol.cc (computeSort): now use rangeComponent() (rangeComponent): added * branchSymbol.hh (BranchSymbol): we now take and store the sort of the test expression added rangeComponent() * branchSymbol.cc (computeSort): implemented Tue Dec 12 14:49:28 1995 Steven Eker * equalitySymbol.cc (computeSort): added * branchSymbol.cc (computeSort): added Fri Dec 8 15:07:58 1995 Steven Eker * branchSymbol.cc: created * branchSymbol.hh: created * equalitySymbol.hh: created * equalitySymbol.cc: created Maude-Maude3.2/src/BuiltIn/Makefile.am000077500000000000000000000026621420036611000175600ustar00rootroot00000000000000noinst_LIBRARIES = libbuiltIn.a libbuiltIn_a_CPPFLAGS = \ -I$(top_srcdir)/src/Utility \ -I$(top_srcdir)/src/Interface \ -I$(top_srcdir)/src/Core \ -I$(top_srcdir)/src/Variable \ -I$(top_srcdir)/src/FullCompiler \ -I$(top_srcdir)/src/NA_Theory \ -I$(top_srcdir)/src/ACU_Persistent \ -I$(top_srcdir)/src/ACU_Theory \ -I$(top_srcdir)/src/CUI_Theory \ -I$(top_srcdir)/src/S_Theory \ -I$(top_srcdir)/src/FreeTheory \ -I$(top_srcdir)/src/3rdParty libbuiltIn_a_SOURCES = \ equalitySymbol.cc \ sortTestSymbol.cc \ branchSymbol.cc \ stringSymbol.cc \ stringTerm.cc \ stringDagNode.cc \ stringOpSymbol.cc \ floatSymbol.cc \ floatTerm.cc \ floatDagNode.cc \ floatOpSymbol.cc \ succSymbol.cc \ numberOpSymbol.cc \ minusSymbol.cc \ ACU_NumberOpSymbol.cc \ CUI_NumberOpSymbol.cc \ divisionSymbol.cc \ randomOpSymbol.cc \ counterSymbol.cc \ matrixOpSymbol.cc \ equalityExtor.cc \ equalityExtorFinal.cc EXTRA_DIST = \ matrixOpSignature.cc noinst_HEADERS = \ ACU_NumberOpSymbol.hh \ CUI_NumberOpSymbol.hh \ bindingMacros.hh \ branchSymbol.hh \ builtIn.hh \ divisionSymbol.hh \ equalitySymbol.hh \ floatDagNode.hh \ floatOpSymbol.hh \ floatSymbol.hh \ floatTerm.hh \ minusSymbol.hh \ numberOpSymbol.hh \ sortTestSymbol.hh \ stringDagNode.hh \ stringOpSymbol.hh \ stringSymbol.hh \ stringTerm.hh \ succSymbol.hh \ randomOpSymbol.hh \ counterSymbol.hh \ matrixOpSymbol.hh \ equalityExtor.hh \ equalityExtorFinal.hh Maude-Maude3.2/src/BuiltIn/Makefile.in000066400000000000000000002125461420036611000175720ustar00rootroot00000000000000# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/BuiltIn ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_have_poll.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) AR = ar ARFLAGS = cru AM_V_AR = $(am__v_AR_@AM_V@) am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) am__v_AR_0 = @echo " AR " $@; am__v_AR_1 = libbuiltIn_a_AR = $(AR) $(ARFLAGS) libbuiltIn_a_LIBADD = am_libbuiltIn_a_OBJECTS = libbuiltIn_a-equalitySymbol.$(OBJEXT) \ libbuiltIn_a-sortTestSymbol.$(OBJEXT) \ libbuiltIn_a-branchSymbol.$(OBJEXT) \ libbuiltIn_a-stringSymbol.$(OBJEXT) \ libbuiltIn_a-stringTerm.$(OBJEXT) \ libbuiltIn_a-stringDagNode.$(OBJEXT) \ libbuiltIn_a-stringOpSymbol.$(OBJEXT) \ libbuiltIn_a-floatSymbol.$(OBJEXT) \ libbuiltIn_a-floatTerm.$(OBJEXT) \ libbuiltIn_a-floatDagNode.$(OBJEXT) \ libbuiltIn_a-floatOpSymbol.$(OBJEXT) \ libbuiltIn_a-succSymbol.$(OBJEXT) \ libbuiltIn_a-numberOpSymbol.$(OBJEXT) \ libbuiltIn_a-minusSymbol.$(OBJEXT) \ libbuiltIn_a-ACU_NumberOpSymbol.$(OBJEXT) \ libbuiltIn_a-CUI_NumberOpSymbol.$(OBJEXT) \ libbuiltIn_a-divisionSymbol.$(OBJEXT) \ libbuiltIn_a-randomOpSymbol.$(OBJEXT) \ libbuiltIn_a-counterSymbol.$(OBJEXT) \ libbuiltIn_a-matrixOpSymbol.$(OBJEXT) \ libbuiltIn_a-equalityExtor.$(OBJEXT) \ libbuiltIn_a-equalityExtorFinal.$(OBJEXT) libbuiltIn_a_OBJECTS = $(am_libbuiltIn_a_OBJECTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/libbuiltIn_a-ACU_NumberOpSymbol.Po \ ./$(DEPDIR)/libbuiltIn_a-CUI_NumberOpSymbol.Po \ ./$(DEPDIR)/libbuiltIn_a-branchSymbol.Po \ ./$(DEPDIR)/libbuiltIn_a-counterSymbol.Po \ ./$(DEPDIR)/libbuiltIn_a-divisionSymbol.Po \ ./$(DEPDIR)/libbuiltIn_a-equalityExtor.Po \ ./$(DEPDIR)/libbuiltIn_a-equalityExtorFinal.Po \ ./$(DEPDIR)/libbuiltIn_a-equalitySymbol.Po \ ./$(DEPDIR)/libbuiltIn_a-floatDagNode.Po \ ./$(DEPDIR)/libbuiltIn_a-floatOpSymbol.Po \ ./$(DEPDIR)/libbuiltIn_a-floatSymbol.Po \ ./$(DEPDIR)/libbuiltIn_a-floatTerm.Po \ ./$(DEPDIR)/libbuiltIn_a-matrixOpSymbol.Po \ ./$(DEPDIR)/libbuiltIn_a-minusSymbol.Po \ ./$(DEPDIR)/libbuiltIn_a-numberOpSymbol.Po \ ./$(DEPDIR)/libbuiltIn_a-randomOpSymbol.Po \ ./$(DEPDIR)/libbuiltIn_a-sortTestSymbol.Po \ ./$(DEPDIR)/libbuiltIn_a-stringDagNode.Po \ ./$(DEPDIR)/libbuiltIn_a-stringOpSymbol.Po \ ./$(DEPDIR)/libbuiltIn_a-stringSymbol.Po \ ./$(DEPDIR)/libbuiltIn_a-stringTerm.Po \ ./$(DEPDIR)/libbuiltIn_a-succSymbol.Po am__mv = mv -f AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(libbuiltIn_a_SOURCES) DIST_SOURCES = $(libbuiltIn_a_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ $(top_srcdir)/mkinstalldirs ChangeLog DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ BUDDY_LIB = @BUDDY_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FLEX = @FLEX@ GCC_LIBS = @GCC_LIBS@ GMP_LIBS = @GMP_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSIGSEGV_LIB = @LIBSIGSEGV_LIB@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TECLA_LIBS = @TECLA_LIBS@ VERSION = @VERSION@ YICES2_LIB = @YICES2_LIB@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LIBRARIES = libbuiltIn.a libbuiltIn_a_CPPFLAGS = \ -I$(top_srcdir)/src/Utility \ -I$(top_srcdir)/src/Interface \ -I$(top_srcdir)/src/Core \ -I$(top_srcdir)/src/Variable \ -I$(top_srcdir)/src/FullCompiler \ -I$(top_srcdir)/src/NA_Theory \ -I$(top_srcdir)/src/ACU_Persistent \ -I$(top_srcdir)/src/ACU_Theory \ -I$(top_srcdir)/src/CUI_Theory \ -I$(top_srcdir)/src/S_Theory \ -I$(top_srcdir)/src/FreeTheory \ -I$(top_srcdir)/src/3rdParty libbuiltIn_a_SOURCES = \ equalitySymbol.cc \ sortTestSymbol.cc \ branchSymbol.cc \ stringSymbol.cc \ stringTerm.cc \ stringDagNode.cc \ stringOpSymbol.cc \ floatSymbol.cc \ floatTerm.cc \ floatDagNode.cc \ floatOpSymbol.cc \ succSymbol.cc \ numberOpSymbol.cc \ minusSymbol.cc \ ACU_NumberOpSymbol.cc \ CUI_NumberOpSymbol.cc \ divisionSymbol.cc \ randomOpSymbol.cc \ counterSymbol.cc \ matrixOpSymbol.cc \ equalityExtor.cc \ equalityExtorFinal.cc EXTRA_DIST = \ matrixOpSignature.cc noinst_HEADERS = \ ACU_NumberOpSymbol.hh \ CUI_NumberOpSymbol.hh \ bindingMacros.hh \ branchSymbol.hh \ builtIn.hh \ divisionSymbol.hh \ equalitySymbol.hh \ floatDagNode.hh \ floatOpSymbol.hh \ floatSymbol.hh \ floatTerm.hh \ minusSymbol.hh \ numberOpSymbol.hh \ sortTestSymbol.hh \ stringDagNode.hh \ stringOpSymbol.hh \ stringSymbol.hh \ stringTerm.hh \ succSymbol.hh \ randomOpSymbol.hh \ counterSymbol.hh \ matrixOpSymbol.hh \ equalityExtor.hh \ equalityExtorFinal.hh all: all-am .SUFFIXES: .SUFFIXES: .cc .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/BuiltIn/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/BuiltIn/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libbuiltIn.a: $(libbuiltIn_a_OBJECTS) $(libbuiltIn_a_DEPENDENCIES) $(EXTRA_libbuiltIn_a_DEPENDENCIES) $(AM_V_at)-rm -f libbuiltIn.a $(AM_V_AR)$(libbuiltIn_a_AR) libbuiltIn.a $(libbuiltIn_a_OBJECTS) $(libbuiltIn_a_LIBADD) $(AM_V_at)$(RANLIB) libbuiltIn.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbuiltIn_a-ACU_NumberOpSymbol.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbuiltIn_a-CUI_NumberOpSymbol.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbuiltIn_a-branchSymbol.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbuiltIn_a-counterSymbol.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbuiltIn_a-divisionSymbol.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbuiltIn_a-equalityExtor.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbuiltIn_a-equalityExtorFinal.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbuiltIn_a-equalitySymbol.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbuiltIn_a-floatDagNode.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbuiltIn_a-floatOpSymbol.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbuiltIn_a-floatSymbol.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbuiltIn_a-floatTerm.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbuiltIn_a-matrixOpSymbol.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbuiltIn_a-minusSymbol.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbuiltIn_a-numberOpSymbol.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbuiltIn_a-randomOpSymbol.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbuiltIn_a-sortTestSymbol.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbuiltIn_a-stringDagNode.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbuiltIn_a-stringOpSymbol.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbuiltIn_a-stringSymbol.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbuiltIn_a-stringTerm.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbuiltIn_a-succSymbol.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` libbuiltIn_a-equalitySymbol.o: equalitySymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-equalitySymbol.o -MD -MP -MF $(DEPDIR)/libbuiltIn_a-equalitySymbol.Tpo -c -o libbuiltIn_a-equalitySymbol.o `test -f 'equalitySymbol.cc' || echo '$(srcdir)/'`equalitySymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-equalitySymbol.Tpo $(DEPDIR)/libbuiltIn_a-equalitySymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='equalitySymbol.cc' object='libbuiltIn_a-equalitySymbol.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-equalitySymbol.o `test -f 'equalitySymbol.cc' || echo '$(srcdir)/'`equalitySymbol.cc libbuiltIn_a-equalitySymbol.obj: equalitySymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-equalitySymbol.obj -MD -MP -MF $(DEPDIR)/libbuiltIn_a-equalitySymbol.Tpo -c -o libbuiltIn_a-equalitySymbol.obj `if test -f 'equalitySymbol.cc'; then $(CYGPATH_W) 'equalitySymbol.cc'; else $(CYGPATH_W) '$(srcdir)/equalitySymbol.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-equalitySymbol.Tpo $(DEPDIR)/libbuiltIn_a-equalitySymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='equalitySymbol.cc' object='libbuiltIn_a-equalitySymbol.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-equalitySymbol.obj `if test -f 'equalitySymbol.cc'; then $(CYGPATH_W) 'equalitySymbol.cc'; else $(CYGPATH_W) '$(srcdir)/equalitySymbol.cc'; fi` libbuiltIn_a-sortTestSymbol.o: sortTestSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-sortTestSymbol.o -MD -MP -MF $(DEPDIR)/libbuiltIn_a-sortTestSymbol.Tpo -c -o libbuiltIn_a-sortTestSymbol.o `test -f 'sortTestSymbol.cc' || echo '$(srcdir)/'`sortTestSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-sortTestSymbol.Tpo $(DEPDIR)/libbuiltIn_a-sortTestSymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='sortTestSymbol.cc' object='libbuiltIn_a-sortTestSymbol.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-sortTestSymbol.o `test -f 'sortTestSymbol.cc' || echo '$(srcdir)/'`sortTestSymbol.cc libbuiltIn_a-sortTestSymbol.obj: sortTestSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-sortTestSymbol.obj -MD -MP -MF $(DEPDIR)/libbuiltIn_a-sortTestSymbol.Tpo -c -o libbuiltIn_a-sortTestSymbol.obj `if test -f 'sortTestSymbol.cc'; then $(CYGPATH_W) 'sortTestSymbol.cc'; else $(CYGPATH_W) '$(srcdir)/sortTestSymbol.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-sortTestSymbol.Tpo $(DEPDIR)/libbuiltIn_a-sortTestSymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='sortTestSymbol.cc' object='libbuiltIn_a-sortTestSymbol.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-sortTestSymbol.obj `if test -f 'sortTestSymbol.cc'; then $(CYGPATH_W) 'sortTestSymbol.cc'; else $(CYGPATH_W) '$(srcdir)/sortTestSymbol.cc'; fi` libbuiltIn_a-branchSymbol.o: branchSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-branchSymbol.o -MD -MP -MF $(DEPDIR)/libbuiltIn_a-branchSymbol.Tpo -c -o libbuiltIn_a-branchSymbol.o `test -f 'branchSymbol.cc' || echo '$(srcdir)/'`branchSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-branchSymbol.Tpo $(DEPDIR)/libbuiltIn_a-branchSymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='branchSymbol.cc' object='libbuiltIn_a-branchSymbol.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-branchSymbol.o `test -f 'branchSymbol.cc' || echo '$(srcdir)/'`branchSymbol.cc libbuiltIn_a-branchSymbol.obj: branchSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-branchSymbol.obj -MD -MP -MF $(DEPDIR)/libbuiltIn_a-branchSymbol.Tpo -c -o libbuiltIn_a-branchSymbol.obj `if test -f 'branchSymbol.cc'; then $(CYGPATH_W) 'branchSymbol.cc'; else $(CYGPATH_W) '$(srcdir)/branchSymbol.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-branchSymbol.Tpo $(DEPDIR)/libbuiltIn_a-branchSymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='branchSymbol.cc' object='libbuiltIn_a-branchSymbol.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-branchSymbol.obj `if test -f 'branchSymbol.cc'; then $(CYGPATH_W) 'branchSymbol.cc'; else $(CYGPATH_W) '$(srcdir)/branchSymbol.cc'; fi` libbuiltIn_a-stringSymbol.o: stringSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-stringSymbol.o -MD -MP -MF $(DEPDIR)/libbuiltIn_a-stringSymbol.Tpo -c -o libbuiltIn_a-stringSymbol.o `test -f 'stringSymbol.cc' || echo '$(srcdir)/'`stringSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-stringSymbol.Tpo $(DEPDIR)/libbuiltIn_a-stringSymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='stringSymbol.cc' object='libbuiltIn_a-stringSymbol.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-stringSymbol.o `test -f 'stringSymbol.cc' || echo '$(srcdir)/'`stringSymbol.cc libbuiltIn_a-stringSymbol.obj: stringSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-stringSymbol.obj -MD -MP -MF $(DEPDIR)/libbuiltIn_a-stringSymbol.Tpo -c -o libbuiltIn_a-stringSymbol.obj `if test -f 'stringSymbol.cc'; then $(CYGPATH_W) 'stringSymbol.cc'; else $(CYGPATH_W) '$(srcdir)/stringSymbol.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-stringSymbol.Tpo $(DEPDIR)/libbuiltIn_a-stringSymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='stringSymbol.cc' object='libbuiltIn_a-stringSymbol.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-stringSymbol.obj `if test -f 'stringSymbol.cc'; then $(CYGPATH_W) 'stringSymbol.cc'; else $(CYGPATH_W) '$(srcdir)/stringSymbol.cc'; fi` libbuiltIn_a-stringTerm.o: stringTerm.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-stringTerm.o -MD -MP -MF $(DEPDIR)/libbuiltIn_a-stringTerm.Tpo -c -o libbuiltIn_a-stringTerm.o `test -f 'stringTerm.cc' || echo '$(srcdir)/'`stringTerm.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-stringTerm.Tpo $(DEPDIR)/libbuiltIn_a-stringTerm.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='stringTerm.cc' object='libbuiltIn_a-stringTerm.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-stringTerm.o `test -f 'stringTerm.cc' || echo '$(srcdir)/'`stringTerm.cc libbuiltIn_a-stringTerm.obj: stringTerm.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-stringTerm.obj -MD -MP -MF $(DEPDIR)/libbuiltIn_a-stringTerm.Tpo -c -o libbuiltIn_a-stringTerm.obj `if test -f 'stringTerm.cc'; then $(CYGPATH_W) 'stringTerm.cc'; else $(CYGPATH_W) '$(srcdir)/stringTerm.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-stringTerm.Tpo $(DEPDIR)/libbuiltIn_a-stringTerm.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='stringTerm.cc' object='libbuiltIn_a-stringTerm.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-stringTerm.obj `if test -f 'stringTerm.cc'; then $(CYGPATH_W) 'stringTerm.cc'; else $(CYGPATH_W) '$(srcdir)/stringTerm.cc'; fi` libbuiltIn_a-stringDagNode.o: stringDagNode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-stringDagNode.o -MD -MP -MF $(DEPDIR)/libbuiltIn_a-stringDagNode.Tpo -c -o libbuiltIn_a-stringDagNode.o `test -f 'stringDagNode.cc' || echo '$(srcdir)/'`stringDagNode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-stringDagNode.Tpo $(DEPDIR)/libbuiltIn_a-stringDagNode.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='stringDagNode.cc' object='libbuiltIn_a-stringDagNode.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-stringDagNode.o `test -f 'stringDagNode.cc' || echo '$(srcdir)/'`stringDagNode.cc libbuiltIn_a-stringDagNode.obj: stringDagNode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-stringDagNode.obj -MD -MP -MF $(DEPDIR)/libbuiltIn_a-stringDagNode.Tpo -c -o libbuiltIn_a-stringDagNode.obj `if test -f 'stringDagNode.cc'; then $(CYGPATH_W) 'stringDagNode.cc'; else $(CYGPATH_W) '$(srcdir)/stringDagNode.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-stringDagNode.Tpo $(DEPDIR)/libbuiltIn_a-stringDagNode.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='stringDagNode.cc' object='libbuiltIn_a-stringDagNode.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-stringDagNode.obj `if test -f 'stringDagNode.cc'; then $(CYGPATH_W) 'stringDagNode.cc'; else $(CYGPATH_W) '$(srcdir)/stringDagNode.cc'; fi` libbuiltIn_a-stringOpSymbol.o: stringOpSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-stringOpSymbol.o -MD -MP -MF $(DEPDIR)/libbuiltIn_a-stringOpSymbol.Tpo -c -o libbuiltIn_a-stringOpSymbol.o `test -f 'stringOpSymbol.cc' || echo '$(srcdir)/'`stringOpSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-stringOpSymbol.Tpo $(DEPDIR)/libbuiltIn_a-stringOpSymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='stringOpSymbol.cc' object='libbuiltIn_a-stringOpSymbol.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-stringOpSymbol.o `test -f 'stringOpSymbol.cc' || echo '$(srcdir)/'`stringOpSymbol.cc libbuiltIn_a-stringOpSymbol.obj: stringOpSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-stringOpSymbol.obj -MD -MP -MF $(DEPDIR)/libbuiltIn_a-stringOpSymbol.Tpo -c -o libbuiltIn_a-stringOpSymbol.obj `if test -f 'stringOpSymbol.cc'; then $(CYGPATH_W) 'stringOpSymbol.cc'; else $(CYGPATH_W) '$(srcdir)/stringOpSymbol.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-stringOpSymbol.Tpo $(DEPDIR)/libbuiltIn_a-stringOpSymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='stringOpSymbol.cc' object='libbuiltIn_a-stringOpSymbol.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-stringOpSymbol.obj `if test -f 'stringOpSymbol.cc'; then $(CYGPATH_W) 'stringOpSymbol.cc'; else $(CYGPATH_W) '$(srcdir)/stringOpSymbol.cc'; fi` libbuiltIn_a-floatSymbol.o: floatSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-floatSymbol.o -MD -MP -MF $(DEPDIR)/libbuiltIn_a-floatSymbol.Tpo -c -o libbuiltIn_a-floatSymbol.o `test -f 'floatSymbol.cc' || echo '$(srcdir)/'`floatSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-floatSymbol.Tpo $(DEPDIR)/libbuiltIn_a-floatSymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='floatSymbol.cc' object='libbuiltIn_a-floatSymbol.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-floatSymbol.o `test -f 'floatSymbol.cc' || echo '$(srcdir)/'`floatSymbol.cc libbuiltIn_a-floatSymbol.obj: floatSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-floatSymbol.obj -MD -MP -MF $(DEPDIR)/libbuiltIn_a-floatSymbol.Tpo -c -o libbuiltIn_a-floatSymbol.obj `if test -f 'floatSymbol.cc'; then $(CYGPATH_W) 'floatSymbol.cc'; else $(CYGPATH_W) '$(srcdir)/floatSymbol.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-floatSymbol.Tpo $(DEPDIR)/libbuiltIn_a-floatSymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='floatSymbol.cc' object='libbuiltIn_a-floatSymbol.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-floatSymbol.obj `if test -f 'floatSymbol.cc'; then $(CYGPATH_W) 'floatSymbol.cc'; else $(CYGPATH_W) '$(srcdir)/floatSymbol.cc'; fi` libbuiltIn_a-floatTerm.o: floatTerm.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-floatTerm.o -MD -MP -MF $(DEPDIR)/libbuiltIn_a-floatTerm.Tpo -c -o libbuiltIn_a-floatTerm.o `test -f 'floatTerm.cc' || echo '$(srcdir)/'`floatTerm.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-floatTerm.Tpo $(DEPDIR)/libbuiltIn_a-floatTerm.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='floatTerm.cc' object='libbuiltIn_a-floatTerm.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-floatTerm.o `test -f 'floatTerm.cc' || echo '$(srcdir)/'`floatTerm.cc libbuiltIn_a-floatTerm.obj: floatTerm.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-floatTerm.obj -MD -MP -MF $(DEPDIR)/libbuiltIn_a-floatTerm.Tpo -c -o libbuiltIn_a-floatTerm.obj `if test -f 'floatTerm.cc'; then $(CYGPATH_W) 'floatTerm.cc'; else $(CYGPATH_W) '$(srcdir)/floatTerm.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-floatTerm.Tpo $(DEPDIR)/libbuiltIn_a-floatTerm.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='floatTerm.cc' object='libbuiltIn_a-floatTerm.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-floatTerm.obj `if test -f 'floatTerm.cc'; then $(CYGPATH_W) 'floatTerm.cc'; else $(CYGPATH_W) '$(srcdir)/floatTerm.cc'; fi` libbuiltIn_a-floatDagNode.o: floatDagNode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-floatDagNode.o -MD -MP -MF $(DEPDIR)/libbuiltIn_a-floatDagNode.Tpo -c -o libbuiltIn_a-floatDagNode.o `test -f 'floatDagNode.cc' || echo '$(srcdir)/'`floatDagNode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-floatDagNode.Tpo $(DEPDIR)/libbuiltIn_a-floatDagNode.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='floatDagNode.cc' object='libbuiltIn_a-floatDagNode.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-floatDagNode.o `test -f 'floatDagNode.cc' || echo '$(srcdir)/'`floatDagNode.cc libbuiltIn_a-floatDagNode.obj: floatDagNode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-floatDagNode.obj -MD -MP -MF $(DEPDIR)/libbuiltIn_a-floatDagNode.Tpo -c -o libbuiltIn_a-floatDagNode.obj `if test -f 'floatDagNode.cc'; then $(CYGPATH_W) 'floatDagNode.cc'; else $(CYGPATH_W) '$(srcdir)/floatDagNode.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-floatDagNode.Tpo $(DEPDIR)/libbuiltIn_a-floatDagNode.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='floatDagNode.cc' object='libbuiltIn_a-floatDagNode.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-floatDagNode.obj `if test -f 'floatDagNode.cc'; then $(CYGPATH_W) 'floatDagNode.cc'; else $(CYGPATH_W) '$(srcdir)/floatDagNode.cc'; fi` libbuiltIn_a-floatOpSymbol.o: floatOpSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-floatOpSymbol.o -MD -MP -MF $(DEPDIR)/libbuiltIn_a-floatOpSymbol.Tpo -c -o libbuiltIn_a-floatOpSymbol.o `test -f 'floatOpSymbol.cc' || echo '$(srcdir)/'`floatOpSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-floatOpSymbol.Tpo $(DEPDIR)/libbuiltIn_a-floatOpSymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='floatOpSymbol.cc' object='libbuiltIn_a-floatOpSymbol.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-floatOpSymbol.o `test -f 'floatOpSymbol.cc' || echo '$(srcdir)/'`floatOpSymbol.cc libbuiltIn_a-floatOpSymbol.obj: floatOpSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-floatOpSymbol.obj -MD -MP -MF $(DEPDIR)/libbuiltIn_a-floatOpSymbol.Tpo -c -o libbuiltIn_a-floatOpSymbol.obj `if test -f 'floatOpSymbol.cc'; then $(CYGPATH_W) 'floatOpSymbol.cc'; else $(CYGPATH_W) '$(srcdir)/floatOpSymbol.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-floatOpSymbol.Tpo $(DEPDIR)/libbuiltIn_a-floatOpSymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='floatOpSymbol.cc' object='libbuiltIn_a-floatOpSymbol.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-floatOpSymbol.obj `if test -f 'floatOpSymbol.cc'; then $(CYGPATH_W) 'floatOpSymbol.cc'; else $(CYGPATH_W) '$(srcdir)/floatOpSymbol.cc'; fi` libbuiltIn_a-succSymbol.o: succSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-succSymbol.o -MD -MP -MF $(DEPDIR)/libbuiltIn_a-succSymbol.Tpo -c -o libbuiltIn_a-succSymbol.o `test -f 'succSymbol.cc' || echo '$(srcdir)/'`succSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-succSymbol.Tpo $(DEPDIR)/libbuiltIn_a-succSymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='succSymbol.cc' object='libbuiltIn_a-succSymbol.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-succSymbol.o `test -f 'succSymbol.cc' || echo '$(srcdir)/'`succSymbol.cc libbuiltIn_a-succSymbol.obj: succSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-succSymbol.obj -MD -MP -MF $(DEPDIR)/libbuiltIn_a-succSymbol.Tpo -c -o libbuiltIn_a-succSymbol.obj `if test -f 'succSymbol.cc'; then $(CYGPATH_W) 'succSymbol.cc'; else $(CYGPATH_W) '$(srcdir)/succSymbol.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-succSymbol.Tpo $(DEPDIR)/libbuiltIn_a-succSymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='succSymbol.cc' object='libbuiltIn_a-succSymbol.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-succSymbol.obj `if test -f 'succSymbol.cc'; then $(CYGPATH_W) 'succSymbol.cc'; else $(CYGPATH_W) '$(srcdir)/succSymbol.cc'; fi` libbuiltIn_a-numberOpSymbol.o: numberOpSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-numberOpSymbol.o -MD -MP -MF $(DEPDIR)/libbuiltIn_a-numberOpSymbol.Tpo -c -o libbuiltIn_a-numberOpSymbol.o `test -f 'numberOpSymbol.cc' || echo '$(srcdir)/'`numberOpSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-numberOpSymbol.Tpo $(DEPDIR)/libbuiltIn_a-numberOpSymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='numberOpSymbol.cc' object='libbuiltIn_a-numberOpSymbol.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-numberOpSymbol.o `test -f 'numberOpSymbol.cc' || echo '$(srcdir)/'`numberOpSymbol.cc libbuiltIn_a-numberOpSymbol.obj: numberOpSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-numberOpSymbol.obj -MD -MP -MF $(DEPDIR)/libbuiltIn_a-numberOpSymbol.Tpo -c -o libbuiltIn_a-numberOpSymbol.obj `if test -f 'numberOpSymbol.cc'; then $(CYGPATH_W) 'numberOpSymbol.cc'; else $(CYGPATH_W) '$(srcdir)/numberOpSymbol.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-numberOpSymbol.Tpo $(DEPDIR)/libbuiltIn_a-numberOpSymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='numberOpSymbol.cc' object='libbuiltIn_a-numberOpSymbol.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-numberOpSymbol.obj `if test -f 'numberOpSymbol.cc'; then $(CYGPATH_W) 'numberOpSymbol.cc'; else $(CYGPATH_W) '$(srcdir)/numberOpSymbol.cc'; fi` libbuiltIn_a-minusSymbol.o: minusSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-minusSymbol.o -MD -MP -MF $(DEPDIR)/libbuiltIn_a-minusSymbol.Tpo -c -o libbuiltIn_a-minusSymbol.o `test -f 'minusSymbol.cc' || echo '$(srcdir)/'`minusSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-minusSymbol.Tpo $(DEPDIR)/libbuiltIn_a-minusSymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='minusSymbol.cc' object='libbuiltIn_a-minusSymbol.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-minusSymbol.o `test -f 'minusSymbol.cc' || echo '$(srcdir)/'`minusSymbol.cc libbuiltIn_a-minusSymbol.obj: minusSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-minusSymbol.obj -MD -MP -MF $(DEPDIR)/libbuiltIn_a-minusSymbol.Tpo -c -o libbuiltIn_a-minusSymbol.obj `if test -f 'minusSymbol.cc'; then $(CYGPATH_W) 'minusSymbol.cc'; else $(CYGPATH_W) '$(srcdir)/minusSymbol.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-minusSymbol.Tpo $(DEPDIR)/libbuiltIn_a-minusSymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='minusSymbol.cc' object='libbuiltIn_a-minusSymbol.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-minusSymbol.obj `if test -f 'minusSymbol.cc'; then $(CYGPATH_W) 'minusSymbol.cc'; else $(CYGPATH_W) '$(srcdir)/minusSymbol.cc'; fi` libbuiltIn_a-ACU_NumberOpSymbol.o: ACU_NumberOpSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-ACU_NumberOpSymbol.o -MD -MP -MF $(DEPDIR)/libbuiltIn_a-ACU_NumberOpSymbol.Tpo -c -o libbuiltIn_a-ACU_NumberOpSymbol.o `test -f 'ACU_NumberOpSymbol.cc' || echo '$(srcdir)/'`ACU_NumberOpSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-ACU_NumberOpSymbol.Tpo $(DEPDIR)/libbuiltIn_a-ACU_NumberOpSymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_NumberOpSymbol.cc' object='libbuiltIn_a-ACU_NumberOpSymbol.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-ACU_NumberOpSymbol.o `test -f 'ACU_NumberOpSymbol.cc' || echo '$(srcdir)/'`ACU_NumberOpSymbol.cc libbuiltIn_a-ACU_NumberOpSymbol.obj: ACU_NumberOpSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-ACU_NumberOpSymbol.obj -MD -MP -MF $(DEPDIR)/libbuiltIn_a-ACU_NumberOpSymbol.Tpo -c -o libbuiltIn_a-ACU_NumberOpSymbol.obj `if test -f 'ACU_NumberOpSymbol.cc'; then $(CYGPATH_W) 'ACU_NumberOpSymbol.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_NumberOpSymbol.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-ACU_NumberOpSymbol.Tpo $(DEPDIR)/libbuiltIn_a-ACU_NumberOpSymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ACU_NumberOpSymbol.cc' object='libbuiltIn_a-ACU_NumberOpSymbol.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-ACU_NumberOpSymbol.obj `if test -f 'ACU_NumberOpSymbol.cc'; then $(CYGPATH_W) 'ACU_NumberOpSymbol.cc'; else $(CYGPATH_W) '$(srcdir)/ACU_NumberOpSymbol.cc'; fi` libbuiltIn_a-CUI_NumberOpSymbol.o: CUI_NumberOpSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-CUI_NumberOpSymbol.o -MD -MP -MF $(DEPDIR)/libbuiltIn_a-CUI_NumberOpSymbol.Tpo -c -o libbuiltIn_a-CUI_NumberOpSymbol.o `test -f 'CUI_NumberOpSymbol.cc' || echo '$(srcdir)/'`CUI_NumberOpSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-CUI_NumberOpSymbol.Tpo $(DEPDIR)/libbuiltIn_a-CUI_NumberOpSymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='CUI_NumberOpSymbol.cc' object='libbuiltIn_a-CUI_NumberOpSymbol.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-CUI_NumberOpSymbol.o `test -f 'CUI_NumberOpSymbol.cc' || echo '$(srcdir)/'`CUI_NumberOpSymbol.cc libbuiltIn_a-CUI_NumberOpSymbol.obj: CUI_NumberOpSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-CUI_NumberOpSymbol.obj -MD -MP -MF $(DEPDIR)/libbuiltIn_a-CUI_NumberOpSymbol.Tpo -c -o libbuiltIn_a-CUI_NumberOpSymbol.obj `if test -f 'CUI_NumberOpSymbol.cc'; then $(CYGPATH_W) 'CUI_NumberOpSymbol.cc'; else $(CYGPATH_W) '$(srcdir)/CUI_NumberOpSymbol.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-CUI_NumberOpSymbol.Tpo $(DEPDIR)/libbuiltIn_a-CUI_NumberOpSymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='CUI_NumberOpSymbol.cc' object='libbuiltIn_a-CUI_NumberOpSymbol.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-CUI_NumberOpSymbol.obj `if test -f 'CUI_NumberOpSymbol.cc'; then $(CYGPATH_W) 'CUI_NumberOpSymbol.cc'; else $(CYGPATH_W) '$(srcdir)/CUI_NumberOpSymbol.cc'; fi` libbuiltIn_a-divisionSymbol.o: divisionSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-divisionSymbol.o -MD -MP -MF $(DEPDIR)/libbuiltIn_a-divisionSymbol.Tpo -c -o libbuiltIn_a-divisionSymbol.o `test -f 'divisionSymbol.cc' || echo '$(srcdir)/'`divisionSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-divisionSymbol.Tpo $(DEPDIR)/libbuiltIn_a-divisionSymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='divisionSymbol.cc' object='libbuiltIn_a-divisionSymbol.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-divisionSymbol.o `test -f 'divisionSymbol.cc' || echo '$(srcdir)/'`divisionSymbol.cc libbuiltIn_a-divisionSymbol.obj: divisionSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-divisionSymbol.obj -MD -MP -MF $(DEPDIR)/libbuiltIn_a-divisionSymbol.Tpo -c -o libbuiltIn_a-divisionSymbol.obj `if test -f 'divisionSymbol.cc'; then $(CYGPATH_W) 'divisionSymbol.cc'; else $(CYGPATH_W) '$(srcdir)/divisionSymbol.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-divisionSymbol.Tpo $(DEPDIR)/libbuiltIn_a-divisionSymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='divisionSymbol.cc' object='libbuiltIn_a-divisionSymbol.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-divisionSymbol.obj `if test -f 'divisionSymbol.cc'; then $(CYGPATH_W) 'divisionSymbol.cc'; else $(CYGPATH_W) '$(srcdir)/divisionSymbol.cc'; fi` libbuiltIn_a-randomOpSymbol.o: randomOpSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-randomOpSymbol.o -MD -MP -MF $(DEPDIR)/libbuiltIn_a-randomOpSymbol.Tpo -c -o libbuiltIn_a-randomOpSymbol.o `test -f 'randomOpSymbol.cc' || echo '$(srcdir)/'`randomOpSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-randomOpSymbol.Tpo $(DEPDIR)/libbuiltIn_a-randomOpSymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='randomOpSymbol.cc' object='libbuiltIn_a-randomOpSymbol.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-randomOpSymbol.o `test -f 'randomOpSymbol.cc' || echo '$(srcdir)/'`randomOpSymbol.cc libbuiltIn_a-randomOpSymbol.obj: randomOpSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-randomOpSymbol.obj -MD -MP -MF $(DEPDIR)/libbuiltIn_a-randomOpSymbol.Tpo -c -o libbuiltIn_a-randomOpSymbol.obj `if test -f 'randomOpSymbol.cc'; then $(CYGPATH_W) 'randomOpSymbol.cc'; else $(CYGPATH_W) '$(srcdir)/randomOpSymbol.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-randomOpSymbol.Tpo $(DEPDIR)/libbuiltIn_a-randomOpSymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='randomOpSymbol.cc' object='libbuiltIn_a-randomOpSymbol.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-randomOpSymbol.obj `if test -f 'randomOpSymbol.cc'; then $(CYGPATH_W) 'randomOpSymbol.cc'; else $(CYGPATH_W) '$(srcdir)/randomOpSymbol.cc'; fi` libbuiltIn_a-counterSymbol.o: counterSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-counterSymbol.o -MD -MP -MF $(DEPDIR)/libbuiltIn_a-counterSymbol.Tpo -c -o libbuiltIn_a-counterSymbol.o `test -f 'counterSymbol.cc' || echo '$(srcdir)/'`counterSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-counterSymbol.Tpo $(DEPDIR)/libbuiltIn_a-counterSymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='counterSymbol.cc' object='libbuiltIn_a-counterSymbol.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-counterSymbol.o `test -f 'counterSymbol.cc' || echo '$(srcdir)/'`counterSymbol.cc libbuiltIn_a-counterSymbol.obj: counterSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-counterSymbol.obj -MD -MP -MF $(DEPDIR)/libbuiltIn_a-counterSymbol.Tpo -c -o libbuiltIn_a-counterSymbol.obj `if test -f 'counterSymbol.cc'; then $(CYGPATH_W) 'counterSymbol.cc'; else $(CYGPATH_W) '$(srcdir)/counterSymbol.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-counterSymbol.Tpo $(DEPDIR)/libbuiltIn_a-counterSymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='counterSymbol.cc' object='libbuiltIn_a-counterSymbol.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-counterSymbol.obj `if test -f 'counterSymbol.cc'; then $(CYGPATH_W) 'counterSymbol.cc'; else $(CYGPATH_W) '$(srcdir)/counterSymbol.cc'; fi` libbuiltIn_a-matrixOpSymbol.o: matrixOpSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-matrixOpSymbol.o -MD -MP -MF $(DEPDIR)/libbuiltIn_a-matrixOpSymbol.Tpo -c -o libbuiltIn_a-matrixOpSymbol.o `test -f 'matrixOpSymbol.cc' || echo '$(srcdir)/'`matrixOpSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-matrixOpSymbol.Tpo $(DEPDIR)/libbuiltIn_a-matrixOpSymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='matrixOpSymbol.cc' object='libbuiltIn_a-matrixOpSymbol.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-matrixOpSymbol.o `test -f 'matrixOpSymbol.cc' || echo '$(srcdir)/'`matrixOpSymbol.cc libbuiltIn_a-matrixOpSymbol.obj: matrixOpSymbol.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-matrixOpSymbol.obj -MD -MP -MF $(DEPDIR)/libbuiltIn_a-matrixOpSymbol.Tpo -c -o libbuiltIn_a-matrixOpSymbol.obj `if test -f 'matrixOpSymbol.cc'; then $(CYGPATH_W) 'matrixOpSymbol.cc'; else $(CYGPATH_W) '$(srcdir)/matrixOpSymbol.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-matrixOpSymbol.Tpo $(DEPDIR)/libbuiltIn_a-matrixOpSymbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='matrixOpSymbol.cc' object='libbuiltIn_a-matrixOpSymbol.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-matrixOpSymbol.obj `if test -f 'matrixOpSymbol.cc'; then $(CYGPATH_W) 'matrixOpSymbol.cc'; else $(CYGPATH_W) '$(srcdir)/matrixOpSymbol.cc'; fi` libbuiltIn_a-equalityExtor.o: equalityExtor.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-equalityExtor.o -MD -MP -MF $(DEPDIR)/libbuiltIn_a-equalityExtor.Tpo -c -o libbuiltIn_a-equalityExtor.o `test -f 'equalityExtor.cc' || echo '$(srcdir)/'`equalityExtor.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-equalityExtor.Tpo $(DEPDIR)/libbuiltIn_a-equalityExtor.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='equalityExtor.cc' object='libbuiltIn_a-equalityExtor.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-equalityExtor.o `test -f 'equalityExtor.cc' || echo '$(srcdir)/'`equalityExtor.cc libbuiltIn_a-equalityExtor.obj: equalityExtor.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-equalityExtor.obj -MD -MP -MF $(DEPDIR)/libbuiltIn_a-equalityExtor.Tpo -c -o libbuiltIn_a-equalityExtor.obj `if test -f 'equalityExtor.cc'; then $(CYGPATH_W) 'equalityExtor.cc'; else $(CYGPATH_W) '$(srcdir)/equalityExtor.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-equalityExtor.Tpo $(DEPDIR)/libbuiltIn_a-equalityExtor.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='equalityExtor.cc' object='libbuiltIn_a-equalityExtor.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-equalityExtor.obj `if test -f 'equalityExtor.cc'; then $(CYGPATH_W) 'equalityExtor.cc'; else $(CYGPATH_W) '$(srcdir)/equalityExtor.cc'; fi` libbuiltIn_a-equalityExtorFinal.o: equalityExtorFinal.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-equalityExtorFinal.o -MD -MP -MF $(DEPDIR)/libbuiltIn_a-equalityExtorFinal.Tpo -c -o libbuiltIn_a-equalityExtorFinal.o `test -f 'equalityExtorFinal.cc' || echo '$(srcdir)/'`equalityExtorFinal.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-equalityExtorFinal.Tpo $(DEPDIR)/libbuiltIn_a-equalityExtorFinal.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='equalityExtorFinal.cc' object='libbuiltIn_a-equalityExtorFinal.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-equalityExtorFinal.o `test -f 'equalityExtorFinal.cc' || echo '$(srcdir)/'`equalityExtorFinal.cc libbuiltIn_a-equalityExtorFinal.obj: equalityExtorFinal.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libbuiltIn_a-equalityExtorFinal.obj -MD -MP -MF $(DEPDIR)/libbuiltIn_a-equalityExtorFinal.Tpo -c -o libbuiltIn_a-equalityExtorFinal.obj `if test -f 'equalityExtorFinal.cc'; then $(CYGPATH_W) 'equalityExtorFinal.cc'; else $(CYGPATH_W) '$(srcdir)/equalityExtorFinal.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libbuiltIn_a-equalityExtorFinal.Tpo $(DEPDIR)/libbuiltIn_a-equalityExtorFinal.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='equalityExtorFinal.cc' object='libbuiltIn_a-equalityExtorFinal.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libbuiltIn_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libbuiltIn_a-equalityExtorFinal.obj `if test -f 'equalityExtorFinal.cc'; then $(CYGPATH_W) 'equalityExtorFinal.cc'; else $(CYGPATH_W) '$(srcdir)/equalityExtorFinal.cc'; fi` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/libbuiltIn_a-ACU_NumberOpSymbol.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-CUI_NumberOpSymbol.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-branchSymbol.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-counterSymbol.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-divisionSymbol.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-equalityExtor.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-equalityExtorFinal.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-equalitySymbol.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-floatDagNode.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-floatOpSymbol.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-floatSymbol.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-floatTerm.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-matrixOpSymbol.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-minusSymbol.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-numberOpSymbol.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-randomOpSymbol.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-sortTestSymbol.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-stringDagNode.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-stringOpSymbol.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-stringSymbol.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-stringTerm.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-succSymbol.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/libbuiltIn_a-ACU_NumberOpSymbol.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-CUI_NumberOpSymbol.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-branchSymbol.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-counterSymbol.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-divisionSymbol.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-equalityExtor.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-equalityExtorFinal.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-equalitySymbol.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-floatDagNode.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-floatOpSymbol.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-floatSymbol.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-floatTerm.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-matrixOpSymbol.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-minusSymbol.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-numberOpSymbol.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-randomOpSymbol.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-sortTestSymbol.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-stringDagNode.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-stringOpSymbol.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-stringSymbol.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-stringTerm.Po -rm -f ./$(DEPDIR)/libbuiltIn_a-succSymbol.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-noinstLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: Maude-Maude3.2/src/BuiltIn/bindingMacros.hh000077500000000000000000000100451420036611000206160ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Macros for binding stuff in builtins. // #ifndef _bindingMacros_hh_ #define _bindingMacros_hh_ // // This needs to be a macro in order to produce constant expressions. // #define CODE(c1, c2) ((c1) + ((c2) << 8)) #define CODE3(c1, c2, c3) ((c1) + ((c2) << 8) + ((c3) << 16)) #define BIND_OP(purpose, className, op, data) \ if (strcmp(purpose, #className) == 0) \ { \ if (data.length() == 1) \ { \ const char* opName = (data)[0]; \ if (opName[0] != '\0') \ { \ int t = CODE(opName[0], opName[1]); \ if (op == NONE) \ { \ op = t; \ return true; \ } \ if (op == t) \ return true; \ } \ } \ return false; \ } #define BIND_OP3(purpose, className, op, data) \ if (strcmp(purpose, #className) == 0) \ { \ if (data.length() == 1) \ { \ const char* opName = (data)[0]; \ if (opName[0] != '\0') \ { \ int t = (opName[1] == '\0') ? CODE(opName[0], opName[1]) : CODE3(opName[0], opName[1], opName[2]); \ if (op == NONE) \ { \ op = t; \ return true; \ } \ if (op == t) \ return true; \ } \ } \ return false; \ } #define NULL_DATA(purpose, className, data) \ if (strcmp(purpose, #className) == 0) \ { \ return data.length() == 0; \ } #define BIND_SYMBOL(purpose, symbol, name, type) \ if (strcmp(purpose, #name) == 0) \ { \ if (name != 0) \ return name == symbol; \ name = dynamic_cast(symbol); \ return name != 0; \ } #define BIND_SYMBOL2(purpose, symbol, name, type, nrArgs) \ if (strcmp(purpose, #name) == 0) \ { \ if (name != 0) \ return name == symbol; \ if (symbol->arity() != nrArgs) \ return false; \ name = dynamic_cast(symbol); \ return name != 0; \ } #define BIND_TERM(purpose, term, name) \ if (strcmp(purpose, #name) == 0) \ { \ bool r = true; \ if (Term* t = name.getTerm()) \ { \ r = term->equal(t); \ term->deepSelfDestruct(); \ } \ else \ name.setTerm(term); \ return r; \ } #define PREPARE_TERM(name) \ if (name.getTerm() != 0) \ { \ (void) name.normalize(); \ name.prepare(); \ } #define COPY_SYMBOL(original, name, mapping, type) \ if (name == 0) \ { \ if (type s = original->name) \ name = (mapping == 0) ? s : safeCast(type, mapping->translate(s)); \ } #define COPY_TERM(original, name, mapping) \ if (name.getTerm() == 0) \ { \ if (Term* t = original->name.getTerm()) \ name.setTerm(t->deepCopy(mapping)); \ } #define APPEND_DATA(purposes, data, name) \ { \ int n = purposes.length(); \ purposes.resize(n + 1); \ purposes[n] = #name; \ data.resize(n + 1); \ } #define APPEND_SYMBOL(purposes, symbols, name) \ if (name != 0) \ { \ purposes.append(#name); \ symbols.append(name); \ } #define APPEND_TERM(purposes, terms, name) \ if (Term* t = name.getTerm()) \ { \ purposes.append(#name); \ terms.append(t); \ } #define CODE_CASE(d, c1, c2, s) \ case CODE(c1, c2): \ { \ d = s; \ break; \ } #define CODE_CASE3(d, c1, c2, c3, s) \ case CODE3(c1, c2, c3): \ { \ d = s; \ break; \ } #endif Maude-Maude3.2/src/BuiltIn/branchSymbol.cc000066400000000000000000000142271420036611000204530ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class BranchSymbol. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "freeTheory.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" #include "term.hh" // core class definitions #include "argumentIterator.hh" #include "rewritingContext.hh" // free theory class definitions #include "freeDagNode.hh" // built in class definitions #include "bindingMacros.hh" #include "branchSymbol.hh" BranchSymbol::BranchSymbol(int id, int nrArgs) : FreeSymbol(id, nrArgs) { } BranchSymbol::~BranchSymbol() { int nrTestTerms = testTerms.length(); for (int i = 0; i < nrTestTerms; i++) testTerms[i]->deepSelfDestruct(); } bool BranchSymbol::attachData(const Vector& opDeclaration, const char* purpose, const Vector& data) { NULL_DATA(purpose, BranchSymbol, data); return FreeSymbol::attachData(opDeclaration, purpose, data); } bool BranchSymbol::attachTerm(const char* purpose, Term* term) { int index = atoi(purpose); if (index > 0) { int len = testTerms.length(); if (len < index) { testTerms.resize(index); for (; len < index; len++) testTerms[len] = 0; } if (testTerms[index - 1] == 0) { testTerms[index - 1] = term; return true; } else { DebugAdvisory("BranchSymbol::attachTerm(): " << index << " slot already contains " << testTerms[index - 1]); } } return FreeSymbol::attachTerm(purpose, term); } void BranchSymbol::copyAttachments(Symbol* original, SymbolMap* map) { BranchSymbol* orig = safeCast(BranchSymbol*, original); int nrTerms = orig->testTerms.length(); int len = testTerms.length(); if (len < nrTerms) { testTerms.resize(nrTerms); for (; len < nrTerms; len++) testTerms[len] = 0; } for (int i = 0; i < nrTerms; i++) { if (testTerms[i] == 0) { if (Term* t = orig->testTerms[i]) testTerms[i] = t->deepCopy(map); } } FreeSymbol::copyAttachments(original, map); } void BranchSymbol::getDataAttachments(const Vector& opDeclaration, Vector& purposes, Vector >& data) { APPEND_DATA(purposes, data, BranchSymbol); FreeSymbol::getDataAttachments(opDeclaration, purposes, data); } void BranchSymbol::getTermAttachments(Vector& purposes, Vector& terms) { static Vector numbers; int nrTerms = testTerms.length(); int nrNumbers = numbers.length(); if (nrNumbers < nrTerms) { numbers.resize(nrTerms); for (; nrNumbers < nrTerms; nrNumbers++) numbers[nrNumbers] = int64ToString(nrNumbers + 1); } for (int i = 0; i < nrTerms; i++) { if (Term* t = testTerms[i]) { purposes.append(numbers[i].c_str()); terms.append(t); } } FreeSymbol::getTermAttachments(purposes, terms); } bool BranchSymbol::eqRewrite(DagNode* subject, RewritingContext& context) { Assert(this == subject->symbol(), "bad symbol"); FreeDagNode* f = static_cast(subject); DagNode *e = f->getArgument(0); e->reduce(context); int nrTerms = testTerms.length(); for (int i = 0; i < nrTerms; i++) { if(testTerms[i]->equal(e)) return context.builtInReplace(subject, f->getArgument(i + 1)); } // // First argument failed to match any of our test terms. We now need to reduce // all other arguments. // for (int i = 1; i <= nrTerms; i++) f->getArgument(i)->reduce(context); return FreeSymbol::eqRewrite(subject, context); } void BranchSymbol::compileOpDeclarations() { // // Add fake declarations to encode our sort structure. // const Vector& baseDecl = getOpDeclarations()[0].getDomainAndRange(); int declSize = baseDecl.size(); Vector domainAndRange(declSize); domainAndRange[0] = baseDecl[0]; ConnectedComponent* kind = baseDecl[1]->component(); int nrSorts = kind->nrSorts(); for (int i = 1; i < nrSorts; ++i) { Sort* sort = kind->sort(i); // // Add a declaration // firstSort sort sort ... sort -> sort // for (int j = 1; j < declSize; ++j) domainAndRange[j] = sort; addOpDeclaration(domainAndRange, false); // should never be a ctor } FreeSymbol::compileOpDeclarations(); } bool BranchSymbol::rangeSortNeverLeqThan(Sort* /* sort */) { return false; } bool BranchSymbol::rangeSortAlwaysLeqThan(Sort* /* sort */) { return false; } bool BranchSymbol::domainSortAlwaysLeqThan(Sort* /* sort */, int /* argNr */) { return false; } void BranchSymbol::stackArguments(DagNode* subject, Vector& stack, int parentIndex, bool respectFrozen, bool eagerContext) { // // We need to define this because we have a builtin strategy. We stack // the first argument as eager and the rest as lazy. // const NatSet& frozen = getFrozen(); FreeDagNode* f = safeCast(FreeDagNode*, subject); DagNode* d = f->getArgument(0); if (!(respectFrozen && frozen.contains(0)) && !(d->isUnstackable())) stack.append(RedexPosition(d, parentIndex, 0, eagerContext)); int nrTerms = testTerms.length(); for (int i = 1; i <= nrTerms; i++) { d = f->getArgument(i); if (!(respectFrozen && frozen.contains(i)) && !(d->isUnstackable())) stack.append(RedexPosition(d, parentIndex, i, false)); } } Maude-Maude3.2/src/BuiltIn/branchSymbol.hh000066400000000000000000000042471420036611000204660ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for symbols for built in branch (if-then-else-fi type) operations. // #ifndef _branchSymbol_hh_ #define _branchSymbol_hh_ #include "freeSymbol.hh" class BranchSymbol : public FreeSymbol { public: BranchSymbol(int id, int nrArgs); ~BranchSymbol(); bool attachData(const Vector& opDeclaration, const char* purpose, const Vector& data); bool attachTerm(const char* purpose, Term* term); void copyAttachments(Symbol* original, SymbolMap* map); void getDataAttachments(const Vector& opDeclaration, Vector& purposes, Vector >& data); void getTermAttachments(Vector& purposes, Vector& terms); // // Built in equational rewriting semantics and strategy. // bool eqRewrite(DagNode* subject, RewritingContext& context); void stackArguments(DagNode* subject, Vector& stack, int parentIndex, bool respectFrozen, bool eagerContext); // // We need to insert some fake declarations to encode our sort // structure and we disable sort based optimizations. // void compileOpDeclarations(); bool rangeSortNeverLeqThan(Sort* sort); bool rangeSortAlwaysLeqThan(Sort* sort); bool domainSortAlwaysLeqThan(Sort* sort, int argNr); private: Vector testTerms; }; #endif Maude-Maude3.2/src/BuiltIn/builtIn.hh000077500000000000000000000025561420036611000174550ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Forward declarations for builtin symbol classes. // #ifndef _builtin_hh_ #define _builtin_hh_ class BranchSymbol; class EqualitySymbol; class SortTestSymbol; class SuccSymbol; class NumberOpSymbol; class MinusSymbol; class ACU_NumberOpSymbol; class DivisionSymbol; class FloatSymbol; class FloatTerm; class FloatDagNode; class FloatOpSymbol; class StringSymbol; class StringTerm; class StringDagNode; class StringOpSymbol; class RandomOpSymbol; class CounterSymbol; class EqualityExtor; class EqualityExtorFinal; #endif Maude-Maude3.2/src/BuiltIn/counterSymbol.cc000066400000000000000000000062251420036611000206740ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 2004 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class NumberOpSymbol. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "freeTheory.hh" #include "builtIn.hh" // interface class definitions #include "term.hh" // core class definitions #include "rewritingContext.hh" // free theory class definitions #include "freeDagNode.hh" // built in stuff #include "succSymbol.hh" #include "counterSymbol.hh" CounterSymbol::CounterSymbol(int id) : NumberOpSymbol(id, 0) { currentValue = 0; } bool CounterSymbol::attachData(const Vector& opDeclaration, const char* purpose, const Vector& data) { if (strcmp(purpose, "CounterSymbol") == 0) return true; return NumberOpSymbol::attachData(opDeclaration, purpose, data); } void CounterSymbol::getDataAttachments(const Vector& opDeclaration, Vector& purposes, Vector >& data) { int nrDataAttachments = purposes.length(); purposes.resize(nrDataAttachments + 1); purposes[nrDataAttachments] = "CounterSymbol"; data.resize(nrDataAttachments + 1); NumberOpSymbol::getDataAttachments(opDeclaration, purposes, data); } void CounterSymbol::resetRules() { currentValue = 0; NumberOpSymbol::resetRules(); } /* void CounterSymbol::saveHiddenState() { currentValueStack.push(currentValue); NumberOpSymbol::saveHiddenState(); } void CounterSymbol::restoreHiddenState() { currentValue = currentValueStack.top(); currentValueStack.pop(); NumberOpSymbol::restoreHiddenState(); } */ bool CounterSymbol::eqRewrite(DagNode* subject, RewritingContext& context) { // // NumberOpSymbol doesn't know how to deal with this. // return FreeSymbol::eqRewrite(subject, context); } DagNode* CounterSymbol::ruleRewrite(DagNode* subject, RewritingContext& context) { if (SuccSymbol* succSymbol = getSuccSymbol()) { if (RewritingContext::getTraceStatus()) { context.tracePreRuleRewrite(subject, 0); if (context.traceAbort()) return 0; } DagNode* r = succSymbol->makeNatDag(currentValue); ++currentValue; if (RewritingContext::getTraceStatus()) context.tracePostRuleRewrite(r); context.incrementRlCount(); return r; } return NumberOpSymbol::ruleRewrite(subject, context); } Maude-Maude3.2/src/BuiltIn/counterSymbol.hh000066400000000000000000000033261420036611000207050ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 2004 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for symbols for built in operations on numbers. // #ifndef _counterSymbol_hh_ #define _counterSymbol_hh_ #include #include #include "numberOpSymbol.hh" class CounterSymbol : public NumberOpSymbol { public: CounterSymbol(int id); bool attachData(const Vector& opDeclaration, const char* purpose, const Vector& data); void getDataAttachments(const Vector& opDeclaration, Vector& purposes, Vector >& data); void resetRules(); //void saveHiddenState(); //void restoreHiddenState(); bool eqRewrite(DagNode* subject, RewritingContext& context); DagNode* ruleRewrite(DagNode* subject, RewritingContext& context); private: //typedef stack > MpzStack; // optimize for the empty case mpz_class currentValue; // MpzStack currentValueStack; }; #endif Maude-Maude3.2/src/BuiltIn/divisionSymbol.cc000077500000000000000000000155251420036611000210470ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class DivisionSymbol. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "freeTheory.hh" #include "builtIn.hh" // interface class definitions #include "term.hh" #include "argumentIterator.hh" // core class definitions #include "rewritingContext.hh" #include "symbolMap.hh" // free theory class definitions #include "freeNet.hh" #include "freeDagNode.hh" // built in stuff #include "bindingMacros.hh" #include "succSymbol.hh" #include "minusSymbol.hh" #include "divisionSymbol.hh" DivisionSymbol::DivisionSymbol(int id) : FreeSymbol(id, 2) { succSymbol = 0; minusSymbol = 0; } bool DivisionSymbol::attachData(const Vector& opDeclaration, const char* purpose, const Vector& data) { NULL_DATA(purpose, DivisionSymbol, data) return FreeSymbol::attachData(opDeclaration, purpose, data); } bool DivisionSymbol::attachSymbol(const char* purpose, Symbol* symbol) { BIND_SYMBOL(purpose, symbol, succSymbol, SuccSymbol*); BIND_SYMBOL(purpose, symbol, minusSymbol, MinusSymbol*); return FreeSymbol::attachSymbol(purpose, symbol); } void DivisionSymbol::copyAttachments(Symbol* original, SymbolMap* map) { DivisionSymbol* orig = safeCast(DivisionSymbol*, original); COPY_SYMBOL(orig, succSymbol, map, SuccSymbol*); COPY_SYMBOL(orig, minusSymbol, map, MinusSymbol*); FreeSymbol::copyAttachments(original, map); } void DivisionSymbol::getDataAttachments(const Vector& opDeclaration, Vector& purposes, Vector >& data) { APPEND_DATA(purposes, data, DivisionSymbol); FreeSymbol::getDataAttachments(opDeclaration, purposes, data); } void DivisionSymbol::getSymbolAttachments(Vector& purposes, Vector& symbols) { APPEND_SYMBOL(purposes, symbols, succSymbol); APPEND_SYMBOL(purposes, symbols, minusSymbol); FreeSymbol::getSymbolAttachments(purposes, symbols); } bool DivisionSymbol::eqRewrite(DagNode* subject, RewritingContext& context) { Assert(this == subject->symbol(), "bad symbol"); FreeDagNode* d = safeCast(FreeDagNode*, subject); DagNode* d0 = d->getArgument(0); d0->reduce(context); DagNode* d1 = d->getArgument(1); d1->reduce(context); if (isRat(subject)) { const mpz_class& denominator = succSymbol->getNat(d1); if (denominator == 1) return context.builtInReplace(subject, d0); mpz_class storage0; const mpz_class& numerator = (d0->symbol() == minusSymbol) ? minusSymbol->getNeg(d0, storage0) : succSymbol->getNat(d0); Assert(numerator != 0, "zero numerator"); mpz_class common; mpz_gcd(common.get_mpz_t(), numerator.get_mpz_t(), denominator.get_mpz_t()); if (common > 1) { if (denominator == common) { mpz_class nr = numerator / common; return (nr >= 0) ? succSymbol->rewriteToNat(subject, context, nr) : context.builtInReplace(subject, minusSymbol->makeNegDag(nr)); } (void) context.builtInReplace(subject, makeRatDag(numerator / common, denominator / common)); Assert(this == subject->symbol(), "unexpectedly changed top symbol"); // // we don't want to revisit this node since it is already simplified // - so fall into regular case. // } } return FreeSymbol::eqRewrite(subject, context); } DagNode* DivisionSymbol::makeRatDag(const mpz_class& nr, const mpz_class& dr) { Assert(dr > 0, "not a strict rat"); DagNode* d = (nr >= 0) ? succSymbol->makeNatDag(nr) : minusSymbol->makeNegDag(nr); if (dr == 1 || nr == 0) return d; Vector args(2); args[0] = d; args[1] = succSymbol->makeNatDag(dr); return makeDagNode(args); } bool DivisionSymbol::isRat(const DagNode* dagNode) const { Assert(this == static_cast(dagNode->symbol()), "bad symbol"); const FreeDagNode* d = safeCast(const FreeDagNode*, dagNode); DagNode* d0 = d->getArgument(0); DagNode* d1 = d->getArgument(1); return d1->symbol() == succSymbol && succSymbol->isNat(d1) && ((d0->symbol() == minusSymbol) ? minusSymbol->isNeg(d0) : (d0->symbol() == succSymbol && succSymbol->isNat(d0))); } const mpz_class& DivisionSymbol::getRat(const DagNode* dagNode, mpz_class& numerator) const { Assert(this == static_cast(dagNode->symbol()), "bad symbol"); const FreeDagNode* d = safeCast(const FreeDagNode*, dagNode); DagNode* d0 = d->getArgument(0); if (d0->symbol() == minusSymbol) (void) minusSymbol->getNeg(d0, numerator); else { Assert(d0->symbol() == succSymbol, "bad numerator"); numerator = succSymbol->getNat(d0); } DagNode* d1 = d->getArgument(1); Assert(d1->symbol() == succSymbol, "bad denominator"); return succSymbol->getNat(d1); } Term* DivisionSymbol::makeRatTerm(const mpz_class& nr, const mpz_class& dr) { Assert(dr > 0, "not a strict rat"); Vector args(2); args[0] = (nr >= 0) ? succSymbol->makeNatTerm(nr) : minusSymbol->makeIntTerm(nr); args[1] = succSymbol->makeNatTerm(dr); return makeTerm(args); } bool DivisionSymbol::isRat(/* const */ Term* term) const { Assert(this == static_cast(term->symbol()), "bad symbol"); ArgumentIterator i(*term); Term* t0 = i.argument(); i.next(); Term* t1 = i.argument(); return t1->symbol() == succSymbol && succSymbol->isNat(t1) && ((t0->symbol() == minusSymbol) ? minusSymbol->isNeg(t0) : (t0->symbol() == succSymbol && succSymbol->isNat(t0))); } const mpz_class& DivisionSymbol::getRat(/* const */ Term* term, mpz_class& numerator) const { Assert(this == static_cast(term->symbol()), "bad symbol"); ArgumentIterator i(*term); Term* t0 = i.argument(); if (t0->symbol() == minusSymbol) (void) minusSymbol->getNeg(t0, numerator); else { Assert(t0->symbol() == succSymbol, "bad numerator"); numerator = succSymbol->getNat(t0); } i.next(); Term* t1 = i.argument(); Assert(t1->symbol() == succSymbol, "bad denominator"); return succSymbol->getNat(t1); } Maude-Maude3.2/src/BuiltIn/divisionSymbol.hh000066400000000000000000000041231420036611000210460ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for symbols for exact division operation on numbers. // #ifndef _divisionSymbol_hh_ #define _divisionSymbol_hh_ #include "freeSymbol.hh" #include "cachedDag.hh" class DivisionSymbol : public FreeSymbol { public: DivisionSymbol(int id); bool attachData(const Vector& opDeclaration, const char* purpose, const Vector& data); bool attachSymbol(const char* purpose, Symbol* symbol); void copyAttachments(Symbol* original, SymbolMap* map); void getDataAttachments(const Vector& opDeclaration, Vector& purposes, Vector >& data); void getSymbolAttachments(Vector& purposes, Vector& symbols); bool eqRewrite(DagNode* subject, RewritingContext& context); // // Functions special to DivisionSymbol. // DagNode* makeRatDag(const mpz_class& nr, const mpz_class& dr); bool isRat(const DagNode* dagNode) const; const mpz_class& getRat(const DagNode* dagNode, mpz_class& numerator) const; Term* makeRatTerm(const mpz_class& nr, const mpz_class& dr); bool isRat(/* const */ Term* term) const; const mpz_class& getRat(/* const */ Term* term, mpz_class& numerator) const; SuccSymbol* succSymbol; MinusSymbol* minusSymbol; }; #endif Maude-Maude3.2/src/BuiltIn/equalityExtor.cc000077500000000000000000000056321420036611000207120ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 2013 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class EqualityExtor. // // utility stuff #include "macros.hh" #include "vector.hh" #include "indent.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "variable.hh" #include "freeTheory.hh" // core class definitions #include "frame.hh" #include "stackMachine.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" #include "term.hh" // free theory class definitions #include "equalitySymbol.hh" #include "equalityExtor.hh" EqualityExtor::EqualityExtor(EqualitySymbol* symbol, int argIndex0, int argIndex1, int destinationIndex, Instruction* nextInstruction) : NonFinalExtor(destinationIndex, nextInstruction), symbol(symbol), argIndex0(argIndex0), argIndex1(argIndex1) { // // Since EqualitySymbols are generated as needed and inserted as late symbols, we compile on demand. // It is safe to call stackMachineCompile() multiple times on the same EqualitySymbol. // symbol->stackMachineCompile(); } void EqualityExtor::execute(StackMachine* machine) const { // // Get the stack frame containing the pointer to us. // Frame* frame = machine->getTopFrame(); // // Check equality of arguments. // bool equal = frame->getSlot(argIndex0)->equal(frame->getSlot(argIndex1)); // // Get approriate instruction sequence. // Instruction* ni = equal ? symbol->getEqualInstructionSequence() : symbol->getNotEqualInstructionSequence(); // // Make a new stack frame without reloading old frame or recording new frame in machine. // Frame* nextFrame = fastPushFrame(frame); // // Move instruction pointer in old frame to next instruction. // frame->setNextInstruction(getNextInstruction()); // // Set return frame and addres for new frame. // nextFrame->setAncestorWithValidNextInstruction(frame); nextFrame->setReturnAddress(frame, getDestinationIndex()); // // Record new frame, and increment rewrite count. // machine->setTopFrame(nextFrame); machine->incrementEqCount(); ni->execute(machine); // tail call (should we worry about collecting garbage?) } Maude-Maude3.2/src/BuiltIn/equalityExtor.hh000077500000000000000000000026171420036611000207240ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 2014 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Stack machine non-final extor for equality symbols. // #ifndef _equalityExtor_hh_ #define _equalityExtor_hh_ #include "nonFinalExtor.hh" class EqualityExtor : public NonFinalExtor { NO_COPYING(EqualityExtor); public: EqualityExtor(EqualitySymbol* symbol, int argIndex0, int argIndex1, int destinationIndex, Instruction* nextInstruction); void execute(StackMachine* machine) const; #ifdef DUMP //void dump(ostream& s, int indentLevel); #endif private: EqualitySymbol* const symbol; const SlotIndex argIndex0; const SlotIndex argIndex1; }; #endif Maude-Maude3.2/src/BuiltIn/equalityExtorFinal.cc000077500000000000000000000026461420036611000216660ustar00rootroot00000000000000// utility stuff #include "macros.hh" #include "vector.hh" #include "indent.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "variable.hh" #include "freeTheory.hh" // core class definitions #include "frame.hh" #include "stackMachine.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" #include "term.hh" // free theory class definitions #include "equalitySymbol.hh" #include "equalityExtorFinal.hh" EqualityExtorFinal::EqualityExtorFinal(EqualitySymbol* symbol, int argIndex0, int argIndex1) : symbol(symbol), argIndex0(argIndex0), argIndex1(argIndex1) { // // Since EqualitySymbols are generated as needed and inserted as late symbols, we compile on demand. // It is safe to call stackMachineCompile() multiple times on the same EqualitySymbol. // symbol->stackMachineCompile(); } void EqualityExtorFinal::execute(StackMachine* machine) const { // // Get the stack frame containing the pointer to us. // Frame* frame = machine->getTopFrame(); // // Check equality of arguments. // bool equal = frame->getSlot(argIndex0)->equal(frame->getSlot(argIndex1)); // // Run approriate instruction sequence. // Instruction* ni = equal ? symbol->getEqualInstructionSequence() : symbol->getNotEqualInstructionSequence(); machine->incrementEqCount(); ni->execute(machine); // tail call (should we worry about collecting garbage?) } Maude-Maude3.2/src/BuiltIn/equalityExtorFinal.hh000077500000000000000000000025721420036611000216760ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 2014 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Stack machine non-final extor for equality symbols. // #ifndef _equalityExtorFinal_hh_ #define _equalityExtorFinal_hh_ #include "finalInstruction.hh" class EqualityExtorFinal : public FinalInstruction { NO_COPYING(EqualityExtorFinal); public: EqualityExtorFinal(EqualitySymbol* symbol, int argIndex0, int argIndex1); void execute(StackMachine* machine) const; #ifdef DUMP //void dump(ostream& s, int indentLevel); #endif private: EqualitySymbol* const symbol; const SlotIndex argIndex0; const SlotIndex argIndex1; }; #endif Maude-Maude3.2/src/BuiltIn/equalitySymbol.cc000077500000000000000000000121631420036611000210530ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class EqualitySymbol. // // utility stuff #include "macros.hh" #include "vector.hh" #include "indent.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "freeTheory.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" #include "term.hh" // core class definitions #include "argumentIterator.hh" #include "rewritingContext.hh" // free theory class definitions #include "freeDagNode.hh" // built in class definitions #include "bindingMacros.hh" #include "equalitySymbol.hh" #include "equalityExtor.hh" #include "equalityExtorFinal.hh" // full compiler classes #include "compilationContext.hh" #include "variableName.hh" EqualitySymbol::EqualitySymbol(int id, const Vector& strategy) : FreeSymbol(id, 2, strategy) { } bool EqualitySymbol::attachData(const Vector& opDeclaration, const char* purpose, const Vector& data) { NULL_DATA(purpose, EqualitySymbol, data); return FreeSymbol::attachData(opDeclaration, purpose, data); } bool EqualitySymbol::attachTerm(const char* purpose, Term* term) { BIND_TERM(purpose, term, equalTerm); BIND_TERM(purpose, term, notEqualTerm); return FreeSymbol::attachTerm(purpose, term); } void EqualitySymbol::copyAttachments(Symbol* original, SymbolMap* map) { EqualitySymbol* orig = safeCast(EqualitySymbol*, original); COPY_TERM(orig, equalTerm, map); COPY_TERM(orig, notEqualTerm, map); FreeSymbol::copyAttachments(original, map); } void EqualitySymbol::getDataAttachments(const Vector& opDeclaration, Vector& purposes, Vector >& data) { APPEND_DATA(purposes, data, EqualitySymbol); FreeSymbol::getDataAttachments(opDeclaration, purposes, data); } void EqualitySymbol::getTermAttachments(Vector& purposes, Vector& terms) { APPEND_TERM(purposes, terms, equalTerm); APPEND_TERM(purposes, terms, notEqualTerm); FreeSymbol::getTermAttachments(purposes, terms); } void EqualitySymbol::postInterSymbolPass() { (void) equalTerm.normalize(); equalTerm.prepare(); (void) notEqualTerm.normalize(); notEqualTerm.prepare(); } void EqualitySymbol::reset() { equalTerm.reset(); // so equal dag can be garbage collected notEqualTerm.reset(); // so notEqualDag dag can be garbage collected FreeSymbol::reset(); // parents reset() tasks } bool EqualitySymbol::eqRewrite(DagNode* subject, RewritingContext& context) { Assert(this == subject->symbol(), "bad symbol"); FreeDagNode* f = static_cast(subject); DagNode* l = f->getArgument(0); DagNode* r = f->getArgument(1); if (standardStrategy()) { l->reduce(context); r->reduce(context); } else { const Vector& userStrategy = getStrategy(); for(int i = 0;; i++) { int a = userStrategy[i]; if (a == 0) break; f->getArgument(a - 1)->reduce(context); } l->computeTrueSort(context); // we don't need the sort but we do need to normalize r->computeTrueSort(context); } return context.builtInReplace(subject, l->equal(r) ? equalTerm.getDag() : notEqualTerm.getDag()); } bool EqualitySymbol::domainSortAlwaysLeqThan(Sort* /* sort */, int /* argNr */) { return false; } bool EqualitySymbol::acceptEquation(Equation* /* equation */) { return false; } void EqualitySymbol::compileEquations() { } Instruction* EqualitySymbol::generateFinalInstruction(const Vector& argumentSlots) { return new EqualityExtorFinal(this, argumentSlots[0], argumentSlots[1]); } Instruction* EqualitySymbol::generateInstruction(int destination, const Vector& argumentSlots, Instruction* nextInstruction) { return new EqualityExtor(this, argumentSlots[0], argumentSlots[1], destination, nextInstruction); } #ifdef COMPILER void EqualitySymbol::generateCode(CompilationContext& context) const { Vector varNames; // dummy context.body() << Indent(1) << "if (compare(a0, a1) == 0)\n"; context.body() << Indent(2) << "{\n"; equalTerm.getTerm()->generateRhs(context, 3, varNames, 0); context.body() << Indent(2) << "}\n"; context.body() << Indent(1) << "else\n"; context.body() << Indent(2) << "{\n"; notEqualTerm.getTerm()->generateRhs(context, 3, varNames, 0); context.body() << Indent(2) << "}\n"; } #endif Maude-Maude3.2/src/BuiltIn/equalitySymbol.hh000077500000000000000000000054631420036611000210720ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for symbols for built in equality operations. // #ifndef _equalitySymbol_hh_ #define _equalitySymbol_hh_ #include "freeSymbol.hh" #include "cachedDag.hh" #include "fullCompiler.hh" class EqualitySymbol : public FreeSymbol { public: EqualitySymbol(int id, const Vector& strategy); bool attachData(const Vector& opDeclaration, const char* purpose, const Vector& data); bool attachTerm(const char* purpose, Term* term); void copyAttachments(Symbol* original, SymbolMap* map); void getDataAttachments(const Vector& opDeclaration, Vector& purposes, Vector >& data); void getTermAttachments(Vector& purposes, Vector& terms); void postInterSymbolPass(); void reset(); bool eqRewrite(DagNode* subject, RewritingContext& context); // // We don't accept or compile any equations. // bool acceptEquation(Equation* equation); void compileEquations(); bool domainSortAlwaysLeqThan(Sort* sort, int argNr); // // MVM stuff. // Instruction* generateFinalInstruction(const Vector& argumentSlots); Instruction* generateInstruction(int destination, const Vector& argumentSlots, Instruction* nextInstruction); void stackMachineCompile(); Instruction* getEqualInstructionSequence() const; Instruction* getNotEqualInstructionSequence() const; #ifdef COMPILER void generateCode(CompilationContext& context) const; #endif private: CachedDag equalTerm; CachedDag notEqualTerm; }; inline void EqualitySymbol::stackMachineCompile() { if (equalTerm.getInstructionSequence() == 0) { equalTerm.generateInstructionSequence(); notEqualTerm.generateInstructionSequence(); } } inline Instruction* EqualitySymbol::getEqualInstructionSequence() const { return equalTerm.getInstructionSequence(); } inline Instruction* EqualitySymbol::getNotEqualInstructionSequence() const { return notEqualTerm.getInstructionSequence(); } #endif Maude-Maude3.2/src/BuiltIn/floatDagNode.cc000066400000000000000000000041231420036611000203510ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class FloatDagNode. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "NA_Theory.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" // built in class definitions #include "floatSymbol.hh" #include "floatDagNode.hh" FloatDagNode::FloatDagNode(FloatSymbol* symbol, double value) : NA_DagNode(symbol), value((value == 0.0) ? 0.0 : value) // don't allow IEEE-754 -0.0 { } size_t FloatDagNode::getHashValue() { return hash(symbol()->getHashValue(), bitPattern ^ (bitPattern >> 32)); } int FloatDagNode::compareArguments(const DagNode* other) const { double otherValue = static_cast(other)->value; return (value == otherValue) ? 0 : ((value > otherValue) ? 1 : -1); } void FloatDagNode::overwriteWithClone(DagNode* old) { FloatDagNode* d = new(old) FloatDagNode(safeCast(FloatSymbol*, symbol()), value); d->copySetRewritingFlags(this); d->setSortIndex(getSortIndex()); } DagNode* FloatDagNode::makeClone() { FloatDagNode* d = new FloatDagNode(safeCast(FloatSymbol*, symbol()), value); d->copySetRewritingFlags(this); d->setSortIndex(getSortIndex()); return d; } Maude-Maude3.2/src/BuiltIn/floatDagNode.hh000066400000000000000000000026641420036611000203730ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for dag nodes containing floating point numbers. // #ifndef _floatDagNode_hh_ #define _floatDagNode_hh_ #include "NA_DagNode.hh" class FloatDagNode : public NA_DagNode { public: FloatDagNode(FloatSymbol* symbol, double value); size_t getHashValue(); int compareArguments(const DagNode* other) const; void overwriteWithClone(DagNode* old); DagNode* makeClone(); double getValue() const; private: const union { double value; Int64 bitPattern; }; friend class FloatTerm; // for comparison }; inline double FloatDagNode::getValue() const { return value; } #endif Maude-Maude3.2/src/BuiltIn/floatOpSymbol.cc000066400000000000000000000271551420036611000206260ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class FloatOpSymbol. // // utility stuff #include "macros.hh" #include "vector.hh" #include "mathStuff.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "freeTheory.hh" #include "NA_Theory.hh" #include "builtIn.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" #include "term.hh" // core class definitions #include "rewritingContext.hh" #include "symbolMap.hh" // free theory class definitions #include "freeNet.hh" #include "freeDagNode.hh" // built in class definitions #include "succSymbol.hh" #include "minusSymbol.hh" #include "divisionSymbol.hh" #include "floatSymbol.hh" #include "floatDagNode.hh" #include "floatOpSymbol.hh" #include "bindingMacros.hh" #define isNaN(f) ::isnan(f) FloatOpSymbol::FloatOpSymbol(int id, int arity) : FreeSymbol(id, arity) { op = NONE; floatSymbol = 0; succSymbol = 0; minusSymbol = 0; divisionSymbol = 0; } bool FloatOpSymbol::attachData(const Vector& opDeclaration, const char* purpose, const Vector& data) { BIND_OP(purpose, FloatOpSymbol, op, data); return FreeSymbol::attachData(opDeclaration, purpose, data); } bool FloatOpSymbol::attachSymbol(const char* purpose, Symbol* symbol) { BIND_SYMBOL(purpose, symbol, floatSymbol, FloatSymbol*); BIND_SYMBOL(purpose, symbol, succSymbol, SuccSymbol*); BIND_SYMBOL(purpose, symbol, minusSymbol, MinusSymbol*); BIND_SYMBOL(purpose, symbol, divisionSymbol, DivisionSymbol*); return FreeSymbol::attachSymbol(purpose, symbol); } bool FloatOpSymbol::attachTerm(const char* purpose, Term* term) { BIND_TERM(purpose, term, trueTerm); BIND_TERM(purpose, term, falseTerm); return FreeSymbol::attachTerm(purpose, term); } void FloatOpSymbol::copyAttachments(Symbol* original, SymbolMap* map) { FloatOpSymbol* orig = safeCast(FloatOpSymbol*, original); op = orig->op; COPY_SYMBOL(orig, floatSymbol, map, FloatSymbol*); COPY_SYMBOL(orig, succSymbol, map, SuccSymbol*); COPY_SYMBOL(orig, minusSymbol, map, MinusSymbol*); COPY_SYMBOL(orig, divisionSymbol, map, DivisionSymbol*); COPY_TERM(orig, trueTerm, map); COPY_TERM(orig, falseTerm, map); FreeSymbol::copyAttachments(original, map); } void FloatOpSymbol::getDataAttachments(const Vector& opDeclaration, Vector& purposes, Vector >& data) { int nrDataAttachments = purposes.length(); purposes.resize(nrDataAttachments + 1); purposes[nrDataAttachments] = "FloatOpSymbol"; data.resize(nrDataAttachments + 1); data[nrDataAttachments].resize(1); const char*& d = data[nrDataAttachments][0]; switch (op) { CODE_CASE(d, '-', 0, "-") CODE_CASE(d, 'a', 'b', "abs") CODE_CASE(d, 'c', 'e', "ceiling") CODE_CASE(d, 's', 'q', "sqrt") CODE_CASE(d, 'e', 'x', "exp") CODE_CASE(d, 'l', 'o', "log") CODE_CASE(d, 's', 'i', "sin") CODE_CASE(d, 'c', 'o', "cos") CODE_CASE(d, 't', 'a', "tan") CODE_CASE(d, 'a', 's', "asin") CODE_CASE(d, 'a', 'c', "acos") CODE_CASE(d, 'a', 't', "atan") CODE_CASE(d, 'r', 'a', "rat") CODE_CASE(d, '+', 0, "+") CODE_CASE(d, '*', 0, "*") CODE_CASE(d, '/', 0, "/") CODE_CASE(d, 'r', 'e', "rem") CODE_CASE(d, '^', 0, "^") CODE_CASE(d, '<', 0, "<") CODE_CASE(d, '<', '=', "<=") CODE_CASE(d, '>', 0, ">") CODE_CASE(d, '>', '=', ">=") CODE_CASE(d, 'm', 'i', "min") CODE_CASE(d, 'm', 'a', "max") case CODE('f', 'l'): { d = (succSymbol == 0) ? "floor" : "float"; // HACK break; } default: CantHappen("bad float op"); } FreeSymbol::getDataAttachments(opDeclaration, purposes, data); } void FloatOpSymbol::getSymbolAttachments(Vector& purposes, Vector& symbols) { APPEND_SYMBOL(purposes, symbols, floatSymbol); APPEND_SYMBOL(purposes, symbols, succSymbol); APPEND_SYMBOL(purposes, symbols, minusSymbol); APPEND_SYMBOL(purposes, symbols, divisionSymbol); FreeSymbol::getSymbolAttachments(purposes, symbols); } void FloatOpSymbol::getTermAttachments(Vector& purposes, Vector& terms) { APPEND_TERM(purposes, terms, trueTerm); APPEND_TERM(purposes, terms, falseTerm); FreeSymbol::getTermAttachments(purposes, terms); } void FloatOpSymbol::postInterSymbolPass() { PREPARE_TERM(trueTerm); PREPARE_TERM(falseTerm); } void FloatOpSymbol::reset() { trueTerm.reset(); // so true dag can be garbage collected falseTerm.reset(); // so false dag can be garbage collected FreeSymbol::reset(); // parents reset() tasks } bool FloatOpSymbol::eqRewrite(DagNode* subject, RewritingContext& context) { Assert(this == subject->symbol(), "bad symbol"); int nrArgs = arity(); FreeDagNode* d = static_cast(subject); bool floatEval = true; // // Evaluate our arguments and check that they are all floats. // for (int i = 0; i < nrArgs; i++) { DagNode* a = d->getArgument(i); a->reduce(context); if (a->symbol() != floatSymbol) floatEval = false; } if (floatEval) { double a1 = static_cast(d->getArgument(0))->getValue(); double r; if (nrArgs == 1) { switch (op) { case '-': r = -a1; break; case CODE('a', 'b'): r = fabs(a1); break; case CODE('f', 'l'): r = floor(a1); break; case CODE('c', 'e'): r = ceil(a1); break; case CODE('s', 'q'): r = sqrt(a1); break; case CODE('e', 'x'): r = exp(a1); break; case CODE('l', 'o'): { if (a1 < 0) goto fail; // some platforms return NaN, some -Infinity r = log(a1); break; } case CODE('s', 'i'): r = sin(a1); break; case CODE('c', 'o'): r = cos(a1); break; case CODE('t', 'a'): r = tan(a1); break; case CODE('a', 's'): { if (a1 < -1.0 || a1 > 1.0) goto fail; r = asin(a1); break; } case CODE('a', 'c'): { if (a1 < -1.0 || a1 > 1.0) goto fail; r = acos(a1); break; } case CODE('a', 't'): r = atan(a1); break; case CODE('r', 'a'): { if (!(isfinite(a1))) goto fail; mpq_class t; mpq_set_d(t.get_mpq_t(), a1); const mpz_class& numerator = t.get_num(); const mpz_class& denominator = t.get_den(); DagNode* r; if (denominator == 1) { if (numerator >= 0) return succSymbol->rewriteToNat(subject, context, numerator); r = minusSymbol->makeNegDag(numerator); } else r = divisionSymbol->makeRatDag(numerator, denominator); return context.builtInReplace(subject, r); } default: CantHappen("bad float op"); r = 0.0; } } else { double a2 = static_cast(d->getArgument(1))->getValue(); switch (op) { case '+': r = a1 + a2; break; case '-': r = a1 - a2; break; case '*': r = a1 * a2; break; case '/': { if (a2 == 0) goto fail; r = a1 / a2; break; } case CODE('r', 'e'): { if (a2 == 0) goto fail; r = fmod(a1, a2); break; } case '^': { bool defined; r = safePow(a1, a2, defined); if (!defined) goto fail; break; } case CODE('a', 't'): { if (!isfinite(a1) && !isfinite(a2)) { // // Double infinity case: make args finite // a1 = (a1 < 0) ? -1 : 1; a2 = (a2 < 0) ? -1 : 1; } r = atan2(a1, a2); break; } case CODE('m', 'i'): { r = (a1 < a2) ? a1 : a2; break; } case CODE('m', 'a'): { r = (a1 < a2) ? a2 : a1; break; } default: { switch (op) { case '<': r = a1 < a2; break; case CODE('<', '='): r = a1 <= a2; break; case '>': r = a1 > a2; break; case CODE('>', '='): r = a1 >= a2; break; default: CantHappen("bad float op"); r = 0.0; // avoid compiler warning } Assert(trueTerm.getTerm() != 0 && falseTerm.getTerm() != 0, "null true/false for relational op"); return context.builtInReplace(subject, r ? trueTerm.getDag() : falseTerm.getDag()); } } } if (!isNaN(r)) return floatSymbol->rewriteToFloat(subject, context, r); } else if (nrArgs == 1) { DagNode* a0 = d->getArgument(0); if (op == CODE('f', 'l') && succSymbol != 0) // check we're float() and not floor() { if (succSymbol->isNat(a0)) { mpq_class tq(succSymbol->getNat(a0), 1); return floatSymbol->rewriteToFloat(subject, context, mpq_get_d(tq.get_mpq_t())); } else if (a0->symbol() == minusSymbol) { if (minusSymbol->isNeg(a0)) { mpz_class result; mpq_class tq(minusSymbol->getNeg(a0, result), 1); return floatSymbol->rewriteToFloat(subject, context, mpq_get_d(tq.get_mpq_t())); } } else if (a0->symbol() == divisionSymbol) { if (divisionSymbol->isRat(a0)) { mpz_class numerator; const mpz_class& denomenator = divisionSymbol->getRat(a0, numerator); mpq_class tq(numerator, denomenator); return floatSymbol->rewriteToFloat(subject, context, mpq_get_d(tq.get_mpq_t())); } } } } fail: return FreeSymbol::eqRewrite(subject, context); } int FloatOpSymbol::isOdd(double n) { // // Decide if a floating point number is odd or even; // return -1 if neither or can't decide. // if (n != floor(n)) return -1; // fractional if (n < 0) n = -n; if (n > INT_DOUBLE_MAX) // oddness is essentially random return -1; return static_cast(n) & 1; } double FloatOpSymbol::safePow(double a1, double a2, bool& defined) { defined = true; if (isNaN(a1)) { defined = false; return a1; } if (isNaN(a2)) { defined = false; return a2; } if (!isfinite(a1)) { if (a2 == 0.0) return 1.0; if (a2 < 0) return 0.0; if (a1 > 0) return a1; int odd = isOdd(a2); if (odd == -1) { defined = false; return 0.0; } return odd ? a1 : -a1; } if (!isfinite(a2)) { if (a1 > 1.0) return a2 > 0 ? a2 : 0; if (a1 == 1.0) return 1.0; if (a1 > 0.0) return a2 < 0 ? -a2 : 0; if (a2 > 0) { if (a1 <= -1.0) defined = false; } else { if (a1 >= -1.0) defined = false; } return 0; } if (a1 == 0.0 && a2 < 0.0) { // // Some platforms return Infinity. // defined = false; return 0.0; } double r = pow(a1, a2); if (isNaN(r)) defined = false; else if (a1 < 0.0 && r != 0.0) { // // Some platforms get this badly wrong. // int odd = isOdd(a2); if (odd == -1) defined = false; else if ((odd == 1) != (r < 0)) r = -r; // fix sign if pow() got it wrong } return r; } Maude-Maude3.2/src/BuiltIn/floatOpSymbol.hh000066400000000000000000000040751420036611000206340ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for symbols for built in operations on floating point numbers. // #ifndef _FloatOpSymbol_hh_ #define _FloatOpSymbol_hh_ #include "freeSymbol.hh" #include "cachedDag.hh" class FloatOpSymbol : public FreeSymbol { public: FloatOpSymbol(int id, int arity); bool attachData(const Vector& opDeclaration, const char* purpose, const Vector& data); bool attachSymbol(const char* purpose, Symbol* symbol); bool attachTerm(const char* purpose, Term* term); void copyAttachments(Symbol* original, SymbolMap* map); void getDataAttachments(const Vector& opDeclaration, Vector& purposes, Vector >& data); void getSymbolAttachments(Vector& purposes, Vector& symbols); void getTermAttachments(Vector& purposes, Vector& terms); void postInterSymbolPass(); void reset(); bool eqRewrite(DagNode* subject, RewritingContext& context); private: int isOdd(double n); double safePow(double a1, double a2, bool& defined); int op; FloatSymbol* floatSymbol; SuccSymbol* succSymbol; MinusSymbol* minusSymbol; DivisionSymbol* divisionSymbol; CachedDag trueTerm; CachedDag falseTerm; }; #endif Maude-Maude3.2/src/BuiltIn/floatSymbol.cc000066400000000000000000000057531420036611000203270ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class FloatSymbol. // // utility stuff #include "macros.hh" #include "vector.hh" #include "mathStuff.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "NA_Theory.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" #include "term.hh" // core class definitions #include "rewritingContext.hh" // built in class definitions #include "floatSymbol.hh" #include "floatTerm.hh" #include "floatDagNode.hh" FloatSymbol::FloatSymbol(int id) : NA_Symbol(id) { sort = 0; finiteSort = 0; } void FloatSymbol::fillInSortInfo(Term* subject) { Sort* s = isfinite(static_cast(subject)->getValue()) ? finiteSort : sort; subject->setSortInfo(s->component(), s->index()); } void FloatSymbol::computeBaseSort(DagNode* subject) { Sort* s = isfinite(static_cast(subject)->getValue()) ? finiteSort : sort; subject->setSortIndex(s->index()); } bool FloatSymbol::isConstructor(DagNode* /* subject */) { return true; } void FloatSymbol::compileOpDeclarations() { // NA_Symbol::compileOpDeclarations(); // default processing const Vector& opDecls = getOpDeclarations(); int nrOpDecls = opDecls.length(); for (int i = 0; i < nrOpDecls; i++) { Sort* s = opDecls[i].getDomainAndRange()[0]; if (sort == 0 || s->index() < sort->index()) sort = s; // set sort to largest (smallest index) declared sort if (finiteSort == 0 || s->index() > finiteSort->index()) finiteSort = s; // set finiteSort to smallest (largest index) declared sort } } bool FloatSymbol::rewriteToFloat(DagNode* subject, RewritingContext& context, double result) { bool trace = RewritingContext::getTraceStatus(); if (trace) { context.tracePreEqRewrite(subject, 0, RewritingContext::BUILTIN); if (context.traceAbort()) return false; } (void) new(subject) FloatDagNode(this, result); context.incrementEqCount(); if (trace) context.tracePostEqRewrite(subject); return true; } Term* FloatSymbol::termify(DagNode* dagNode) { return new FloatTerm(this, safeCast(FloatDagNode*, dagNode)->getValue()); } Maude-Maude3.2/src/BuiltIn/floatSymbol.hh000066400000000000000000000025541420036611000203350ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for floating point number symbols. // #ifndef _floatSymbol_hh_ #define _floatSymbol_hh_ #include "NA_Symbol.hh" class FloatSymbol : public NA_Symbol { public: FloatSymbol(int id); void fillInSortInfo(Term* subject); void computeBaseSort(DagNode* subject); void compileOpDeclarations(); bool isConstructor(DagNode* subject); bool rewriteToFloat(DagNode* subject, RewritingContext& context, double result); Term* termify(DagNode* dagNode); private: Sort* sort; Sort* finiteSort; }; #endif Maude-Maude3.2/src/BuiltIn/floatTerm.cc000066400000000000000000000054331420036611000177640ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class FloatTerm. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "NA_Theory.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" #include "term.hh" // core class definitions #include "symbolMap.hh" // built in class definitions #include "floatSymbol.hh" #include "floatTerm.hh" #include "floatDagNode.hh" FloatTerm::FloatTerm(FloatSymbol* symbol, double value) : NA_Term(symbol), value((value == 0.0) ? 0.0 : value) // don't allow IEEE-754 -0.0 { } Term* FloatTerm::deepCopy2(SymbolMap* map) const { return new FloatTerm(static_cast(map == 0 ? symbol() : map->translate(symbol())), value); } Term* FloatTerm::instantiate2(const Vector& varBindings, SymbolMap* translator) { return new FloatTerm(safeCast(FloatSymbol*, translator->findTargetVersionOfSymbol(symbol())), value); } Term* FloatTerm::normalize(bool /* full */, bool& changed) { changed = false; setHashValue(hash(symbol()->getHashValue(), bitPattern ^ (bitPattern >> 32))); return this; } int FloatTerm::compareArguments(const Term* other) const { double otherValue = static_cast(other)->value; // // Straight forward subtraction might fail for values near +- 2^63 // return (value == otherValue) ? 0 : ((value > otherValue) ? 1 : -1); } int FloatTerm::compareArguments(const DagNode* other) const { double otherValue = static_cast(other)->value; // // Straight forward subtraction might fail for values near +- 2^63 // return (value == otherValue) ? 0 : ((value > otherValue) ? 1 : -1); } void FloatTerm::overwriteWithDagNode(DagNode* old) const { (void) new(old) FloatDagNode(static_cast(symbol()), value); } NA_DagNode* FloatTerm::makeDagNode() const { return new FloatDagNode(static_cast(symbol()), value); } Maude-Maude3.2/src/BuiltIn/floatTerm.hh000066400000000000000000000031601420036611000177710ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for terms containing floating point numbers. // #ifndef _floatTerm_hh_ #define _floatTerm_hh_ #include "NA_Term.hh" class FloatTerm : public NA_Term { public: FloatTerm(FloatSymbol* symbol, double value); Term* deepCopy2(SymbolMap* map) const; Term* normalize(bool full, bool& changed); int compareArguments(const Term* other) const; int compareArguments(const DagNode* other) const; void overwriteWithDagNode(DagNode* old) const; NA_DagNode* makeDagNode() const; // // Needed because we have hidden data. // Term* instantiate2(const Vector& varBindings, SymbolMap* translator); double getValue() const; private: const union { double value; Int64 bitPattern; }; }; inline double FloatTerm::getValue() const { return value; } #endif Maude-Maude3.2/src/BuiltIn/matrixOpSignature.cc000066400000000000000000000032751420036611000215160ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // List of constructors specific to MatrixOpSymbol. // // We generate various chunks of linear (branching) code to handle // this hetrogeneous collection by macro expansion. // The format is: // MACRO(symbols name, symbols C++ class, required type flags, number of args) // MACRO(stringSymbol, StringSymbol, SymbolType::STRING, 0) MACRO(emptyVectorSymbol, Symbol, 0, 0) MACRO(vectorEntrySymbol, FreeSymbol, 0, 2) MACRO(vectorSymbol, ACU_Symbol, SymbolType::ASSOC | SymbolType::COMM, 2) MACRO(emptyMatrixSymbol, Symbol, 0, 0) MACRO(matrixEntrySymbol, FreeSymbol, 0, 2) MACRO(matrixSymbol, ACU_Symbol, SymbolType::ASSOC | SymbolType::COMM, 2) MACRO(indexPairSymbol, FreeSymbol, 0, 2) MACRO(emptyVectorSetSymbol, Symbol, 0, 0) MACRO(vectorSetSymbol, ACU_Symbol, SymbolType::ASSOC | SymbolType::COMM, 2) MACRO(vectorSetPairSymbol, FreeSymbol, 0, 2) Maude-Maude3.2/src/BuiltIn/matrixOpSymbol.cc000077500000000000000000000223631420036611000210240ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 2004 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class NumberOpSymbol. // #include // utility stuff #include "macros.hh" #include "vector.hh" #include "mpzSystem.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "freeTheory.hh" #include "ACU_Persistent.hh" #include "ACU_Theory.hh" #include "NA_Theory.hh" #include "builtIn.hh" // interface class definitions #include "term.hh" // core class definitions #include "rewritingContext.hh" #include "dagArgumentIterator.hh" #include "symbolMap.hh" // free theory class definitions #include "freeSymbol.hh" #include "freeDagNode.hh" // ACU theory class definitions #include "ACU_Symbol.hh" #include "ACU_DagNode.hh" // built in stuff #include "bindingMacros.hh" #include "succSymbol.hh" #include "minusSymbol.hh" #include "stringSymbol.hh" #include "stringDagNode.hh" #include "matrixOpSymbol.hh" MatrixOpSymbol::MatrixOpSymbol(int id, int arity) : NumberOpSymbol(id, arity) { #define MACRO(SymbolName, SymbolClass, RequiredFlags, NrArgs) \ SymbolName = 0; #include "matrixOpSignature.cc" #undef MACRO } bool MatrixOpSymbol::attachData(const Vector& opDeclaration, const char* purpose, const Vector& data) { if (strcmp(purpose, "MatrixOpSymbol") == 0) return true; return NumberOpSymbol::attachData(opDeclaration, purpose, data); } bool MatrixOpSymbol::attachSymbol(const char* purpose, Symbol* symbol) { #define MACRO(SymbolName, SymbolClass, RequiredFlags, NrArgs) \ BIND_SYMBOL(purpose, symbol, SymbolName, SymbolClass*); #include "matrixOpSignature.cc" #undef MACRO return NumberOpSymbol::attachSymbol(purpose, symbol); } void MatrixOpSymbol::copyAttachments(Symbol* original, SymbolMap* map) { MatrixOpSymbol* orig = safeCast(MatrixOpSymbol*, original); #define MACRO(SymbolName, SymbolClass, RequiredFlags, NrArgs) \ COPY_SYMBOL(orig, SymbolName, map, SymbolClass*); #include "matrixOpSignature.cc" #undef MACRO NumberOpSymbol::copyAttachments(original, map); } void MatrixOpSymbol::getDataAttachments(const Vector& opDeclaration, Vector& purposes, Vector >& data) { int nrDataAttachments = purposes.length(); purposes.resize(nrDataAttachments + 1); purposes[nrDataAttachments] = "MatrixOpSymbol"; data.resize(nrDataAttachments + 1); (data[nrDataAttachments]).resize(1); data[nrDataAttachments][0] = "natSystemSolve"; NumberOpSymbol::getDataAttachments(opDeclaration, purposes, data); } void MatrixOpSymbol::getSymbolAttachments(Vector& purposes, Vector& symbols) { #define MACRO(SymbolName, SymbolClass, RequiredFlags, NrArgs) \ APPEND_SYMBOL(purposes, symbols, SymbolName); #include "matrixOpSignature.cc" #undef MACRO NumberOpSymbol::getSymbolAttachments(purposes, symbols); } bool MatrixOpSymbol::downMatrixEntry(DagNode* dagNode, SparseMatrix& matrix, int& maxRowNr, int& maxColNr) { if (dagNode->symbol() == matrixEntrySymbol) { FreeDagNode* d = safeCast(FreeDagNode*, dagNode); DagNode* arg = d->getArgument(0); if (arg->symbol() == indexPairSymbol) { FreeDagNode* a = safeCast(FreeDagNode*, arg); int rowNr; int colNr; if (getSuccSymbol()->getSignedInt(a->getArgument(0), rowNr) && getSuccSymbol()->getSignedInt(a->getArgument(1), colNr) && getNumber(d->getArgument(1), matrix[rowNr][colNr])) { if (rowNr > maxRowNr) maxRowNr = rowNr; if (colNr > maxColNr) maxColNr = colNr; return true; } } } return false; } bool MatrixOpSymbol::downMatrix(DagNode* dagNode, SparseMatrix& matrix, int& maxRowNr, int& maxColNr) { Symbol* s = dagNode->symbol(); if (s == matrixSymbol) { for (DagArgumentIterator i(dagNode); i.valid(); i.next()) { if (!downMatrixEntry(i.argument(), matrix, maxRowNr, maxColNr)) return false; } } else if (s != emptyMatrixSymbol) return downMatrixEntry(dagNode, matrix, maxRowNr, maxColNr); return true; } bool MatrixOpSymbol::downVectorEntry(DagNode* dagNode, IntVec& vec, int& maxRowNr) { if (dagNode->symbol() == vectorEntrySymbol) { FreeDagNode* d = safeCast(FreeDagNode*, dagNode); int index; if (getSuccSymbol()->getSignedInt(d->getArgument(0), index)) { if (index > maxRowNr) { vec.resize(index + 1); for (int i = maxRowNr + 1; i < index; ++i) vec[i] = 0; maxRowNr = index; } if (getNumber(d->getArgument(1), vec[index])) return true; } } return false; } bool MatrixOpSymbol::downVector(DagNode* dagNode, IntVec& vec, int& maxRowNr) { vec.resize(maxRowNr + 1); for (int i = 0; i <= maxRowNr; ++i) vec[i] = 0; Symbol* s = dagNode->symbol(); if (s == vectorSymbol) { for (DagArgumentIterator i(dagNode); i.valid(); i.next()) { if (!downVectorEntry(i.argument(), vec, maxRowNr)) return false; } } else if (s != emptyVectorSymbol) return downVectorEntry(dagNode, vec, maxRowNr); return true; } bool MatrixOpSymbol::downAlgorithm(DagNode* dagNode, Algorithm& algorithm) { if (dagNode->symbol() == stringSymbol) { const Rope& alg = safeCast(StringDagNode*, dagNode)->getValue(); if (alg.empty()) algorithm = SYSTEMS_CHOICE; else { char *algStr = alg.makeZeroTerminatedString(); if (strcmp(algStr, "cd") == 0) algorithm = CD; else if (strcmp(algStr, "gcd") == 0) algorithm = GCD; else { delete [] algStr; return false; } delete [] algStr; } return true; } return false; } DagNode* MatrixOpSymbol::upSet(const Vector& elts) { int n = elts.size(); if (n == 0) return emptyVectorSetSymbol->makeDagNode(); return (n == 1) ? elts[0] : vectorSetSymbol->makeDagNode(elts); } DagNode* MatrixOpSymbol::upVector(const IntVec& row) { Vector elts; Vector pair(2); int nrRows = row.size(); for (int i = 1; i < nrRows; i++) { const mpz_class& v = row[i]; Assert(v >= 0, "-ve solution"); if (v > 0) { pair[0] = getSuccSymbol()->makeNatDag(i - 1); pair[1] = getSuccSymbol()->makeNatDag(v); elts.append(vectorEntrySymbol->makeDagNode(pair)); } } int n = elts.size(); if (n == 0) return emptyVectorSymbol->makeDagNode(); return (n == 1) ? elts[0] : vectorSymbol->makeDagNode(elts); } bool MatrixOpSymbol::eqRewrite(DagNode* subject, RewritingContext& context) { FreeDagNode* d = safeCast(FreeDagNode*, subject); DagNode* m = d->getArgument(0); m->reduce(context); DagNode* v = d->getArgument(1); v->reduce(context); DagNode* a = d->getArgument(2); a->reduce(context); Algorithm algorithm; SparseMatrix matrix; IntVec vec; int maxRowNr = -1; int maxColNr = -1; if (downAlgorithm(a, algorithm) && downMatrix(m, matrix, maxRowNr, maxColNr) && maxRowNr >= 0 && downVector(v, vec, maxRowNr)) { Vector homogenous; Vector inhomogenous; // // Build Diophantine system. // MpzSystem ds; int rowSize = maxColNr + 2; IntVec row(rowSize); for (int i = 0; i <= maxRowNr; i++) { for (int j = 1; j < rowSize; j++) row[j] = 0; const mpz_class& v = vec[i]; const SparseVector& r = matrix[i]; // // If we have an equation with all zero coefficients and nonzero // constant term we can trivially fail. // if (r.empty() && v != 0) goto fail; row[0] = -v; for (auto& j : r) row[j.first + 1] = j.second; ds.insertEqn(row); } for (int j = 1; j < rowSize; j++) row[j] = NONE; row[0] = 1; ds.setUpperBounds(row); // // Extract solutions. // if (algorithm == GCD || (algorithm == SYSTEMS_CHOICE && maxColNr <= maxRowNr + 1)) { while (ds.findNextMinimalSolutionGcd(row)) { if (row[0] == 0) homogenous.append(upVector(row)); else inhomogenous.append(upVector(row)); } } else { while (ds.findNextMinimalSolution(row)) { if (row[0] == 0) homogenous.append(upVector(row)); else inhomogenous.append(upVector(row)); } } // // Build result dag. // fail: Vector args(2); args[0] = upSet(inhomogenous); args[1] = inhomogenous.empty() ? args[0] : upSet(homogenous); return context.builtInReplace(subject, vectorSetPairSymbol->makeDagNode(args)); } // // NumberOpSymbol doesn't know how to deal with this. // return FreeSymbol::eqRewrite(subject, context); } Maude-Maude3.2/src/BuiltIn/matrixOpSymbol.hh000066400000000000000000000046571420036611000210410ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 2004 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for symbols for built in operations on matrices of numbers. // #ifndef _matrixOpSymbol_hh_ #define _matrixOpSymbol_hh_ #include #include "numberOpSymbol.hh" class MatrixOpSymbol : public NumberOpSymbol { public: MatrixOpSymbol(int id, int arity); bool attachData(const Vector& opDeclaration, const char* purpose, const Vector& data); bool attachSymbol(const char* purpose, Symbol* symbol); void copyAttachments(Symbol* original, SymbolMap* map); void getDataAttachments(const Vector& opDeclaration, Vector& purposes, Vector >& data); void getSymbolAttachments(Vector& purposes, Vector& symbols); bool eqRewrite(DagNode* subject, RewritingContext& context); private: enum Algorithm { SYSTEMS_CHOICE, CD, GCD }; typedef map SparseVector; typedef map SparseMatrix; typedef Vector IntVec; bool downMatrixEntry(DagNode* dagNode, SparseMatrix& matrix, int& maxRowNr, int& maxColNr); bool downMatrix(DagNode* dagNode, SparseMatrix& matrix, int& maxRowNr, int& maxColNr); bool downVectorEntry(DagNode* dagNode, IntVec& vec, int& maxRowNr); bool downVector(DagNode* dagNode, IntVec& vec, int& maxRowNr); bool downAlgorithm(DagNode* dagNode, Algorithm& algorithm); DagNode* upSet(const Vector& elts); DagNode* upVector(const IntVec& row); #define MACRO(SymbolName, SymbolClass, RequiredFlags, NrArgs) \ SymbolClass* SymbolName; #include "matrixOpSignature.cc" #undef MACRO }; #endif Maude-Maude3.2/src/BuiltIn/minusSymbol.cc000066400000000000000000000106611420036611000203470ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class MinusSymbol. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "freeTheory.hh" #include "builtIn.hh" // interface class definitions #include "term.hh" #include "argumentIterator.hh" // core class definitions #include "rewritingContext.hh" #include "symbolMap.hh" // free theory class definitions #include "freeNet.hh" #include "freeDagNode.hh" // built in stuff #include "bindingMacros.hh" #include "succSymbol.hh" #include "numberOpSymbol.hh" #include "minusSymbol.hh" MinusSymbol::MinusSymbol(int id) : NumberOpSymbol(id, 1) { } bool MinusSymbol::attachData(const Vector& opDeclaration, const char* purpose, const Vector& data) { if (strcmp(purpose, "MinusSymbol") == 0) { if (data.length() != 0) return false; Vector t(1); t[0] = "-"; return NumberOpSymbol::attachData(opDeclaration, "NumberOpSymbol", t); } return NumberOpSymbol::attachData(opDeclaration, purpose, data); } void MinusSymbol::getDataAttachments(const Vector& opDeclaration, Vector& purposes, Vector >& data) { APPEND_DATA(purposes, data, MinusSymbol); // // Need to bypass NumberOpSymbol::getDataAttachments() in order to // avoid getting a NumberOpSymbol id hook. // FreeSymbol::getDataAttachments(opDeclaration, purposes, data); } DagNode* MinusSymbol::makeNegDag(const mpz_class& integer) { Assert(integer < 0, "not negative"); Vector arg(1); arg[0] = getSuccSymbol()->makeNatDag(- integer); // would like to avoid copy return makeDagNode(arg); } bool MinusSymbol::isNeg(const DagNode* dagNode) const { Assert(static_cast(dagNode->symbol()) == this, "symbol mismatch"); DagNode* a = safeCast(const FreeDagNode*, dagNode)->getArgument(0); return a->symbol() == getSuccSymbol() && getSuccSymbol()->isNat(a); } const mpz_class& MinusSymbol::getNeg(const DagNode* dagNode, mpz_class& result) const { Assert(static_cast(dagNode->symbol()) == this, "symbol mismatch"); result = - getSuccSymbol()->getNat(safeCast(const FreeDagNode*, dagNode)->getArgument(0)); return result; } DagNode* MinusSymbol::makeIntDag(const mpz_class& integer) { return (integer >= 0) ? getSuccSymbol()->makeNatDag(integer) : makeNegDag(integer); } Term* MinusSymbol::makeIntTerm(const mpz_class& integer) { if (integer >= 0) return getSuccSymbol()->makeNatTerm(integer); Vector arg(1); arg[0] = getSuccSymbol()->makeNatTerm(- integer); // would like to avoid copy return makeTerm(arg); } bool MinusSymbol::isNeg(/* const */ Term* term) const { Assert(static_cast(term->symbol()) == this, "symbol mismatch"); ArgumentIterator i(*term); Term* t = i.argument(); return t->symbol() == getSuccSymbol() && getSuccSymbol()->isNat(t); } const mpz_class& MinusSymbol::getNeg(/* const */ Term* term, mpz_class& result) const { Assert(static_cast(term->symbol()) == this, "symbol mismatch"); ArgumentIterator i(*term); result = - getSuccSymbol()->getNat(i.argument()); return result; } bool MinusSymbol::getSignedInt64(const DagNode* dagNode, Int64& value) const { if (static_cast(dagNode->symbol()) == this) { const FreeDagNode* f = safeCast(const FreeDagNode*, dagNode); if (getSuccSymbol()->getSignedInt64(f->getArgument(0), value)) { value = -value; return true; } return false; } return getSuccSymbol()->getSignedInt64(dagNode, value); } Maude-Maude3.2/src/BuiltIn/minusSymbol.hh000066400000000000000000000034571420036611000203660ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for symbols for the unary minus operation. // #ifndef _minusSymbol_hh_ #define _minusSymbol_hh_ #include "numberOpSymbol.hh" class MinusSymbol : public NumberOpSymbol { public: MinusSymbol(int id); bool attachData(const Vector& opDeclaration, const char* purpose, const Vector& data); void getDataAttachments(const Vector& opDeclaration, Vector& purposes, Vector >& data); // // Functions special to MinusSymbol. // DagNode* makeNegDag(const mpz_class& integer); bool isNeg(const DagNode* dagNode) const; const mpz_class& getNeg(const DagNode* dagNode, mpz_class& result) const; DagNode* makeIntDag(const mpz_class& integer); Term* makeIntTerm(const mpz_class& integer); bool isNeg(/* const */ Term* term) const; const mpz_class& getNeg(/* const */ Term* term, mpz_class& result) const; bool getSignedInt64(const DagNode* dagNode, Int64& value) const; }; #endif Maude-Maude3.2/src/BuiltIn/numberOpSymbol.cc000066400000000000000000000252551420036611000210100ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class NumberOpSymbol. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "freeTheory.hh" #include "builtIn.hh" // interface class definitions #include "term.hh" // core class definitions #include "rewritingContext.hh" #include "symbolMap.hh" // free theory class definitions #include "freeDagNode.hh" // built in stuff #include "bindingMacros.hh" #include "succSymbol.hh" #include "minusSymbol.hh" #include "numberOpSymbol.hh" NumberOpSymbol::NumberOpSymbol(int id, int arity) : FreeSymbol(id, arity) { op = NONE; succSymbol = 0; minusSymbol = 0; } bool NumberOpSymbol::attachData(const Vector& opDeclaration, const char* purpose, const Vector& data) { BIND_OP(purpose, NumberOpSymbol, op, data); return FreeSymbol::attachData(opDeclaration, purpose, data); } bool NumberOpSymbol::attachSymbol(const char* purpose, Symbol* symbol) { BIND_SYMBOL(purpose, symbol, succSymbol, SuccSymbol*); BIND_SYMBOL(purpose, symbol, minusSymbol, MinusSymbol*); return FreeSymbol::attachSymbol(purpose, symbol); } bool NumberOpSymbol::attachTerm(const char* purpose, Term* term) { BIND_TERM(purpose, term, trueTerm); BIND_TERM(purpose, term, falseTerm); return FreeSymbol::attachTerm(purpose, term); } void NumberOpSymbol::copyAttachments(Symbol* original, SymbolMap* map) { NumberOpSymbol* orig = safeCast(NumberOpSymbol*, original); op = orig->op; COPY_SYMBOL(orig, succSymbol, map, SuccSymbol*); COPY_SYMBOL(orig, minusSymbol, map, MinusSymbol*); COPY_TERM(orig, trueTerm, map); COPY_TERM(orig, falseTerm, map); FreeSymbol::copyAttachments(original, map); } void NumberOpSymbol::getDataAttachments(const Vector& opDeclaration, Vector& purposes, Vector >& data) { if (op != NONE) { int nrDataAttachments = purposes.length(); purposes.resize(nrDataAttachments + 1); purposes[nrDataAttachments] = "NumberOpSymbol"; data.resize(nrDataAttachments + 1); data[nrDataAttachments].resize(1); const char*& d = data[nrDataAttachments][0]; switch (op) { CODE_CASE(d, '-', 0, "-") CODE_CASE(d, '~', 0, "~") CODE_CASE(d, 'a', 'b', "abs") CODE_CASE(d, '+', 0, "+") CODE_CASE(d, '*', 0, "*") CODE_CASE(d, 'g', 'c', "gcd") CODE_CASE(d, 'l', 'c', "lcm") CODE_CASE(d, '|', 0, "|") CODE_CASE(d, '&', 0, "&") CODE_CASE(d, 'x', 'o', "xor") CODE_CASE(d, 'q', 'u', "quo") CODE_CASE(d, 'r', 'e', "rem") CODE_CASE(d, '^', 0, "^") CODE_CASE(d, '<', '<', "<<") CODE_CASE(d, '>', '>', ">>") CODE_CASE(d, '<', 0, "<") CODE_CASE(d, '<', '=', "<=") CODE_CASE(d, '>', 0, ">") CODE_CASE(d, '>', '=', ">=") CODE_CASE(d, 'd', 'i', "divides") CODE_CASE(d, 'm', 'o', "modExp") default: CantHappen("bad number op"); } } FreeSymbol::getDataAttachments(opDeclaration, purposes, data); } void NumberOpSymbol::getSymbolAttachments(Vector& purposes, Vector& symbols) { APPEND_SYMBOL(purposes, symbols, succSymbol); APPEND_SYMBOL(purposes, symbols, minusSymbol); FreeSymbol::getSymbolAttachments(purposes, symbols); } void NumberOpSymbol::getTermAttachments(Vector& purposes, Vector& terms) { APPEND_TERM(purposes, terms, trueTerm); APPEND_TERM(purposes, terms, falseTerm); FreeSymbol::getTermAttachments(purposes, terms); } void NumberOpSymbol::postInterSymbolPass() { PREPARE_TERM(trueTerm); PREPARE_TERM(falseTerm); } void NumberOpSymbol::reset() { trueTerm.reset(); // so true dag can be garbage collected falseTerm.reset(); // so false dag can be garbage collected FreeSymbol::reset(); // parents reset() tasks } bool NumberOpSymbol::eqRewrite(DagNode* subject, RewritingContext& context) { Assert(this == subject->symbol(), "bad symbol"); int nrArgs = arity(); FreeDagNode* d = safeCast(FreeDagNode*, subject); bool specialEval = (succSymbol != 0); // // Evaluate our arguments and check that they are all numbers // for (int i = 0; i < nrArgs; i++) { DagNode* a = d->getArgument(i); a->reduce(context); if (specialEval && !((a->symbol() == minusSymbol) ? minusSymbol->isNeg(a) : succSymbol->isNat(a))) specialEval = false; } if (specialEval) { mpz_class storage0; DagNode* d0 = d->getArgument(0); const mpz_class& a0 = (d0->symbol() == minusSymbol) ? minusSymbol->getNeg(d0, storage0) : succSymbol->getNat(d0); mpz_class r; if (nrArgs == 1) { switch (op) { case '-': { if (a0 > 0) // avoid infinite loop! goto fail; r = -a0; break; } case '~': { if (minusSymbol == 0) goto fail; r = ~a0; break; } case CODE('a', 'b'): { r = abs(a0); break; } default: CantHappen("bad number op"); } } else { mpz_class storage1; DagNode* d1 = d->getArgument(1); const mpz_class& a1 = (d1->symbol() == minusSymbol) ? minusSymbol->getNeg(d1, storage1) : succSymbol->getNat(d1); if (nrArgs == 2) { switch (op) { // // These seven operations are really AC and are just // included here for completeness. // case '+': { r = a0 + a1; break; } case '*': { r = a0 * a1; break; } case CODE('g', 'c'): { mpz_gcd(r.get_mpz_t(), a0.get_mpz_t(), a1.get_mpz_t()); break; } case CODE('l', 'c'): { mpz_lcm(r.get_mpz_t(), a0.get_mpz_t(), a1.get_mpz_t()); break; } case '&': { r = a0 & a1; break; } case '|': { r = a0 | a1; break; } case CODE('x', 'o'): { r = a0 ^ a1; break; } // // These remaining operations, together with the unary // operations above are the raison d'etre for this class. // case '-': { if (minusSymbol == 0) goto fail; r = a0 - a1; break; } case CODE('q', 'u'): { if (a1 == 0) goto fail; r = a0 / a1; break; } case CODE('r', 'e'): { if (a1 == 0) goto fail; r = a0 % a1; break; } case '^': { if (a1 < 0) goto fail; if (a1 > EXPONENT_BOUND) // handle a0 = -1, 0 or 1 { if (a0 == 0 || a0 == 1) { r = a0; break; } else if (a0 == -1) { mpz_class t = 1; r = ((a1 & t) == 0) ? 1 : -1; break; } goto fail; } mpz_pow_ui(r.get_mpz_t(), a0.get_mpz_t(), mpz_get_ui(a1.get_mpz_t())); break; } case CODE('<', '<'): { if (a1 < 0) goto fail; if (a1 > EXPONENT_BOUND) { if (a0 == 0) { r = 0; break; } goto fail; } r = a0 << mpz_get_ui(a1.get_mpz_t()); break; } case CODE('>', '>'): { if (a1 < 0) goto fail; if (mpz_fits_uint_p(a1.get_mpz_t())) { // // Note that that the C++ binding of operator>> defines // a0 >> a1 using mpz_tdiv_q_2exp() which gives a logical // rather than an arithmetic right shift // with respect to 2's complement representation. // mpz_fdiv_q_2exp(r.get_mpz_t(), a0.get_mpz_t(), mpz_get_ui(a1.get_mpz_t())); } else { mpz_fdiv_q_2exp(r.get_mpz_t(), a0.get_mpz_t(), UINT_MAX); if (r != 0 && r != -1) { // // We get here only in extreme cases where a1 // is in the billions and a0 has billions of // significant bits. // mpz_class t(a1); t -= UINT_MAX; while (!(mpz_fits_uint_p(t.get_mpz_t()))) { mpz_fdiv_q_2exp(r.get_mpz_t(), r.get_mpz_t(), UINT_MAX); if (r == 0 || r == -1) goto done; t -= UINT_MAX; } mpz_fdiv_q_2exp(r.get_mpz_t(), r.get_mpz_t(), mpz_get_ui(t.get_mpz_t())); } done: ; } break; } default: { bool b; switch (op) { case '<': { b = a0 < a1; break; } case CODE('<', '='): { b = a0 <= a1; break; } case '>': { b = a0 > a1; break; } case CODE('>', '='): { b = a0 >= a1; break; } case CODE('d', 'i'): { if (a0 == 0) goto fail; b = mpz_divisible_p(a1.get_mpz_t(), a0.get_mpz_t()); break; } default: CantHappen("bad number op " << op << " in subject " << subject); b = false; // avoid compiler warning } Assert(trueTerm.getTerm() != 0 && falseTerm.getTerm() != 0, "null true/false for relational op"); return context.builtInReplace(subject, b ? trueTerm.getDag() : falseTerm.getDag()); } } } else { Assert(nrArgs == 3, "bad number of args"); mpz_class storage2; DagNode* d2 = d->getArgument(2); const mpz_class& a2 = (d2->symbol() == minusSymbol) ? minusSymbol->getNeg(d2, storage2) : succSymbol->getNat(d2); switch (op) { case CODE('m', 'o'): { if (a0 < 0 || a1 < 0 || a2 < 0) goto fail; mpz_powm(r.get_mpz_t(), a0.get_mpz_t(), a1.get_mpz_t(), a2.get_mpz_t()); break; } default: CantHappen("bad number op"); } } } Assert(minusSymbol != 0 || r >= 0, "can't make -ve int"); return (r >= 0) ? succSymbol->rewriteToNat(subject, context, r) : context.builtInReplace(subject, minusSymbol->makeNegDag(r)); } fail: return FreeSymbol::eqRewrite(subject, context); } bool NumberOpSymbol::getNumber(DagNode* dagNode, mpz_class& value) const { if (dagNode->symbol() == minusSymbol) { if (minusSymbol->isNeg(dagNode)) { (void) minusSymbol->getNeg(dagNode, value); return true; } } else { if (succSymbol->isNat(dagNode)) { value = succSymbol->getNat(dagNode); return true; } } return false; } Maude-Maude3.2/src/BuiltIn/numberOpSymbol.hh000077500000000000000000000051251420036611000210170ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for symbols for built in operations on numbers. // #ifndef _numberOpSymbol_hh_ #define _numberOpSymbol_hh_ #include "freeSymbol.hh" #include "cachedDag.hh" #include "gmpxx.h" class NumberOpSymbol : public FreeSymbol { public: NumberOpSymbol(int id, int arity); bool attachData(const Vector& opDeclaration, const char* purpose, const Vector& data); bool attachSymbol(const char* purpose, Symbol* symbol); bool attachTerm(const char* purpose, Term* term); void copyAttachments(Symbol* original, SymbolMap* map); void getDataAttachments(const Vector& opDeclaration, Vector& purposes, Vector >& data); void getSymbolAttachments(Vector& purposes, Vector& symbols); void getTermAttachments(Vector& purposes, Vector& terms); void postInterSymbolPass(); void reset(); bool eqRewrite(DagNode* subject, RewritingContext& context); // // Functions special to NumberOpSymbol. // /* DagNode* makeNegDag(const mpz_class& integer); bool isNeg(const DagNode* dagNode) const; const mpz_class& getNeg(const DagNode* dagNode, mpz_class& result) const; */ protected: SuccSymbol* getSuccSymbol() const; MinusSymbol* getMinusSymbol() const; bool getNumber(DagNode* dagNode, mpz_class& value) const; private: enum ImplementationConstants { EXPONENT_BOUND = 1000000 // max allowed exponent to limit runaway memory use }; int op; SuccSymbol* succSymbol; MinusSymbol* minusSymbol; CachedDag trueTerm; CachedDag falseTerm; }; inline SuccSymbol* NumberOpSymbol::getSuccSymbol() const { return succSymbol; } inline MinusSymbol* NumberOpSymbol::getMinusSymbol() const { return minusSymbol; } #endif Maude-Maude3.2/src/BuiltIn/randomOpSymbol.cc000066400000000000000000000060311420036611000207670ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 2004 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class NumberOpSymbol. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "freeTheory.hh" #include "builtIn.hh" // interface class definitions #include "term.hh" // core class definitions #include "rewritingContext.hh" // free theory class definitions #include "freeDagNode.hh" // built in stuff #include "succSymbol.hh" #include "randomOpSymbol.hh" mt19937::result_type RandomOpSymbol::globalSeed = 0; RandomOpSymbol::RandomOpSymbol(int id) : NumberOpSymbol(id, 1), currentIndex(0), currentState(globalSeed) { randomNumber = currentState(); } bool RandomOpSymbol::attachData(const Vector& opDeclaration, const char* purpose, const Vector& data) { if (strcmp(purpose, "RandomOpSymbol") == 0) return true; return NumberOpSymbol::attachData(opDeclaration, purpose, data); } void RandomOpSymbol::getDataAttachments(const Vector& opDeclaration, Vector& purposes, Vector >& data) { int nrDataAttachments = purposes.length(); purposes.resize(nrDataAttachments + 1); purposes[nrDataAttachments] = "RandomOpSymbol"; data.resize(nrDataAttachments + 1); NumberOpSymbol::getDataAttachments(opDeclaration, purposes, data); } bool RandomOpSymbol::eqRewrite(DagNode* subject, RewritingContext& context) { FreeDagNode* d = safeCast(FreeDagNode*, subject); DagNode* a = d->getArgument(0); a->reduce(context); SuccSymbol* succSymbol = getSuccSymbol(); if (succSymbol != 0 && succSymbol->isNat(a)) { const mpz_class& wantedIndex = succSymbol->getNat(a); DebugAdvisory("currentIndex = " << currentIndex << " wantedIndex = " << wantedIndex); if (wantedIndex < currentIndex) { currentIndex = 0; currentState.seed(globalSeed); randomNumber = currentState(); } while (currentIndex < wantedIndex) { ++currentIndex; randomNumber = currentState(); } return succSymbol->rewriteToNat(subject, context, randomNumber); } // // NumberOpSymbol doesn't know how to deal with this. // return FreeSymbol::eqRewrite(subject, context); } Maude-Maude3.2/src/BuiltIn/randomOpSymbol.hh000066400000000000000000000032761420036611000210110ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 2021 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for symbols for built in operations on numbers. // #ifndef _randomOpSymbol_hh_ #define _randomOpSymbol_hh_ #include "numberOpSymbol.hh" #include class RandomOpSymbol : public NumberOpSymbol { public: RandomOpSymbol(int id); bool attachData(const Vector& opDeclaration, const char* purpose, const Vector& data); void getDataAttachments(const Vector& opDeclaration, Vector& purposes, Vector >& data); bool eqRewrite(DagNode* subject, RewritingContext& context); static void setGlobalSeed(mt19937::result_type value); private: static mt19937::result_type globalSeed; mpz_class currentIndex; mt19937 currentState; mt19937::result_type randomNumber; }; inline void RandomOpSymbol::setGlobalSeed(mt19937::result_type value) { globalSeed = value; } #endif Maude-Maude3.2/src/BuiltIn/sortTestSymbol.cc000066400000000000000000000052561420036611000210470ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class SortTestSymbol. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "freeTheory.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" #include "term.hh" // core class definitions #include "argumentIterator.hh" #include "rewritingContext.hh" // free theory class definitions #include "freeDagNode.hh" // built in class definitions #include "sortTestSymbol.hh" const Vector& SortTestSymbol::makeLazyStrategy() { static Vector lazyStrategy; if (lazyStrategy.length() == 0) lazyStrategy.append(0); return lazyStrategy; } SortTestSymbol::SortTestSymbol(int id, Sort* testSort, FreeSymbol* leq, FreeSymbol* nleq, bool eager) : FreeSymbol(id, 1, eager ? standard : makeLazyStrategy()) { cmpSort = testSort; leqResult = leq; notLeqResult = nleq; eagerFlag = eager; } bool SortTestSymbol::eqRewrite(DagNode* subject, RewritingContext& context) { Assert(this == subject->symbol(), "bad symbol"); DagNode *t = static_cast(subject)->getArgument(0); if (eagerFlag) t->reduce(context); else t->computeTrueSort(context); t->symbol()->constrainToExactSort(t, context); // HACK FreeSymbol* result = (t->leq(cmpSort)) ? leqResult : notLeqResult; bool trace = RewritingContext::getTraceStatus(); if (trace) { context.tracePreEqRewrite(subject, 0, RewritingContext::BUILTIN); if (context.traceAbort()) return false; } (void) new(subject) FreeDagNode(result); context.incrementEqCount(); if (trace) context.tracePostEqRewrite(subject); return true; } bool SortTestSymbol::acceptEquation(Equation* /* equation */) { return false; } void SortTestSymbol::compileEquations() { } Maude-Maude3.2/src/BuiltIn/sortTestSymbol.hh000066400000000000000000000032321420036611000210510ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for symbols for built in sort test operations. // #ifndef _sortTestSymbol_hh_ #define _sortTestSymbol_hh_ #include "freeSymbol.hh" class SortTestSymbol : public FreeSymbol { public: SortTestSymbol(int id, Sort* testSort, FreeSymbol* leq, FreeSymbol* nleq, bool eager); bool eqRewrite(DagNode* subject, RewritingContext& context); bool eager() const; const Sort* sort() const; // // We don't accept or compile any equations. // bool acceptEquation(Equation* equation); void compileEquations(); private: static const Vector& makeLazyStrategy(); Sort* cmpSort; FreeSymbol* leqResult; FreeSymbol* notLeqResult; bool eagerFlag; }; inline bool SortTestSymbol::eager() const { return eagerFlag; } inline const Sort* SortTestSymbol::sort() const { return cmpSort; } #endif Maude-Maude3.2/src/BuiltIn/stringDagNode.cc000077500000000000000000000044261420036611000205630ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class StringDagNode. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "NA_Theory.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" // built in class definitions #include "stringSymbol.hh" #include "stringDagNode.hh" StringDagNode::StringDagNode(StringSymbol* symbol, const Rope& value) : NA_DagNode(symbol), value(value) { Assert(sizeof(Rope) <= DagNode::nrWords * sizeof(MachineWord), "Rope too big for internal storage"); setCallDtor(); // need our dtor called when garbage collected to destruct Rope } size_t StringDagNode::getHashValue() { int hashValue = 0; for (Rope::const_iterator i(value.begin()); i != value.end(); ++i) hashValue = (hashValue << 1) + *i; return hash(symbol()->getHashValue(), hashValue); } int StringDagNode::compareArguments(const DagNode* other) const { return value.compare(static_cast(other)->value); } void StringDagNode::overwriteWithClone(DagNode* old) { StringDagNode* d = new(old) StringDagNode(safeCast(StringSymbol*, symbol()), value); d->copySetRewritingFlags(this); d->setSortIndex(getSortIndex()); } DagNode* StringDagNode::makeClone() { StringDagNode* d = new StringDagNode(safeCast(StringSymbol*, symbol()), value); d->copySetRewritingFlags(this); d->setSortIndex(getSortIndex()); return d; } Maude-Maude3.2/src/BuiltIn/stringDagNode.hh000077500000000000000000000026451420036611000205760ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for dag nodes containing strings. // #ifndef _stringDagNode_hh_ #define _stringDagNode_hh_ #include "rope.hh" #include "NA_DagNode.hh" class StringDagNode : public NA_DagNode { public: StringDagNode(StringSymbol* symbol, const Rope& value); size_t getHashValue(); int compareArguments(const DagNode* other) const; void overwriteWithClone(DagNode* old); DagNode* makeClone(); const Rope& getValue() const; private: const Rope value; // assume that sizeof(Rope) <= DagNode::nrWords }; inline const Rope& StringDagNode::getValue() const { return value; } #endif Maude-Maude3.2/src/BuiltIn/stringOpSymbol.cc000077500000000000000000000446231420036611000210310ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class StringOpSymbol. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "freeTheory.hh" #include "NA_Theory.hh" #include "builtIn.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" #include "term.hh" // core class definitions #include "rewritingContext.hh" #include "symbolMap.hh" // free theory class definitions #include "freeNet.hh" #include "freeDagNode.hh" // built in class definitions #include "floatSymbol.hh" #include "floatDagNode.hh" #include "succSymbol.hh" #include "minusSymbol.hh" #include "divisionSymbol.hh" #include "stringSymbol.hh" #include "stringDagNode.hh" #include "stringOpSymbol.hh" #include "bindingMacros.hh" StringOpSymbol::StringOpSymbol(int id, int arity) : FreeSymbol(id, arity) { op = NONE; stringSymbol = 0; succSymbol = 0; minusSymbol = 0; divisionSymbol = 0; floatSymbol = 0; decFloatSymbol = 0; } bool StringOpSymbol::attachData(const Vector& opDeclaration, const char* purpose, const Vector& data) { BIND_OP(purpose, StringOpSymbol, op, data); return FreeSymbol::attachData(opDeclaration, purpose, data); } bool StringOpSymbol::attachSymbol(const char* purpose, Symbol* symbol) { BIND_SYMBOL(purpose, symbol, stringSymbol, StringSymbol*); BIND_SYMBOL(purpose, symbol, succSymbol, SuccSymbol*); BIND_SYMBOL(purpose, symbol, minusSymbol, MinusSymbol*); BIND_SYMBOL(purpose, symbol, divisionSymbol, DivisionSymbol*); BIND_SYMBOL(purpose, symbol, floatSymbol, FloatSymbol*); BIND_SYMBOL(purpose, symbol, decFloatSymbol, Symbol*); return FreeSymbol::attachSymbol(purpose, symbol); } bool StringOpSymbol::attachTerm(const char* purpose, Term* term) { BIND_TERM(purpose, term, trueTerm); BIND_TERM(purpose, term, falseTerm); BIND_TERM(purpose, term, notFoundTerm); return FreeSymbol::attachTerm(purpose, term); } void StringOpSymbol::copyAttachments(Symbol* original, SymbolMap* map) { StringOpSymbol* orig = safeCast(StringOpSymbol*, original); op = orig->op; COPY_SYMBOL(orig, stringSymbol, map, StringSymbol*); COPY_SYMBOL(orig, succSymbol, map, SuccSymbol*); COPY_SYMBOL(orig, minusSymbol, map, MinusSymbol*); COPY_SYMBOL(orig, divisionSymbol, map, DivisionSymbol*); COPY_SYMBOL(orig, floatSymbol, map, FloatSymbol*); COPY_SYMBOL(orig, decFloatSymbol, map, Symbol*); COPY_TERM(orig, trueTerm, map); COPY_TERM(orig, falseTerm, map); COPY_TERM(orig, notFoundTerm, map); FreeSymbol::copyAttachments(original, map); } void StringOpSymbol::getDataAttachments(const Vector& opDeclaration, Vector& purposes, Vector >& data) { int nrDataAttachments = purposes.length(); purposes.resize(nrDataAttachments + 1); purposes[nrDataAttachments] = "StringOpSymbol"; data.resize(nrDataAttachments + 1); data[nrDataAttachments].resize(1); const char*& d = data[nrDataAttachments][0]; switch (op) { CODE_CASE(d, 'f', 'l', "float") CODE_CASE(d, 'l', 'e', "length") CODE_CASE(d, 'a', 's', "ascii") CODE_CASE(d, 'u', 'p', "upperCase") CODE_CASE(d, 'l', 'o', "lowerCase") CODE_CASE(d, '+', 0, "+") CODE_CASE(d, '<', 0, "<") CODE_CASE(d, '<', '=', "<=") CODE_CASE(d, '>', 0, ">") CODE_CASE(d, '>', '=', ">=") CODE_CASE(d, 'r', 'a', "rat") CODE_CASE(d, 's', 'u', "substr") CODE_CASE(d, 'f', 'i', "find") CODE_CASE(d, 'r', 'f', "rfind") CODE_CASE(d, 's', 't', "string") CODE_CASE(d, 'd', 'e', "decFloat") CODE_CASE(d, 'c', 'h', "char") default: CantHappen("bad string op"); } FreeSymbol::getDataAttachments(opDeclaration, purposes, data); } void StringOpSymbol::getSymbolAttachments(Vector& purposes, Vector& symbols) { APPEND_SYMBOL(purposes, symbols, stringSymbol); APPEND_SYMBOL(purposes, symbols, succSymbol); APPEND_SYMBOL(purposes, symbols, minusSymbol); APPEND_SYMBOL(purposes, symbols, divisionSymbol); APPEND_SYMBOL(purposes, symbols, floatSymbol); APPEND_SYMBOL(purposes, symbols, decFloatSymbol); FreeSymbol::getSymbolAttachments(purposes, symbols); } void StringOpSymbol::getTermAttachments(Vector& purposes, Vector& terms) { APPEND_TERM(purposes, terms, trueTerm); APPEND_TERM(purposes, terms, falseTerm); APPEND_TERM(purposes, terms, notFoundTerm); FreeSymbol::getTermAttachments(purposes, terms); } void StringOpSymbol::postInterSymbolPass() { PREPARE_TERM(trueTerm); PREPARE_TERM(falseTerm); PREPARE_TERM(notFoundTerm); } void StringOpSymbol::reset() { trueTerm.reset(); // so true dag can be garbage collected falseTerm.reset(); // so false dag can be garbage collected notFoundTerm.reset(); // so notFound dag can be garbage collected FreeSymbol::reset(); // parents reset() tasks } bool StringOpSymbol::eqRewrite(DagNode* subject, RewritingContext& context) { Assert(this == subject->symbol(), "bad symbol"); DebugAdvisory("StringOpSymbol::eqRewrite() called on " << subject); int nrArgs = arity(); FreeDagNode* d = safeCast(FreeDagNode*, subject); // // Evaluate our arguments. // for (int i = 0; i < nrArgs; i++) { DagNode* a = d->getArgument(i); a->reduce(context); } DagNode* a0 = d->getArgument(0); if (a0->symbol() == stringSymbol) { const Rope& left = safeCast(StringDagNode*, a0)->getValue(); switch (nrArgs) { case 1: { mpz_class r; switch (op) { case CODE('f', 'l'): { bool error; char* flStr = left.makeZeroTerminatedString(); double fl = stringToDouble(flStr, error); delete [] flStr; if (error) goto fail; return floatSymbol->rewriteToFloat(subject, context, fl); } case CODE('l', 'e'): // length { r = left.length(); break; } case CODE('a', 's'): // acsii { if (left.length() != 1) goto fail; r = static_cast(left[0]); break; } case CODE('u', 'p'): // upperCase { Rope result = upperCase(left); return rewriteToString(subject, context, result); } case CODE('l', 'o'): // lowerCase { Rope result = lowerCase(left); return rewriteToString(subject, context, result); } default: CantHappen("bad string op"); } return succSymbol->rewriteToNat(subject, context, r); } case 2: { DagNode* a1 = d->getArgument(1); if (a1->symbol() == stringSymbol) { const Rope& right = safeCast(StringDagNode*, a1)->getValue(); bool r; switch (op) { case '+': { Rope t(left); t += right; return rewriteToString(subject, context, t); } case '<': r = left < right; break; case '>': r = left > right; break; case CODE('<', '='): r = left <= right; break; case CODE('>', '='): r = left >= right; break; default: CantHappen("bad string op"); r = false; // avoid compiler warning } Assert(trueTerm.getTerm() != 0 && falseTerm.getTerm() != 0, "null true/false for relational op"); return context.builtInReplace(subject, r ? trueTerm.getDag() : falseTerm.getDag()); } else if (op == CODE('r', 'a')) { DebugAdvisory("StringOpSymbol::eqRewrite() entered rat case for " << subject); DagNode* a1 = d->getArgument(1); Assert(succSymbol != 0, "succSymbol undefined"); if (succSymbol->isNat(a1)) { const mpz_class& n1 = succSymbol->getNat(a1); if (n1 >= 2 && n1 <= 36) { mpz_class numerator; mpz_class denominator; if (ropeToNumber(left, n1.get_si(), numerator, denominator)) { DagNode* r; if (denominator == 0) { if (numerator >= 0) return succSymbol->rewriteToNat(subject, context, numerator); r = minusSymbol->makeNegDag(numerator); } else r = divisionSymbol->makeRatDag(numerator, denominator); return context.builtInReplace(subject, r); } else DebugAdvisory("StringOpSymbol::eqRewrite() rope to number failed " << subject); } else DebugAdvisory("StringOpSymbol::eqRewrite() a1 out of range " << subject); } else DebugAdvisory("StringOpSymbol::eqRewrite() a1 not a nat " << subject); DebugAdvisory("StringOpSymbol::eqRewrite() failed to rewrite " << subject); } break; } case 3: { switch (op) { case CODE('s', 'u'): // substr { DagNode* a1 = d->getArgument(1); DagNode* a2 = d->getArgument(2); Assert(succSymbol != 0, "succSymbol undefined"); if (succSymbol->isNat(a1) && succSymbol->isNat(a2)) { const mpz_class& n1 = succSymbol->getNat(a1); Uint index = n1.fits_uint_p() ? n1.get_ui() : UINT_MAX; const mpz_class& n2 = succSymbol->getNat(a2); Uint length = n2.fits_uint_p() ? n2.get_ui() : UINT_MAX; return rewriteToString(subject, context, substring(left, index, length)); } break; } default: { DagNode* a1 = d->getArgument(1); if (a1->symbol() == stringSymbol) { const Rope& pattern = safeCast(StringDagNode*, a1)->getValue(); DagNode* a2 = d->getArgument(2); Assert(succSymbol != 0, "succSymbol undefined"); if (succSymbol->isNat(a2)) { const mpz_class& n2 = succSymbol->getNat(a2); Uint index = n2.fits_uint_p() ? n2.get_ui() : UINT_MAX; int r; switch (op) { case CODE('f', 'i'): // find r = fwdFind(left, pattern, index); break; case CODE('r', 'f'): // rfind r = revFind(left, pattern, index); break; default: CantHappen("bad string op"); r = 0; // avoid compiler warning } Assert(notFoundTerm.getTerm() != 0, "null notFound for find op"); if (r == NONE) return context.builtInReplace(subject, notFoundTerm.getDag()); return succSymbol->rewriteToNat(subject, context, r); } } break; } } } } } else if (a0->symbol() == floatSymbol) { if (nrArgs == 1 && op == CODE('s', 't')) { double fl = safeCast(FloatDagNode*, a0)->getValue(); return rewriteToString(subject, context, doubleToString(fl)); } else if (nrArgs == 2 && op == CODE('d', 'e')) { DagNode* a1 = d->getArgument(1); Assert(succSymbol != 0, "succSymbol undefined"); Assert(minusSymbol != 0, "minusSymbol undefined"); if (succSymbol->isNat(a1)) { double fl = safeCast(FloatDagNode*, a0)->getValue(); const mpz_class& n1 = succSymbol->getNat(a1); int nrDigits = (n1 < MAX_FLOAT_DIGITS) ? n1.get_si() : MAX_FLOAT_DIGITS; char buffer[MAX_FLOAT_DIGITS + 1]; int decPt; int sign; correctEcvt(fl, nrDigits, buffer, decPt, sign); Vector args(0, 3); args.append((sign < 0) ? minusSymbol->makeNegDag(sign) : succSymbol->makeNatDag(sign)); args.append(new StringDagNode(stringSymbol, buffer)); args.append((decPt < 0) ? minusSymbol->makeNegDag(decPt) : succSymbol->makeNatDag(decPt)); return context.builtInReplace(subject, decFloatSymbol->makeDagNode(args)); } } } else if (op == CODE('s', 't') && nrArgs == 2) { DagNode* a1 = d->getArgument(1); Assert(succSymbol != 0, "succSymbol undefined"); if (succSymbol->isNat(a1)) { const mpz_class& n1 = succSymbol->getNat(a1); if (n1 >= 2 && n1 <= 36) { int base = n1.get_si(); if (succSymbol->isNat(a0)) { if (succSymbol->isNat(a0)) { char* ts = mpz_get_str(0, base, succSymbol->getNat(a0).get_mpz_t()); Rope tr(ts); free(ts); return rewriteToString(subject, context, tr); } } else if (a0->symbol() == minusSymbol) { if (minusSymbol->isNeg(a0)) { mpz_class result; char* ts = mpz_get_str(0, base, minusSymbol->getNeg(a0, result).get_mpz_t()); Rope tr(ts); free(ts); return rewriteToString(subject, context, tr); } } else if (a0->symbol() == divisionSymbol) { if (divisionSymbol->isRat(a0)) { mpz_class numerator; const mpz_class& denomenator = divisionSymbol->getRat(a0, numerator); char* ns = mpz_get_str(0, base, numerator.get_mpz_t()); Rope tr(ns); free(ns); tr += '/'; char* ds = mpz_get_str(0, base, denomenator.get_mpz_t()); tr += ds; free(ds); return rewriteToString(subject, context, tr); } } } } } else { switch (op) { case CODE('c', 'h'): // char { DagNode* a0 = d->getArgument(0); Assert(succSymbol != 0, "succSymbol undefined"); if (succSymbol->isNat(a0)) { const mpz_class& n0 = succSymbol->getNat(a0); if (n0 <= 255) { char c = n0.get_si(); return rewriteToString(subject, context, Rope(c)); } } break; } default: ; // Can get here if args are bad } } fail: return FreeSymbol::eqRewrite(subject, context); } bool StringOpSymbol::rewriteToString(DagNode* subject, RewritingContext& context, const Rope& result) { bool trace = RewritingContext::getTraceStatus(); if (trace) { context.tracePreEqRewrite(subject, 0, RewritingContext::BUILTIN); if (context.traceAbort()) return false; } (void) new(subject) StringDagNode(stringSymbol, result); context.incrementEqCount(); if (trace) context.tracePostEqRewrite(subject); return true; } Rope StringOpSymbol::substring(const Rope& subject, Rope::size_type index, Rope::size_type length) { Rope::size_type sLen = subject.length(); // if (index < 0) // { // if (length > 0) // length += index; // index = 0; // } if (length == 0 || index >= sLen) return Rope(); if (length > sLen - index) length = sLen - index; return subject.substr(index, length); } int StringOpSymbol::fwdFind(const Rope& subject, const Rope& pattern, Rope::size_type start) { Rope::size_type sLen = subject.length(); if (pattern.empty()) return (start <= sLen) ? static_cast(start) : NONE; // // Testing start < sLen is important because otherwise 2nd test // could succeed by wrap around. // if (start < sLen && start + pattern.length() <= sLen) { Rope::const_iterator b(subject.begin()); Rope::const_iterator e(subject.end()); Rope::const_iterator p(search(b + start, e, pattern.begin(), pattern.end())); if (p != e) return p - b; } return NONE; } int StringOpSymbol::revFind(const Rope& subject, const Rope& pattern, Rope::size_type start) { Rope::size_type sLen = subject.length(); if (pattern.empty()) return (start <= sLen) ? start : sLen; Rope::size_type pLen = pattern.length(); if (pLen <= sLen) { Rope::size_type reflect = sLen - pLen; // pattern can't start after this since we need pLen characters. if (start > reflect) start = reflect; // // We are going to search the subject from beginning to beginning + start + pLen - 1 Rope::const_iterator b(subject.begin()); Rope::const_iterator e(b + (start + pLen)); Rope::const_iterator p = find_end(b, e, pattern.begin(), pattern.end()); if (p != e) return p - b; } return NONE; } bool StringOpSymbol::ropeToNumber(const Rope& subject, int base, mpz_class& numerator, mpz_class& denominator) { int len = subject.length(); if (len == 0) return false; int i = 0; if (subject[i] == '-') { if (len == 1) return false; ++i; } char c = subject[i]; if (!isalnum(c) || (c == '0' && len > 1)) return false; for (i++; i < len; i++) { char c = subject[i]; if (!isalnum(c)) { if (c == '/') { int j = i + 1; if (j == len || subject[j] == '0') return false; for (; j < len; j++) { if (!isalnum(subject[j])) return false; } // // We have detected a fraction form. // char* numStr = subject.substr(0, i).makeZeroTerminatedString(); char* denomStr = subject.substr(i + 1, len - (i + 1)).makeZeroTerminatedString(); bool result = (mpz_set_str(denominator.get_mpz_t(), denomStr, base) == 0 && mpz_set_str(numerator.get_mpz_t(), numStr, base) == 0); delete [] numStr; delete [] denomStr; return result; } else return false; } } // // We have a regular integer form. // denominator = 0; char* numStr = subject.makeZeroTerminatedString(); bool result = (mpz_set_str(numerator.get_mpz_t(), numStr, base) == 0); delete [] numStr; return result; } Rope StringOpSymbol::upperCase(const Rope& subject) { Rope::const_iterator b(subject.begin()); Rope::const_iterator e(subject.end()); for (Rope::const_iterator i(b); i != e; ++i) { char c = *i; if (islower(c)) { // // At least one lower-case character exists - need to convert. // Rope result(subject.substr(0, i - b)); // characters before *i result += toupper(c); for (++i; i != e; ++i) result += toupper(*i); return result; } } return subject; // no lower-case characters to convert } Rope StringOpSymbol::lowerCase(const Rope& subject) { Rope::const_iterator b(subject.begin()); Rope::const_iterator e(subject.end()); for (Rope::const_iterator i(b); i != e; ++i) { char c = *i; if (isupper(c)) { // // At least one upper-case character exists - need to convert. // Rope result(subject.substr(0, i - b)); // characters before *i result += tolower(c); for (++i; i != e; ++i) result += tolower(*i); return result; } } return subject; // no lower-case characters to convert } Maude-Maude3.2/src/BuiltIn/stringOpSymbol.hh000077500000000000000000000057601420036611000210420ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for symbols for built in operations on strings. // #ifndef _stringOpSymbol_hh_ #define _stringOpSymbol_hh_ #include "rope.hh" #include "freeSymbol.hh" #include "cachedDag.hh" class StringOpSymbol : public FreeSymbol { public: StringOpSymbol(int id, int arity); bool attachData(const Vector& opDeclaration, const char* purpose, const Vector& data); bool attachSymbol(const char* purpose, Symbol* symbol); bool attachTerm(const char* purpose, Term* term); void copyAttachments(Symbol* original, SymbolMap* map); void getDataAttachments(const Vector& opDeclaration, Vector& purposes, Vector >& data); void getSymbolAttachments(Vector& purposes, Vector& symbols); void getTermAttachments(Vector& purposes, Vector& terms); bool eqRewrite(DagNode* subject, RewritingContext& context); void postInterSymbolPass(); void reset(); private: enum { // // Tha actual maximum number of significant digits in the exact // decimal represention of a IEEE-754 double is hard to calculate // but must be < 1074 since there can be at most 1074 binary places // and with 1074 binary places the first multiplications will produce // leading zeros. // MAX_FLOAT_DIGITS = 1074 }; bool rewriteToString(DagNode* subject, RewritingContext& context, const Rope& result); static bool ropeToNumber(const Rope& subject, int base, mpz_class& numerator, mpz_class& denominator); static Rope substring(const Rope& subject, Rope::size_type index, Rope::size_type length); static int fwdFind(const Rope& subject, const Rope& pattern, Rope::size_type start); static int revFind(const Rope& subject, const Rope& pattern, Rope::size_type start); static Rope upperCase(const Rope& subject); static Rope lowerCase(const Rope& subject); int op; StringSymbol* stringSymbol; SuccSymbol* succSymbol; MinusSymbol* minusSymbol; DivisionSymbol* divisionSymbol; FloatSymbol* floatSymbol; Symbol* decFloatSymbol; CachedDag trueTerm; CachedDag falseTerm; CachedDag notFoundTerm; }; #endif Maude-Maude3.2/src/BuiltIn/stringSymbol.cc000066400000000000000000000046271420036611000205270ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class StringSymbol. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "NA_Theory.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" #include "term.hh" // built in class definitions #include "stringSymbol.hh" #include "stringTerm.hh" #include "stringDagNode.hh" StringSymbol::StringSymbol(int id) : NA_Symbol(id) { sort = 0; charSort = 0; } void StringSymbol::fillInSortInfo(Term* subject) { Sort* s = (static_cast(subject)->getValue().length() == 1) ? charSort : sort; subject->setSortInfo(s->component(), s->index()); } void StringSymbol::computeBaseSort(DagNode* subject) { Sort* s = (static_cast(subject)->getValue().length() == 1) ? charSort : sort; subject->setSortIndex(s->index()); } bool StringSymbol::isConstructor(DagNode* /* subject */) { return true; } void StringSymbol::compileOpDeclarations() { const Vector& opDecls = getOpDeclarations(); int nrOpDecls = opDecls.length(); for (int i = 0; i < nrOpDecls; i++) { Sort* s = opDecls[i].getDomainAndRange()[0]; if (sort == 0 || s->index() < sort->index()) sort = s; // set sort to largest (smallest index) declared sort if (charSort == 0 || s->index() > charSort->index()) charSort = s; // set charSort to smallest (largest index) declared sort } } Term* StringSymbol::termify(DagNode* dagNode) { return new StringTerm(this, safeCast(StringDagNode*, dagNode)->getValue()); } Maude-Maude3.2/src/BuiltIn/stringSymbol.hh000066400000000000000000000023741420036611000205360ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for string symbols. // #ifndef _stringSymbol_hh_ #define _stringSymbol_hh_ #include "NA_Symbol.hh" class StringSymbol : public NA_Symbol { public: StringSymbol(int id); void fillInSortInfo(Term* subject); void computeBaseSort(DagNode* subject); bool isConstructor(DagNode* subject); void compileOpDeclarations(); Term* termify(DagNode* dagNode); private: Sort* sort; Sort* charSort; }; #endif Maude-Maude3.2/src/BuiltIn/stringTerm.cc000077500000000000000000000051101420036611000201600ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class StringTerm // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "NA_Theory.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" #include "term.hh" // core class definitions #include "symbolMap.hh" // built in class definitions #include "stringSymbol.hh" #include "stringTerm.hh" #include "stringDagNode.hh" StringTerm::StringTerm(StringSymbol* symbol, const Rope& value) : NA_Term(symbol), value(value) { } Term* StringTerm::deepCopy2(SymbolMap* map) const { return new StringTerm(static_cast(map == 0 ? symbol() : map->translate(symbol())), value); } Term* StringTerm::instantiate2(const Vector& varBindings, SymbolMap* translator) { return new StringTerm(safeCast(StringSymbol*, translator->findTargetVersionOfSymbol(symbol())), value); } Term* StringTerm::normalize(bool /* full */, bool& changed) { changed = false; int hashValue = 0; for (Rope::const_iterator i(value.begin()); i != value.end(); ++i) hashValue = (hashValue << 1) + *i; setHashValue(hash(symbol()->getHashValue(), hashValue)); return this; } int StringTerm::compareArguments(const Term* other) const { return value.compare(static_cast(other)->value); } int StringTerm::compareArguments(const DagNode* other) const { return value.compare(static_cast(other)->getValue()); } void StringTerm::overwriteWithDagNode(DagNode* old) const { (void) new(old) StringDagNode(static_cast(symbol()), value); } NA_DagNode* StringTerm::makeDagNode() const { return new StringDagNode(static_cast(symbol()), value); } Maude-Maude3.2/src/BuiltIn/stringTerm.hh000077500000000000000000000031371420036611000202010ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for terms containing strings. // #ifndef _stringTerm_hh_ #define _stringTerm_hh_ #include "rope.hh" #include "NA_Term.hh" class StringTerm : public NA_Term { public: StringTerm(StringSymbol* symbol, const Rope& value); Term* deepCopy2(SymbolMap* map) const; Term* normalize(bool full, bool& changed); int compareArguments(const Term* other) const; int compareArguments(const DagNode* other) const; void overwriteWithDagNode(DagNode* old) const; NA_DagNode* makeDagNode() const; // // Needed because we have hidden data. // Term* instantiate2(const Vector& varBindings, SymbolMap* translator); const Rope& getValue() const; private: const Rope value; }; inline const Rope& StringTerm::getValue() const { return value; } #endif Maude-Maude3.2/src/BuiltIn/succSymbol.cc000066400000000000000000000136261420036611000201550ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class SuccSymbol. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "freeTheory.hh" #include "S_Theory.hh" // interface class definitions #include "term.hh" // core class definitions #include "rewritingContext.hh" #include "symbolMap.hh" // S theory class definitions #include "S_Symbol.hh" #include "S_DagNode.hh" #include "S_Term.hh" // built in stuff #include "bindingMacros.hh" #include "succSymbol.hh" SuccSymbol::SuccSymbol(int id) : S_Symbol(id) { } bool SuccSymbol::attachData(const Vector& opDeclaration, const char* purpose, const Vector& data) { NULL_DATA(purpose, SuccSymbol, data); return S_Symbol::attachData(opDeclaration, purpose, data); } bool SuccSymbol::attachTerm(const char* purpose, Term* term) { BIND_TERM(purpose, term, zeroTerm); return S_Symbol::attachTerm(purpose, term); } void SuccSymbol::copyAttachments(Symbol* original, SymbolMap* map) { SuccSymbol* orig = safeCast(SuccSymbol*, original); COPY_TERM(orig, zeroTerm, map); S_Symbol::copyAttachments(original, map); } void SuccSymbol::getDataAttachments(const Vector& opDeclaration, Vector& purposes, Vector >& data) { APPEND_DATA(purposes, data, SuccSymbol); S_Symbol::getDataAttachments(opDeclaration, purposes, data); } void SuccSymbol::getTermAttachments(Vector& purposes, Vector& terms) { APPEND_TERM(purposes, terms, zeroTerm); S_Symbol::getTermAttachments(purposes, terms); } void SuccSymbol::postInterSymbolPass() { PREPARE_TERM(zeroTerm); } void SuccSymbol::reset() { zeroTerm.reset(); // so zero dag can be garbage collected S_Symbol::reset(); // parents reset() tasks } Term* SuccSymbol::makeNatTerm(const mpz_class& nat) { Assert(zeroTerm.getTerm() != 0, "zero not defined for " << this); Term* zero = zeroTerm.getTerm()->deepCopy(); return (nat == 0) ? zero : (new S_Term(this, nat, zero)); } DagNode* SuccSymbol::makeNatDag(const mpz_class& nat) { Assert(zeroTerm.getTerm() != 0, "zero not defined"); DagNode* zero = zeroTerm.getDag(); return (nat == 0) ? zero : (new S_DagNode(this, nat, zero)); } bool SuccSymbol::isNat(const Term* term) const { const Symbol* s = term->symbol(); return zeroTerm.getTerm()-> equal((s != this) ? term : safeCast(const S_Term*, term)->getArgument()); } bool SuccSymbol::isNat(const DagNode* dagNode) const { const Symbol* s = dagNode->symbol(); return zeroTerm.getTerm()-> equal((s != this) ? dagNode : safeCast(const S_DagNode*, dagNode)->getArgument()); } const mpz_class& SuccSymbol::getNat(const Term* term) const { static mpz_class zero(0); const Symbol* s = term->symbol(); if (s != this) { Assert(zeroTerm.getTerm()->equal(term), "not a nat"); return zero; } const S_Term* st = safeCast(const S_Term*, term); Assert(zeroTerm.getTerm()->equal(st->getArgument()), "arg not zero"); return st->getNumber(); } const mpz_class& SuccSymbol::getNat(const DagNode* dagNode) const { static mpz_class zero(0); const Symbol* s = dagNode->symbol(); if (s != this) { Assert(zeroTerm.getTerm()->equal(dagNode), "not a nat"); return zero; } const S_DagNode* sd = safeCast(const S_DagNode*, dagNode); Assert(zeroTerm.getTerm()->equal(sd->getArgument()), "arg not zero"); return sd->getNumber(); } bool SuccSymbol::getSignedInt(const DagNode* dagNode, int& value) const { if (isNat(dagNode)) { const mpz_class& n = getNat(dagNode); if (n.fits_sint_p()) { value = n.get_si(); return true; } } return false; } bool SuccSymbol::getSignedInt64(const DagNode* dagNode, Int64& value) const { if (isNat(dagNode)) { const mpz_class& n = getNat(dagNode); mpz_class u = n >> BITS_PER_UINT; if (u.fits_sint_p()) { value = u.get_si(); value <<= BITS_PER_UINT; value |= n.get_ui(); return true; } } return false; } bool SuccSymbol::getScaledSignedInt64(const DagNode* dagNode, const mpz_class& scaleFactor, Int64& value) const { if (isNat(dagNode)) { mpz_class n(getNat(dagNode)); n /= scaleFactor; // round down mpz_class u = n >> BITS_PER_UINT; if (u.fits_sint_p()) { value = u.get_si(); value <<= BITS_PER_UINT; value |= n.get_ui(); return true; } } return false; } bool SuccSymbol::rewriteToNat(DagNode* subject, RewritingContext& context, const mpz_class& result) { Assert(result >= 0, "-ve"); Assert(zeroTerm.getTerm() != 0, "zero not defined"); DagNode* zero = zeroTerm.getDag(); if (result == 0) return context.builtInReplace(subject, zero); bool trace = RewritingContext::getTraceStatus(); if (trace) { context.tracePreEqRewrite(subject, 0, RewritingContext::BUILTIN); if (context.traceAbort()) return false; } (void) new(subject) S_DagNode(this, result, zero); context.incrementEqCount(); if (trace) context.tracePostEqRewrite(subject); return true; } Maude-Maude3.2/src/BuiltIn/succSymbol.hh000066400000000000000000000051211420036611000201560ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for symbols for successor operation. // #ifndef _succSymbol_hh_ #define _succSymbol_hh_ #include #include "S_Symbol.hh" #include "cachedDag.hh" class SuccSymbol : public S_Symbol { public: SuccSymbol(int id); bool attachData(const Vector& opDeclaration, const char* purpose, const Vector& data); bool attachTerm(const char* purpose, Term* term); void copyAttachments(Symbol* original, SymbolMap* map); void getDataAttachments(const Vector& opDeclaration, Vector& purposes, Vector >& data); void getTermAttachments(Vector& purposes, Vector& terms); void postInterSymbolPass(); void reset(); #if SIZEOF_LONG < 8 DagNode* makeNatDag(Int64 nat) { mpz_class bigNat; mpz_import(bigNat.get_mpz_t(), 1, 1, sizeof(nat), 0, 0, &nat); return makeNatDag(bigNat); } #endif // // Functions special to SuccSymbol. // Term* makeNatTerm(const mpz_class& nat); DagNode* makeNatDag(const mpz_class& nat); bool isNat(const Term* term) const; bool isNat(const DagNode* dagNode) const; const mpz_class& getNat(const Term* term) const; const mpz_class& getNat(const DagNode* dagNode) const; bool getSignedInt(const DagNode* dagNode, int& value) const; bool getSignedInt64(const DagNode* dagNode, Int64& value) const; bool rewriteToNat(DagNode* subject, RewritingContext& context, const mpz_class& result); // // In case the number won't fill in an Int64 but a scaled version will // so we do the scaling before converting. Scaling always rounds down. // bool getScaledSignedInt64(const DagNode* dagNode, const mpz_class& scaleFactor, Int64& value) const; private: CachedDag zeroTerm; }; #endif Maude-Maude3.2/src/CUI_Theory/000077500000000000000000000000001420036611000161175ustar00rootroot00000000000000Maude-Maude3.2/src/CUI_Theory/CUI_ArgumentIterator.cc000066400000000000000000000025461420036611000224310ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class CUI_ArgumentIterator. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" // CUI theory class definitions #include "CUI_ArgumentIterator.hh" bool CUI_ArgumentIterator::valid() const { return position < 2; } Term* CUI_ArgumentIterator::argument() const { Assert(position < 2, "no args left"); return argArray[position]; } void CUI_ArgumentIterator::next() { Assert(position < 2, "no args left"); ++position; } Maude-Maude3.2/src/CUI_Theory/CUI_ArgumentIterator.hh000066400000000000000000000025551420036611000224430ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for argument iterator for CUI terms. // #ifndef _CUI_ArgumentIterator_hh_ #define _CUI_ArgumentIterator_hh_ #include "rawArgumentIterator.hh" class CUI_ArgumentIterator : public RawArgumentIterator { public: CUI_ArgumentIterator(const Vector& arguments); bool valid() const; Term* argument() const; void next(); private: const Vector& argArray; int position; }; inline CUI_ArgumentIterator::CUI_ArgumentIterator(const Vector& arguments) : argArray(arguments) { position = 0; } #endif Maude-Maude3.2/src/CUI_Theory/CUI_DagArgumentIterator.cc000066400000000000000000000025571420036611000230470ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class CUI_DagArgumentIterator. // // utility stuff #include "macros.hh" // forward declarations #include "interface.hh" // CUI theory class definitions #include "CUI_DagArgumentIterator.hh" bool CUI_DagArgumentIterator::valid() const { return nrRemaining > 0; } DagNode* CUI_DagArgumentIterator::argument() const { Assert(nrRemaining > 0, "no args left"); return *position; } void CUI_DagArgumentIterator::next() { Assert(nrRemaining > 0, "no args left"); ++position; --nrRemaining; } Maude-Maude3.2/src/CUI_Theory/CUI_DagArgumentIterator.hh000066400000000000000000000025451420036611000230560ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for argument iterator for CUI dag nodes. // #ifndef _CUI_DagArgumentIterator_hh_ #define _CUI_DagArgumentIterator_hh_ #include "rawDagArgumentIterator.hh" class CUI_DagArgumentIterator : public RawDagArgumentIterator { public: CUI_DagArgumentIterator(DagNode** first); bool valid() const; DagNode* argument() const; void next(); private: DagNode** position; int nrRemaining; }; inline CUI_DagArgumentIterator::CUI_DagArgumentIterator(DagNode** first) { position = first; nrRemaining = 2; } #endif Maude-Maude3.2/src/CUI_Theory/CUI_DagNode.cc000077500000000000000000000421741420036611000204420ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2020 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class CUI_DagNode. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "variable.hh" #include "CUI_Theory.hh" // interface class definitions #include "binarySymbol.hh" #include "dagNode.hh" #include "term.hh" #include "rawDagArgumentIterator.hh" #include "lhsAutomaton.hh" #include "rhsAutomaton.hh" #include "subproblem.hh" #include "extensionInfo.hh" // core class definitions #include "substitution.hh" #include "pendingUnificationStack.hh" #include "unificationContext.hh" // variable class definitions #include "variableDagNode.hh" // CUI theory class definitions #include "CUI_Symbol.hh" #include "CUI_DagNode.hh" #include "CUI_DagArgumentIterator.hh" RawDagArgumentIterator* CUI_DagNode::arguments() { return new CUI_DagArgumentIterator(argArray); } size_t CUI_DagNode::getHashValue() { if (isHashValid()) return hashCache; size_t hashValue = hash(hash(symbol()->getHashValue(), argArray[0]->getHashValue()), argArray[1]->getHashValue()); hashCache = hashValue; setHashValid(); return hashValue; } int CUI_DagNode::compareArguments(const DagNode* other) const { const CUI_DagNode* d = static_cast(other); int r = argArray[0]->compare(d->argArray[0]); if (r != 0) return r; return argArray[1]->compare(d->argArray[1]); } DagNode* CUI_DagNode::markArguments() { argArray[0]->mark(); return argArray[1]; } DagNode* CUI_DagNode::copyEagerUptoReduced2() { CUI_Symbol* s = symbol(); CUI_DagNode* n = new CUI_DagNode(s); n->argArray[0] = s->eagerArgument(0) ? argArray[0]->copyEagerUptoReduced() : argArray[0]; n->argArray[1] = s->eagerArgument(1) ? argArray[1]->copyEagerUptoReduced() : argArray[1]; return n; } DagNode* CUI_DagNode::copyAll2() { CUI_Symbol* s = symbol(); CUI_DagNode* n = new CUI_DagNode(s); n->argArray[0] = argArray[0]->copyAll(); n->argArray[1] = argArray[1]->copyAll(); return n; } void CUI_DagNode::clearCopyPointers2() { argArray[0]->clearCopyPointers(); argArray[1]->clearCopyPointers(); } void CUI_DagNode::overwriteWithClone(DagNode* old) { CUI_DagNode* d = new(old) CUI_DagNode(symbol()); d->copySetRewritingFlags(this); d->setSortIndex(getSortIndex()); d->argArray[0] = argArray[0]; d->argArray[1] = argArray[1]; } DagNode* CUI_DagNode::makeClone() { CUI_DagNode* d = new CUI_DagNode(symbol()); d->copySetRewritingFlags(this); d->setSortIndex(getSortIndex()); d->argArray[0] = argArray[0]; d->argArray[1] = argArray[1]; return d; } DagNode* CUI_DagNode::copyWithReplacement(int argIndex, DagNode* replacement) { CUI_DagNode* d = new CUI_DagNode(symbol()); if (argIndex == 0) { d->argArray[0] = replacement; d->argArray[1] = argArray[1]; } else { Assert(argIndex == 1, "bad argument index"); d->argArray[0] = argArray[0]; d->argArray[1] = replacement; } return d; } DagNode* CUI_DagNode::copyWithReplacement(Vector& redexStack, int first, int last) { if (first == last) return copyWithReplacement(redexStack[first].argIndex(), redexStack[first].node()); Assert(first + 1 == last, "nrArgs clash"); CUI_DagNode* d = new CUI_DagNode(symbol()); d->argArray[0] = redexStack[first].node(); d->argArray[1] = redexStack[last].node(); return d; } void CUI_DagNode::collapseTo(int argNr) { DagNode* remaining = (symbol()->eagerArgument(argNr)) ? argArray[argNr] : argArray[argNr]->copyReducible(); remaining->overwriteWithClone(this); } bool CUI_DagNode::normalizeAtTop() { CUI_Symbol* s = symbol(); Term* identity = s->getIdentity(); if (identity != 0) { if (s->leftId() && identity->equal(argArray[0])) { collapseTo(1); return true; } if (s->rightId() && identity->equal(argArray[1])) { collapseTo(0); return true; } } if (s->comm() || s->idem()) { int r = argArray[0]->compare(argArray[1]); if (s->idem() && r == 0) { collapseTo(0); return true; } if (s->comm() && r > 0) { DagNode* t = argArray[0]; argArray[0] = argArray[1]; argArray[1] = t; } } return false; } // // Unification code. // DagNode::ReturnResult CUI_DagNode::computeBaseSortForGroundSubterms(bool warnAboutUnimplemented) { CUI_Symbol* s = symbol(); if (s->idem()) { // // We don't support idempotence at the moment // so let the backstop version handle it. // return DagNode::computeBaseSortForGroundSubterms(warnAboutUnimplemented); } ReturnResult result = GROUND; ReturnResult r0 = argArray[0]->computeBaseSortForGroundSubterms(warnAboutUnimplemented); if (r0 > result) result = r0; ReturnResult r1 = argArray[1]->computeBaseSortForGroundSubterms(warnAboutUnimplemented); if (r1 > result) result = r1; if (result == GROUND) { s->computeBaseSort(this); setGround(); } return result; } bool CUI_DagNode::computeSolvedFormCommutativeCase(CUI_DagNode* rhs, UnificationContext& solution, PendingUnificationStack& pending) { //cout << "commutative case " << this << " =? " << rhs << endl; // // We are have a C symbol and the rhs has the same symbol. // Both dagnodes are assumed to have their arguments sorted in ascending order. Equality // between any two of the four arguments eliminates the need for branching. // DagNode** rhsArgs = rhs->argArray; DagNode* l0 = argArray[0]; DagNode* l1 = argArray[1]; DagNode* r0 = rhsArgs[0]; DagNode* r1 = rhsArgs[1]; // // We know l0 <= l1 and r0 <= r1 because of normal forms. // In the C case we will decide if at least one of the 6 possible equalities holds in // at most 4 comparisons. // int res1 = l0->compare(r0); if (res1 == 0) return l1->computeSolvedForm(r1, solution, pending); if (res1 > 0) { // // Swap unificands to turn > 0 case in to < 0 case. // swap(l0, r0); swap(l1, r1); } // // Now l0 < r0 and r0 <= r1 imlies that l0 < r1. It's still possible that // l1 == r0 or l1 == r1. We try l1 vs r0. // int res2 = l1->compare(r0); if (res2 == 0) return l0->computeSolvedForm(r1, solution, pending); if (res2 < 0) { // // We have l0 <= l1 < r0 <= r1. Check both sides for duplicated arguments. // if (!(l0->equal(l1) || r0->equal(r1))) { // // No equalities so we need to consider two alternatives by pushing // the problem on the stack. // //cout << "pushing" << endl; pending.push(symbol(), this, rhs); return true; } } else { // // We have l0 < r0 < l1 and r0 <= r1, so l1 == r1 is still possible. // int res3 = l1->compare(r1); if (res3 == 0) return l0->computeSolvedForm(r0, solution, pending); if (res3 < 0) { // // We have l0 < r0 < l1 < r1. No equalities possible so we need to consider // two alternatives by pushing the problem on the stack. // //cout << "pushing" << endl; pending.push(symbol(), this, rhs); return true; } else { // // We have l0 < r0 < l1 and r1 < l1. So r0 == r1 is our only possible equality. // if (!(r0->equal(r1))) { // // No equalities possible so we need to consider two alternatives // by pushing the problem on the stack. // //cout << "pushing" << endl; pending.push(symbol(), this, rhs); return true; } } } // // If we got here, we have duplicated arguments in at least one unificand. // We only need to consider a single possibility. // return l0->computeSolvedForm(r0, solution, pending) && l1->computeSolvedForm(r1, solution, pending); } bool CUI_DagNode::computeSolvedForm2(DagNode* rhs, UnificationContext& solution, PendingUnificationStack& pending) { DebugEnter((DagNode*) this << " vs " << rhs); CUI_Symbol* s = symbol(); if (s == rhs->symbol()) { if (s->leftId() || s->rightId()) { // // If we have an identity, we are going to look at all alternatives, so // we push this problem on the pending unification stack. // pending.push(s, this, rhs); return true; } else { // // The pure commutative case is simpler and we have a optimized algorithm. // return computeSolvedFormCommutativeCase(safeCast(CUI_DagNode*, rhs), solution, pending); } } if (VariableDagNode* v = dynamic_cast(rhs)) { // // Get representative variable. // VariableDagNode* r = v->lastVariableInChain(solution); if (DagNode* value = solution.value(r->getIndex())) { // // Variable is bound so make a recursive call to solve the new problem. // /* cout << "bound " << (DagNode*) r << " directly solving " << (DagNode*) r << " =? " << value << endl; */ return computeSolvedForm2(value, solution, pending); } // // We have a unification problem f(u, v) =? X where X unbound. // if (s->leftId() || s->rightId()) { // // Because we could collapse, potentially to a smaller sort, // we consider multiple alternatives. // pending.push(s, this, rhs); } else { // // We need to bind the variable to our purified form. // // We cut a corner here by treating each commutative symbol as its // own theory, and rely on cycle detection to do occurs checks that // pass through multiple symbols. // CUI_DagNode* purified = makePurifiedVersion(solution, pending); //cout << "purified " << this << " to " << purified << endl; //cout << (DagNode*) r << " |-> " << purified << endl; solution.unificationBind(r, purified); } return true; } return pending.resolveTheoryClash(this, rhs); } CUI_DagNode* CUI_DagNode::makePurifiedVersion(UnificationContext& solution, PendingUnificationStack& pending) { CUI_Symbol* s = symbol(); bool needToRebuild = false; DagNode* l0 = argArray[0]; if (dynamic_cast(l0) == 0) // need to purify { VariableDagNode* abstractionVariable = solution.makeFreshVariable(s->domainComponent(0)); // // solution.unificationBind(abstractionVariable, l0) would be unsafe // since l0 might not be pure. // l0->computeSolvedForm(abstractionVariable, solution, pending); l0 = abstractionVariable; needToRebuild = true; } DagNode* l1 = argArray[1]; if (l1->equal(argArray[0])) { // // Both of our arguments were equal so we can use the same // purified form. // l1 = l0; } else { if (dynamic_cast(l1) == 0) // need to purify { VariableDagNode* abstractionVariable = solution.makeFreshVariable(s->domainComponent(1)); // // solution.unificationBind(abstractionVariable, l1) would be unsafe // since l1 might not be pure. // l1->computeSolvedForm(abstractionVariable, solution, pending); l1 = abstractionVariable; needToRebuild = true; } } if (!needToRebuild) { // // Both arguments were already variables so we can leave our // dag unchanged. // return this; } // // Need to rebuild the dag in normal form. // CUI_DagNode* purified = new CUI_DagNode(s); if (s->comm() && l0->compare(l1) > 0) { // // If s is commutative we may need to switch the arguments to // be in theory normal form. // purified->argArray[0] = l1; purified->argArray[1] = l0; } else { purified->argArray[0] = l0; purified->argArray[1] = l1; } return purified; } bool CUI_DagNode::indirectOccursCheck(VariableDagNode* repVar, UnificationContext& solution) { // // See if repVar can be reached by chasing var |-> var and // var |-> our-symbol bindings. repVar must be a representative // variable - it can't be bound to another variable. // Symbol* s = symbol(); { DagNode* arg = argArray[0]; if (VariableDagNode* a = dynamic_cast(arg)) { VariableDagNode* r = a->lastVariableInChain(solution); if (r->equal(repVar)) return true; DagNode* d = solution.value(r->getIndex()); if (d != 0 && d->symbol() == s) { CUI_DagNode* a = safeCast(CUI_DagNode*, d); if (a->indirectOccursCheck(repVar, solution)) return true; } } else if (arg->symbol() == s) { CUI_DagNode* a = safeCast(CUI_DagNode*, arg); if (a->indirectOccursCheck(repVar, solution)) return true; } } { DagNode* arg = argArray[1]; if (VariableDagNode* a = dynamic_cast(arg)) { VariableDagNode* r = a->lastVariableInChain(solution); if (r->equal(repVar)) return true; DagNode* d = solution.value(r->getIndex()); if (d != 0 && d->symbol() == s) { CUI_DagNode* a = safeCast(CUI_DagNode*, d); if (a->indirectOccursCheck(repVar, solution)) return true; } } else if (arg->symbol() == s) { CUI_DagNode* a = safeCast(CUI_DagNode*, arg); if (a->indirectOccursCheck(repVar, solution)) return true; } } return false; } void CUI_DagNode::insertVariables2(NatSet& occurs) { argArray[0]->insertVariables(occurs); argArray[1]->insertVariables(occurs); } DagNode* CUI_DagNode::instantiate2(const Substitution& substitution, bool maintainInvariants) { bool changed = false; DagNode* a0 = argArray[0]; if (DagNode* n = a0->instantiate(substitution, maintainInvariants)) { a0 = n; changed = true; } DagNode* a1 = argArray[1]; if (DagNode* n = a1->instantiate(substitution, maintainInvariants)) { a1 = n; changed = true; } if (changed) { CUI_Symbol* s = symbol(); CUI_DagNode* d = new CUI_DagNode(s); d->argArray[0] = a0; d->argArray[1] = a1; if (maintainInvariants) { // // Need to normalize and if it didn't collapse and is // ground, compute the sort. // if(!(d->normalizeAtTop()) && a0->isGround() && a1->isGround()) { s->computeBaseSort(d); d->setGround(); } } else { if (a0->isGround() && a1->isGround()) d->setGround(); } return d; } return 0; } // // Narrowing code. // bool CUI_DagNode::indexVariables2(NarrowingVariableInfo& indices, int baseIndex) { return argArray[0]->indexVariables(indices, baseIndex) & // always make both calls argArray[1]->indexVariables(indices, baseIndex); } DagNode* CUI_DagNode::instantiateWithReplacement(const Substitution& substitution, const Vector* eagerCopies, int argIndex, DagNode* replacement) { CUI_DagNode* d = new CUI_DagNode(symbol()); int other = 1 - argIndex; d->argArray[argIndex] = replacement; DagNode* n = argArray[other]; DagNode* c = (eagerCopies != 0) && symbol()->eagerArgument(other) ? n->instantiateWithCopies(substitution, *eagerCopies) : n->instantiate(substitution, false); // lazy case - ok to use original unifier bindings since we won't evaluate them if (c != 0) // changed under substitutition n = c; d->argArray[other] = n; return d; } DagNode* CUI_DagNode::instantiateWithCopies2(const Substitution& substitution, const Vector& eagerCopies) { bool changed = false; DagNode* a0 = argArray[0]; { DagNode* n = symbol()->eagerArgument(0) ? a0->instantiateWithCopies(substitution, eagerCopies) : a0->instantiate(substitution, false); if (n != 0) { a0 = n; changed = true; } } DagNode* a1 = argArray[1]; { DagNode* n = symbol()->eagerArgument(1) ? a1->instantiateWithCopies(substitution, eagerCopies) : a1->instantiate(substitution, false); if (n != 0) { a1 = n; changed = true; } } if (changed) { CUI_Symbol* s = symbol(); CUI_DagNode* d = new CUI_DagNode(s); d->argArray[0] = a0; d->argArray[1] = a1; // // Currently the only user of this function is PositionState::rebuildAndInstantiateDag() // via instantiateWithCopies(), SAFE_INSTANTIATE() and instantiateWithReplacement(), // and this is only used for various kinds of narrowing steps. These are followed // by reduction so we don't need to worry about: // normal forms // sort computations // ground flags // // If this changes in the future the following will be needed: // #if 0 if(!(d->normalizeAtTop()) && a0->isGround() && a1->isGround()) { s->computeBaseSort(d); d->setGround(); } #endif return d; } return 0; } Maude-Maude3.2/src/CUI_Theory/CUI_DagNode.hh000066400000000000000000000074061420036611000204500ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2020 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for DAG nodes belonging to theories made from C, Ul, Ur and I axioms. // #ifndef _CUI_DagNode_hh_ #define _CUI_DagNode_hh_ #include "dagNode.hh" #include "variable.hh" class CUI_DagNode : public DagNode { public: CUI_DagNode(CUI_Symbol* symbol); // // Member functions required by theory interface. // RawDagArgumentIterator* arguments(); size_t getHashValue(); int compareArguments(const DagNode* other) const; void overwriteWithClone(DagNode* old); DagNode* makeClone(); DagNode* copyWithReplacement(int argIndex, DagNode* replacement); DagNode* copyWithReplacement(Vector& redexStack, int first, int last); // // Unification member functions. // ReturnResult computeBaseSortForGroundSubterms(bool warnAboutUnimplemented); bool computeSolvedForm2(DagNode* rhs, UnificationContext& solution, PendingUnificationStack& pending); void insertVariables2(NatSet& occurs); DagNode* instantiate2(const Substitution& substitution, bool maintainInvariants); // // Interface for narrowing. // bool indexVariables2(NarrowingVariableInfo& indices, int baseIndex); DagNode* instantiateWithReplacement(const Substitution& substitution, const Vector* eagerCopies, int argIndex, DagNode* newDag); DagNode* instantiateWithCopies2(const Substitution& substitution, const Vector& eagerCopies); // // Functions particular to CUI_DagNode. // CUI_Symbol* symbol() const; DagNode* getArgument(int i) const; bool indirectOccursCheck(VariableDagNode* repVar, UnificationContext& solution); CUI_DagNode* makePurifiedVersion(UnificationContext& solution, PendingUnificationStack& pending); private: // // Theory interface functions. // DagNode* markArguments(); DagNode* copyEagerUptoReduced2(); DagNode* copyAll2(); void clearCopyPointers2(); // // Normalization functions. // void collapseTo(int argNr); bool normalizeAtTop(); // // Private unification stuff. // bool computeSolvedFormCommutativeCase(CUI_DagNode* rhs, UnificationContext& solution, PendingUnificationStack& pending); // // Arguments under CUI symbol. // DagNode* argArray[2]; // // Slot for caching hash value. // size_t hashCache; // // Most related classes need direct access to our argument list for efficiency. // friend class CUI_Symbol; // to reduce subterms prior to rewrite, normalization friend class CUI_Term; // for term->DAG conversion & comparison friend class CUI_LhsAutomaton; // for matching DAG subject friend class CUI_RhsAutomaton; // for constructing replacement DAG }; inline CUI_DagNode::CUI_DagNode(CUI_Symbol* symbol) : DagNode(symbol) { } inline CUI_Symbol* CUI_DagNode::symbol() const { return static_cast(DagNode::symbol()); } inline DagNode* CUI_DagNode::getArgument(int i) const { Assert(i == 0 || i == 1, "bad argument index"); return argArray[i]; } #endif Maude-Maude3.2/src/CUI_Theory/CUI_LhsAutomaton.cc000066400000000000000000000141501420036611000215450ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class CUI_LhsAutomaton. // // utility stuff #include "macros.hh" #include "vector.hh" #include "indent.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "CUI_Theory.hh" // interface class definitions #include "argVec.hh" #include "binarySymbol.hh" #include "dagNode.hh" #include "term.hh" #include "subproblem.hh" #include "lhsAutomaton.hh" #include "rhsAutomaton.hh" #include "extensionInfo.hh" // core class definitions #include "variableInfo.hh" #include "subproblemAccumulator.hh" #include "disjunctiveSubproblemAccumulator.hh" #include "equalitySubproblem.hh" #include "extensionMatchSubproblem.hh" #include "substitution.hh" #include "localBinding.hh" // variable class definitions #include "variableSymbol.hh" #include "variableTerm.hh" // CUI theory class definitions #include "CUI_Symbol.hh" #include "CUI_DagNode.hh" #include "CUI_LhsAutomaton.hh" #include "CUI_Matcher.cc" CUI_LhsAutomaton::CUI_LhsAutomaton(CUI_Symbol* topSymbol, bool matchAtTop, Flags flags, int nrVariables) : topSymbol(topSymbol), matchAtTop(matchAtTop), flags(flags), local(nrVariables) { subpattern0.type = UNDEFINED; subpattern0.automaton = 0; subpattern0.topAutomaton = 0; subpattern1.automaton = 0; subpattern1.topAutomaton = 0; } CUI_LhsAutomaton::~CUI_LhsAutomaton() { delete subpattern0.automaton; delete subpattern0.topAutomaton; delete subpattern1.automaton; delete subpattern1.topAutomaton; } bool CUI_LhsAutomaton::addSubpattern(Term* term, const VariableInfo& variableInfo, NatSet& boundUniquely) { bool first = (subpattern0.type == UNDEFINED); Subpattern& sp = first ? subpattern0 : subpattern1; if (matchAtTop && (flags & (first ? (ID1_COLLAPSE | IDEM_COLLAPSE) : (ID0_COLLAPSE | IDEM_COLLAPSE)))) { // // Need to compile a top automaton for this subpattern. // VariableInfo localVariableInfo(variableInfo); // // Ulgy hack to prevent greedy matching because extension // is shared in idem match. // if (first && (flags & IDEM_COLLAPSE)) localVariableInfo.addConditionVariables(term->occursBelow()); NatSet local(boundUniquely); bool spl; sp.topAutomaton = term->compileLhs(true, localVariableInfo, local, spl); } if (term->ground()) { sp.type = GROUND_ALIEN; sp.term = term; return false; } VariableTerm* v = dynamic_cast(term); if (v != 0) { sp.type = VARIABLE; sp.varIndex = v->getIndex(); sp.sort = v->getSort(); if (flags & UNIQUE_BRANCH) { boundUniquely.insert(v->getIndex()); return false; } if (first || !matchAtTop || !(flags & IDEM_COLLAPSE)) return false; } else { sp.type = NON_GROUND_ALIEN; if (flags & UNIQUE_BRANCH) { bool spl; sp.automaton = term->compileLhs(false, variableInfo, boundUniquely, spl); return spl; } } NatSet local(boundUniquely); bool spl; sp.automaton = term->compileLhs(false, variableInfo, local, spl); return spl; } #ifdef DUMP void CUI_LhsAutomaton::dump(ostream& s, const VariableInfo& variableInfo, int indentLevel) { s << Indent(indentLevel) << "Begin{CUI_LhsAutomaton}\n"; ++indentLevel; s << Indent(indentLevel) << "topSymbol = \"" << topSymbol << "\"\tmatchAtTop = " << matchAtTop << '\n'; s << Indent(indentLevel) << "flags = " << flags << '\n'; s << Indent(indentLevel) << "subpattern0:\n"; subpattern0.dump(s, variableInfo, indentLevel + 1); s << Indent(indentLevel) << "subpattern1:\n"; subpattern1.dump(s, variableInfo, indentLevel + 1); s << Indent(indentLevel - 1) << "End{CUI_Automaton}\n"; } void CUI_LhsAutomaton::Subpattern::dump(ostream& s, const VariableInfo& variableInfo, int indentLevel) { s << Indent(indentLevel) << "type = " << type << '\n'; switch (type) { case UNDEFINED: return; case GROUND_ALIEN: s << Indent(indentLevel) << "term = \"" << term << "\"\n"; break; case VARIABLE: s << Indent(indentLevel) << "varIndex = " << varIndex << " \"" << variableInfo.index2Variable(varIndex) << "\"\tsort = \"" << sort << "\"\n"; if (automaton == 0) break; // fall thru case NON_GROUND_ALIEN: s << Indent(indentLevel) << "automaton =\n"; automaton->dump(s, variableInfo, indentLevel + 1); break; } if (topAutomaton != 0) { s << Indent(indentLevel) << "topAutomaton =\n"; topAutomaton->dump(s, variableInfo, indentLevel + 1); } } ostream& operator<<(ostream& s, CUI_LhsAutomaton::Flags flags) { static const char* const names[] = {"GREEDY_MATCH_OK", "UNIQUE_BRANCH", "FORWARD", "REVERSE", "CONDITIONAL_REVERSE", "ID0_COLLAPSE", "ID1_COLLAPSE", "IDEM_COLLAPSE"}; s << '{'; int m = 1; bool already = false; for (int i = 0; i < 8; i++) { if (flags & m) { if (already) s << ", "; s << names[i]; already = true; } m <<= 1; } s << '}'; return s; } ostream& operator<<(ostream& s, CUI_LhsAutomaton::PatternType type) { static const char* const names[] = {"UNDEFINED", "GROUND_ALIEN", "VARIABLE", "NON_GROUND_ALIEN"}; s << names[type]; return s; } #endif Maude-Maude3.2/src/CUI_Theory/CUI_LhsAutomaton.hh000066400000000000000000000114751420036611000215660ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for left hand side automata for theories made from C, Ul, Ur and I axioms. // #ifndef _CUI_LhsAutomaton_hh_ #define _CUI_LhsAutomaton_hh_ #include "lhsAutomaton.hh" class CUI_LhsAutomaton : public LhsAutomaton { NO_COPYING(CUI_LhsAutomaton); public: enum Flags { GREEDY_MATCH_OK = 1, UNIQUE_BRANCH = 2, FORWARD = 4, REVERSE = 8, CONDITIONAL_REVERSE = 16, ID0_COLLAPSE = 32, // Collapse to subpattern1 possible ID1_COLLAPSE = 64, // Collapse to subpattern0 possible IDEM_COLLAPSE = 128, COLLAPSE = ID0_COLLAPSE | ID1_COLLAPSE | IDEM_COLLAPSE }; CUI_LhsAutomaton(CUI_Symbol* topSymbol, bool matchAtTop, Flags flags, int nrVariables); ~CUI_LhsAutomaton(); bool addSubpattern(Term* term, const VariableInfo& variableInfo, NatSet& boundUniquely); // // Standard LhsAutomaton operations. // bool match(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo); #ifdef DUMP void dump(ostream& s, const VariableInfo& variableInfo, int indentLevel); #endif private: enum PatternType { UNDEFINED, GROUND_ALIEN, VARIABLE, NON_GROUND_ALIEN }; struct Subpattern { bool match(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, bool matchAtTop = false, ExtensionInfo* extensionInfo = 0); #ifdef DUMP void dump(ostream& s, const VariableInfo& variableInfo, int indentLevel); #endif PatternType type; union { Term* term; // for ground aliens int varIndex; // for variables }; LhsAutomaton* automaton; // for non ground aliens (and sometimes variables) LhsAutomaton* topAutomaton; // for when we match whole subject at top Sort* sort; // for variables only }; bool freeMatch(DagNode* subject0, DagNode* subject1, Substitution& solution, Subproblem*& returnedSubproblem); bool id0CollapseMatch(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo); bool id1CollapseMatch(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo); bool idemCollapseMatch(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem); bool idemCollapseMatch(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo); CUI_Symbol* const topSymbol; const bool matchAtTop; const Flags flags; Subpattern subpattern0; Subpattern subpattern1; // // Data storage for match-time use // Substitution local; friend ostream& operator<<(ostream& s, PatternType type); }; inline bool CUI_LhsAutomaton::Subpattern::match(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, bool matchAtTop, ExtensionInfo* extensionInfo) { if (matchAtTop) { // // Even if the subject has no extension, the top automaton may // need to do something special; like clone the subject's top // node if it gets assigned to a variable that occurs in the // rhs of an equation to avoid intoducing loop into dag. // return topAutomaton->match(subject, solution, returnedSubproblem, extensionInfo); } else if (type == VARIABLE) { DagNode* d = solution.value(varIndex); if (d == 0) { if (subject->checkSort(sort, returnedSubproblem)) { solution.bind(varIndex, subject); return true; } return false; } else { returnedSubproblem = 0; return subject->equal(d); } } else if (type == GROUND_ALIEN) { returnedSubproblem = 0; return term->equal(subject); } return automaton->match(subject, solution, returnedSubproblem); } #ifdef DUMP ostream& operator<<(ostream& s, CUI_LhsAutomaton::Flags flags); ostream& operator<<(ostream& s, CUI_LhsAutomaton::PatternType type); #endif #endif Maude-Maude3.2/src/CUI_Theory/CUI_LhsCompiler.cc000066400000000000000000000126411420036611000213530ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation of match compilation for theories made from C, Ul, Ur and I axioms. // bool CUI_Term::betterToReverseOrder(NatSet& boundUniquely) const { Term* t0 = argArray[0]; Term* t1 = argArray[1]; NatSet forward(boundUniquely); t0->analyseConstraintPropagation(forward); t1->analyseConstraintPropagation(forward); NatSet reverse(boundUniquely); t1->analyseConstraintPropagation(reverse); t0->analyseConstraintPropagation(reverse); if (reverse.cardinality() > forward.cardinality()) { boundUniquely = reverse; // deep copy return true; } boundUniquely = forward; // deep copy return false; } void CUI_Term::analyseConstraintPropagation(NatSet& boundUniquely) const { // // If any collapse is possible then constraint propagation analysis // becomes extraordinarily complicated; subtle counter-examples // show that we can't guarantee anything in most cases. // Thus we don't bother doing anything. // if (id0CollapsePossible || id1CollapsePossible || idemCollapsePossible) return; Term* t0 = argArray[0]; Term* t1 = argArray[1]; if (t0->ground() || t0->willGroundOutMatch(boundUniquely) || t0->equal(t1)) t1->analyseConstraintPropagation(boundUniquely); else if (t1->ground() || t1->willGroundOutMatch(boundUniquely)) t0->analyseConstraintPropagation(boundUniquely); else if (!(symbol()->comm()) || t0->matchIndependent(t1)) (void) betterToReverseOrder(boundUniquely); } LhsAutomaton* CUI_Term::compileLhs2(bool matchAtTop, const VariableInfo& variableInfo, NatSet& boundUniquely, bool& subproblemLikely) { // // Check to see if greedy matching is safe. // bool greedy = greedySafe(variableInfo, boundUniquely); int flags = greedy ? CUI_LhsAutomaton::GREEDY_MATCH_OK : 0; Term* t0 = argArray[0]; Term* t1 = argArray[1]; bool comm = symbol()->comm(); bool uniqueBranch = false; bool subtermsEqual = t0->equal(t1); bool swap = false; // // We need to decide whether to swap our arguments for matching // and whether we have a unique branch. // if (id0CollapsePossible || id1CollapsePossible || idemCollapsePossible) { // // Collapse case. // if (comm && dynamic_cast(t0) != 0 && dynamic_cast(t1) == 0) swap = true; // match variable last to heuristically improve substitution else if (matchAtTop && idemCollapsePossible && t1->ground()) { Assert(!(t0->ground()), "can't have idem collapse with two ground terms"); swap = true; } } else { // // Non-collapse case. // if (t0->ground() || t0->willGroundOutMatch(boundUniquely) || subtermsEqual) uniqueBranch = true; else if (t1->ground() || t1->willGroundOutMatch(boundUniquely)) { uniqueBranch = true; swap = true; } else if (!comm || t0->matchIndependent(t1)) { uniqueBranch = true; NatSet local(boundUniquely); swap = betterToReverseOrder(local); } else if (dynamic_cast(t0) != 0 && dynamic_cast(t1) == 0) swap = true; // match variable last to heuristically improve substitution if (uniqueBranch) flags |= CUI_LhsAutomaton::UNIQUE_BRANCH; } // // Now we decide on whether to match forward and/or reverse. // if (!comm || (t0->stable() && t1->stable() && t0->symbol() != t1->symbol())) flags |= swap ? CUI_LhsAutomaton::REVERSE : CUI_LhsAutomaton::FORWARD; else { flags |= CUI_LhsAutomaton::FORWARD; if (symbol()->idem()) flags |= CUI_LhsAutomaton::REVERSE; else if (!subtermsEqual) flags |= CUI_LhsAutomaton::CONDITIONAL_REVERSE; } // // Swap arguments and enter collapse info into flags. // if (swap) { Term* t = t0; t0 = t1; t1 = t; if (id0CollapsePossible) flags |= CUI_LhsAutomaton::ID1_COLLAPSE; if (id1CollapsePossible) flags |= CUI_LhsAutomaton::ID0_COLLAPSE; } else { if (id0CollapsePossible) flags |= CUI_LhsAutomaton::ID0_COLLAPSE; if (id1CollapsePossible) flags |= CUI_LhsAutomaton::ID1_COLLAPSE; } if (idemCollapsePossible) flags |= CUI_LhsAutomaton::IDEM_COLLAPSE; // // Construct CUI automaton and determine likelihood that it will return a // subproblem at match time. // CUI_LhsAutomaton* a = new CUI_LhsAutomaton(symbol(), matchAtTop, static_cast(flags), variableInfo.getNrProtectedVariables()); bool spl = a->addSubpattern(t0, variableInfo, boundUniquely); spl = a->addSubpattern(t1, variableInfo, boundUniquely) || spl; subproblemLikely = spl || (!uniqueBranch && !greedy); return a; } Maude-Maude3.2/src/CUI_Theory/CUI_Matcher.cc000066400000000000000000000152171420036611000205170ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // CUI matcher. // bool CUI_LhsAutomaton::match(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo) { DisjunctiveSubproblemAccumulator alternatives(solution); Flags f = flags; bool greedyMatchOK = f & GREEDY_MATCH_OK; if (subject->symbol() == topSymbol) { Assert(extensionInfo == 0, "shouldn't have extension info"); CUI_DagNode* s = static_cast(subject); DagNode* s0 = s->argArray[0]; DagNode* s1 = s->argArray[1]; if (f & FORWARD) { // // Try forward non-collapse possibility. // local.copy(solution); if (freeMatch(s0, s1, local, returnedSubproblem)) { if ((f & UNIQUE_BRANCH) || (greedyMatchOK && returnedSubproblem == 0)) { solution.copy(local); return true; } alternatives.addOption(local, returnedSubproblem, 0); } } if ((f & REVERSE) || ((f & CONDITIONAL_REVERSE) && !(s0->equal(s1)))) { // // Try reverse non-collapse possibility. // local.copy(solution); if (freeMatch(s1, s0, local, returnedSubproblem)) { if ((f & UNIQUE_BRANCH) || (greedyMatchOK && returnedSubproblem == 0)) { solution.copy(local); return true; } alternatives.addOption(local, returnedSubproblem, 0); } } } else { if (!(f & COLLAPSE)) return false; } // // Three ways to collapse. // if (f & ID0_COLLAPSE) { local.copy(solution); if (id0CollapseMatch(subject, local, returnedSubproblem, extensionInfo)) { if (greedyMatchOK && returnedSubproblem == 0) { solution.copy(local); return true; } alternatives.addOption(local, returnedSubproblem, extensionInfo); } } if (f & ID1_COLLAPSE) { local.copy(solution); if (id1CollapseMatch(subject, local, returnedSubproblem, extensionInfo)) { if (greedyMatchOK && returnedSubproblem == 0) { solution.copy(local); return true; } alternatives.addOption(local, returnedSubproblem, extensionInfo); } } if (f & IDEM_COLLAPSE) { local.copy(solution); if ((extensionInfo == 0) ? idemCollapseMatch(subject, local, returnedSubproblem) : idemCollapseMatch(subject, local, returnedSubproblem, extensionInfo)) { if (greedyMatchOK && returnedSubproblem == 0) { solution.copy(local); return true; } alternatives.addOption(local, returnedSubproblem, extensionInfo); } } return alternatives.extract(solution, returnedSubproblem, extensionInfo); } bool CUI_LhsAutomaton::freeMatch(DagNode* subject0, DagNode* subject1, Substitution& solution, Subproblem*& returnedSubproblem) { Subproblem* sp0; Subproblem* sp1; if (subpattern0.match(subject0, solution, sp0)) { if (subpattern1.match(subject1, solution, sp1)) { SubproblemAccumulator subproblems; subproblems.add(sp0); subproblems.add(sp1); returnedSubproblem = subproblems.extractSubproblem(); return true; } else delete sp0; // important! } return false; } bool CUI_LhsAutomaton::id0CollapseMatch(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo) { Subproblem* sp0; Subproblem* sp1; if (subpattern0.match(topSymbol->getIdentityDag(), solution, sp0)) { if (subpattern1.match(subject, solution, sp1, matchAtTop, extensionInfo)) { SubproblemAccumulator subproblems; subproblems.add(sp0); subproblems.add(sp1); returnedSubproblem = subproblems.extractSubproblem(); return true; } else delete sp0; } return false; } bool CUI_LhsAutomaton::id1CollapseMatch(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo) { Term* identity = topSymbol->getIdentity(); if ((flags & ID0_COLLAPSE) && identity->equal(subject)) return false; // we will have already discovered solution on id0Collapse branch Subproblem* sp0; Subproblem* sp1; if (subpattern1.match(topSymbol->getIdentityDag(), solution, sp1)) { if (subpattern0.match(subject, solution, sp0, matchAtTop, extensionInfo)) { SubproblemAccumulator subproblems; subproblems.add(sp1); subproblems.add(sp0); if (extensionInfo != 0 && (flags & ID0_COLLAPSE)) subproblems.add(new EqualitySubproblem(identity, extensionInfo, false)); returnedSubproblem = subproblems.extractSubproblem(); return true; } else delete sp1; } return false; } bool CUI_LhsAutomaton::idemCollapseMatch(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem) { Term* identity = topSymbol->getIdentity(); if (identity != 0 && identity->equal(subject)) return false; Subproblem* sp0; Subproblem* sp1; if (subpattern0.match(subject, solution, sp0, matchAtTop)) { if (subpattern1.match(subject, solution, sp1, matchAtTop)) { SubproblemAccumulator subproblems; subproblems.add(sp1); subproblems.add(sp0); returnedSubproblem = subproblems.extractSubproblem(); return true; } else delete sp0; } return false; } bool CUI_LhsAutomaton::idemCollapseMatch(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo) { Subproblem* sp; if (subpattern0.topAutomaton->match(subject, solution, sp, extensionInfo)) { SubproblemAccumulator subproblems; subproblems.add(sp); Term* identity = topSymbol->getIdentity(); if (identity != 0) subproblems.add(new EqualitySubproblem(identity, extensionInfo, false)); subproblems.add(new ExtensionMatchSubproblem(subpattern1.automaton, extensionInfo, solution.nrFragileBindings())); returnedSubproblem = subproblems.extractSubproblem(); return true; } return false; } Maude-Maude3.2/src/CUI_Theory/CUI_RhsAutomaton.cc000066400000000000000000000050361420036611000215560ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class CUI_RhsAutomaton. // // utility stuff #include "macros.hh" #include "vector.hh" #include "indent.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "CUI_Theory.hh" // core class definitions #include "substitution.hh" #include "variableInfo.hh" // CUI theory class definitions #include "CUI_Symbol.hh" #include "CUI_DagNode.hh" #include "CUI_RhsAutomaton.hh" CUI_RhsAutomaton::CUI_RhsAutomaton(CUI_Symbol* symbol) : topSymbol(symbol) { } void CUI_RhsAutomaton::remapIndices(VariableInfo& variableInfo) { source0 = variableInfo.remapIndex(source0); source1 = variableInfo.remapIndex(source1); destination = variableInfo.remapIndex(destination); } void CUI_RhsAutomaton::close(int sourceIndex0, int sourceIndex1, int destinationIndex) { source0 = sourceIndex0; source1 = sourceIndex1; destination = destinationIndex; } DagNode* CUI_RhsAutomaton::construct(Substitution& matcher) { CUI_DagNode* n = new CUI_DagNode(topSymbol); n->argArray[0] = matcher.value(source0); n->argArray[1] = matcher.value(source1); matcher.bind(destination, n); return n; } void CUI_RhsAutomaton::replace(DagNode* old, Substitution& matcher) { CUI_DagNode* n = new(old) CUI_DagNode(topSymbol); n->argArray[0] = matcher.value(source0); n->argArray[1] = matcher.value(source1); } #ifdef DUMP void CUI_RhsAutomaton::dump(ostream& s, const VariableInfo& variableInfo, int indentLevel) { s << Indent(indentLevel) << "Begin{CUI_RhsAutomaton}\n"; s << Indent(indentLevel + 1) << "[" << destination << "] <= " << topSymbol << '(' << '[' << source0 << "], [" << source1 << "])\n"; s << Indent(indentLevel) << "End{CUI_RhsAutomaton}\n"; } #endif Maude-Maude3.2/src/CUI_Theory/CUI_RhsAutomaton.hh000066400000000000000000000031331420036611000215640ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for right hand side automata for theories made from C, Ul, Ur and I axioms. // #ifndef _CUI_RhsAutomaton_hh_ #define _CUI_RhsAutomaton_hh_ #include "rhsAutomaton.hh" class CUI_RhsAutomaton : public RhsAutomaton { NO_COPYING(CUI_RhsAutomaton); public: CUI_RhsAutomaton(CUI_Symbol* symbol); void close(int sourceIndex0, int sourceIndex1, int destinationIndex); // // Standard RhsAutomaton operations // void remapIndices(VariableInfo& variableInfo); DagNode* construct(Substitution& matcher); void replace(DagNode* old, Substitution& matcher); #ifdef DUMP void dump(ostream& s, const VariableInfo& variableInfo, int indentLevel); #endif private: CUI_Symbol* const topSymbol; int source0; int source1; int destination; }; #endif Maude-Maude3.2/src/CUI_Theory/CUI_Symbol.cc000077500000000000000000000266051420036611000204070ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2020 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class CUI_Symbol. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "variable.hh" #include "CUI_Theory.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" #include "term.hh" #include "lhsAutomaton.hh" #include "rhsAutomaton.hh" #include "subproblem.hh" // core class definitions #include "rewritingContext.hh" #include "variableInfo.hh" #include "sortBdds.hh" #include "hashConsSet.hh" // CUI theory class definitions #include "CUI_Symbol.hh" #include "CUI_DagNode.hh" #include "CUI_Term.hh" #include "CUI_UnificationSubproblem.hh" #include "CUI_UnificationSubproblem2.hh" CUI_Symbol::CUI_Symbol(int id, const Vector& strategy, bool memoFlag, Axioms axioms, Term* identity) : BinarySymbol(id, memoFlag, identity), axioms(axioms) { if (axioms & COMM) setPermuteStrategy(strategy); else setStrategy(strategy, 2, memoFlag); } void CUI_Symbol::compileOpDeclarations() { if (axioms & COMM) commutativeSortCompletion(); Symbol::compileOpDeclarations(); // do default sort processing if (axioms & IDEM) idempotentSortCheck(); } void CUI_Symbol::postOpDeclarationPass() { processIdentity(); if (axioms & LEFT_ID) leftIdentitySortCheck(); // // If we are commutative, a problem that shows up with rightIdentitySortCheck() // will already have shown up with leftIdentitySortCheck() and the latter is faster. // if (!(axioms & COMM)) { if (axioms & RIGHT_ID) rightIdentitySortCheck(); } } Term* CUI_Symbol::makeTerm(const Vector& args) { return new CUI_Term(this, args); } DagNode* CUI_Symbol::makeDagNode(const Vector& args) { CUI_DagNode* c = new CUI_DagNode(this); c->argArray[0] = args[0]; c->argArray[1] = args[1]; return c; } bool CUI_Symbol::eqRewrite(DagNode* subject, RewritingContext& context) { Assert(this == subject->symbol(), "bad symbol"); CUI_DagNode* s = static_cast(subject); DagNode** args = s->argArray; if (standardStrategy()) { args[0]->reduce(context); args[1]->reduce(context); if (s->normalizeAtTop()) return false; return !(equationFree()) && applyReplace(s, context); } else { if (isMemoized()) { MemoTable::SourceSet from; bool result = memoStrategy(from, subject, context); memoEnter(from, subject); // // We may need to return true in the case we collapse to a unreduced subterm. // return result; } // // Execute user supplied strategy. // const Vector& userStrategy = getStrategy(); int stratLen = userStrategy.length(); bool seenZero = false; for (int i = 0; i < stratLen; i++) { int a = userStrategy[i]; if(a == 0) { if (!seenZero) { args[0]->computeTrueSort(context); args[1]->computeTrueSort(context); seenZero = true; } // // If we collapse to one of our subterms which has not been // reduced we pretend that we did a rewrite so that the // reduction process continues. // if (s->normalizeAtTop()) return !(s->isReduced()); if ((i + 1 == stratLen) ? applyReplace(s, context) : applyReplaceNoOwise(s, context)) return true; } else { --a; // real arguments start at 0 not 1 if (seenZero) { args[a] = args[a]->copyReducible(); // // A previous call to applyReplace() may have // computed a true sort for our subject which will be // invalidated by the reduce we are about to do. // s->repudiateSortInfo(); } args[a]->reduce(context); } } return false; } } bool CUI_Symbol::memoStrategy(MemoTable::SourceSet& from, DagNode* subject, RewritingContext& context) { CUI_DagNode* s = static_cast(subject); DagNode** args = s->argArray; // // Execute user supplied strategy. // const Vector& userStrategy = getStrategy(); int stratLen = userStrategy.length(); bool seenZero = false; for (int i = 0; i < stratLen; i++) { int a = userStrategy[i]; if(a == 0) { if (!seenZero) { args[0]->computeTrueSort(context); args[1]->computeTrueSort(context); seenZero = true; } // // If we collapse to one of our subterms which has not been // reduced we pretend that we did a rewrite so that the // reduction process continues. // if (s->normalizeAtTop()) return !(s->isReduced()); if (memoRewrite(from, subject, context)) return false; if ((i + 1 == stratLen) ? applyReplace(s, context) : applyReplaceNoOwise(s, context)) { subject->reduce(context); return false; } } else { --a; // real arguments start at 0 not 1 if (seenZero) { args[a] = args[a]->copyReducible(); // // A previous call to applyReplace() may have // computed a true sort for our subject which will be // invalidated by the reduce we are about to do. // s->repudiateSortInfo(); } args[a]->reduce(context); } } return false; } void CUI_Symbol::computeBaseSort(DagNode* subject) { Assert(this == subject->symbol(), "bad symbol"); DagNode** args = static_cast(subject)->argArray; int i0 = args[0]->getSortIndex(); int i1 = args[1]->getSortIndex(); Assert(i0 >= 0 && i1 >= 0, "bad sort index"); subject->setSortIndex(traverse(traverse(0, i0), i1)); } void CUI_Symbol::normalizeAndComputeTrueSort(DagNode* subject, RewritingContext& context) { Assert(this == subject->symbol(), "bad symbol"); CUI_DagNode* s = static_cast(subject); DagNode** args = s->argArray; // // Make sure each subterm has a sort. // args[0]->computeTrueSort(context); args[1]->computeTrueSort(context); // // Put subject in normal form (could collapse to a subterm). // if (s->normalizeAtTop()) return; // // Finally compute subjects true sort. // fastComputeTrueSort(subject, context); } void CUI_Symbol::stackArguments(DagNode* subject, Vector& stack, int parentIndex, bool respectFrozen, bool eagerContext) { DagNode** args = safeCast(CUI_DagNode*, subject)->argArray; const NatSet& frozen = getFrozen(); DagNode* d = args[0]; if (!(respectFrozen && frozen.contains(0)) && !(d->isUnstackable())) stack.append(RedexPosition(args[0], parentIndex, 0, eagerContext && eagerArgument(0))); d = args[1]; if (!(respectFrozen && frozen.contains(1)) && !(d->isUnstackable())) stack.append(RedexPosition(args[1], parentIndex, 1, eagerContext && eagerArgument(1))); } void CUI_Symbol::setFrozen(const NatSet& frozen) { if (axioms & COMM) setPermuteFrozen(frozen); else BinarySymbol::setFrozen(frozen); } Term* CUI_Symbol::termify(DagNode* dagNode) { Vector arguments(2); DagNode** argArray = safeCast(CUI_DagNode*, dagNode)->argArray; DagNode* d0 = argArray[0]; DagNode* d1 = argArray[1]; arguments[0] = d0->symbol()->termify(d0); arguments[1] = d1->symbol()->termify(d1); return new CUI_Term(this, arguments); } // // Unification code. // void CUI_Symbol::computeGeneralizedSort(const SortBdds& sortBdds, const Vector& realToBdd, DagNode* subject, Vector& generalizedSort) { DagNode** args = safeCast(CUI_DagNode*, subject)->argArray; int varCounter = 0; bddPair* argMap = bdd_newpair(); for (int i = 0; i < 2; i++) { Vector argGenSort; args[i]->computeGeneralizedSort(sortBdds, realToBdd, argGenSort); int nrBdds = argGenSort.size(); for (int j = 0; j < nrBdds; ++j, ++varCounter) bdd_setbddpair(argMap, varCounter, argGenSort[j]); } const Vector& sortFunction = sortBdds.getSortFunction(this); int nrBdds = sortFunction.size(); generalizedSort.resize(nrBdds); for (int i = 0; i < nrBdds; ++i) generalizedSort[i] = bdd_veccompose(sortFunction[i], argMap); bdd_freepair(argMap); } // experimental code for faster sort computations void CUI_Symbol::computeGeneralizedSort2(const SortBdds& sortBdds, const Vector& realToBdd, DagNode* subject, Vector& outputBdds) { DagNode** args = safeCast(CUI_DagNode*, subject)->argArray; Vector inputBdds; args[0]->computeGeneralizedSort2(sortBdds, realToBdd, inputBdds); args[1]->computeGeneralizedSort2(sortBdds, realToBdd, inputBdds); sortBdds.operatorCompose(this, inputBdds, outputBdds); } UnificationSubproblem* CUI_Symbol::makeUnificationSubproblem() { if (leftId() || rightId()) { // // Because CUI_UnificationSubproblem2 may introduce the // identity element we make sure it had its sort computed // and its ground flag set. // DagNode* id = getIdentityDag(); if (!(id->isGround())) id->computeBaseSortForGroundSubterms(false); return new CUI_UnificationSubproblem2(); } return new CUI_UnificationSubproblem(); } int CUI_Symbol::unificationPriority() const { if (idem()) return Symbol::unificationPriority(); // unimplemented // // Make a rough guess about how branchy we are. // return comm() + 2 * (leftId() + rightId()); } bool CUI_Symbol::canResolveTheoryClash() { return leftId() || rightId(); } // // Hash cons code. // DagNode* CUI_Symbol::makeCanonical(DagNode* original, HashConsSet* hcs) { DagNode** p = safeCast(CUI_DagNode*, original)->argArray; DagNode* d = p[0]; DagNode* c = hcs->getCanonical(hcs->insert(d)); DagNode* d1 = p[1]; DagNode* c1 = hcs->getCanonical(hcs->insert(d1)); if (c == d && c1 == d1) return original; // can use the original dag node as the canonical version // // Need to make new node. // CUI_DagNode* n = new CUI_DagNode(this); n->copySetRewritingFlags(original); n->setSortIndex(original->getSortIndex()); n->argArray[0] = c; n->argArray[1] = c1; return n; } DagNode* CUI_Symbol::makeCanonicalCopy(DagNode* original, HashConsSet* hcs) { // // We have a unreduced node - copy forced. // CUI_DagNode* n = new CUI_DagNode(this); n->copySetRewritingFlags(original); n->setSortIndex(original->getSortIndex()); DagNode** p = safeCast(CUI_DagNode*, original)->argArray; n->argArray[0] = hcs->getCanonical(hcs->insert(p[0])); n->argArray[1] = hcs->getCanonical(hcs->insert(p[1])); return n; } Maude-Maude3.2/src/CUI_Theory/CUI_Symbol.hh000077500000000000000000000062511420036611000204140ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for symbols belonging to theories made from C, Ul, Ur and I axioms. // #ifndef _CUI_Symbol_hh_ #define _CUI_Symbol_hh_ #include "binarySymbol.hh" class CUI_Symbol : public BinarySymbol { public: enum Axioms { COMM = 1, // commutativity LEFT_ID = 2, // left identity RIGHT_ID = 4, // right identity IDEM = 8 // idempotence }; CUI_Symbol(int id, const Vector& strategy, bool memoFlag, Axioms axioms, Term* identity = 0); // // Member functions required by theory interface. // Term* makeTerm(const Vector& args); DagNode* makeDagNode(const Vector& args); void computeBaseSort(DagNode* subject); void normalizeAndComputeTrueSort(DagNode* subject, RewritingContext& context); bool eqRewrite(DagNode* subject, RewritingContext& context); void stackArguments(DagNode* subject, Vector& stack, int parentIndex, bool respectFrozen, bool eagerContext); Term* termify(DagNode* dagNode); // // Member functions overiding default handling. // void compileOpDeclarations(); void postOpDeclarationPass(); void setFrozen(const NatSet& frozen); // // Unification stuff. // void computeGeneralizedSort(const SortBdds& sortBdds, const Vector& realToBdd, DagNode* subject, Vector& generalizedSort); void computeGeneralizedSort2(const SortBdds& sortBdds, const Vector& realToBdd, DagNode* subject, Vector& outputBdds); UnificationSubproblem* makeUnificationSubproblem(); int unificationPriority() const; bool canResolveTheoryClash(); // // Hash cons stuff. // DagNode* makeCanonical(DagNode* original, HashConsSet* hcs); DagNode* makeCanonicalCopy(DagNode* original, HashConsSet* hcs); // // Member functions specific to CUI_Symbol. // bool comm() const; bool leftId() const; bool rightId() const; bool idem() const; private: bool memoStrategy(MemoTable::SourceSet& from, DagNode* subject, RewritingContext& context); Axioms axioms; }; inline bool CUI_Symbol::comm() const { return axioms & COMM; } inline bool CUI_Symbol::leftId() const { return axioms & LEFT_ID; } inline bool CUI_Symbol::rightId() const { return axioms & RIGHT_ID; } inline bool CUI_Symbol::idem() const { return axioms & IDEM; } #endif Maude-Maude3.2/src/CUI_Theory/CUI_Term.cc000066400000000000000000000200551420036611000200370ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class CUI_Term. // // utility stuff #include "macros.hh" #include "vector.hh" #include "indent.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "variable.hh" #include "CUI_Theory.hh" // interface class definitions #include "binarySymbol.hh" #include "dagNode.hh" #include "term.hh" // core class definitions #include "rewritingContext.hh" #include "equation.hh" #include "symbolMap.hh" #include "termBag.hh" #include "rhsBuilder.hh" // variable class definitions #include "variableTerm.hh" // CUI theory class definitions #include "CUI_Symbol.hh" #include "CUI_DagNode.hh" #include "CUI_Term.hh" #include "CUI_ArgumentIterator.hh" #include "CUI_LhsAutomaton.hh" #include "CUI_RhsAutomaton.hh" #include "CUI_LhsCompiler.cc" CUI_Term::CUI_Term(CUI_Symbol* symbol, const Vector& arguments) : Term(symbol), argArray(2) { Assert(arguments.length() == 2, "bad number of arguments for " << symbol); argArray[0] = arguments[0]; argArray[1] = arguments[1]; } CUI_Term::CUI_Term(const CUI_Term& original, CUI_Symbol* symbol, SymbolMap* translator) : Term(symbol), argArray(2) { argArray[0] = original.argArray[0]->deepCopy(translator); argArray[1] = original.argArray[1]->deepCopy(translator); } RawArgumentIterator* CUI_Term::arguments() { return new CUI_ArgumentIterator(argArray); } void CUI_Term::deepSelfDestruct() { argArray[0]->deepSelfDestruct(); argArray[1]->deepSelfDestruct(); delete this; } Term* CUI_Term::deepCopy2(SymbolMap* translator) const { CUI_Symbol* s = symbol(); if (translator != 0) { Symbol* s2 = translator->translate(s); if (s2 == 0) return translator->translateTerm(this); s = dynamic_cast(s2); if (s == 0) { Vector args(2); args[0] = argArray[0]->deepCopy(translator); args[1] = argArray[1]->deepCopy(translator); return s2->makeTerm(args); } } return new CUI_Term(*this, s, translator); } Term* CUI_Term::collapseTo(int argNr) { argArray[1 - argNr]->deepSelfDestruct(); Term* r = argArray[argNr]; delete this; return r; } Term* CUI_Term::normalize(bool full, bool& changed) { argArray[0] = argArray[0]->normalize(full, changed); bool subtermChanged; argArray[1] = argArray[1]->normalize(full, subtermChanged); if (subtermChanged) changed = true; CUI_Symbol* s = symbol(); Term* identity = s->getIdentity(); if (identity != 0) { if (s->leftId() && identity->equal(argArray[0])) { changed = true; return collapseTo(1); } if (s->rightId() && identity->equal(argArray[1])) { changed = true; return collapseTo(0); } } if (s->comm() || s->idem()) { int r = argArray[0]->compare(argArray[1]); if (s->idem() && r == 0) { changed = true; return collapseTo(0); } if (s->comm() && r > 0) { changed = true; Term* t = argArray[0]; argArray[0] = argArray[1]; argArray[1] = t; } } unsigned int hashValue = symbol()->getHashValue(); hashValue = hash(hashValue, argArray[0]->getHashValue()); setHashValue(hash(hashValue, argArray[1]->getHashValue())); return this; } int CUI_Term::compareArguments(const Term* other) const { const Vector& argArray2 = static_cast(other)->argArray; int r = argArray[0]->compare(argArray2[0]); if (r != 0) return r; return argArray[1]->compare(argArray2[1]); } int CUI_Term::compareArguments(const DagNode* other) const { const CUI_DagNode* d = static_cast(other); int r = argArray[0]->compare(d->argArray[0]); if (r != 0) return r; return argArray[1]->compare(d->argArray[1]); } void CUI_Term::findEagerVariables(bool atTop, NatSet& eagerVariables) const { CUI_Symbol* s = symbol(); if (atTop ? s->eagerArgument(0) : s->evaluatedArgument(0)) argArray[0]->findEagerVariables(false, eagerVariables); if (atTop ? s->eagerArgument(1) : s->evaluatedArgument(1)) argArray[1]->findEagerVariables(false, eagerVariables); } void CUI_Term::markEagerArguments(int nrVariables, const NatSet& eagerVariables, Vector& problemVariables) { CUI_Symbol* s = symbol(); if (s->eagerArgument(0)) argArray[0]->markEager(nrVariables, eagerVariables, problemVariables); if (s->eagerArgument(1)) argArray[1]->markEager(nrVariables, eagerVariables, problemVariables); } DagNode* CUI_Term::dagify2() { CUI_DagNode* d = new CUI_DagNode(symbol()); d->argArray[0] = argArray[0]->dagify(); d->argArray[1] = argArray[1]->dagify(); return d; } void CUI_Term::analyseCollapses2() { Term* t0 = argArray[0]; Term* t1 = argArray[1]; t0->analyseCollapses(); t1->analyseCollapses(); CUI_Symbol* topSymbol = symbol(); id0CollapsePossible = false; if (topSymbol->leftId() && topSymbol->mightMatchOurIdentity(t0)) { addCollapseSymbol(t1->symbol()); addCollapseSymbols(t1->collapseSymbols()); id0CollapsePossible = true; } id1CollapsePossible = false; if (topSymbol->rightId() && topSymbol->mightMatchOurIdentity(t1)) { addCollapseSymbol(t0->symbol()); addCollapseSymbols(t0->collapseSymbols()); id1CollapsePossible = true; } idemCollapsePossible = false; if (topSymbol->idem() && !(t0->matchIndependent(t1))) { PointerSet symbols; Term::commonSymbols(argArray, symbols); if (!(symbols.empty())) { addCollapseSymbols(symbols); idemCollapsePossible = true; } } } #ifdef DUMP void CUI_Term::dump(ostream& s, const VariableInfo& variableInfo, int indentLevel) { s << Indent(indentLevel) << "Begin{CUI_Term}\n"; ++indentLevel; dumpCommon(s, variableInfo, indentLevel); s << Indent(indentLevel) << "id0CollapsePossible = " << id0CollapsePossible << "\tid1CollapsePossible = " << id1CollapsePossible << "\tidemCollapsePossible = " << idemCollapsePossible << '\n'; s << Indent(indentLevel) << "arguments:\n"; ++indentLevel; argArray[0]->dump(s, variableInfo, indentLevel); argArray[1]->dump(s, variableInfo, indentLevel); s << Indent(indentLevel - 2) << "End{CUI_Term}\n"; } #endif void CUI_Term::findAvailableTerms(TermBag& availableTerms, bool eagerContext, bool atTop) { if (ground()) return; CUI_Symbol* s = symbol(); if (!atTop) availableTerms.insertMatchedTerm(this, eagerContext); argArray[0]->findAvailableTerms(availableTerms, eagerContext && (atTop ? s->eagerArgument(0) : s->evaluatedArgument(0))); argArray[1]->findAvailableTerms(availableTerms, eagerContext && (atTop ? s->eagerArgument(1) : s->evaluatedArgument(1))); } int CUI_Term::compileRhs2(RhsBuilder& rhsBuilder, VariableInfo& variableInfo, TermBag& availableTerms, bool eagerContext) { CUI_Symbol* s = symbol(); CUI_RhsAutomaton* automaton = new CUI_RhsAutomaton(s); int i0 = argArray[0]->compileRhs(rhsBuilder, variableInfo, availableTerms, eagerContext && s->eagerArgument(0)); int i1 = argArray[1]->compileRhs(rhsBuilder, variableInfo, availableTerms, eagerContext && s->eagerArgument(1)); // // Need to flag last use of each source. // variableInfo.useIndex(i0); variableInfo.useIndex(i1); int index = variableInfo.makeConstructionIndex(); automaton->close(i0, i1, index); rhsBuilder.addRhsAutomaton(automaton); return index; } Maude-Maude3.2/src/CUI_Theory/CUI_Term.hh000066400000000000000000000055331420036611000200550ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for terms belonging to theories made from C, Ul, Ur and I axioms. // #ifndef _CUI_Term_hh_ #define _CUI_Term_hh_ #include "term.hh" class CUI_Term : public Term { NO_COPYING(CUI_Term); public: CUI_Term(CUI_Symbol* symbol, const Vector& arguments); // // Member functions required by theory interface. // RawArgumentIterator* arguments(); void deepSelfDestruct(); Term* deepCopy2(SymbolMap* translator) const; Term* normalize(bool full, bool& changed); int compareArguments(const Term* other) const; int compareArguments(const DagNode* other) const; void findEagerVariables(bool atTop, NatSet& eagerVariables) const; void analyseCollapses2(); void analyseConstraintPropagation(NatSet& boundUniquely) const; LhsAutomaton* compileLhs2(bool matchAtTop, const VariableInfo& variableInfo, NatSet& boundUniquely, bool& subproblemLikely); void markEagerArguments(int nrVariables, const NatSet& eagerVariables, Vector& problemVariables); DagNode* dagify2(); void findAvailableTerms(TermBag& availableTerms, bool eagerContext, bool atTop); int compileRhs2(RhsBuilder& rhsBuilder, VariableInfo& variableInfo, TermBag& availableTerms, bool eagerContext); #ifdef DUMP void dump(ostream& s, const VariableInfo& variableInfo, int indentLevel); #endif // // Functions particular to CUI_Term. // CUI_Symbol* symbol() const; private: CUI_Term(const CUI_Term& original, CUI_Symbol* symbol, SymbolMap* translator); bool betterToReverseOrder(NatSet& boundUniquely) const; Term* collapseTo(int argNr); Vector argArray; // // Flags for compiling patterns. // bool id0CollapsePossible; // possible collapse to argArray[1] bool id1CollapsePossible; // possible collapse to argArray[0] bool idemCollapsePossible; // possible collapse with argArray[0] = argArray[1] }; inline CUI_Symbol* CUI_Term::symbol() const { return static_cast(Term::symbol()); } #endif Maude-Maude3.2/src/CUI_Theory/CUI_Theory.hh000066400000000000000000000021471420036611000204160ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Forward declarations for CUI theory classes. // #ifndef _CUI_Theory_hh_ #define _CUI_Theory_hh_ class CUI_Symbol; class CUI_Term; class CUI_ArgumentIterator; class CUI_DagNode; class CUI_DagArgumentIterator; class CUI_LhsAutomaton; class CUI_RhsAutomaton; #endif Maude-Maude3.2/src/CUI_Theory/CUI_UnificationSubproblem.cc000066400000000000000000000076521420036611000234430ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2020 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class CUI_UnificationSubproblem. // // utility stuff #include "macros.hh" #include "vector.hh" #include "indent.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "variable.hh" #include "CUI_Theory.hh" // interface class definitions #include "dagNode.hh" // core class definitions #include "variableInfo.hh" #include "unificationContext.hh" #include "localBinding.hh" // variable class definitions #include "variableSymbol.hh" #include "variableDagNode.hh" // CUI theory class definitions #include "CUI_Symbol.hh" #include "CUI_DagNode.hh" #include "CUI_UnificationSubproblem.hh" CUI_UnificationSubproblem::CUI_UnificationSubproblem() { DebugAdvisory("Created CUI_UnificationSubproblem() base " << ((void*) this)); } CUI_UnificationSubproblem::~CUI_UnificationSubproblem() { } void CUI_UnificationSubproblem::markReachableNodes() { for (const Problem& p : problems) { int nrFragile = p.savedSubstitution.nrFragileBindings(); for (int j = 0; j < nrFragile; j++) { if (DagNode* d = p.savedSubstitution.value(j)) d->mark(); } } } void CUI_UnificationSubproblem::addUnification(DagNode* lhs, DagNode* rhs, bool marked, UnificationContext& /* solution */) { DebugEnter(lhs << " vs " << rhs); Assert(marked == false, "this class shouldn't get collapse problems"); problems.append(Problem(safeCast(CUI_DagNode*, lhs), safeCast(CUI_DagNode*, rhs))); } bool CUI_UnificationSubproblem::solve(bool findFirst, UnificationContext& solution, PendingUnificationStack& pending) { int nrProblems = problems.size(); int i; if (findFirst) { i = 0; forward: for (; i < nrProblems; ++i) { Problem& p = problems[i]; // // Save state before solving this problem. // p.savedSubstitution.clone(solution); p.savedPendingState = pending.checkPoint(); p.reverseTried = false; DebugInfo("trying " << (DagNode*) p.lhs << " vs " << (DagNode*) p.rhs << " forwards"); if (!(p.lhs->getArgument(0)->computeSolvedForm(p.rhs->getArgument(0), solution, pending) && p.lhs->getArgument(1)->computeSolvedForm(p.rhs->getArgument(1), solution, pending))) goto backtrack; } return true; } else { i = nrProblems - 1; backtrack: for (; i >= 0; --i) { Problem& p = problems[i]; if (!p.reverseTried) { // // Restore the state to what it was before we solved this problem the first time. // solution.restoreFromClone(p.savedSubstitution); pending.restore(p.savedPendingState); DebugInfo("trying " << (DagNode*) p.lhs << " vs " << (DagNode*) p.rhs << " backwards"); if (p.lhs->getArgument(0)->computeSolvedForm(p.rhs->getArgument(1), solution, pending) && p.lhs->getArgument(1)->computeSolvedForm(p.rhs->getArgument(0), solution, pending)) { p.reverseTried = true; ++i; goto forward; } } } } // // Restore initial state. // Problem& p = problems[0]; solution.restoreFromClone(p.savedSubstitution); pending.restore(p.savedPendingState); return false; } Maude-Maude3.2/src/CUI_Theory/CUI_UnificationSubproblem.hh000066400000000000000000000051331420036611000234450ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2020 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for unification subproblems in the C theory. // It consists of a vector of unification problems of the form // f(u, v) =? f(s, t) where f is a C symbol. // #ifndef _CUI_UnificationSubproblem_hh_ #define _CUI_UnificationSubproblem_hh_ #include "unificationSubproblem.hh" #include "simpleRootContainer.hh" #include "substitution.hh" #include "pendingUnificationStack.hh" class CUI_UnificationSubproblem : public UnificationSubproblem, private SimpleRootContainer { NO_COPYING(CUI_UnificationSubproblem); public: CUI_UnificationSubproblem(); ~CUI_UnificationSubproblem(); void addUnification(DagNode* lhs, DagNode* rhs, bool marked, UnificationContext& solution); bool solve(bool findFirst, UnificationContext& solution, PendingUnificationStack& pending); #ifdef DUMP //void dump(ostream& s, const VariableInfo& variableInfo, int indentLevel); #endif private: struct Problem { Problem(CUI_DagNode* lhs, CUI_DagNode* rhs); Problem(const Problem& original); CUI_DagNode* const lhs; CUI_DagNode* const rhs; Substitution savedSubstitution; PendingUnificationStack::Marker savedPendingState; bool reverseTried; }; void markReachableNodes(); Vector problems; }; inline CUI_UnificationSubproblem::Problem::Problem(CUI_DagNode* lhs, CUI_DagNode* rhs) : lhs(lhs), rhs(rhs), savedSubstitution(0) { } inline CUI_UnificationSubproblem::Problem::Problem(const Problem& original) : lhs(original.lhs), rhs(original.rhs), savedSubstitution(0) // HACK { // // This is only a partial copy constructor - it copies the first two // data members, which is what is needed for addUnification(). We also // need to initialize saveSubstitution because Substitution has no // default constructor. // } #endif Maude-Maude3.2/src/CUI_Theory/CUI_UnificationSubproblem2.cc000066400000000000000000000325111420036611000235150ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2020 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class CUI_UnificationSubproblem2. // // utility stuff #include "macros.hh" #include "vector.hh" #include "indent.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "variable.hh" #include "CUI_Theory.hh" // interface class definitions #include "dagNode.hh" // core class definitions #include "variableInfo.hh" #include "unificationContext.hh" #include "localBinding.hh" // variable class definitions #include "variableSymbol.hh" #include "variableDagNode.hh" // CUI theory class definitions #include "CUI_Symbol.hh" #include "CUI_DagNode.hh" #include "CUI_UnificationSubproblem2.hh" CUI_UnificationSubproblem2::CUI_UnificationSubproblem2() { DebugAdvisory("Created CUI_UnificationSubproblem2() base " << ((void*) this)); } CUI_UnificationSubproblem2::~CUI_UnificationSubproblem2() { } void CUI_UnificationSubproblem2::markReachableNodes() { for (const Problem& p : problems) { int nrFragile = p.savedSubstitution.nrFragileBindings(); for (int j = 0; j < nrFragile; j++) { if (DagNode* d = p.savedSubstitution.value(j)) d->mark(); } } } bool CUI_UnificationSubproblem2::leftCollapse(DagNode* leftArg, CUI_Symbol* topSymbol, UnificationContext& solution) { if (topSymbol->leftId()) { if (VariableDagNode* var = dynamic_cast(leftArg)) { VariableDagNode* rep = var->lastVariableInChain(solution); DagNode* binding = solution.value(rep->getIndex()); if (binding != 0 && binding->equal(topSymbol->getIdentityDag())) return true; } // // We expect that dags will be normalized before unifying so // we should never see identity underneath us. // Assert(!(leftArg->equal(topSymbol->getIdentityDag())),"left arg is identity!"); } return false; } bool CUI_UnificationSubproblem2::rightCollapse(DagNode* rightArg, CUI_Symbol* topSymbol, UnificationContext& solution) { if (topSymbol->rightId()) { if (VariableDagNode* var = dynamic_cast(rightArg)) { VariableDagNode* rep = var->lastVariableInChain(solution); DagNode* binding = solution.value(rep->getIndex()); if (binding != 0 && binding->equal(topSymbol->getIdentityDag())) return true; } // // We expect that dags will be normalized before unifying so // we should never see identity underneath us. // Assert(!(rightArg->equal(topSymbol->getIdentityDag())),"right arg is identity!"); } return false; } bool CUI_UnificationSubproblem2::equivalent(DagNode* first, DagNode* second, UnificationContext& solution) { if (VariableDagNode* var = dynamic_cast(first)) { VariableDagNode* rep = var->lastVariableInChain(solution); DagNode* binding = solution.value(rep->getIndex()); first = binding ? binding : rep; } if (VariableDagNode* var = dynamic_cast(second)) { VariableDagNode* rep = var->lastVariableInChain(solution); DagNode* binding = solution.value(rep->getIndex()); second = binding ? binding : rep; } return first->equal(second); } void CUI_UnificationSubproblem2::addUnification(DagNode* lhs, DagNode* rhs, bool marked, UnificationContext& solution) { DebugEnter(lhs << " vs " << rhs); #ifdef CUI_DEBUG cout << "add " << lhs << " =? " << rhs << endl; cout << "context:\n"; solution.dump(cout); #endif CUI_DagNode* l = safeCast(CUI_DagNode*, lhs); CUI_Symbol* topSymbol = l->symbol(); NatSet legalAlternatives; if (rhs->symbol() == topSymbol) { // // f(u, v) =? f(s, t) cases. // CUI_DagNode* r = safeCast(CUI_DagNode*, rhs); // // Check for degenerate cases. // if (leftCollapse(l->getArgument(0), topSymbol, solution)) { addUnification(rhs, l->getArgument(1), false, solution); return; } if (rightCollapse(l->getArgument(1), topSymbol, solution)) { addUnification(rhs, l->getArgument(0), false, solution); return; } if (leftCollapse(r->getArgument(0), topSymbol, solution)) { addUnification(lhs, r->getArgument(1), false, solution); return; } if (rightCollapse(r->getArgument(1), topSymbol, solution)) { addUnification(lhs, r->getArgument(0), false, solution); return; } // // Main case. // legalAlternatives.insert(FORWARDS); // // Will swappping the arguments make a difference? // bool lhsArgEquiv = equivalent(l->getArgument(0), l->getArgument(1), solution); bool rhsArgEquiv = equivalent(r->getArgument(0), r->getArgument(1), solution); if (topSymbol->comm() && !lhsArgEquiv && !rhsArgEquiv) legalAlternatives.insert(REVERSE); // // Left id collapse on each side. // if (topSymbol->leftId()) { legalAlternatives.insert(LHS_ARG0_TAKES_ID); legalAlternatives.insert(RHS_ARG0_TAKES_ID); if (topSymbol->rightId()) { // // Right id collapse on each side, if it is different from // left id collapse. // if (!lhsArgEquiv) legalAlternatives.insert(LHS_ARG1_TAKES_ID); if (!rhsArgEquiv) legalAlternatives.insert(RHS_ARG1_TAKES_ID); } } else if (topSymbol->rightId()) { // // Left id collapse on each side. // legalAlternatives.insert(LHS_ARG1_TAKES_ID); legalAlternatives.insert(RHS_ARG1_TAKES_ID); } } else { // // f(u, v) =? X and f(u, v) =? g(...) cases. // if (equivalentToGroundDag(rhs, topSymbol->getIdentityDag(), solution)) { // // Actually both arguments have to take identity regardless // of whether identity is left, right or two sided. This // is just a convenient way of getting this effect. // legalAlternatives.insert(LHS_ARG0_TAKES_ID); // only option } else if (leftCollapse(l->getArgument(0), topSymbol, solution)) legalAlternatives.insert(LHS_ARG0_TAKES_ID); // only option else if (rightCollapse(l->getArgument(1), topSymbol, solution)) legalAlternatives.insert(LHS_ARG1_TAKES_ID); // only option else { if (topSymbol->leftId()) legalAlternatives.insert(LHS_ARG0_TAKES_ID); // // We only do both collapses if the arguments are distinct // in order to reduce redundant solutions. // if (topSymbol->rightId() && (!(topSymbol->leftId()) || !(equivalent(l->getArgument(0), l->getArgument(1), solution)))) legalAlternatives.insert(LHS_ARG1_TAKES_ID); if (!marked) { // // If we're marked we're obliged to collapse to a subterm. // If we're not marked and rhs is a variable we need to // consider X |-> purification of f(u, v) if X is free OR // X =? f(u, v) if X is bound. // if (dynamic_cast(rhs) != 0) legalAlternatives.insert(RHS_VARIABLE_TAKES_ALL); } } } problems.append(Problem(l, rhs, legalAlternatives)); } bool CUI_UnificationSubproblem2::Problem::findAlternative(bool first, UnificationContext& solution, PendingUnificationStack& pending) { if (first) alternative = FORWARDS; else { solution.restoreFromClone(savedSubstitution); pending.restore(savedPendingState); ++alternative; } while (alternative != NO_MORE_ALTERNATIVES) { if (legalAlternatives.contains(alternative)) { savedSubstitution.clone(solution); savedPendingState = pending.checkPoint(); if (tryAlternative(solution, pending)) return true; solution.restoreFromClone(savedSubstitution); pending.restore(savedPendingState); } ++alternative; } return false; } bool CUI_UnificationSubproblem2::Problem::tryAlternative(UnificationContext& solution, PendingUnificationStack& pending) { switch (alternative) { case FORWARDS: { CUI_DagNode* r = safeCast(CUI_DagNode*, rhs); #ifdef CUI_DEBUG cout << "trying forwards: " << lhs->getArgument(0) << " =? " << r->getArgument(0) << " /\\ " << lhs->getArgument(1) << " =? " << r->getArgument(1) << endl; #endif return lhs->getArgument(0)->computeSolvedForm(r->getArgument(0), solution, pending) && lhs->getArgument(1)->computeSolvedForm(r->getArgument(1), solution, pending); } case REVERSE: { CUI_DagNode* r = safeCast(CUI_DagNode*, rhs); #ifdef CUI_DEBUG cout << "trying reverse: " << lhs->getArgument(0) << " =? " << r->getArgument(1) << " /\\ " << lhs->getArgument(1) << " =? " << r->getArgument(0) << endl; #endif return lhs->getArgument(0)->computeSolvedForm(r->getArgument(1), solution, pending) && lhs->getArgument(1)->computeSolvedForm(r->getArgument(0), solution, pending); } case LHS_ARG0_TAKES_ID: { DagNode* id = lhs->symbol()->getIdentityDag(); #ifdef CUI_DEBUG cout << "trying lhs arg0 takes id: " << lhs->getArgument(0) << " =? " << id << " /\\ " << lhs->getArgument(1) << " =? " << rhs << endl; #endif return lhs->getArgument(0)->computeSolvedForm(id, solution, pending) && lhs->getArgument(1)->computeSolvedForm(rhs, solution, pending); } case LHS_ARG1_TAKES_ID: { DagNode* id = lhs->symbol()->getIdentityDag(); #ifdef CUI_DEBUG cout << "trying lhs arg1 takes id: " << lhs->getArgument(1) << " =? " << id << " /\\ " << lhs->getArgument(0) << " =? " << rhs << endl; #endif return lhs->getArgument(1)->computeSolvedForm(id, solution, pending) && lhs->getArgument(0)->computeSolvedForm(rhs, solution, pending); } case RHS_ARG0_TAKES_ID: { CUI_DagNode* r = safeCast(CUI_DagNode*, rhs); DagNode* id = lhs->symbol()->getIdentityDag(); #ifdef CUI_DEBUG cout << "trying rhs arg0 takes id: " << r->getArgument(0) << " =? " << id << " /\\ " << r->getArgument(1) << " =? " << rhs << endl; #endif return r->getArgument(0)->computeSolvedForm(id, solution, pending) && r->getArgument(1)->computeSolvedForm(lhs, solution, pending); } case RHS_ARG1_TAKES_ID: { CUI_DagNode* r = safeCast(CUI_DagNode*, rhs); DagNode* id = lhs->symbol()->getIdentityDag(); #ifdef CUI_DEBUG cout << "trying rhs arg1 takes id: " << r->getArgument(1) << " =? " << id << " /\\ " << r->getArgument(0) << " =? " << rhs << endl; #endif return r->getArgument(1)->computeSolvedForm(id, solution, pending) && r->getArgument(0)->computeSolvedForm(lhs, solution, pending); } case RHS_VARIABLE_TAKES_ALL: { VariableDagNode* r = safeCast(VariableDagNode*, rhs); VariableDagNode* r2 = r->lastVariableInChain(solution); DagNode* d = solution.value(r2->getIndex()); #ifdef CUI_DEBUG cout << "trying rhs take all: " << "rhs = " << (DagNode*) r << " = " << (DagNode*) r2 << " |-> " << d << " lhs = " << lhs << endl; #endif if (d == 0) { // // Because we need to achieve a consistent simultaneous solution to // all equations in our theory including those that are bindings // into our theory that we didn't bother to unsolve, we need to // avoid making any binding that gives rise to an occur-check // failure local to our theory. We cannot cheat like we do in // pure commutativity and rely on compound cycle detection because // we have a collapse axiom. // Even if an occur-check failure is resolvable by collapse we // fail here because the collapse will have been tried on some // other branch. // if (lhs->indirectOccursCheck(r2, solution)) return false; // // Need to bind this to purified ourselves to avoid generating the same problem again. // CUI_DagNode* purified = lhs->makePurifiedVersion(solution, pending); #ifdef CUI_DEBUG cout << "purified " << lhs << " to " << purified << endl; #endif solution.unificationBind(r2, purified); return true; } #ifdef CUI_DEBUG cout << "solving " << d << " =? " << lhs << endl; #endif return d->computeSolvedForm(lhs, solution, pending); } } CantHappen("nonexistent alternative"); return false; } bool CUI_UnificationSubproblem2::solve(bool findFirst, UnificationContext& solution, PendingUnificationStack& pending) { int nrProblems = problems.size(); DebugInfo("have " << nrProblems << " problems"); int i; if (findFirst) { i = 0; forward: for (; i < nrProblems; ++i) { Problem& p = problems[i]; if (!(p.findAlternative(true, solution, pending))) { --i; goto backtrack; } } return true; } else { i = nrProblems - 1; backtrack: for (; i >= 0; --i) { Problem& p = problems[i]; if (p.findAlternative(false, solution, pending)) { ++i; goto forward; } } } return false; } Maude-Maude3.2/src/CUI_Theory/CUI_UnificationSubproblem2.hh000066400000000000000000000104051420036611000235250ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2020 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for unification subproblems in the CU, U, Ul and Ur theories. // It consists of a vector of subproblems of the forms f(u, v) =? f(s, t) or // f(u, v) =? X or f(u, v) = g(...) where f is a CUI symbol and X is a variable and // g is an alien symbol. // #ifndef _CUI_UnificationSubproblem2_hh_ #define _CUI_UnificationSubproblem2_hh_ #include "unificationSubproblem.hh" #include "simpleRootContainer.hh" #include "substitution.hh" #include "pendingUnificationStack.hh" #include "natSet.hh" #include "variableDagNode.hh" #include "unificationContext.hh" class CUI_UnificationSubproblem2 : public UnificationSubproblem, private SimpleRootContainer { NO_COPYING(CUI_UnificationSubproblem2); public: CUI_UnificationSubproblem2(); ~CUI_UnificationSubproblem2(); void addUnification(DagNode* lhs, DagNode* rhs, bool marked, UnificationContext& solution); bool solve(bool findFirst, UnificationContext& solution, PendingUnificationStack& pending); #ifdef DUMP //void dump(ostream& s, const VariableInfo& variableInfo, int indentLevel); #endif private: enum Alternatives { FORWARDS, REVERSE, LHS_ARG0_TAKES_ID, LHS_ARG1_TAKES_ID, RHS_ARG0_TAKES_ID, RHS_ARG1_TAKES_ID, RHS_VARIABLE_TAKES_ALL, NO_MORE_ALTERNATIVES }; struct Problem { Problem(CUI_DagNode* lhs, DagNode* rhs, const NatSet& legalAlternatives); Problem(const Problem& original); bool findAlternative(bool first, UnificationContext& solution, PendingUnificationStack& pending); bool tryAlternative(UnificationContext& solution, PendingUnificationStack& pending); CUI_DagNode* const lhs; DagNode* const rhs; NatSet legalAlternatives; Substitution savedSubstitution; PendingUnificationStack::Marker savedPendingState; int alternative; }; void markReachableNodes(); static bool leftCollapse(DagNode* leftArg, CUI_Symbol* topSymbol, UnificationContext& solution); static bool rightCollapse(DagNode* rightArg, CUI_Symbol* topSymbol, UnificationContext& solution); static bool equivalent(DagNode* first, DagNode* second, UnificationContext& solution); static bool equivalentToGroundDag(DagNode* dag, DagNode* groundDag, UnificationContext& solution); Vector problems; }; inline bool CUI_UnificationSubproblem2::equivalentToGroundDag(DagNode* dag, DagNode* groundDag, UnificationContext& solution) { if (dag->equal(groundDag)) return true; if (VariableDagNode* var = dynamic_cast(dag)) { VariableDagNode* rep = var->lastVariableInChain(solution); DagNode* binding = solution.value(rep->getIndex()); if (binding != 0 && binding->equal(groundDag)) return true; } return false; } inline CUI_UnificationSubproblem2::Problem::Problem(CUI_DagNode* lhs, DagNode* rhs, const NatSet& legalAlternatives) : lhs(lhs), rhs(rhs), legalAlternatives(legalAlternatives), savedSubstitution(0) { } inline CUI_UnificationSubproblem2::Problem::Problem(const Problem& original) : lhs(original.lhs), rhs(original.rhs), legalAlternatives(original.legalAlternatives), savedSubstitution(0) { // // This is only a partial copy constructor - it copies the first three // data members, which is what is needed for addUnification(). We also // need to initialize saveSubstitution because Substitution has no // default constructor. // } #endif Maude-Maude3.2/src/CUI_Theory/ChangeLog000077500000000000000000001320431420036611000176770ustar00rootroot000000000000002020-12-11 Steven Eker * CUI_DagNode.cc (CUI_DagNode::instantiate2): take and pass maintainInvariants flag; only normalize and compute sort for ground dag if maintainInvariants == true (CUI_DagNode::instantiateWithReplacement): pass maintainInvariants = false to instantiate() (CUI_DagNode::instantiateWithCopies2): pass maintainInvariants = false to instantiate() * CUI_DagNode.hh (class CUI_DagNode): updated decl for instantiate2() ===================================Maude132=========================================== 2020-09-28 Steven Eker * CUI_UnificationSubproblem.cc (CUI_UnificationSubproblem::markReachableNodes): use range-based for loop * CUI_UnificationSubproblem2.cc (CUI_UnificationSubproblem2::markReachableNodes): use range-based for loop 2020-09-25 Steven Eker * CUI_UnificationSubproblem2.cc (CUI_UnificationSubproblem2::addUnification): optimize f(...) =? f(...) case where there are equal arguments * CUI_UnificationSubproblem2.hh (class CUI_UnificationSubproblem2): added decl for equivalent() * CUI_UnificationSubproblem2.cc (CUI_UnificationSubproblem2::addUnification): use equivalentToGroundDag(), leftCollapse(), rightCollapse() to optimize degenerate cases (CUI_UnificationSubproblem2::equivalent): added * CUI_UnificationSubproblem2.hh (CUI_UnificationSubproblem2::equivalentToGroundDag): added * CUI_UnificationSubproblem2.cc (CUI_UnificationSubproblem2::leftCollapse) (CUI_UnificationSubproblem2::rightCollapse): added Asserts() that we don't see an identity as a argument 2020-09-24 Steven Eker * CUI_UnificationSubproblem2.hh (class CUI_UnificationSubproblem2): added decls for leftCollapse(), rightCollapse() * CUI_UnificationSubproblem2.cc (CUI_UnificationSubproblem2::leftCollapse) (CUI_UnificationSubproblem2::rightCollapse): added 2020-09-23 Steven Eker * CUI_UnificationSubproblem2.cc (CUI_UnificationSubproblem2::Problem::tryAlternative): use indirectOccursCheck() in RHS_VARIABLE_TAKES_ALL case - this fixes some nontermination bugs (CUI_UnificationSubproblem2::Problem::tryAlternative): added explanation for why we need indirectOccursCheck() here * CUI_DagNode.hh (class CUI_DagNode): added decl for indirectOccursCheck() * CUI_DagNode.cc (CUI_DagNode::indirectOccursCheck): added ===================================Maude131=========================================== 2020-09-22 Steven Eker * CUI_UnificationSubproblem2.cc (CUI_UnificationSubproblem2::addUnification) (CUI_UnificationSubproblem2::Problem::tryAlternative): #ifdef out debugging code 2020-09-21 Steven Eker * CUI_UnificationSubproblem2.cc (CUI_UnificationSubproblem2::addUnification): rearrange if statement for better efficiency and to make the intent clear * CUI_DagNode.cc (CUI_DagNode::makePurifiedVersion): fixed bug: only compare arguments and switch them if symbol is actually commutative ===================================Maude130=========================================== 2020-05-20 Steven Eker * CUI_UnificationSubproblem.hh: symmetric changes * CUI_UnificationSubproblem2.hh: deleted default ctor now that we have a default ctor for Vector<> that doesn't require a default ctor for the element type; add comment to copy ctor to explain why it does what it does 2020-05-19 Steven Eker * CUI_UnificationSubproblem2.cc (CUI_UnificationSubproblem2::Problem::tryAlternative): fix bug where we were using r (the original variable) rather than r2 (the representative variable) in 3 places; fix comment: occur checks aren't strictly necessary here 2020-05-18 Steven Eker * CUI_UnificationSubproblem2.cc (CUI_UnificationSubproblem2::Problem::tryAlternative): don't do sort computation for identity element here (CUI_UnificationSubproblem2::Problem::tryAlternative): deleted commented out return false (CUI_UnificationSubproblem2::Problem::tryAlternative): replace can't happen comment with CantHappen() (CUI_UnificationSubproblem2::solve): replaced commented out cout with DebugInfo() * CUI_Symbol.cc (CUI_Symbol::makeUnificationSubproblem): do sort computation for identity element here * CUI_UnificationSubproblem2.cc (CUI_UnificationSubproblem2::addUnification): replace commented out cout with DebugEnter() 2020-05-14 Steven Eker * CUI_UnificationSubproblem.cc (CUI_UnificationSubproblem::addUnification): updated Assert(); turned commented out cerr into DebugEnter() (CUI_UnificationSubproblem::solve): turned commented out couts into DebugInfo()s * CUI_DagNode.cc (CUI_DagNode::computeSolvedFormCommutativeCase): code cleaning and fix out-of-date comments 2020-05-13 Steven Eker * CUI_DagNode.cc (CUI_DagNode::computeSolvedForm2): use DebugEnter() (CUI_DagNode::computeSolvedForm2): updated comments (CUI_DagNode::computeSolvedForm2): rearranged inner if statement (CUI_DagNode::computeSolvedForm2): deleted large amount of commented out code (CUI_DagNode::makePurifiedVersion): cleaned up and expanded comments ===================================Maude128a=========================================== 2019-11-11 Steven Eker * CUI_DagNode.cc (computeBaseSortForGroundSubterms): no early termination in UNIMPLEMENTED case * CUI_UnificationSubproblem2.cc (tryAlternative): pass false to warnAboutUnimplemented arg (4 places) * CUI_DagNode.cc (computeBaseSortForGroundSubterms): take and pass warnAboutUnimplemented * CUI_DagNode.hh (DagNode): updated decl for computeBaseSortForGroundSubterms() ===================================Maude125=========================================== 2017-02-23 Steven Eker * CUI_DagNode.cc (instantiateWithCopies2): ifdef'd out ground flag and sort computation code 2017-02-21 Steven Eker * CUI_DagNode.hh (DagNode): updated decl for instantiateWithReplacement() * CUI_DagNode.cc (instantiateWithReplacement): support lazy contexts 2017-02-17 Steven Eker * CUI_DagNode.hh (DagNode): deleted decl for stackArguments() * CUI_DagNode.cc (stackArguments): deleted * CUI_Symbol.hh (BinarySymbol): updated decl for stackArguments() * CUI_Symbol.cc (stackArguments): support respectFrozen and eagerContext arguments ===================================Maude111b=========================================== 2016-11-10 Steven Eker * CUI_DagNode.hh (DagNode): added decl for copyAll2() * CUI_DagNode.cc (copyAll2): added ===================================Maude111=========================================== 2016-03-24 Steven Eker * CUI_Symbol.hh (BinarySymbol): added decl for computeGeneralizedSort2() * CUI_Symbol.cc (computeGeneralizedSort2): added ===================================Maude110=========================================== 2015-08-05 Steven Eker * CUI_Symbol.hh (BinarySymbol): added declaration for unificationPriority() * CUI_Symbol.cc (unificationPriority): added 2015-07-30 Steven Eker * CUI_DagNode.cc (computeBaseSortForGroundSubterms): call setGround() in ground case ===================================Maude108=========================================== 2013-03-01 Steven Eker * CUI_DagNode.cc (makePurifiedVersion): code cleaning (computeSolvedForm2): use makePurifiedVersion() rather that using in line code 2012-12-21 Steven Eker * CUI_UnificationSubproblem2.cc (tryAlternative): added occur checks * CUI_DagNode.cc (computeBaseSortForGroundSubterms): handle left and right identities (computeSolvedFormCommutativeCase): don't try to deal with the identity case because there is the possibility that a collapse to a lower sort will require non-minimal unsorted unifiers (computeSolvedForm2): handle identity case * CUI_Symbol.cc (canResolveTheoryClash): added * CUI_Symbol.hh (BinarySymbol): added decl for canResolveTheoryClash() * CUI_Symbol.cc (makeUnificationSubproblem): make CUI_UnificationSubproblem2() in identity case * CUI_UnificationSubproblem2.hh: created * CUI_UnificationSubproblem2.cc: created * CUI_DagNode.hh (DagNode): added decl for makePurifiedVersion() * CUI_DagNode.cc (makePurifiedVersion): added 2012-12-19 Steven Eker * CUI_DagNode.cc (computeSolvedFormCommutativeCase): added (computeSolvedForm2): use computeSolvedFormCommutativeCase() * CUI_DagNode.hh (DagNode): added decl for computeSolvedFormCommutativeCase() ===================================Maude96c=========================================== 2012-04-13 Steven Eker * CUI_DagNode.hh (DagNode): updated decl for instantiateWithReplacement(); added decl for instantiateWithCopies2() * CUI_DagNode.cc (instantiateWithReplacement): rewritten to use instantiateWithCopies() on eager positions (instantiateWithCopies2): added 2012-03-29 Steven Eker * CUI_Symbol.hh (BinarySymbol): added declaration for termify * CUI_Symbol.cc (termify): added ===================================Maude96=========================================== 2011-11-22 Steven Eker * CUI_UnificationSubproblem.cc (CUI_UnificationSubproblem::solve): use restoreFromClone() to make sure sort and dagnode information for fresh variables created on the path we just backtrack from are properly cleared from our UnificationContext (2 places) 2010-12-09 Steven Eker * CUI_Symbol.cc (CUI_Symbol::postOpDeclarationPass): don't call rightIdentitySortCheck() if we are commutative ===================================Maude95b=========================================== 2010-10-19 Steven Eker * CUI_Symbol.cc (CUI_Symbol::makeCanonicalCopyEagerUptoReduced): becomes makeCanonicalCopy() with a change of semantics * CUI_Symbol.hh (class CUI_Symbol): makeCanonicalCopyEagerUptoReduced() -> makeCanonicalCopy() ===================================Maude95a=========================================== 2010-09-29 Steven Eker * CUI_Symbol.cc (CUI_Symbol::makeCanonicalCopyEagerUptoReduced): simplify now that we are only passed unreduced nodes; use getCanonicalCopyEagerUptoReduced() * CUI_Symbol.hh (class CUI_Symbol): added decl for makeCanonicalCopyEagerUptoReduced() * CUI_Symbol.cc: added 2010-08-18 Steven Eker * CUI_DagNode.cc (CUI_DagNode::nonVariableSize): deleted * CUI_DagNode.hh (class CUI_DagNode): deleted decl for nonVariableSize() ===================================Maude95=========================================== 2010-08-12 Steven Eker * CUI_DagNode.cc (CUI_DagNode::computeSolvedForm2): use computeSolvedForm() rather than unificationBind() to ensure we don't bind the abstraction variable to an impure term (CUI_DagNode::computeSolvedForm2): use equalt() rather than == for comparing arguments during purification 2010-08-10 Steven Eker * CUI_DagNode.cc (CUI_DagNode::computeSolvedForm2): handle binding of variables, purification and local occurs check 2010-08-03 Steven Eker * CUI_UnificationSubproblem.hh (class CUI_UnificationSubproblem): updated decl for addUnification() * CUI_UnificationSubproblem.cc (CUI_UnificationSubproblem::addUnification): take marked arg 2010-07-29 Steven Eker * CUI_UnificationSubproblem.cc (CUI_UnificationSubproblem::addUnification): take solution argument * CUI_UnificationSubproblem.hh (class CUI_UnificationSubproblem): updated decl for addUnification() ===================================Maude94a=========================================== 2010-06-30 Steven Eker * CUI_DagNode.cc (CUI_DagNode::computeSolvedForm2): use resolveTheoryClash() 2009-12-22 Steven Eker * CUI_DagNode.cc (stackArguments): fixed nasty bug where we were checking the first argument unstackable flag when deciding whether we should stack the second argument 2009-12-02 Steven Eker * CUI_Symbol.hh (class CUI_Symbol): added decl for makeCanonical() * CUI_Symbol.cc (makeCanonical): added ===================================Maude92b=========================================== 2009-07-30 Steven Eker * CUI_Matcher.cc (freeMatch): fix critical bug where pointer to subproblem returned via sp0 was being lost without the subproblem being deleted if the second Subpattern::match() called failed (id0CollapseMatch, id1CollapseMatch, idemCollapseMatch): fix symmetric bugs 2008-12-22 Steven Eker * CUI_Symbol.cc (computeGeneralizedSort): new getSortFunction() convention ===================================Maude92=========================================== 2008-03-23 Steven Eker * CUI_DagNode.cc (computeSolvedForm2): deleted commented out old version * CUI_DagNode.hh (class CUI_DagNode): deleted commented out old decl for computeSolvedForm2() ===================================Maude90a=========================================== 2008-02-12 Steven Eker * CUI_UnificationSubproblem.cc (solve): implemented * CUI_UnificationSubproblem.hh (class CUI_UnificationSubproblem): problems becomes a Vector; delete ProblemList (class CUI_UnificationSubproblem): lhs, rhs of Problem become CUI_DagNode* 2008-02-11 Steven Eker * CUI_UnificationSubproblem.cc: created * CUI_UnificationSubproblem.hh: created * CUI_Symbol.cc (makeUnificationSubproblem): added * CUI_Symbol.hh (class CUI_Symbol): added decl for makeUnificationSubproblem() * CUI_DagNode.cc (computeSolvedForm2): implemented stub 2008-02-08 Steven Eker * CUI_DagNode.cc (computeSolvedForm2): Substitution -> UnificationContext * CUI_DagNode.hh (class CUI_DagNode): updated decl for computeSolvedForm2() 2008-02-05 Steven Eker * CUI_DagNode.cc (computeSolvedForm2): converted to stub * CUI_DagNode.hh (class CUI_DagNode): updated decl for computeSolvedForm2() 2008-01-17 Steven Eker * CUI_DagNode.cc (computeSolvedForm2): don't pass nrBindings to SolvedFormSubproblemDisjunction ===================================Maude90=========================================== 2008-01-11 Steven Eker * CUI_DagNode.cc (computeSolvedForm2): add missing subproblems.add() in reverse order only case ===================================Maude89j=========================================== 2007-11-12 Steven Eker * CUI_DagNode.cc (instantiate2): check ground flags of arguments; set ground flag in new node if necessary (instantiate2): call normalizeAtTop() rather than just assuming we have a C symbol 2007-11-05 Steven Eker * CUI_DagNode.cc (stackArguments): optimize by not stacking equal arguments in the comm case 2007-11-01 Steven Eker * CUI_DagNode.cc (indexVariables2): added (instantiateWithReplacement): added * CUI_DagNode.hh (class CUI_DagNode): added decls for indexVariables2() and instantiateWithReplacement() * CUI_DagNode.cc (instantiate2): updated * CUI_DagNode.hh (class CUI_DagNode): updated decl for instantiate2() ===================================Maude89h=========================================== 2007-08-24 Steven Eker * CUI_DagNode.cc (computeBaseSortForGroundSubterms): reimplemented * CUI_DagNode.hh (class CUI_DagNode): updated decl for computeBaseSortForGroundSubterms() 2007-08-23 Steven Eker * CUI_DagNode.cc (computeSolvedForm): becomes computeSolvedForm2() * CUI_DagNode.hh (class CUI_DagNode): computeSolvedForm() -> computeSolvedForm2() ===================================Maude89g=========================================== 2007-08-07 Steven Eker * CUI_DagNode.hh (class CUI_DagNode): updated decl for computeSolvedForm() * CUI_DagNode.cc (computeSolvedForm): added extensionInfo argument ===================================Maude89f=========================================== 2007-03-16 Steven Eker * CUI_DagNode.cc (unify, occurs2): deleted * CUI_DagNode.hh (class CUI_DagNode): deleted decls for unify() and occurs2() 2007-03-15 Steven Eker * CUI_DagNode.cc (computeSolvedForm): clear local substitutions * CUI_Symbol.cc (computeGeneralizedSort): pass realToBdd by ref * CUI_Symbol.hh (class CUI_Symbol): fix computeGeneralizedSort() decl ===================================Maude89a=========================================== 2007-03-05 Steven Eker * CUI_DagNode.cc (nonVariableSize): return mpz_class * CUI_DagNode.hh (class CUI_DagNode): nonVariableSize() now returns mpz_class 2007-03-02 Steven Eker * CUI_DagNode.cc (computeSolvedForm): use merge(); don't copy parent substitution (computeSolvedForm): use class SolvedFormSubproblemDisjunction 2007-03-01 Steven Eker * CUI_DagNode.cc (nonVariableSize, insertVariables2): added (computeSolvedForm): added * CUI_DagNode.hh (class CUI_DagNode): added decls for computeSolvedForm(), nonVariableSize() and insertVariables2() ===================================Maude89=========================================== 2007-02-09 Steven Eker * CUI_DagNode.cc (instantiate2): normalize wrt to comm (instantiate2): simplify 2007-02-07 Steven Eker * CUI_DagNode.cc (unify): rewritten using UnificationSubproblemDisjunction and unificationDifference() (unify): check for symmetry; get unifications in the reverse order correct 2007-02-06 Steven Eker * CUI_DagNode.cc (occurs2): added (instantiate2): added (computeBaseSortForGroundSubterms): added (unify): added * CUI_DagNode.hh (class CUI_DagNode): added decls for unify(), computeBaseSortForGroundSubterms(), instantiate2(), occurs2() 2007-02-05 Steven Eker * CUI_Symbol.cc (computeGeneralizedSort): added * CUI_Symbol.hh (class CUI_Symbol): added decl for computeGeneralizedSort() ===================================Maude88f=========================================== 2005-07-28 Steven Eker * CUI_Term.cc (CUI_Term): force symbol arg to be a CUI_Symbol (deepCopy2): handle translation to non-CUI_Symbol * CUI_Term.hh (class CUI_Term): updated decl for SymbolMap* ctor 2005-06-24 Steven Eker * CUI_Term.hh (class CUI_Term): updated decls for SymbolMap* ctor and deepCopy2() * CUI_Term.cc (deepCopy2): rewritten (CUI_Term): SymbolMap* rewritten ===================================Maude86b=========================================== 2003-08-29 Steven Eker * CUI_Symbol.cc (eqRewrite): use applyReplaceNoOwise() (memoStrategy): use applyReplaceNoOwise() ===================================Maude82=========================================== 2003-05-01 Steven Eker * CUI_DagNode.cc (overwriteWithClone): use copySetRewritingFlags() (makeClone): copySetRewritingFlags() ===================================Maude80=========================================== 2003-02-25 Steven Eker * CUI_Term.cc: removed #pragma (CUI_Term): updated Assert() * CUI_Term.hh: removed #pragma * CUI_Symbol.cc: removed #pragma (eqRewrite): updated Assert() (computeBaseSort): updated Assert()s (normalizeAndComputeTrueSort): updated Assert() * CUI_Symbol.hh: removed #pragma * CUI_RhsAutomaton.cc: removed #pragma * CUI_RhsAutomaton.hh: removed #pragma * CUI_Matcher.cc (match): updated Assert() * CUI_LhsCompiler.cc (compileLhs2): updated Assert() * CUI_LhsAutomaton.cc: removed #pragma * CUI_LhsAutomaton.hh: removed #pragma * CUI_DagNode.cc: removed #pragma (copyWithReplacement): updated Assert() (both versions) * CUI_DagNode.hh: removed #pragma (getArgument): updated Assert() * CUI_DagArgumentIterator.cc: removed #pragma (argument): updated Assert() (next): updated Assert() * CUI_DagArgumentIterator.hh: removed #pragma * CUI_ArgumentIterator.cc: removed #pragma (argument): updated Assert() (next): updated Assert() * CUI_ArgumentIterator.hh: removed #pragma ===================================Maude79=========================================== 2003-01-31 Steven Eker * CUI_Term.cc (analyseCollapses): becomes analyseCollapses2() * CUI_Term.hh (class CUI_Term): analyseCollapses() -> analyseCollapses2() ===================================Maude78=========================================== 2002-10-16 Steven Eker * CUI_Symbol.cc (postOpDeclarationPass): becomes postOpDeclarationPass() since sort tables arem't computed at postInterSymbolPass time * CUI_Symbol.hh (class CUI_Symbol): postInterSymbolPass() -> postOpDeclarationPass() 2002-10-08 Steven Eker * CUI_Symbol.hh (class CUI_Symbol): added decl for setFrozen() * CUI_Symbol.cc (setFrozen): added 2002-10-04 Steven Eker * CUI_DagNode.hh (class CUI_DagNode): updated decl for complex version of copyWithReplacement() * CUI_DagNode.cc (copyWithReplacement): complex version: handle the case where we only want to replace one arg * CUI_Symbol.cc (stackArguments): only stack args that aren't frozen or unstackable 2002-10-03 Steven Eker * CUI_DagNode.hh (class CUI_DagNode): updated decl for stackArguments() * CUI_DagNode.cc (stackArguments): handle respectFrozen argument ===================================Maude76================================================== 2002-08-02 Steven Eker * CUI_Term.cc (compileRhs2): added code to flag the last use of each source ===================================Maude74================================================== 2002-04-24 Steven Eker * CUI_RhsAutomaton.cc (dump): don't bother incrementing indentLevel (since we don't have subautomata to output) ===================================Maude72================================================== 2002-01-29 Steven Eker * CUI_LhsAutomaton.hh (class CUI_LhsAutomaton): added friend decl for PatternType << function ===================================Maude70================================================== 2001-04-03 Steven Eker * CUI_DagNode.hh (class CUI_DagNode): added decl for Vector version of copyWithReplacement() * CUI_DagNode.cc (copyWithReplacement): added (Vector version) ===================================Engine66================================================== 2001-03-08 Steven Eker * CUI_Symbol.hh (class CUI_Symbol): added decl for stackArguments() * CUI_Symbol.cc (stackArguments): added ===================================Engine65================================================== 2001-01-26 Steven Eker * CUI_DagNode.hh (class CUI_DagNode): updated markArguments() decl and make it private * CUI_DagNode.cc (markArguments): rewritten with new semantics ===================================Engine64================================================== 2000-08-04 Steven Eker * CUI_Symbol.cc (eqRewrite): greatly simplified now that we no longer treat last strategy zero specially when term is in the error sort (memoStrategy): ditto 2000-07-31 Steven Eker * CUI_Symbol.cc (computeBaseSort): don't handle union sorts ===================================Engine60================================================== 2000-07-28 Steven Eker * CUI_RhsAutomaton.hh (class CUI_RhsAutomaton): added decl for remapIndices() * CUI_RhsAutomaton.cc (remapIndices): added 2000-07-26 Steven Eker * CUI_LhsCompiler.cc (compileLhs2): use getNrProtectedVariables() instead of nrVariables() * CUI_Term.cc (compileRhs2): use makeConstructionIndex() instead of allocateIndex() 2000-07-25 Steven Eker * CUI_Term.cc (findAvailableTerms): don't insert ground terms into availableTerms since we can't do left->right sharing on them * CUI_RhsAutomaton.cc (construct): don't call buildAliens() (replace): don't call buildAliens() (dump): don't call buildAliens() * CUI_Term.hh (class CUI_Term): deleted decls for compileRhs() and findIndex() * CUI_Term.cc (compileRhs): deleted (findIndex): deleted ===================================Engine60================================================== 2000-07-12 Steven Eker * CUI_Term.cc (findAvailableTerms): added (compileRhs2): added * CUI_Term.hh (class CUI_Term): added decls for findAvailableTerms() and compileRhs2() ===================================Engine59================================================== 2000-07-05 Steven Eker * CUI_LhsCompiler.cc (compileLhs): becomes compileLhs2() * CUI_Term.hh: compileLhs() -> compileLhs2() 2000-06-26 Steven Eker * CUI_Term.cc (findIndex): modifiedIndex() -> getModifiedIndex() * CUI_LhsAutomaton.cc (addSubpattern): index() -> getIndex() (addSubpattern): lookupSort() -> getSort() ===================================Engine58================================================== 2000-03-30 Steven Eker * CUI_LhsAutomaton.cc (addSubpattern): need to make topAutomaton for subpattern1 if matchAtTop and IDEM_COLLAPSE; previously we only did this for subpattern0 in the IDEM_COLLAPSE case unless ther was a ID0_COLLAPSE; non-existant topAutomaton cause seg fault * CUI_LhsAutomaton.hh (class CUI_LhsAutomaton): added added comments to clarify enum Flags * CUI_Term.hh (class CUI_Term): added comments to clarify flags * CUI_LhsAutomaton.hh (match): moved comment inside of "if (matchAtTop)" 2000-03-17 Steven Eker * CUI_Term.cc (dump): ifdef'd * CUI_Term.hh (class CUI_Term): use NO_COPYING() macro; ifdef'd dump() decls * CUI_RhsAutomaton.cc (dump): ifdef'd * CUI_RhsAutomaton.hh (class CUI_RhsAutomaton): use NO_COPYING() macro; ifdef'd dump() decls * CUI_LhsAutomaton.cc (dump): ifdef'd (both versions) * CUI_LhsAutomaton.hh (class CUI_LhsAutomaton): use NO_COPYING() macro; ifdef'd dump() decls * CUI_Symbol.cc (eqRewrite): AdvisoryCheck() -> IssueAdvisory() (memoStrategy): AdvisoryCheck() -> IssueAdvisory() ===================================Engine56================================================== 1999-11-03 Steven Eker * CUI_Symbol.hh (class CUI_Symbol): added decl for memoStrategy() * CUI_Symbol.cc (eqRewrite): set seenZero if we see a zero! (eqRewrite): use memoStrategy() in the memo case (memoStrategy): added 1999-10-29 Steven Eker * CUI_Symbol.cc (CUI_Symbol): use new BinarySymbol conventions ===================================Engine53================================================== 1999-10-26 Steven Eker * CUI_LhsAutomaton.cc (addSubpattern): VariableTerm::dynamicCast() -> dynamic_cast() * CUI_LhsCompiler.cc (compileLhs): VariableTerm::dynamicCast() -> dynamic_cast() (*4) * CUI_Term.cc (findIndex): VariableTerm::dynamicCast() -> dynamic_cast() * CUI_Symbol.cc (CUI_Symbol): added memoFlag arg * CUI_Symbol.hh (class CUI_Symbol): added memoFlag arg to ctor decl 1999-10-19 Steven Eker * CUI_DagNode.cc (getHashValue): added * CUI_DagNode.hh (class CUI_DagNode): added data member hashCache (class CUI_DagNode): added decl for getHashValue() ===================================Engine52================================================== 1999-05-12 Steven Eker * CUI_Symbol.hh (class CUI_Symbol): computeTrueSort() -> normalizeAndComputeTrueSort() * CUI_Symbol.cc (computeTrueSort): become normalizeAndComputeTrueSort() (normalizeAndComputeTrueSort): use fastComputeTrueSort() ===================================Engine49================================================== Fri Nov 6 16:24:35 1998 Steven Eker * CUI_Term.cc (deepCopy): -> deepCopy2() * CUI_Term.hh: deepCopy() -> deepCopy2() ===================================Engine43================================================== Thu Oct 8 14:24:30 1998 Steven Eker * CUI_Term.cc (compareArguments): inserted const ===================================Engine41================================================== Fri Sep 18 15:04:48 1998 Steven Eker * CUI_Symbol.cc (computeBaseSort): rewritten using setSortIndex(), traverse(), lookupSortIndex() * CUI_DagNode.cc (overwriteWithClone): use setSortIndex() (makeClone): use setSortIndex() Wed Sep 9 11:49:29 1998 Steven Eker * CUI_Symbol.cc (compileOpDeclarations): do commutativeSortCompletion() before Symbol::compileOpDeclarations() due to new implementation ===================================Engine40================================================== Tue Jul 21 10:29:54 1998 Steven Eker * CUI_Term.hh (class CUI_Term): added decl for new ctor * CUI_Term.cc: added new ctor (deepCopy): added * CUI_Term.hh (class CUI_Term): added decl for deepCopy() ===================================Engine39================================================== Wed Jun 10 14:39:56 1998 Steven Eker * CUI_Symbol.hh (class CUI_Symbol): added decl for postInterSymbolPass() * CUI_Symbol.cc (compileOpDeclarations): no longer do identity stuff here (postInterSymbolPass): added to do identity stuff * CUI_Term.hh (class CUI_Term): updated normalize() decl * CUI_Term.cc (normalize): don't use earlyGetIdentity() (normalize): compute changed flag * CUI_LhsAutomaton.cc: IntSet -> NatSet * CUI_Term.cc: IntSet -> NatSet * CUI_LhsCompiler.cc: IntSet -> NatSet * CUI_Term.hh: IntSet -> NatSet ===================================Engine38================================================== Wed Jun 3 16:37:10 1998 Steven Eker * CUI_Term.cc (normalize): use earlyGetIdentity() ===================================Engine37================================================== Fri Feb 20 17:33:46 1998 Steven Eker * CUI_DagNode.cc (stackArguments): only stack arguments that are not flagged as unstackable ===================================Engine36================================================== Thu Feb 12 14:40:08 1998 Steven Eker * CUI_LhsAutomaton.cc (~CUI_LhsAutomaton): added (CUI_LhsAutomaton): clear all automata pointers at outset to allow for safe destruction at any time. (addSubpattern): no need to clear automata pointers here * CUI_LhsAutomaton.hh (class CUI_LhsAutomaton): added decl for ~CUI_LhsAutomaton() * CUI_Term.cc (normalize): compare() == 0 changed to equal() (2 places) * CUI_Matcher.cc (match): compare() != 0 changed to !equal() (idemCollapseMatch): compare() == 0 changed to equal() (id1CollapseMatch): compare() == 0 changed to equal() * CUI_LhsCompiler.cc (analyseConstraintPropagation):compare() == 0 changed to equal() (compileLhs): compare() == 0 changed to equal() * CUI_DagNode.cc (normalizeAtTop): compare() == 0 changed to equal() (2 places) * CUI_LhsAutomaton.hh (match): compare() == 0 changed to equal() (2 places) =============================Engine35======================================================== Tue Dec 23 13:27:27 1997 Steven Eker * CUI_LhsCompiler.cc (compileLhs): use greedySafe() Wed Dec 10 16:44:50 1997 Steven Eker * CUI_LhsAutomaton.cc (addSubpattern): added a real ugly hack to prevent first topAutomaton being compiled for greedy matching in idem case because even if variables are not shared between subterms, extension is. Fri Dec 5 14:45:23 1997 Steven Eker * CUI_Symbol.cc (compileOpDeclarations): call leftIdentitySortCheck(), rightIdentitySortCheck() and idempotentSortCheck() if needed Thu Dec 4 10:43:15 1997 Steven Eker * CUI_Matcher.cc (id1CollapseMatch): only exclude the case where the subject (portion of subject) matched is our identity if ID0_COLLAPSE; otherwise we miss matches if we only have a right identity * CUI_Symbol.cc (CUI_Symbol): deleted inert arg * CUI_Symbol.hh (class CUI_Symbol): deleted inert arg from ctor decl * CUI_LhsAutomaton.cc (dump): removed extra \t (Subpattern::dump): print ground alien correctly * CUI_LhsCompiler.cc (compileLhs): make flags an int to avoid conversion from `int' to `enum CUI_LhsAutomaton::Flags warning Wed Dec 3 11:14:09 1997 Steven Eker * CUI_LhsCompiler.cc (compileLhs): heavily rewritten to use flags and handle non-comm case; also comm case optimized in that we set forward and reverse flags to avoid checking other possibility in the case where the subterms are stable and have different top symbols * CUI_Matcher.cc: commMatch() -> freeMatch() throughout * CUI_LhsAutomaton.hh (class CUI_LhsAutomaton): commMatch() -> freeMatch() * CUI_LhsAutomaton.cc (CUI_LhsAutomaton): rewritten to use Flags (addSubpattern): rewritten to use Flags (operator<<): added (Flags version) (dump): now print flags * CUI_Matcher.cc (match): rewritten to use Flags * CUI_LhsAutomaton.hh (class CUI_LhsAutomaton): deleted idempotent and subpatternsDistinct data memebers (class CUI_LhsAutomaton): redesigned around new enum Flags * CUI_Matcher.cc (match): use forward, reverse and conditional reverse flags to handle non-commutative case * CUI_LhsCompiler.cc (analyseConstraintPropagation): handle non-commutative case Tue Dec 2 10:24:34 1997 Steven Eker * CUI_DagNode.cc (copyEagerUptoReduced2): rewritten to deal with non-permutative strategies (normalizeAtTop): rewritten to handle non-commutative case (collapseTo): rewritten to deal with non-permutative strategies * CUI_Symbol.hh (comm): added (leftId): added (rightId): added (idem): updated * CUI_Term.cc (normalize): rewritten to handle non-commutative case (findEagerVariables): rewritten to deal with non-permutative strategies (markEagerArguments): rewritten to deal with non-permutative strategies (analyseCollapses): deal with seperate left and right identity axioms * CUI_Symbol.cc (CUI_Symbol): take axioms arg; call setStrategy() if not commutative (eqRewrite): rewritten to deal with non-permutative strategies * CUI_Symbol.hh (class CUI_Symbol): idemFlag data member deleted, axioms data memeber added, enum Axioms added, ctor decl now take Axioms arg Mon Dec 1 12:34:48 1997 Steven Eker * CUI_DagNode.cc (copyEagerUptoReduced2): use getPermuteStrategy(); PermuteSymbol -> BinarySymbol (collapseTo): use getPermuteStrategy(); PermuteSymbol -> BinarySymbol * CUI_Term.cc (findEagerVariables): use getPermuteStrategy(); PermuteSymbol -> BinarySymbol (*3) (markEagerArguments): use getPermuteStrategy(); PermuteSymbol -> BinarySymbol * CUI_Symbol.cc (CUI_Symbol): PermuteSymbol -> BinarySymbol; call setPermuteStrategy() (eqRewrite): use getPermuteStrategy() (*3) * CUI_Symbol.hh (class CUI_Symbol): PermuteSymbol -> BinarySymbol Tue Nov 25 10:20:05 1997 Steven Eker * CUI_LhsAutomaton.cc (dump): implemented * CUI_LhsAutomaton.hh (class CUI_LhsAutomaton): updated dump() decl (class CUI_LhsAutomaton): unionized struct Subpattern (class CUI_LhsAutomaton): added decl for Subpattern::dump() * CUI_RhsAutomaton.cc (buildAliens): deleted (dump): implemented * CUI_RhsAutomaton.hh (addAlien): deleted (class CUI_RhsAutomaton): deleted decls for buildAliens(), addAlien(); deleted data member aliens; update decl for dump() =============================Engine33======================================================== Tue Nov 18 16:36:36 1997 Steven Eker * CUI_Term.cc (dumpArguments): deleted (dump): added * CUI_Term.hh (class CUI_Term): deleted decls for compileLhsNonCollapse(), compileLhsCollapse() and addSubterm() (class CUI_Term): dumpArguments() decl now passes variableInfo by ref; removed const; switch varableInfo, indentLevel args (class CUI_Term): dumpArguments() decl becomes dump() * CUI_LhsCompiler.cc (compileLhs): incorporate compileLhsNonCollapse() and compileLhsCollapse() since these are now very similar (compileLhsNonCollapse): deleted (compileLhsCollapse): deleted =============================Engine32======================================================== Tue Nov 11 10:22:20 1997 Steven Eker * CUI_LhsAutomaton.hh (class CUI_LhsAutomaton): removed comment that id1CollapsePossible implies subpatternsDistinct as we no longer ensure this; we don't generate repeated solutions since if we have a collapse and the subpatterns are identical then (1) we are not idempotent and (2) the only thing we could match by collapse is identity and this case is caught in id1CollapseMatch() * CUI_LhsAutomaton.cc (addSubpattern): in the variable case we need to insert variable into boundUniquely if we are in the uniqueBranch situation * CUI_Theory.hh: deleted forward decl for class CUI_Subproblem * CUI_DagNode.hh (class CUI_DagNode): revoke friendship for class CUI_Subproblem since this class won't be created * CUI_LhsCompiler.cc (compileLhsCollapse): pass greedy to ctor; removed call to complete() (compileLhsCollapse): take greedy into spl calculation (compileLhsNonCollapse): pass greedy to ctor; removed call to complete() (compileLhsNonCollapse): use addSubpattern() in place of addSubterm() (addSubterm): deleted * CUI_LhsAutomaton.cc (operator<<): added * CUI_LhsAutomaton.hh (class CUI_LhsAutomaton): greedyMatchOK data member becomes const * CUI_LhsAutomaton.cc (complete): deleted (CUI_LhsAutomaton): added greedyMatchOK arg * CUI_LhsAutomaton.hh (class CUI_LhsAutomaton): boundUniquely arg to addSubpattern() no longer const (class CUI_LhsAutomaton): ctor takes greedyMatchOK arg (class CUI_LhsAutomaton): deleted decl for complete() (class CUI_LhsAutomaton): UNSET -> UNDEFINED * CUI_LhsAutomaton.cc (addGroundAlien): deleted (addTopVariable): deleted (addNonGroundAlien): deleted (addSubpattern): now handle uniqueBranch case * CUI_LhsAutomaton.hh (class CUI_LhsAutomaton): deleted decls for addGroundAlien(), addTopVariable(), addNonGroundAlien() * CUI_Matcher.cc (id1CollapseMatch): reject matches where subject (or in extension case matched portion) is our identity since these solutionns will have already been found on the id0Collapse branch (idemCollapseMatch): (non-ex) reject matches where subject is our identity (idemCollapseMatch): (ex) add EqualitySubproblem to reject matches where matched portion is our identity Mon Nov 10 11:59:54 1997 Steven Eker * CUI_LhsCompiler.cc (compileLhsCollapse): use addSubpattern() * CUI_LhsAutomaton.cc (addSubpattern): added * CUI_Term.hh (class CUI_Term): added decls for compileLhsNonCollapse() and compileLhsCollapse() * CUI_LhsCompiler.cc (compileLhs): main code split off into compileLhsCollapse() and compileLhsNonCollapse() (compileLhsNonCollapse): created (addSubterm): standard automata are always compiled with matchAtTop = false (compileLhsCollapse): added Fri Nov 7 10:01:16 1997 Steven Eker * CUI_LhsCompiler.cc (compileLhs): if one subterm is variable and other is not match variable last to improve substitution (addSubterm): in variable case when we have unique branch, update boundUniquely * CUI_Matcher.cc (match): fixed bug where we were passing solution rather than local to simpler matching functions * CUI_Term.cc (normalize): set hash value in the case we don't collapse * CUI_LhsAutomaton.cc (addNonGroundAlien): added (addTopVariable): added (addGroundAlien): added * CUI_Term.hh (class CUI_Term): added decl for addSubterm() * CUI_LhsCompiler.cc (analyseConstraintPropagation): check for ground() before testing for willGroundOutMatch() (addSubterm): added (compileLhs): rewritten Thu Nov 6 10:30:42 1997 Steven Eker * CUI_LhsAutomaton.hh (class CUI_LhsAutomaton): added decls for ctor and complete() * CUI_LhsAutomaton.cc (complete): added (CUI_LhsAutomaton): added * CUI_LhsCompiler.cc (betterToReverseOrder): moved here from CUI_Term.cc (analyseConstraintPropagation): moved here from CUI_Term.cc (compileLhs): moved here from CUI_Term.cc * CUI_Term.cc (insertAbstractionVariables): deleted * CUI_Term.hh (class CUI_Term): deleted decl for insertAbstractionVariables() * CUI_Matcher.cc (idemCollapseMatch): ExtensionMatchSubproblem() needs nrVariables arg (match): handle non-collapse failure efficiently * CUI_LhsAutomaton.hh (class CUI_LhsAutomaton): deleted abstractionVariable data member * CUI_Matcher.cc (idemCollapseMatch): (non-ext version) rewritten to use new Subpattern::match(); now deals correctly with matchAtTop case when there is no extension (idemCollapseMatch): (ext version) deleted null subproblem special case; since our new extensionInfo convention allows us to return both a subproblem and valid extensionInfo we don't need this case; The speed up of handling this special case is marginal since we must be at top we will not lose any constraint propagation by delaying second subterm match until solve phase. BTW this case should be very rare anyway. Use class ExtensionMatchSubproblem an avoid the need for abstraction variables. (match): simplified by using ?: within if() Wed Nov 5 09:56:45 1997 Steven Eker * CUI_Matcher.cc (id0CollapseMatch): rewritten to use new Subpattern::match() (id1CollapseMatch): made symmetric with id0CollapseMatch() * CUI_LhsAutomaton.hh (class CUI_LhsAutomaton): added matchAtTop and extensionInfo args to Subpattern::match() (match): added matchAtTop and extensionInfo args * CUI_Matcher.cc (match): removed uniqueBranch code from from collapse cases * CUI_Term.cc (analyseConstraintPropagation): simplified and bug fixed; don't bother with analysis in collapse cases; take honorGroundOutMatch into account; make sure that subterms are match idependent before calling betterToReverseOrder(); treat subterms the same as a special case (betterToReverseOrder): remove test for collapse since this will be done in caller * CUI_Matcher.cc (match): rewritten to use uniqueBranch * CUI_LhsAutomaton.hh (class CUI_LhsAutomaton): extAutomaton -> topAutomaton since we may need to clone subject when matching at top. * CUI_Matcher.cc (id0CollapseMatch): rewritten to make use of the fact that identity dags are now safe from garbage collection and aboid the need for an abstraction variable (id1CollapseMatch): added; symmetric with id0CollapseMatch() * CUI_Term.hh (class CUI_Term): added decls for betterToReverseOrder(), id0CollapsePossible and id1CollapsePossible * CUI_Term.cc (analyseCollapses): use Term::commonSymbols(); set idemCollapsePossible (analyseCollapses): set id0CollapsePossible and id1CollapsePossible (betterToReverseOrder): added (analyseConstraintPropagation): implemented * CUI_Term.hh (class CUI_Term): added data member idemCollapsePossible * CUI_LhsAutomaton.hh (class CUI_LhsAutomaton): added uniqueBranch and collapsePossible data members Tue Nov 4 17:13:59 1997 Steven Eker * CUI_LhsAutomaton.hh (class CUI_LhsAutomaton): added idempotent and matchAtTop data members * CUI_Matcher.cc (match): in non collapse case don't try 2nd possibility if subpatterns are the same or subject subterms are the same. * CUI_LhsAutomaton.hh (class CUI_LhsAutomaton): added subpatternsDistinct data member Mon Nov 3 12:02:21 1997 Steven Eker * CUI_LhsAutomaton.cc: created * CUI_LhsAutomaton.hh (class CUI_LhsAutomaton): created * CUI_Matcher.cc: greatly simplified from rought draft using DisjunctiveSubproblemAccumulator =============================Engine31======================================================== Tue Oct 21 12:36:47 1997 Steven Eker * CUI_Term.cc (dagify2): switched decl to new convention * CUI_Term.hh (class CUI_Term): switched dagify2() decl to new convention Fri Oct 17 10:37:12 1997 Steven Eker * CUI_ArgumentIterator.hh (CUI_ArgumentIterator): initialize position to 0, not 2 * CUI_Term.cc (normalize): fixed bug in 2nd id collapse case * CUI_DagNode.cc (normalizeAtTop): fixed bug in 2nd id collapse case * CUI_Term.cc: created * CUI_ArgumentIterator.hh (class CUI_ArgumentIterator): created * CUI_ArgumentIterator.cc: created * CUI_RhsAutomaton.cc: created * CUI_RhsAutomaton.hh (class CUI_RhsAutomaton): created * CUI_Term.hh: created Thu Oct 16 17:33:23 1997 Steven Eker * CUI_Symbol.hh (idem): added (class CUI_Symbol): added decl for idem() * CUI_DagNode.hh (class CUI_DagNode): added decl for collapseTo() * CUI_DagNode.cc (collapseTo): added * CUI_DagArgumentIterator.cc: created * CUI_DagArgumentIterator.hh (class CUI_DagArgumentIterator): created * CUI_DagNode.cc: created * CUI_DagNode.hh (class CUI_DagNode): created * CUI_Symbol.cc: created * CUI_Symbol.hh (class CUI_Symbol): created Maude-Maude3.2/src/CUI_Theory/Makefile.am000066400000000000000000000014101420036611000201470ustar00rootroot00000000000000noinst_LIBRARIES = libCUI_Theory.a libCUI_Theory_a_CPPFLAGS = \ -I$(top_srcdir)/src/Utility \ -I$(top_srcdir)/src/Interface \ -I$(top_srcdir)/src/Core \ -I$(top_srcdir)/src/Variable \ -I$(top_srcdir)/src/FullCompiler libCUI_Theory_a_SOURCES = \ CUI_Symbol.cc \ CUI_DagNode.cc \ CUI_DagArgumentIterator.cc \ CUI_RhsAutomaton.cc \ CUI_Term.cc \ CUI_ArgumentIterator.cc \ CUI_UnificationSubproblem.cc \ CUI_UnificationSubproblem2.cc \ CUI_LhsAutomaton.cc EXTRA_DIST = \ CUI_LhsCompiler.cc \ CUI_Matcher.cc noinst_HEADERS = \ CUI_ArgumentIterator.hh \ CUI_DagArgumentIterator.hh \ CUI_DagNode.hh \ CUI_LhsAutomaton.hh \ CUI_RhsAutomaton.hh \ CUI_Symbol.hh \ CUI_Term.hh \ CUI_UnificationSubproblem.hh \ CUI_UnificationSubproblem2.hh \ CUI_Theory.hh Maude-Maude3.2/src/CUI_Theory/Makefile.in000066400000000000000000001201011420036611000201570ustar00rootroot00000000000000# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/CUI_Theory ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_have_poll.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) AR = ar ARFLAGS = cru AM_V_AR = $(am__v_AR_@AM_V@) am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) am__v_AR_0 = @echo " AR " $@; am__v_AR_1 = libCUI_Theory_a_AR = $(AR) $(ARFLAGS) libCUI_Theory_a_LIBADD = am_libCUI_Theory_a_OBJECTS = libCUI_Theory_a-CUI_Symbol.$(OBJEXT) \ libCUI_Theory_a-CUI_DagNode.$(OBJEXT) \ libCUI_Theory_a-CUI_DagArgumentIterator.$(OBJEXT) \ libCUI_Theory_a-CUI_RhsAutomaton.$(OBJEXT) \ libCUI_Theory_a-CUI_Term.$(OBJEXT) \ libCUI_Theory_a-CUI_ArgumentIterator.$(OBJEXT) \ libCUI_Theory_a-CUI_UnificationSubproblem.$(OBJEXT) \ libCUI_Theory_a-CUI_UnificationSubproblem2.$(OBJEXT) \ libCUI_Theory_a-CUI_LhsAutomaton.$(OBJEXT) libCUI_Theory_a_OBJECTS = $(am_libCUI_Theory_a_OBJECTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = \ ./$(DEPDIR)/libCUI_Theory_a-CUI_ArgumentIterator.Po \ ./$(DEPDIR)/libCUI_Theory_a-CUI_DagArgumentIterator.Po \ ./$(DEPDIR)/libCUI_Theory_a-CUI_DagNode.Po \ ./$(DEPDIR)/libCUI_Theory_a-CUI_LhsAutomaton.Po \ ./$(DEPDIR)/libCUI_Theory_a-CUI_RhsAutomaton.Po \ ./$(DEPDIR)/libCUI_Theory_a-CUI_Symbol.Po \ ./$(DEPDIR)/libCUI_Theory_a-CUI_Term.Po \ ./$(DEPDIR)/libCUI_Theory_a-CUI_UnificationSubproblem.Po \ ./$(DEPDIR)/libCUI_Theory_a-CUI_UnificationSubproblem2.Po am__mv = mv -f AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(libCUI_Theory_a_SOURCES) DIST_SOURCES = $(libCUI_Theory_a_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ $(top_srcdir)/mkinstalldirs ChangeLog DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ BUDDY_LIB = @BUDDY_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FLEX = @FLEX@ GCC_LIBS = @GCC_LIBS@ GMP_LIBS = @GMP_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSIGSEGV_LIB = @LIBSIGSEGV_LIB@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TECLA_LIBS = @TECLA_LIBS@ VERSION = @VERSION@ YICES2_LIB = @YICES2_LIB@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LIBRARIES = libCUI_Theory.a libCUI_Theory_a_CPPFLAGS = \ -I$(top_srcdir)/src/Utility \ -I$(top_srcdir)/src/Interface \ -I$(top_srcdir)/src/Core \ -I$(top_srcdir)/src/Variable \ -I$(top_srcdir)/src/FullCompiler libCUI_Theory_a_SOURCES = \ CUI_Symbol.cc \ CUI_DagNode.cc \ CUI_DagArgumentIterator.cc \ CUI_RhsAutomaton.cc \ CUI_Term.cc \ CUI_ArgumentIterator.cc \ CUI_UnificationSubproblem.cc \ CUI_UnificationSubproblem2.cc \ CUI_LhsAutomaton.cc EXTRA_DIST = \ CUI_LhsCompiler.cc \ CUI_Matcher.cc noinst_HEADERS = \ CUI_ArgumentIterator.hh \ CUI_DagArgumentIterator.hh \ CUI_DagNode.hh \ CUI_LhsAutomaton.hh \ CUI_RhsAutomaton.hh \ CUI_Symbol.hh \ CUI_Term.hh \ CUI_UnificationSubproblem.hh \ CUI_UnificationSubproblem2.hh \ CUI_Theory.hh all: all-am .SUFFIXES: .SUFFIXES: .cc .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/CUI_Theory/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/CUI_Theory/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libCUI_Theory.a: $(libCUI_Theory_a_OBJECTS) $(libCUI_Theory_a_DEPENDENCIES) $(EXTRA_libCUI_Theory_a_DEPENDENCIES) $(AM_V_at)-rm -f libCUI_Theory.a $(AM_V_AR)$(libCUI_Theory_a_AR) libCUI_Theory.a $(libCUI_Theory_a_OBJECTS) $(libCUI_Theory_a_LIBADD) $(AM_V_at)$(RANLIB) libCUI_Theory.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libCUI_Theory_a-CUI_ArgumentIterator.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libCUI_Theory_a-CUI_DagArgumentIterator.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libCUI_Theory_a-CUI_DagNode.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libCUI_Theory_a-CUI_LhsAutomaton.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libCUI_Theory_a-CUI_RhsAutomaton.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libCUI_Theory_a-CUI_Symbol.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libCUI_Theory_a-CUI_Term.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libCUI_Theory_a-CUI_UnificationSubproblem.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libCUI_Theory_a-CUI_UnificationSubproblem2.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` libCUI_Theory_a-CUI_Symbol.o: CUI_Symbol.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libCUI_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libCUI_Theory_a-CUI_Symbol.o -MD -MP -MF $(DEPDIR)/libCUI_Theory_a-CUI_Symbol.Tpo -c -o libCUI_Theory_a-CUI_Symbol.o `test -f 'CUI_Symbol.cc' || echo '$(srcdir)/'`CUI_Symbol.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libCUI_Theory_a-CUI_Symbol.Tpo $(DEPDIR)/libCUI_Theory_a-CUI_Symbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='CUI_Symbol.cc' object='libCUI_Theory_a-CUI_Symbol.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libCUI_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libCUI_Theory_a-CUI_Symbol.o `test -f 'CUI_Symbol.cc' || echo '$(srcdir)/'`CUI_Symbol.cc libCUI_Theory_a-CUI_Symbol.obj: CUI_Symbol.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libCUI_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libCUI_Theory_a-CUI_Symbol.obj -MD -MP -MF $(DEPDIR)/libCUI_Theory_a-CUI_Symbol.Tpo -c -o libCUI_Theory_a-CUI_Symbol.obj `if test -f 'CUI_Symbol.cc'; then $(CYGPATH_W) 'CUI_Symbol.cc'; else $(CYGPATH_W) '$(srcdir)/CUI_Symbol.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libCUI_Theory_a-CUI_Symbol.Tpo $(DEPDIR)/libCUI_Theory_a-CUI_Symbol.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='CUI_Symbol.cc' object='libCUI_Theory_a-CUI_Symbol.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libCUI_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libCUI_Theory_a-CUI_Symbol.obj `if test -f 'CUI_Symbol.cc'; then $(CYGPATH_W) 'CUI_Symbol.cc'; else $(CYGPATH_W) '$(srcdir)/CUI_Symbol.cc'; fi` libCUI_Theory_a-CUI_DagNode.o: CUI_DagNode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libCUI_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libCUI_Theory_a-CUI_DagNode.o -MD -MP -MF $(DEPDIR)/libCUI_Theory_a-CUI_DagNode.Tpo -c -o libCUI_Theory_a-CUI_DagNode.o `test -f 'CUI_DagNode.cc' || echo '$(srcdir)/'`CUI_DagNode.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libCUI_Theory_a-CUI_DagNode.Tpo $(DEPDIR)/libCUI_Theory_a-CUI_DagNode.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='CUI_DagNode.cc' object='libCUI_Theory_a-CUI_DagNode.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libCUI_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libCUI_Theory_a-CUI_DagNode.o `test -f 'CUI_DagNode.cc' || echo '$(srcdir)/'`CUI_DagNode.cc libCUI_Theory_a-CUI_DagNode.obj: CUI_DagNode.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libCUI_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libCUI_Theory_a-CUI_DagNode.obj -MD -MP -MF $(DEPDIR)/libCUI_Theory_a-CUI_DagNode.Tpo -c -o libCUI_Theory_a-CUI_DagNode.obj `if test -f 'CUI_DagNode.cc'; then $(CYGPATH_W) 'CUI_DagNode.cc'; else $(CYGPATH_W) '$(srcdir)/CUI_DagNode.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libCUI_Theory_a-CUI_DagNode.Tpo $(DEPDIR)/libCUI_Theory_a-CUI_DagNode.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='CUI_DagNode.cc' object='libCUI_Theory_a-CUI_DagNode.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libCUI_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libCUI_Theory_a-CUI_DagNode.obj `if test -f 'CUI_DagNode.cc'; then $(CYGPATH_W) 'CUI_DagNode.cc'; else $(CYGPATH_W) '$(srcdir)/CUI_DagNode.cc'; fi` libCUI_Theory_a-CUI_DagArgumentIterator.o: CUI_DagArgumentIterator.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libCUI_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libCUI_Theory_a-CUI_DagArgumentIterator.o -MD -MP -MF $(DEPDIR)/libCUI_Theory_a-CUI_DagArgumentIterator.Tpo -c -o libCUI_Theory_a-CUI_DagArgumentIterator.o `test -f 'CUI_DagArgumentIterator.cc' || echo '$(srcdir)/'`CUI_DagArgumentIterator.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libCUI_Theory_a-CUI_DagArgumentIterator.Tpo $(DEPDIR)/libCUI_Theory_a-CUI_DagArgumentIterator.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='CUI_DagArgumentIterator.cc' object='libCUI_Theory_a-CUI_DagArgumentIterator.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libCUI_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libCUI_Theory_a-CUI_DagArgumentIterator.o `test -f 'CUI_DagArgumentIterator.cc' || echo '$(srcdir)/'`CUI_DagArgumentIterator.cc libCUI_Theory_a-CUI_DagArgumentIterator.obj: CUI_DagArgumentIterator.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libCUI_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libCUI_Theory_a-CUI_DagArgumentIterator.obj -MD -MP -MF $(DEPDIR)/libCUI_Theory_a-CUI_DagArgumentIterator.Tpo -c -o libCUI_Theory_a-CUI_DagArgumentIterator.obj `if test -f 'CUI_DagArgumentIterator.cc'; then $(CYGPATH_W) 'CUI_DagArgumentIterator.cc'; else $(CYGPATH_W) '$(srcdir)/CUI_DagArgumentIterator.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libCUI_Theory_a-CUI_DagArgumentIterator.Tpo $(DEPDIR)/libCUI_Theory_a-CUI_DagArgumentIterator.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='CUI_DagArgumentIterator.cc' object='libCUI_Theory_a-CUI_DagArgumentIterator.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libCUI_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libCUI_Theory_a-CUI_DagArgumentIterator.obj `if test -f 'CUI_DagArgumentIterator.cc'; then $(CYGPATH_W) 'CUI_DagArgumentIterator.cc'; else $(CYGPATH_W) '$(srcdir)/CUI_DagArgumentIterator.cc'; fi` libCUI_Theory_a-CUI_RhsAutomaton.o: CUI_RhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libCUI_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libCUI_Theory_a-CUI_RhsAutomaton.o -MD -MP -MF $(DEPDIR)/libCUI_Theory_a-CUI_RhsAutomaton.Tpo -c -o libCUI_Theory_a-CUI_RhsAutomaton.o `test -f 'CUI_RhsAutomaton.cc' || echo '$(srcdir)/'`CUI_RhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libCUI_Theory_a-CUI_RhsAutomaton.Tpo $(DEPDIR)/libCUI_Theory_a-CUI_RhsAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='CUI_RhsAutomaton.cc' object='libCUI_Theory_a-CUI_RhsAutomaton.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libCUI_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libCUI_Theory_a-CUI_RhsAutomaton.o `test -f 'CUI_RhsAutomaton.cc' || echo '$(srcdir)/'`CUI_RhsAutomaton.cc libCUI_Theory_a-CUI_RhsAutomaton.obj: CUI_RhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libCUI_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libCUI_Theory_a-CUI_RhsAutomaton.obj -MD -MP -MF $(DEPDIR)/libCUI_Theory_a-CUI_RhsAutomaton.Tpo -c -o libCUI_Theory_a-CUI_RhsAutomaton.obj `if test -f 'CUI_RhsAutomaton.cc'; then $(CYGPATH_W) 'CUI_RhsAutomaton.cc'; else $(CYGPATH_W) '$(srcdir)/CUI_RhsAutomaton.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libCUI_Theory_a-CUI_RhsAutomaton.Tpo $(DEPDIR)/libCUI_Theory_a-CUI_RhsAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='CUI_RhsAutomaton.cc' object='libCUI_Theory_a-CUI_RhsAutomaton.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libCUI_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libCUI_Theory_a-CUI_RhsAutomaton.obj `if test -f 'CUI_RhsAutomaton.cc'; then $(CYGPATH_W) 'CUI_RhsAutomaton.cc'; else $(CYGPATH_W) '$(srcdir)/CUI_RhsAutomaton.cc'; fi` libCUI_Theory_a-CUI_Term.o: CUI_Term.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libCUI_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libCUI_Theory_a-CUI_Term.o -MD -MP -MF $(DEPDIR)/libCUI_Theory_a-CUI_Term.Tpo -c -o libCUI_Theory_a-CUI_Term.o `test -f 'CUI_Term.cc' || echo '$(srcdir)/'`CUI_Term.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libCUI_Theory_a-CUI_Term.Tpo $(DEPDIR)/libCUI_Theory_a-CUI_Term.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='CUI_Term.cc' object='libCUI_Theory_a-CUI_Term.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libCUI_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libCUI_Theory_a-CUI_Term.o `test -f 'CUI_Term.cc' || echo '$(srcdir)/'`CUI_Term.cc libCUI_Theory_a-CUI_Term.obj: CUI_Term.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libCUI_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libCUI_Theory_a-CUI_Term.obj -MD -MP -MF $(DEPDIR)/libCUI_Theory_a-CUI_Term.Tpo -c -o libCUI_Theory_a-CUI_Term.obj `if test -f 'CUI_Term.cc'; then $(CYGPATH_W) 'CUI_Term.cc'; else $(CYGPATH_W) '$(srcdir)/CUI_Term.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libCUI_Theory_a-CUI_Term.Tpo $(DEPDIR)/libCUI_Theory_a-CUI_Term.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='CUI_Term.cc' object='libCUI_Theory_a-CUI_Term.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libCUI_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libCUI_Theory_a-CUI_Term.obj `if test -f 'CUI_Term.cc'; then $(CYGPATH_W) 'CUI_Term.cc'; else $(CYGPATH_W) '$(srcdir)/CUI_Term.cc'; fi` libCUI_Theory_a-CUI_ArgumentIterator.o: CUI_ArgumentIterator.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libCUI_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libCUI_Theory_a-CUI_ArgumentIterator.o -MD -MP -MF $(DEPDIR)/libCUI_Theory_a-CUI_ArgumentIterator.Tpo -c -o libCUI_Theory_a-CUI_ArgumentIterator.o `test -f 'CUI_ArgumentIterator.cc' || echo '$(srcdir)/'`CUI_ArgumentIterator.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libCUI_Theory_a-CUI_ArgumentIterator.Tpo $(DEPDIR)/libCUI_Theory_a-CUI_ArgumentIterator.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='CUI_ArgumentIterator.cc' object='libCUI_Theory_a-CUI_ArgumentIterator.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libCUI_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libCUI_Theory_a-CUI_ArgumentIterator.o `test -f 'CUI_ArgumentIterator.cc' || echo '$(srcdir)/'`CUI_ArgumentIterator.cc libCUI_Theory_a-CUI_ArgumentIterator.obj: CUI_ArgumentIterator.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libCUI_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libCUI_Theory_a-CUI_ArgumentIterator.obj -MD -MP -MF $(DEPDIR)/libCUI_Theory_a-CUI_ArgumentIterator.Tpo -c -o libCUI_Theory_a-CUI_ArgumentIterator.obj `if test -f 'CUI_ArgumentIterator.cc'; then $(CYGPATH_W) 'CUI_ArgumentIterator.cc'; else $(CYGPATH_W) '$(srcdir)/CUI_ArgumentIterator.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libCUI_Theory_a-CUI_ArgumentIterator.Tpo $(DEPDIR)/libCUI_Theory_a-CUI_ArgumentIterator.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='CUI_ArgumentIterator.cc' object='libCUI_Theory_a-CUI_ArgumentIterator.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libCUI_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libCUI_Theory_a-CUI_ArgumentIterator.obj `if test -f 'CUI_ArgumentIterator.cc'; then $(CYGPATH_W) 'CUI_ArgumentIterator.cc'; else $(CYGPATH_W) '$(srcdir)/CUI_ArgumentIterator.cc'; fi` libCUI_Theory_a-CUI_UnificationSubproblem.o: CUI_UnificationSubproblem.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libCUI_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libCUI_Theory_a-CUI_UnificationSubproblem.o -MD -MP -MF $(DEPDIR)/libCUI_Theory_a-CUI_UnificationSubproblem.Tpo -c -o libCUI_Theory_a-CUI_UnificationSubproblem.o `test -f 'CUI_UnificationSubproblem.cc' || echo '$(srcdir)/'`CUI_UnificationSubproblem.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libCUI_Theory_a-CUI_UnificationSubproblem.Tpo $(DEPDIR)/libCUI_Theory_a-CUI_UnificationSubproblem.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='CUI_UnificationSubproblem.cc' object='libCUI_Theory_a-CUI_UnificationSubproblem.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libCUI_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libCUI_Theory_a-CUI_UnificationSubproblem.o `test -f 'CUI_UnificationSubproblem.cc' || echo '$(srcdir)/'`CUI_UnificationSubproblem.cc libCUI_Theory_a-CUI_UnificationSubproblem.obj: CUI_UnificationSubproblem.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libCUI_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libCUI_Theory_a-CUI_UnificationSubproblem.obj -MD -MP -MF $(DEPDIR)/libCUI_Theory_a-CUI_UnificationSubproblem.Tpo -c -o libCUI_Theory_a-CUI_UnificationSubproblem.obj `if test -f 'CUI_UnificationSubproblem.cc'; then $(CYGPATH_W) 'CUI_UnificationSubproblem.cc'; else $(CYGPATH_W) '$(srcdir)/CUI_UnificationSubproblem.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libCUI_Theory_a-CUI_UnificationSubproblem.Tpo $(DEPDIR)/libCUI_Theory_a-CUI_UnificationSubproblem.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='CUI_UnificationSubproblem.cc' object='libCUI_Theory_a-CUI_UnificationSubproblem.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libCUI_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libCUI_Theory_a-CUI_UnificationSubproblem.obj `if test -f 'CUI_UnificationSubproblem.cc'; then $(CYGPATH_W) 'CUI_UnificationSubproblem.cc'; else $(CYGPATH_W) '$(srcdir)/CUI_UnificationSubproblem.cc'; fi` libCUI_Theory_a-CUI_UnificationSubproblem2.o: CUI_UnificationSubproblem2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libCUI_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libCUI_Theory_a-CUI_UnificationSubproblem2.o -MD -MP -MF $(DEPDIR)/libCUI_Theory_a-CUI_UnificationSubproblem2.Tpo -c -o libCUI_Theory_a-CUI_UnificationSubproblem2.o `test -f 'CUI_UnificationSubproblem2.cc' || echo '$(srcdir)/'`CUI_UnificationSubproblem2.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libCUI_Theory_a-CUI_UnificationSubproblem2.Tpo $(DEPDIR)/libCUI_Theory_a-CUI_UnificationSubproblem2.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='CUI_UnificationSubproblem2.cc' object='libCUI_Theory_a-CUI_UnificationSubproblem2.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libCUI_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libCUI_Theory_a-CUI_UnificationSubproblem2.o `test -f 'CUI_UnificationSubproblem2.cc' || echo '$(srcdir)/'`CUI_UnificationSubproblem2.cc libCUI_Theory_a-CUI_UnificationSubproblem2.obj: CUI_UnificationSubproblem2.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libCUI_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libCUI_Theory_a-CUI_UnificationSubproblem2.obj -MD -MP -MF $(DEPDIR)/libCUI_Theory_a-CUI_UnificationSubproblem2.Tpo -c -o libCUI_Theory_a-CUI_UnificationSubproblem2.obj `if test -f 'CUI_UnificationSubproblem2.cc'; then $(CYGPATH_W) 'CUI_UnificationSubproblem2.cc'; else $(CYGPATH_W) '$(srcdir)/CUI_UnificationSubproblem2.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libCUI_Theory_a-CUI_UnificationSubproblem2.Tpo $(DEPDIR)/libCUI_Theory_a-CUI_UnificationSubproblem2.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='CUI_UnificationSubproblem2.cc' object='libCUI_Theory_a-CUI_UnificationSubproblem2.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libCUI_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libCUI_Theory_a-CUI_UnificationSubproblem2.obj `if test -f 'CUI_UnificationSubproblem2.cc'; then $(CYGPATH_W) 'CUI_UnificationSubproblem2.cc'; else $(CYGPATH_W) '$(srcdir)/CUI_UnificationSubproblem2.cc'; fi` libCUI_Theory_a-CUI_LhsAutomaton.o: CUI_LhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libCUI_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libCUI_Theory_a-CUI_LhsAutomaton.o -MD -MP -MF $(DEPDIR)/libCUI_Theory_a-CUI_LhsAutomaton.Tpo -c -o libCUI_Theory_a-CUI_LhsAutomaton.o `test -f 'CUI_LhsAutomaton.cc' || echo '$(srcdir)/'`CUI_LhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libCUI_Theory_a-CUI_LhsAutomaton.Tpo $(DEPDIR)/libCUI_Theory_a-CUI_LhsAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='CUI_LhsAutomaton.cc' object='libCUI_Theory_a-CUI_LhsAutomaton.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libCUI_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libCUI_Theory_a-CUI_LhsAutomaton.o `test -f 'CUI_LhsAutomaton.cc' || echo '$(srcdir)/'`CUI_LhsAutomaton.cc libCUI_Theory_a-CUI_LhsAutomaton.obj: CUI_LhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libCUI_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libCUI_Theory_a-CUI_LhsAutomaton.obj -MD -MP -MF $(DEPDIR)/libCUI_Theory_a-CUI_LhsAutomaton.Tpo -c -o libCUI_Theory_a-CUI_LhsAutomaton.obj `if test -f 'CUI_LhsAutomaton.cc'; then $(CYGPATH_W) 'CUI_LhsAutomaton.cc'; else $(CYGPATH_W) '$(srcdir)/CUI_LhsAutomaton.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libCUI_Theory_a-CUI_LhsAutomaton.Tpo $(DEPDIR)/libCUI_Theory_a-CUI_LhsAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='CUI_LhsAutomaton.cc' object='libCUI_Theory_a-CUI_LhsAutomaton.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libCUI_Theory_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libCUI_Theory_a-CUI_LhsAutomaton.obj `if test -f 'CUI_LhsAutomaton.cc'; then $(CYGPATH_W) 'CUI_LhsAutomaton.cc'; else $(CYGPATH_W) '$(srcdir)/CUI_LhsAutomaton.cc'; fi` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/libCUI_Theory_a-CUI_ArgumentIterator.Po -rm -f ./$(DEPDIR)/libCUI_Theory_a-CUI_DagArgumentIterator.Po -rm -f ./$(DEPDIR)/libCUI_Theory_a-CUI_DagNode.Po -rm -f ./$(DEPDIR)/libCUI_Theory_a-CUI_LhsAutomaton.Po -rm -f ./$(DEPDIR)/libCUI_Theory_a-CUI_RhsAutomaton.Po -rm -f ./$(DEPDIR)/libCUI_Theory_a-CUI_Symbol.Po -rm -f ./$(DEPDIR)/libCUI_Theory_a-CUI_Term.Po -rm -f ./$(DEPDIR)/libCUI_Theory_a-CUI_UnificationSubproblem.Po -rm -f ./$(DEPDIR)/libCUI_Theory_a-CUI_UnificationSubproblem2.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/libCUI_Theory_a-CUI_ArgumentIterator.Po -rm -f ./$(DEPDIR)/libCUI_Theory_a-CUI_DagArgumentIterator.Po -rm -f ./$(DEPDIR)/libCUI_Theory_a-CUI_DagNode.Po -rm -f ./$(DEPDIR)/libCUI_Theory_a-CUI_LhsAutomaton.Po -rm -f ./$(DEPDIR)/libCUI_Theory_a-CUI_RhsAutomaton.Po -rm -f ./$(DEPDIR)/libCUI_Theory_a-CUI_Symbol.Po -rm -f ./$(DEPDIR)/libCUI_Theory_a-CUI_Term.Po -rm -f ./$(DEPDIR)/libCUI_Theory_a-CUI_UnificationSubproblem.Po -rm -f ./$(DEPDIR)/libCUI_Theory_a-CUI_UnificationSubproblem2.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-noinstLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: Maude-Maude3.2/src/Core/000077500000000000000000000000001420036611000150355ustar00rootroot00000000000000Maude-Maude3.2/src/Core/ChangeLog000066400000000000000000006701541420036611000166240ustar00rootroot000000000000002021-03-24 Steven Eker * rewritingContext.cc (RewritingContext::interruptSeen): added * rewritingContext.hh (class RewritingContext): added decl for interruptSeen() 2020-12-11 Steven Eker * pendingUnificationStack.cc (PendingUnificationStack::makeNewSubproblem): pass maintainInvariants = true to instantiate() ===================================Maude132=========================================== 2020-09-22 Steven Eker * unificationContext.cc (UnificationContext::dump): added * unificationContext.hh (class UnificationContext): added decl for dump() 2020-09-21 Steven Eker * compoundCycleSubproblem.cc (CompoundCycleSubproblem::solve): added a comment to explain why resolving a single arc can be sufficient (CompoundCycleSubproblem::solve): added explanation and examples to show why cyclic identities must be considered * compoundCycleSubproblem.hh (class CompoundCycleSubproblem): deleted decl for addUnification() * compoundCycleSubproblem.cc (CompoundCycleSubproblem::addUnification): deleted ===================================Maude130=========================================== 2020-08-28 Steven Eker * freshVariableGenerator.hh (class FreshVariableGenerator): added decl for isFreshVariableName() 2020-07-29 Steven Eker * rewritingContext.cc (RewritingContext::markReachableNodes): limited contexts exist across garbage collects after all because UnifierFilter periodically needs to allow garbage collection to avoid a huge accumulation of matching garbage (RewritingContext::markReachableNodes): use range-based for loop to traverse redexStack 2020-07-15 Steven Eker * rewritingContext.hh (class RewritingContext): set a default substitutionSize of 0 for the limited context ctor * rewritingContext.cc (RewritingContext::markReachableNodes): use isLimited() (RewritingContext::markReachableNodes): added CantHappen() for limited contexts * sortConstraintTable.cc (SortConstraintTable::constrainToSmallerSort2): check isLimited() before proceeding * rewritingContext.hh (class RewritingContext): added a more detail comment to explain the need for limited use rewriting contexts (RewritingContext::RewritingContext): updated comment (RewritingContext::isLimited): added ===================================Maude129=========================================== 2020-06-23 Steven Eker * pendingUnificationStack.cc (PendingUnificationStack::resolveTheoryClash): added DebugEnter() 2020-04-14 Steven Eker * rewritingContext.cc (RewritingContext::blockAndHandleInterrupts): added * rewritingContext.hh (class RewritingContext): added decl for blockAndHandleInterrupts() 2020-03-17 Steven Eker * module.cc (Module): clean for loop (Module::closeSortSet): clean for loop * variableInfo.cc (VariableInfo::variable2Index): clean up for loop (both versions) (VariableInfo::computeIndexRemapping): clean up for loops; use range-based for loop (VariableInfo::variableNameConflict): use range-based for loop * stackMachineRhsCompiler.cc (StackMachineRhsCompiler::compileInstructionSequence): use range based for loop (StackMachineRhsCompiler::dump): use range based for loops * sortTable.cc: (SortTable::kindLevelDeclarationsOnly): use range based for loop (SortTable::findMinSortIndex): use range based for loop (SortTable::dumpSortDiagram): clean loops (SortTable::compileOpDeclarations): tidy loop (SortTable::computeBddVector): use range based for loop * sortErrorAnalysis.cc (SortTable::sortErrorAnalysis): clean up for loops * sortBdds.cc (SortBdds::SortBdds): use range based for loop (SortBdds::operatorCompose): use range based for loop * ruleTable.cc (RuleTable::resetEachRule): use range based for loop * rhsBuilder.cc (RhsBuilder::recordInfo): use range based for loop 2020-03-16 Steven Eker * pendingUnificationStack.cc (PendingUnificationStack): use range based for loop (PendingUnificationStack::markReachableNodes): use range based for loop (PendingUnificationStack::makeNewSubproblem): use range based for loop (PendingUnificationStack::findCycleFrom): use range based for loop * memoTable.cc (MemoTable::memoEnter): use range based for loop * equationTable.cc (EquationTable::applyReplace): use range based for loop (EquationTable::applyReplaceNoOwise): use range based for loop (EquationTable::resetEachEquation): use range based for loop (EquationTable::dumpEquationTable): use range based for loop 2020-03-10 Rubén Rubio * module.cc (closeTheory): do strategy definitions indexing here * strategyDefinition (StrategyDefinition): strategy definition indexing has been moved to Module::closeTheory not to index bad definitions, since they are checked later (check): ignore nonexec definitions and fixed typo ===================================Maude128a=========================================== 2020-02-10 Steven Eker * module.cc (indexEquations): use range-based for loops (indexEquation): use range-based for loop (indexSortConstraints): use use range-based for loops (stackMachineCompile): use range-based for loop (insertLateSymbol): use use range-based for loops (closeFixUps): use use range-based for loops (closeSortSet): added comment as to why using a range-based for loop will fail (resetRules): use range-based for loop (reset): use range-based for loop (Module): use range-based for loops * preEquation.cc (preprocess): remove commented out AdvisoryCheck() warning about change of operational semantics between Maude 1.0 and Maude 2.0 (Maude 1.0 did not allow rewriting of terms at the error sort) (PreEquation): code cleaning and more detailed comment * sortConstraint.cc (check): added comment to exlain why we use markAsBad() here * equation.cc (compile): deleted commented out old stackMachine code (check): added comment to exlain why we use markAsBad() here * rule.cc (check): deleted commented out markAsBad() call; added comment to explain why we don't call markAsBad() anymore ===================================Maude128=========================================== 2019-12-06 Steven Eker * ruleTable.cc (saveHiddenState, restoreHiddenState): commented out * ruleTable.hh (R): commented out decls for saveHiddenState(), restoreHiddenState() (R): commented out typedef IntStack and nextRuleStack data member * module.hh (BadFlag): commented out decls for saveHiddenState()/restoreHiddenState() * module.cc (saveHiddenState): commented out (restoreHiddenState): commented out ===================================Maude127a=========================================== 2019-12-04 Steven Eker * termBag.cc (insertBuiltTerm): use DebugSave() to avoid warning about unused variable (2 places) 2019-12-03 Steven Eker * variableInfo.cc (variableNameConflict): use safeCastNonNull<>() * unificationContext.cc (makeFreshVariable): use safeCastNonNull<>() (unificationBind): use safeCastNonNull<>() (3 places) * sortTable.cc (buildSortDiagram): use safeCastNonNull<>() * ctorDiagram.cc (buildCtorDiagram): use safeCastNonNull<>() * sortErrorAnalysis.cc (sortErrorAnalysis): use safeCastNonNull<>() ===================================Maude127=========================================== 2019-11-11 Steven Eker * compoundCycleSubproblem.cc (solve): pass false to warnAboutUnimplemented arg * preEquation.cc (getLhsDag): pass true to warnAboutUnimplemented arg ===================================Maude125=========================================== 2019-10-10 Rubén Rubio * strategyDefinition.cc (check): removed argument to TermSet constructor * termSet.cc: reverted the changes on 2018-03-23 * termSet.hh: reverted the changes on 2018-03-23 2019-07-02 Steven Eker * memoryCell.hh (allocateMemoryCell): rewritten (MemoryBlock): slowNew() now returns MemoryCell* * memoryCell.cc (slowNew): return MemoryCell* rather than void* (slowNew): don't set nextNode before we return since caller will do this * memoryInfo.hh (clearAllExceptMarked): fix bug where we were setting to MARKED rather than ANDing with MARKED 2019-07-01 Steven Eker * core.hh: added classes MemoryInfo and MemoryBlock * memoryCell.hh: rewritten to use MemoryInfo and MemoryBlock * memoryInfo.hh: created * memoryBlock.hh: created ===================================Maude123=========================================== 2019-01-30 Steven Eker * module.hh (insertSymbol): fix bad Assert() caught by new compiler ===================================Maude121=========================================== 2018-10-23 Steven Eker * run.cc (ruleRewrite): use stackPhysicalArguments() 2018-09-28 Steven Eker * rewritingContext.hh (transferCount): becomes transferCountFrom() 2018-09-21 Steven Eker * freshVariableGenerator.hh (F): don't have a default family for getFreshVariableName() * unificationContext.hh (SimpleRootContainer): remove default value for variableFamily 2018-09-19 Steven Eker * freshVariableGenerator.hh (F): updated decl for variableNameConflict() ===================================Maude119=========================================== 2018-09-17 Rubén Rubio * strategyDefinition.cc (check): build context specification * strategyDefinition.hh: added contextSpec (getContextSpec): added 2018-06-22 Rubén Rubio * rewritingContext.cc (traceStrategyCall): added * rewritingContext.hh (traceStrategyCall, traceBeginSdTrial): added * strategyDefinition.cc (check): fixed a bug, unbound variables in the condition were ignored (traceBeginTrial): call traceBeginSdTrial 2018-06-11 Steven Eker * module.cc (closeTheory): converted commented out print into DebugAdvisory() (insertLateSymbol, closeTheory): deleted commented out calls to finalizeSymbol() 2018-05-29 Steven Eker * rewritingContext.cc (handleInterrupt): added * rewritingContext.hh (SimpleRootContainer): added decl for handleInterrupt(); 2018-05-25 Steven Eker * rewritingContext.hh (SimpleRootContainer): deleted decl for limit version of fairTraversal(); make other version public (SimpleRootContainer): updated decl for fairStart() * run.cc (fairTraversal): delete limit version * rewritingContext.hh (fairRestart): added * run.cc (fairStart): take limit argument * rewritingContext.hh (getProgress): added * run.cc (fairTraversal): rewritten * rewritingContext.hh (SimpleRootContainer): update decl for public fairTraversal() ===================================Maude117=========================================== 2018-03-23 Rubén Rubio * core.hh: added classes StrategyDefinition and RewriteStrategy * Makefile.am: added inclusion for StrategyLanguage * module.cc (insertStrategy, insertStrategyDefinition): added (~Module): delete strategies and its definitions (closeTheory): compile strategy definitions * module.hh (insertStrategy, insertStrategyDefinition, getStrategy, getStrategyDefinitions): added * rewriteStrategy.cc: added * rewriteStrategy.hh: added * strategyDefinition.cc: added * strategyDefinition.hh: added * termSet.cc (TermSet): added. A boolean parameter to avoid comparing the eager context flag when checking term equality. This is needed (at least until a better solution is found) because how TermSet is used in StrategyExpression::check. (isEqual): the boolean parameter above is included. * termSet.hh (TermSet): added. 2017-06-12 Steven Eker * equation.hh (clearVariant): added * rule.hh (clearNarrowing): added * variableInfo.hh (V): added decl for variableNameConflict() * variableInfo.cc (variableNameConflict): added ===================================Maude114=========================================== 2017-05-24 Steven Eker * narrowingVariableInfo.hh (copy): added 2017-04-26 Steven Eker * rule.hh (isNarrowing, setNarrowing): added (PreEquation): added enum Flags ===================================Maude113=========================================== 2017-02-17 Steven Eker * run.cc (ruleRewrite): pass eager flag to RedexPosition() (ruleRewrite): use Symbol::stackArguments() in place of DagNode::stackArguments() 2017-02-14 Steven Eker * rule.hh (setNarrowing, isNarrowing): deleted (PreEquation): deleted enum Flags 2017-01-13 Steven Eker * rewritingContext.hh (reduce): moved here and made inline 2017-01-11 Steven Eker * conditionFragment.hh: stack<> -> Stack<> * preEquation.cc: stack<> -> Stack<> * preEquation.hh: stack<> -> Stack<> ===================================Maude111b=========================================== 2017-01-06 Steven Eker * narrowingVariableInfo.hh (forgetAllBut): added ===================================Maude111a=========================================== 2016-12-19 Steven Eker * rewritingContext.hh (clearCount): clear narrowingCount and variantNarrowingCount 2016-12-15 Steven Eker * narrowingVariableInfo.hh (N): use NO_COPYING macro (N): added ctor * freshVariableGenerator.hh (F): added decl for belongsToFamily() 2016-11-15 Steven Eker * variableInfo.hh (V): added decl for new variable2Index() * variableInfo.cc (variable2Index): added VariableDagNode* version 2016-11-08 Steven Eker * narrowingVariableInfo.hh (N): added decl for variable2IndexNoAdd() * narrowingVariableInfo.cc (variable2IndexNoAdd): added 2016-10-26 Steven Eker * unificationContext.cc (UnificationContext, makeFreshVariable): odd -> variableFamily * unificationContext.hh (SimpleRootContainer): updated decl for ctor (SimpleRootContainer): data member odd becomes int variableFamily * freshVariableGenerator.hh (F): updated decl for getFreshVariableName() 2016-10-13 Steven Eker * rule.hh (PreEquation): added enum Flags for NARROWING (isNarrowing, setNarrowing): added ===================================Maude111=========================================== 2016-06-27 Steven Eker * pendingUnificationStack.hh (flagAsIncomplete): fixed typo 2016-04-07 Steven Eker * pendingUnificationStack.cc (findCycle): added comment 2016-03-25 Steven Eker * sortBdds.cc (getRemappedLeqRelation, applyLeqRelation): use getCachedPairing() 2016-03-24 Steven Eker * sortBdds.hh (BddUser): added decl for appendVariableVector() * sortBdds.cc (appendVariableVector): added 2016-03-17 Steven Eker * sortBdds.cc (appendIndexVector): added * sortTable.hh (S): added dec for computeGeneralizedSort2() * sortBdds.hh (BddUser): updated decl for operatorCompose() * sortBdds.cc (operatorCompose): rewritten to use a Vector of output BDDs 2016-03-16 Steven Eker * sortBdds.hh (BddUser): updated decl for operatorCompose() * sortBdds.cc (operatorCompose): made const 2016-03-11 Steven Eker * sortBdds.hh (BddUser): added decl for operatorCompose() * sortBdds.cc (operatorCompose): added ===================================Maude110=========================================== 2015-12-23 Steven Eker * equation.hh (PreEquation): commented out nrSlots member since we don't appear to use it ===================================Maude108a=========================================== 2015-09-18 Steven Eker * compoundCycleSubproblem.hh (SimpleRootContainer): declare but don't define addUnification() * compoundCycleSubproblem.cc (addUnification): moved here to try and avoid clang warning * trivialRhsAutomaton.hh (_trivialRhsAutomaton_hh_): fixed define 2015-09-17 Steven Eker * sortBdds.cc (applyLeqRelation): make Assert() message more detailed 2015-08-07 Steven Eker * pendingUnificationStack.hh (flagAsIncomplete): changed advisory to warning 2015-08-06 Steven Eker * pendingUnificationStack.hh (SimpleRootContainer): added data member unimplementedSymbols (flagAsUnimplemented): added (isIncomplete): check unimplementedSymbols (flagAsUnimplemented): deleted (isIncomplete): don't check unimplementedSymbols after all (SimpleRootContainer): deleted data member unimplementedSymbols * pendingUnificationStack.cc (PendingUnificationStack): don't initialize incompleteFlag anymore * pendingUnificationStack.hh (SimpleRootContainer): replace incompleteFlag with incompleteSymbols (flagAsIncomplete): take argument; use incompleteSymbols (isIncomplete): use incompleteSymbols 2015-08-05 Steven Eker * pendingUnificationStack.cc (chooseTheoryToSolve): make use of unficationPriority() in decided which theory to return 2015-07-31 Steven Eker * pendingUnificationStack.cc (makeNewSubproblem): use chooseTheoryToSolve() * pendingUnificationStack.hh (SimpleRootContainer): added decl for chooseTheoryToSolve() * pendingUnificationStack.cc (solve2): deleted commented out code (chooseTheoryToSolve): added 2015-07-23 Steven Eker * pendingUnificationStack.cc (PendingUnificationStack): initialize incompleteFlag 2015-07-22 Steven Eker * pendingUnificationStack.hh (SimpleRootContainer): added data member incompletenessFlag (flagAsIncomplete, isIncomplete): added ===================================Maude108=========================================== 2014-06-03 Steven Eker * sortTable.hh (getRangeSort): added 2014-05-16 Steven Eker * connectedComponent.hh: added decl for operator<< ===================================Maude103=========================================== 2014-02-27 Steven Eker * run.cc (ruleRewrite): removed debugging code that was producing spurious messages 2014-02-18 Steven Eker * module.cc (stackMachineCompile): reformatted * cachedDag.hh (C): added data member instructionSequence (CachedDag): init instructionSequence (~CachedDag): delete instructionSequence (generateInstructionSequence): added (getInstructionSequence): added 2014-02-14 Steven Eker * termSet.cc (insert): return index where we inserted term * termSet.hh (PointerSet): updated decl for insert() * stackMachineRhsCompiler.hh (S): delete decl for addCopy() from struct FunctionEval 2014-02-13 Steven Eker * copyRhsAutomaton.cc (recordInfo): don't pass needContiguous argument to recordFunctionEval() * trivialRhsAutomaton.cc (recordInfo): don't pass needContiguous argument to recordFunctionEval() * stackMachineRhsCompiler.cc (recordFunctionEval): deleted needContiguous argument * stackMachineRhsCompiler.hh (S): updated decl for recordFunctionEval() * stackMachineRhsCompiler.cc (compileInstructionSequence): handle failure to generate an instruction gracefully ===================================Maude101=========================================== 2014-02-06 Steven Eker * stackMachineRhsCompiler.cc (dump): drastically simplified (recordFunctionEval): don't initialize deleted data members * stackMachineRhsCompiler.hh (S): deleted data members needContiguous, contiguousSlot and copies from struct FunctionEval; removed structs Copy, VirtualSlot (addCopy): deleted (S): deleted typedefs VirtualSlotMap, IntMap, SlotSet (S): removed data members virtualSlots and lastUsed (S): deleted decls for internal functions * stackMachineRhsCompiler.cc (compileInstructionSequence): deleted unused variable nrArgs (recordFunctionEval): delete commented out code 2014-02-04 Steven Eker * dagNodeSet.hh (PointerSet): use using syntax for member functions exported from base class * termSet.hh (PointerSet): use using syntax for member functions exported from base class 2014-01-31 Steven Eker * module.hh (BadFlag): added decl for stackMachineCompile() * module.cc (stackMachineCompile): added * module.hh (BadFlag): added STACK_MACHINE_COMPILED to enum Status * equation.cc (compile): don't do stack machine compilation here any more (stackMachineCompile): added * stackMachineRhsCompiler.hh (S): updated decl for compileInstructionSequence() * stackMachineRhsCompiler.cc (compileInstructionSequence): don't take argument 2013-12-20 Steven Eker * equation.cc (compile): remap indices before doing stack machine compilation * stackMachineRhsCompiler.cc (recordFunctionEval): rewritten (compileInstructionSequence): rewritten; rely on slots generated by remap indices 2013-11-21 Steven Eker * sort.hh (fastGeqSufficient, fastGeq): added ===================================Maude100a=========================================== 2013-10-27 Steven Eker * equation.cc (Equation): init instructionSequence to 0 (Equation): delete instructionSequence * stackMachine.hh (getRawScratchpad): commented out (SimpleRootContainer): commnet out data member rawScratchPad * stackMachine.cc (~StackMachine): delete protectedScratchPad (StackMachine): comment out rawScratchPad init; make protectedScratchPad bigger 2013-10-26 Steven Eker * stackMachine.hh (getProtectedScratchpad): added (getRawScratchpad): added * stackMachine.cc (StackMachine): initialize protected and raw scratchpads 2013-10-17 Steven Eker * stackMachine.hh (incrementEqCount): allow rewriteCount to be incremented by an amount rather than just by 1 * frame.hh (fastPop): added * stackMachine.hh (fastPushFrame): added (setTopFrame): added 2013-10-16 Steven Eker * returnInstruction.hh (getReturnSlot): added * memoryCell.hh (wantToCollectGarbage): added (M): made collectGarbage() public; added comment 2013-10-08 Steven Eker * equation.cc (compile): hack to avoid stack machine compilation of equations with conditions, because we may share subterms with the condition 2013-10-03 Steven Eker * connectedComponent.cc (ConnectedComponent): init lastAllocatedMatchIndex * module.cc (indexEquation): call computeMatchIndices() * connectedComponent.hh (ModuleItem): added data member lastAllocatedMatchIndex (getNewMatchIndex): added (getLastAllocatedMatchIndex): added 2013-10-02 Steven Eker * memoryCell.hh (initFlags): added 2013-09-26 Steven Eker * memoryCell.hh (initialize): deleted * memoryCell.cc (slowNew): removed 4 calls to initialize() * memoryCell.hh (initialize): comment out the setting of the halfWord to Sort::SORT_UNKNOWN (allocateMemoryCell): try calling initialize() in the slowNew() path (initFlags): added (clearAllFlags): was initFlags (allocateMemoryCell): clean up; removed calls to initialize() 2013-09-25 Steven Eker * returnInstruction.cc (execute): rewritten using returnResultAndContinue() 2013-09-24 Steven Eker * core.hh: deleted class class CopyInstruction * copyInstruction.cc: deleted * copyInstruction.hh: deleted ===================================Maude98=========================================== 2013-09-04 Steven Eker * stackMachine.hh (popFrame): added 2013-08-22 Steven Eker * returnInstruction.cc (execute): use finishUp() 2013-08-20 Steven Eker * stackMachineRhsCompiler.cc (compileInstructionSequence): fix nasty bug where we were not filling out activeSlots for bare variable ReturnInstruction * stackMachine.hh (incrementEqCount): comment out MemoryCell::okToCollectGarbage() * stackMachine.cc (execute): try lcm unrolling trick * copyInstruction.cc (execute): removed hack 2013-08-16 Steven Eker * copyInstruction.cc (execute): tried execute() hack 2013-08-15 Steven Eker * stackMachine.cc (execute): commented out check for GC * stackMachine.hh (incrementEqCount): check for GC here * stackMachine.cc (execute): new attempt * stackMachine.hh (SimpleRootContainer): added data member realResult (newUnderFrame, newFrame): deleted * stackMachine.cc (markReachableNodes): mark realResult * stackMachine.hh (SimpleRootContainer): adde decl for new execute() * stackMachine.cc (execute): added dummy frame version * core.hh: added class NullInstruction * nullInstruction.hh: created * nullInstruction.cc: created * stackMachine.hh (makeFrameLift): added (pushFrame): added 2013-08-14 Steven Eker * frame.hh: use Instruction::SlotIndex throughout * copyInstruction.hh (NonFinalInstruction): deleted data member nextInstruction * returnInstruction.hh (FinalInstruction): derive from FinalInstruction; use SlotIndex type * copyInstruction.cc (CopyInstruction): call NonFinalInstruction ctor (execute): use getNextInstruction() (dump): use getNextInstruction() * copyInstruction.hh (NonFinalInstruction): derive from NonFinalInstruction; use SlotIndex type 2013-08-13 Steven Eker * frame.hh (getArgumentListPtr): adde const version 2013-08-10 Steven Eker * stackMachine.cc (markReachableNodes): clear return value slots for values that haven't been returned yet 2013-08-08 Steven Eker * stackMachine.cc (execute): call MemoryCell::okToCollectGarbage() * frame.hh (markActiveSlots): added * stackMachine.cc (markReachableNodes): added * stackMachine.hh (SimpleRootContainer): derive from SimpleRootContainer (SimpleRootContainer): added decl for markReachableNodes(); * stackMachineRhsCompiler.cc (compileInstructionSequence): set active slots 2013-08-02 Steven Eker * stackMachineRhsCompiler.cc (compileInstructionSequence): update nrSlots if we have a destination slot that exceeds known slots * stackMachineRhsCompiler.hh (S): updated decl for compileInstructionSequence() * equation.cc (compile): pass nrSlots reference to compileInstructionSequence() * equation.hh (PreEquation): added nrSlots data member 2013-08-01 Steven Eker * stackMachine.hh (newUnderFrame): added 2013-07-30 Steven Eker * frame.hh (setReturnAddress): added absolute address version * stackMachine.cc (execute): use topFrame == 0 as stopping condition * stackMachine.hh (getEqCount): added * equation.hh (PreEquation): added data member instructionSequence (getInstructionSequence): added * copyInstruction.cc (dump): fix (has source and destination the wrong way around) 2013-07-11 Steven Eker * frame.hh: moved FRAME_SIZE_HACK here for the moment 2013-07-10 Steven Eker * returnInstruction.cc (dump): added * returnInstruction.hh (Instruction): added decl for dump() * copyInstruction.cc (dump): added * copyInstruction.hh (Instruction): added decl for dump() * core.hh: added class ReturnInstruction and class CopyInstruction * copyInstruction.hh: created * copyInstruction.cc: created * stackMachineRhsCompiler.cc (compileInstructionSequence): generate instruction sequence * returnInstruction.cc (ReturnInstruction): added * returnInstruction.hh (Instruction): added decl for ctor; made returnSlot const 2013-07-09 Steven Eker * stackMachineRhsCompiler.hh (S): added decl for findRealSlot() * stackMachineRhsCompiler.cc (feasibleAssignment): IntSet -> SlotSet (isOK): keep track of slots that we've hypothetically mapped (findRealSlot): added (compileInstructionSequence): assign real slots to remaining virtual slots * stackMachineRhsCompiler.hh (S): IntSet ->SlotSet 2013-07-05 Steven Eker * stackMachineRhsCompiler.cc (computeUnforcedAssignment): implemented (isOK): added * stackMachineRhsCompiler.hh (S): added copies field to FunctionEval; added declarations for computeUnforcedAssignment() and computeForcedAssignment() (addCopy): added * stackMachineRhsCompiler.cc (feasibleAssignment): fix bug where we shadowing lastUserOfNeededSlot (computeForcedAssignment): added (computeUnforcedAssignment): added stub (compileInstructionSequence): use computeForcedAssignment() and computeUnforcedAssignment() (dump): dump copy information 2013-07-02 Steven Eker * variableInfo.hh (isReal): added * stackMachineRhsCompiler.cc (recordFunctionEval, dump): updated (compileInstructionSequence): added stub * stackMachineRhsCompiler.hh (S): redesigned internal data structures; added decl for compileInstructionSequence() 2013-07-01 Steven Eker * returnInstruction.cc: created * returnInstruction.hh: created * trivialRhsAutomaton.cc (recordInfo): added * trivialRhsAutomaton.hh (RhsAutomaton): added decl for recordInfo() * copyRhsAutomaton.hh (RhsAutomaton): added decl for recordInfo() * copyRhsAutomaton.cc (recordInfo): added * equation.cc (compile): use class StackMachineRhsCompiler * stackMachineRhsCompiler.hh: added decl for dump() * stackMachineRhsCompiler.cc: added * rhsBuilder.hh (R): added decl for recordInfo() * rhsBuilder.cc (recordInfo): added 2013-06-28 Steven Eker * stackMachineRhsCompiler.hh: created * stackMachineRhsCompiler.cc: created * core.hh: added class StackMachineRhsCompiler 2013-06-07 Steven Eker * frame.hh (copyReturnInfo): added ===================================Maude97=========================================== 2013-03-08 Steven Eker * unificationContext.cc (unificationBind): use Assert() rather than abort() * module.hh (insertSort, insertSymbol): Assert() doesn't need cerr * argVec.hh (ArgVec): Assert() doesn't need cerr 2013-01-18 Steven Eker * stackMachine.hh (popToFrame): added (incrementEqCount): added * frame.hh: NO_COPYING (getArgumentListPtr): added * stackMachine.hh: NO_COPYING 2013-01-09 Steven Eker * stackMachine.hh (S): added decls for StackMachine() and ~StackMachine() * stackMachine.cc: created * stackMachine.hh (newFrame, popDeadFrames): added (S): added data member memoryBase * frame.hh (setAncestorWithValidNextInstruction) (getAncestorWithValidNextInstruction): added 2013-01-07 Steven Eker * core.hh: added forward decls for Frame and StackMachine * stackMachine.hh: created * frame.hh: created 2012-12-14 Steven Eker * pendingUnificationStack.cc (resolveTheoryClash): pass marked = true to push() for safety though eventually we would like the make the marked flag implicit 2012-12-13 Steven Eker * unificationContext.hh (SimpleRootContainer): added more comments to explain what data members are used for 2012-12-12 Steven Eker * pendingUnificationStack.hh (SimpleRootContainer): added comments to explain variableStatus and variableOrder * pendingUnificationStack.cc (solve2): commented out - it was purely debugging code * pendingUnificationStack.hh (SimpleRootContainer): commented out declaration for solve2() ===================================Maude96c=========================================== 2012-07-09 Steven Eker * unificationContext.cc (UnificationContext): take odd argument (makeFreshVariable): go back to passing freshVariableNumber rather than index to getFreshVariableName(), but now clashing variable names is avoided by also passing odd * unificationContext.hh (SimpleRootContainer): added data member odd; updated decl for ctore ===================================Maude96a=========================================== 2012-05-23 Steven Eker * unificationContext.cc (makeFreshVariable): pass index rather than freshVariableNumber to getFreshVariableName() to avoid clashing names with existing variables during narrowing steps 2012-05-21 Steven Eker * rewritingContext.hh (SimpleRootContainer): new decl for traceVariantNarrowingStep() (addInCount, transferCount): update narrowingCount and variantNarrowingCount (getTotalCount): include narrowingCount and variantNarrowingCount (SimpleRootContainer): added data members narrowingCount and variantNarrowingCount (RewritingContext): clear narrowingCount and variantNarrowingCount (getNarrowingCount): added (getVariantNarrowingCount): added (incrementNarrowingCount, incrementVariantNarrowingCount): added 2012-05-18 Steven Eker * rewritingContext.cc (traceVariantNarrowingStep): added stub * rewritingContext.hh (SimpleRootContainer): added decl for traceVariantNarrowingStep() 2012-05-11 Steven Eker * freshVariableGenerator.hh (F): added odd field 2012-05-04 Steven Eker * equation.cc (compile): always compile lhs for equations with the variant attribute 2012-05-03 Steven Eker * equation.cc (compile): pessimize the variant case * equation.hh (PreEquation): added VARIANT to flags (isVariant): added (setVariant): added 2012-04-05 Steven Eker * rewritingContext.cc (markReachableNodes): check for limited use RewritingContext * rewritingContext.hh (RewritingContext): added ctor for limited use RewritingContexts 2012-03-28 Steven Eker * equation.hh (PreEquation): added decl for print() * sortConstraint.hh (PreEquation): added decl for print() * equation.cc (print): added * rule.cc (getLhsDag, reset): deleted (print): added * rule.hh (PreEquation): added decl for print(); deleted declarations for getLhsDag(), reset() * preEquation.hh (BadFlag): added decls for getLhsDag(), reset(), print(), operator<<() * preEquation.cc (getLhsDag): added (getLhsDag): added (reset): added * preEquation.hh (BadFlag): added data member lhsDag * equationTable.hh (E): added decl for resetEachEquation() * equationTable.cc (resetEachEquation): added ===================================Maude96=========================================== 2011-11-22 Steven Eker * unificationContext.cc (UnificationContext::restoreFromClone): added * unificationContext.hh (class UnificationContext): added decl for restoreFromClone() (class UnificationContext): added decl for restoreFromClone() * substitution.cc (Substitution::clone): moved here from .hh file 2011-01-06 Steven Eker * sortTable.cc (SortTable::linearComputeSortFunctionBdds): use applyLeqRelation() (SortTable::computeSortFunctionBdds): call both recursiveComputeSortFunctionBdds() and linearComputeSortFunctionBdds() and do a consistancy check * sortTable.hh (class SortTable): added dec for recursiveComputeSortFunctionBdds() * sortTable.cc (SortTable::recursiveComputeSortFunctionBdds): added * sortBdds.hh (class SortBdds): added decl for applyLeqRelation() * sortBdds.cc (SortBdds::applyLeqRelation): added * sortTable.cc (SortTable::linearComputeSortFunctionBdds): use getRemappedLeqRelation() * sortBdds.cc (getRemappedLeqRelation): added 2011-01-05 Steven Eker * sortTable.cc (SortTable::linearComputeSortFunctionBdds): added * sortTable.hh (class SortTable): added decl for linearComputeSortFunctionBdds() * sortTable.cc (SortTable::computeMaximalOpDeclSetTable) (SortTable::minimize, SortTable::buildSortDiagram): add comments (SortTable::findMinSortIndex): rewritten using FOR_EACH_CONST ===================================Maude95c=========================================== 2010-10-20 Steven Eker * hashConsSet.cc (HashConsSet::insert): use upgradeSortIndex() to make sure any sort information in our argument is copied into an existing canonical version 2010-10-19 Steven Eker * memoMap.cc (MemoMap::getFromIndex): use insertCopy() instead of insertCopyEagerUptoReduced() * hashConsSet.hh (class HashConsSet): insertCopyEagerUptoReduced() becomes insertCopy(); decl for getCanonicalCopyEagerUptoReduced() deleted (HashConsSet::getCanonicalCopyEagerUptoReduced): deleted * hashConsSet.cc (HashConsSet::insertCopyEagerUptoReduced): becomes insertCopy() with change of semantics * memoMap.hh (class MemoMap): reverted previous change - it doesn't solve the problem since lazy symbols can still occur in toDags * memoMap.cc (MemoMap::getFromIndex): use fromDags * memoMap.hh (class MemoMap): split dags in to fromDags and toDags; this is to solve a nasty issue with reduced flags being unset arbitarily deep in fromDags with lazy function symbols (MemoMap::getToDag, MemoMap::assignToDag): use toDags ===================================Maude95a=========================================== 2010-09-30 Steven Eker * memoMap.cc: created * memoTable.hh: complete rewrite using MemoMap * memoTable.cc: complete rewrite using MemoMap * module.cc (Module::clearMemo): now delete memoMap rather that calling clearMemo() on each symbol (Module::getMemoMap): added (Module::Module): initialize memoMap * module.hh (class Module): added data member memoMap and decl for getMemoMap() * core.hh: added class MemoMap * memoMap.hh: created * memoTable.hh (class MemoTable): derive from ModuleItem 2010-09-29 Steven Eker * hashConsSet.hh (HashConsSet::getCanonicalCopyEagerUptoReduced): added * hashConsSet.cc (HashConsSet::insertCopyEagerUptoReduced): rewritten so that makeCanonicalCopyEagerUptoReduced() is only called on unreduced nodes 2010-09-28 Steven Eker * hashConsSet.hh (class HashConsSet): added decl for insertCopyEagerUptoReduced() 2010-09-16 Steven Eker * core.hh: deleted class DagNodeCache * dagNodeCache.cc: deleted * dagNodeCache.hh: deleted * hashConsSet.cc (HashConsSet::markReachableNodes): added * hashConsSet.hh (class HashConsSet): derive from SimpleRootContainer; added decl for markReachableNodes() ===================================Maude95=========================================== 2010-08-11 Steven Eker * unificationSubproblemDisjunction.cc (UnificationSubproblemDisjunction::addUnification): take mark argument * compoundCycleSubproblem.cc (CompoundCycleSubproblem::solve): implement cyclic identity base cycle breaking 2010-08-03 Steven Eker * pendingUnificationStack.cc (PendingUnificationStack::makeNewSubproblem): pass marked to addUnification() * compoundCycleSubproblem.cc (CompoundCycleSubproblem::solve): pass marked = true to push() * unificationSubproblemDisjunction.cc (UnificationSubproblemDisjunction::solve): pass marked = true to push() * pendingUnificationStack.cc (PendingUnificationStack::push): take marked arg * pendingUnificationStack.hh (class PendingUnificationStack): added marked field to struct PendingUnification (class PendingUnificationStack): updated decl for push() * unificationContext.hh (class UnificationContext): updated decl for makeFreshVariable() again * unificationContext.cc (UnificationContext::makeFreshVariable): return VariableDagNode* * unificationContext.hh (class UnificationContext): updated decl for makeFreshVariable() * unificationContext.cc (UnificationContext::makeFreshVariable): make arg const 2010-07-29 Steven Eker * unificationSubproblemDisjunction.hh (class UnificationSubproblemDisjunction): updated decl for addUnification() * unificationSubproblemDisjunction.cc (UnificationSubproblemDisjunction::addUnification): take solution arg * pendingUnificationStack.cc (PendingUnificationStack::makeNewSubproblem): pass solution to addUnification() 2010-07-20 Steven Eker * compoundCycleSubproblem.cc (CompoundCycleSubproblem::solve): fix nasty bug where we were looking at cycle; optimization: remove binding that we have reposed as pending unifications * pendingUnificationStack.cc (PendingUnificationStack::makeNewSubproblem): ignore variable to variable bindings when compiling cycle * pendingUnificationStack.hh (class PendingUnificationStack): updated decl for makeNewSubproblem() * pendingUnificationStack.cc (PendingUnificationStack::makeNewSubproblem): take UnificationContext argument * pendingUnificationStack.hh (class PendingUnificationStack): added enum SpecialTheory * pendingUnificationStack.cc (PendingUnificationStack::makeNewSubproblem): look for cycles here and create a new CompoundCycleSubproblem if one found (PendingUnificationStack::killTopSubproblem): be CompoundCycleSubproblem aware * core.hh: added class CompoundCycleSubproblem 2010-07-19 Steven Eker * compoundCycleSubproblem.cc: created * compoundCycleSubproblem.hh: created 2010-07-16 Steven Eker * pendingUnificationStack.hh (class PendingUnificationStack): added decl for solve2() * pendingUnificationStack.cc (PendingUnificationStack::findCycle) (PendingUnificationStack::findCycleFrom) (PendingUnificationStack::solve2): added * pendingUnificationStack.hh (class PendingUnificationStack): added enum Status, data members variableStatus, variabeOrder; added decls for findCycle() and findCycleFrom() * unificationContext.hh (UnificationContext::getNrOriginalVariables): added ===================================Maude94a=========================================== 2010-06-30 Steven Eker * pendingUnificationStack.cc (PendingUnificationStack::markReachableNodes): added * pendingUnificationStack.hh (class PendingUnificationStack): privately inherit from SimpleRootContainer (class PendingUnificationStack): added decl for markReachableNodes() 2010-06-29 Steven Eker * pendingUnificationStack.cc (PendingUnificationStack::resolveTheoryClash): added (PendingUnificationStack::PendingUnificationStack): create special theory table entry to track theory clashes (PendingUnificationStack::makeNewSubproblem): handle theory clash entries and use UnificationSubproblemDisjunction() * pendingUnificationStack.hh (class PendingUnificationStack): added decl for resolveTheoryClash() * core.hh: added class UnificationSubproblemDisjunction * unificationSubproblemDisjunction.cc: created * unificationSubproblemDisjunction.hh: created * pendingUnificationStack.cc (PendingUnificationStack::makeNewSubproblem): deleted commented out code that look for theory with greatest number of pending unifications ===================================Maude94=========================================== 2010-03-19 Steven Eker * substitution.hh (Substitution::addNewVariable): don't do a values.resize(copySize) as this appears to be a bug * substitution.cc (Substitution::makeLocalBinding) (Substitution::merge, Substitution::merge): deleted commented out code * substitution.hh (class Substitution): deleted commented out decls for makeLocalBinding(), merge() (2 versions) * sortBdds.cc (SortBdds::SortBdds): delete commented out sort function computation code * localBinding.cc (LocalBinding::solvedFormAssert): deleted (was commented out) * localBinding.hh (class LocalBinding): deleted commented out decl for solvedFormAssert() * subproblemSequence.cc (SubproblemSequence::unificationSolve): deleted * subproblemSequence.hh (class SubproblemSequence): delete decl for unificationSolve() 2010-03-11 Steven Eker * variableInfo.cc (VariableInfo::computeIndexRemapping): get test in DebugAdvisoryCheck() the right way around * argVec.hh (expandBy): use != rather than > (evacuate): use != rather than > 2010-03-09 Steven Eker * variableInfo.cc (VariableInfo::computeIndexRemapping): replace ad hoc print statement that was being left in shipped code with DebugAdvisoryCheck() ===================================Maude93=========================================== 2010-03-05 Steven Eker * memoryCell.hh (MemoryCell::allocateStorage): check if storageInUse > target and set needToCollectGarbage if so (MemoryCell::okToCollectGarbage): don't check storageInUse > target 2010-03-03 Steven Eker * substitution.hh (Substitution::clear): revert counter hack since it appears to be a lose 2010-03-02 Steven Eker * substitution.hh (Substitution::clear): try keeping a counter on the assumption that modern processors know how to do count down loops without branch mispredicts 2010-02-26 Steven Eker * substitution.hh: reverted unroll changes since their effect was questionable 2010-02-25 Steven Eker * substitution.hh (Substitution::Substitution): round up values length up to even (both versions) (Substitution::clone, Substitution::addNewVariable): round up values length to even (Substitution::clear): manually unroll loop * equationTable.cc (EquationTable::applyReplace): make nrVariables a long (EquationTable::applyReplaceNoOwise): make nrVariable a long * substitution.hh (Substitution::clear): try making size into a unsigned int to allow zero extension when it is combined with a pointer (Substitution::clear): gcc isn't smart enough and forgets about our "free" zero extension and does another explicit one - make size a long instead 2010-02-24 Steven Eker * equation.hh (Equation::fastNrVariables): return long in the hope having sign extension for free as part of a register load on x86-64 (class Equation): turn fast into a long since we still seem to be getting a discrete cltq instruction ===================================Maude92c=========================================== 2009-12-02 Steven Eker * hashConsSet.hh (class HashConsSet): added ifdef'd collisionCounter * hashConsSet.cc (collision): increment collisionCounter 2009-11-30 Steven Eker * hashConsSet.hh (class HashConsSet): added decl for collision() * hashConsSet.cc (collision): added 2009-11-24 Steven Eker * hashConsSet.cc: created * hashConsSet.hh: created * core.hh: added class HashConsSet 2009-11-16 Steven Eker * sortBdds.cc (makeIndexBdd): use bdd_ithvar() in place of ithvar() and bdd_nithvar() in place of nithvar() * sortTable.cc (computeSortFunctionBdds): calculate and allocate the number of BDD variables we will need up front * sortBdds.cc (makeVariableVector): use bdd_ithvar() in place of ithvar() (makeVariableBdd): bdd_ithvar() in place of ithvar() ===================================Maude92b=========================================== 2009-10-28 Steven Eker * sortBdds.cc (SortBdds): fix incorrect comment; add DebugAdvisory() ===================================Maude92a=========================================== 2009-08-06 Steven Eker * substitution.hh (bind, value): added static_cast<>s to keep g++ -Wall quiet 2009-07-24 Steven Eker * pendingUnificationStack.cc (~PendingUnificationStack): delete subproblems belonging to stack; this might fix a nasty bug where we have old LocalBinding objects with pointers to dag nodes with stale symbol pointers 2008-12-22 Steven Eker * sortBdds.hh (class SortBdds): updated decl for getSortFunctiion() (class SortBdds): made sortFunctions mutable * sortBdds.cc (getSortFunction): moved here; make sort function on demand 2008-12-12 Steven Eker * module.hh (class Module): added data member environment (getEnvironment): added * environment.hh: created ===================================Maude92=========================================== 2008-09-18 Steven Eker * equationTable.cc (applyReplace): removed extraneous debugging print statement ===================================Maude91b=========================================== 2008-09-16 Steven Eker * rootContainer.hh (class RootContainer): added empty virtual dtor for future safety * symbolMap.hh (class SymbolMap): added empty virtual dtor for future safety 2008-09-11 Steven Eker * disjunctiveSubproblemAccumulator.cc (extract): added #ifdef NO_ASSERT to avoid unused variable warning * sortTable.cc (compileOpDeclarations): added #ifndef NO_ASSERT to avoid unused variable warning 2008-06-11 Steven Eker * equationTable.cc (applyReplace): added DebugAdvisory() for slow case ===================================Maude91a=========================================== 2008-04-27 Steven Eker * pendingUnificationStack.cc (makeNewSubproblem): ifdef out new code and restore old code since new code has overhead for no benefit 2008-04-18 Steven Eker * pendingUnificationStack.cc (makeNewSubproblem): use unificationPriority() 2008-04-09 Steven Eker * pendingUnificationStack.cc (makeNewSubproblem): try ordering theories base on number of unsolved unifications ===================================Maude91=========================================== 2008-03-23 Steven Eker * solvedFormSubproblemDisjunction.cc: deleted * solvedFormSubproblemDisjunction.hh: deleted * core.hh: removed class SolvedFormSubproblemDisjunction 2008-03-13 Steven Eker * variableInfo.cc (computeIndexRemapping): keep a vector of conflict candidates to avoid quadratic behavior for large examples with trival structure ===================================Maude90a=========================================== 2008-02-12 Steven Eker * unificationContext.cc (markReachableNodes): added to fix bug that our variable dags were being collected * unificationContext.hh (class UnificationContext): derive from SimpleRootContainer; added decl for markReachableNodes() * pendingUnificationStack.cc (solve): check for empty case 2008-02-08 Steven Eker * unificationContext.cc (unificationBind): added * unificationContext.hh (class UnificationContext): added decls for unificationBind() and getVariableDagNode(); added data member variableDagNodes (getVariableDagNode): added 2008-02-05 Steven Eker * pendingUnificationStack.cc (push): fix == instead of = bug * localBinding.hh (class LocalBinding): commented out solvedFormAssert() * localBinding.cc (solvedFormAssert): commented out * substitution.cc: commented out makeLocalBinding(), merge() (both versions) * substitution.hh (class Substitution): commented out decls for makeLocalBinding(), merge() (both versions) 2008-01-31 Steven Eker * dagNodeSet.cc (insert): return index * dagNodeSet.hh (class DagNodeSet): have insert() return index * core.hh: added class PendingUnificationStack 2008-01-29 Steven Eker * pendingUnificationStack.hh: created 2008-01-21 Steven Eker * rewritingContext.cc (traceNarrowingStep): take new args * rewritingContext.hh (class RewritingContext): updated decl for traceNarrowingStep() 2008-01-17 Steven Eker * rewritingContext.hh (class RewritingContext): added decl for traceNarrowingStep() * substitution.cc: deleted commented out allocateSize initialization * solvedFormSubproblemDisjunction.hh (class SolvedFormSubproblemDisjunction): updated decl for ctor * solvedFormSubproblemDisjunction.cc (SolvedFormSubproblemDisjunction): don't take argument; initialize savedSubstitution with 0 length to avoid marking uninitialized entries - this was a worry because the uninitialized entries could stay uninitialized across rewriting if the subproblem was itself on currently unvisited path in a another subproblem disjunction * substitution.hh (clear): added Assert() to prevent clearing of substitutions with zero length vectors (Substitution): allow zero length substitutions (both versions) (value): have Assert() print out values size 2008-01-15 Steven Eker * variableInfo.cc (computeIndexRemapping): delete commented out call to Substitution::notify() ===================================Maude90=========================================== 2008-01-11 Steven Eker * solvedFormSubproblemDisjunction.cc (unificationSolve): replaced copy() with clone() as a quick hack to see what is going wrong with C unification ===================================Maude89j=========================================== 2007-11-21 Steven Eker * rule.cc (compile): pessimize the compilation of unconditional rules to avoid left->right subterm sharing that would break narrowing 2007-11-14 Steven Eker * core.hh: added class ProtectedDagNodeSet * protectedDagNodeSet.cc: created * protectedDagNodeSet.hh: created 2007-10-26 Steven Eker * rule.cc (getLhsDag): call computeBaseSortForGroundSubterms() and issue warning for function symbols without unification algorithms 2007-10-15 Steven Eker * core.hh: added class NarrowingVariableInfo * narrowingVariableInfo.hh: created * narrowingVariableInfo.cc: created 2007-09-28 Steven Eker * substitution.hh (clone): rewritten so that we never make the underlying vector smaller - this used to cause a problem with the strategy language (addNewVariable): symmetric change - this didn't cause a problem at the moment but might have done in the future with narrowing 2007-09-24 Steven Eker * rule.hh (class Rule): added decl for getLhsDag() * rule.cc (getLhsDag): added * rule.hh (class Rule): added data member lhsDag * rule.cc (reset): added * rule.hh (class Rule): added decl for reset() * ruleTable.cc (resetEachRule): added * ruleTable.hh (class RuleTable): added decl for resetEachRule() 2007-09-21 Steven Eker * substitution.hh (notify): deleted (Substitution): deleted no arg version (clear): don't check against allocateSize (class Substitution): deleted static data member allocateSize (Substitution): adde 2 arg version * module.cc (Module): initialize minimumSubstitutionSize * preEquation.cc (compileMatch): look at the module of the lhs top symbol instead * rewritingContext.hh (RewritingContext): use getMinimumSubstitutionSize() * module.hh (getMinimumSubstitutionSize): added (notifySubstitutionSize): added (class Module): added data member minimumSubstitutionSize * preEquation.cc (compileMatch): call notifySubstitutionSize() * variableInfo.hh (class VariableInfo): updated decl for computeIndexRemapping() * variableInfo.cc (computeIndexRemapping): don't call Substitution::notify(); return minmum number of variables needed 2007-09-06 Steven Eker * disjunctiveSubproblemAccumulator.cc (extract): added Assert() following coverity inspection ===================================Maude89h=========================================== 2007-06-11 Steven Eker * freshVariableGenerator.hh (class FreshVariableGenerator): added pure virtual member variableNameConflict() 2007-03-16 Steven Eker * substitution.cc (unificationBind, unificationDifference): deleted * substitution.hh (class Substitution): deleted decls for unificationBind() and unificationDifference() * localBinding.cc (unificationAssert): deleted * localBinding.hh (class LocalBinding): deleted decl for unificationAssert() * core.hh: added class SolvedFormSubproblemDisjunction * unificationSubproblemDisjunction.cc: deleted * unificationSubproblemDisjunction.hh: deleted 2007-03-15 Steven Eker * sortTable.hh (class SortTable): fix bug where we were passing realToBdd by value rather than by reference ===================================Maude89a=========================================== 2007-03-14 Steven Eker * solvedFormSubproblemDisjunction.cc (markReachableNodes): added * solvedFormSubproblemDisjunction.hh (class SolvedFormSubproblemDisjunction): derive from SimpleRootContainer (class SolvedFormSubproblemDisjunction): added decl for markReachableNodes() * unificationContext.cc (makeFreshVariable): record sort of fresh variable * unificationContext.hh (getFreshVariableSort): added * unificationContext.cc (makeFreshVariable): fix off by one error in value passed to getFreshVariableName() * substitution.hh (clone): resize values (bind): make Assert()s more verbose (value): make Assert()s more verbose (addNewVariable): added * unificationContext.cc (UnificationContext): firstFreeIndex -> nrOriginalVariables; initialize base class; don't initialize nextName (deallocateFreshVariables): deleted (makeFreshVariable): rewritten * unificationContext.hh (class UnificationContext): firstFreeIndex becomes nrOriginalVariables; decl for deallocateFreshVariables() deleted; data member nextName deleted 2007-03-13 Steven Eker * unificationContext.cc: created (UnificationContext): fixed bug where we were zeroing local nextName variable (makeFreshVariable): clear fresh variable to support reuse * unificationContext.hh (class UnificationContext): rewritten 2007-03-09 Steven Eker * solvedFormSubproblemDisjunction.cc (solve): become unificationSolve() * solvedFormSubproblemDisjunction.hh (class SolvedFormSubproblemDisjunction): define unificationSolve() rather than solve() * subproblemSequence.hh (class SubproblemSequence): added decl for unificationSolve() * subproblemSequence.cc (unificationSolve): added * unificationContext.hh (class UnificationContext): created 2007-03-02 Steven Eker * solvedFormSubproblemDisjunction.hh: created * solvedFormSubproblemDisjunction.cc: created * localBinding.hh (class LocalBinding): added decl for solvedFormAssert() * localBinding.cc (unificationAssert): fix bug where we were extracting subproblem too soon (solvedFormAssert): added * substitution.cc (merge): added Substitution& version * substitution.hh (class Substitution): added dec for merge() * substitution.cc (merge): added * substitution.hh (class Substitution): added decl for makeLocalBinding() * substitution.cc (makeLocalBinding): added ===================================Maude89=========================================== 2007-02-13 Steven Eker * substitution.hh (value): check against valued.size() rather than allocateSize so that we can use substitutions that are larger than allocateSize (bind): ditto 2007-02-07 Steven Eker * unificationSubproblemDisjunction.cc (solve): simplify (~UnificationSubproblemDisjunction): don't delete savedSubstitution * unificationSubproblemDisjunction.hh (class UnificationSubproblemDisjunction): updated decl for UnificationSubproblemDisjunction() * unificationSubproblemDisjunction.cc (UnificationSubproblemDisjunction): take nrBinding arg 2007-02-06 Steven Eker * unificationSubproblemDisjunction.hh (class UnificationSubproblemDisjunction): added data members savedSubstitution and assertionSubproblem * substitution.cc (unificationDifference): added * substitution.hh (class Substitution): added decl for unificationDifference() * localBinding.cc (unificationAssert): added * localBinding.hh (class LocalBinding): added decl for unificationAssert() * unificationSubproblemDisjunction.cc: created * unificationSubproblemDisjunction.hh: created 2007-02-05 Steven Eker * substitution.cc (unificationBind): allow varSort to be 0 in the case that we don't know the sort of the variable we are binding to - this needs to be fixed one the overall design of unification with branching is clearer ===================================Maude88f=========================================== 2007-02-02 Steven Eker * substitution.hh (class Substitution): decl for unificationBind() replaces decl for update() * substitution.cc (update): becomes unificationBind() ===================================Maude88e=========================================== 2007-01-19 Steven Eker * sortBdds.cc (SortBdds): reorganized * sortBdds.hh (class SortBdds): delete decl for getSortBdd();*i != 0 delete data member sortIndexBdds (getSortBdd): deleted 2007-01-18 Steven Eker * sortBdds.cc (SortBdds): compute gt only using active BDD variables; use makeIndexBdd() 2007-01-16 Steven Eker * unificationProblem.cc (markReachableNodes): mark lhsDag and rhsDag (findOrderSortedUnifiers): handle the convention that instantiate can return 0 if nothing changed (UnificationProblem): new viable convention (findNextUnifier): new viable convention (findOrderSortedUnifiers): return early if unifier goes to false * unificationProblem.hh (class UnificationProblem): updated decl for ctor (class UnificationProblem): deleted data member module; added data members lhsDag and rhsDag (class UnificationProblem): deleted data member mgu * unificationProblem.cc (UnificationProblem): no need for module argument 2007-01-15 Steven Eker * unificationProblem.hh (class UnificationProblem): added decl for findOrderSortedUnifiers() (class UnificationProblem): deleted struct FreeVariable * unificationProblem.cc (findOrderSortedUnifiers): added 2007-01-10 Steven Eker * sortBdds.cc (makeVariableBdd): added * sortBdds.hh (class SortBdds): added decl for makeVariableBdd() 2007-01-09 Steven Eker * sortBdds.cc (SortBdds): fill out leqRelations 2007-01-05 Steven Eker * sortBdds.cc (makeIndexVector): use bddtrue constant (SortBdds): fill out sortFunctions 2007-01-04 Steven Eker * sortBdds.cc (makeVariableVector): added * sortBdds.hh (class SortBdds): added decl for makeVariableVector() * sortTable.hh (class SortTable): added decl for virtual function computeGeneralizedSort() * sortTable.cc (computeBddVector): fix the bug that nodes corresponding to last argument in sort diagrams contain sort indices rather than node indices and must be handled as such (computeSortFunctionBdds): fix bug that we were falling into non-constant case from constant case 2007-01-03 Steven Eker * sortBdds.cc (makeIndexVector): added (makeIndexBdd): added * sortBdds.hh (class SortBdds): added decls for makeIndexVector() and makeIndexBdd() * sortTable.hh (class SortTable): adde decl for computeBddVector(); added typedefs BddVector and BddTable * sortTable.cc (computeSortFunctionBdds): implemented (computeBddVector): added 2007-01-02 Steven Eker * sortTable.cc (computeSortFunctionBdds): added as stub * sortTable.hh (class SortTable): added decl for computeSortFunctionBdds() * unificationProblem.cc (markReachableNodes): added * unificationProblem.hh (class UnificationProblem): derive from SimpleRootContainer; added decl for markReachableNodes() 2006-12-22 Steven Eker * unificationProblem.hh: created * unificationProblem.cc: created * sortBdds.hh (getSortFunction): added (class SortBdds): added data member sortFunctions (getLeqRelation): added (class SortBdds): added data member leqRelations 2006-12-20 Steven Eker * sortBdds.cc (SortBdds): calculate gtRelation * module.cc (Module): initialize sortBdds to 0 (~Module): delete sortBdds (getSortBdds): added * module.hh (class Module): added data member sortBdds (class Module): added decl for getSortBdds() * core.hh: added class SortBdds 2006-12-19 Steven Eker * sortBdds.cc: created * sortBdds.hh: created 2006-12-11 Steven Eker * substitution.hh (class Substitution): added decl for update() * substitution.cc (update): added ===================================Maude88d=========================================== 2006-11-17 Steven Eker * rewritingContext.hh (class RewritingContext): update decl for new fairTraversal() * run.cc (fairTraversal): change convention for new version * rewritingContext.hh (class RewritingContext): updated decls for fairRewrite(), fairContinue(); added decls for fairStart(), fairTraversal() * run.cc (fairRewrite, fairContinue): go back to returning void (fairStart, fairTraversal): added * rewritingContext.hh (class RewritingContext): update decl for fairTraversal() * run.cc (fairTraversal): don't take new traversal flag since we can figure this out from the currentIndex (fairRewrite, fairContinue): new fairTraversal() convention 2006-11-15 Steven Eker * rewritingContext.hh (class RewritingContext): updated decls for fairRewrite() and fairContinue() * run.cc (fairRewrite): return unused rewriteLimit (fairContinue): return unused rewriteLimit ===================================Maude88c=========================================== 2006-11-09 Steven Eker * rewritingContext.hh (transferCount): added (addInCount): made arg const 2006-10-20 Steven Eker * substitution.hh (clone): added 2006-10-17 Steven Eker * conditionFragment.hh (class ConditionFragment): added decl for dump() * preEquation.hh (class PreEquation): added decl for dump() * preEquation.cc (dump): added 2006-10-10 Steven Eker * sort.hh (class Sort): removed extraneous qualifier that is reported to cause problems under gcc 4.1 ===================================Maude88b=========================================== 2006-09-29 Steven Eker * substitution.hh: added comment to document how substitutions work; removed commented out code 2006-09-28 Steven Eker * rule.cc (compile): changed eagerness flag passed to compileBuild() from false to !hasCondition(), because if we rewrite in a lazy context, the lazy context will protect the replacement term from evaluation 2006-08-07 Steven Eker * dagNodeCache.cc (DagNodeCache): added * dagNodeCache.hh (class DagNodeCache): NO_COPYING(); declare ctor * core.hh: add class DagNodeCache * dagNodeCache.cc: created * dagNodeCache.hh: created ===================================Maude88a=========================================== 2006-03-07 Steven Eker * cachedDag.hh (getDagRoot): added ===================================Maude87=========================================== 2005-11-10 Steven Eker * module.cc (insertLateSymbol): do interSymbolPass() and postOpDeclarationPass() now that we have identities in polymorphs ===================================Maude86d=========================================== 2005-07-13 Steven Eker * sort.hh (class Sort): added FIRST_USER_SORT to enum SpecialSorts 2005-06-24 Steven Eker * symbolMap.hh (class SymbolMap): added decl for findTargetVersionOfSymbol() (class SymbolMap): updated decl for translateTerm() 2005-06-22 Steven Eker * symbolMap.hh (class SymbolMap): replaced makeTranslatedTerm() with translateTerm() 2005-06-02 Steven Eker * symbolMap.hh (class SymbolMap): added decl for makeTranslatedTerm() ===================================Maude86b=========================================== 2005-01-19 Steven Eker * sortTable.cc (dumpSortDiagram): rewritten to use set in place of IntSet 2005-01-11 Steven Eker * ctorDiagram.cc (containsConstructor): take unique arg (buildCtorDiagram): keep track of badTerminals and call sortErrorAnalysis() if needed * sortErrorAnalysis.cc (sortErrorAnalysis): use ComplexWarning() * sortTable.hh (class SortTable): updated decl for findMinSortIndex() * sortTable.cc (buildSortDiagram): keep track of badTerminals and call sortErrorAnalysis() if needed (findMinSortIndex): take unique argument * sortErrorAnalysis.cc (sortErrorAnalysis): take prereg argument rather than diagram argument * sortTable.hh (class SortTable): added decl for sortErrorAnalysis() (class SortTable): added decls for struct Node * sortErrorAnalysis.cc (sortErrorAnalysis): fix terminal case (sortErrorAnalysis): generate warning 2005-01-10 Steven Eker * sortErrorAnalysis.cc: created ===================================Maude86=========================================== 2004-12-23 Steven Eker * run.cc (ruleRewrite): added extra isUnrewritable() test and detailed comment * ruleTable.cc (applyRules): call setUnrewritable() in the case that we can't do any rewrites 2004-12-20 Steven Eker * run.cc (ruleRewrite): remove setUnrewritable() call (doRewriting): test isUnrewritable() before calling setUnstackable(); don't call setUnrewritable(); update comments 2004-12-06 Steven Eker * ruleTable.cc (RuleTable): clear nextRule 2004-12-02 Steven Eker * sortTable.hh (class SortTable): added decls for computeMaximalOpDeclSetTable() and domainSubsumes() * sortTable.cc (computeMaximalOpDeclSetTable): added (domainSubsumes): added * sortTable.hh (class SortTable): added data member maximalOpDeclSetTable (getMaximalOpDeclSet): added 2004-10-08 Steven Eker * checkedArgVecIterator.hh (operator-, operator+, operator--) (operator++): added typename to pacify g++ 3.4.2 * checkedArgVecConstIterator.hh (operator++, operator--) (operator+, operator-): added typename to pacify g++ 3.4.2 2004-10-07 Steven Eker * argVec.hh: added #include to pacify 3.4.2 2004-09-10 Steven Eker * connectedComponent.hh (class ConnectedComponent): updated decl for findMaximalSorts() * connectedComponent.cc (findMaximalSorts): rewritten in a more efficient and robust manner; pass back Vector rather than Vector ===================================Maude85=========================================== 2004-07-29 Steven Eker * rewritingContext.hh (class RewritingContext): made markReachableNodes() protected rather than private ===================================Maude84d=========================================== 2004-06-07 Steven Eker * ruleTable.cc (resetRules): moved here * module.cc (resetRules): use FOR_EACH_CONST() (saveHiddenState): added (restoreHiddenState): added * module.hh (class Module): added decls for saveHiddenState() and restoreHiddenState() * ruleTable.cc (RuleTable): don't zero nextRule (compileRules): don't zero nextRule (saveHiddenState): added (restoreHiddenState): added * ruleTable.hh (class RuleTable): added decls for saveHiddenState() and restoreHiddenState() (class RuleTable): added data member nextRuleStack ===================================Maude84c================================== 2003-08-28 Steven Eker * equationTable.hh (class EquationTable): added decl for applyReplaceNoOwise() * equationTable.cc (applyReplaceNoOwise): added ===================================Maude82================================== 2003-07-24 Steven Eker * badFlag.hh (class BadFlag): BAD -> BAD_FLAG for the benefit of losing systems that #define BAD 2003-06-19 Steven Eker * substitution.cc (operator-): fixed spelling of inconsistency * ctorDiagram.cc (containsConstructor): fixed spelling of consistency ===================================Maude81================================== 2003-05-30 Steven Eker * sortTable.hh (class SortTable): added decl for kindLevelDeclarationsOnly() * sortTable.cc (kindLevelDeclarationsOnly): added 2003-05-29 Steven Eker * substitution.hh (nrFragileBindings): made const 2003-05-28 Steven Eker * sortConstraintTable.cc (constrainToSmallerSort2): use MemoryCell::okToCollectGarbage() (2 places) * run.cc (ruleRewrite): use MemoryCell::okToCollectGarbage() (ascend): use MemoryCell::okToCollectGarbage() (doRewriting): use MemoryCell::okToCollectGarbage() * preEquation.cc (checkCondition): use MemoryCell::okToCollectGarbage() ===================================Maude80b=========================================== 2003-05-23 Steven Eker * ruleTable.cc (applyRules): use isNonexec() * sortConstraint.cc (check): use isNonexec() * rule.cc (check): use isNonexec() * equation.cc (check): use isNonexec() * module.cc (indexSortConstraints): use isNonexec() (indexEquation): use isNonexec() (insertLateSymbol): use isNonexec() * preEquation.hh (class PreEquation): added NONEXEC to enum Flags (isNonexec): added (setNonexec): added * equation.hh (class Equation): changed OWISE value 2003-05-22 Steven Eker * rootContainer.hh (class RootContainer): added decl for dump() * rootContainer.cc (dump): added 2003-05-21 Steven Eker * ruleTable.hh (class RuleTable): make resetRules() virtual 2003-05-13 Steven Eker * rewritingContext.hh (copyProblemBindings): deleted ===================================Maude80a=========================================== 2003-05-01 Steven Eker * memoryCell.hh (copySetFlags): added 2003-04-14 Steven Eker * sortTable.hh (class SortTable): made traverse() public ===================================Maude80=========================================== 2003-03-27 Steven Eker * substitution.cc (operator-): optimized using const_iterators * substitution.hh (copy): code cleaning * localBinding.hh (addBinding): moved here; use ref; made inline * localBinding.cc (retract): use FOR_EACH_CONST() (assert): use iterators 2003-03-24 Steven Eker * rhsBuilder.hh (construct): use iterators (safeConstruct): use iterators (replace): use iterators 2003-03-21 Steven Eker * substitution.cc (Substitution): deleted * substitution.hh (copy): use iter comparison rather than decrementing size (class Substitution): deleted decl for copy ctor; use NO_COPYING() * equationTable.cc (applyReplace): use FOR_EACH_CONST 2003-02-24 Steven Eker * preEquation.cc (cleanStack): updated DebugAdvisoryCheck() * rewritingContext.hh (RewritingContext): updated Assert() * subproblemAccumulator.hh: removed #pragma * termSet.cc: removed #pragma * termSet.hh: removed #pragma * sortConstraintTable.cc: removed #pragma * sortConstraintTable.hh: removed #pragma * rawRootContainer.cc: removed #pragma * rootContainer.hh: removed #pragma * rhsBuilder.cc: removed #pragma * rhsBuilder.hh: removed #pragma * rewritingContext.cc: removed #pragma (markReachableNodes): updated Assert() (rebuildUptoRoot): updated Assert() * rewritingContext.hh: removed #pragma * redexPosition.hh: removed #pragma * variableInfo.cc: removed #pragma (variable2Index): updated Assert()s * variableInfo.hh: removed #pragma * variableAbstractionSubproblem.cc: removed #pragma (solve): updated Assert() * variableAbstractionSubproblem.hh: removed #pragma * trivialRhsAutomaton.cc: removed #pragma * trivialRhsAutomaton.hh: removed #pragma * termBag.cc: removed #pragma (insertBuiltTerm): updated Assert()s * termBag.hh: removed #pragma * symbolMap.hh: removed #pragma * substitution.cc: removed #pragma (operator-): updated Assert() * substitution.hh: removed #pragma (clear): updated Assert()s (value): updated Assert()s (bind): updated Assert()s (copy): updated Assert() * subproblemSequence.cc: removed #pragma * subproblemSequence.hh: removed #pragma * subproblemDisjunction.cc: removed #pragma (addOption): updated Assert() * subproblemDisjunction.hh: removed #pragma * strategy.cc: removed #pragma * strategy.hh: removed #pragma * sortTable.cc: removed #pragma (compileOpDeclarations): updated Assert()s; simplified fancy Assert() now that we no longer allow actions in Assert()s * sortTable.hh: removed #pragma (addOpDeclaration): updated Assert() * sortConstraint.cc: removed #pragma (SortConstraint): updated Assert() (preprocess): updated Assert() * sortConstraint.hh: removed #pragma * sortCheckSubproblem.cc: removed #pragma * sortCheckSubproblem.hh: removed #pragma * sort.cc: removed #pragma * sort.hh: removed #pragma (leq): updated Assert() * simpleRootContainer.hh: removed #pragma * run.cc (fairTraversal): updated Assert() * ruleTable.cc: removed #pragma (applyRules): updated Assert() * ruleTable.hh: removed #pragma * rule.cc: removed #pragma (Rule): updated Assert() (preprocess): updated Assert() * rule.hh: removed #pragma * rootContainer.cc: removed #pragma * rawRootContainer.hh: removed #pragma * preEquation.cc: removed #pragma (PreEquation): updated Assert() (checkCondition): updated Assert()s (both versions) * preEquation.hh: * opDeclaration.hh: removed #pragma * namedEntity.hh: removed #pragma * moduleItem.hh: removed #pragma * module.cc: removed #pragma (insertSortConstraint): updated Assert() (insertEquation): updated Assert() (insertRule): updated Assert() (closeSortSet): updated Assert() (closeSignature): updated Assert() (closeFixUps): updated Assert() (closeTheory): updated Assert() (insertLateSymbol): updated Assert() * module.hh: removed #pragma * memoryCell.cc: removed #pragma (slowNew): updated Assert()s * memoryCell.hh: removed #pragma (allocateStorage): updated Assert() (allocateMemoryCell): updated Assert()s * memoTable.cc: removed #pragma * memoTable.hh: removed #pragma * localBinding.cc: removed #pragma (markReachableNodes): updated Assert() * localBinding.hh: removed #pragma * lineNumber.hh: removed #pragma * label.hh: removed #pragma * extensionMatchSubproblem.cc: removed #pragma * extensionMatchSubproblem.hh: removed #pragma * equationTable.cc: removed #pragma * equationTable.hh: removed #pragma * equation.cc: removed #pragma (Equation): updated Assert() (preprocess): updated Assert() * equation.hh: removed #pragma * equalitySubproblem.cc: removed #pragma * equalitySubproblem.hh: removed #pragma * disjunctiveSubproblemAccumulator.cc: removed #pragma (extract): updated Assert() * disjunctiveSubproblemAccumulator.hh: removed #pragma * dagRoot.cc: removed #pragma * dagRoot.hh: removed #pragma * dagNodeSet.cc: removed #pragma * dagNodeSet.hh: removed #pragma * dagArgumentIterator.hh: removed #pragma * core.cc: deleted * copyRhsAutomaton.cc: removed #pragma * copyRhsAutomaton.hh: removed #pragma * connectedComponent.cc: removed #pragma (leq): updated Assert()s (findMaximalSorts): updated Assert() (getLeqSorts): updated Assert() * connectedComponent.hh: removed #pragma * conditionState.hh: removed #pragma * conditionFragment.hh: removed #pragma * checkedArgVecIterator.hh (checkValid): updated Assert()s (checkDereferenceable): updated Assert()s (operator--): updated Assert() (operator+=): updated Assert() (operator-=): updated Assert() (operator[]): updated Assert() (operator<): updated Assert() (operator-): updated Assert() * checkedArgVecConstIterator.hh (checkValid): updated Assert()s (checkDereferenceable): updated Assert()s (operator--): updated Assert() (operator+=): updated Assert() (operator-=): updated Assert() (operator[]): updated Assert() (operator<): updated Assert() (operator-): updated Assert() * cachedDag.cc: removed #pragma * cachedDag.hh: removed #pragma * bindingLhsAutomaton.cc: removed #pragma * bindingLhsAutomaton.hh: removed #pragma * badFlag.hh: removed #pragma * argumentIterator.hh: removed #pragma * argVec.hh: removed #pragma (operator[]): updated Assert() (both versions) (contractTo): updated Assert() ===================================Maude79=========================================== 2003-02-03 Steven Eker * equationTable.cc (applyReplace): DagNode::okToCollectGarbage() -> MemoryCell::okToCollectGarbage() ===================================Maude78=========================================== 2003-01-08 Steven Eker * dagArgumentIterator.hh (DagArgumentIterator): added DagNode* version 2002-12-17 Steven Eker * argVec.hh (expandWithoutPreservationBy): added (expandWithoutPreservationBy): becomes resizeWithoutPreservation 2002-11-26 Steven Eker * memoryCell.cc (slowNew): now return MemoryCell* * memoryCell.hh: redesigned to remove the flaw that we were depending on the property that if Bar is derived from Foo, the Foo subobject starts at the beginning of Bar. This is not guaranteed by the ANSI C++ standard at does not hold for g++ 3.2 which puts Bars virtual function table pointer at the beginning of Bar. (allocateStorage): use MachineWord 2002-11-21 Steven Eker * preEquation.hh (class PreEquation): added decl for cleanStack() * preEquation.cc (cleanStack): created (checkCondition): call cleanStack() before returning to to an abort 2002-11-20 Steven Eker * checkedArgVecConstIterator.hh (operator->): made const (operator*): made const (class const_iterator): updated decls for operator*() and operator->() * checkedArgVecIterator.hh (class iterator): make const_iterator a friend (class iterator): declare operator*() and operator->() to be const (operator*): made const (operator->): made const * checkedArgVecConstIterator.hh (const_iterator): added conversion ctor from iterator * argVec.hh: added support for checked iterators * checkedArgVecConstIterator.hh: created * checkedArgVecIterator.hh: created * argVec.hh (rawBasePointer): deleted both versions 2002-11-19 Steven Eker * argVec.hh (CONST_ARG_VEC_HACK): deleted (ARG_VEC_HACK): deleted 2002-11-18 Steven Eker * argVec.hh: major rewrite to make it look more STL like and support iterators ===================================Maude77================================================== 2002-11-15 Steven Eker * module.cc (indexSortConstraints): use new style AdvisoryCheck() (indexEquation): use new style AdvisoryCheck() (indexRules): use new style AdvisoryCheck() * sortConstraint.cc (check): use new style IssueWarning() * equation.cc (check): use new style IssueWarning() * sortTable.cc (findMinSortIndex): use new style WarningCheck() * ctorDiagram.cc (containsConstructor): use new style WarningCheck() * connectedComponent.cc (ConnectedComponent): use new style IssueWarning()s 2002-11-12 Steven Eker * module.cc (insertLateSymbol): fixed bug where we weren't calling postInterSymbolPass() if status == FIX_UPS_CLOSED * equationTable.cc (applyReplace): DagNode::okToCollectGarbage() -> MemoryCell::okToCollectGarbage() (2 places) 2002-11-11 Steven Eker * module.cc (insertLateSymbol): handle owise flag for equations indexed under late symbol * module.hh (class Module): added decl for indexEquation() * module.cc (indexEquation): added (indexEquations): handle owise; use indexEquation() * equation.hh (isOwise): added * equation.cc (Equation): handle owise arg * equation.hh (class Equation): added enum Flags; updated decl for Equation() * sortConstraint.cc (compile): use isCompiled() and setCompiled() (SortConstraint): don't clear compiled * sortConstraint.hh (class SortConstraint): deleted data member compiled * rule.cc (compile): use isCompiled() and setCompiled() (Rule): don't clear compiled * rule.hh (class Rule): deleted data member compiled * equation.cc (Equation): don't clear compiled (compile): use isCompiled() and setCompiled() * equation.hh (class Equation): deleted data member compiled * preEquation.hh (isCompiled): added (setCompiled): added (class PreEquation): added enum Flags * badFlag.hh: derived from FlagSet 2002-11-05 Steven Eker * argVec.hh: moved here * memoryCellNew.hh: moved here * memoryManager.cc: moved here * memoryCell.cc: moved here * memoryCell.hh: moved here * core.hh: added class MemoryCell 2002-11-01 Steven Eker * cachedDag.hh (CachedDag): removed superflous (and under g++ 3.2 illegal) default arg 2002-10-16 Steven Eker * module.cc (insertLateSymbol): quick hack to solve late symbols problem (closeSignature): no longer do sort computations here; this has the down side that detailed sort info is no longer available for the closeFixUps pass (closeTheory): added call to postOpDeclarationsPass() on each symbol 2002-10-11 Steven Eker * module.cc: gross hack to see if we can delay sort table computations - but we have a nasty problem with late symbols 2002-10-09 Steven Eker * run.cc (doRewriting): handle case where current node is flagged and unrewritable but not flagged as unstackable and argsUnstackable is true 2002-10-08 Steven Eker * rewritingContext.hh (class RewritingContext): updated decl for descend() * run.cc (descend): no longer returns a value (fairTraversal): removed goto and inner loop (doRewriting): always set unrewritabl flag when we fail to rewrite, in case the current node has been stacked multiple times along different paths * strategy.hh (class Strategy): updated decl for setFrozen(); made virtual so that theories like ACU can modify frozen set (isFrozen): deleted * strategy.cc (setFrozen): just copy arg into frozen field 2002-10-07 Steven Eker * rewritingContext.hh (class RewritingContext): added decl for dumpStack() * rewritingContext.cc (dumpStack): added 2002-10-04 Steven Eker * run.cc (descend): rewritten assuming new Symbol::stackArguments() semantics (ascend): rewritten assuming new Symbol::stackArguments() and DagNode::copyWithReplacement() semantics * rewritingContext.hh (class RewritingContext): added decl for remakeStaleDagNode() * rewritingContext.cc (remakeStaleDagNode): added (rebuildUptoRoot): rewritten using remakeStaleDagNode(); we now assume new semantics for copyWithReplacement(), in that only some arguments may be stacked. 2002-10-03 Steven Eker * run.cc (ruleRewrite): pass respectFrozen flag to stackArguments() * strategy.hh (getFrozen): added 2002-10-02 Steven Eker * strategy.cc (Strategy): don't set frozen = false * strategy.hh (class Strategy): updatede decls for setFrozen() and isFrozen() * strategy.cc (setFrozen): moved here and rewritten * strategy.hh (class Strategy): frozen becomes a NatSet rather than a Bool (isFrozen): take argNr ===================================Maude76================================================== 2002-09-08 Steven Eker * sortTable.cc (compileOpDeclarations): only call buildCtorDiagram() in IS_COMPLEX case * sortTable.hh (addOpDeclaration): update ctorStatus * sortTable.cc (SortTable): clear ctorStatus * sortTable.hh (class SortTable): added enum CtorStatus (getCtorStatus): added 2002-08-30 Steven Eker * sortTable.hh (class SortTable): updated decl for containsConstructor() * ctorDiagram.cc (containsConstructor): removed constness * sortTable.hh (class SortTable): added decls for partlyMoreGeneral() and ctorSubsumes(); deleted decl for partiallySubsumesWrtCtor() * ctorDiagram.cc (partlyMoreGeneral): replaces partialSubsumptionWrtCtor() (ctorSubsumes): added (minimizeWrtCtor): rewritten using partlyMoreGeneral() and ctorSubsumes() (buildCtorDiagram): call minimizeWrtCtor() after checkin last arg (containsConstructor): rewritten to check for ctor inconsistancy 2002-08-29 Steven Eker * sortTable.cc (dumpSortDiagram): added HACK to avoid crash when dumping BranchSymbols 2002-08-28 Steven Eker * sortTable.hh (class SortTable): made ctorTraverse() protected (class SortTable): added data member ctorStatus 2002-08-27 Steven Eker * sortTable.cc (buildSortDiagram): deleted old code that has been duplicating the task of filling out the sort daigram for years! * sortTable.hh (class SortTable): added decls for containsConstructor(), partiallySubsumesWrtCtor(), minimizeWrtCtor() * sortTable.cc (compileOpDeclarations): call buildCtorDiagram() * ctorDiagram.cc: created * sortTable.hh (class SortTable): added data member ctorDiagram (class SortTable): added decl for buildCtorDiagram() (ctorTraverse): added 2002-08-26 Steven Eker * sortTable.cc (compileOpDeclarations): use new opDeclarations (partiallySubsumes): use new opDeclarations (buildSortDiagram): use new opDeclarations (findMinSortIndex): use new opDeclarations * sortTable.hh (class SortTable): updated decls for addOpDeclaration() and getOpDeclarations(); data member opDeclarations now has sort Vector (addOpDeclaration): rewritten (getOpDeclarations): updated return value (rangeComponent): rewritten (domainComponent): rewritten 2002-08-23 Steven Eker * core.cc: provide implementation for class OpDeclaration * core.hh: added class OpDeclaration * opDeclaration.hh (class OpDeclaration): created ===================================Maude75================================================== 2002-08-02 Steven Eker * variableInfo.cc (computeIndexRemapping): rewritten to use graph coloring to minimize number of slots needed in substitutions * variableInfo.hh (class VariableInfo): added lastUseTime member to struct ConstructionIndex (useIndex): update lastUseTime 2002-08-01 Steven Eker * termSet.cc (hash): replaced Assert(false,...) with CantHappen() * dagNodeSet.cc (hash): replaced Assert(false,...) with CantHappen() * substitution.hh (notify): added DebugAdvisory() for when allocateSize is increased ===================================Maude74================================================== 2002-06-18 Steven Eker * memoTable.cc (memoRewrite): call context.incrementEqCount() - this fixes a bug where memo rewrites were not being counted 2002-06-12 Steven Eker * sortConstraint.hh (class SortConstraint): ctor takes label arg * sortConstraint.cc (SortConstraint): handle label arg * equation.cc (Equation): handle label arg * equation.hh (class Equation): ctor takes label arg * rule.hh (class Rule): delete data member label (getLabel): deleted * rule.cc (Rule): pass label to PreEquation() * preEquation.cc (PreEquation): handle label arg * preEquation.hh (class PreEquation): ctor takes label arg; added data member label (getLabel): added 2002-05-03 Steven Eker * sortTable.cc (canProduceErrorSort): slicker version using NatSet rather than IntSet 2002-04-05 Steven Eker * variableInfo.hh (index2Variable): no longer return const Term* - the constness causes problems printing since the printing function in general needs to iterate over arguments 2002-04-03 Steven Eker * rule.cc (check): simplified normalize() call * preEquation.cc (check): simplified normalize() call * equation.cc (check): simplified normalize() call 2002-04-02 Steven Eker * preEquation.cc (solveCondition): return false in the abort case for cleanliness (checkCondition() actually ignores the reurn value in the abort case) 2002-04-01 Steven Eker * preEquation.cc (solveCondition): don't pass VariableInfo& to traceEndFragment() * rewritingContext.cc (traceEndFragment): updated stub * rewritingContext.hh (class RewritingContext): don't pass VariableInfo& in traceEndFragment() since this is already included in PreEquation* 2002-03-29 Steven Eker * rewritingContext.cc (traceBeginFragment): updated args (traceEndFragment): updated args * rewritingContext.hh (class RewritingContext): updated decls for traceBeginFragment() and traceEndFragment() * preEquation.cc (solveCondition): pass const PreEquation* and an index rather than ConditionFragment* to traceBeginFragment() and traceEndFragment() 2002-03-28 Steven Eker * module.cc (insertSortConstraint): call setModuleInfo() (insertEquation): call setModuleInfo() (insertRule): call setModuleInfo() * preEquation.hh (class PreEquation): derive from class ModuleItem ===================================Maude71a================================================== 2002-03-21 Steven Eker * preEquation.cc (checkCondition): we used to return true in the abort case to avoid backtracking and speed up stack unwinding. But this leads to a bug in that we may return true while failing to bind some conditional variables that the condition was expected to bind. So now we return false in the abort case (2 places). 2002-03-15 Steven Eker * sort.hh (class Sort): added KIND to SpecialSorts 2002-03-11 Steven Eker * subproblemDisjunction.cc: deleted explicit template instantiation * sortTable.cc: deleted explicit template instantiation * localBinding.cc: deleted explicit template instantiation * core.cc: deleted explicit template instantiations ===================================Maude71================================================== 2002-03-08 Steven Eker * equationTable.cc (applyReplace): use iterators * substitution.hh (clear): replaced VECTOR_HACK() with vector<>::iterators (copy): rewritten with iterators to eliminate SPEED_HACKS 2002-02-07 Steven Eker * core.cc: provide implementation for class State * conditionState.cc: deleted * conditionState.hh: gutted; becomes abtract non-interface for state information used in solving condition fragments * core.cc: provide implementation for class ConditionFragment * conditionFragment.cc: deleted * conditionFragment.hh (class ConditionFragment): gutted; becomes an abstract interface for condition fragments 2002-02-05 Steven Eker * strategy.cc: added def for standard * strategy.hh (class Strategy): added protected static data member standard ===================================Maude70================================================== 2001-12-12 Steven Eker * run.cc (reduce): made non-inline since with gc++ 3.0 it's not possible to have a function inline in one file and yet have an outlined copy for calls from other files: "An inline function must be defined in every translation unit that references it." - g++ problem report 3833 response ===================================Maude69================================================== 2001-10-24 Steven Eker * dagNodeSet.hh (class DagNodeSet): added decl for index2DagNode() * dagNodeSet.cc (index2DagNode): added ===================================Maude68================================================== 2001-05-14 Steven Eker * oneStep.cc: deleted * oneStep.hh: deleted 2001-04-13 Steven Eker * preEquation.cc (compileBuild): fixed nasty bug where we were not passing atTop = true to findAvailableTerms(); among other things this causes evaluated subterms under top symbol to be treated as eager rather than lazy as they should be. It also allows whole lhs to be reused in rhs via l->r sharing - something that is unsupportable by free theory discrimination nets since there is never a pointer to this in the matching stack and special casing the variables to handle a pseudo variable that take the whole subject would slow everything down 2001-04-03 Steven Eker * rewritingContext.cc (rebuildUptoRoot): use new Vector version of copyWithReplacement() * run.cc (ascend): use new Vector version of copyWithReplacement() ===================================Engine66================================================== 2001-03-30 Steven Eker * rewritingContext.hh (class RewritingContext): deleted decls for eager(), eagerRewrite() and fair() * rewritingContext.cc (eagerRewrite): deleted (eager): deleted (fair): deleted * run.cc (ruleRewrite): check for abort (doRewriting): check for abort and pretend we hit rewrite limit if so * ruleTable.cc (applyRules): return subject in abort case to that caller will see abort flag when it goes to do the post rewrite trace 2001-03-29 Steven Eker * rule.cc (Rule): fixed bug: need to initialize extLhsAutomaton (Rule): delete extLhsAutomaton * rule.hh (class Rule): deleted decl for apply() * rule.cc (apply): deleted; this function is obsoleted by higher level functions and in any case doesn't handle conditions with matching fragments correctly * rewriteSearchState.cc (RewriteSearchState): pass respectFrozen flag = true to SearchState() (findNextRewrite): use getExtLhsAutomaton() instead of getLhsAutomaton() now that the latter can return a greedy automaton that may not find all solutions * searchState.cc (SearchState): take respectFrozen flag * searchState.hh (class SearchState): updated decl for SearchState() * positionState.hh (class PositionState): added data member respectFrozen; updated decl for PositionState() * positionState.cc (PositionState): take respectFrozen flag (exploreNextPosition): support respectFrozen 2001-03-28 Steven Eker * module.hh (class Module): added decl for resetRules() * module.cc (resetRules): added * ruleTable.hh (resetRules): added * rule.cc (compile): add lhs variables to condition variables _after_ compiling so that future calls to etNonExtLhsAutomaton() or getExtLhsAutomaton() will compile lhs to to generate all matchers * run.cc (doRewriting): use new staleMarker convention (ascend): make args vector static (fairRewrite): don't set staleMarker * rewritingContext.cc (rebuildUptoRoot): use new staleMarker convention * rewritingContext.hh (class RewritingContext): added enum Special; deleted data member rootStale (RewritingContext): use new staleMarker convention (root): use new staleMarker convention * rewritingContext.cc (rebuildUptoRoot): rewritten using staleMarker * run.cc (ascend): use staleMarker rather than setStale() and clearStale() (doRewriting): use staleMarker rather than setStale() (fairRewrite): initialize staleMarker * rewritingContext.hh (class RewritingContext): added data member staleMarker 2001-03-27 Steven Eker * rule.cc (getExtLhsAutomaton): added * rule.hh (class Rule): added data member extLhsAutomaton; added decl for getExtLhsAutomaton() * strategy.hh (class Strategy): made stdStrategy and unevalArgs Bool so that they can share word with frozen flag * run.cc (descend): test isFrozen() (ruleRewrite): test isFrozen() (ruleRewrite): fix bug where we weren't incrementing nextToExplore in the frozen case * strategy.cc (Strategy): added * strategy.hh (setFrozen): added (isFrozen): added * rewritingContext.hh (class RewritingContext): use NONE (-1) as default limit on rewrites for ruleRewrite(), fairRewrite() and fairContinue() since UNBOUNDED is actually quite small for a 64-bit int (on 32-bit machines) * run.cc (fairTraversal): rewritten by manually drawing out and rearranging the control flow graph to save 2 gotos; arg is now newTraversal flag (fairRewrite): use new fairTraversal() convention (fairContinue): use new fairTraversal() convention * rewritingContext.hh (class RewritingContext): added decl for ascend() * run.cc (fairTraversal): turn parent test into an Assert when checking for a sibling since if we have manipulated redexStack correctly the only thing that might exist in redexStack[currentIndex + 1] is a sibling (assend): added (fairTraversal): use ascend() 2001-03-23 Steven Eker * rewritingContext.hh (class RewritingContext): updated decl for ruleRewrite() * run.cc (ruleRewrite): take Int64 limit * rewritingContext.hh (class RewritingContext): updated decl for fairTraversal() * run.cc (fairRewrite): pass restart arg to fairTraversal() (fairContinue): pass restart arg to fairTraversal() (doRewriting): no longer clear progress if we hit rewriteLimit (fairTraversal): return bool value to say whetherwe stop traversal because we hit rewriteLimit or because we had visited all nodes (fairContinue): rewritten (fairRewrite): use new fairTraversal() convention * rewritingContext.hh (class RewritingContext): updated fairTraversal() decl * run.cc (fairTraversal): added restart arg 2001-03-22 Steven Eker * rewritingContext.hh (class RewritingContext): added decl for fairContinue() * run.cc (fairRewrite): rewritten (doRewriting): clear progress flag if we hit our rewrite limit (fairContinue): added * rewritingContext.hh (class RewritingContext): updated decl for fairRewrite() 2001-03-21 Steven Eker * run.cc (ruleRewrite): fixed bug where we were failing in increment nextToExplore (introduced during clean up) * rewritingContext.hh (class RewritingContext): added decls for descend() and doRewriting(); updated decl for fairTraversal() * run.cc (doRewriting): added (descend): added (fairTraversal): rewritten (fairRewrite): rewritten * rewritingContext.hh (class RewritingContext): added data members progress, rewriteLimit, gasPerNode, currentGas, lazyMarker * run.cc (reduce): made inline, moved here (ruleRewrite): moved here (fairRewrite): cleaned, moved here (fairTraversal): moved here 2001-03-20 Steven Eker * rewritingContext.cc (ruleRewrite): code cleaning; use objects redexStack rather than local "stack" 2001-03-16 Steven Eker * rewritingContext.cc (fairTraversal): call okToCollectGarbage() (2 places) * sortConstraintTable.cc (constrainToSmallerSort2): call incrementMbCount() * oneStep.cc (findNextRewrite): incrementCount() -> incrementRlCount() * ruleTable.cc (applyRules): incrementCount() -> incrementRlCount() * rule.cc (apply): incrementCount() -> incrementRlCount() * equationTable.cc (applyReplace): incrementCount() -> incrementEqCount() (2 places) * rewritingContext.hh (incrementCount): deleted (incrementMbCount): added (incrementEqCount): added (incrementRlCount): added (addInCount): rewritten (count): deleted (getMbCount): added (getMbCount): added (getEqCount): added (getRlCount): added (class RewritingContext): deleted data member rewriteCount; added data members mbCount, eqCount, rlCount; updated function decls (RewritingContext): rewritten (clearCount): rewritten 2001-03-15 Steven Eker * rewritingContext.cc (fairTraversal): added (fairRewrite): use fairTraversal() (fairTraversal): support unstackable flag; there is a bug in the unstackable flag use in fair() that we avoid in this non-recursive version 2001-03-14 Steven Eker * rewritingContext.cc (fairRewrite): pass eager flag to fair() * rewritingContext.hh (class RewritingContext): updated fair() decl * rewritingContext.cc (fair): take and pass eager flag; only do reduce if eager flag is true; argsUnstackable calculation optimized 2001-03-13 Steven Eker * rewritingContext.cc (fair): support Unstackable flag * rewritingContext.hh (class RewritingContext): added decls for fair( and fairRewrite() * rewritingContext.cc (fair): added (fairRewrite): added 2001-03-09 Steven Eker * rewritingContext.cc (eager): check isReduced() before trying eqRewrite(); call reduce() after a successful eqRewrite() or ruleRewrite() 2001-03-08 Steven Eker * rewritingContext.cc (eager): use Symbol::stackArguments * redexPosition.hh (isLazy): beomes isEager() (class RedexPosition): lazy -> eager throughout; it's less confusing since we also have semi-eager which is treated as lazy so now we have eager and non-eager 2001-03-07 Steven Eker * redexPosition.hh (RedexPosition): added LAZY to enum Flags; added decls for isLazy() and for ctor with lazy flag (isLazy): added * rewritingContext.cc (rebuildUptoRoot): only rebuild none stale entries in redex stack (eager): use clearStale(), setStale() and isStale() to avoid building replacements for node where nothing underneath them changed by rlRewrite() (changes due to eqRewrite() are make in place and so don'r require rebuilding 2001-03-06 Steven Eker * rewritingContext.cc (eager): use isUnrewritable() and setUnrewritable() * redexPosition.hh (setStale): added (clearStale): added (isStale): added (class RedexPosition): added enum Flags and data member flags 2001-03-05 Steven Eker * rewritingContext.cc (eager): unstack stacked nodes in all cases (eager): need to set rootStale = true whenever we replaceNode() * rewritingContext.hh (class RewritingContext): added data member rootStale (root): check for rootStale and call rebuildUptoRoot() if needed (RewritingContext): initialize rootStale to false (class RewritingContext): toot() is no longer const * rewritingContext.cc (markReachableNodes): mark nodes in redexStack * rewritingContext.hh (class RewritingContext): added decls for eagerRewrite() and eager() * rewritingContext.cc (eagerRewrite): added (eager): added * redexPosition.hh (replaceNode): added * rewritingContext.hh (class RewritingContext): added decl for rebuildUptoRoot() * rewritingContext.cc (rebuildUptoRoot): added * rewritingContext.hh (class RewritingContext): added data members redexStack and currentIndex ===================================Engine65================================================== 2001-02-16 Steven Eker * module.cc (Module): commented out symbol deletion to chase bug 2001-02-15 Steven Eker * preEquation.cc (checkCondition): initialize trialRef if findFirst - this fixed an uninit bug that shows up under purify 2001-02-06 Steven Eker * searchState.cc: completely rewritten; we fixed a nasty memory leak where we weren't deleting subproblems that failed to have even a first solution * searchState.hh: completely rewritten * core.hh: added forward decls for RewriteSearchState and MatchSearchState * matchSearchState.hh: created * matchSearchState.cc: created * rewriteSearchState.hh: created * rewriteSearchState.cc: created 2001-02-05 Steven Eker * searchState.cc (getResult): deleted (getRule): added (getReplacement): added * searchState.hh (class SearchState): added decls for getRule() and getReplacement(); delete decl for getResult() * searchState.cc (getMatch): deleted * searchState.hh: completely rewritten using class PositionState (getContext): added (getPattern): added * searchState.cc: completely rewritten using class PositionState * core.hh: added forward decl for class PositionState * positionState.hh: created * positionState.cc: created * conditionState.cc (ConditionState): use addInCount() rather than incrementCount() * conditionFragment.cc (solve): use addInCount() rather than incrementCount() (2 places) * rewritingContext.hh (class RewritingContext): added decls for clearCount() and addInCount() (clearCount): added (addInCount): added 2001-02-02 Steven Eker * pattern.cc (traceBeginTrial): added * searchState.cc (findNextMatch): getAutomaton() -> getLhsAutomaton() * pattern.cc (~Pattern): deleted (Pattern): rewritten using PreEquation calls * pattern.hh (class Pattern): derive from PreEquation rather than VariableInfo; added decl for traceBeginTrial(); deleted decls for getTerm(), getAutomaton() and dtor; deleted data members term and automaton; ctor decl takes extra arg with default (getTerm): deleted (getAutomaton): deleted * sortConstraint.hh (class SortConstraint): made traceBeginTrial() private; use noCondition as default arg for ctor * rule.hh (class Rule): made traceBeginTrial() private; use noCondition as default arg for ctor * equation.hh (class Equation): use noCondition as default arg for ctor (class Equation): made traceBeginTrial() private * preEquation.hh (class PreEquation): added protected data member noCondition 2001-01-30 Steven Eker * sortConstraintTable.cc (constrainToSmallerSort2): check context.traceAbort() after calling context.tracePreScApplication() * conditionFragment.cc (solve): deleted commented out getTraceStatus() stuff (2 places) * preEquation.cc (checkCondition): check context.traceAbort() after calling traceBeginTrial() since this might set abort condition 2001-01-29 Steven Eker * searchState.cc (getMatch): return extensionInfo vai 3rd ref arg * searchState.hh (class SearchState): updated decl for getMatch() 2001-01-05 Steven Eker * searchState.cc (findNextMatch): fixed memory leak where we were not deleting matchingSubproblem when it failed (SearchState): (both versions) clear extensionInfo pointer (findNextMatch): delete extensionInfo before assigning to extensionInfo to fix a memory leak where old extensionInfo pointer was overwritten without being deleted 2001-01-03 Steven Eker * pattern.hh (getTerm): added * searchState.cc (getMatch): moved here so that files that include searchState.hh fon't have to know about Pattern and RewritingContext for pointer conversions (findNextMatch): need to call clear() * searchState.hh (getMatch): now pass back variable info 2001-01-02 Steven Eker * searchState.cc (findNextMatch): added * searchState.hh (getMatch): added (class SearchState): added data member firstMatch * searchState.cc (SearchState): code cleaning (SearchState): added Pattern* version (~SearchState): delete pattern * core.hh: added forward decl for class Pattern * pattern.cc: created * pattern.hh: created ===================================Engine64================================================== 2000-12-22 Steven Eker * searchState.cc (findNextPosition): don't look for a next position if maxDepth < 0 (findNextRewrite): don't add 1 to rewrite count to account for apply * module.cc (~Module): delete sorts here so we delete sorts when a module is destructed even if the sort set has not been closed * connectedComponent.cc (~ConnectedComponent): don't delete sorts here 2000-12-21 Steven Eker * conditionState.cc (ConditionState): initialize subproblem * conditionFragment.cc (solve): delete newly created ConditionState if we fail to find an initial solution 2000-12-20 Steven Eker * core.hh: added forward decl for class SearchState * searchState.hh (class SearchState): updated decl for getResult() * searchState.cc (getResult): pass back substitution * searchState.hh (class SearchState): substValues becomes Vector (setInitialSubstitution): use DagRoot * searchState.cc (SearchState): rewriten passing subject via DagRoot; Unmade - we need to maintain RewritingContext between to findNextRewrite() since it holds the substitution (initSubstitution): use DagRoot 2000-12-19 Steven Eker * searchState.cc (findNextRewrite): fixed bug where we were not initializing subject and extensionn info correctly after finding our first position that satisfies minimum depth criteria (findNextRewrite): pass number of rewrites used via stepCount ref arg * searchState.hh (class SearchState): updated findNextRewrite() decl * searchState.cc (initSubstitution): substValues is now an array of RewritingContext* (~SearchState): delete substitution stuff entrusted to us by our creator (SearchState): don't init substVariables, substValues * searchState.hh (setInitialSubstitution): move here and rewritten; we now take responsibility for delete the substitution info * searchState.cc (~SearchState): delete context, don't call context.finished() (SearchState): changed handling of context (findNextRewrite): changed handling of context (getResult): changed handling of context (initSubstitution): changed handling of context * searchState.hh (class SearchState): updated decl for setInitialSubstitution() (class SearchState): upadted decl for local variables context, substVariables and substValues (class SearchState): updated decl for ctor * rule.cc (compile): fixed bug - we must use compileTopRhs() rather than compileRhs() to ensure builder will not be empty 2000-11-28 Steven Eker * searchState.cc (setInitialSubstitution): added (findNextRewrite): call initSubstitution() (SearchState): zero substVariables and substValues * searchState.hh (class SearchState): added decl for initSubstitution() * searchState.cc (initSubstitution): added * searchState.hh (class SearchState): added data members substVariables and substValues * searchState.cc (findNextRewrite): make sure first position tried meets minDepth criteria * searchState.hh (class SearchState): added data member minDepth, updated ctor decl * searchState.cc (SearchState): set extensionInfo correctly in non-ext case (SearchState): initialize depth array (findNextRewrite): check rule's label before using it (SearchState): added minDepth arg 2000-11-27 Steven Eker * searchState.hh (class SearchState): added data member trialRef * searchState.cc: stack -> redexStack to avoid clash with stack template (~SearchState): empty condition stack (checkCondition): deleted (findNextRewrite): rewritten using new checkCondition() (SearchState): initialize trialRef * core.hh: added forward decl for class ConditionState * preEquation.hh (class PreEquation): brought decls into line with latest reorganization * preEquation.cc (solveCondition2): added (solveCondition): use solveCondition2() (checkCondition): new general purpose version added that allows looking for new solutions to a condition that has already suceeded (checkCondition): rewritten in terms of more general version (solveCondition): deleted (solveCondition2): becomes new solveCondition() * searchState.hh (class SearchState): added data member conditionStack * searchState.cc (findNextRewrite): use getNonExtLhsAutomaton() * preEquation.cc (PreEquation): delete lhsAutomaton before calling lhs->deepSelfDestruct() - this should make any difference but it's cleaner since lhsAutomaton may have pointers into lhs but no vice versa * rule.cc (Rule): clear nonExtLhsAutomaton (~Rule): delete nonExtLhsAutomaton (getNonExtLhsAutomaton): added * rule.hh (class Rule): added decl for getNonExtLhsAutomaton() and data member nonExtLhsAutomaton 2000-11-10 Steven Eker * preEquation.cc (solveCondition): delete state elements before returning - this fixes a nasty bug where we left RewritingContext objects around with root pointers pointing to old dagnodes whose symbols might be deleted if their module is delete or replaced, leading to disater during a garbage collect * preEquation.hh (class PreEquation): updated decl for trialRef * preEquation.cc (solveCondition): take trialRef arg and pass it to traceBeginFragment() and traceEndFragment() (checkCondition): pass trialRef to solveCondition() * rewritingContext.cc (traceBeginFragment): added trialRef arg (traceEndFragment): added trialRef arg * rewritingContext.hh (class RewritingContext): updated decls for traceBeginFragment() and traceEndFragment() 2000-11-01 Steven Eker * oneStep.hh: #define _oneContext_hh_ -> _oneStep_hh_; not really a bug - just an inconsistancy 2000-10-23 Steven Eker * conditionFragment.hh (class ConditionFragment): deleted decl for remapIndices() * preEquation.cc (compileMatch): don't call ConditionFragment::remapIndices() * conditionFragment.cc (compileBuild): call determineContextVariables() and insertAbstractionVariables() here (compileMatch): don't call determineContextVariables() and insertAbstractionVariables() here (compileMatch): do index remapping here (remapIndices): deleted * preEquation.cc (compileBuild): call determineContextVariables() and insertAbstractionVariables() here (compileMatch): don't call determineContextVariables() and insertAbstractionVariables() here 2000-10-16 Steven Eker * preEquation.cc (compileMatch): we have a nasty problem in that compileLhs() is called before computeIndexRemapping(), while computeIndexRemapping() can add new protected variables. This means that the Substitutions inside the matching amtomata made by compileLhs() could be the wrong size (too small) with bad things happening when such substitutions are copied back to the main substitution during matching & solving. We introduce a temporary hack that does computeIndexRemapping() earlier, but breaks the condition fragment version of compileMatch() in the case that the latter introduces abstraction variables in order to see if the above mentioned bug is the sole cause of current crashes * substitution.hh (copy): make Assert message more detailed 2000-08-30 Steven Eker * core.hh: deleted class ComplexSort * complexSort.cc: deleted * complexSort.hh: deleted ===================================Engine62================================================== 2000-08-29 Steven Eker * connectedComponent.cc (ConnectedComponent): insert newly created error sorts into module * module.cc (closeSortSet): postpone setting status = SORT_SET_CLOSED until end so that we can add in error sorts 2000-08-21 Steven Eker * conditionFragment.cc (remapIndices): get remapping correct for each fragment type * connectedComponent.hh (class ConnectedComponent): added back decl for findMaximalSorts() * connectedComponent.cc (findMaximalSorts): added back since we need this form metalevel 2000-08-04 Steven Eker * complexSort.cc (operator<<): don't handle union sorts * ruleTable.cc (applyRules): don't check for subject in error sort in pattern in error sort * equation.cc (compile): no longer have to parse to non-error sort to be "fast" * equation.hh (class Equation): no longer have to parse to non-error sort to be "fast" * equationTable.cc (applyReplace): don't check for subject in error sort in pattern in error sort 2000-08-01 Steven Eker * sortTable.cc (findMinSortIndex): don't make local NatSet static since there isn't any saving unless we have more than 32 op decls (buildSortDiagram): ditto (2 places) 2000-07-31 Steven Eker * connectedComponent.cc (findIndex): made const * connectedComponent.hh (class ConnectedComponent): deleted data member unionSorts (class ConnectedComponent): make findIndex() decl const * sortTable.cc (dumpSortDiagram): don't use ComplexSort (2 places) * sort.cc (dump): don't use ComplexSort * sort.hh (leq): (int, Sort*) version: don't handle union sorts (leq): (Sort*, int) version: don't handle union sorts added decl for operator<< * connectedComponent.hh (class ConnectedComponent): deleted decls for findMaximalSorts() (both versions) * connectedComponent.cc (findMaximalSorts): deleted (both versions) * sortTable.hh (class SortTable): deleted decl for lookupSortIndex() * sortTable.cc (lookupSortIndex): deleted - this only existed to handle sort computations when and argument was in a union sort * connectedComponent.cc (findIndex): don't return a union sort; instead return the sort with largest index that is greater or equal to all of the sorts in the input set (getLeqSorts): don't handle union sorts (leq): don't handle union sorts * sort.hh (class Sort): removed UNION_SORT from enum SpecialSorts ===================================Engine61================================================== 2000-07-28 Steven Eker * rewritingContext.cc (traceBeginFragment): added firstAttempt arg * preEquation.cc (solveCondition): pass firstAttempt arg to traceBeginFragment() * rewritingContext.hh (class RewritingContext): added firstAttempt arg to traceBeginFragment() decl * conditionFragment.hh: added decl for operator<< * rewritingContext.hh (class RewritingContext): added decls for traceBeginFragment(), traceEndFragment() * preEquation.cc (solveCondition): call traceBeginFragment(), traceEndFragment(), check for abort * conditionFragment.cc (remapIndices): moved here (remapIndices): remap rhsIndex and lhsIndex if appropriate * variableInfo.cc (computeIndexRemapping): added * variableInfo.hh (remapIndex): added (class VariableInfo): added newIndex field to struct ConstructionIndex * conditionFragment.hh (class ConditionFragment): added decl for remapIndices() (remapIndices): added * rule.cc (compile): call remapIndices() * equation.cc (compile): call remapIndices() * preEquation.cc (compileMatch): call computeIndexRemapping(); call remapIndices() on each fragment * rhsBuilder.cc (remapIndices): added * rhsBuilder.hh (class RhsBuilder): added decl for remapIndices() * trivialRhsAutomaton.hh (class TrivialRhsAutomaton): added decl for remapIndices(); data member no longer const * copyRhsAutomaton.hh (class CopyRhsAutomaton): added decl for remapIndices((); data members are no longer const * copyRhsAutomaton.cc (remapIndices): added 2000-07-26 Steven Eker * variableInfo.hh (class VariableInfo): adde decls for computeIndexRemapping() and remapIndex() * rule.cc (compile): don't call Substitution::notify() * sortConstraint.cc (compile): don't call Substitution::notify() * equation.cc (compile): use getNrProtectedVariables() instead of nrVariables(); don't call Substitution::notify() * ruleTable.cc (applyRules): use getNrProtectedVariables() instead of nrVariables() * equationTable.cc (applyReplace): use getNrProtectedVariables() instead of nrVariables() * sortConstraintTable.cc (constrainToSmallerSort2): use getNrProtectedVariables() instead of nrVariables() * oneStep.cc (findNextRewrite): use getNrProtectedVariables() instead of nrVariables() * variableInfo.hh (class VariableInfo): added enum Values with MAX_NR_PROTECTED_VARIABLES since we cannot use -ve indices for constructionIndices (useIndex): was useConstructionIndex() but now we can call it on any index (class VariableInfo): decl for useConstructionIndex() becomes useIndex() * conditionFragment.cc (compileBuild): call endOfFragment(); * variableInfo.hh (makeProtectedVariable): added (endOfFragment): added (useConstructionIndex): added * variableInfo.cc (makeAbstractionVariable): deleted (allocateIndex): deleted (VariableInfo): added * variableInfo.hh (nrVariables): deleted (getNrRealVariables): added (getNrProtectedVariables): added (class VariableInfo): added decl for getNrRealVariables(), getNrProtectedVariables(), makeProtectedVariable(), makeConstructionIndex(), endOfFragment(), useConstructionIndex() (class VariableInfo): deleted decls for nrVariables(), makeAbstractionVariable() and allocateIndex() * preEquation.cc (PreEquation): delete lhsAutomaton ===================================Engine60================================================== 2000-07-21 Steven Eker * conditionFragment.cc (solve): use safeConstruct() * rhsBuilder.hh (safeConstruct): added; this can be called even on empty RhsBuilder (class RhsBuilder): added decl for safeConstruct() * conditionFragment.cc (compileBuild): use compileTopRhs() (4 places) (compileBuild): unmade previous change * preEquation.hh (class PreEquation): added decl for solveCondition() * preEquation.cc (solveCondition): added (checkCondition): rewritten using solveCondition() * conditionState.hh (class ConditionState): rhsContext becomes a pointer * conditionFragment.cc (solve): added * conditionState.cc (ConditionState): use Substitution::copy() 2000-07-18 Steven Eker * equation.cc (compile): use compileTopRhs() * conditionFragment.hh (getType): made const (getLhs): made const (getRhs): made const (getSort): made const 2000-07-12 Steven Eker * module.cc (indexSortConstraints): lhs() -> getLhs() (indexEquations): lhs() -> getLhs() (indexRules): lhs() -> getLhs() (insertLateSymbol): lhs() -> getLhs() (3 places) * oneStep.cc (findNextRewrite): don't call copyProblemBindings() (findNextRewrite): use getLhsAutomaton() instead of lhsAutomaton() (findNextRewrite): use getRhsBuilder() instead of rhsAutomaton() * rhsBuilder.cc (dump): aliens -> automata * sortConstraintTable.cc (sortConstraintLt): use getSort() instead of sort() (constrainToSmallerSort2): use getLhsAutomaton() instead of lhsAutomaton() (constrainToSmallerSort2): use getSort() instead of sort() * ruleTable.cc (applyRules): use getUnboundVariables() instead of variableSafe() (applyRules): use getLhsAutomaton() instead of lhsAutomaton() (applyRules): don't call copyProblemBindings() (applyRules): use getRhsBuilder() instead of rhsAutomaton() (2 places) * equationTable.cc (applyReplace): use getLhsAutomaton() instead of lhsAutomaton() (2 places) (applyReplace): use getRhsBuilder() instead of rhsAutomaton() (4 places) (applyReplace): don't call copyProblemBindings() (dumpEquationTable): use getLhsAutomaton() instead of lhsAutomaton() (applyReplace): use getLhs() instead of lhs() * sortConstraint.cc (check): rewritten (preprocess): use new names for things (compile): rewritten (SortConstraint): rewritten * sortConstraint.hh (class SortConstraint): updated ctor decl; sort() -> getSort(); scSort -> sort; scCompiled -> compiled (sort): becomes getSort() * rule.cc (apply): use builder instead of rhsAutomaton * rule.hh (label): becomes getLabel() * rule.cc (Rule): rewritten (~Rule): don't delete rhsAutomaton (check): rewritten (preprocess): use new names for things; don't call addRhsVariables() (compile): rewritten (apply): check unboundVariables rather than variableSafeFlag (apply): use getLhsAutomaton() instead of lhsAutomaton() (apply): don't call copyProblemBindings() * rule.hh (class Rule): upated decl got ctor; decl for getRhsBuilder() replaces decl for rhsAutomaton(); (class Rule): label() -> getLabel(); ruleLabel -> label; ruleRhs -> rhs; rlCompiled -> compiled; deleted data member ruleProblemVariables; ruleRhsAutomaton replaced by data member builder (rhs): becomes getRhs() (problemVariables): deleted (variableSafe): deleted (class Rule): deleted decl for variableSafe(); deleted data member variableSafeFlag (rhsAutomaton): becomes getRhsBuilder() * rhsBuilder.hh (construct): made const (replace): made const (class RhsBuilder): updated decls for construct() and replace() * equation.cc (Equation): don't clear rhsAutomaton (Equation): don't delete rhsAutomaton * equation.hh (class Equation): deleted data member rhsAutomaton; added data member builder; decl for getRhsAutomaton() becomes getRhsBuilder() (getRhsBuilder): added (getRhsAutomaton): deleted * equation.cc (check): rewritten (preprocess): don't call addRhsVariables() (compile): rewritten * preEquation.hh (class PreEquation): updated decl for check() * preEquation.cc (check): pass back boundVariables set though reference arg * equation.cc (Equation): rewritten (~Equation): rewritten * equation.hh (class Equation): updated ctor decl; eqCompiled -> compiled; eqRhsAutomaton -> rhsAutomaton; eqRhs -> rhs; rhs() -> getRhs(); rhsAutomaton() -> getRhsAutomaton(); deleted eqProblemVariables; deleted decl for problemVariables() (rhs): becomes getRhs() (rhsAutomaton): becomes getRhsAutomaton() (problemVariables): deleted * conditionFragment.cc (compileBuild): set nrIndicesToProtect * conditionFragment.hh (class ConditionFragment): added data member nrIndicesToProtect * preEquation.hh (class PreEquation): updated decl for check(); added decls for compileBuild() and compileMatch(); deleted decl for compile() * preEquation.cc (check): lose checkCondVars arg (check): greatly simplified (preprocess): simplified (compileBuild): added (compileMatch): added (compile): deleted * variableInfo.hh (rhsVariables): deleted (getUnboundVariables): added * conditionFragment.hh (class ConditionFragment): checkVariables() decl -> check() * conditionFragment.cc (checkVariables): becomes check(); use addUnboundVariables(); lose last arg * variableInfo.hh (class VariableInfo): deleted decl for rhsVariables(); deleted data member rhsVars; deleted decl for addRhsVariables(); added decl for getUnboundVariables(); added decl for add UnboundVariables(); added data member unboundVariables (class VariableInfo): conditionVars -> conditionVariables; conditionVariables() decl -> getConditionVariables() (addUnboundVariables): added (addRhsVariables): deleted (conditionVariables): becomes getConditionVariables() * preEquation.cc (PreEquation): rewritten (~PreEquation): rewritten * preEquation.hh (class PreEquation): deleted data members peCondLhs, peCondRhs, peEagerVariables, peCondLhsAutomaton, peCondRhsAutomaton, peProblemVariables; added data member condition (lhs): becomes getLhs() (class PreEquation): peLhs -> lhs; peLhsAutomaton -> lhsAutomaton; lhs() decl -> getLhs(); lhsAutomaton() -> getLhsAutomaton() (condLhs): deleted (condRhs): deleted (getCondition): added (hasCondition): use isNull() (eagerVariables): deleted (lhsAutomaton): becomes getLhsAutomaton() (class PreEquation): added decl for getCondition(); deleted decls for condLhs(), condRhs() and eagerVariables() (class PreEquation): updated decl for ctor (class PreEquation): deleted decl for setLhsAutomaton() (this seems to be left over from 3 years ago!) 2000-07-10 Steven Eker * conditionFragment.hh (class ConditionFragment): added decls for compileBuild() and compileMatch() * conditionFragment.cc (ConditionFragment): initialize lhsIndex and rhsIndex (~ConditionFragment): don't delete lhsBuilder or rhsBuilder (~ConditionFragment): deepSelfDestruct() rhs (compileBuild): added (compileMatch): added * conditionFragment.hh (class ConditionFragment): added data member builder (class ConditionFragment): lhsBuilder and rhsBuilder become lhsIndex and rhsIndex * core.hh: added forward decl for class ConditionFragment * rhsBuilder.hh (class RhsBuilder): added decl for empty() (empty): added * core.hh: added forward declaration for class TrivialRhsAutomaton * trivialRhsAutomaton.hh: created * trivialRhsAutomaton.cc: created * variableInfo.hh (class VariableInfo): added decl for allocateIndex() * variableInfo.cc (allocateIndex): added * core.hh: added forward declarations for class TermBag and class RhsBuilder * rhsBuilder.hh: created * rhsBuilder.cc: created * termBag.hh: created * termBag.cc: created ===================================Engine59================================================== 2000-07-05 Steven Eker * core.hh: added forwards decls for class BindingLhsAutomaton and class CopyRhsAutomaton * bindingLhsAutomaton.cc (match): only bind variable if match succeeds * copyRhsAutomaton.cc: created * copyRhsAutomaton.hh: created 2000-07-03 Steven Eker * bindingLhsAutomaton.hh: created * bindingLhsAutomaton.cc: created 2000-06-30 Steven Eker * conditionFragment.cc: created * conditionFragment.hh: created 2000-06-26 Steven Eker * variableInfo.hh (class VariableInfo): don't use NO_COPYING() macro since we need to be able to copy objects of this class afterall 2000-06-23 Steven Eker * variableInfo.cc (variable2Index): use equal() (makeAbstractionVariable): append (Term*) 0 to variables * variableInfo.hh (class VariableInfo): variable2Index() takes VariableTerm* rather than VariableSymbol*; index2Variable() returns const Term* rather than VariableSymbol* (class VariableInfo): data member variables is now Vector (class VariableInfo): use NO_COPYING() macro (index2Variable): return const Term* ===================================Engine58================================================== 2000-05-23 Steven Eker * preEquation.cc (preprocess): added AdvisoryCheck() for patterns in error sort 2000-04-05 Steven Eker * rule.cc (apply): now that variable in conditions need not occur in lhs we insist that any variable not occuring in the lhs be bound; this fixes a bug that we introduced when we allowed the more flexiable rule syntax 2000-03-29 Steven Eker * cachedDag.hh (getDag): added HACK to set sort info in created dag if it is set in original term. This is to avoid a nasty bug where a variable is bound to an identity dag which doesn't have sort info and is then matched into via idempotency. 2000-03-17 Steven Eker * sortTable.cc (dumpSortDiagram): ifdef'd * sortTable.hh (class SortTable): use NO_COPYING() macro; ifdef'd dumpSortDiagram() decl * sort.cc (dump): ifdef'd * sort.hh (class Sort): use NO_COPYING() macro; ifdef'd dump() decl * module.cc (dump): ifdef'd * module.hh (class Module): ifdef'd dump() decl * localBinding.hh (class LocalBinding): use NO_COPYING() macro * localBinding.cc (dump): ifdef'd (both versions) * localBinding.hh (class LocalBinding): ifdef'd dump() decls * equationTable.cc (dumpEquationTable): ifdef'd * equationTable.hh (class EquationTable): ifdef'd dumpEquationTable() decl * connectedComponent.cc (dump): ifdef'd * connectedComponent.hh (class ConnectedComponent): use NO_COPYING() macro; ifdef'd dump() decl * module.cc (indexSortConstraints): standardized AdvisoryCheck() (indexRules): standardized AdvisoryCheck() (indexEquations): standardized AdvisoryCheck() * sortTable.cc (findMinSortIndex): standardized WarningCheck() 2000-03-16 Steven Eker * module.cc (insertLateSymbol): do postInterSymbolPass() if we have closed fixups 2000-03-14 Steven Eker * connectedComponent.cc (findIndex): added Assert() to check sortCount 2000-03-09 Steven Eker * preEquation.cc (checkCondition): check for abort after condition checked so we don't end up calling traceEndTrial() or traceExhausted() during an abort 2000-03-07 Steven Eker * module.cc (insertSortConstraint): moved here, no longer inline (insertEquation): moved here, no longer inline (insertRule): moved here, no longer inline 2000-03-06 Steven Eker * rule.hh (class Rule): added decl for check() * module.cc (indexRules): moved call to preprocess inside test for badness; actually nothing sets badness for rules now as ther is no constraint of variables - we do this for symmetry * module.hh (insertRule): call check() * rule.cc (check): added (preprocess): simplified * module.cc (indexSortConstraints): moved call to preprocess inside test for badness as badness flag is now set by check() * module.hh (insertSortConstraint): call check() * sortConstraint.hh (class SortConstraint): added decl for check(); * sortConstraint.cc (check): added (preprocess): simplified * module.hh (insertEquation): call check() * equation.cc (check): added * equation.hh (class Equation): added decl for check() * module.cc (indexEquations): moved call to preprocess inside test for badness as badness flag is now set by check() * equation.cc (preprocess): greatly simplified * preEquation.hh (class PreEquation): added decl for check() * preEquation.cc (check): added (preprocess): greatly simplified * module.hh (class Module): added FIX_UPS_CLOSED to enum Status * module.cc (closeFixUps): added; now do interSymbol passes and postInterSymbol pass here (closeTheory): Assert now checks for FIX_UPS__CLOSED; no longer do interSymbol passes and postInterSymbol pass here * module.hh (class Module): use NO_COPYING() macro (class Module): added decl for closeFixUps(); ===================================Engine56================================================== 2000-02-15 Steven Eker * module.cc (Module): revert to simple symbol deletion code; this should now be safe as we will forbid dag node dtors from accessing symbols (notifyOfGC): deleted * module.hh (class Module): made closeSortSet(), closeSignature() and closeTheory() virtual (class Module): deleted static members virgin, seen1GC, seen2OrMoreGCs (class Module): deleted decl for notifyOfGC() 2000-02-14 Steven Eker * sort.cc (Sort): don't pass type arg to NamedEntity * module.cc (Module): don't pass type arg to NamedEntity * label.hh (Label): don't pass type arg to NamedEntity * namedEntity.hh (class NamedEntity): deleted enum EntityType, data member etype and decl for type(); ctor no longer takes type; name now const (type): deleted (NamedEntity): don't take type arg 2000-01-31 Steven Eker * sortTable.cc (generateSortDiagram): use struct Flags ===================================Engine55================================================== 2000-01-27 Steven Eker * sort.cc (generateSortVector): added 2000-01-24 Steven Eker * sortTable.cc (minimize): only allow live decl to partially subsume other live decls; in particular we need to avoid the case where a cycle of subsumptions remove all decls! (minimize): check that alive is not empty before taking min and max 2000-01-19 Steven Eker * sortTable.cc (generateSortDiagram): renamed from compileSortDiagram() * sortTable.hh (class SortTable): added decl for compileSortDiagram() (class SortTable): compileSortDiagram() -> generateSortDiagram() 2000-01-18 Steven Eker * sortTable.hh (class SortTable): added decls for partiallySubsumes() and minimize() * sortTable.cc (partiallySubsumes): added (minimize): added (buildSortDiagram): call minimize 1999-12-01 Steven Eker * sort.hh (errorFreeMaximal): added (class Sort): added decl for errorFreeMaximal(); 1999-11-03 Steven Eker * memoTable.cc (markReachableNodes): (SourceSet version) added; (markReachableNodes): (MemoMap version) don't bother to check for null pointers (memoRewrite): rewritten to take and update sourceSet arg (memoize): deleted (memoEnter): added * memoTable.hh (class MemoTable): added member class SourceSet, updated decl for memoRewrite(), replaced decl for memoize() with that for memoEnter() 1999-10-29 Steven Eker * module.cc (clearMemo): added dynamic_cast hack; maybe it wasn't such a good idea to split stuff off into Standard Symbol after all * memoTable.cc: added disambiguation to template arg dagNodeLt for the benefit of egcs (on BeOS) 1999-10-27 Steven Eker * strategy.cc (setStrategy): don't set memo * strategy.hh (isMemoized): deleted (class Strategy): deleted data member memo and decl for isMemoized() * memoTable.hh (class MemoTable): added decl for isMemoized(); ctor now takes memoFlag arg (class MemoTable): added memo data member (isMemoized): added (MemoTable): take memoFlag arg ===================================Engine53================================================== 1999-10-26 Steven Eker * module.cc (indexSortConstraints): VariableTerm::dynamicCast() -> dynamic_cast() (indexEquations): VariableTerm::dynamicCast() -> dynamic_cast() (indexRules): VariableTerm::dynamicCast() -> dynamic_cast() (insertLateSymbol): VariableTerm::dynamicCast() -> dynamic_cast() (*3) 1999-10-25 Steven Eker * memoTable.cc (memoRewrite): support tracing of memoized rewrites * equationTable.cc (applyReplace): updated call to tracePreEqRewrite() * rewritingContext.hh (builtInReplace): updated call to tracePreEqRewrite() * rewritingContext.cc (tracePreEqRewrite): added type arg * rewritingContext.hh (class RewritingContext): added enum RewriteType (class RewritingContext): added type arg to traceBeginEqTrial() 1999-10-22 Steven Eker * module.hh (class Module): added decl for clearMemo() * module.cc (Module): added call to clearMemo() (clearMemo): added * memoTable.cc (~MemoTable): moved here (clearMemo): moved here * strategy.cc (setStrategy): take memoFlag arg; set memo data member; if we have an empty strategy and memoFlag is true; create an eager strategy (setStrategy): stdStrategy is always false if memoFlag is true * strategy.hh (class Strategy): added memo data member (isMemoized): added * memoTable.hh (clear): renamed to clearMemo() to avoid possible confusion in our subclasses * memoTable.cc (markReachableNodes): added * memoTable.hh (GC): added member class MemoMap 1999-10-21 Steven Eker * localBinding.cc (LocalBinding): greatly simplified (~ocalBinding): deleted (markReachableNodes): simplified (dump): don't dump prev/next (both versions) (dumpList): commented out * localBinding.hh (class LocalBinding): derive from SimpleRootContainer; members deleted (class LocalBinding): members of struct Binding reordered to favor alpha * rewritingContext.hh (~RewritingContext): added (RewritingContext): moved here from rewritingContext.cc and made inline * rewritingContext.cc (RewritingContext): greatly simplified (~RwritingContext): deleted (markReachableNodes): greatly simplified * rewritingContext.hh (class RewritingContext): derive from SimpleRootContainer; members deleted * dagRoot.hh (DagRoot): rewritten (class DagRoot): derive from RootContainer; many members deleted * dagRoot.cc (markReachableNodes): rewritten * core.cc: handle implementation for SimpleRootContainer * core.hh: added forward decls for RootContainer and SimpleRootContainer * simpleRootContainer.hh: created * rootContainer.cc: created * rootContainer.hh: created 1999-10-20 Steven Eker * memoTable.hh: created * memoTable.cc: created 1999-10-19 Steven Eker * core.hh: added forward decl for DagNodeSet * dagNodeSet.hh: created * dagNodeSet.cc: created 1999-10-14 Steven Eker * sortConstraintTable.hh (class SortConstraintTable): added decl for constraintToExactSort() (constrainToSmallerSort): commented out as temporary measure (constrainToExactSort): added ===================================Engine52================================================= 1999-08-05 Steven Eker * oneStep.cc (findNextRewrite): call context.finished() just before returning 0 1999-08-04 Steven Eker * oneStep.cc (findNextRewrite): commented out call to context.finished() since it loses pointers to fragile bindings that we will need for future calls to findNextRewrite() 1999-08-03 Steven Eker * oneStep.cc (findNextRewrite): commented out unsafe DagNode::okToCollectGarbage() 1999-08-02 Steven Eker * sortConstraintTable.hh (class SortConstraintTable): sortConstraintLeqs -> ortConstraintLt * sortConstraintTable.cc (sortConstraintLeq): -> sortConstraintLt() (orderSortConstraints): sortConstraintLeqs -> ortConstraintLt 1999-07-30 Steven Eker * sortConstraintTable.hh (class SortConstraintTable): decl for compareSortConstraints replaced by decl for sortConstraintLeq() * sortConstraintTable.cc (orderSortConstraints): use STL sort function (compareSortConstraints): becomes sortConstraintLeq() ===================================Engine50================================================== 1999-06-25 Steven Eker * sortTable.hh (rangeComponent): commented const out of return type 1999-06-01 Steven Eker * substitution.hh (clear): replaced SPEED_HACK with VECTOR_HACK 1999-05-12 Steven Eker * sortTable.hh (class SortTable): deleted decl for computeTrueSort() virtual function * module.cc (closeTheory): don't call finalizeSymbol() (insertLateSymbol): don't call finalizeSymbol() 1999-05-05 Steven Eker * sortTable.hh (class SortTable): removed computeBaseSort(); we want to dispatch this off Symbol rather than EquationTable to save base pointer adjustments on call and function entry * equationTable.hh (class EquationTable): removed eqRewrite(); we want to dispatch this off Symbol rather than EquationTable to save base pointer adjustments on call and function entry * sortTable.cc (buildSortDiagram): compute singleNonErrorSort correctly in constant case * module.cc (insertLateSymbol): call orderSortConstraints() and finalizeSortInfo() after indexing sort constraints 1999-05-04 Steven Eker * sortTable.hh (class SortTable): added decl for getSingleNonErrorSort() and data membersingleNonErrorSort * sortTable.cc (buildSortDiagram): compute singleNonErrorSort (SortTable): initialize singleNonErrorSort to 0 1999-04-30 Steven Eker * oneStep.cc (findNextRewrite): don't do final reduce because we destroy the substitution in the context that we need to find the next rewrite 1999-04-29 Steven Eker * oneStep.cc (findNextRewrite): fixed nasty bug where we were not setting matchingSubproblem & extensionInfo to 0 after deleting them and then deleting them a 2nd time in dtor * oneStep.hh: created * oneStep.cc: created 1999-04-23 Steven Eker * sortTable.cc (canProduceErrorSort): handle constant case * connectedComponent.cc (ConnectedComponent): set errorFreeFlag = true * module.cc (closeSignature): adde code to decide which components are error free * sortTable.cc (canProduceErrorSort): added * sortTable.hh (class SortTable): added decl for (specialSortHandling): made const * connectedComponent.hh (class ConnectedComponent): added data member errorFreeFlag; made nrMaxSorts a short (errorSortSeen): added (errorFree): addedcanProduceErrorSort() 1999-04-22 Steven Eker * sortTable.hh (domainComponent): moved here and made inline (rangeComponent): moved here and made inline (specialSortHandling): added so that Symbol::mightMatchSymbol() can know if can depend on looking at op decls (lookupSort): commented out; we might not really need it; now deleted 1999-04-21 Steven Eker * sortTable.cc (rangeComponent): don't use componentVector since it not guarenteed to be set up (domainComponent): don't use componentVector 1999-04-20 Steven Eker * sortTable.hh (class SortTable): rangeComponent() and domainComponent() made non-virtual * complexSort.cc (ComplexSort): use instance free version of rangeComponent() * sortTable.cc (rangeComponent): (instace version) deleted * sortTable.hh (class SortTable): deleted decl for instance version of rangeComponent(); ===================================Engine48================================================== ===================================Maude 1.0.2 released======================================= ===================================Maude 1.0.1 released======================================= 1999-03-03 Steven Eker * equation.hh (fastNrVariables): added (class Equation): added decl for fastNrVariables() (class Equation): rearranged data members to optimize processor data cache usage! * equationTable.cc (applyReplace): added fast case * equation.hh (class Equation): added fast data member * equation.cc (compile): set fast data member 1999-02-19 Steven Eker * equationTable.cc (applyReplace): added SPEED_HACK for equations (applyReplace): unmade change because it loses! 1999-02-18 Steven Eker * substitution.hh (clear): clear 1 value even in the size = 0 case; this allows us to use a do-while() loop * substitution.cc: initialize allocateSize to 1 rather than 0 * rewritingContext.hh (copyProblemBindings): use isNull() * ruleTable.hh (ruleFree): use isNull() * sortConstraintTable.hh (sortConstraintFree): use isNull() * equationTable.hh (equationFree): use isNull() ===================================VectorExperiment========================================== 1999-02-03 Steven Eker * rule.cc (preprocess): use fillInSortInfo() rather than parse(); don't bother with Assert() * preEquation.cc (preprocess): use fillInSortInfo() rather than parse(); don't bother with Assert() (3 places) * equation.cc (preprocess): use fillInSortInfo() rather than parse(); don't bother with Assert() * sortTable.hh (class SortTable): deleted decl for parse(); added decl for fillInSortInfo() 1999-02-02 Steven Eker * sortTable.cc (buildSortDiagram): build "all" NatSet in reverse order for efficiency (buildSortDiagram): make "viable" NatSet static and use makeEmpty() to clear it (buildSortDiagram): make "nextState" NatSet static and use assignment to initialize it (findMinSortIndex): reorganized - do state test first (findMinSortIndex): make NatSet infSoFar and initialize it with assignment (findMinSortIndex): reorganized innermost test (findMinSortIndex): extreme simplification of innermost test ===================================Engine47================================================== ===================================Maude 1.00 released======================================= 1999-01-21 Steven Eker * module.cc (~Module): implemeted delayed deletion policy for symbols * module.hh (class Module): added static data members virgin, seen1GC, seen2OrMoreGCs; added decl for notifyOfGC() * module.cc (notifyOfGC): added 1999-01-20 Steven Eker * connectedComponent.cc (ConnectedComponent): replaced ErrorCheck()s by IssueWarning()s and markAsBad()s 1999-01-15 Steven Eker * sortTable.cc (lookupSortIndex): made IntSet currentStates, Vector maxSorts and IntSet nextStates static ===================================Engine46================================================== 1999-01-05 Steven Eker * equation.cc (preprocess): fixed similar bug * rule.cc (preprocess): fixed similar bug * preEquation.cc (preprocess): fixed nasty bug where we were calling Symbol::parse() inside Assert() (used to be inside ErrorCheck()) and thus were failing to fill in sorts when compiled with NO_ASSERT 1998-12-23 Steven Eker * sortConstraint.cc (preprocess): don't do Asserts for bad equations * rule.cc (preprocess): don't do any more processing if PreEquation::process) sets bad flag (preprocess): changed ErrorCheck() to Assert() for rhs failed to parse (preprocess): changed ErrorCheck() to Assert() for component clash * equation.cc (preprocess): if bad after PreEquation preprocessing, return (preprocess): ErrorCheck() changed to IssueWarning() for variable in rhs not in lhs * preEquation.cc (preprocess): ErrorCheck() changed to IssueWarning() for variable in condition lhs not in lhs (preprocess): ErrorCheck() changed to Assert() for lhs of condition failed to parse (preprocess): ErrorCheck() changed to IssueWarning() for variable in condition rhs not in lhs (preprocess): ErrorCheck() changed to Assert() for rhs of condition failed to parse (preprocess): ErrorCheck() changed to Assert() for condition component clash (preprocess): ErrorCheck() changed to Assert() for lhs failed to parse * module.cc (indexEquations): don't index bad equations (indexRules): don't index bad rules (indexSortConstraints): don't index bad sort constraints (insertLateSymbol): don't offer bad rules (insertLateSymbol): don't offer bad equations (insertLateSymbol): don't offer bad sort constraints * core.cc: provide implementation for class BadFlag * module.hh (class Module): derive from class BadFlag * preEquation.hh (class PreEquation): derive from class BadFlag * badFlag.hh (class BadFlag): created 1998-12-21 Steven Eker * equation.cc (preprocess): turned Assert() for "variable in rhs not in lhs" into an ErrorCheck(); added line number and equation to the message ===================================Engine45================================================== Tue Dec 15 16:33:54 1998 Steven Eker * sortConstraint.cc (preprocess): Changed ErrorCheck() to Assert() for lhs/sort component check since mixfix fornt end should not allow the user to make this mistake * sortTable.cc (compileOpDeclarations): ifdef'd check on components for subsort overloaded operator declarations; use Assert() rather than ErrorCheck() Mon Nov 30 11:53:37 1998 Steven Eker * ruleTable.cc (applyRules): more decl of sp inside loop (applyRules): call traceAbort(); tidy up and return 0 if aborting * preEquation.cc (checkCondition): call traceAbort(); we return true rather than false when aborting in the hope that this will allow the caller to abort more quickly (rather than trying to match the next eq/rl/sc Wed Nov 25 10:44:47 1998 Steven Eker * rewritingContext.hh (builtInReplace): call traceAbort(); now we return a bool; false if we're aborting * equationTable.cc (applyReplace): first attempt at handling traceAbort() (applyReplace): now call tracePreEqRewrite() before traceAbort() (applyReplace): moved decl fo var sp inside loop - may help code optimizer (applyReplace): small reorg of control structures (applyReplace): do copyProblemBindings() after testing trace * rewritingContext.cc (traceAbort): added * rewritingContext.hh (class RewritingContext): added decl for virtual member fn traceAbort() Mon Nov 16 09:24:55 1998 Steven Eker * rewritingContext.hh (builtInReplace): added * rewritingContext.cc (makeSubcontext): changed arg decl * rewritingContext.hh (class RewritingContext): pass makeSubcontext() perpose arg as int rather than Purpose so that derived classes can expand the set of purposes. * ruleTable.cc (applyRules): use getTraceStatus() rather than traceStatus() * rule.cc (apply): use getTraceStatus() rather than traceStatus() * preEquation.cc (checkCondition): use getTraceStatus() rather than traceStatus() (3 places) * equationTable.cc (applyReplace): use getTraceStatus() rather than traceStatus() * rewritingContext.cc (RewritingContext): no longer set trace status (makeSubcontext): don't pass trace status to RewritingContext() * rewritingContext.hh (class RewritingContext): trace flag is now a static data member (class RewritingContext): ctor no longer takes traceStatus flag (class RewritingContext): added decls for getTraceStatus() and setTraceStatus() (traceStatus): deleted (getTraceStatus): added (setTraceStatus): added Tue Nov 3 19:14:14 1998 Steven Eker * preEquation.hh (class PreEquation): derive from LineNumber * module.hh (class Module): derive from LineNumber * sort.hh (class Sort): derive from LineNumber ===================================Engine43================================================== Mon Oct 26 09:36:48 1998 Steven Eker * core.cc: provide implementation for SymbolMap Fri Oct 23 17:48:18 1998 Steven Eker * sort.hh (class Sort): added back decl for getSupersorts() - we need this for hierarchical module importation. (getSupersorts): added back; actually we may not need this function after all but we'll leave it in for now Thu Oct 15 13:46:43 1998 Steven Eker * core.cc: no longer provide implementation of class CachedDag * cachedDag.cc: created * cachedDag.hh (class CachedDag): added decls for normalize() and prepare() (normalize): added Wed Oct 14 11:25:37 1998 Steven Eker * cachedDag.hh (getTerm): added (class CachedDag): added decl for getTerm() (setTerm): cannot delete term here because we may be replacing term with part of itself (in normalization case) * core.cc: provide implementation of class CachedDag * core.hh: added fwd decl for class CachedDag * cachedDag.hh: created ===================================Engine42================================================== Thu Oct 8 10:27:05 1998 Steven Eker * lineNumber.hh (class LineNumber): fixed setLineNumber() decl * connectedComponent.cc (ConnectedComponent): don't set errorFreeFlag * connectedComponent.hh (class ConnectedComponent): deleted decl for errorFree() (class ConnectedComponent): deleted data member errorFreeFlag (errorFree): deleted (flagErrorPossible): deleted (class ConnectedComponent): deleted decl for flagErrorPossible() * lineNumber.hh (getLineNumber): added (setLineNumber): added * sort.cc (computeLeqSorts): changed definition of sortTest along the lines of Pats idea: fastTest for sort s is the smallest integer such that all sorts with index >= fastTest are <= s Fri Oct 2 10:46:21 1998 Steven Eker * sort.cc (computeLeqSorts): simplified Thu Oct 1 16:29:27 1998 Steven Eker * sort.cc (computeLeqSorts): compute the value of fastTest (dump): dump fastTest * sort.hh (class Sort): added data member fastTest (leq): (int,Sort*) version, use fastTest ===================================Engine41================================================== Fri Sep 25 17:06:02 1998 Steven Eker * core.hh: added forward decl for LineNumber * lineNumber.hh: created Fri Sep 18 17:35:19 1998 Steven Eker * connectedComponent.cc (findMaximalSorts): added 2nd version; eventually 1st version should be defined in terms of this * connectedComponent.hh (class ConnectedComponent): added decl for 2nd findMaximalSorts() * sort.hh (class Sort): deleted all remaining <=() decls * connectedComponent.cc (getLeqSorts): added * connectedComponent.hh (class ConnectedComponent): added decl for getLeqSorts() Thu Sep 17 10:26:45 1998 Steven Eker * Makefile: removed sortCode.o from MODULES * complexSort.hh: removed data member sortCode * complexSort.cc (operator<<): rewritten without sort codes (ComplexSort): removed sort codes from all ctors * sortTable.cc (buildSortDiagram): use leq(Sort*, Sort*) (findMinSortIndex): rewritten using leqSorts * connectedComponent.hh (class ConnectedComponent): added decl for new findIndex() * connectedComponent.cc (findIndex): reimplemented using leqSorts * sortTable.hh: delete decl for both versions of lookupUnionSort() * sortTable.cc (lookupSortIndex): added (lookupUnionSort): deleted both versions * complexSort.hh (class ComplexSort): temp hacks to deal with not having sort codes * sortTable.hh (class SortTable): added decl for lookupSortIndex() * sort.hh (leq): (Sort*,Sort*) version added (leq): (int, Sort*) version added (leq): (Sort*, int) version added (operator<=): deleted both versions (class Sort): added friend decls for all 3 leq() functions; deleted friend decls for all 3 <=() functions * connectedComponent.hh (class ConnectedComponent): added decl for leq(); delete decl for unionSortLeq() * connectedComponent.cc (leq): added (unionSortLeq): deleted * sortConstraintTable.cc (constrainToSmallerSort2): use sort indices and leq functions rather than sort codes and <=; use DagNode::setSortIndex() rather than DagNode::setSortInfo() * core.cc: deleted template instantiation for class Vector and class Vector * core.hh: deleted forward decl of class SortCode * sortCode.cc: deleted * sortCode.hh: deleted * sort.hh (getLeqSorts): added (class Sort): added decl for getLeqSorts() * connectedComponent.hh (class ConnectedComponent): update decl for findMaximalSorts(), deleted decl for findIndex(), added decl for unionSortLeq() * connectedComponent.cc (ConnectedComponent): call processSubsorts() rather than insertLesserSorts(); call computeLeqSorts() rather than computeSortCode() (findMaximalSorts): first arg now an int; stub only (findIndex): deleted (unionSortLeq): added * connectedComponent.hh (class ConnectedComponent): added data member unionSorts Wed Sep 16 17:17:24 1998 Steven Eker * sort.cc (insertLesserSorts): becomes processSubsorts(); don't need argument because we know which is out connected component (computeSortCode): becomes computeLeqSorts(); work on leqSorts rather than sortCode (dump): don't dump sortCode (maybe we should dump other stuff?) * sort.hh (class Sort): deleted decls for getSupersorts(), code() (class Sort): decl for insertLesserSorts() becomes processSubsorts(), losing argument; computeSortCode() becomes computeLeqSorts() (class Sort): deleted data member sortCode, added data member leqSorts (class Sort): move sortIndex and nrUnresolvedSupersorts into an anonymous union (getSupersorts): deleted (code): deleted (operator<=): (Sort& version) reimplemented using leqSorts rather than sortCode (operator<=): (int version) reimplemented using leqSorts rather than sortCode; we don't allow -ve sort indices (which would technically refer to unknown sort or union sorts) Fri Sep 11 14:37:37 1998 Steven Eker * sortCheckSubproblem.cc (SortCheckSubproblem): SortCode -> Sort (solve): SortCode -> Sort * sortCheckSubproblem.hh (class SortCheckSubproblem): SortCode -> Sort throughout * sort.hh (operator<=): (int, Sort&) added (operator>=): deleted (class Sort): deleted dec for >=(int), added decl for <=(int, Sort&) (class Sort): added decl for <=(Term*, Sort&) * sortTable.cc (compileOpDeclarations): deleted code for setting up dimensionVector * sortTable.hh (class SortTable): deleted dimensionVector Thu Sep 10 10:00:04 1998 Steven Eker * sort.hh (operator>=): added (class Sort): added decl for operator>=() * sortTable.hh (lookupSort): fixed bug were we were return a sort from the wrong component * sortTable.cc (lookupUnionSort): temporary hack to use lookupSort() rather than sortTable; This will change once bit vectors are replaced * sortTable.hh (class SortTable): updated decl for dumpSortDiagram(); deleted decl for adjustSort(), dumpSortTable(), dumpSortAndTab(), findMinResultSort(), incrementSortVector(), buildSortTable() (class SortTable): deleted data member sortTable; * sortTable.cc (findMinResultSort): deleted (incrementSortVector): deleted (buildSortTable): deleted (compileOpDeclarations): don't call buildSortTable() (adjustSort): deleted (dumpSortDiagram): take stream and indent level args (dumpSortAndTab): deleted (dumpSortTable): deleted * rewritingContext.hh (count): use Int64 (incrementCount): use Int64 (class RewritingContext): rewriteCount becomes an Int64; updated decls for * sortTable.hh (class SortTable): added decl for dumpSortDiagram() * sortTable.cc (dumpSortDiagram): added (compileOpDeclarations): call buildSortDiagram() and dumpSortDiagram() * sortTable.hh (lookupSort): reimplemented interms of traverse() - this is a temporary measure; evetually callers will use traverse() to avoid copying sort indices into a vector first. * sortTable.cc (buildSortDiagram): handle nrArgs == 0 case Wed Sep 9 18:05:11 1998 Steven Eker * sortTable.hh (class SortTable): added data member sortDiagram (class SortTable): added decls for buildSortDiagram(), findStateNumber() and findMinSortIndex() (traverse): added (class SortTable): added decl for traverse() * sortTable.cc (buildSortDiagram): added (findStateNumber): added (findMinSortIndex): added ===================================Engine40================================================== Fri Jul 17 19:05:20 1998 Steven Eker * symbolMap.hh (class SymbolMap): created ===================================Engine39================================================== Thu Jul 2 15:20:38 1998 Steven Eker * complexSort.cc (ComplexSort): added ctor for Term* case * complexSort.hh (class ComplexSort): added ctor decl for Term* case Tue Jun 30 10:53:38 1998 Steven Eker * sort.hh (getSupersorts): added (class Sort): added decl for getSupersorts() (operator<=): added on const Sort& Tue Jun 16 15:59:24 1998 Steven Eker * module.cc (insertLateSymbol): call setModuleInfo() on late symbol Thu Jun 11 17:36:18 1998 Steven Eker * termSet.cc (insert): cast PointerSet::insert() return value to void Wed Jun 10 11:29:35 1998 Steven Eker * equation.cc (preprocess): pass dummy 2nd arg in call to normalize() * rule.cc (preprocess): pass dummy 2nd arg in call to normalize() * preEquation.cc (preprocess): pass dummy 2nd arg in calls to normalize() * module.cc (closeTheory): call interSymbolPass() and postInterSymbolPass(); chiefly to inter-normalize identities * sortConstraint.cc (preprocess): Validate() -> ErrorCheck(); deleted superfluous includes Tue Jun 9 11:07:58 1998 Steven Eker * complexSort.hh: added #include "sortCode.hh" * sortConstraint.cc: deleted #include "intSet.hh" * substitution.cc: deleted #include "intSet.hh" * strategy.cc (setStrategy): IntSet -> NatSet * sortTable.cc: deleted #include "intSet.hh" * ruleTable.cc: deleted #include "intSet.hh" * rule.cc: deleted #include "intSet.hh", #include "preEquation.hh", #include "label.hh", #include "substitution.hh" (apply): IntSet -> NatSet * preEquation.cc: deleted #include "intSet.hh", #include "variableInfo.hh" (compile): IntSet -> NatSet * module.cc: deleted #include "intSet.hh" * localBinding.cc: deleted #include "intSet.hh" * equationTable.cc: deleted #include "intSet.hh" * equation.cc: deleted #include "intSet.hh" * core.cc: deleted #include "intSet.hh" * variableInfo.hh: IntSet -> NatSet * strategy.hh: IntSet -> NatSet * preEquation.hh: IntSet -> NatSet ===================================Engine38================================================== Fri Apr 17 16:45:12 1998 Steven Eker * equation.cc (preprocess): Validate()s changed to Assert()s Mon Apr 13 10:37:10 1998 Steven Eker * module.cc (closeSortSet): call setModuleInfo() on newly created connected component * module.hh (insertSort): call setModuleInfo() (insertSymbol): call setModuleInfo() * connectedComponent.hh (class ConnectedComponent): inherit from ModuleItem Fri Apr 10 18:15:19 1998 Steven Eker * core.cc: provide implementation for ModuleItem * moduleItem.hh (class ModuleItem): created * sort.hh (class Sort): inherit from ModuleItem ===================================Engine37================================================== Thu Apr 9 18:36:00 1998 Steven Eker * module.hh (getConnectedComponents): added; together with decl Thu Feb 26 12:01:48 1998 Steven Eker * sort.hh (class Sort): added decl for DagNode* <= Sort& operator; this is a slightly ugly but very convenient operator for hiding sort codes since the most common sort operation is to compare a dag nodes sort to that of a variable. Wed Feb 25 11:30:24 1998 Steven Eker * connectedComponent.hh (class ConnectedComponent): added decls for errorFree() and flagErrorPossible() (errorFree): added (flagErrorPossible): added * connectedComponent.cc (ConnectedComponent): initialize errorFreeFlag (ConnectedComponent): Assert()s testing for cycle change to ErrorCheck()s * connectedComponent.hh (class ConnectedComponent): added data member errorFreeFlag Tue Feb 24 15:46:24 1998 Steven Eker * localBinding.cc (dump): added new version Fri Feb 20 15:46:42 1998 Steven Eker * rewritingContext.cc (ruleRewrite): use DagNode::isUrewritable() and DagNode::setUrewritable() to avoid retrying failed matches (ruleRewrite): if calling stackArguments() on a node does not increase stack size then flag node as unstackable ===================================Engine36================================================== Fri Feb 13 11:33:22 1998 Steven Eker * module.cc (~Module): no longer delete sorts here (~Module): Major rewrite to avoid subtle but deadly bug: we must make sure there are no dag nodes belonging to this module lying around waiting to be garbage collected after this module is gone since the mark phase will access our symbols. (Module): commented out symbol deletion as we still have problems; and since we hit the problems in mark() there must still be dag nodes from the deleted module reachable! * connectedComponent.cc (~ConnectedComponent): added * connectedComponent.hh (class ConnectedComponent): added decl for ~ConnectedComponent(); we need to delete sorts here rather than in Module in order to be able to delete the error sort * preEquation.cc (PreEquation): dont' self destruct non-existant condition terms * rule.cc (~Rule): delete rhs automaton (Rule): clear rhs automaton to allow safe destruction at any stage. * sortConstraint.hh (class SortConstraint): deleted decl for ~SortConstraint() * sortConstraint.cc (~SortConstraint): deleted * equation.cc (~Equation): delete rhs automaton (Equation): clear rhs automaton to allow safe destruction at any stage. * preEquation.cc (~PreEquation): delete automata (PreEquation): clear automata pointers to allow safe destruction at any stage. * connectedComponent.hh (class ConnectedComponent): deleted decl for ~ConnectedComponent() as default is perfectly adequate * connectedComponent.cc (~ConnectedComponent): deleted * sort.hh (class Sort): deleted decl for ~Sort() as default is perfectly adequate * sort.cc (~Sort): deleted * module.cc (Module): implemented Wed Feb 11 15:42:45 1998 Steven Eker * preEquation.cc (checkCondition): compare() == 0 replaced by equal() * localBinding.cc (assert): compare() != 0 replaced by !equal() * equalitySubproblem.cc: compare() == 0 replaced by equal() (2 places) * extensionMatchSubproblem.cc (solve): use delete rather than deepSelfDestruct on sunproblem * variableAbstractionSubproblem.cc (solve): use delete rather than deepSelfDestruct on sunproblem * sortConstraintTable.cc (constrainToSmallerSort2): use delete rather than deepSelfDestruct() for subproblems (2 places) * rule.cc (apply): use delete rather than deepSelfDestruct() for subproblems (3 places) * ruleTable.cc (applyRules): use delete rather than deepSelfDestruct() for subproblems (2 places) * equationTable.cc (applyReplace): use delete rather than deepSelfDestruct() for subproblems (2 places) * extensionMatchSubproblem.cc (~ExtensionMatchSubproblem): adapted from old deepSelfDestruct(); use delete rather than calling deepSelfDestruct() * extensionMatchSubproblem.hh (class ExtensionMatchSubproblem): deleted decl for deepSelfDestruct(); added decl for dtor * equalitySubproblem.hh (class EqualitySubproblem): deleted decl for deepSelfDestruct() * equalitySubproblem.cc (deepSelfDestruct): deleted * variableAbstractionSubproblem.hh (class VariableAbstractionSubproblem): deleted decl for deepSelfDestruct(); added decl for dtor * variableAbstractionSubproblem.cc (deepSelfDestruct): becomes dtor; use delete rather than calling deepSelfDestruct() * sortCheckSubproblem.cc (deepSelfDestruct): deleted * sortCheckSubproblem.hh (class SortCheckSubproblem): deleted decl for deepSelfDestruct() * disjunctiveSubproblemAccumulator.cc (extract): amended comment about deepSelfDestruct() (~DisjunctiveSubproblemAccumulator): use delete rather than calling deepSelfDestruct() on firstSubproblem and disjunction (extract): in the single option case we no longer delete firstDifference and set firstDifference since this can be left to our destructor; ditto with first ExtensionInfo * subproblemDisjunction.cc (~SubproblemDisjunction): created from old deepSelfDestruct(); use delete rather than calling deepSelfDestruct() * subproblemDisjunction.hh (class SubproblemDisjunction): deleted declaration for deepSelfDestruct() (class SubproblemDisjunction): added decl for dtor * subproblemAccumulator.hh (SubproblemAccumulator): use delete rather than calling deepSelfDestruct() * subproblemSequence.cc (deepSelfDestruct): becomes destructor; use delete rather than calling deepSelfDestruct() * subproblemSequence.hh (class SubproblemSequence): declaration for deepSelfDestruct() deleted (SubproblemSequence): removed dummy destructor ===================================Engine35================================================== Wed Dec 17 18:06:40 1997 Steven Eker * module.hh (getSymbols): made const (getSorts): made const (getSortConstraints): added (getRules): added (getEquations): added (class Module): updated decls Mon Dec 15 16:26:42 1997 Steven Eker * sortTable.cc (findMinResultSort): added temporary hack so that operator names print correctly in WarningCheck() (compileOpDeclarations): added temporary hack so that operator names print correctly in ErrorCheck() Thu Dec 11 10:48:32 1997 Steven Eker * sortTable.hh (lookupSort): change assertion to indices.length() >= arity because a shared sortIndiciesBuffer may be bigger than needed. This ugliness will be removed when we redo sort mechanism Mon Dec 1 14:57:50 1997 Steven Eker * strategy.cc (setStrategy): fixed bug; test should be a > nrArgs rather than a >= nrArgs since strat arg numbers start from 1 Wed Nov 26 17:27:59 1997 Steven Eker * strategy.cc (setStrategy): set unevalArgs flag to correct value * strategy.hh (unevaluatedArguments): added * strategy.cc: created * strategy.hh (class Strategy): created Sun Nov 23 16:13:05 1997 Steven Eker * equationTable.cc (dumpEquationTable): use new LhsAutomaton dump() convention ===================================Engine33================================================== Fri Nov 21 18:38:49 1997 Steven Eker * preEquation.cc (compile): if we don't compile lhs set peLhsAutomaton = 0 to avoid breaking dump() ===================================Engine32================================================== Fri Nov 7 17:15:01 1997 Steven Eker * disjunctiveSubproblemAccumulator.cc (extract): don't try to assert firstDifference if it is null Thu Nov 6 11:37:49 1997 Steven Eker * extensionMatchSubproblem.cc: created * extensionMatchSubproblem.hh (class ExtensionMatchSubproblem): created Wed Nov 5 14:04:53 1997 Steven Eker * module.hh (class Module): made dtor virtual * module.cc (reset): added * module.hh (class Module): added decl for virtual function reset() * sortConstraintTable.cc (orderSortConstraints): handle the empty table efficiently; set tableComplete = true; use acceptSortConstraint() in place of retainSortConstraint() (SortConstraintTable): added * sortConstraintTable.hh (class SortConstraintTable): added safeToInspectSortConstraints() and tableComplete decls; deleted retainSortConstraint() decl (class SortConstraintTable): added decl for explicit ctor (safeToInspectSortConstraints): added Mon Nov 3 10:22:28 1997 Steven Eker * disjunctiveSubproblemAccumulator.cc (extract): fixed bug; in the case where we were returning disjunction we were failing to set disjunction = 0 to stop it from being deepSelfDestruct()'d by our dtor Fri Oct 31 10:56:00 1997 Steven Eker * disjunctiveSubproblemAccumulator.cc (addOption): had local/global the wrong way around * disjunctiveSubproblemAccumulator.hh (empty): added * subproblemDisjunction.cc (solve): only copy extesion when findFirst == true (addOption): take LocalBinding rather than Substitution * subproblemDisjunction.hh (class SubproblemDisjunction): changed addOption() to take LocalBinding rather than Substitution * variableInfo.hh (class VariableInfo): make addConditionVariables() public to that we can implement external match function; this may be only temporary =================================Engine31================================================== Wed Oct 29 18:43:30 1997 Steven Eker * disjunctiveSubproblemAccumulator.cc: created * disjunctiveSubproblemAccumulator.hh (class DisjunctiveSubproblemAccumulator): created Tue Oct 28 09:42:05 1997 Steven Eker * rule.cc (apply): no extension infomation and subject in error sort case before trying anything else. * subproblemDisjunction.cc (addOption): unmade previous change; deciding whether extension info should be saved in this branch is once again the responsiblity of the caller; nor do we clear extension info once we have copied it. * equationTable.cc (applyReplace): previous change deleted; The idea is that only code that cares about the state of the extension valid flag after a successful match need clear it before calling match(). match() has the duty of clearing the flag if (1) it returns true; (2) it sets the flag (implicity by calling setWholeFlag() while set up extension info, or by calling another match that sets extension info); and (3) the extension info is no longer valid (a rare case that can be caused by having different extension info in different branches of a disjunction). * ruleTable.cc (applyRules): previous change deleted * rule.cc (apply): clear extensionInfo before each match() call (apply): previous change deleted * ruleTable.cc (applyRules): clear extensionInfo before each match() call * equationTable.cc (applyReplace): clear extensionInfo before each match() call * subproblemDisjunction.cc (addOption): check to see if extensionInfo is really valid before saving it; if we save it, call clear() on original. Mon Oct 27 11:20:14 1997 Steven Eker * subproblemDisjunction.cc (deepSelfDestruct): delete Option::extensionInfo (addOption): now store extension info along with each option if neccessary (solve): now assert extension info for selected option if present * subproblemDisjunction.hh (class SubproblemDisjunction): added extensionInfo arg to addOption; added extensionInfo member to struct Option; added data member realExtensionInfo Fri Oct 24 16:47:42 1997 Steven Eker * dagRoot.cc: created * dagRoot.hh (class DagRoot): added; this works differently from the old DagRoot in that only DagRoots with non-null pointers are kept on the linked list. * equalitySubproblem.hh (class EqualitySubproblem): created from exclusionSubproblem.hh for greater generality. Thu Oct 23 10:16:47 1997 Steven Eker * module.cc (indexRules): AdvisoryCheck() for collapse at top (indexEquations): AdvisoryCheck() for collapse at top (indexSortConstraints): AdvisoryCheck() for collapse at top Tue Oct 21 11:28:08 1997 Steven Eker * exclusionSubproblem.hh (class ExclusionSubproblem): created * exclusionSubproblem.cc: created * variableAbstractionSubproblem.cc (solve): removed temporary hack to fix problem of identity elements with uninitialized sort info now that term2Dag(true) puts this sort info into the identity dag * termSet.hh (makeEmpty): added (class TermSet): use access declarations to make PointerSet::cardinality() and PointerSet::makeEmpty() public (cardinality): deleted (makeEmpty): deleted Wed Oct 15 13:53:18 1997 Steven Eker * module.cc (indexSortConstraints): use VariableTerm::dynamicCast() instead of VariableSymbol::dynamicCast() (insertLateSymbol): use VariableTerm::dynamicCast() instead of VariableSymbol::dynamicCast() in 3 places (indexEquations): use VariableTerm::dynamicCast() instead of VariableSymbol::dynamicCast() (indexRules): use VariableTerm::dynamicCast() instead of VariableSymbol::dynamicCast() Tue Oct 14 17:31:20 1997 Steven Eker * module.cc (indexSortConstraints): use VariableSymbol::dynamicCast() (indexEquations): use VariableSymbol::dynamicCast() (indexRules): use VariableSymbol::dynamicCast() (insertLateSymbol): use VariableSymbol::dynamicCast() in 3 places Mon Oct 13 16:01:03 1997 Steven Eker * preEquation.cc (preprocess): use Term::analyseCollapses() (compile): use Term::insertAbstractionVariables() Fri Oct 10 16:34:15 1997 Steven Eker * rule.cc (compile): symbolCount() -> nrVariables() (apply): symbolCount() -> nrVariables() (*2) * equation.cc (compile): symbolCount() -> nrVariables() * preEquation.cc (checkCondition): symbolCount() -> nrVariables() * localBinding.cc (dumpList): VariableIndex -> VariableInfo (dump): VariableIndex -> VariableInfo (dump): index2Symbol() -> index2Variable() * localBinding.hh (class LocalBinding): VariableIndex -> VariableInfo * preEquation.hh (class PreEquation): no longer derived from VariableIndex * sortConstraintTable.cc (constrainToSmallerSort2): symbolCount() -> nrVariables() * core.cc: no longer provide implementation for "variableInfo.hh" * core.hh: deleted forward ref to class VariableIndex * variableIndex.cc: deleted * variableIndex.hh (class VariableIndex): deleted * variableInfo.hh (index2Variable): added * variableInfo.cc (variable2Index): added (makeAbstractionVariable): added * variableInfo.hh (class VariableInfo): heavily modified to take over role of variableIndex; linear variable stuff deleted =================================Engine30================================================== Wed Oct 8 15:53:38 1997 Steven Eker * termSet.cc (hash): return 0 to stop g++ from complaining Tue Oct 7 12:02:41 1997 Steven Eker * termSet.cc (hash): because of new PointerSet implementation and changes below this function should never be called; so put an Assert here to make sure (insert): made non-inline because we need Term::getHashValue() (term2Index): made non-inline because we need Term::getHashValue() * termSet.hh (insert): use 2 arg insert() (term2Index): use 2 arg pointer2Index() Fri Oct 3 18:24:44 1997 Steven Eker * rule.cc (compile): DataSet -> TermSet * preEquation.cc (compile): DataSet -> TermSet * equation.cc (compile): DataSet -> TermSet * termSet.cc: created * termSet.hh: created =================================Engine29================================================== Thu Oct 2 18:15:54 1997 Steven Eker * equation.cc (compile): pass DataSet to compileRhs() * rule.cc (compile): pass DataSet to compileRhs() * preEquation.cc (compile): pass DataSet to compileRhs() Thu Sep 25 15:13:51 1997 Steven Eker * core.hh: added forward decls for classes SortTable, SortConstraintTable, EquationTable, RuleTable * module.cc (closeTheory): added call to finalizeSymbol() (insertLateSymbol): added call to finalizeSymbol() * sortTable.hh (class SortTable): added decl for domainComponent() * sortTable.cc (rangeComponent): added (domainComponent): added * sortTable.hh (class SortTable): added decl for no arg rangeComponent() Wed Sep 24 10:44:25 1997 Steven Eker * equationTable.cc (dumpEquationTable): added * ruleTable.cc (RuleTable): added * ruleTable.hh (class RuleTable): added ctor decl * sortTable.hh (getOpDeclarations): created Tue Sep 23 11:00:03 1997 Steven Eker * sortConstraintTable.hh (class SortConstraintTable): added decl for retainSortConstraint() * ruleTable.cc: created * ruleTable.hh (ruleFree): added * equationTable.cc (acceptEquation): deleted; now becomes pure virtual added includes * equationTable.hh (offerEquation): simplified Mon Sep 22 15:39:37 1997 Steven Eker * sortConstraintTable.hh: created * ruleTable.hh: created * equationTable.hh: created * equationTable.cc: created =================================Engine28================================================== Wed Sep 3 18:29:46 1997 Steven Eker * variableAbstractionSubproblem.cc (solve): temporary hack to fix uninitialized sorts in identity bug; call computeTrueSort(solution) on value bound to abstraction variable Fri Aug 29 13:03:16 1997 Steven Eker * rule.cc (preprocess): rewritten to allow rule to have rhs variable that don't occur in lhs; set variableSafeFlag to false in this case, true otherwise (apply): if variableSafeFlag false then check that unsafe variables are actually bound * rule.hh (class Rule): added variableSafeFlag (variableSafe): added =================================Engine27================================================== Thu Aug 7 11:22:33 1997 Steven Eker * module.cc (insertLateSymbol): fixed 3 bugs where we were checking the wrong thing against Symbol::VARIABLE * module.hh (class Module): added decl for insertLateSymbol() (getStatus): added * module.cc (addLateSymbol): changed to insertLateSymbol() for consistancy * module.hh (class Module): added enum Status and status variable (insertSort): added status Assert (insertSymbol): added status Assert (insertSortConstraint): added status Assert (insertEquation): added status Assert (insertRule): added status Assert * module.cc (Module): initialize status (closeSortSet): Assert and update status (closeSignature): Assert and update status (closeTheory): Assert and update status (addLateSymbol): added; the idea is that created on the fly builtin symbols (or other symbols that have no eq/sc/rls) can be added after the signature or theory is closed. This avoids creating a large number of special symbols in advance just in case they might be used the the term to be rewritten (for if-then-else-fi, _==_ etc) Wed Jul 23 11:28:23 1997 Steven Eker * rule.cc (preprocess): pass full = false to normalize() call (preprocess): don't call determineCollapseSymbols() * equation.cc (preprocess): pass full = false to normalize() call (preprocess): don't call determineCollapseSymbols() * preEquation.cc (preprocess): pass full flag to normalize() calls; true for lhs and false for cond lhs and rhs (preprocess): don't call determineCollapseSymbols() on cond lhs and rhs =================================Engine26b====================================================== Wed Jul 16 17:10:45 1997 Steven Eker * preEquation.cc (compile): calls to markEagerArguments() replaced by calls to markEager() for reason discussed below. this also allows one side of a condition to be shared with an identical subterm in the other side of the condition correctly. The was a _very_ rarely encountered bug! * equation.cc (compile): call to markEagerArguments() replaced by call to markEager() for reason discussed below * rule.cc (compile): call to markEagerArguments() replaced by call to markEager(); this ensures that the top Term gets an eager context; originally this was a very minor bug but now we are going to use eagerContexts to perspone normalization in rhs construction its important that all the parents of an term with eagerContext flag set have their eagerContext flags set otherwise we could end up trying to normalize something with denormalized args during rhs construction ===============================Engine26================================================= Fri Jun 27 15:47:40 1997 Steven Eker * rewritingContext.hh (copyProblemBindings): use copyReducible rather than copyUptoEager() and clearCopyPointers(); we lose the capability to share copies between problem variables with this change but we increase robustness. (copyProblemBindings): previous change unmade; since we have to have copyEagerUptoReduced() and clearCopyPointers() public after all Wed Jun 25 11:55:16 1997 Steven Eker * preEquation.cc (checkCondition): pass purpose arg to makeSubcontext() * rewritingContext.cc (makeSubcontext): added purpose arg * rewritingContext.hh (class RewritingContext): added enum Purpose; added purpose arg to makeSubcontext() Tue Jun 24 10:57:43 1997 Steven Eker * sortConstraint.cc: added #include "variable.hh" * rule.cc: added #include "variable.hh" deleted #include "variableSymbol.hh" * equation.cc: added #include "variable.hh" deleted #include "variableSymbol.hh" * localBinding.cc: added #include "variable.hh" * module.cc: added #include "variable.hh" * variableIndex.cc: added #include "variable.hh" * core.hh: class VariableSymbol, class Variable, class VariableLhsAutomaton, class VariableRhsAutomaton forward decls Tue Jun 17 17:04:42 1997 Steven Eker * variableSymbol.cc (acceptSortConstraint): added (acceptEquation): added (acceptRule): added * variableSymbol.hh (class VariableSymbol): added decls for acceptSortConstraint(), acceptEquation() and acceptRule() Mon Jun 16 12:04:47 1997 Steven Eker * rule.cc (compile): add lhs variables as condition variables to ensure all solutions are generated * module.cc (closeTheory): added orderSortConstraints() pass Fri Jun 13 16:30:35 1997 Steven Eker * preEquation.hh (class PreEquation): can't have Term* const because nomalize() could change pointers * module.hh (class Module): added decls for insertSortConstraint(), insertRule(), indexSortConstraints(), indexEquations() and indexRules(); delete decls for foreign stuff (insertRule): added (insertSortConstraint): added * module.cc (closeTheory): rewritten; added finalizeSortInfo() pass; deleted foreign stuff (indexSortConstraints): added (indexEquations): converted from insertEquations() (indexRules): added * rule.cc (Rule): clear rlCompiled flag (preprocess): added (compile): rewritten; now only do stuff not in preprocess() * rule.hh (class Rule): added preprocess() decl; added compileLhs to compile() decl; added rlCompiled flag * sortConstraint.cc (SortConstraint): clear scCompiled flag (preprocess): added (compile): rewritten * sortConstraint.hh (class SortConstraint): added preprocess() decl; added compileLhs to compile() decl; added scCompiled flag * equation.cc (Equation): clear eqCompiled (preprocess): added (compile): rewritten; now only do stuff not in preprocess() * equation.hh (class Equation): added preprocess() decl; added compileLhs to compile() decl; added eqCompiled flag * preEquation.cc (preprocess): added; don't bother tracking linear Variables; we will delete all linear variable code at some later date since it is made redundant by contextVariable code (compile): rewritten; only do the things not done by preprocess * preEquation.hh (class PreEquation): make Term* data memebers const * preEquation.hh (class PreEquation): add preprocess() decl; add new flags to compile(); delete setLhsAutomaton(); (setLhsAutomaton): deleted Thu Jun 12 14:53:20 1997 Steven Eker * module.cc (closeTheory): call insertEquations() rather than insertForeignEquations() * module.hh (class Module): added data members sortConstraints, equations, rules (insertEquation): added (class Module): insertForeignEquations() decl becomes insertEquations() Fri Jun 6 11:16:59 1997 Steven Eker * variable.cc (compileLhs): pass sort rather than sortCode to VariableLhsAutomaton() ctor * variableLhsAutomaton.cc (dump): change sortCode to sort (VariableLhsAutomaton): change sortCode to sort * variableLhsAutomaton.hh (class VariableLhsAutomaton): change sortCode to sort * variableLhsAutomaton.cc (match): simplified using DagNode::matchVariable() Thu Jun 5 11:59:59 1997 Steven Eker * sortCheckSubproblem.cc (solve): use new checkSort() rather than computeTrueSortWhilePreservingContext() * variableSymbol.cc (VariableSymbol): don't pass stable arg to Symbol() ==============================Engine24==================================== Mon Jun 2 10:32:47 1997 Steven Eker * variableAbstractionSubproblem.cc (solve): check for case where difference = 0 (solve): get substitution subtract the right way around (solve): fix memory leak by deleting difference on failure * substitution.hh (class Substitution): nrFragileBindings() too useful to be protected - make it public * variableAbstractionSubproblem.cc (deepSelfDestruct): remember to delete ourselves (VariableAbstractionSubproblem): move here from .hh file (deepSelfDestruct): delete difference (solve): rewritten to use local and difference so that we can restore original solution after failure * variableAbstractionSubproblem.hh (class VariableAbstractionSubproblem): added LocalBinding* difference and Substitution local Fri May 30 19:55:27 1997 Steven Eker * preEquation.cc (compile): fix bug where we were taking final count of variable before possibly added abstraction variables Wed May 28 11:00:55 1997 Steven Eker * subproblemDisjunction.cc (deepSelfDestruct): don't try to deepSelfDestruct() null subproblems. * subproblemDisjuction.cc: created Tue May 27 11:52:59 1997 Steven Eker * subproblemDisjuction.hh (class SubproblemDisjuction): created Tue May 20 16:02:14 1997 Steven Eker * variableIndex.cc (makeAbstractionVariable): added (symbol2Index): added Assert to check for null variable symbol * variableIndex.hh (class VariableIndex): added decl for makeAbstractionVariable() Wed May 14 10:58:27 1997 Steven Eker * module.cc (insertForeignRules): use Term::collapseSymbols() rather than Term::analyseCollapses() (insertForeignEquations): use Term::collapseSymbols() rather than Term::analyseCollapses() (insertForeignSortConstraints): use Term::collapseSymbols() rather than Term::analyseCollapses() * rule.cc (compile): call determineCollapseSymbols() on rhs * equation.cc (compile): call determineCollapseSymbols() on rhs * preEquation.cc (compile): call determineCollapseSymbols() on lhs, condition lhs and condition rhs * variableLhsAutomaton.cc (match): we no longer assume that the subject has its sort already computed; instead we call DagNode::checkSort() Tue May 13 18:23:05 1997 Steven Eker * preEquation.cc (compile): fixed longstanding bug where we were calling markEagerArguments() twice on peCondLhs and not at all on peCondRhs Thu May 8 11:24:22 1997 Steven Eker * module.hh (class Module): decls for insertForeignSortConstraints(), insertForeignEquations() and insertForeignRules() added * module.cc (closeSortSet): added (closeSignature): greatly simplified (closeTheory): implemented (insertForeignSortConstraints): added (insertForeignEquations): added (insertForeignRules): added * module.hh (class Module): added decl for closeSortSet() Wed May 7 15:53:08 1997 Steven Eker * variableAbstractionSubproblem.hh: created * variable.cc (analyseCollapses): added (analyseCollapses): deleted Thu Apr 10 19:08:08 1997 Steven Eker * rule.cc (apply): added tracing Wed Apr 9 17:23:28 1997 Steven Eker * rewritingContext.hh (class RewritingContext): added decl for traceExhausted() * rewritingContext.cc (traceExhausted): added * preEquation.cc (checkCondition): hacked to call traceExhausted if all solutions fail Tue Apr 8 15:02:19 1997 Steven Eker * rewritingContext.cc (RewritingContext): deleted (makeSubcontext): use traceFlag version of constructor * rewritingContext.hh (class RewritingContext): conditionDepth data member deleted (class RewritingContext): constructor that takes an original RewritingContext deleted (depth): deleted (traceStatus): made const Mon Apr 7 19:02:29 1997 Steven Eker * rewritingContext.hh (class RewritingContext): added consts to eq/rl/sc args * rule.cc (traceBeginTrial): added (apply): calls to checkCondition() now take subject * equation.cc (traceBeginTrial): added * equation.hh (class Equation): added traceBeginTrial() decl * rule.hh (class Rule): added traceBeginTrial() decl * rewritingContext.cc (traceBeginEqTrial): added (traceBeginRuleTrial): added (traceBeginScTrial): added (traceEndTrial): added * rewritingContext.hh (class RewritingContext): added decls for 4 trace trial functions * sortConstraint.cc (traceBeginTrial): added * sortConstraint.hh (class SortConstraint): decl for traceBeginTrial() added * preEquation.hh (class PreEquation): decl for traceBeginTrial() virtual function * preEquation.cc (checkCondition): rewritten to do tracing Fri Apr 4 15:47:21 1997 Steven Eker * rewritingContext.cc (ruleRewrite): use tracePostRuleRewrite() * preEquation.cc (checkCondition): rewriten to use makeSubContext(); * rewritingContext.cc (tracePreScApplication): added (tracePostRuleRewrite): added (tracePostEqRewrite): added (tracePreEqRewrite): added (tracePreRuleRewrite): added (makeSubcontext): added * rewritingContext.hh (class RewritingContext): virtual functions added for tracing and subcontexts; trace flag is now a bool Thu Apr 3 15:47:43 1997 Steven Eker * rule.cc (apply): deepSelfDestruct subproblem when we fail (memory leak discovered by purify) Wed Apr 2 17:51:45 1997 Steven Eker * variable.cc (deepSelfDestruct): need to delete our object (to fix memory leak detected by purify) Fri Mar 28 15:13:50 1997 Steven Eker * rule.cc (apply): added Thu Feb 13 12:41:27 1997 Steven Eker * complexSort.cc (ComplexSort): arg made const Tue Dec 24 11:34:33 1996 Steven Eker * sortCheckSubproblem.cc (solve): computeSortWhilePreservingContext() call changed to computeTrueSortWhilePreservingContext() * variableSymbol.cc (computeBaseSort): added (computeTrueSort): used to be computeSort() (eqRewrite): used to be rewrite() * variableSymbol.hh (class VariableSymbol): rewrite() -> eqRewrite(); computeSort() replaced by computeBaseSort() and computeTrueSort() Mon Dec 9 18:57:53 1996 Steven Eker * module.cc (closeSignature): check for sort constraints with variable lhs Fri Dec 6 14:31:19 1996 Steven Eker * preEquation.hh (class PreEquation): peLhsAutomaton memebr added (setLhsAutomaton): added (lhsAutomaton): added Thu Dec 5 16:38:27 1996 Steven Eker * variable.cc (compileLhs): calculate whether we are at risk of overwriting dag node that we need to form replacement * variableLhsAutomaton.hh (class VariableLhsAutomaton): usedInReplacement -> copyToAvoidOverwriting * variableLhsAutomaton.cc (match): make use of usedInReplacement when deciding whether to clone the dagNode we just matched (VariableLhsAutomaton): initialize usedInReplacement flag (match): usedInReplacement -> copyToAvoidOverwriting * variableLhsAutomaton.hh (class VariableLhsAutomaton): usedInReplacement flag added to avoid needless cloning of dagNode matched by variable. This cloning avoids a pointer circularity the the equation case but could introduce a sort computation circularity in the sort constraint case. Tue Dec 3 18:00:20 1996 Steven Eker * module.cc (closeSignature): check for rules with variable lhs Mon Nov 25 19:32:59 1996 Steven Eker * variableSymbol.cc (VariableSymbol): added constructor arg Fri Nov 15 16:46:29 1996 Steven Eker * variableLhsAutomaton.cc (match): call matchVariableWithExtension() if there is non-null extensionInfo Thu Nov 14 18:06:28 1996 Steven Eker * variableLhsAutomaton.cc (match): bind variable to clone of subject to avoid introducing cycles in term graph when rewriting with equation with bare variable lhs Wed Oct 30 18:44:49 1996 Steven Eker * module.cc (closeSignature): hacked to look for equations with variable lhs Fri Oct 25 15:18:06 1996 Steven Eker * sortCode.cc (operator<<): sortCode arg made const * sortCode.hh (operator<<): sortCode arg made const * variableLhsAutomaton.hh: created * variableLhsAutomaton.cc: created Fri Oct 18 16:28:22 1996 Steven Eker * sort.hh (getSubsorts): added Wed Oct 16 10:26:39 1996 Steven Eker * variableRhsAutomaton.cc (dump): indentLevel arg added Wed Oct 9 11:38:21 1996 Steven Eker * connectedComponent.cc (findMaximalSorts): fixed bug; we now give the correct result if run on the error sorts code; this actually occurs in Symbol::parse() for AC/A arg list with subterms in the error sort Tue Oct 8 16:08:48 1996 Steven Eker * core.cc: Vector*> changed to Vector> * rule.cc (Rule): removed equals (~Rule): implemented * sortConstraint.cc (SortConstraint): removed equals * equation.cc (Equation): removed equals (~Equation): implemented * preEquation.cc (~PreEquation): implemented and made virtual (PreEquation): removed bool equals (checkCondition): do test without bool equals * preEquation.hh (condLhs): added (condRhs): added Wed Sep 25 19:40:27 1996 Steven Eker * sortCheckSubproblem.cc (solve): fixed bug where we were solving subproblem positively in infinitely many ways leading to infinite loop Fri Aug 30 10:56:07 1996 Steven Eker * variable.cc (subsumes): modified to take in to account occurences of the variable in context (subsumes): Now return UNDECIDED is sort small enough but variable occurs in its own context Thu Aug 22 12:29:37 1996 Steven Eker * rewritingContext.cc (ruleRewrite): added limit arg * rule.hh (class Rule): ruleLabel now has type Label * label.hh (Label): created Fri Aug 9 14:54:08 1996 Steven Eker * rewritingContext.cc (ruleRewrite): rewritten to use explicit stack of redex positions (ruleRewrite): fixed silly semi-colon bug (ruleRewrite): rewritten to explore node on an as needed basis * redexPosition.hh (class RedexPosition): created Thu Aug 8 10:10:51 1996 Steven Eker * rewritingContext.cc (ruleRewrite): added (ruleRewrite): need to collect garbage and trace * rewritingContext.hh (class RewritingContext): removed const-ness of rootNode so that rule based rewrite can replace it * core.hh: added class Rule declaration * core.cc: added template class Vector instantiation * module.cc (closeSignature): added call to compile rules * rule.cc: created * rule.hh (class Rule): created * preEquation.cc (compile): Validate() replaced by ErrorCheck() Tue Aug 6 16:13:06 1996 Steven Eker * variable.cc (analyseConstraintPropagation): matchAtTop arg removed from analyseConstraintPropagation(); boundAbove arg removed from compileLhs() * variable.hh (class Variable): matchAtTop arg removed from analyseConstraintPropagation(); boundAbove arg removed from compileLhs() Thu Aug 1 18:36:00 1996 Steven Eker * core.cc: removed templates for Vector and Vector > (now in frontEnd.cc) Wed Jul 31 17:08:14 1996 Steven Eker * variableSymbol.cc (makeTerm): added Tue Jul 2 16:29:02 1996 Steven Eker * rewritingContext.cc: ASsert() -> Assert() Fri Jun 28 17:10:14 1996 Steven Eker * localBinding.cc: ASsert() -> Assert() Tue Jun 25 16:41:03 1996 Steven Eker * core.cc: added instantiation for Vector Fri Jun 21 18:02:10 1996 Steven Eker * variable.cc (compileLhs): changed arg list * variable.hh (class Variable): changed arg list of compileLhs() * equation.cc (compile): call VariableInfo::addRhsVariables() * preEquation.cc (compile): use VariableInfo functions * preEquation.hh: added VariableInfo as a base class; leftLinearVariables() and conditionVariables() functionality removed * variableInfo.hh: created Thu Jun 13 11:01:25 1996 Steven Eker * subproblemSequence.hh (SubproblemSequence): now take 2 args * subproblemSequence.cc (simplify): deleted * core.cc: now implementation file for subproblemAccumulator.hh * subproblemAccumulator.hh: created * core.hh: class SubproblemAccumulator added * substitution.hh (copy): moved out of substitution.cc and inlined (class Substitution): make copy constructor private (clear): added speed hack Wed Jun 12 10:45:43 1996 Steven Eker * substitution.cc (copy): speed hack added * variable.cc (compileLhs): added nrVariables arg Tue Jun 11 17:25:34 1996 Steven Eker * substitution.hh (class Substitution): switch to Vector; new constructor added for building local substitutions that will reside in lhs automata; explicit destructor removed Fri Jun 7 16:14:38 1996 Steven Eker * subproblemSequence.cc (simplify): no longer deal with empty sequences * subproblemSequence.hh (append): added (SubproblemSequence): now take arg * core.cc: Sequence's abolished throughout module Sun Jun 2 18:56:52 1996 Steven Eker * variable.cc (subsumes): added Fri May 31 15:59:15 1996 Steven Eker * sortCheckSubproblem.cc (SortCheckSubproblem): 2nd arg made const Fri May 24 11:57:56 1996 Steven Eker * variable.cc (analyseConstraintPropagation): implemented (rather than Assert we will never be called) Thu May 23 10:26:45 1996 Steven Eker * sort.cc (dump): now use sortCode << op * sortCode.cc (operator<<): added (replaces dump) Wed May 22 17:33:32 1996 Steven Eker * sortCheckSubproblem.cc: created * sortCheckSubproblem.hh: created Tue May 21 11:36:49 1996 Steven Eker * localBinding.cc (dump): added (dumpList): added Mon May 20 10:12:22 1996 Steven Eker * substitution.cc (operator-): replaces subtract(); now creates a new localBinding on the heap if needed; otherwise returns 0 * localBinding.cc (LocalBinding): now take argument to preallocate storage for bindings * substitution.cc (subtract): now use LocalBinding class (assert): deleted (retract): deleted * substitution.hh (class Substitution): nested class Difference deleted Sun May 19 17:28:40 1996 Steven Eker * rewritingContext.cc (RewritingContext): horrible bug fixed: failing to initialize prev in 2nd constructor * rewritingContext.hh (class RewritingContext): dagRoot member replaced by DagNode* member, next and prev members added * rewritingContext.cc (RewritingContext): outlined, now link in rewriting context to global list (~RewritingContext): added to unlink rewriting context (markReachableNodes): added * substitution.hh (nrFragileBindings): added (finished): added * localBinding.cc: added * localBinding.hh (class LocalBinding): added Fri May 17 10:52:40 1996 Steven Eker * rewritingContext.hh (dumpContext): deleted (RewritingContext): dumpContext arg deleted * core.hh: class DumpContext deleted * connectedComponent.cc (dumpSort): deleted * module.cc (dump): now use streams * preEquation.cc: #include "dumpContext.hh" removed * sort.cc (dump): now use streams * sortCode.hh (class SortCode): now use streams and WORD_SIZE * variableRhsAutomaton.cc (dump): now use streams * sortConstraint.cc: #include "dumpContext.hh" removed * complexSort.cc (operator<<): use nrMaximalSorts() rather than using (now revoked) friendship with connectedComponent (operator<<): use nrSorts() rather than using (now revoked) friendship with connectedComponent (ComplexSort): added new constructor to make a complex sort from a normal sort so that error sorts can be printed correctly * connectedComponent.hh (nrSorts): added (class ConnectedComponent): operator<<(ostream& s, const ComplexSort& c) no longer a friend Wed May 15 14:48:50 1996 Steven Eker * connectedComponent.cc (operator<<): deleted * connectedComponent.hh: ComplexSort nested class removed * complexSort.hh: created * complexSort.cc: created * connectedComponent.cc (operator<<): added for ComplexSort * connectedComponent.hh (class ConnectedComponent): added ComplexSort nested class * namedEntity.hh: added declaration of operator<<(ostream& s, const NamedEntity* e) Sat May 11 16:30:32 1996 Steven Eker * variableSymbol.cc (VariableSymbol): pass stable = false Fri Apr 26 11:01:07 1996 Steven Eker * dagRoot.hh (setNode): added Tue Apr 23 10:58:22 1996 Steven Eker * subproblemSequence.cc (solve): now take RewritingContext& as argument Wed Apr 17 12:01:29 1996 Steven Eker * substitution.hh (class Substitution): struct Binding now has active flag; "tests" vector removed * substitution.cc (assert): adapted from insert() (retract): added (subtract): no longer keep tests and bindings seperate; clear active flags Fri Apr 12 17:16:35 1996 Steven Eker * variable.hh: added atTop argument to analyseConstraintPropagation(), removed commenting from unused parameters * variable.cc (analyseConstraintPropagation): added atTop argument Thu Apr 11 16:07:37 1996 Steven Eker * substitution.cc (subtract): added (insert): added * substitution.hh: added internal class Difference Thu Mar 28 14:36:58 1996 Steven Eker * variableIndex.cc: rewritten * variableIndex.hh: now use Vector<> Fri Mar 22 10:19:11 1996 Steven Eker * variable.cc (findEagerVariables): atTop commented out Thu Mar 21 15:12:35 1996 Steven Eker * sort.hh: added ERROR_SORT = 0 Wed Mar 20 11:26:47 1996 Steven Eker * substitution.hh: values chenged to constant pointer; currentSize -> copySize; order of values and copySize switched; inline functions updated * substitution.cc (Substitution): now initialize values as a constant pointer; currentSize -> copySize (copy): currentSize -> copySize Mon Mar 11 10:25:57 1996 Steven Eker * sort.hh: "static const int" replaced enum Sat Mar 9 16:26:06 1996 Steven Eker * variable.cc (compileLhs): simple arg removed Thu Feb 15 10:52:11 1996 Steven Eker * variable.hh: commenting removed from findEagerVariables() args * variable.cc (findEagerVariables): implemented (rather than asserting that we would never be called) Wed Feb 14 17:57:19 1996 Steven Eker * equation.cc (compile): pass true to PreEquation::compile() * sortConstraint.cc (compile): pass false to PreEquation::compile() * preEquation.hh: added eagerVariablesAllowed flag to compile() made compile() protected * preEquation.cc (compile): added flag so that eager variables can be denied to sort constraint lhs patterns Tue Feb 6 11:16:56 1996 Steven Eker * preEquation.cc (compile): call Substitution::notify() even if there is no condition * module.cc (closeSignature): now compile sort constraints * sortConstraint.cc: created * sortConstraint.hh: created Fri Feb 2 15:33:47 1996 Steven Eker * preEquation.cc (compile): parse lhs of equation * equation.cc (compile): parse rhs of equation and check it against lhs * preEquation.cc (compile): use new parse() Thu Feb 1 14:07:36 1996 Steven Eker * preEquation.cc (compile): parse condition terms * variableSymbol.hh: parse() deleted * variableSymbol.cc: parse() deleted * variableSymbol.hh: parse() added * variableSymbol.cc (parse): added Wed Jan 31 10:32:36 1996 Steven Eker * equation.hh: complete rewrite based on PreEquation (rhs): added * equation.cc: complete rewrite based on PreEquation * preEquation.hh (hasCondition): added * preEquation.cc (checkCondition): heavily modified; no expects first solution of subproblem to already have been found. No longer self destructs subproblem. Now asserts that condition actually exists (rather than coping with the case where it doesn't). (conditionSatisfied): deleted, code pushed into checkCondition() * variable.hh: added lookupSort() * variable.cc (lookupSort): added Tue Jan 30 17:35:43 1996 Steven Eker * module.cc (closeSignature): generateSortTable() -> compileOpDeclarations() Thu Jan 11 18:04:51 1996 Steven Eker * sort.hh: added UNION_SORT constant * connectedComponent.cc (dumpSort): MULTISORT -> Sort::UNION_SORT * connectedComponent.hh: deleted MULTISORT constant Wed Jan 10 16:30:40 1996 Steven Eker * variableSymbol.cc (VariableSymbol): don't pass a sharable arg to Symbol() * core.cc: added more template instantiations Fri Dec 15 12:44:45 1995 Steven Eker * equation.cc (compile): crude hack to move compilation into a different function so we can delay compilation until sort info is stable * equation.hh: added compile() Thu Dec 14 10:39:28 1995 Steven Eker * connectedComponent.cc (dumpSort): added code to deal with union sorts (dumpSort): avoid excess "," in union case * connectedComponent.hh: added findIndex() and findMaximalSorts() * connectedComponent.cc (findIndex): added (findMaximalSorts): added * sortCode.hh (operator!=): added (makeEmpty): added Wed Dec 13 11:54:57 1995 Steven Eker * dumpContext.hh: added dumpSortTab() * dumpContext.cc (dumpSortTab): added * sort.cc (dump): use dumpSortTab() * dumpContext.cc (dumpSort): chnaged to use ConnectedComponent::dumpSort() * connectedComponent.cc (ConnectedComponent): now set nrMaxSorts (dumpSort): added * connectedComponent.hh: added dumpSort() Fri Dec 8 10:04:56 1995 Steven Eker * equation.cc: deleted Equation(Term* lhs, RhsAutomaton* rhsAutomaton) (printEquation): removed built-in rhs case * equation.hh: deleted Equation(Term* lhs, RhsAutomaton* rhsAutomaton) * variableSymbol.cc (rewrite): added * variableSymbol.hh: added dummy rewrite() Thu Dec 7 11:00:44 1995 Steven Eker * dagRoot.hh: public data member removed and replaced by node() function * rewritingContext.cc (reduce): use new node() function * rewritingContext.hh (root): use new node() function; this function now declared const Wed Dec 6 17:13:41 1995 Steven Eker * namedEntity.hh (id, type): made const * sort.hh: now derived from NamedEntity Tue Dec 5 12:12:15 1995 Steven Eker * module.cc: added call to NamedEntity constructor * module.hh: now derived from NamedEntity * namedEntity.hh: created Fri Dec 1 09:51:42 1995 Steven Eker * module.cc (closeSignature): added code to call generateSortTable() on each symbol * sort.cc (dump): use dumpContext::dumpSort() * sortCode.hh (meet): added togther with == and <= added explicit ctors Thu Nov 30 15:39:50 1995 Steven Eker * module.cc: calls to Sort/ConnectedComponent functions updated * sort.cc (registerConnectedSorts): radically restructured * connectedComponent.cc: radically restructured to include error sorts as real sorts Mon Nov 27 10:52:59 1995 Steven Eker * core.cc: non longer implement SortCode * sortCode.cc: created * connectedComponent.cc (dump): added dump() * module.cc (dump): added dump() * sort.cc (dump): added dump() Wed Nov 22 10:25:22 1995 Steven Eker * dumpContext.cc: created * core.cc: removed DumpContext implementation from this file * dumpContext.hh (dumpSort): added * module.cc (closeSignature): pass first sort to connected component * sort.cc (insertMaximalSorts): call component.increment() each time we find a new sort in current connected component * connectedComponent.hh (increment): added code to keep count of sorts in component so that we can detect cycles; Code also added to save first sort so that we have a name for the component and its error sort * connectedComponent.cc (appendSort): added Assert to check for cycle * sort.cc: fixed bug where we were exploring sort with non-null components Tue Nov 21 17:50:09 1995 Steven Eker * core.cc: template instantiations added added implementation line for sortCode.hh * core.hh: 4 new classes added * sortCode.hh: created * connectedComponent.cc: created * connectedComponent.hh: created * module.cc: created * module.hh: created * sort.hh: created * sort.cc: created Tue Nov 7 10:11:28 1995 Steven Eker * substitution.cc (Substitution): use of allocatedSize removed, allocateSize definition added * substitution.hh (notify): added; expand() deleted and various Asserts now use aloocateSize rather the currentSize since the latter may not be valid for a "fast" equation * equation.cc (Equation): changed rule->equation for all names; now compute substitution size required and notify Substitution class; also determine if equation is fast. (conditionSatisfied): changed naming (Equation): changed naming (slowApplyReplace): formed from traceApplyReplace() Mon Nov 6 16:47:05 1995 Steven Eker * equation.hh : created from rule.hh, names changed, eqFast flag added, fastApplyReplace(), slowApplyReplace() added. Mon Oct 23 10:26:39 1995 Steven Eker * dumpContext.hh : added virtual destructor to silence g++'s complaints * rule.hh : definition added for new functions * rule.cc : huge amount of code rewritten; many new functions to assist tracing * rule.hh (applyReplace): recoded to call traceApplyReplace(), conditionSatified() or subproblemSolved() according to tests (applyReplace): switch arg order for consistancy * rewritingContext.hh : Changed TraceType to new kinds of tracing Tue Oct 17 11:21:05 1995 Steven Eker * rule.hh (applyReplace): changed code to use conditionSatified() * rule.cc (conditionSatified): added * core.hh: added DumpContext * core.cc: added DumpContext * rule.hh (applyReplace): updated to copy dump context * variableRhsAutomaton.cc (dump): updated to use dump context * variableRhsAutomaton.hh: updated to use dump context * rewritingContext.hh: updated to store dump context * rule.cc (dump): updated to use dump context * dumpContext.hh: created DumpContext * rule.cc (Rule): remove calls to analyseVariables() * variable.cc: removed indexVariables(VariableIndex& indicies) * variable.hh (setIndex): added setIndex() removed indexVariables(VariableIndex& indicies) * rewritingContext.cc (reduce): now use DagNode::reduce() * rule.hh: unvirtualized applyReplace() Fri Oct 13 15:39:09 1995 Steven Eker * variable.cc: removed getVariable() * variable.hh: removed CHECK_SHARABILITY constant Added downCast() removed getVariable() * substitution.cc: "old"/"source" args changed to "original" Spacing clean up * substitution.hh: "old"/"source" args changed to "original" Asserts added to clear() and expand(); * rule.hh (Rule): virtualized applyReplace() to find out cost of not being able to inline it and having to make a virtual function call; having different kinds of rule with a virtual applyReplace() is one way of getting light weight built-ins where no special matching is needed - only special rewrite rules (==, =/=) * substitution.hh (Substitution): added destructor to delete values array and fix memory leak Maude-Maude3.2/src/Core/Makefile.am000066400000000000000000000056441420036611000171020ustar00rootroot00000000000000noinst_LIBRARIES = libcore.a libcore_a_CPPFLAGS = \ -I$(top_srcdir)/src/Utility \ -I$(top_srcdir)/src/Interface \ -I$(top_srcdir)/src/Variable \ -I$(top_srcdir)/src/FullCompiler \ -I$(top_srcdir)/src/StrategyLanguage libcore_a_SOURCES = \ memoryCell.cc \ rhsBuilder.cc \ termBag.cc \ bindingLhsAutomaton.cc \ trivialRhsAutomaton.cc \ copyRhsAutomaton.cc \ variableInfo.cc \ narrowingVariableInfo.cc \ termSet.cc \ strategy.cc \ sortTable.cc \ sortConstraintTable.cc \ equationTable.cc \ ruleTable.cc \ sort.cc \ connectedComponent.cc \ module.cc \ substitution.cc \ localBinding.cc \ subproblemSequence.cc \ subproblemDisjunction.cc \ sortCheckSubproblem.cc \ disjunctiveSubproblemAccumulator.cc \ preEquation.cc \ equation.cc \ rule.cc \ sortConstraint.cc \ rewritingContext.cc \ variableAbstractionSubproblem.cc \ equalitySubproblem.cc \ dagRoot.cc \ cachedDag.cc \ extensionMatchSubproblem.cc \ dagNodeSet.cc \ hashConsSet.cc \ memoTable.cc \ memoMap.cc \ rootContainer.cc \ sortBdds.cc \ unificationContext.cc \ protectedDagNodeSet.cc \ pendingUnificationStack.cc \ unificationSubproblemDisjunction.cc \ compoundCycleSubproblem.cc \ stackMachine.cc \ stackMachineRhsCompiler.cc \ returnInstruction.cc \ nullInstruction.cc \ rewriteStrategy.cc \ strategyDefinition.cc EXTRA_DIST = \ run.cc \ ctorDiagram.cc \ sortErrorAnalysis.cc noinst_HEADERS = \ argVec.hh \ argumentIterator.hh \ badFlag.hh \ bindingLhsAutomaton.hh \ cachedDag.hh \ checkedArgVecConstIterator.hh \ checkedArgVecIterator.hh \ conditionFragment.hh \ conditionState.hh \ connectedComponent.hh \ copyRhsAutomaton.hh \ core.hh \ dagArgumentIterator.hh \ dagNodeSet.hh \ hashConsSet.hh \ dagRoot.hh \ disjunctiveSubproblemAccumulator.hh \ equalitySubproblem.hh \ equation.hh \ equationTable.hh \ extensionMatchSubproblem.hh \ label.hh \ lineNumber.hh \ localBinding.hh \ memoTable.hh \ memoMap.hh \ memoryCell.hh \ module.hh \ moduleItem.hh \ namedEntity.hh \ opDeclaration.hh \ preEquation.hh \ rawRootContainer.hh \ redexPosition.hh \ rewritingContext.hh \ rhsBuilder.hh \ rootContainer.hh \ rule.hh \ ruleTable.hh \ simpleRootContainer.hh \ sort.hh \ sortBdds.hh \ sortCheckSubproblem.hh \ sortConstraint.hh \ sortConstraintTable.hh \ sortTable.hh \ strategy.hh \ subproblemAccumulator.hh \ subproblemDisjunction.hh \ subproblemSequence.hh \ substitution.hh \ symbolMap.hh \ termBag.hh \ termSet.hh \ trivialRhsAutomaton.hh \ variableAbstractionSubproblem.hh \ variableInfo.hh \ narrowingVariableInfo.hh \ unificationContext.hh \ freshVariableGenerator.hh \ protectedDagNodeSet.hh \ pendingUnificationStack.hh \ environment.hh \ unificationSubproblemDisjunction.hh \ compoundCycleSubproblem.hh \ frame.hh \ stackMachine.hh \ stackMachineRhsCompiler.hh \ returnInstruction.hh \ nullInstruction.hh \ memoryInfo.hh \ memoryBlock.hh \ rewriteStrategy.hh \ strategyDefinition.hh Maude-Maude3.2/src/Core/Makefile.in000066400000000000000000004166451420036611000171220ustar00rootroot00000000000000# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/Core ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_have_poll.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) AR = ar ARFLAGS = cru AM_V_AR = $(am__v_AR_@AM_V@) am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) am__v_AR_0 = @echo " AR " $@; am__v_AR_1 = libcore_a_AR = $(AR) $(ARFLAGS) libcore_a_LIBADD = am_libcore_a_OBJECTS = libcore_a-memoryCell.$(OBJEXT) \ libcore_a-rhsBuilder.$(OBJEXT) libcore_a-termBag.$(OBJEXT) \ libcore_a-bindingLhsAutomaton.$(OBJEXT) \ libcore_a-trivialRhsAutomaton.$(OBJEXT) \ libcore_a-copyRhsAutomaton.$(OBJEXT) \ libcore_a-variableInfo.$(OBJEXT) \ libcore_a-narrowingVariableInfo.$(OBJEXT) \ libcore_a-termSet.$(OBJEXT) libcore_a-strategy.$(OBJEXT) \ libcore_a-sortTable.$(OBJEXT) \ libcore_a-sortConstraintTable.$(OBJEXT) \ libcore_a-equationTable.$(OBJEXT) \ libcore_a-ruleTable.$(OBJEXT) libcore_a-sort.$(OBJEXT) \ libcore_a-connectedComponent.$(OBJEXT) \ libcore_a-module.$(OBJEXT) libcore_a-substitution.$(OBJEXT) \ libcore_a-localBinding.$(OBJEXT) \ libcore_a-subproblemSequence.$(OBJEXT) \ libcore_a-subproblemDisjunction.$(OBJEXT) \ libcore_a-sortCheckSubproblem.$(OBJEXT) \ libcore_a-disjunctiveSubproblemAccumulator.$(OBJEXT) \ libcore_a-preEquation.$(OBJEXT) libcore_a-equation.$(OBJEXT) \ libcore_a-rule.$(OBJEXT) libcore_a-sortConstraint.$(OBJEXT) \ libcore_a-rewritingContext.$(OBJEXT) \ libcore_a-variableAbstractionSubproblem.$(OBJEXT) \ libcore_a-equalitySubproblem.$(OBJEXT) \ libcore_a-dagRoot.$(OBJEXT) libcore_a-cachedDag.$(OBJEXT) \ libcore_a-extensionMatchSubproblem.$(OBJEXT) \ libcore_a-dagNodeSet.$(OBJEXT) libcore_a-hashConsSet.$(OBJEXT) \ libcore_a-memoTable.$(OBJEXT) libcore_a-memoMap.$(OBJEXT) \ libcore_a-rootContainer.$(OBJEXT) libcore_a-sortBdds.$(OBJEXT) \ libcore_a-unificationContext.$(OBJEXT) \ libcore_a-protectedDagNodeSet.$(OBJEXT) \ libcore_a-pendingUnificationStack.$(OBJEXT) \ libcore_a-unificationSubproblemDisjunction.$(OBJEXT) \ libcore_a-compoundCycleSubproblem.$(OBJEXT) \ libcore_a-stackMachine.$(OBJEXT) \ libcore_a-stackMachineRhsCompiler.$(OBJEXT) \ libcore_a-returnInstruction.$(OBJEXT) \ libcore_a-nullInstruction.$(OBJEXT) \ libcore_a-rewriteStrategy.$(OBJEXT) \ libcore_a-strategyDefinition.$(OBJEXT) libcore_a_OBJECTS = $(am_libcore_a_OBJECTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/libcore_a-bindingLhsAutomaton.Po \ ./$(DEPDIR)/libcore_a-cachedDag.Po \ ./$(DEPDIR)/libcore_a-compoundCycleSubproblem.Po \ ./$(DEPDIR)/libcore_a-connectedComponent.Po \ ./$(DEPDIR)/libcore_a-copyRhsAutomaton.Po \ ./$(DEPDIR)/libcore_a-dagNodeSet.Po \ ./$(DEPDIR)/libcore_a-dagRoot.Po \ ./$(DEPDIR)/libcore_a-disjunctiveSubproblemAccumulator.Po \ ./$(DEPDIR)/libcore_a-equalitySubproblem.Po \ ./$(DEPDIR)/libcore_a-equation.Po \ ./$(DEPDIR)/libcore_a-equationTable.Po \ ./$(DEPDIR)/libcore_a-extensionMatchSubproblem.Po \ ./$(DEPDIR)/libcore_a-hashConsSet.Po \ ./$(DEPDIR)/libcore_a-localBinding.Po \ ./$(DEPDIR)/libcore_a-memoMap.Po \ ./$(DEPDIR)/libcore_a-memoTable.Po \ ./$(DEPDIR)/libcore_a-memoryCell.Po \ ./$(DEPDIR)/libcore_a-module.Po \ ./$(DEPDIR)/libcore_a-narrowingVariableInfo.Po \ ./$(DEPDIR)/libcore_a-nullInstruction.Po \ ./$(DEPDIR)/libcore_a-pendingUnificationStack.Po \ ./$(DEPDIR)/libcore_a-preEquation.Po \ ./$(DEPDIR)/libcore_a-protectedDagNodeSet.Po \ ./$(DEPDIR)/libcore_a-returnInstruction.Po \ ./$(DEPDIR)/libcore_a-rewriteStrategy.Po \ ./$(DEPDIR)/libcore_a-rewritingContext.Po \ ./$(DEPDIR)/libcore_a-rhsBuilder.Po \ ./$(DEPDIR)/libcore_a-rootContainer.Po \ ./$(DEPDIR)/libcore_a-rule.Po \ ./$(DEPDIR)/libcore_a-ruleTable.Po \ ./$(DEPDIR)/libcore_a-sort.Po \ ./$(DEPDIR)/libcore_a-sortBdds.Po \ ./$(DEPDIR)/libcore_a-sortCheckSubproblem.Po \ ./$(DEPDIR)/libcore_a-sortConstraint.Po \ ./$(DEPDIR)/libcore_a-sortConstraintTable.Po \ ./$(DEPDIR)/libcore_a-sortTable.Po \ ./$(DEPDIR)/libcore_a-stackMachine.Po \ ./$(DEPDIR)/libcore_a-stackMachineRhsCompiler.Po \ ./$(DEPDIR)/libcore_a-strategy.Po \ ./$(DEPDIR)/libcore_a-strategyDefinition.Po \ ./$(DEPDIR)/libcore_a-subproblemDisjunction.Po \ ./$(DEPDIR)/libcore_a-subproblemSequence.Po \ ./$(DEPDIR)/libcore_a-substitution.Po \ ./$(DEPDIR)/libcore_a-termBag.Po \ ./$(DEPDIR)/libcore_a-termSet.Po \ ./$(DEPDIR)/libcore_a-trivialRhsAutomaton.Po \ ./$(DEPDIR)/libcore_a-unificationContext.Po \ ./$(DEPDIR)/libcore_a-unificationSubproblemDisjunction.Po \ ./$(DEPDIR)/libcore_a-variableAbstractionSubproblem.Po \ ./$(DEPDIR)/libcore_a-variableInfo.Po am__mv = mv -f AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(libcore_a_SOURCES) DIST_SOURCES = $(libcore_a_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ $(top_srcdir)/mkinstalldirs ChangeLog DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ BUDDY_LIB = @BUDDY_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ CVC4_LIB = @CVC4_LIB@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FLEX = @FLEX@ GCC_LIBS = @GCC_LIBS@ GMP_LIBS = @GMP_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSIGSEGV_LIB = @LIBSIGSEGV_LIB@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TECLA_LIBS = @TECLA_LIBS@ VERSION = @VERSION@ YICES2_LIB = @YICES2_LIB@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LIBRARIES = libcore.a libcore_a_CPPFLAGS = \ -I$(top_srcdir)/src/Utility \ -I$(top_srcdir)/src/Interface \ -I$(top_srcdir)/src/Variable \ -I$(top_srcdir)/src/FullCompiler \ -I$(top_srcdir)/src/StrategyLanguage libcore_a_SOURCES = \ memoryCell.cc \ rhsBuilder.cc \ termBag.cc \ bindingLhsAutomaton.cc \ trivialRhsAutomaton.cc \ copyRhsAutomaton.cc \ variableInfo.cc \ narrowingVariableInfo.cc \ termSet.cc \ strategy.cc \ sortTable.cc \ sortConstraintTable.cc \ equationTable.cc \ ruleTable.cc \ sort.cc \ connectedComponent.cc \ module.cc \ substitution.cc \ localBinding.cc \ subproblemSequence.cc \ subproblemDisjunction.cc \ sortCheckSubproblem.cc \ disjunctiveSubproblemAccumulator.cc \ preEquation.cc \ equation.cc \ rule.cc \ sortConstraint.cc \ rewritingContext.cc \ variableAbstractionSubproblem.cc \ equalitySubproblem.cc \ dagRoot.cc \ cachedDag.cc \ extensionMatchSubproblem.cc \ dagNodeSet.cc \ hashConsSet.cc \ memoTable.cc \ memoMap.cc \ rootContainer.cc \ sortBdds.cc \ unificationContext.cc \ protectedDagNodeSet.cc \ pendingUnificationStack.cc \ unificationSubproblemDisjunction.cc \ compoundCycleSubproblem.cc \ stackMachine.cc \ stackMachineRhsCompiler.cc \ returnInstruction.cc \ nullInstruction.cc \ rewriteStrategy.cc \ strategyDefinition.cc EXTRA_DIST = \ run.cc \ ctorDiagram.cc \ sortErrorAnalysis.cc noinst_HEADERS = \ argVec.hh \ argumentIterator.hh \ badFlag.hh \ bindingLhsAutomaton.hh \ cachedDag.hh \ checkedArgVecConstIterator.hh \ checkedArgVecIterator.hh \ conditionFragment.hh \ conditionState.hh \ connectedComponent.hh \ copyRhsAutomaton.hh \ core.hh \ dagArgumentIterator.hh \ dagNodeSet.hh \ hashConsSet.hh \ dagRoot.hh \ disjunctiveSubproblemAccumulator.hh \ equalitySubproblem.hh \ equation.hh \ equationTable.hh \ extensionMatchSubproblem.hh \ label.hh \ lineNumber.hh \ localBinding.hh \ memoTable.hh \ memoMap.hh \ memoryCell.hh \ module.hh \ moduleItem.hh \ namedEntity.hh \ opDeclaration.hh \ preEquation.hh \ rawRootContainer.hh \ redexPosition.hh \ rewritingContext.hh \ rhsBuilder.hh \ rootContainer.hh \ rule.hh \ ruleTable.hh \ simpleRootContainer.hh \ sort.hh \ sortBdds.hh \ sortCheckSubproblem.hh \ sortConstraint.hh \ sortConstraintTable.hh \ sortTable.hh \ strategy.hh \ subproblemAccumulator.hh \ subproblemDisjunction.hh \ subproblemSequence.hh \ substitution.hh \ symbolMap.hh \ termBag.hh \ termSet.hh \ trivialRhsAutomaton.hh \ variableAbstractionSubproblem.hh \ variableInfo.hh \ narrowingVariableInfo.hh \ unificationContext.hh \ freshVariableGenerator.hh \ protectedDagNodeSet.hh \ pendingUnificationStack.hh \ environment.hh \ unificationSubproblemDisjunction.hh \ compoundCycleSubproblem.hh \ frame.hh \ stackMachine.hh \ stackMachineRhsCompiler.hh \ returnInstruction.hh \ nullInstruction.hh \ memoryInfo.hh \ memoryBlock.hh \ rewriteStrategy.hh \ strategyDefinition.hh all: all-am .SUFFIXES: .SUFFIXES: .cc .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Core/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Core/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libcore.a: $(libcore_a_OBJECTS) $(libcore_a_DEPENDENCIES) $(EXTRA_libcore_a_DEPENDENCIES) $(AM_V_at)-rm -f libcore.a $(AM_V_AR)$(libcore_a_AR) libcore.a $(libcore_a_OBJECTS) $(libcore_a_LIBADD) $(AM_V_at)$(RANLIB) libcore.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-bindingLhsAutomaton.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-cachedDag.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-compoundCycleSubproblem.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-connectedComponent.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-copyRhsAutomaton.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-dagNodeSet.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-dagRoot.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-disjunctiveSubproblemAccumulator.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-equalitySubproblem.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-equation.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-equationTable.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-extensionMatchSubproblem.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-hashConsSet.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-localBinding.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-memoMap.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-memoTable.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-memoryCell.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-module.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-narrowingVariableInfo.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-nullInstruction.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-pendingUnificationStack.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-preEquation.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-protectedDagNodeSet.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-returnInstruction.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-rewriteStrategy.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-rewritingContext.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-rhsBuilder.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-rootContainer.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-rule.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-ruleTable.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-sort.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-sortBdds.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-sortCheckSubproblem.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-sortConstraint.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-sortConstraintTable.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-sortTable.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-stackMachine.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-stackMachineRhsCompiler.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-strategy.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-strategyDefinition.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-subproblemDisjunction.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-subproblemSequence.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-substitution.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-termBag.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-termSet.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-trivialRhsAutomaton.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-unificationContext.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-unificationSubproblemDisjunction.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-variableAbstractionSubproblem.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcore_a-variableInfo.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` libcore_a-memoryCell.o: memoryCell.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-memoryCell.o -MD -MP -MF $(DEPDIR)/libcore_a-memoryCell.Tpo -c -o libcore_a-memoryCell.o `test -f 'memoryCell.cc' || echo '$(srcdir)/'`memoryCell.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-memoryCell.Tpo $(DEPDIR)/libcore_a-memoryCell.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='memoryCell.cc' object='libcore_a-memoryCell.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-memoryCell.o `test -f 'memoryCell.cc' || echo '$(srcdir)/'`memoryCell.cc libcore_a-memoryCell.obj: memoryCell.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-memoryCell.obj -MD -MP -MF $(DEPDIR)/libcore_a-memoryCell.Tpo -c -o libcore_a-memoryCell.obj `if test -f 'memoryCell.cc'; then $(CYGPATH_W) 'memoryCell.cc'; else $(CYGPATH_W) '$(srcdir)/memoryCell.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-memoryCell.Tpo $(DEPDIR)/libcore_a-memoryCell.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='memoryCell.cc' object='libcore_a-memoryCell.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-memoryCell.obj `if test -f 'memoryCell.cc'; then $(CYGPATH_W) 'memoryCell.cc'; else $(CYGPATH_W) '$(srcdir)/memoryCell.cc'; fi` libcore_a-rhsBuilder.o: rhsBuilder.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-rhsBuilder.o -MD -MP -MF $(DEPDIR)/libcore_a-rhsBuilder.Tpo -c -o libcore_a-rhsBuilder.o `test -f 'rhsBuilder.cc' || echo '$(srcdir)/'`rhsBuilder.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-rhsBuilder.Tpo $(DEPDIR)/libcore_a-rhsBuilder.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rhsBuilder.cc' object='libcore_a-rhsBuilder.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-rhsBuilder.o `test -f 'rhsBuilder.cc' || echo '$(srcdir)/'`rhsBuilder.cc libcore_a-rhsBuilder.obj: rhsBuilder.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-rhsBuilder.obj -MD -MP -MF $(DEPDIR)/libcore_a-rhsBuilder.Tpo -c -o libcore_a-rhsBuilder.obj `if test -f 'rhsBuilder.cc'; then $(CYGPATH_W) 'rhsBuilder.cc'; else $(CYGPATH_W) '$(srcdir)/rhsBuilder.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-rhsBuilder.Tpo $(DEPDIR)/libcore_a-rhsBuilder.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rhsBuilder.cc' object='libcore_a-rhsBuilder.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-rhsBuilder.obj `if test -f 'rhsBuilder.cc'; then $(CYGPATH_W) 'rhsBuilder.cc'; else $(CYGPATH_W) '$(srcdir)/rhsBuilder.cc'; fi` libcore_a-termBag.o: termBag.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-termBag.o -MD -MP -MF $(DEPDIR)/libcore_a-termBag.Tpo -c -o libcore_a-termBag.o `test -f 'termBag.cc' || echo '$(srcdir)/'`termBag.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-termBag.Tpo $(DEPDIR)/libcore_a-termBag.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='termBag.cc' object='libcore_a-termBag.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-termBag.o `test -f 'termBag.cc' || echo '$(srcdir)/'`termBag.cc libcore_a-termBag.obj: termBag.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-termBag.obj -MD -MP -MF $(DEPDIR)/libcore_a-termBag.Tpo -c -o libcore_a-termBag.obj `if test -f 'termBag.cc'; then $(CYGPATH_W) 'termBag.cc'; else $(CYGPATH_W) '$(srcdir)/termBag.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-termBag.Tpo $(DEPDIR)/libcore_a-termBag.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='termBag.cc' object='libcore_a-termBag.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-termBag.obj `if test -f 'termBag.cc'; then $(CYGPATH_W) 'termBag.cc'; else $(CYGPATH_W) '$(srcdir)/termBag.cc'; fi` libcore_a-bindingLhsAutomaton.o: bindingLhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-bindingLhsAutomaton.o -MD -MP -MF $(DEPDIR)/libcore_a-bindingLhsAutomaton.Tpo -c -o libcore_a-bindingLhsAutomaton.o `test -f 'bindingLhsAutomaton.cc' || echo '$(srcdir)/'`bindingLhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-bindingLhsAutomaton.Tpo $(DEPDIR)/libcore_a-bindingLhsAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='bindingLhsAutomaton.cc' object='libcore_a-bindingLhsAutomaton.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-bindingLhsAutomaton.o `test -f 'bindingLhsAutomaton.cc' || echo '$(srcdir)/'`bindingLhsAutomaton.cc libcore_a-bindingLhsAutomaton.obj: bindingLhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-bindingLhsAutomaton.obj -MD -MP -MF $(DEPDIR)/libcore_a-bindingLhsAutomaton.Tpo -c -o libcore_a-bindingLhsAutomaton.obj `if test -f 'bindingLhsAutomaton.cc'; then $(CYGPATH_W) 'bindingLhsAutomaton.cc'; else $(CYGPATH_W) '$(srcdir)/bindingLhsAutomaton.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-bindingLhsAutomaton.Tpo $(DEPDIR)/libcore_a-bindingLhsAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='bindingLhsAutomaton.cc' object='libcore_a-bindingLhsAutomaton.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-bindingLhsAutomaton.obj `if test -f 'bindingLhsAutomaton.cc'; then $(CYGPATH_W) 'bindingLhsAutomaton.cc'; else $(CYGPATH_W) '$(srcdir)/bindingLhsAutomaton.cc'; fi` libcore_a-trivialRhsAutomaton.o: trivialRhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-trivialRhsAutomaton.o -MD -MP -MF $(DEPDIR)/libcore_a-trivialRhsAutomaton.Tpo -c -o libcore_a-trivialRhsAutomaton.o `test -f 'trivialRhsAutomaton.cc' || echo '$(srcdir)/'`trivialRhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-trivialRhsAutomaton.Tpo $(DEPDIR)/libcore_a-trivialRhsAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='trivialRhsAutomaton.cc' object='libcore_a-trivialRhsAutomaton.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-trivialRhsAutomaton.o `test -f 'trivialRhsAutomaton.cc' || echo '$(srcdir)/'`trivialRhsAutomaton.cc libcore_a-trivialRhsAutomaton.obj: trivialRhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-trivialRhsAutomaton.obj -MD -MP -MF $(DEPDIR)/libcore_a-trivialRhsAutomaton.Tpo -c -o libcore_a-trivialRhsAutomaton.obj `if test -f 'trivialRhsAutomaton.cc'; then $(CYGPATH_W) 'trivialRhsAutomaton.cc'; else $(CYGPATH_W) '$(srcdir)/trivialRhsAutomaton.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-trivialRhsAutomaton.Tpo $(DEPDIR)/libcore_a-trivialRhsAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='trivialRhsAutomaton.cc' object='libcore_a-trivialRhsAutomaton.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-trivialRhsAutomaton.obj `if test -f 'trivialRhsAutomaton.cc'; then $(CYGPATH_W) 'trivialRhsAutomaton.cc'; else $(CYGPATH_W) '$(srcdir)/trivialRhsAutomaton.cc'; fi` libcore_a-copyRhsAutomaton.o: copyRhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-copyRhsAutomaton.o -MD -MP -MF $(DEPDIR)/libcore_a-copyRhsAutomaton.Tpo -c -o libcore_a-copyRhsAutomaton.o `test -f 'copyRhsAutomaton.cc' || echo '$(srcdir)/'`copyRhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-copyRhsAutomaton.Tpo $(DEPDIR)/libcore_a-copyRhsAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='copyRhsAutomaton.cc' object='libcore_a-copyRhsAutomaton.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-copyRhsAutomaton.o `test -f 'copyRhsAutomaton.cc' || echo '$(srcdir)/'`copyRhsAutomaton.cc libcore_a-copyRhsAutomaton.obj: copyRhsAutomaton.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-copyRhsAutomaton.obj -MD -MP -MF $(DEPDIR)/libcore_a-copyRhsAutomaton.Tpo -c -o libcore_a-copyRhsAutomaton.obj `if test -f 'copyRhsAutomaton.cc'; then $(CYGPATH_W) 'copyRhsAutomaton.cc'; else $(CYGPATH_W) '$(srcdir)/copyRhsAutomaton.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-copyRhsAutomaton.Tpo $(DEPDIR)/libcore_a-copyRhsAutomaton.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='copyRhsAutomaton.cc' object='libcore_a-copyRhsAutomaton.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-copyRhsAutomaton.obj `if test -f 'copyRhsAutomaton.cc'; then $(CYGPATH_W) 'copyRhsAutomaton.cc'; else $(CYGPATH_W) '$(srcdir)/copyRhsAutomaton.cc'; fi` libcore_a-variableInfo.o: variableInfo.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-variableInfo.o -MD -MP -MF $(DEPDIR)/libcore_a-variableInfo.Tpo -c -o libcore_a-variableInfo.o `test -f 'variableInfo.cc' || echo '$(srcdir)/'`variableInfo.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-variableInfo.Tpo $(DEPDIR)/libcore_a-variableInfo.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='variableInfo.cc' object='libcore_a-variableInfo.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-variableInfo.o `test -f 'variableInfo.cc' || echo '$(srcdir)/'`variableInfo.cc libcore_a-variableInfo.obj: variableInfo.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-variableInfo.obj -MD -MP -MF $(DEPDIR)/libcore_a-variableInfo.Tpo -c -o libcore_a-variableInfo.obj `if test -f 'variableInfo.cc'; then $(CYGPATH_W) 'variableInfo.cc'; else $(CYGPATH_W) '$(srcdir)/variableInfo.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-variableInfo.Tpo $(DEPDIR)/libcore_a-variableInfo.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='variableInfo.cc' object='libcore_a-variableInfo.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-variableInfo.obj `if test -f 'variableInfo.cc'; then $(CYGPATH_W) 'variableInfo.cc'; else $(CYGPATH_W) '$(srcdir)/variableInfo.cc'; fi` libcore_a-narrowingVariableInfo.o: narrowingVariableInfo.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-narrowingVariableInfo.o -MD -MP -MF $(DEPDIR)/libcore_a-narrowingVariableInfo.Tpo -c -o libcore_a-narrowingVariableInfo.o `test -f 'narrowingVariableInfo.cc' || echo '$(srcdir)/'`narrowingVariableInfo.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-narrowingVariableInfo.Tpo $(DEPDIR)/libcore_a-narrowingVariableInfo.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='narrowingVariableInfo.cc' object='libcore_a-narrowingVariableInfo.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-narrowingVariableInfo.o `test -f 'narrowingVariableInfo.cc' || echo '$(srcdir)/'`narrowingVariableInfo.cc libcore_a-narrowingVariableInfo.obj: narrowingVariableInfo.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-narrowingVariableInfo.obj -MD -MP -MF $(DEPDIR)/libcore_a-narrowingVariableInfo.Tpo -c -o libcore_a-narrowingVariableInfo.obj `if test -f 'narrowingVariableInfo.cc'; then $(CYGPATH_W) 'narrowingVariableInfo.cc'; else $(CYGPATH_W) '$(srcdir)/narrowingVariableInfo.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-narrowingVariableInfo.Tpo $(DEPDIR)/libcore_a-narrowingVariableInfo.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='narrowingVariableInfo.cc' object='libcore_a-narrowingVariableInfo.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-narrowingVariableInfo.obj `if test -f 'narrowingVariableInfo.cc'; then $(CYGPATH_W) 'narrowingVariableInfo.cc'; else $(CYGPATH_W) '$(srcdir)/narrowingVariableInfo.cc'; fi` libcore_a-termSet.o: termSet.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-termSet.o -MD -MP -MF $(DEPDIR)/libcore_a-termSet.Tpo -c -o libcore_a-termSet.o `test -f 'termSet.cc' || echo '$(srcdir)/'`termSet.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-termSet.Tpo $(DEPDIR)/libcore_a-termSet.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='termSet.cc' object='libcore_a-termSet.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-termSet.o `test -f 'termSet.cc' || echo '$(srcdir)/'`termSet.cc libcore_a-termSet.obj: termSet.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-termSet.obj -MD -MP -MF $(DEPDIR)/libcore_a-termSet.Tpo -c -o libcore_a-termSet.obj `if test -f 'termSet.cc'; then $(CYGPATH_W) 'termSet.cc'; else $(CYGPATH_W) '$(srcdir)/termSet.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-termSet.Tpo $(DEPDIR)/libcore_a-termSet.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='termSet.cc' object='libcore_a-termSet.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-termSet.obj `if test -f 'termSet.cc'; then $(CYGPATH_W) 'termSet.cc'; else $(CYGPATH_W) '$(srcdir)/termSet.cc'; fi` libcore_a-strategy.o: strategy.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-strategy.o -MD -MP -MF $(DEPDIR)/libcore_a-strategy.Tpo -c -o libcore_a-strategy.o `test -f 'strategy.cc' || echo '$(srcdir)/'`strategy.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-strategy.Tpo $(DEPDIR)/libcore_a-strategy.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='strategy.cc' object='libcore_a-strategy.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-strategy.o `test -f 'strategy.cc' || echo '$(srcdir)/'`strategy.cc libcore_a-strategy.obj: strategy.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-strategy.obj -MD -MP -MF $(DEPDIR)/libcore_a-strategy.Tpo -c -o libcore_a-strategy.obj `if test -f 'strategy.cc'; then $(CYGPATH_W) 'strategy.cc'; else $(CYGPATH_W) '$(srcdir)/strategy.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-strategy.Tpo $(DEPDIR)/libcore_a-strategy.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='strategy.cc' object='libcore_a-strategy.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-strategy.obj `if test -f 'strategy.cc'; then $(CYGPATH_W) 'strategy.cc'; else $(CYGPATH_W) '$(srcdir)/strategy.cc'; fi` libcore_a-sortTable.o: sortTable.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-sortTable.o -MD -MP -MF $(DEPDIR)/libcore_a-sortTable.Tpo -c -o libcore_a-sortTable.o `test -f 'sortTable.cc' || echo '$(srcdir)/'`sortTable.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-sortTable.Tpo $(DEPDIR)/libcore_a-sortTable.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='sortTable.cc' object='libcore_a-sortTable.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-sortTable.o `test -f 'sortTable.cc' || echo '$(srcdir)/'`sortTable.cc libcore_a-sortTable.obj: sortTable.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-sortTable.obj -MD -MP -MF $(DEPDIR)/libcore_a-sortTable.Tpo -c -o libcore_a-sortTable.obj `if test -f 'sortTable.cc'; then $(CYGPATH_W) 'sortTable.cc'; else $(CYGPATH_W) '$(srcdir)/sortTable.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-sortTable.Tpo $(DEPDIR)/libcore_a-sortTable.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='sortTable.cc' object='libcore_a-sortTable.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-sortTable.obj `if test -f 'sortTable.cc'; then $(CYGPATH_W) 'sortTable.cc'; else $(CYGPATH_W) '$(srcdir)/sortTable.cc'; fi` libcore_a-sortConstraintTable.o: sortConstraintTable.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-sortConstraintTable.o -MD -MP -MF $(DEPDIR)/libcore_a-sortConstraintTable.Tpo -c -o libcore_a-sortConstraintTable.o `test -f 'sortConstraintTable.cc' || echo '$(srcdir)/'`sortConstraintTable.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-sortConstraintTable.Tpo $(DEPDIR)/libcore_a-sortConstraintTable.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='sortConstraintTable.cc' object='libcore_a-sortConstraintTable.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-sortConstraintTable.o `test -f 'sortConstraintTable.cc' || echo '$(srcdir)/'`sortConstraintTable.cc libcore_a-sortConstraintTable.obj: sortConstraintTable.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-sortConstraintTable.obj -MD -MP -MF $(DEPDIR)/libcore_a-sortConstraintTable.Tpo -c -o libcore_a-sortConstraintTable.obj `if test -f 'sortConstraintTable.cc'; then $(CYGPATH_W) 'sortConstraintTable.cc'; else $(CYGPATH_W) '$(srcdir)/sortConstraintTable.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-sortConstraintTable.Tpo $(DEPDIR)/libcore_a-sortConstraintTable.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='sortConstraintTable.cc' object='libcore_a-sortConstraintTable.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-sortConstraintTable.obj `if test -f 'sortConstraintTable.cc'; then $(CYGPATH_W) 'sortConstraintTable.cc'; else $(CYGPATH_W) '$(srcdir)/sortConstraintTable.cc'; fi` libcore_a-equationTable.o: equationTable.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-equationTable.o -MD -MP -MF $(DEPDIR)/libcore_a-equationTable.Tpo -c -o libcore_a-equationTable.o `test -f 'equationTable.cc' || echo '$(srcdir)/'`equationTable.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-equationTable.Tpo $(DEPDIR)/libcore_a-equationTable.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='equationTable.cc' object='libcore_a-equationTable.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-equationTable.o `test -f 'equationTable.cc' || echo '$(srcdir)/'`equationTable.cc libcore_a-equationTable.obj: equationTable.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-equationTable.obj -MD -MP -MF $(DEPDIR)/libcore_a-equationTable.Tpo -c -o libcore_a-equationTable.obj `if test -f 'equationTable.cc'; then $(CYGPATH_W) 'equationTable.cc'; else $(CYGPATH_W) '$(srcdir)/equationTable.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-equationTable.Tpo $(DEPDIR)/libcore_a-equationTable.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='equationTable.cc' object='libcore_a-equationTable.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-equationTable.obj `if test -f 'equationTable.cc'; then $(CYGPATH_W) 'equationTable.cc'; else $(CYGPATH_W) '$(srcdir)/equationTable.cc'; fi` libcore_a-ruleTable.o: ruleTable.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-ruleTable.o -MD -MP -MF $(DEPDIR)/libcore_a-ruleTable.Tpo -c -o libcore_a-ruleTable.o `test -f 'ruleTable.cc' || echo '$(srcdir)/'`ruleTable.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-ruleTable.Tpo $(DEPDIR)/libcore_a-ruleTable.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ruleTable.cc' object='libcore_a-ruleTable.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-ruleTable.o `test -f 'ruleTable.cc' || echo '$(srcdir)/'`ruleTable.cc libcore_a-ruleTable.obj: ruleTable.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-ruleTable.obj -MD -MP -MF $(DEPDIR)/libcore_a-ruleTable.Tpo -c -o libcore_a-ruleTable.obj `if test -f 'ruleTable.cc'; then $(CYGPATH_W) 'ruleTable.cc'; else $(CYGPATH_W) '$(srcdir)/ruleTable.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-ruleTable.Tpo $(DEPDIR)/libcore_a-ruleTable.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ruleTable.cc' object='libcore_a-ruleTable.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-ruleTable.obj `if test -f 'ruleTable.cc'; then $(CYGPATH_W) 'ruleTable.cc'; else $(CYGPATH_W) '$(srcdir)/ruleTable.cc'; fi` libcore_a-sort.o: sort.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-sort.o -MD -MP -MF $(DEPDIR)/libcore_a-sort.Tpo -c -o libcore_a-sort.o `test -f 'sort.cc' || echo '$(srcdir)/'`sort.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-sort.Tpo $(DEPDIR)/libcore_a-sort.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='sort.cc' object='libcore_a-sort.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-sort.o `test -f 'sort.cc' || echo '$(srcdir)/'`sort.cc libcore_a-sort.obj: sort.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-sort.obj -MD -MP -MF $(DEPDIR)/libcore_a-sort.Tpo -c -o libcore_a-sort.obj `if test -f 'sort.cc'; then $(CYGPATH_W) 'sort.cc'; else $(CYGPATH_W) '$(srcdir)/sort.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-sort.Tpo $(DEPDIR)/libcore_a-sort.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='sort.cc' object='libcore_a-sort.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-sort.obj `if test -f 'sort.cc'; then $(CYGPATH_W) 'sort.cc'; else $(CYGPATH_W) '$(srcdir)/sort.cc'; fi` libcore_a-connectedComponent.o: connectedComponent.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-connectedComponent.o -MD -MP -MF $(DEPDIR)/libcore_a-connectedComponent.Tpo -c -o libcore_a-connectedComponent.o `test -f 'connectedComponent.cc' || echo '$(srcdir)/'`connectedComponent.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-connectedComponent.Tpo $(DEPDIR)/libcore_a-connectedComponent.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='connectedComponent.cc' object='libcore_a-connectedComponent.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-connectedComponent.o `test -f 'connectedComponent.cc' || echo '$(srcdir)/'`connectedComponent.cc libcore_a-connectedComponent.obj: connectedComponent.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-connectedComponent.obj -MD -MP -MF $(DEPDIR)/libcore_a-connectedComponent.Tpo -c -o libcore_a-connectedComponent.obj `if test -f 'connectedComponent.cc'; then $(CYGPATH_W) 'connectedComponent.cc'; else $(CYGPATH_W) '$(srcdir)/connectedComponent.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-connectedComponent.Tpo $(DEPDIR)/libcore_a-connectedComponent.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='connectedComponent.cc' object='libcore_a-connectedComponent.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-connectedComponent.obj `if test -f 'connectedComponent.cc'; then $(CYGPATH_W) 'connectedComponent.cc'; else $(CYGPATH_W) '$(srcdir)/connectedComponent.cc'; fi` libcore_a-module.o: module.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-module.o -MD -MP -MF $(DEPDIR)/libcore_a-module.Tpo -c -o libcore_a-module.o `test -f 'module.cc' || echo '$(srcdir)/'`module.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-module.Tpo $(DEPDIR)/libcore_a-module.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='module.cc' object='libcore_a-module.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-module.o `test -f 'module.cc' || echo '$(srcdir)/'`module.cc libcore_a-module.obj: module.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-module.obj -MD -MP -MF $(DEPDIR)/libcore_a-module.Tpo -c -o libcore_a-module.obj `if test -f 'module.cc'; then $(CYGPATH_W) 'module.cc'; else $(CYGPATH_W) '$(srcdir)/module.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-module.Tpo $(DEPDIR)/libcore_a-module.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='module.cc' object='libcore_a-module.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-module.obj `if test -f 'module.cc'; then $(CYGPATH_W) 'module.cc'; else $(CYGPATH_W) '$(srcdir)/module.cc'; fi` libcore_a-substitution.o: substitution.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-substitution.o -MD -MP -MF $(DEPDIR)/libcore_a-substitution.Tpo -c -o libcore_a-substitution.o `test -f 'substitution.cc' || echo '$(srcdir)/'`substitution.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-substitution.Tpo $(DEPDIR)/libcore_a-substitution.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='substitution.cc' object='libcore_a-substitution.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-substitution.o `test -f 'substitution.cc' || echo '$(srcdir)/'`substitution.cc libcore_a-substitution.obj: substitution.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-substitution.obj -MD -MP -MF $(DEPDIR)/libcore_a-substitution.Tpo -c -o libcore_a-substitution.obj `if test -f 'substitution.cc'; then $(CYGPATH_W) 'substitution.cc'; else $(CYGPATH_W) '$(srcdir)/substitution.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-substitution.Tpo $(DEPDIR)/libcore_a-substitution.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='substitution.cc' object='libcore_a-substitution.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-substitution.obj `if test -f 'substitution.cc'; then $(CYGPATH_W) 'substitution.cc'; else $(CYGPATH_W) '$(srcdir)/substitution.cc'; fi` libcore_a-localBinding.o: localBinding.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-localBinding.o -MD -MP -MF $(DEPDIR)/libcore_a-localBinding.Tpo -c -o libcore_a-localBinding.o `test -f 'localBinding.cc' || echo '$(srcdir)/'`localBinding.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-localBinding.Tpo $(DEPDIR)/libcore_a-localBinding.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='localBinding.cc' object='libcore_a-localBinding.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-localBinding.o `test -f 'localBinding.cc' || echo '$(srcdir)/'`localBinding.cc libcore_a-localBinding.obj: localBinding.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-localBinding.obj -MD -MP -MF $(DEPDIR)/libcore_a-localBinding.Tpo -c -o libcore_a-localBinding.obj `if test -f 'localBinding.cc'; then $(CYGPATH_W) 'localBinding.cc'; else $(CYGPATH_W) '$(srcdir)/localBinding.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-localBinding.Tpo $(DEPDIR)/libcore_a-localBinding.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='localBinding.cc' object='libcore_a-localBinding.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-localBinding.obj `if test -f 'localBinding.cc'; then $(CYGPATH_W) 'localBinding.cc'; else $(CYGPATH_W) '$(srcdir)/localBinding.cc'; fi` libcore_a-subproblemSequence.o: subproblemSequence.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-subproblemSequence.o -MD -MP -MF $(DEPDIR)/libcore_a-subproblemSequence.Tpo -c -o libcore_a-subproblemSequence.o `test -f 'subproblemSequence.cc' || echo '$(srcdir)/'`subproblemSequence.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-subproblemSequence.Tpo $(DEPDIR)/libcore_a-subproblemSequence.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='subproblemSequence.cc' object='libcore_a-subproblemSequence.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-subproblemSequence.o `test -f 'subproblemSequence.cc' || echo '$(srcdir)/'`subproblemSequence.cc libcore_a-subproblemSequence.obj: subproblemSequence.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-subproblemSequence.obj -MD -MP -MF $(DEPDIR)/libcore_a-subproblemSequence.Tpo -c -o libcore_a-subproblemSequence.obj `if test -f 'subproblemSequence.cc'; then $(CYGPATH_W) 'subproblemSequence.cc'; else $(CYGPATH_W) '$(srcdir)/subproblemSequence.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-subproblemSequence.Tpo $(DEPDIR)/libcore_a-subproblemSequence.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='subproblemSequence.cc' object='libcore_a-subproblemSequence.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-subproblemSequence.obj `if test -f 'subproblemSequence.cc'; then $(CYGPATH_W) 'subproblemSequence.cc'; else $(CYGPATH_W) '$(srcdir)/subproblemSequence.cc'; fi` libcore_a-subproblemDisjunction.o: subproblemDisjunction.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-subproblemDisjunction.o -MD -MP -MF $(DEPDIR)/libcore_a-subproblemDisjunction.Tpo -c -o libcore_a-subproblemDisjunction.o `test -f 'subproblemDisjunction.cc' || echo '$(srcdir)/'`subproblemDisjunction.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-subproblemDisjunction.Tpo $(DEPDIR)/libcore_a-subproblemDisjunction.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='subproblemDisjunction.cc' object='libcore_a-subproblemDisjunction.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-subproblemDisjunction.o `test -f 'subproblemDisjunction.cc' || echo '$(srcdir)/'`subproblemDisjunction.cc libcore_a-subproblemDisjunction.obj: subproblemDisjunction.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-subproblemDisjunction.obj -MD -MP -MF $(DEPDIR)/libcore_a-subproblemDisjunction.Tpo -c -o libcore_a-subproblemDisjunction.obj `if test -f 'subproblemDisjunction.cc'; then $(CYGPATH_W) 'subproblemDisjunction.cc'; else $(CYGPATH_W) '$(srcdir)/subproblemDisjunction.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-subproblemDisjunction.Tpo $(DEPDIR)/libcore_a-subproblemDisjunction.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='subproblemDisjunction.cc' object='libcore_a-subproblemDisjunction.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-subproblemDisjunction.obj `if test -f 'subproblemDisjunction.cc'; then $(CYGPATH_W) 'subproblemDisjunction.cc'; else $(CYGPATH_W) '$(srcdir)/subproblemDisjunction.cc'; fi` libcore_a-sortCheckSubproblem.o: sortCheckSubproblem.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-sortCheckSubproblem.o -MD -MP -MF $(DEPDIR)/libcore_a-sortCheckSubproblem.Tpo -c -o libcore_a-sortCheckSubproblem.o `test -f 'sortCheckSubproblem.cc' || echo '$(srcdir)/'`sortCheckSubproblem.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-sortCheckSubproblem.Tpo $(DEPDIR)/libcore_a-sortCheckSubproblem.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='sortCheckSubproblem.cc' object='libcore_a-sortCheckSubproblem.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-sortCheckSubproblem.o `test -f 'sortCheckSubproblem.cc' || echo '$(srcdir)/'`sortCheckSubproblem.cc libcore_a-sortCheckSubproblem.obj: sortCheckSubproblem.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-sortCheckSubproblem.obj -MD -MP -MF $(DEPDIR)/libcore_a-sortCheckSubproblem.Tpo -c -o libcore_a-sortCheckSubproblem.obj `if test -f 'sortCheckSubproblem.cc'; then $(CYGPATH_W) 'sortCheckSubproblem.cc'; else $(CYGPATH_W) '$(srcdir)/sortCheckSubproblem.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-sortCheckSubproblem.Tpo $(DEPDIR)/libcore_a-sortCheckSubproblem.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='sortCheckSubproblem.cc' object='libcore_a-sortCheckSubproblem.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-sortCheckSubproblem.obj `if test -f 'sortCheckSubproblem.cc'; then $(CYGPATH_W) 'sortCheckSubproblem.cc'; else $(CYGPATH_W) '$(srcdir)/sortCheckSubproblem.cc'; fi` libcore_a-disjunctiveSubproblemAccumulator.o: disjunctiveSubproblemAccumulator.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-disjunctiveSubproblemAccumulator.o -MD -MP -MF $(DEPDIR)/libcore_a-disjunctiveSubproblemAccumulator.Tpo -c -o libcore_a-disjunctiveSubproblemAccumulator.o `test -f 'disjunctiveSubproblemAccumulator.cc' || echo '$(srcdir)/'`disjunctiveSubproblemAccumulator.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-disjunctiveSubproblemAccumulator.Tpo $(DEPDIR)/libcore_a-disjunctiveSubproblemAccumulator.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='disjunctiveSubproblemAccumulator.cc' object='libcore_a-disjunctiveSubproblemAccumulator.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-disjunctiveSubproblemAccumulator.o `test -f 'disjunctiveSubproblemAccumulator.cc' || echo '$(srcdir)/'`disjunctiveSubproblemAccumulator.cc libcore_a-disjunctiveSubproblemAccumulator.obj: disjunctiveSubproblemAccumulator.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-disjunctiveSubproblemAccumulator.obj -MD -MP -MF $(DEPDIR)/libcore_a-disjunctiveSubproblemAccumulator.Tpo -c -o libcore_a-disjunctiveSubproblemAccumulator.obj `if test -f 'disjunctiveSubproblemAccumulator.cc'; then $(CYGPATH_W) 'disjunctiveSubproblemAccumulator.cc'; else $(CYGPATH_W) '$(srcdir)/disjunctiveSubproblemAccumulator.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-disjunctiveSubproblemAccumulator.Tpo $(DEPDIR)/libcore_a-disjunctiveSubproblemAccumulator.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='disjunctiveSubproblemAccumulator.cc' object='libcore_a-disjunctiveSubproblemAccumulator.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-disjunctiveSubproblemAccumulator.obj `if test -f 'disjunctiveSubproblemAccumulator.cc'; then $(CYGPATH_W) 'disjunctiveSubproblemAccumulator.cc'; else $(CYGPATH_W) '$(srcdir)/disjunctiveSubproblemAccumulator.cc'; fi` libcore_a-preEquation.o: preEquation.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-preEquation.o -MD -MP -MF $(DEPDIR)/libcore_a-preEquation.Tpo -c -o libcore_a-preEquation.o `test -f 'preEquation.cc' || echo '$(srcdir)/'`preEquation.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-preEquation.Tpo $(DEPDIR)/libcore_a-preEquation.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='preEquation.cc' object='libcore_a-preEquation.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-preEquation.o `test -f 'preEquation.cc' || echo '$(srcdir)/'`preEquation.cc libcore_a-preEquation.obj: preEquation.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-preEquation.obj -MD -MP -MF $(DEPDIR)/libcore_a-preEquation.Tpo -c -o libcore_a-preEquation.obj `if test -f 'preEquation.cc'; then $(CYGPATH_W) 'preEquation.cc'; else $(CYGPATH_W) '$(srcdir)/preEquation.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-preEquation.Tpo $(DEPDIR)/libcore_a-preEquation.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='preEquation.cc' object='libcore_a-preEquation.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-preEquation.obj `if test -f 'preEquation.cc'; then $(CYGPATH_W) 'preEquation.cc'; else $(CYGPATH_W) '$(srcdir)/preEquation.cc'; fi` libcore_a-equation.o: equation.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-equation.o -MD -MP -MF $(DEPDIR)/libcore_a-equation.Tpo -c -o libcore_a-equation.o `test -f 'equation.cc' || echo '$(srcdir)/'`equation.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-equation.Tpo $(DEPDIR)/libcore_a-equation.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='equation.cc' object='libcore_a-equation.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-equation.o `test -f 'equation.cc' || echo '$(srcdir)/'`equation.cc libcore_a-equation.obj: equation.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-equation.obj -MD -MP -MF $(DEPDIR)/libcore_a-equation.Tpo -c -o libcore_a-equation.obj `if test -f 'equation.cc'; then $(CYGPATH_W) 'equation.cc'; else $(CYGPATH_W) '$(srcdir)/equation.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-equation.Tpo $(DEPDIR)/libcore_a-equation.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='equation.cc' object='libcore_a-equation.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-equation.obj `if test -f 'equation.cc'; then $(CYGPATH_W) 'equation.cc'; else $(CYGPATH_W) '$(srcdir)/equation.cc'; fi` libcore_a-rule.o: rule.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-rule.o -MD -MP -MF $(DEPDIR)/libcore_a-rule.Tpo -c -o libcore_a-rule.o `test -f 'rule.cc' || echo '$(srcdir)/'`rule.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-rule.Tpo $(DEPDIR)/libcore_a-rule.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rule.cc' object='libcore_a-rule.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-rule.o `test -f 'rule.cc' || echo '$(srcdir)/'`rule.cc libcore_a-rule.obj: rule.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-rule.obj -MD -MP -MF $(DEPDIR)/libcore_a-rule.Tpo -c -o libcore_a-rule.obj `if test -f 'rule.cc'; then $(CYGPATH_W) 'rule.cc'; else $(CYGPATH_W) '$(srcdir)/rule.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-rule.Tpo $(DEPDIR)/libcore_a-rule.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rule.cc' object='libcore_a-rule.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-rule.obj `if test -f 'rule.cc'; then $(CYGPATH_W) 'rule.cc'; else $(CYGPATH_W) '$(srcdir)/rule.cc'; fi` libcore_a-sortConstraint.o: sortConstraint.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-sortConstraint.o -MD -MP -MF $(DEPDIR)/libcore_a-sortConstraint.Tpo -c -o libcore_a-sortConstraint.o `test -f 'sortConstraint.cc' || echo '$(srcdir)/'`sortConstraint.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-sortConstraint.Tpo $(DEPDIR)/libcore_a-sortConstraint.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='sortConstraint.cc' object='libcore_a-sortConstraint.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-sortConstraint.o `test -f 'sortConstraint.cc' || echo '$(srcdir)/'`sortConstraint.cc libcore_a-sortConstraint.obj: sortConstraint.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-sortConstraint.obj -MD -MP -MF $(DEPDIR)/libcore_a-sortConstraint.Tpo -c -o libcore_a-sortConstraint.obj `if test -f 'sortConstraint.cc'; then $(CYGPATH_W) 'sortConstraint.cc'; else $(CYGPATH_W) '$(srcdir)/sortConstraint.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-sortConstraint.Tpo $(DEPDIR)/libcore_a-sortConstraint.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='sortConstraint.cc' object='libcore_a-sortConstraint.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-sortConstraint.obj `if test -f 'sortConstraint.cc'; then $(CYGPATH_W) 'sortConstraint.cc'; else $(CYGPATH_W) '$(srcdir)/sortConstraint.cc'; fi` libcore_a-rewritingContext.o: rewritingContext.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-rewritingContext.o -MD -MP -MF $(DEPDIR)/libcore_a-rewritingContext.Tpo -c -o libcore_a-rewritingContext.o `test -f 'rewritingContext.cc' || echo '$(srcdir)/'`rewritingContext.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-rewritingContext.Tpo $(DEPDIR)/libcore_a-rewritingContext.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rewritingContext.cc' object='libcore_a-rewritingContext.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-rewritingContext.o `test -f 'rewritingContext.cc' || echo '$(srcdir)/'`rewritingContext.cc libcore_a-rewritingContext.obj: rewritingContext.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-rewritingContext.obj -MD -MP -MF $(DEPDIR)/libcore_a-rewritingContext.Tpo -c -o libcore_a-rewritingContext.obj `if test -f 'rewritingContext.cc'; then $(CYGPATH_W) 'rewritingContext.cc'; else $(CYGPATH_W) '$(srcdir)/rewritingContext.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-rewritingContext.Tpo $(DEPDIR)/libcore_a-rewritingContext.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rewritingContext.cc' object='libcore_a-rewritingContext.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-rewritingContext.obj `if test -f 'rewritingContext.cc'; then $(CYGPATH_W) 'rewritingContext.cc'; else $(CYGPATH_W) '$(srcdir)/rewritingContext.cc'; fi` libcore_a-variableAbstractionSubproblem.o: variableAbstractionSubproblem.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-variableAbstractionSubproblem.o -MD -MP -MF $(DEPDIR)/libcore_a-variableAbstractionSubproblem.Tpo -c -o libcore_a-variableAbstractionSubproblem.o `test -f 'variableAbstractionSubproblem.cc' || echo '$(srcdir)/'`variableAbstractionSubproblem.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-variableAbstractionSubproblem.Tpo $(DEPDIR)/libcore_a-variableAbstractionSubproblem.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='variableAbstractionSubproblem.cc' object='libcore_a-variableAbstractionSubproblem.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-variableAbstractionSubproblem.o `test -f 'variableAbstractionSubproblem.cc' || echo '$(srcdir)/'`variableAbstractionSubproblem.cc libcore_a-variableAbstractionSubproblem.obj: variableAbstractionSubproblem.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-variableAbstractionSubproblem.obj -MD -MP -MF $(DEPDIR)/libcore_a-variableAbstractionSubproblem.Tpo -c -o libcore_a-variableAbstractionSubproblem.obj `if test -f 'variableAbstractionSubproblem.cc'; then $(CYGPATH_W) 'variableAbstractionSubproblem.cc'; else $(CYGPATH_W) '$(srcdir)/variableAbstractionSubproblem.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-variableAbstractionSubproblem.Tpo $(DEPDIR)/libcore_a-variableAbstractionSubproblem.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='variableAbstractionSubproblem.cc' object='libcore_a-variableAbstractionSubproblem.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-variableAbstractionSubproblem.obj `if test -f 'variableAbstractionSubproblem.cc'; then $(CYGPATH_W) 'variableAbstractionSubproblem.cc'; else $(CYGPATH_W) '$(srcdir)/variableAbstractionSubproblem.cc'; fi` libcore_a-equalitySubproblem.o: equalitySubproblem.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-equalitySubproblem.o -MD -MP -MF $(DEPDIR)/libcore_a-equalitySubproblem.Tpo -c -o libcore_a-equalitySubproblem.o `test -f 'equalitySubproblem.cc' || echo '$(srcdir)/'`equalitySubproblem.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-equalitySubproblem.Tpo $(DEPDIR)/libcore_a-equalitySubproblem.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='equalitySubproblem.cc' object='libcore_a-equalitySubproblem.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-equalitySubproblem.o `test -f 'equalitySubproblem.cc' || echo '$(srcdir)/'`equalitySubproblem.cc libcore_a-equalitySubproblem.obj: equalitySubproblem.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-equalitySubproblem.obj -MD -MP -MF $(DEPDIR)/libcore_a-equalitySubproblem.Tpo -c -o libcore_a-equalitySubproblem.obj `if test -f 'equalitySubproblem.cc'; then $(CYGPATH_W) 'equalitySubproblem.cc'; else $(CYGPATH_W) '$(srcdir)/equalitySubproblem.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-equalitySubproblem.Tpo $(DEPDIR)/libcore_a-equalitySubproblem.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='equalitySubproblem.cc' object='libcore_a-equalitySubproblem.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-equalitySubproblem.obj `if test -f 'equalitySubproblem.cc'; then $(CYGPATH_W) 'equalitySubproblem.cc'; else $(CYGPATH_W) '$(srcdir)/equalitySubproblem.cc'; fi` libcore_a-dagRoot.o: dagRoot.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-dagRoot.o -MD -MP -MF $(DEPDIR)/libcore_a-dagRoot.Tpo -c -o libcore_a-dagRoot.o `test -f 'dagRoot.cc' || echo '$(srcdir)/'`dagRoot.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-dagRoot.Tpo $(DEPDIR)/libcore_a-dagRoot.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dagRoot.cc' object='libcore_a-dagRoot.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-dagRoot.o `test -f 'dagRoot.cc' || echo '$(srcdir)/'`dagRoot.cc libcore_a-dagRoot.obj: dagRoot.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-dagRoot.obj -MD -MP -MF $(DEPDIR)/libcore_a-dagRoot.Tpo -c -o libcore_a-dagRoot.obj `if test -f 'dagRoot.cc'; then $(CYGPATH_W) 'dagRoot.cc'; else $(CYGPATH_W) '$(srcdir)/dagRoot.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-dagRoot.Tpo $(DEPDIR)/libcore_a-dagRoot.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dagRoot.cc' object='libcore_a-dagRoot.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-dagRoot.obj `if test -f 'dagRoot.cc'; then $(CYGPATH_W) 'dagRoot.cc'; else $(CYGPATH_W) '$(srcdir)/dagRoot.cc'; fi` libcore_a-cachedDag.o: cachedDag.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-cachedDag.o -MD -MP -MF $(DEPDIR)/libcore_a-cachedDag.Tpo -c -o libcore_a-cachedDag.o `test -f 'cachedDag.cc' || echo '$(srcdir)/'`cachedDag.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-cachedDag.Tpo $(DEPDIR)/libcore_a-cachedDag.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cachedDag.cc' object='libcore_a-cachedDag.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-cachedDag.o `test -f 'cachedDag.cc' || echo '$(srcdir)/'`cachedDag.cc libcore_a-cachedDag.obj: cachedDag.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-cachedDag.obj -MD -MP -MF $(DEPDIR)/libcore_a-cachedDag.Tpo -c -o libcore_a-cachedDag.obj `if test -f 'cachedDag.cc'; then $(CYGPATH_W) 'cachedDag.cc'; else $(CYGPATH_W) '$(srcdir)/cachedDag.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-cachedDag.Tpo $(DEPDIR)/libcore_a-cachedDag.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='cachedDag.cc' object='libcore_a-cachedDag.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-cachedDag.obj `if test -f 'cachedDag.cc'; then $(CYGPATH_W) 'cachedDag.cc'; else $(CYGPATH_W) '$(srcdir)/cachedDag.cc'; fi` libcore_a-extensionMatchSubproblem.o: extensionMatchSubproblem.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-extensionMatchSubproblem.o -MD -MP -MF $(DEPDIR)/libcore_a-extensionMatchSubproblem.Tpo -c -o libcore_a-extensionMatchSubproblem.o `test -f 'extensionMatchSubproblem.cc' || echo '$(srcdir)/'`extensionMatchSubproblem.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-extensionMatchSubproblem.Tpo $(DEPDIR)/libcore_a-extensionMatchSubproblem.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='extensionMatchSubproblem.cc' object='libcore_a-extensionMatchSubproblem.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-extensionMatchSubproblem.o `test -f 'extensionMatchSubproblem.cc' || echo '$(srcdir)/'`extensionMatchSubproblem.cc libcore_a-extensionMatchSubproblem.obj: extensionMatchSubproblem.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-extensionMatchSubproblem.obj -MD -MP -MF $(DEPDIR)/libcore_a-extensionMatchSubproblem.Tpo -c -o libcore_a-extensionMatchSubproblem.obj `if test -f 'extensionMatchSubproblem.cc'; then $(CYGPATH_W) 'extensionMatchSubproblem.cc'; else $(CYGPATH_W) '$(srcdir)/extensionMatchSubproblem.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-extensionMatchSubproblem.Tpo $(DEPDIR)/libcore_a-extensionMatchSubproblem.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='extensionMatchSubproblem.cc' object='libcore_a-extensionMatchSubproblem.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-extensionMatchSubproblem.obj `if test -f 'extensionMatchSubproblem.cc'; then $(CYGPATH_W) 'extensionMatchSubproblem.cc'; else $(CYGPATH_W) '$(srcdir)/extensionMatchSubproblem.cc'; fi` libcore_a-dagNodeSet.o: dagNodeSet.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-dagNodeSet.o -MD -MP -MF $(DEPDIR)/libcore_a-dagNodeSet.Tpo -c -o libcore_a-dagNodeSet.o `test -f 'dagNodeSet.cc' || echo '$(srcdir)/'`dagNodeSet.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-dagNodeSet.Tpo $(DEPDIR)/libcore_a-dagNodeSet.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dagNodeSet.cc' object='libcore_a-dagNodeSet.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-dagNodeSet.o `test -f 'dagNodeSet.cc' || echo '$(srcdir)/'`dagNodeSet.cc libcore_a-dagNodeSet.obj: dagNodeSet.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-dagNodeSet.obj -MD -MP -MF $(DEPDIR)/libcore_a-dagNodeSet.Tpo -c -o libcore_a-dagNodeSet.obj `if test -f 'dagNodeSet.cc'; then $(CYGPATH_W) 'dagNodeSet.cc'; else $(CYGPATH_W) '$(srcdir)/dagNodeSet.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-dagNodeSet.Tpo $(DEPDIR)/libcore_a-dagNodeSet.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='dagNodeSet.cc' object='libcore_a-dagNodeSet.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-dagNodeSet.obj `if test -f 'dagNodeSet.cc'; then $(CYGPATH_W) 'dagNodeSet.cc'; else $(CYGPATH_W) '$(srcdir)/dagNodeSet.cc'; fi` libcore_a-hashConsSet.o: hashConsSet.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-hashConsSet.o -MD -MP -MF $(DEPDIR)/libcore_a-hashConsSet.Tpo -c -o libcore_a-hashConsSet.o `test -f 'hashConsSet.cc' || echo '$(srcdir)/'`hashConsSet.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-hashConsSet.Tpo $(DEPDIR)/libcore_a-hashConsSet.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='hashConsSet.cc' object='libcore_a-hashConsSet.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-hashConsSet.o `test -f 'hashConsSet.cc' || echo '$(srcdir)/'`hashConsSet.cc libcore_a-hashConsSet.obj: hashConsSet.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-hashConsSet.obj -MD -MP -MF $(DEPDIR)/libcore_a-hashConsSet.Tpo -c -o libcore_a-hashConsSet.obj `if test -f 'hashConsSet.cc'; then $(CYGPATH_W) 'hashConsSet.cc'; else $(CYGPATH_W) '$(srcdir)/hashConsSet.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-hashConsSet.Tpo $(DEPDIR)/libcore_a-hashConsSet.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='hashConsSet.cc' object='libcore_a-hashConsSet.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-hashConsSet.obj `if test -f 'hashConsSet.cc'; then $(CYGPATH_W) 'hashConsSet.cc'; else $(CYGPATH_W) '$(srcdir)/hashConsSet.cc'; fi` libcore_a-memoTable.o: memoTable.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-memoTable.o -MD -MP -MF $(DEPDIR)/libcore_a-memoTable.Tpo -c -o libcore_a-memoTable.o `test -f 'memoTable.cc' || echo '$(srcdir)/'`memoTable.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-memoTable.Tpo $(DEPDIR)/libcore_a-memoTable.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='memoTable.cc' object='libcore_a-memoTable.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-memoTable.o `test -f 'memoTable.cc' || echo '$(srcdir)/'`memoTable.cc libcore_a-memoTable.obj: memoTable.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-memoTable.obj -MD -MP -MF $(DEPDIR)/libcore_a-memoTable.Tpo -c -o libcore_a-memoTable.obj `if test -f 'memoTable.cc'; then $(CYGPATH_W) 'memoTable.cc'; else $(CYGPATH_W) '$(srcdir)/memoTable.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-memoTable.Tpo $(DEPDIR)/libcore_a-memoTable.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='memoTable.cc' object='libcore_a-memoTable.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-memoTable.obj `if test -f 'memoTable.cc'; then $(CYGPATH_W) 'memoTable.cc'; else $(CYGPATH_W) '$(srcdir)/memoTable.cc'; fi` libcore_a-memoMap.o: memoMap.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-memoMap.o -MD -MP -MF $(DEPDIR)/libcore_a-memoMap.Tpo -c -o libcore_a-memoMap.o `test -f 'memoMap.cc' || echo '$(srcdir)/'`memoMap.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-memoMap.Tpo $(DEPDIR)/libcore_a-memoMap.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='memoMap.cc' object='libcore_a-memoMap.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-memoMap.o `test -f 'memoMap.cc' || echo '$(srcdir)/'`memoMap.cc libcore_a-memoMap.obj: memoMap.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-memoMap.obj -MD -MP -MF $(DEPDIR)/libcore_a-memoMap.Tpo -c -o libcore_a-memoMap.obj `if test -f 'memoMap.cc'; then $(CYGPATH_W) 'memoMap.cc'; else $(CYGPATH_W) '$(srcdir)/memoMap.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-memoMap.Tpo $(DEPDIR)/libcore_a-memoMap.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='memoMap.cc' object='libcore_a-memoMap.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-memoMap.obj `if test -f 'memoMap.cc'; then $(CYGPATH_W) 'memoMap.cc'; else $(CYGPATH_W) '$(srcdir)/memoMap.cc'; fi` libcore_a-rootContainer.o: rootContainer.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-rootContainer.o -MD -MP -MF $(DEPDIR)/libcore_a-rootContainer.Tpo -c -o libcore_a-rootContainer.o `test -f 'rootContainer.cc' || echo '$(srcdir)/'`rootContainer.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-rootContainer.Tpo $(DEPDIR)/libcore_a-rootContainer.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rootContainer.cc' object='libcore_a-rootContainer.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-rootContainer.o `test -f 'rootContainer.cc' || echo '$(srcdir)/'`rootContainer.cc libcore_a-rootContainer.obj: rootContainer.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-rootContainer.obj -MD -MP -MF $(DEPDIR)/libcore_a-rootContainer.Tpo -c -o libcore_a-rootContainer.obj `if test -f 'rootContainer.cc'; then $(CYGPATH_W) 'rootContainer.cc'; else $(CYGPATH_W) '$(srcdir)/rootContainer.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-rootContainer.Tpo $(DEPDIR)/libcore_a-rootContainer.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rootContainer.cc' object='libcore_a-rootContainer.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-rootContainer.obj `if test -f 'rootContainer.cc'; then $(CYGPATH_W) 'rootContainer.cc'; else $(CYGPATH_W) '$(srcdir)/rootContainer.cc'; fi` libcore_a-sortBdds.o: sortBdds.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-sortBdds.o -MD -MP -MF $(DEPDIR)/libcore_a-sortBdds.Tpo -c -o libcore_a-sortBdds.o `test -f 'sortBdds.cc' || echo '$(srcdir)/'`sortBdds.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-sortBdds.Tpo $(DEPDIR)/libcore_a-sortBdds.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='sortBdds.cc' object='libcore_a-sortBdds.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-sortBdds.o `test -f 'sortBdds.cc' || echo '$(srcdir)/'`sortBdds.cc libcore_a-sortBdds.obj: sortBdds.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-sortBdds.obj -MD -MP -MF $(DEPDIR)/libcore_a-sortBdds.Tpo -c -o libcore_a-sortBdds.obj `if test -f 'sortBdds.cc'; then $(CYGPATH_W) 'sortBdds.cc'; else $(CYGPATH_W) '$(srcdir)/sortBdds.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-sortBdds.Tpo $(DEPDIR)/libcore_a-sortBdds.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='sortBdds.cc' object='libcore_a-sortBdds.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-sortBdds.obj `if test -f 'sortBdds.cc'; then $(CYGPATH_W) 'sortBdds.cc'; else $(CYGPATH_W) '$(srcdir)/sortBdds.cc'; fi` libcore_a-unificationContext.o: unificationContext.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-unificationContext.o -MD -MP -MF $(DEPDIR)/libcore_a-unificationContext.Tpo -c -o libcore_a-unificationContext.o `test -f 'unificationContext.cc' || echo '$(srcdir)/'`unificationContext.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-unificationContext.Tpo $(DEPDIR)/libcore_a-unificationContext.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='unificationContext.cc' object='libcore_a-unificationContext.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-unificationContext.o `test -f 'unificationContext.cc' || echo '$(srcdir)/'`unificationContext.cc libcore_a-unificationContext.obj: unificationContext.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-unificationContext.obj -MD -MP -MF $(DEPDIR)/libcore_a-unificationContext.Tpo -c -o libcore_a-unificationContext.obj `if test -f 'unificationContext.cc'; then $(CYGPATH_W) 'unificationContext.cc'; else $(CYGPATH_W) '$(srcdir)/unificationContext.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-unificationContext.Tpo $(DEPDIR)/libcore_a-unificationContext.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='unificationContext.cc' object='libcore_a-unificationContext.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-unificationContext.obj `if test -f 'unificationContext.cc'; then $(CYGPATH_W) 'unificationContext.cc'; else $(CYGPATH_W) '$(srcdir)/unificationContext.cc'; fi` libcore_a-protectedDagNodeSet.o: protectedDagNodeSet.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-protectedDagNodeSet.o -MD -MP -MF $(DEPDIR)/libcore_a-protectedDagNodeSet.Tpo -c -o libcore_a-protectedDagNodeSet.o `test -f 'protectedDagNodeSet.cc' || echo '$(srcdir)/'`protectedDagNodeSet.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-protectedDagNodeSet.Tpo $(DEPDIR)/libcore_a-protectedDagNodeSet.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='protectedDagNodeSet.cc' object='libcore_a-protectedDagNodeSet.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-protectedDagNodeSet.o `test -f 'protectedDagNodeSet.cc' || echo '$(srcdir)/'`protectedDagNodeSet.cc libcore_a-protectedDagNodeSet.obj: protectedDagNodeSet.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-protectedDagNodeSet.obj -MD -MP -MF $(DEPDIR)/libcore_a-protectedDagNodeSet.Tpo -c -o libcore_a-protectedDagNodeSet.obj `if test -f 'protectedDagNodeSet.cc'; then $(CYGPATH_W) 'protectedDagNodeSet.cc'; else $(CYGPATH_W) '$(srcdir)/protectedDagNodeSet.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-protectedDagNodeSet.Tpo $(DEPDIR)/libcore_a-protectedDagNodeSet.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='protectedDagNodeSet.cc' object='libcore_a-protectedDagNodeSet.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-protectedDagNodeSet.obj `if test -f 'protectedDagNodeSet.cc'; then $(CYGPATH_W) 'protectedDagNodeSet.cc'; else $(CYGPATH_W) '$(srcdir)/protectedDagNodeSet.cc'; fi` libcore_a-pendingUnificationStack.o: pendingUnificationStack.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-pendingUnificationStack.o -MD -MP -MF $(DEPDIR)/libcore_a-pendingUnificationStack.Tpo -c -o libcore_a-pendingUnificationStack.o `test -f 'pendingUnificationStack.cc' || echo '$(srcdir)/'`pendingUnificationStack.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-pendingUnificationStack.Tpo $(DEPDIR)/libcore_a-pendingUnificationStack.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='pendingUnificationStack.cc' object='libcore_a-pendingUnificationStack.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-pendingUnificationStack.o `test -f 'pendingUnificationStack.cc' || echo '$(srcdir)/'`pendingUnificationStack.cc libcore_a-pendingUnificationStack.obj: pendingUnificationStack.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-pendingUnificationStack.obj -MD -MP -MF $(DEPDIR)/libcore_a-pendingUnificationStack.Tpo -c -o libcore_a-pendingUnificationStack.obj `if test -f 'pendingUnificationStack.cc'; then $(CYGPATH_W) 'pendingUnificationStack.cc'; else $(CYGPATH_W) '$(srcdir)/pendingUnificationStack.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-pendingUnificationStack.Tpo $(DEPDIR)/libcore_a-pendingUnificationStack.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='pendingUnificationStack.cc' object='libcore_a-pendingUnificationStack.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-pendingUnificationStack.obj `if test -f 'pendingUnificationStack.cc'; then $(CYGPATH_W) 'pendingUnificationStack.cc'; else $(CYGPATH_W) '$(srcdir)/pendingUnificationStack.cc'; fi` libcore_a-unificationSubproblemDisjunction.o: unificationSubproblemDisjunction.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-unificationSubproblemDisjunction.o -MD -MP -MF $(DEPDIR)/libcore_a-unificationSubproblemDisjunction.Tpo -c -o libcore_a-unificationSubproblemDisjunction.o `test -f 'unificationSubproblemDisjunction.cc' || echo '$(srcdir)/'`unificationSubproblemDisjunction.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-unificationSubproblemDisjunction.Tpo $(DEPDIR)/libcore_a-unificationSubproblemDisjunction.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='unificationSubproblemDisjunction.cc' object='libcore_a-unificationSubproblemDisjunction.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-unificationSubproblemDisjunction.o `test -f 'unificationSubproblemDisjunction.cc' || echo '$(srcdir)/'`unificationSubproblemDisjunction.cc libcore_a-unificationSubproblemDisjunction.obj: unificationSubproblemDisjunction.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-unificationSubproblemDisjunction.obj -MD -MP -MF $(DEPDIR)/libcore_a-unificationSubproblemDisjunction.Tpo -c -o libcore_a-unificationSubproblemDisjunction.obj `if test -f 'unificationSubproblemDisjunction.cc'; then $(CYGPATH_W) 'unificationSubproblemDisjunction.cc'; else $(CYGPATH_W) '$(srcdir)/unificationSubproblemDisjunction.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-unificationSubproblemDisjunction.Tpo $(DEPDIR)/libcore_a-unificationSubproblemDisjunction.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='unificationSubproblemDisjunction.cc' object='libcore_a-unificationSubproblemDisjunction.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-unificationSubproblemDisjunction.obj `if test -f 'unificationSubproblemDisjunction.cc'; then $(CYGPATH_W) 'unificationSubproblemDisjunction.cc'; else $(CYGPATH_W) '$(srcdir)/unificationSubproblemDisjunction.cc'; fi` libcore_a-compoundCycleSubproblem.o: compoundCycleSubproblem.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-compoundCycleSubproblem.o -MD -MP -MF $(DEPDIR)/libcore_a-compoundCycleSubproblem.Tpo -c -o libcore_a-compoundCycleSubproblem.o `test -f 'compoundCycleSubproblem.cc' || echo '$(srcdir)/'`compoundCycleSubproblem.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-compoundCycleSubproblem.Tpo $(DEPDIR)/libcore_a-compoundCycleSubproblem.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='compoundCycleSubproblem.cc' object='libcore_a-compoundCycleSubproblem.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-compoundCycleSubproblem.o `test -f 'compoundCycleSubproblem.cc' || echo '$(srcdir)/'`compoundCycleSubproblem.cc libcore_a-compoundCycleSubproblem.obj: compoundCycleSubproblem.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-compoundCycleSubproblem.obj -MD -MP -MF $(DEPDIR)/libcore_a-compoundCycleSubproblem.Tpo -c -o libcore_a-compoundCycleSubproblem.obj `if test -f 'compoundCycleSubproblem.cc'; then $(CYGPATH_W) 'compoundCycleSubproblem.cc'; else $(CYGPATH_W) '$(srcdir)/compoundCycleSubproblem.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-compoundCycleSubproblem.Tpo $(DEPDIR)/libcore_a-compoundCycleSubproblem.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='compoundCycleSubproblem.cc' object='libcore_a-compoundCycleSubproblem.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-compoundCycleSubproblem.obj `if test -f 'compoundCycleSubproblem.cc'; then $(CYGPATH_W) 'compoundCycleSubproblem.cc'; else $(CYGPATH_W) '$(srcdir)/compoundCycleSubproblem.cc'; fi` libcore_a-stackMachine.o: stackMachine.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-stackMachine.o -MD -MP -MF $(DEPDIR)/libcore_a-stackMachine.Tpo -c -o libcore_a-stackMachine.o `test -f 'stackMachine.cc' || echo '$(srcdir)/'`stackMachine.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-stackMachine.Tpo $(DEPDIR)/libcore_a-stackMachine.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='stackMachine.cc' object='libcore_a-stackMachine.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-stackMachine.o `test -f 'stackMachine.cc' || echo '$(srcdir)/'`stackMachine.cc libcore_a-stackMachine.obj: stackMachine.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-stackMachine.obj -MD -MP -MF $(DEPDIR)/libcore_a-stackMachine.Tpo -c -o libcore_a-stackMachine.obj `if test -f 'stackMachine.cc'; then $(CYGPATH_W) 'stackMachine.cc'; else $(CYGPATH_W) '$(srcdir)/stackMachine.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-stackMachine.Tpo $(DEPDIR)/libcore_a-stackMachine.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='stackMachine.cc' object='libcore_a-stackMachine.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-stackMachine.obj `if test -f 'stackMachine.cc'; then $(CYGPATH_W) 'stackMachine.cc'; else $(CYGPATH_W) '$(srcdir)/stackMachine.cc'; fi` libcore_a-stackMachineRhsCompiler.o: stackMachineRhsCompiler.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-stackMachineRhsCompiler.o -MD -MP -MF $(DEPDIR)/libcore_a-stackMachineRhsCompiler.Tpo -c -o libcore_a-stackMachineRhsCompiler.o `test -f 'stackMachineRhsCompiler.cc' || echo '$(srcdir)/'`stackMachineRhsCompiler.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-stackMachineRhsCompiler.Tpo $(DEPDIR)/libcore_a-stackMachineRhsCompiler.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='stackMachineRhsCompiler.cc' object='libcore_a-stackMachineRhsCompiler.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-stackMachineRhsCompiler.o `test -f 'stackMachineRhsCompiler.cc' || echo '$(srcdir)/'`stackMachineRhsCompiler.cc libcore_a-stackMachineRhsCompiler.obj: stackMachineRhsCompiler.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-stackMachineRhsCompiler.obj -MD -MP -MF $(DEPDIR)/libcore_a-stackMachineRhsCompiler.Tpo -c -o libcore_a-stackMachineRhsCompiler.obj `if test -f 'stackMachineRhsCompiler.cc'; then $(CYGPATH_W) 'stackMachineRhsCompiler.cc'; else $(CYGPATH_W) '$(srcdir)/stackMachineRhsCompiler.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-stackMachineRhsCompiler.Tpo $(DEPDIR)/libcore_a-stackMachineRhsCompiler.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='stackMachineRhsCompiler.cc' object='libcore_a-stackMachineRhsCompiler.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-stackMachineRhsCompiler.obj `if test -f 'stackMachineRhsCompiler.cc'; then $(CYGPATH_W) 'stackMachineRhsCompiler.cc'; else $(CYGPATH_W) '$(srcdir)/stackMachineRhsCompiler.cc'; fi` libcore_a-returnInstruction.o: returnInstruction.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-returnInstruction.o -MD -MP -MF $(DEPDIR)/libcore_a-returnInstruction.Tpo -c -o libcore_a-returnInstruction.o `test -f 'returnInstruction.cc' || echo '$(srcdir)/'`returnInstruction.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-returnInstruction.Tpo $(DEPDIR)/libcore_a-returnInstruction.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='returnInstruction.cc' object='libcore_a-returnInstruction.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-returnInstruction.o `test -f 'returnInstruction.cc' || echo '$(srcdir)/'`returnInstruction.cc libcore_a-returnInstruction.obj: returnInstruction.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-returnInstruction.obj -MD -MP -MF $(DEPDIR)/libcore_a-returnInstruction.Tpo -c -o libcore_a-returnInstruction.obj `if test -f 'returnInstruction.cc'; then $(CYGPATH_W) 'returnInstruction.cc'; else $(CYGPATH_W) '$(srcdir)/returnInstruction.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-returnInstruction.Tpo $(DEPDIR)/libcore_a-returnInstruction.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='returnInstruction.cc' object='libcore_a-returnInstruction.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-returnInstruction.obj `if test -f 'returnInstruction.cc'; then $(CYGPATH_W) 'returnInstruction.cc'; else $(CYGPATH_W) '$(srcdir)/returnInstruction.cc'; fi` libcore_a-nullInstruction.o: nullInstruction.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-nullInstruction.o -MD -MP -MF $(DEPDIR)/libcore_a-nullInstruction.Tpo -c -o libcore_a-nullInstruction.o `test -f 'nullInstruction.cc' || echo '$(srcdir)/'`nullInstruction.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-nullInstruction.Tpo $(DEPDIR)/libcore_a-nullInstruction.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='nullInstruction.cc' object='libcore_a-nullInstruction.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-nullInstruction.o `test -f 'nullInstruction.cc' || echo '$(srcdir)/'`nullInstruction.cc libcore_a-nullInstruction.obj: nullInstruction.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-nullInstruction.obj -MD -MP -MF $(DEPDIR)/libcore_a-nullInstruction.Tpo -c -o libcore_a-nullInstruction.obj `if test -f 'nullInstruction.cc'; then $(CYGPATH_W) 'nullInstruction.cc'; else $(CYGPATH_W) '$(srcdir)/nullInstruction.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-nullInstruction.Tpo $(DEPDIR)/libcore_a-nullInstruction.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='nullInstruction.cc' object='libcore_a-nullInstruction.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-nullInstruction.obj `if test -f 'nullInstruction.cc'; then $(CYGPATH_W) 'nullInstruction.cc'; else $(CYGPATH_W) '$(srcdir)/nullInstruction.cc'; fi` libcore_a-rewriteStrategy.o: rewriteStrategy.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-rewriteStrategy.o -MD -MP -MF $(DEPDIR)/libcore_a-rewriteStrategy.Tpo -c -o libcore_a-rewriteStrategy.o `test -f 'rewriteStrategy.cc' || echo '$(srcdir)/'`rewriteStrategy.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-rewriteStrategy.Tpo $(DEPDIR)/libcore_a-rewriteStrategy.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rewriteStrategy.cc' object='libcore_a-rewriteStrategy.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-rewriteStrategy.o `test -f 'rewriteStrategy.cc' || echo '$(srcdir)/'`rewriteStrategy.cc libcore_a-rewriteStrategy.obj: rewriteStrategy.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-rewriteStrategy.obj -MD -MP -MF $(DEPDIR)/libcore_a-rewriteStrategy.Tpo -c -o libcore_a-rewriteStrategy.obj `if test -f 'rewriteStrategy.cc'; then $(CYGPATH_W) 'rewriteStrategy.cc'; else $(CYGPATH_W) '$(srcdir)/rewriteStrategy.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-rewriteStrategy.Tpo $(DEPDIR)/libcore_a-rewriteStrategy.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rewriteStrategy.cc' object='libcore_a-rewriteStrategy.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-rewriteStrategy.obj `if test -f 'rewriteStrategy.cc'; then $(CYGPATH_W) 'rewriteStrategy.cc'; else $(CYGPATH_W) '$(srcdir)/rewriteStrategy.cc'; fi` libcore_a-strategyDefinition.o: strategyDefinition.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-strategyDefinition.o -MD -MP -MF $(DEPDIR)/libcore_a-strategyDefinition.Tpo -c -o libcore_a-strategyDefinition.o `test -f 'strategyDefinition.cc' || echo '$(srcdir)/'`strategyDefinition.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-strategyDefinition.Tpo $(DEPDIR)/libcore_a-strategyDefinition.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='strategyDefinition.cc' object='libcore_a-strategyDefinition.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-strategyDefinition.o `test -f 'strategyDefinition.cc' || echo '$(srcdir)/'`strategyDefinition.cc libcore_a-strategyDefinition.obj: strategyDefinition.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libcore_a-strategyDefinition.obj -MD -MP -MF $(DEPDIR)/libcore_a-strategyDefinition.Tpo -c -o libcore_a-strategyDefinition.obj `if test -f 'strategyDefinition.cc'; then $(CYGPATH_W) 'strategyDefinition.cc'; else $(CYGPATH_W) '$(srcdir)/strategyDefinition.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libcore_a-strategyDefinition.Tpo $(DEPDIR)/libcore_a-strategyDefinition.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='strategyDefinition.cc' object='libcore_a-strategyDefinition.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcore_a_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libcore_a-strategyDefinition.obj `if test -f 'strategyDefinition.cc'; then $(CYGPATH_W) 'strategyDefinition.cc'; else $(CYGPATH_W) '$(srcdir)/strategyDefinition.cc'; fi` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) $(HEADERS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/libcore_a-bindingLhsAutomaton.Po -rm -f ./$(DEPDIR)/libcore_a-cachedDag.Po -rm -f ./$(DEPDIR)/libcore_a-compoundCycleSubproblem.Po -rm -f ./$(DEPDIR)/libcore_a-connectedComponent.Po -rm -f ./$(DEPDIR)/libcore_a-copyRhsAutomaton.Po -rm -f ./$(DEPDIR)/libcore_a-dagNodeSet.Po -rm -f ./$(DEPDIR)/libcore_a-dagRoot.Po -rm -f ./$(DEPDIR)/libcore_a-disjunctiveSubproblemAccumulator.Po -rm -f ./$(DEPDIR)/libcore_a-equalitySubproblem.Po -rm -f ./$(DEPDIR)/libcore_a-equation.Po -rm -f ./$(DEPDIR)/libcore_a-equationTable.Po -rm -f ./$(DEPDIR)/libcore_a-extensionMatchSubproblem.Po -rm -f ./$(DEPDIR)/libcore_a-hashConsSet.Po -rm -f ./$(DEPDIR)/libcore_a-localBinding.Po -rm -f ./$(DEPDIR)/libcore_a-memoMap.Po -rm -f ./$(DEPDIR)/libcore_a-memoTable.Po -rm -f ./$(DEPDIR)/libcore_a-memoryCell.Po -rm -f ./$(DEPDIR)/libcore_a-module.Po -rm -f ./$(DEPDIR)/libcore_a-narrowingVariableInfo.Po -rm -f ./$(DEPDIR)/libcore_a-nullInstruction.Po -rm -f ./$(DEPDIR)/libcore_a-pendingUnificationStack.Po -rm -f ./$(DEPDIR)/libcore_a-preEquation.Po -rm -f ./$(DEPDIR)/libcore_a-protectedDagNodeSet.Po -rm -f ./$(DEPDIR)/libcore_a-returnInstruction.Po -rm -f ./$(DEPDIR)/libcore_a-rewriteStrategy.Po -rm -f ./$(DEPDIR)/libcore_a-rewritingContext.Po -rm -f ./$(DEPDIR)/libcore_a-rhsBuilder.Po -rm -f ./$(DEPDIR)/libcore_a-rootContainer.Po -rm -f ./$(DEPDIR)/libcore_a-rule.Po -rm -f ./$(DEPDIR)/libcore_a-ruleTable.Po -rm -f ./$(DEPDIR)/libcore_a-sort.Po -rm -f ./$(DEPDIR)/libcore_a-sortBdds.Po -rm -f ./$(DEPDIR)/libcore_a-sortCheckSubproblem.Po -rm -f ./$(DEPDIR)/libcore_a-sortConstraint.Po -rm -f ./$(DEPDIR)/libcore_a-sortConstraintTable.Po -rm -f ./$(DEPDIR)/libcore_a-sortTable.Po -rm -f ./$(DEPDIR)/libcore_a-stackMachine.Po -rm -f ./$(DEPDIR)/libcore_a-stackMachineRhsCompiler.Po -rm -f ./$(DEPDIR)/libcore_a-strategy.Po -rm -f ./$(DEPDIR)/libcore_a-strategyDefinition.Po -rm -f ./$(DEPDIR)/libcore_a-subproblemDisjunction.Po -rm -f ./$(DEPDIR)/libcore_a-subproblemSequence.Po -rm -f ./$(DEPDIR)/libcore_a-substitution.Po -rm -f ./$(DEPDIR)/libcore_a-termBag.Po -rm -f ./$(DEPDIR)/libcore_a-termSet.Po -rm -f ./$(DEPDIR)/libcore_a-trivialRhsAutomaton.Po -rm -f ./$(DEPDIR)/libcore_a-unificationContext.Po -rm -f ./$(DEPDIR)/libcore_a-unificationSubproblemDisjunction.Po -rm -f ./$(DEPDIR)/libcore_a-variableAbstractionSubproblem.Po -rm -f ./$(DEPDIR)/libcore_a-variableInfo.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/libcore_a-bindingLhsAutomaton.Po -rm -f ./$(DEPDIR)/libcore_a-cachedDag.Po -rm -f ./$(DEPDIR)/libcore_a-compoundCycleSubproblem.Po -rm -f ./$(DEPDIR)/libcore_a-connectedComponent.Po -rm -f ./$(DEPDIR)/libcore_a-copyRhsAutomaton.Po -rm -f ./$(DEPDIR)/libcore_a-dagNodeSet.Po -rm -f ./$(DEPDIR)/libcore_a-dagRoot.Po -rm -f ./$(DEPDIR)/libcore_a-disjunctiveSubproblemAccumulator.Po -rm -f ./$(DEPDIR)/libcore_a-equalitySubproblem.Po -rm -f ./$(DEPDIR)/libcore_a-equation.Po -rm -f ./$(DEPDIR)/libcore_a-equationTable.Po -rm -f ./$(DEPDIR)/libcore_a-extensionMatchSubproblem.Po -rm -f ./$(DEPDIR)/libcore_a-hashConsSet.Po -rm -f ./$(DEPDIR)/libcore_a-localBinding.Po -rm -f ./$(DEPDIR)/libcore_a-memoMap.Po -rm -f ./$(DEPDIR)/libcore_a-memoTable.Po -rm -f ./$(DEPDIR)/libcore_a-memoryCell.Po -rm -f ./$(DEPDIR)/libcore_a-module.Po -rm -f ./$(DEPDIR)/libcore_a-narrowingVariableInfo.Po -rm -f ./$(DEPDIR)/libcore_a-nullInstruction.Po -rm -f ./$(DEPDIR)/libcore_a-pendingUnificationStack.Po -rm -f ./$(DEPDIR)/libcore_a-preEquation.Po -rm -f ./$(DEPDIR)/libcore_a-protectedDagNodeSet.Po -rm -f ./$(DEPDIR)/libcore_a-returnInstruction.Po -rm -f ./$(DEPDIR)/libcore_a-rewriteStrategy.Po -rm -f ./$(DEPDIR)/libcore_a-rewritingContext.Po -rm -f ./$(DEPDIR)/libcore_a-rhsBuilder.Po -rm -f ./$(DEPDIR)/libcore_a-rootContainer.Po -rm -f ./$(DEPDIR)/libcore_a-rule.Po -rm -f ./$(DEPDIR)/libcore_a-ruleTable.Po -rm -f ./$(DEPDIR)/libcore_a-sort.Po -rm -f ./$(DEPDIR)/libcore_a-sortBdds.Po -rm -f ./$(DEPDIR)/libcore_a-sortCheckSubproblem.Po -rm -f ./$(DEPDIR)/libcore_a-sortConstraint.Po -rm -f ./$(DEPDIR)/libcore_a-sortConstraintTable.Po -rm -f ./$(DEPDIR)/libcore_a-sortTable.Po -rm -f ./$(DEPDIR)/libcore_a-stackMachine.Po -rm -f ./$(DEPDIR)/libcore_a-stackMachineRhsCompiler.Po -rm -f ./$(DEPDIR)/libcore_a-strategy.Po -rm -f ./$(DEPDIR)/libcore_a-strategyDefinition.Po -rm -f ./$(DEPDIR)/libcore_a-subproblemDisjunction.Po -rm -f ./$(DEPDIR)/libcore_a-subproblemSequence.Po -rm -f ./$(DEPDIR)/libcore_a-substitution.Po -rm -f ./$(DEPDIR)/libcore_a-termBag.Po -rm -f ./$(DEPDIR)/libcore_a-termSet.Po -rm -f ./$(DEPDIR)/libcore_a-trivialRhsAutomaton.Po -rm -f ./$(DEPDIR)/libcore_a-unificationContext.Po -rm -f ./$(DEPDIR)/libcore_a-unificationSubproblemDisjunction.Po -rm -f ./$(DEPDIR)/libcore_a-variableAbstractionSubproblem.Po -rm -f ./$(DEPDIR)/libcore_a-variableInfo.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-noinstLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: Maude-Maude3.2/src/Core/argVec.hh000066400000000000000000000140621420036611000165700ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for garbage collected argument vectors. // // For efficiency we assume that the parameter class T is very simple: // (1) no constructor; // (2) no destructor; // (3) can be copied efficiently and correctly by assignment operator. // // Resizing ArgVecs is expensive so correct length should be supplied // to constructor (there is no default constructor). // // Typically T will be a DagNode* or a small struct containing a DagNode* // and other simple data types (ints, ptrs). // // Garbage collection sweep phase invalidates all ArgVec objects that // have not had their evacuate() member function called during the mark phase. // Calling evacuate() invalidates all pointers/references/interators // into the ArgVec. // #ifndef _argVec_hh_ #define _argVec_hh_ #include "dagNode.hh" template class ArgVec { public: typedef T value_type; typedef value_type* pointer; typedef const value_type* const_pointer; typedef value_type& reference; typedef const value_type& const_reference; typedef size_t size_type; typedef ptrdiff_t difference_type; #ifdef NO_ASSERT typedef pointer iterator; typedef const_pointer const_iterator; #else class iterator; friend class iterator; class const_iterator; friend class const_iterator; #endif ArgVec(size_type length); iterator begin(); iterator end(); const_iterator begin() const; const_iterator end() const; const_reference operator[](size_type i) const; // access for reading reference operator[](size_type i); // access for writing void expandBy(size_type extra); void resizeWithoutPreservation(size_type newSize); void contractTo(size_type length); size_type size() const; int length() const; void swap(ArgVec& other); // // Move contents of ArgVec to a safe place during mark phase. // Invalidates all pointers/references/interators into ArgVec. // void evacuate(); private: size_type len; // number of objects in ArgVec size_t allocatedBytes; // space allocated in bytes pointer basePtr; }; template inline ArgVec::ArgVec(size_type length) { Assert(length >= 0, "-ve length"); len = length; allocatedBytes = length * sizeof(T); basePtr = static_cast(MemoryCell::allocateStorage(allocatedBytes)); } #ifdef NO_ASSERT // // Fast, with no runtime checking. // template inline typename ArgVec::iterator ArgVec::begin() { return basePtr; } template inline typename ArgVec::iterator ArgVec::end() { return basePtr + len; } template inline typename ArgVec::const_iterator ArgVec::begin() const { return basePtr; } template inline typename ArgVec::const_iterator ArgVec::end() const { return basePtr + len; } #else // // Slow, with extensive runtime checking. // #include template inline typename ArgVec::iterator ArgVec::begin() { return iterator(this, 0); } template inline typename ArgVec::iterator ArgVec::end() { return iterator(this, len); } #include template inline typename ArgVec::const_iterator ArgVec::begin() const { return const_iterator(this, 0); } template inline typename ArgVec::const_iterator ArgVec::end() const { return const_iterator(this, len); } #endif template inline typename ArgVec::const_reference ArgVec::operator[](size_type i) const { Assert(i < len, "index too big"); return basePtr[i]; } template inline typename ArgVec::reference ArgVec::operator[](size_type i) { Assert(i < len, "index too big"); return basePtr[i]; } template inline void ArgVec::expandBy(size_type extra) { size_type oldLen = len; len += extra; size_t neededBytes = len * sizeof(T); if (neededBytes > allocatedBytes) { pointer oldBasePtr = basePtr; basePtr = static_cast(MemoryCell::allocateStorage(neededBytes)); for (pointer n = basePtr; oldLen != 0; oldLen--) *n++ = *oldBasePtr++; allocatedBytes = neededBytes; } } template inline void ArgVec::resizeWithoutPreservation(size_type newSize) { // // Fast but original contents of ArgVec are lost. // len = newSize; size_t neededBytes = newSize * sizeof(T); if (neededBytes > allocatedBytes) { basePtr = static_cast(MemoryCell::allocateStorage(neededBytes)); allocatedBytes = neededBytes; } } template inline void ArgVec::evacuate() { size_type l = len; allocatedBytes = l * sizeof(T); pointer v = basePtr; basePtr = static_cast(MemoryCell::allocateStorage(allocatedBytes)); for (pointer n = basePtr; l != 0; l--) *n++ = *v++; } template inline void ArgVec::contractTo(size_type length) { Assert(length <= len, "new length > old length"); len = length; } template inline typename ArgVec::size_type ArgVec::size() const { return len; } template inline int ArgVec::length() const { return len; } template inline void ArgVec::swap(ArgVec& other) { int t = len; len = other.len; other.len = t; t = allocatedBytes; allocatedBytes = other.allocatedBytes; other.allocatedBytes = t; pointer p = basePtr; basePtr = other.basePtr; other.basePtr = p; } #endif Maude-Maude3.2/src/Core/argumentIterator.hh000066400000000000000000000032131420036611000207110ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Wrapper around raw argument iterators to provide cleaner interface // #ifndef _argumentIterator_hh_ #define _argumentIterator_hh_ #include "rawArgumentIterator.hh" class ArgumentIterator { public: ArgumentIterator(Term& t); ~ArgumentIterator(); bool valid() const; Term* argument() const; void next(); private: RawArgumentIterator* argumentIterator; }; inline ArgumentIterator::ArgumentIterator(Term& t) { argumentIterator = t.arguments(); } inline ArgumentIterator::~ArgumentIterator() { delete argumentIterator; } inline bool ArgumentIterator::valid() const { return (argumentIterator != 0) && argumentIterator->valid(); } inline Term* ArgumentIterator::argument() const { return argumentIterator->argument(); } inline void ArgumentIterator::next() { argumentIterator->next(); } #endif Maude-Maude3.2/src/Core/badFlag.hh000066400000000000000000000025001420036611000166730ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for flag indicating that an object is in a bad (unusable) state. // // Badness is permanent. Remaining flags are available to derived classes. // #ifndef _badFlag_hh_ #define _badFlag_hh_ #include "flagSet.hh" class BadFlag : public FlagSet { public: bool isBad() const; void markAsBad(); private: enum { BAD_FLAG = 1 }; }; inline bool BadFlag::isBad() const { return getFlag(BAD_FLAG); } inline void BadFlag::markAsBad() { setFlags(BAD_FLAG); } #endif Maude-Maude3.2/src/Core/bindingLhsAutomaton.cc000066400000000000000000000043221420036611000213160ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class BindingLhsAutomaton. // // utility stuff #include "macros.hh" #include "vector.hh" #include "indent.hh" // forward declarations #include "interface.hh" #include "core.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" // core class definitions #include "substitution.hh" #include "bindingLhsAutomaton.hh" BindingLhsAutomaton::BindingLhsAutomaton(int variableIndex, LhsAutomaton* realLhsAutomaton) : variableIndex(variableIndex), realLhsAutomaton(realLhsAutomaton) { } BindingLhsAutomaton::~BindingLhsAutomaton() { delete realLhsAutomaton; } bool BindingLhsAutomaton::match(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo) { if (realLhsAutomaton->match(subject, solution, returnedSubproblem, extensionInfo)) { solution.bind(variableIndex, subject); return true; } return false; } #ifdef DUMP void BindingLhsAutomaton::dump(ostream& s, const VariableInfo& variableInfo, int indentLevel) { s << Indent(indentLevel) << "Begin{BindingLhsAutomaton}\n"; s << Indent(indentLevel + 1) << "variableIndex = " << variableIndex << '\n'; s << Indent(indentLevel + 1) << "realLhsAutomaton =\n"; realLhsAutomaton->dump(s, variableInfo, indentLevel + 2); s << Indent(indentLevel) << "End{BindingLhsAutomaton}\n"; } #endif Maude-Maude3.2/src/Core/bindingLhsAutomaton.hh000066400000000000000000000031731420036611000213330ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for left hand side automata that just bind a variable and call // another lhs automaton to do the real work. // #ifndef _bindingLhsAutomaton_hh_ #define _bindingLhsAutomaton_hh_ #include "lhsAutomaton.hh" class BindingLhsAutomaton : public LhsAutomaton { NO_COPYING(BindingLhsAutomaton); public: BindingLhsAutomaton(int variableIndex, LhsAutomaton* realLhsAutomaton); ~BindingLhsAutomaton(); // // Standard LhsAutomaton operations. // bool match(DagNode* subject, Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo); #ifdef DUMP void dump(ostream& s, const VariableInfo& variableInfo, int indentLevel); #endif private: const int variableIndex; LhsAutomaton* const realLhsAutomaton; }; #endif Maude-Maude3.2/src/Core/cachedDag.cc000066400000000000000000000025731420036611000171760ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class CachedDag. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" #include "term.hh" // core class definitions #include "cachedDag.hh" void CachedDag::prepare() { // // Mark eager paths in preparation for term to dag conversion. // NatSet emptySet; Vector emptyVector; term->markEagerArguments(0, emptySet, emptyVector); } Maude-Maude3.2/src/Core/cachedDag.hh000066400000000000000000000046611420036611000172100ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class dags that are constructed from terms as then cached for reuse. // #ifndef _cachedDag_hh_ #define _cachedDag_hh_ #include "dagRoot.hh" #include "instruction.hh" class CachedDag { public: CachedDag(Term* t = 0); ~CachedDag(); void setTerm(Term* t); Term* getTerm() const; bool normalize(); void prepare(); DagNode* getDag(); DagRoot* getDagRoot(); void reset(); // // MVM stuff. // void generateInstructionSequence(); Instruction* getInstructionSequence() const; private: Term* term; DagRoot dag; Instruction* instructionSequence; }; inline CachedDag::CachedDag(Term* t) { term = t; instructionSequence = 0; } inline CachedDag::~CachedDag() { delete instructionSequence; if (term != 0) term->deepSelfDestruct(); } inline void CachedDag::setTerm(Term* t) { term = t; dag.setNode(0); } inline Term* CachedDag::getTerm() const { return term; } inline bool CachedDag::normalize() { bool changed; term = term->normalize(true, changed); return changed; } inline DagNode* CachedDag::getDag() { DagNode* d = dag.getNode(); if (d == 0) { d = term->term2Dag(term->getSortIndex() != Sort::SORT_UNKNOWN); // HACK dag.setNode(d); } return d; } inline DagRoot* CachedDag::getDagRoot() { (void) getDag(); return &dag; } inline void CachedDag::generateInstructionSequence() { instructionSequence = term->term2InstructionSequence(); } inline Instruction* CachedDag::getInstructionSequence() const { return instructionSequence; } inline void CachedDag::reset() { dag.setNode(0); // so dag can be garbage collected } #endif Maude-Maude3.2/src/Core/checkedArgVecConstIterator.hh000066400000000000000000000162271420036611000225650ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Nested class within ArgVec for checked const_iterators. // // Note that in this implementation we assume that swap()ing a pair of // ArgVecs invalidates all iterators that point to their elements. // This is stricter but safer than other possibilities. // template class ArgVec::const_iterator // Can't do this because of g++ bug. // : public random_access_iterator::difference_type> { public: // // Types needed by STL algorithms. // typedef random_access_iterator_tag iterator_category; typedef T value_type; typedef T* pointer; typedef T& reference; typedef size_t size_type; typedef ptrdiff_t difference_type; // // Trivial iterator stuff. // const_iterator(); const_iterator(const const_iterator& other); const_iterator(const iterator& other); // conversion ctor const_iterator& operator=(const const_iterator& other); bool operator==(const const_iterator& other) const; bool operator!=(const const_iterator& other) const; const_reference operator*() const; const_pointer operator->() const; // // Forward iterator stuff. // const_iterator& operator++(); const_iterator operator++(int); // // Bidirectional iterator stuff. // const_iterator& operator--(); const_iterator operator--(int); // // Random access iterator stuff. // const_iterator& operator+=(difference_type delta); const_iterator operator+(difference_type delta) const; const_iterator& operator-=(difference_type delta); const_iterator operator-(difference_type delta) const; difference_type operator-(const const_iterator& other) const; const_reference operator[](difference_type i) const; bool operator<(const const_iterator& other) const; private: const_iterator(const ArgVec* parent, size_type index); void checkValid() const; void checkDereferenceable() const; const_pointer ptr; const ArgVec* parent; size_type index; friend class ArgVec; }; template inline void ArgVec::const_iterator::checkValid() const { Assert(parent != 0, "uninitialized iterator"); Assert(index <= parent->len, "index > len (" << index << " > " << parent->len << ')'); Assert(ptr == parent->basePtr + index, "bad pointer"); } template inline void ArgVec::const_iterator::checkDereferenceable() const { Assert(parent != 0, "uninitialized iterator"); Assert(index < parent->len, "index >= len (" << index << " >= " << parent->len << ')'); Assert(ptr == parent->basePtr + index, "bad pointer"); } template inline ArgVec::const_iterator::const_iterator() { parent = 0; } template inline ArgVec::const_iterator::const_iterator(const const_iterator& other) { if (other.parent != 0) other.checkValid(); ptr = other.ptr; parent = other.parent; index = other.index; } template inline ArgVec::const_iterator::const_iterator(const iterator& other) { if (other.parent != 0) other.checkValid(); ptr = other.ptr; parent = other.parent; index = other.index; } template inline ArgVec::const_iterator::const_iterator(const ArgVec* parent, size_type index) : ptr(parent->basePtr + index), parent(parent), index(index) { } template inline typename ArgVec::const_iterator& ArgVec::const_iterator::operator=(const const_iterator& other) { if (other.parent != 0) other.checkValid(); ptr = other.ptr; parent = other.parent; index = other.index; return *this; } template inline bool ArgVec::const_iterator::operator==(const const_iterator& other) const { checkValid(); other.checkValid(); return ptr == other.ptr; } template inline bool ArgVec::const_iterator::operator!=(const const_iterator& other) const { checkValid(); other.checkValid(); return ptr != other.ptr; } template inline typename ArgVec::const_reference ArgVec::const_iterator::operator*() const { checkDereferenceable(); return *ptr; } template inline typename ArgVec::const_pointer ArgVec::const_iterator::operator->() const { checkDereferenceable(); return ptr; } template inline typename ArgVec::const_iterator& ArgVec::const_iterator::operator++() { checkDereferenceable(); ++ptr; ++index; return *this; } template inline typename ArgVec::const_iterator ArgVec::const_iterator::operator++(int) { typename ArgVec::const_iterator tmp(*this); operator++(); return tmp; } template inline typename ArgVec::const_iterator& ArgVec::const_iterator::operator--() { checkValid(); Assert(index > 0, "decrementing past start"); --ptr; --index; return *this; } template inline typename ArgVec::const_iterator ArgVec::const_iterator::operator--(int) { typename ArgVec::const_iterator tmp(*this); operator--(); return tmp; } template inline typename ArgVec::const_iterator& ArgVec::const_iterator::operator+=(difference_type delta) { checkValid(); Assert(index + delta <= parent->len, "past end"); ptr += delta; index += delta; return *this; } template inline typename ArgVec::const_iterator ArgVec::const_iterator::operator+(difference_type delta) const { typename ArgVec::const_iterator tmp(*this); return tmp += delta; } template inline typename ArgVec::const_iterator& ArgVec::const_iterator::operator-=(difference_type delta) { checkValid(); Assert(index - delta <= parent->len, "past end"); ptr -= delta; index -= delta; return *this; } template inline typename ArgVec::const_iterator ArgVec::const_iterator::operator-(difference_type delta) const { typename ArgVec::const_iterator tmp(*this); return tmp -= delta; } template inline typename ArgVec::const_reference ArgVec::const_iterator::operator[](difference_type i) const { checkValid(); Assert(index + i <= parent->len, "past end"); return ptr[i]; } template inline bool ArgVec::const_iterator::operator<(const const_iterator& other) const { checkValid(); other.checkValid(); Assert(parent == other.parent, "incomparable iterators"); return ptr < other.ptr; } template inline typename ArgVec::difference_type ArgVec::const_iterator::operator-(const const_iterator& other) const { checkValid(); other.checkValid(); Assert(parent == other.parent, "incomparable iterators"); return ptr - other.ptr; } Maude-Maude3.2/src/Core/checkedArgVecIterator.hh000066400000000000000000000147601420036611000215560ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Nested class within ArgVec for checked iterators. // // Note that in this implementation we assume that swap()ing a pair of // ArgVecs invalidates all iterators that point to their elements. // This is stricter but safer than other possibilities. // template class ArgVec::iterator // Can't do this because of g++ bug. // : public random_access_iterator::difference_type> { public: // // Types needed by STL algorithms. // typedef random_access_iterator_tag iterator_category; typedef T value_type; typedef T* pointer; typedef T& reference; typedef size_t size_type; typedef ptrdiff_t difference_type; // // Trivial iterator stuff. // iterator(); iterator(const iterator& other); iterator& operator=(const iterator& other); bool operator==(const iterator& other) const; bool operator!=(const iterator& other) const; reference operator*() const; pointer operator->() const; // // Forward iterator stuff. // iterator& operator++(); iterator operator++(int); // // Bidirectional iterator stuff. // iterator& operator--(); iterator operator--(int); // // Random access iterator stuff. // iterator& operator+=(difference_type delta); iterator operator+(difference_type delta) const; iterator& operator-=(difference_type delta); iterator operator-(difference_type delta) const; difference_type operator-(const iterator& other) const; reference operator[](difference_type i) const; bool operator<(const iterator& other) const; private: iterator(ArgVec* parent, size_type index); void checkValid() const; void checkDereferenceable() const; pointer ptr; ArgVec* parent; size_type index; friend class ArgVec; friend class const_iterator; }; template inline void ArgVec::iterator::checkValid() const { Assert(parent != 0, "uninitialized iterator"); Assert(index <= parent->len, "index > len (" << index << " > " << parent->len << ')'); Assert(ptr == parent->basePtr + index, "bad pointer"); } template inline void ArgVec::iterator::checkDereferenceable() const { Assert(parent != 0, "uninitialized iterator"); Assert(index < parent->len, "index >= len (" << index << " >= " << parent->len << ')'); Assert(ptr == parent->basePtr + index, "bad pointer"); } template inline ArgVec::iterator::iterator() { parent = 0; } template inline ArgVec::iterator::iterator(const iterator& other) { if (other.parent != 0) other.checkValid(); ptr = other.ptr; parent = other.parent; index = other.index; } template inline ArgVec::iterator::iterator(ArgVec* parent, size_type index) : ptr(parent->basePtr + index), parent(parent), index(index) { } template inline typename ArgVec::iterator& ArgVec::iterator::operator=(const iterator& other) { if (other.parent != 0) other.checkValid(); ptr = other.ptr; parent = other.parent; index = other.index; return *this; } template inline bool ArgVec::iterator::operator==(const iterator& other) const { checkValid(); other.checkValid(); return ptr == other.ptr; } template inline bool ArgVec::iterator::operator!=(const iterator& other) const { checkValid(); other.checkValid(); return ptr != other.ptr; } template inline typename ArgVec::reference ArgVec::iterator::operator*() const { checkDereferenceable(); return *ptr; } template inline typename ArgVec::pointer ArgVec::iterator::operator->() const { checkDereferenceable(); return ptr; } template inline typename ArgVec::iterator& ArgVec::iterator::operator++() { checkDereferenceable(); ++ptr; ++index; return *this; } template inline typename ArgVec::iterator ArgVec::iterator::operator++(int) { typename ArgVec::iterator tmp(*this); operator++(); return tmp; } template inline typename ArgVec::iterator& ArgVec::iterator::operator--() { checkValid(); Assert(index > 0, "decrementing past start"); --ptr; --index; return *this; } template inline typename ArgVec::iterator ArgVec::iterator::operator--(int) { typename ArgVec::iterator tmp(*this); operator--(); return tmp; } template inline typename ArgVec::iterator& ArgVec::iterator::operator+=(difference_type delta) { checkValid(); Assert(index + delta <= parent->len, "past end"); ptr += delta; index += delta; return *this; } template inline typename ArgVec::iterator ArgVec::iterator::operator+(difference_type delta) const { typename ArgVec::iterator tmp(*this); return tmp += delta; } template inline typename ArgVec::iterator& ArgVec::iterator::operator-=(difference_type delta) { checkValid(); Assert(index - delta <= parent->len, "past end"); ptr -= delta; index -= delta; return *this; } template inline typename ArgVec::iterator ArgVec::iterator::operator-(difference_type delta) const { typename ArgVec::iterator tmp(*this); return tmp -= delta; } template inline typename ArgVec::reference ArgVec::iterator::operator[](difference_type i) const { checkValid(); Assert(index + i <= parent->len, "past end"); return ptr[i]; } template inline bool ArgVec::iterator::operator<(const iterator& other) const { checkValid(); other.checkValid(); Assert(parent == other.parent, "incomparable iterators"); return ptr < other.ptr; } template inline typename ArgVec::difference_type ArgVec::iterator::operator-(const iterator& other) const { checkValid(); other.checkValid(); Assert(parent == other.parent, "incomparable iterators"); return ptr - other.ptr; } Maude-Maude3.2/src/Core/compoundCycleSubproblem.cc000066400000000000000000000151221420036611000222040ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2020 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class CompoundCycleSubproblem. // // utility stuff #include "macros.hh" #include "vector.hh" #include "indent.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "variable.hh" // interface class definitions #include "dagNode.hh" #include "binarySymbol.hh" // core class definitions #include "unificationContext.hh" #include "compoundCycleSubproblem.hh" // variable class definitions #include "variableDagNode.hh" void CompoundCycleSubproblem::markReachableNodes() { int nrFragile = preBreakSubstitution.nrFragileBindings(); for (int i = 0; i < nrFragile; i++) { DagNode* d = preBreakSubstitution.value(i); if (d != 0) d->mark(); } } bool CompoundCycleSubproblem::solve(bool findFirst, UnificationContext& solution, PendingUnificationStack& pending) { //DebugAlways("findFirst = " << findFirst); if (findFirst) { preBreakSubstitution.clone(solution); preBreakPendingState = pending.checkPoint(); currentEdgeIndex = 0; } else { solution.clone(preBreakSubstitution); pending.restore(preBreakPendingState); } // // Find an edge whose top symbol can resolve to a proper subterm and // create a restricted unification problem. // With nonregular theories it is easy to break a cycle by resolving // a single edge. We don't currently support nonregular theories but // we do support arbitrary ground terms as identities so we can break // a cycle by collapsing a single edge in a situation such as this: // // fmod FOO is // sort Foo . // op f : Foo Foo -> Foo [id: g(a)] . // op g : Foo -> Foo . // op a : -> Foo . // vars W X Y Z : Foo . // endfm // // unify X =? f(Y, Z) /\ Z =? g(X) . // int nrEdges = cycle.size(); while (currentEdgeIndex < nrEdges) { int variableIndex = cycle[currentEdgeIndex]; DagNode* variable = solution.getVariableDagNode(variableIndex); DagNode* assignment = solution.value(variableIndex); //DebugAlways("trying to collapse " << variable << " <- " << assignment); ++currentEdgeIndex; Symbol* controllingSymbol = assignment->symbol(); if (controllingSymbol->canResolveTheoryClash()) { pending.push(controllingSymbol, assignment, variable, true); // // Because we just put the binding back as a unification problem // it is a safe optimization to remove the binding from our current // solution. // solution.bind(variableIndex, 0); return true; } } // // Now we look for an edge whose variable can be eliminated by unifying it // against a "cyclic" identity. // We do this to catch a pathological corner case when we have multiple symbols // with identities in other symbol's theories. For example: // // fmod FOO is // sort Foo . // op f : Foo Foo -> Foo [assoc comm id: g(a, b)] . // op g : Foo Foo -> Foo [assoc comm id: f(c, d)] . // ops a b c d : -> Foo . // vars W X Y Z : Foo . // endfm // // unify X =? f(c, d, Y) /\ Y =? g(a, b, X) . // // Here, neither rhs can collapse to an alien subterm (the case handled above) // but a solution is still possible by solving Y =? g(a, b) // Even more subtle cases can be constructed using an otherwise inert symbol; // for example: // // fmod FOO is // sort Foo . // op f : Foo Foo -> Foo [assoc comm id: h(g(a, b))] . // op g : Foo Foo -> Foo [assoc comm id: f(c, d)] . // op h : Foo -> Foo . // ops a b c d : -> Foo . // vars W X Y Z : Foo . // endfm // // unify X =? f(c, d, Y) /\ Y =? h(Z) /\ Z =? g(a, b, X). // // Here again there are no collapses to an alien subterm and h(Z) is inert. // But solving X =? f(c, d) yields a solution. // It is for this reason that the cyclic identity finding code looks for // cycles through subterms and well as direct cycles. // These cases are so artificial case that we don't care about efficiency at all. // while (currentEdgeIndex < 2 * nrEdges) { int variableIndex = cycle[currentEdgeIndex % nrEdges]; DagNode* assignment = solution.value(variableIndex); ++currentEdgeIndex; int nextVariableIndex = cycle[currentEdgeIndex % nrEdges]; // wrap around caused by % DagNode* nextVariable = solution.getVariableDagNode(nextVariableIndex); Symbol* controllingSymbol = assignment->symbol(); if (BinarySymbol* bs = dynamic_cast(controllingSymbol)) { DebugAdvisory("checking " << bs << " for cyclic identity"); if (bs->hasCyclicIdentity()) { DagNode* d = bs->getIdentityDag(); // // If this is the first time we use the identity element it is possible // that it will not have its sort computed or ground flag set. // if (!(d->isGround())) d->computeBaseSortForGroundSubterms(false); DebugAdvisory("trying " << d << " vs " << nextVariable); if (d->computeSolvedForm(nextVariable, solution, pending)) return true; } } } #if 0 // // Now we look for an edge whose variable can be eliminated using Boudet's variable // elimination technique. // Because we don't currently support nonregular theories this isn't needed. // We don't support variable elimination either. But we include the code just // in case we support these things in the future. // while (currentEdgeIndex < 3 * nrEdges) { int variableIndex = cycle[currentEdgeIndex % nrEdges]; DagNode* subject = solution.value(variableIndex); ++currentEdgeIndex; int nextVariableIndex = cycle[currentEdgeIndex % nrEdges]; DagNode* nextVariable = solution.getVariableDagNode(nextVariableIndex); if (subject->symbol()->eliminateVariable(subject, nextVariable, solution, pending)) return true; } #endif return false; } Maude-Maude3.2/src/Core/compoundCycleSubproblem.hh000066400000000000000000000044201420036611000222150ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2020 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for breaking compound cycles arising during unification. // // A cycle is a vector of variables in the solved form with the structure // X1 |-> t1[..., X2,...] // X2 |-> t2[..., X3,...] // : // Xn |-> tn[..., X1,...] // where ti is pure in theory Ti. // // Such a situation would normally be considered an occurs-check failure // but in the presence of collapse or nonregular theories may have one // or more resolutions. // #ifndef _compoundCycleSubproblem_hh_ #define _compoundCycleSubproblem_hh_ #include "unificationSubproblem.hh" #include "simpleRootContainer.hh" #include "pendingUnificationStack.hh" class CompoundCycleSubproblem : public UnificationSubproblem, private SimpleRootContainer { public: CompoundCycleSubproblem(); void addComponent(int variableIndex); bool solve(bool findFirst, UnificationContext& solution, PendingUnificationStack& pending); #ifdef DUMP /* virtual void dump(ostream& s, const VariableInfo& variableInfo, int indentLevel = 0); */ #endif private: void markReachableNodes(); Vector cycle; Substitution preBreakSubstitution; PendingUnificationStack::Marker preBreakPendingState; int currentEdgeIndex; }; inline CompoundCycleSubproblem::CompoundCycleSubproblem() : preBreakSubstitution(0) { DebugAdvisory("Created CompoundCycleSubproblem"); } inline void CompoundCycleSubproblem::addComponent(int variableIndex) { cycle.append(variableIndex); } #endif Maude-Maude3.2/src/Core/conditionFragment.hh000066400000000000000000000033461420036611000210360ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Abstract base class for condition fragments. // #ifndef _conditionFragment_hh_ #define _conditionFragment_hh_ #include "stack.hh" #include "rhsBuilder.hh" #include "conditionState.hh" class ConditionFragment { public: virtual ~ConditionFragment() {} virtual void check(VariableInfo& varInfo, NatSet& boundVariables) = 0; virtual void preprocess() = 0; virtual void compileBuild(VariableInfo& variableInfo, TermBag& availableTerms) = 0; virtual void compileMatch(VariableInfo& variableInfo, NatSet& boundUniquely) = 0; virtual bool solve(bool findFirst, RewritingContext& solution, Stack& state) = 0; #ifdef DUMP virtual void dump(ostream& s, const VariableInfo& variableInfo, int indentLevel) {} #endif }; // // Output function for ConditionFragment must be defined by library user. // ostream& operator<<(ostream& s, const ConditionFragment* c); #endif Maude-Maude3.2/src/Core/conditionState.hh000066400000000000000000000022761420036611000203540ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Base class for state information used in solving condition fragments. // // The only thing we need to be able to do to objects of derived classes // through this interface is delete them if we don't want further solutions. // #ifndef _conditionState_hh_ #define _conditionState_hh_ class ConditionState { public: virtual ~ConditionState() {}; }; #endif Maude-Maude3.2/src/Core/connectedComponent.cc000066400000000000000000000066721420036611000212040ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class ConnectedComponent // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" // core class definitions #include "namedEntity.hh" // core class definitions #include "sort.hh" #include "connectedComponent.hh" #include "module.hh" ConnectedComponent::ConnectedComponent(Sort* firstSort) { sortCount = 0; errorFreeFlag = true; Sort* errorSort = new Sort(firstSort->id()); firstSort->getModule()->insertSort(errorSort); errorSort->registerConnectedSorts(this); firstSort->registerConnectedSorts(this); nrMaxSorts = sorts.length() - 1; if (nrMaxSorts == 0) { IssueWarning("the connected component in the sort graph that contains sort " << QUOTE(firstSort) << " has no maximal sorts due to a cycle."); firstSort->getModule()->markAsBad(); return; } for (int i = 1; i <= nrMaxSorts; i++) errorSort->insertSubsort(sorts[i]); for (int i = 1; i < sorts.length(); i++) // sorts.length() may increase sorts[i]->processSubsorts(); if (sorts.length() != sortCount) { IssueWarning("the connected component in the sort graph that contains sort " << QUOTE(firstSort) << " could not be linearly ordered due to a cycle."); firstSort->getModule()->markAsBad(); return; } for (int i = sortCount - 1; i >= 0; i--) sorts[i]->computeLeqSorts(); lastAllocatedMatchIndex = 0; } ConnectedComponent::~ConnectedComponent() { } bool ConnectedComponent::leq(int index1, int index2) const { Assert(index1 != Sort::SORT_UNKNOWN, "bad index1"); Assert(index2 != Sort::SORT_UNKNOWN, "bad index2"); return sorts[index2]->getLeqSorts().contains(index1); } void ConnectedComponent::findMaximalSorts(const NatSet& uSorts, Vector& maxSorts) const { NatSet unionSoFar; for (int i = 0; !(unionSoFar.contains(uSorts)); i++) { Assert(i < sortCount, "index overrun"); if (uSorts.contains(i) && !(unionSoFar.contains(i))) { Sort* s = sorts[i]; maxSorts.append(s); unionSoFar.insert(s->getLeqSorts()); } } } int ConnectedComponent::findIndex(const NatSet& leqSorts) const { int i = leqSorts.min(); for (; i > 0; i--) { if (sorts[i]->getLeqSorts().contains(leqSorts)) break; } return i; } const NatSet& ConnectedComponent::getLeqSorts(int index) const { Assert(index != Sort::SORT_UNKNOWN, "bad sort index"); return sorts[index]->getLeqSorts(); } #ifdef DUMP void ConnectedComponent::dump(ostream& s) { int nrSorts = sorts.length(); for (int i = 0; i < nrSorts; i++) sorts[i]->dump(s); } #endif Maude-Maude3.2/src/Core/connectedComponent.hh000066400000000000000000000053631420036611000212120ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for connected components in the sort hierarchy. // #ifndef _connectedComponent_hh_ #define _connectedComponent_hh_ #include "moduleItem.hh" #include "natSet.hh" class ConnectedComponent : public ModuleItem { NO_COPYING(ConnectedComponent); public: ConnectedComponent(Sort* firstSort); ~ConnectedComponent(); int nrSorts() const; int nrMaximalSorts() const; Sort* sort(int index) const; bool leq(int index1, int index2) const; void findMaximalSorts(const NatSet& uSorts, Vector& maxSorts) const; int findIndex(const NatSet& leqSorts) const; const NatSet& getLeqSorts(int index) const; bool errorFree() const; void errorSortSeen(); // // For use by class Sort only. // void registerSort(Sort* sort); int appendSort(Sort* sort); // // For new engine. // int getNewMatchIndex(); int getLastAllocatedMatchIndex() const; #ifdef DUMP void dump(ostream& s); #endif private: int sortCount; short nrMaxSorts; Bool errorFreeFlag; Vector sorts; // // For new engine. // int lastAllocatedMatchIndex; }; inline void ConnectedComponent::errorSortSeen() { errorFreeFlag = false; } inline bool ConnectedComponent::errorFree() const { return errorFreeFlag; } inline int ConnectedComponent::nrSorts() const { return sortCount; } inline int ConnectedComponent::nrMaximalSorts() const { return nrMaxSorts; } inline Sort* ConnectedComponent::sort(int index) const { return sorts[index]; } inline void ConnectedComponent::registerSort(Sort* /* sort */) { ++sortCount; } inline int ConnectedComponent::appendSort(Sort* sort) { int i = sorts.length(); sorts.append(sort); return i; } inline int ConnectedComponent::getNewMatchIndex() { return ++lastAllocatedMatchIndex; } inline int ConnectedComponent::getLastAllocatedMatchIndex() const { return lastAllocatedMatchIndex; } ostream& operator<<(ostream& s, const ConnectedComponent* component); #endif Maude-Maude3.2/src/Core/copyRhsAutomaton.cc000066400000000000000000000051441420036611000206670ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class CopyRhsAutomaton. // // utility stuff #include "macros.hh" #include "vector.hh" #include "indent.hh" // forward declarations #include "interface.hh" #include "core.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" // core class definitions #include "substitution.hh" #include "variableInfo.hh" #include "stackMachineRhsCompiler.hh" #include "copyRhsAutomaton.hh" CopyRhsAutomaton::CopyRhsAutomaton(int originalIndex, int copyIndex) : originalIndex(originalIndex), copyIndex(copyIndex) { } void CopyRhsAutomaton::remapIndices(VariableInfo& variableInfo) { originalIndex = variableInfo.remapIndex(originalIndex); copyIndex = variableInfo.remapIndex(copyIndex); } bool CopyRhsAutomaton::recordInfo(StackMachineRhsCompiler& compiler) { Vector sources(1); sources[0] = originalIndex; compiler.recordFunctionEval(0, copyIndex, sources); return true; } DagNode* CopyRhsAutomaton::construct(Substitution& matcher) { DagNode* orig = matcher.value(originalIndex); DebugAdvisory("CopyRhsAutomaton::construct " << orig); DagNode* n = orig->copyEagerUptoReduced(); orig->clearCopyPointers(); matcher.bind(copyIndex, n); return n; } void CopyRhsAutomaton::replace(DagNode* old, Substitution& matcher) { DagNode* orig = matcher.value(originalIndex); DagNode* n = orig->copyEagerUptoReduced(); orig->clearCopyPointers(); n->overwriteWithClone(old); } #ifdef DUMP void CopyRhsAutomaton::dump(ostream& s, const VariableInfo& variableInfo, int indentLevel) { s << Indent(indentLevel) << "Begin{CopyRhsAutomaton}\n"; s << Indent(indentLevel + 1) << "originalIndex = " << originalIndex << "\tcopyIndex = " << copyIndex << '\n'; s << Indent(indentLevel) << "End{CopyRhsAutomaton}\n"; } #endif Maude-Maude3.2/src/Core/copyRhsAutomaton.hh000066400000000000000000000030111420036611000206700ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for right hand side automata which make copies of // bindings in the substitution. // #ifndef _copyRhsAutomaton_hh_ #define _copyRhsAutomaton_hh_ #include "rhsAutomaton.hh" class CopyRhsAutomaton : public RhsAutomaton { NO_COPYING(CopyRhsAutomaton); public: CopyRhsAutomaton(int originalIndex, int copyIndex); void remapIndices(VariableInfo& variableInfo); DagNode* construct(Substitution& matcher); void replace(DagNode* old, Substitution& matcher); bool recordInfo(StackMachineRhsCompiler& compiler); #ifdef DUMP void dump(ostream& s, const VariableInfo& variableInfo, int indentLevel = 0); #endif private: int originalIndex; int copyIndex; }; #endif Maude-Maude3.2/src/Core/core.hh000066400000000000000000000046121420036611000163110ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Forward declarations for core classes. // #ifndef _core_hh_ #define _core_hh_ class MemoryBlock; class MemoryInfo; class MemoryCell; class NamedEntity; class ModuleItem; class LineNumber; class Module; class Sort; class ConnectedComponent; class ArgumentIterator; class DagArgumentIterator; class VariableInfo; class Substitution; class LocalBinding; class SubproblemSequence; class SubproblemDisjunction; class SortCheckSubproblem; class VariableAbstractionSubproblem; class ExtensionMatchSubproblem; class EqualitySubproblem; class PreEquation; class Equation; class StrategyDefinition; class RewriteStrategy; class Rule; class Label; class SortConstraint; class Strategy; class SortTable; class SortConstraintTable; class EquationTable; class RuleTable; class RewritingContext; class SubproblemAccumulator; class DisjunctiveSubproblemAccumulator; class RedexPosition; class TermSet; class DagRoot; class SymbolMap; class CachedDag; class DagNodeSet; class RootContainer; class SimpleRootContainer; class BindingLhsAutomaton; class TrivialRhsAutomaton; class CopyRhsAutomaton; class TermBag; class RhsBuilder; class ConditionFragment; class ConditionState; class OpDeclaration; class SortBdds; class UnificationContext; class FreshVariableGenerator; class NarrowingVariableInfo; class ProtectedDagNodeSet; class PendingUnificationStack; class Environment; class HashConsSet; class UnificationSubproblemDisjunction; class CompoundCycleSubproblem; class MemoMap; class Frame; class StackMachine; class StackMachineRhsCompiler; class ReturnInstruction; class NullInstruction; #endif Maude-Maude3.2/src/Core/ctorDiagram.cc000066400000000000000000000136051420036611000176050ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Code for building the constructor diagram. // bool SortTable::containsConstructor(const NatSet& state, bool& unique) { bool seenCtor = false; bool seenNonCtor = false; const NatSet::const_iterator e = state.end(); for (NatSet::const_iterator i = state.begin(); i != e; ++i) { if (opDeclarations[*i].isConstructor()) seenCtor = true; else seenNonCtor = true; } unique = !(seenCtor && seenNonCtor); return seenCtor; } bool SortTable::partlyMoreGeneral(const OpDeclaration& subsumer, const OpDeclaration& victim, int argNr) { const Vector& s = subsumer.getDomainAndRange(); const Vector& v = victim.getDomainAndRange(); int nrArgs = s.length() - 1; for (int i = argNr; i < nrArgs; i++) { if (!(leq(v[i], s[i]))) return false; } return true; } bool SortTable::ctorSubsumes(const OpDeclaration& subsumer, const OpDeclaration& victim, int argNr) { const Vector& s = subsumer.getDomainAndRange(); const Vector& v = victim.getDomainAndRange(); int nrArgs = s.length() - 1; // // Check to see that we are equal on unchecked args. // for (int i = argNr; i < nrArgs; i++) { if (v[i] != s[i]) return false; } // // Check to see that we are <= on checked args. // bool strict = false; for (int i = 0; i < argNr; i++) { if (v[i] != s[i]) { if (leq(s[i], v[i])) strict = true; else return false; } } // // If ctor status differs we need strictness for subsumption. // return strict || (subsumer.isConstructor() == victim.isConstructor()); } void SortTable::minimizeWrtCtor(NatSet& alive, int argNr) const { bool seenCtor = false; bool seenNonCtor = false; const NatSet::const_iterator e = alive.end(); for (NatSet::const_iterator i = alive.begin(); i != e; ++i) { if (opDeclarations[*i].isConstructor()) seenCtor = true; else seenNonCtor = true; } if (!seenCtor) alive.makeEmpty(); else if (!seenNonCtor) { // // We are going to be ctor in any declaration // survives so ctor subsumes ctor if it is >= // on unchecked arguments. // int min = alive.min(); int max = alive.max(); for (int i = min; i <= max; i++) { if (alive.contains(i)) { for (int j = min; j <= max; j++) { if (j != i && alive.contains(j) && partlyMoreGeneral(opDeclarations[i], opDeclarations[j], argNr)) alive.subtract(j); } } } } else { // // Like can subsume like by being <= on checked // arguments and = on unchecked args. // For ctor to subsume non-ctor and viceversa // we also need strict < on at least one checked // argument. // int min = alive.min(); int max = alive.max(); for (int i = min; i <= max; i++) { if (alive.contains(i)) { for (int j = min; j <= max; j++) { if (j != i && alive.contains(j) && ctorSubsumes(opDeclarations[i], opDeclarations[j], argNr)) alive.subtract(j); } } } } } void SortTable::buildCtorDiagram() { // // Start with all op declarations alive. // Vector currentStates(1); NatSet& all = currentStates[0]; int nrDeclarations = opDeclarations.length(); for (int i = nrDeclarations - 1; i >= 0; i--) all.insert(i); // insert in reverse order for efficiency if (nrArgs == 0) { bool unique; ctorDiagram.append(containsConstructor(all, unique)); WarningCheck(unique, "constructor declarations for constant " << QUOTE(safeCastNonNull(this)) << " are inconsistant."); return; } Vector nextStates; int currentBase = 0; set badTerminals; for (int i = 0; i < nrArgs; i++) { const ConnectedComponent* component = componentVector[i]; int nrSorts = component->nrSorts(); int nrCurrentStates = currentStates.length(); int nextBase = currentBase + nrSorts * nrCurrentStates; ctorDiagram.resize(nextBase); int nrNextSorts = (i == nrArgs - 1) ? 0 : componentVector[i + 1]->nrSorts(); for (int j = 0; j < nrSorts; j++) { Sort* s = component->sort(j); NatSet viable; for (int k = 0; k < nrDeclarations; k++) { if (leq(s, opDeclarations[k].getDomainAndRange()[i])) viable.insert(k); } for (int k = 0; k < nrCurrentStates; k++) { NatSet nextState(viable); nextState.intersect(currentStates[k]); int index = currentBase + k * nrSorts + j; if (nrNextSorts == 0) { minimizeWrtCtor(nextState, i + 1); bool unique; ctorDiagram[index] = containsConstructor(nextState, unique); if (!unique) badTerminals.insert(index); } else { minimizeWrtCtor(nextState, i + 1); ctorDiagram[index] = nextBase + nrNextSorts * findStateNumber(nextStates, nextState); } } } currentStates.swap(nextStates); nextStates.contractTo(0); currentBase = nextBase; } if (!(badTerminals.empty())) sortErrorAnalysis(false, badTerminals); } Maude-Maude3.2/src/Core/dagArgumentIterator.hh000066400000000000000000000035551420036611000213360ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Wrapper around raw DAG argument iterators to provide cleaner interface. // #ifndef _dagArgumentIterator_hh_ #define _dagArgumentIterator_hh_ #include "rawDagArgumentIterator.hh" class DagArgumentIterator { public: DagArgumentIterator(DagNode& d); DagArgumentIterator(DagNode* d); ~DagArgumentIterator(); bool valid() const; DagNode* argument() const; void next(); private: RawDagArgumentIterator* dagArgumentIterator; }; inline DagArgumentIterator::DagArgumentIterator(DagNode& d) { dagArgumentIterator = d.arguments(); } inline DagArgumentIterator::DagArgumentIterator(DagNode* d) { dagArgumentIterator = d->arguments(); } inline DagArgumentIterator::~DagArgumentIterator() { delete dagArgumentIterator; } inline bool DagArgumentIterator::valid() const { return (dagArgumentIterator != 0) && dagArgumentIterator->valid(); } inline DagNode* DagArgumentIterator::argument() const { return dagArgumentIterator->argument(); } inline void DagArgumentIterator::next() { dagArgumentIterator->next(); } #endif Maude-Maude3.2/src/Core/dagNodeSet.cc000066400000000000000000000033311420036611000173610ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class DagNodeSet // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" // core class definitions #include "dagNodeSet.hh" int DagNodeSet::insert(DagNode* d) { return PointerSet::insert(d, d->getHashValue()); } int DagNodeSet::dagNode2Index(DagNode* d) const { return pointer2Index(d, d->getHashValue()); } DagNode* DagNodeSet::index2DagNode(int i) const { return static_cast(index2Pointer(i)); } unsigned int DagNodeSet::hash(void* /* pointer */) const { CantHappen("should never be called"); return 0; } bool DagNodeSet::isEqual(void* pointer1, void* pointer2) const { DagNode* d1 = static_cast(pointer1); DagNode* d2 = static_cast(pointer2); return d1->equal(d2); } Maude-Maude3.2/src/Core/dagNodeSet.hh000066400000000000000000000024401420036611000173730ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for set of pointers to dag nodes. // #ifndef _dagNodeSet_hh_ #define _dagNodeSet_hh_ #include "pointerSet.hh" class DagNodeSet : private PointerSet { public: int insert(DagNode* d); int dagNode2Index(DagNode* d) const; using PointerSet::cardinality; using PointerSet::makeEmpty; DagNode* index2DagNode(int i) const; private: unsigned int hash(void* pointer) const; bool isEqual(void* pointer1, void* pointer2) const; }; #endif Maude-Maude3.2/src/Core/dagRoot.cc000066400000000000000000000023151420036611000167440ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class DagRoot. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" // core class definitions #include "dagRoot.hh" void DagRoot::markReachableNodes() { nodePointer->mark(); } Maude-Maude3.2/src/Core/dagRoot.hh000066400000000000000000000033011420036611000167520ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for smart pointers that form DAG roots for garbage collection. // They have zero impact on performance of GC when null. // #ifndef _dagRoot_hh_ #define _dagRoot_hh_ #include "rootContainer.hh" class DagRoot : private RootContainer { public: DagRoot(DagNode* initial = 0); ~DagRoot(); DagNode* getNode() const; void setNode(DagNode* node); private: void markReachableNodes(); DagNode* nodePointer; }; inline DagRoot::DagRoot(DagNode* initial) { nodePointer = initial; if (initial != 0) link(); } inline DagRoot::~DagRoot() { if (nodePointer != 0) unlink(); } inline DagNode* DagRoot::getNode() const { return nodePointer; } inline void DagRoot::setNode(DagNode* node) { if (node == 0) { if (nodePointer != 0) unlink(); } else { if (nodePointer == 0) link(); } nodePointer = node; } #endif Maude-Maude3.2/src/Core/disjunctiveSubproblemAccumulator.cc000066400000000000000000000073311420036611000241320ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class DisjunctiveSubproblemAccumulator. // // // Implementation for class SubproblemDisjunction // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" #include "extensionInfo.hh" // core class definitions #include "rewritingContext.hh" #include "localBinding.hh" #include "subproblemDisjunction.hh" #include "disjunctiveSubproblemAccumulator.hh" DisjunctiveSubproblemAccumulator::~DisjunctiveSubproblemAccumulator() { // // It's legal to quit at any time; maybe because we found a greedy alternative // and so were not interested in the options we have accumulated to date. // if (!first) { delete firstDifference; delete firstSubproblem; delete firstExtensionInfo; delete disjunction; } } void DisjunctiveSubproblemAccumulator::addOption(Substitution& local, Subproblem* subproblem, ExtensionInfo* extensionInfo) { if (first) { firstDifference = local - global; firstSubproblem = subproblem; if (extensionInfo != 0 && extensionInfo->validAfterMatch()) firstExtensionInfo = extensionInfo->makeClone(); else firstExtensionInfo = 0; first = false; disjunction = 0; } else { if (disjunction == 0) { disjunction = new SubproblemDisjunction; disjunction->addOption(firstDifference, firstSubproblem, firstExtensionInfo); firstDifference = 0; firstSubproblem = 0; firstExtensionInfo = 0; } disjunction->addOption(local - global, subproblem, (extensionInfo != 0 && extensionInfo->validAfterMatch()) ? extensionInfo->makeClone() : 0); } } bool DisjunctiveSubproblemAccumulator::extract(Substitution& solution, Subproblem*& returnedSubproblem, ExtensionInfo* extensionInfo) { // // If no options accumulated we fail. // if (first) return false; // // If just one option accumulated, force it. // if (disjunction == 0) { if (firstDifference != 0) { #ifdef NO_ASSERT (void) firstDifference->assert(solution); #else bool ok = firstDifference->assert(solution); Assert(ok, "binding clash"); #endif } returnedSubproblem = firstSubproblem; firstSubproblem = 0; // so dtor won't delete it if (firstExtensionInfo != 0) { Assert(extensionInfo != 0, "extensionInfo null while firstExtensionInfo not null"); extensionInfo->copy(firstExtensionInfo); } else { if (extensionInfo != 0) extensionInfo->setValidAfterMatch(false); } return true; } // // If multiple options accumulated return a true disjunction. // returnedSubproblem = disjunction; disjunction = 0; // so dtor won't delete it if (extensionInfo != 0) extensionInfo->setValidAfterMatch(false); return true; } Maude-Maude3.2/src/Core/disjunctiveSubproblemAccumulator.hh000066400000000000000000000034151420036611000241430ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for accumulating disjunctions of subproblems // #ifndef _disjunctiveSubproblemAccumulator_hh_ #define _disjunctiveSubproblemAccumulator_hh_ class DisjunctiveSubproblemAccumulator { public: DisjunctiveSubproblemAccumulator(Substitution& global); ~DisjunctiveSubproblemAccumulator(); bool empty() const; void addOption(Substitution& local, Subproblem* subproblem, ExtensionInfo* extensionInfo); bool extract(Substitution& solution, Subproblem*&returnedSubproblem, ExtensionInfo* extensionInfo); private: bool first; Substitution& global; LocalBinding* firstDifference; Subproblem* firstSubproblem; ExtensionInfo* firstExtensionInfo; SubproblemDisjunction* disjunction; }; inline DisjunctiveSubproblemAccumulator::DisjunctiveSubproblemAccumulator(Substitution& global) : global(global) { first = true; } inline bool DisjunctiveSubproblemAccumulator::empty() const { return first; } #endif Maude-Maude3.2/src/Core/environment.hh000066400000000000000000000021461420036611000177250ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for accessing an environment in which modules exist. // #ifndef _environment_hh_ #define _environment_hh_ class Environment { public: // // Currently we don't provide access to any functionality though this class. // virtual ~Environment() {} }; #endif Maude-Maude3.2/src/Core/equalitySubproblem.cc000066400000000000000000000032001420036611000212270ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class EqualitySubproblem. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" #include "term.hh" #include "lhsAutomaton.hh" #include "extensionInfo.hh" // core class definitions #include "rewritingContext.hh" #include "equalitySubproblem.hh" bool EqualitySubproblem::solve(bool findFirst, RewritingContext& solution) { if (!findFirst) return false; DagNode* rhs = (rhsExtensionInfo != 0) ? rhsExtensionInfo->buildMatchedPortion() : solution.value(rhsVariable); bool equal = (lhsTerm != 0) ? lhsTerm->equal(rhs) : solution.value(lhsVariable)->equal(rhs); return equal == checkEqual; } Maude-Maude3.2/src/Core/equalitySubproblem.hh000066400000000000000000000052751420036611000212570ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for subproblems to check for equality or inequality of terms, // variable bindings and matched portions. // #ifndef _equalitySubproblem_hh_ #define _equalitySubproblem_hh_ #include "subproblem.hh" class EqualitySubproblem : public Subproblem { public: EqualitySubproblem(int lhsVariable, int rhsVariable, bool checkEqual); EqualitySubproblem(const Term* lhsTerm, int rhsVariable, bool checkEqual); EqualitySubproblem(int lhsVariable, const ExtensionInfo* rhsExtensionInfo, bool checkEqual); EqualitySubproblem(const Term* lhsTerm, const ExtensionInfo* rhsExtensionInfo, bool checkEqual); bool solve(bool findFirst, RewritingContext& solution); private: const Term* const lhsTerm; const int lhsVariable; const ExtensionInfo* const rhsExtensionInfo; const int rhsVariable; const bool checkEqual; }; inline EqualitySubproblem::EqualitySubproblem(int lhsVariable, int rhsVariable, bool checkEqual) : lhsTerm(0), lhsVariable(lhsVariable), rhsExtensionInfo(0), rhsVariable(rhsVariable), checkEqual(checkEqual) { } inline EqualitySubproblem::EqualitySubproblem(const Term* lhsTerm, int rhsVariable, bool checkEqual) : lhsTerm(lhsTerm), lhsVariable(NONE), rhsExtensionInfo(0), rhsVariable(rhsVariable), checkEqual(checkEqual) { } inline EqualitySubproblem::EqualitySubproblem(int lhsVariable, const ExtensionInfo* rhsExtensionInfo, bool checkEqual) : lhsTerm(0), lhsVariable(lhsVariable), rhsExtensionInfo(rhsExtensionInfo), rhsVariable(NONE), checkEqual(checkEqual) { } inline EqualitySubproblem::EqualitySubproblem(const Term* lhsTerm, const ExtensionInfo* rhsExtensionInfo, bool checkEqual) : lhsTerm(lhsTerm), lhsVariable(NONE), rhsExtensionInfo(rhsExtensionInfo), rhsVariable(NONE), checkEqual(checkEqual) { } #endif Maude-Maude3.2/src/Core/equation.cc000066400000000000000000000101271420036611000171720ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class Equation. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" // interface class definitions //#include "symbol.hh" //#include "dagNode.hh" #include "term.hh" #include "rhsAutomaton.hh" #include "instruction.hh" // core class definitions #include "rewritingContext.hh" #include "termBag.hh" #include "stackMachineRhsCompiler.hh" #include "equation.hh" Equation::Equation(int label, Term* lhs, Term* rhs, bool owise, const Vector& condition) : PreEquation(label, lhs, condition), rhs(rhs) { if (owise) setFlags(OWISE); Assert(rhs != 0, "null rhs"); instructionSequence = 0; } Equation::~Equation() { rhs->deepSelfDestruct(); delete instructionSequence; } void Equation::check() { NatSet boundVariables; PreEquation::check(boundVariables); rhs = rhs->normalize(false); rhs->indexVariables(*this); NatSet unboundVariables(rhs->occursBelow()); unboundVariables.subtract(boundVariables); addUnboundVariables(unboundVariables); if (!isNonexec() && !getUnboundVariables().empty()) { IssueWarning(*this << ": variable " << QUOTE(index2Variable(getUnboundVariables().min())) << " is used before it is bound in equation:\n" << this); // // No legitimate use for such equations so mark it as bad. // markAsBad(); } } void Equation::preprocess() { PreEquation::preprocess(); rhs->symbol()->fillInSortInfo(rhs); Assert(getLhs()->getComponent() == rhs->getComponent(), "connected component clash"); } void Equation::compile(bool compileLhs) { if (isCompiled()) return; setCompiled(); TermBag availableTerms; // terms available for reuse compileBuild(availableTerms, true); if (isVariant()) { // // If the equation has the variant attribute, we disallow left->right sharing so // that the rhs can still be instantiated, even if the substitution was made by // unification. // TermBag dummy; rhs->compileTopRhs(builder, *this, dummy); // // For an equation with the variant attribute we always compile the lhs, even if the parent symbol // doesn't make use of the compiled lhs (in the free theory because it uses a discrimination // net for lhs matching). // compileLhs = true; } else rhs->compileTopRhs(builder, *this, availableTerms); // normal case compileMatch(compileLhs, true); builder.remapIndices(*this); fast = hasCondition() ? DEFAULT : getNrProtectedVariables(); // HACK } void Equation::stackMachineCompile() { // // We assume that the equation has already been compiled and thus its builder contains // all the information on the rhs. // We now generation a stack machine instruction sequence for that rhs. // StackMachineRhsCompiler compiler; if (builder.recordInfo(compiler) && !hasCondition()) // we don't handle conditions, and rhs might share subterms with condition { instructionSequence = compiler.compileInstructionSequence(); } } int Equation::traceBeginTrial(DagNode* subject, RewritingContext& context) const { return context.traceBeginEqTrial(subject, this); } void Equation::print(ostream& s) const { s << this; } Maude-Maude3.2/src/Core/equation.hh000066400000000000000000000054041420036611000172060ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2010 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for rewriting equations // #ifndef _equation_hh_ #define _equation_hh_ #include "preEquation.hh" #include "rhsBuilder.hh" class Equation : public PreEquation { public: Equation(int label, Term* lhs, Term* rhs, bool owise = false, const Vector& condition = noCondition); ~Equation(); Term* getRhs() const; void check(); void preprocess(); void compile(bool compileLhs); const RhsBuilder& getRhsBuilder() const; long fastNrVariables() const; void print(ostream& s) const; bool isOwise() const; void setVariant(); void clearVariant(); bool isVariant() const; void stackMachineCompile(); Instruction* getInstructionSequence() const; private: enum Flags { OWISE = 0x10, VARIANT = 0x20 }; int traceBeginTrial(DagNode* subject, RewritingContext& context) const; // // To qualify for "fast" treatment an equation must: // (1) be unconditional // // In this case we set fast to PreEquation::nrVariables; otherwise // we set fast to DEFAULT. // long fast; // avoid the need for explicit extension instruction on x86-64 Term* rhs; RhsBuilder builder; // // For stack based execution. // Instruction* instructionSequence; // int nrSlots; }; inline bool Equation::isOwise() const { return getFlag(OWISE); } inline bool Equation::isVariant() const { return getFlag(VARIANT); } inline void Equation::setVariant() { setFlags(VARIANT); } inline void Equation::clearVariant() { clearFlags(VARIANT); } inline long Equation::fastNrVariables() const { return fast; } inline Term* Equation::getRhs() const { return rhs; } inline const RhsBuilder& Equation::getRhsBuilder() const { return builder; } inline Instruction* Equation::getInstructionSequence() const { return instructionSequence; } // // Output function for Equation must be defined by library user. // ostream& operator<<(ostream& s, const Equation* equation); #endif Maude-Maude3.2/src/Core/equationTable.cc000066400000000000000000000142631420036611000201470ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for abstract class EquationTable. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" #include "term.hh" #include "subproblem.hh" #include "extensionInfo.hh" // core class definitions #include "rewritingContext.hh" #include "lhsAutomaton.hh" #include "rhsAutomaton.hh" #include "equation.hh" #include "equationTable.hh" void EquationTable::compileEquations() { int nrEquations = equations.length(); for (int i = 0; i < nrEquations; i++) equations[i]->compile(true); } bool EquationTable::applyReplace(DagNode* subject, RewritingContext& context, ExtensionInfo* extensionInfo) { for (Equation* eq : equations) { Subproblem* sp; long nrVariables = eq->fastNrVariables(); if (nrVariables >= 0) { // // Fast case. // context.clear(nrVariables); if (eq->getLhsAutomaton()->match(subject, context, sp, extensionInfo)) { if (sp != 0 || RewritingContext::getTraceStatus()) goto slowCase; if (extensionInfo == 0 || extensionInfo->matchedWhole()) eq->getRhsBuilder().replace(subject, context); else { subject->partialReplace(eq->getRhsBuilder().construct(context), extensionInfo); } context.incrementEqCount(); context.finished(); MemoryCell::okToCollectGarbage(); return true; } } else { // // General case. // nrVariables = eq->getNrProtectedVariables(); context.clear(nrVariables); if (eq->getLhsAutomaton()->match(subject, context, sp, extensionInfo)) { slowCase: DebugAdvisory("EquationTable::applyReplace() slowCase:\nsubject = " << subject << "\neq = " << eq); if (sp == 0 || sp->solve(true, context)) { if (!(eq->hasCondition()) || eq->checkCondition(subject, context, sp)) { bool trace = RewritingContext::getTraceStatus(); if (trace) { context.tracePreEqRewrite(subject, eq, RewritingContext::NORMAL); if (context.traceAbort()) { delete sp; context.finished(); break; } } if (extensionInfo == 0 || extensionInfo->matchedWhole()) eq->getRhsBuilder().replace(subject, context); else { subject->partialReplace(eq->getRhsBuilder().construct(context), extensionInfo); } context.incrementEqCount(); if (trace) context.tracePostEqRewrite(subject); delete sp; context.finished(); MemoryCell::okToCollectGarbage(); return true; } } delete sp; } } context.finished(); MemoryCell::okToCollectGarbage(); // matching process may create new DAG nodes } return false; } bool EquationTable::applyReplaceNoOwise(DagNode* subject, RewritingContext& context, ExtensionInfo* extensionInfo) { for (Equation* eq : equations) { Subproblem* sp; // // Except for this one if statement, this fuction is identical // to the previous one. // if (eq->isOwise()) break; long nrVariables = eq->fastNrVariables(); if (nrVariables >= 0) { // // Fast case. // context.clear(nrVariables); if (eq->getLhsAutomaton()->match(subject, context, sp, extensionInfo)) { if (sp != 0 || RewritingContext::getTraceStatus()) goto slowCase; if (extensionInfo == 0 || extensionInfo->matchedWhole()) eq->getRhsBuilder().replace(subject, context); else { subject->partialReplace(eq->getRhsBuilder().construct(context), extensionInfo); } context.incrementEqCount(); context.finished(); MemoryCell::okToCollectGarbage(); return true; } } else { // // General case. // nrVariables = eq->getNrProtectedVariables(); context.clear(nrVariables); if (eq->getLhsAutomaton()->match(subject, context, sp, extensionInfo)) { slowCase: if (sp == 0 || sp->solve(true, context)) { if (!(eq->hasCondition()) || eq->checkCondition(subject, context, sp)) { bool trace = RewritingContext::getTraceStatus(); if (trace) { context.tracePreEqRewrite(subject, eq, RewritingContext::NORMAL); if (context.traceAbort()) { delete sp; context.finished(); break; } } if (extensionInfo == 0 || extensionInfo->matchedWhole()) eq->getRhsBuilder().replace(subject, context); else { subject->partialReplace(eq->getRhsBuilder().construct(context), extensionInfo); } context.incrementEqCount(); if (trace) context.tracePostEqRewrite(subject); delete sp; context.finished(); MemoryCell::okToCollectGarbage(); return true; } } delete sp; } } context.finished(); MemoryCell::okToCollectGarbage(); // matching process may create new DAG nodes } return false; } void EquationTable::resetEachEquation() { for (Equation* eq : equations) eq->reset(); } #ifdef DUMP void EquationTable::dumpEquationTable(ostream& s, int indentLevel) { for (Equation* eq : equations) for (int i = 0; i < equations.length(); i++) { LhsAutomaton* a = eq->getLhsAutomaton(); if (a != 0) a->dump(s, *eq, indentLevel); } } #endif Maude-Maude3.2/src/Core/equationTable.hh000066400000000000000000000036151420036611000201600ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Abstract class for table of equations indexed under some symbol. // #ifndef _equationTable_hh_ #define _equationTable_hh_ class EquationTable { public: void offerEquation(Equation* equation); const Vector& getEquations() const; bool equationFree() const; virtual void compileEquations(); void resetEachEquation(); protected: virtual bool acceptEquation(Equation* equation) = 0; bool applyReplace(DagNode* subject, RewritingContext& context, ExtensionInfo* extensionInfo = 0); bool applyReplaceNoOwise(DagNode* subject, RewritingContext& context, ExtensionInfo* extensionInfo = 0); #ifdef DUMP virtual void dumpEquationTable(ostream& s, int indentLevel); #endif private: Vector equations; }; inline void EquationTable::offerEquation(Equation* equation) { if (acceptEquation(equation)) equations.append(equation); } inline const Vector& EquationTable::getEquations() const { return equations; } inline bool EquationTable::equationFree() const { return equations.isNull(); } #endif Maude-Maude3.2/src/Core/extensionMatchSubproblem.cc000066400000000000000000000050171420036611000223730ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class ExtensionMatchSubproblem. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" #include "lhsAutomaton.hh" #include "extensionInfo.hh" // core class definitions #include "rewritingContext.hh" #include "localBinding.hh" #include "extensionMatchSubproblem.hh" ExtensionMatchSubproblem::ExtensionMatchSubproblem(LhsAutomaton* pattern, ExtensionInfo* extensionInfo, int nrVariables) : pattern(pattern), extensionInfo(extensionInfo), local(nrVariables) { difference = 0; subproblem = 0; } ExtensionMatchSubproblem::~ExtensionMatchSubproblem() { delete difference; delete subproblem; } bool ExtensionMatchSubproblem::solve(bool findFirst, RewritingContext& solution) { if (findFirst) { DagNode* d = extensionInfo->buildMatchedPortion(); if (extensionInfo->matchedWhole()) d = d->makeClone(); // match may assign whole subject to a variable matchedPortion.setNode(d); // protection from garbage collection local.copy(solution); if (!(pattern->match(d, local, subproblem))) return false; difference = local - solution; if (difference != 0) difference->assert(solution); if (subproblem == 0 || subproblem->solve(true, solution)) return true; } else { if (subproblem != 0 && subproblem->solve(false, solution)) return true; } if (difference != 0) { difference->retract(solution); delete difference; difference = 0; } delete subproblem; subproblem = 0; return false; } Maude-Maude3.2/src/Core/extensionMatchSubproblem.hh000066400000000000000000000031021420036611000223760ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for subproblems where we have to match the matched portion of a subject // given by extension information agaisnt a second pattern. // #ifndef _extensionMatchSubproblem_hh_ #define _extensionMatchSubproblem_hh_ #include "subproblem.hh" #include "dagRoot.hh" #include "substitution.hh" class ExtensionMatchSubproblem : public Subproblem { public: ExtensionMatchSubproblem(LhsAutomaton* pattern, ExtensionInfo* extensionInfo, int nrVariables); ~ExtensionMatchSubproblem(); bool solve(bool findFirst, RewritingContext& solution); private: LhsAutomaton* const pattern; ExtensionInfo* const extensionInfo; DagRoot matchedPortion; LocalBinding* difference; Subproblem* subproblem; Substitution local; }; #endif Maude-Maude3.2/src/Core/frame.hh000066400000000000000000000113741420036611000164560ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 2013 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for excution frames on the stack machine. // #ifndef _frame_hh_ #define _frame_hh_ #include "instruction.hh" class Frame { // // Frames can't have ctors, dtors or virtual functions because of the way we // allocate and deallocate them. // NO_COPYING(Frame); public: // // Setting and getting slot values. // void setSlot(Instruction::SlotIndex index, DagNode* value); DagNode* getSlot(Instruction::SlotIndex index) const; DagNode** getArgumentListPtr(); DagNode* const* getArgumentListPtr() const; // // Setting a return address and returning values. // void setReturnAddress(Frame* ancestor, Instruction::SlotIndex index); void setReturnAddress(DagNode** absoluteAddress); void returnValue(DagNode* value) const; // // Setting and getting the next instruction pointer. // void setNextInstruction(const Instruction* instruction); const Instruction* getNextInstruction() const; // // Setting and getting the ancestor frame. // void setAncestorWithValidNextInstruction(Frame* ancestor); Frame* getAncestorWithValidNextInstruction() const; Frame* fastPop() const; // // Copying return information from a deadFrame into a new frame. // void copyReturnInfo(const Frame* deadFrame); // // Mark active slots, depending on our instruction. // void markActiveSlots() const; private: // // Each instruction is responsible for either disposing of the frame or updating the // nextInstruction pointer. // const Instruction* nextInstruction; // // In the case that the frame is to be disposed of, the instruction has to return a // value by writting it to a slot located in some earlier frame. // DagNode** returnAddress; // // When a frame is finished we need to go to the ancestor frame that still has // a valid next instructuion. // Frame* ancestorWithValidNextInstruction; // // The main contents of a frame is a block of slots for holding substitutions and // partly built dags. The size of this block depends on the amount of space allocated // for the frame. // DagNode* slots[0]; }; inline void Frame::setSlot(Instruction::SlotIndex index, DagNode* value) { // Assert(((void*) value) > ((void*) this) + 10000 || // ((void*) value) + 10000 < ((void*) this), "dag node point shouldn't be close to fame pointer"); slots[index] = value; } inline DagNode* Frame::getSlot(Instruction::SlotIndex index) const { return slots[index]; } inline DagNode** Frame::getArgumentListPtr() { return slots; } inline DagNode* const* Frame::getArgumentListPtr() const { return slots; } inline void Frame::setReturnAddress(Frame* ancestor, Instruction::SlotIndex index) { returnAddress = &(ancestor->slots[index]); } inline void Frame::setReturnAddress(DagNode** absoluteAddress) { returnAddress = absoluteAddress; } inline void Frame::returnValue(DagNode* value) const { // Assert(((void*) value) > ((void*) this) + 10000 || // ((void*) value) + 10000 < ((void*) this), "dag node point shouldn't be close to fame pointer"); *returnAddress = value; } inline void Frame::setNextInstruction(const Instruction* instruction) { nextInstruction = instruction; } inline const Instruction* Frame::getNextInstruction() const { return nextInstruction; } inline void Frame::setAncestorWithValidNextInstruction(Frame* ancestor) { ancestorWithValidNextInstruction = ancestor; } inline Frame* Frame::getAncestorWithValidNextInstruction() const { return ancestorWithValidNextInstruction; } inline Frame* Frame::fastPop() const { return ancestorWithValidNextInstruction; } inline void Frame::copyReturnInfo(const Frame* deadFrame) { // // We copy the return information from a dead frame into a new frame. // returnAddress = deadFrame->returnAddress; ancestorWithValidNextInstruction = deadFrame->ancestorWithValidNextInstruction; } inline void Frame::markActiveSlots() const { nextInstruction->markActiveSlots(this); } #define FRAME_SIZE_HACK 5 #endif Maude-Maude3.2/src/Core/freshVariableGenerator.hh000066400000000000000000000033741420036611000220110ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2016 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Abstract base class for fresh variable generation. // #ifndef _freshVariableGenerator_hh_ #define _freshVariableGenerator_hh_ class FreshVariableGenerator { public: virtual ~FreshVariableGenerator() {} virtual int getFreshVariableName(int index, int family) = 0; virtual Symbol* getBaseVariableSymbol(Sort* sort) = 0; // // The following member function checks if a given variable name could conflict // with a future fresh variable that it might generate. // virtual bool variableNameConflict(int id, int okFamily = NONE) = 0; // // The following member function checks if a given variable name belongs to // the given family. // virtual bool belongsToFamily(int id, int family) = 0; // // Checks if the variable has a name we could generate, and if so // returns the index and family that will generate it. // virtual bool isFreshVariableName(int id, int& index, int& family) = 0; }; #endif Maude-Maude3.2/src/Core/hashConsSet.cc000066400000000000000000000071361420036611000175750ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2009 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class HashConsSet // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" // core class definitions #include "hashConsSet.hh" int HashConsSet::insert(DagNode* d) { unsigned int hashValue = d->getHashValue(); int index = pointer2Index(d, hashValue); if (index != NONE) { // // We found a canonical copy of d that is already in the table. // // There is an issue however that d might have a calculated sort where as // the canonical copy may not, and using the canonical copy as part of some // larger insertion where d is subterm could lead to dags in the table // where unsortedness occurs other than at the top (in the memo case). // // getCanonical(index)->upgradeSortIndex(d); return index; } return PointerSet::insert(d->symbol()->makeCanonical(d, this), hashValue); } int HashConsSet::insertCopy(DagNode* d) { // // The only difference form the above function is we never insert the original; if there is // no existing copy and we're not forced to make a copy because of non-canonical arguments, we // make a copy anyway. // This is useful where the original may be reduced in place and is therefore not safe to put // in a hash cons table. // // We make an assumption here that that any sort in d is either unknown or unimportant. // unsigned int hashValue = d->getHashValue(); int index = pointer2Index(d, hashValue); return (index == NONE) ? PointerSet::insert(d->symbol()->makeCanonicalCopy(d, this), hashValue) : index; } unsigned int HashConsSet::hash(void* /* pointer */) const { CantHappen("should never be called"); return 0; } bool HashConsSet::isEqual(void* pointer1, void* pointer2) const { DagNode* d1 = static_cast(pointer1); DagNode* d2 = static_cast(pointer2); return d1->equal(d2); } void HashConsSet::markReachableNodes() { int nrDagNodes = cardinality(); for (int i = 0; i < nrDagNodes; ++i) getCanonical(i)->mark(); } #ifndef NO_ASSERT // // Analysis/debugging of collisions. // void HashConsSet::collision(void* pointer1, unsigned int rawHashValue1, void* pointer2, unsigned int rawHashValue2, unsigned int tableSize, unsigned int disputedSlot) const { ++collisionCounter; /* DebugAdvisory("HashConsSet::collision() new dag = " << static_cast(pointer1) << " hash code = " << rawHashValue1 << " old dag = " << static_cast(pointer2) << " hash code = " << rawHashValue2 << " hash table size = " << tableSize << " used = " << cardinality() << " slot = " << disputedSlot); */ } #endif Maude-Maude3.2/src/Core/hashConsSet.hh000066400000000000000000000041361420036611000176040ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2009 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for hash cons'd set of pointers to dag nodes. // #ifndef _hashConsSet_hh_ #define _hashConsSet_hh_ #include "pointerSet.hh" #include "simpleRootContainer.hh" class HashConsSet : private PointerSet, private SimpleRootContainer { public: #ifndef NO_ASSERT // // Analysis/debugging of collisions. // mutable Int64 collisionCounter; void collision(void* pointer1, unsigned int rawHashValue1, void* pointer2, unsigned int rawHashValue2, unsigned int tableSize, unsigned int disputedSlot) const; HashConsSet() { collisionCounter = 0;} #endif // // Returns an index that is unique to dag node. // int insert(DagNode* d); // // As above, but unreduced eager dag nodes are always // copied and can never become canonical. // int insertCopy(DagNode* d); // // Returns the canonical dag node for the index. // DagNode* getCanonical(int index) const; private: // // For PointerSet call backs. // unsigned int hash(void* pointer) const; bool isEqual(void* pointer1, void* pointer2) const; // // To protect hash cons'd dagnodes from garbage collection. // void markReachableNodes(); }; inline DagNode* HashConsSet::getCanonical(int index) const { return static_cast(index2Pointer(index)); } #endif Maude-Maude3.2/src/Core/label.hh000066400000000000000000000020341420036611000164340ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for rule labels. // #ifndef _label_hh_ #define _label_hh_ class Label : public NamedEntity { public: Label(int id); }; inline Label::Label(int id) : NamedEntity(id) { } #endif Maude-Maude3.2/src/Core/lineNumber.hh000066400000000000000000000027011420036611000174560ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for line numbers. // #ifndef _lineNumber_hh_ #define _lineNumber_hh_ class LineNumber { public: LineNumber(int lineNumber = UNDEFINED); int getLineNumber() const; void setLineNumber(int lineNr); private: int lineNumber; }; inline LineNumber::LineNumber(int lineNumber) : lineNumber(lineNumber) { } inline int LineNumber::getLineNumber() const { return lineNumber; } inline void LineNumber::setLineNumber(int lineNr) { lineNumber = lineNr; } // // Output function for LineNumber must be defined by library user. // ostream& operator<<(ostream& s, const LineNumber& lineNumber); #endif Maude-Maude3.2/src/Core/localBinding.cc000066400000000000000000000073101420036611000177320ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2010 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class Substitution // // utility stuff #include "macros.hh" #include "vector.hh" #include "indent.hh" //#include "variable.hh" // forward declarations #include "interface.hh" #include "core.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" // core class definitions #include "variableInfo.hh" #include "substitution.hh" #include "subproblemAccumulator.hh" #include "localBinding.hh" LocalBinding::LocalBinding(int maxSize) : bindings(0, maxSize) { } void LocalBinding::markReachableNodes() { int nrBindings = bindings.length(); for (int i = 0; i < nrBindings; i++) { Assert(bindings[i].value != 0, "null local binding at index " << i); bindings[i].value->mark(); } } bool LocalBinding::assert(Substitution& substitution) { const Vector::iterator b = bindings.begin(); const Vector::iterator e = bindings.end(); for (Vector::iterator i = b; i != e; ++i) { DagNode* d = substitution.value(i->variableIndex); if (d != 0 && !(d->equal(i->value))) return false; } for (Vector::iterator i = b; i != e; ++i) { int index = i->variableIndex; if (substitution.value(index) == 0) { substitution.bind(index, i->value); i->active = true; } } return true; } void LocalBinding::retract(Substitution& substitution) { const Vector::iterator e = bindings.end(); for (Vector::iterator i = bindings.begin(); i != e; ++i) { if (i->active) { i->active = false; substitution.bind(i->variableIndex, 0); } } } #ifdef DUMP void LocalBinding::dump(ostream& s, const VariableInfo& variableInfo, int indentLevel) const { s << Indent(indentLevel) << "Begin{LocalBinding}\n"; ++indentLevel; // s << Indent(indentLevel) << "this = " << this << "\tprev = " << prev << // "\tnext = " << next << '\n'; int nrBindings = bindings.length(); for (int i = 0; i < nrBindings; i++) { int index = bindings[i].variableIndex; s << Indent(indentLevel) << "index = " << index << " \"" << variableInfo.index2Variable(index) << "\"\tvalue = " << bindings[i].value << "\t("; if (!(bindings[i].active)) s << "not "; s << "active)\n"; } s << Indent(indentLevel - 1) << "End{LocalBinding}\n"; } void LocalBinding::dump(ostream& s, const VariableInfo* variableInfo) const { s << "Dumping LocalBinding (" << this << ")\n"; // s << "prev = " << prev << "\tnext = " << next << '\n'; int nrBindings = bindings.length(); for (int i = 0; i < nrBindings; i++) { if (variableInfo != 0) s << variableInfo->index2Variable(bindings[i].variableIndex); else s << "index:" << bindings[i].variableIndex; s << "\t=\t" << bindings[i].value << "\t("; if (!(bindings[i].active)) s << "not "; s << "active)\n"; } } #endif Maude-Maude3.2/src/Core/localBinding.hh000066400000000000000000000034501420036611000177450ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2010 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for local bindings within matching subproblems. // #ifndef _localBinding_hh_ #define _localBinding_hh_ #include "simpleRootContainer.hh" #undef assert //HACK class LocalBinding : private SimpleRootContainer { NO_COPYING(LocalBinding); public: LocalBinding(int maxSize); void addBinding(int index, DagNode* value); bool assert(Substitution& substitution); void retract(Substitution& substitution); #ifdef DUMP void dump(ostream& s, const VariableInfo& variableInfo, int indentLevel) const; void dump(ostream& s, const VariableInfo* variableInfo = 0) const; #endif private: struct Binding { bool active; int variableIndex; DagNode* value; }; void markReachableNodes(); Vector bindings; }; inline void LocalBinding::addBinding(int index, DagNode* value) { int t = bindings.length(); bindings.expandBy(1); Binding& b = bindings[t]; b.variableIndex = index; b.value = value; b.active = false; } #endif Maude-Maude3.2/src/Core/memoMap.cc000066400000000000000000000030141420036611000167350ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class MemoTable. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" // core class definitions" #include "memoMap.hh" int MemoMap::getFromIndex(DagNode* fromDag) { // // We assume that a fromDag is unreduced and therefore we never use // the original in the hash cons table incase it is reduced in place. // int fromIndex = dags.insertCopy(fromDag); int nrFromDags = toIndices.size(); if (fromIndex >= nrFromDags) { toIndices.resize(fromIndex + 1); for (int i = nrFromDags; i <= fromIndex; ++i) toIndices[i] = NONE; } return fromIndex; } Maude-Maude3.2/src/Core/memoMap.hh000066400000000000000000000030351420036611000167520ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for hash cons'd cache of from-dags and to-dags together with their // equational rewrite mapping // #ifndef _memoMap_hh_ #define _memoMap_hh_ #include "hashConsSet.hh" class MemoMap { public: int getFromIndex(DagNode* fromDag); DagNode* getToDag(int fromIndex) const; void assignToDag(int fromIndex, DagNode* toDag); private: HashConsSet dags; Vector toIndices; // maps from-indices to to-indices }; inline DagNode* MemoMap::getToDag(int fromIndex) const { int toIndex = toIndices[fromIndex]; return toIndex == NONE ? 0 : dags.getCanonical(toIndex); } inline void MemoMap::assignToDag(int fromIndex, DagNode* toDag) { toIndices[fromIndex] = dags.insert(toDag); } #endif Maude-Maude3.2/src/Core/memoTable.cc000066400000000000000000000050261420036611000172540ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class MemoTable. // #include // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" // core class definitions #include "rewritingContext.hh" #include "memoMap.hh" #include "memoTable.hh" bool MemoTable::memoRewrite(SourceSet& sourceSet, DagNode* subject, RewritingContext& context) { #if 0 DebugAdvisory("memoRewrite() subject " << subject << " at " << ((void*) subject) << " has sort index " << subject->getSortIndex()); #endif MemoMap* memoMap = getModule()->getMemoMap(); int subjectIndex = memoMap->getFromIndex(subject); if (DagNode* toDag = memoMap->getToDag(subjectIndex)) { #if 0 DebugAdvisory("memoRewrite() toDag " << subject << " at " << ((void*) toDag) << " has sort index " << subject->getSortIndex()); #endif bool trace = RewritingContext::getTraceStatus(); if (trace) { context.tracePreEqRewrite(subject, 0, RewritingContext::MEMOIZED); if (context.traceAbort()) return false; } toDag->overwriteWithClone(subject); context.incrementEqCount(); if (trace) context.tracePostEqRewrite(subject); return true; } sourceSet.append(subjectIndex); return false; } void MemoTable::memoEnter(SourceSet& sourceSet, DagNode* destination) { #if 0 DebugAdvisory("memoEnter() destination " << destination << " at " << ((void*) destination) << " has sort index " << destination->getSortIndex()); #endif MemoMap* memoMap = getModule()->getMemoMap(); for (int index : sourceSet) memoMap->assignToDag(index, destination); } Maude-Maude3.2/src/Core/memoTable.hh000066400000000000000000000027411420036611000172670ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for memoization tables. // // In the current implmentation this is just a shell - the actually dag nodes are store // in the module. // #ifndef _memoTable_hh_ #define _memoTable_hh_ class MemoTable : public ModuleItem { public: typedef Vector SourceSet; MemoTable(bool memoFlag); bool isMemoized() const; bool memoRewrite(SourceSet& sourceSet, DagNode* subject, RewritingContext& context); void memoEnter(SourceSet& sourceSet, DagNode* destination); private: const bool memo; }; inline MemoTable::MemoTable(bool memoFlag) : memo(memoFlag) { } inline bool MemoTable::isMemoized() const { return memo; } #endif Maude-Maude3.2/src/Core/memoryBlock.hh000066400000000000000000000041151420036611000176420ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2019 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for the storage part of a MemoryCell. // This memory is only accessed by the classes where it is suppplied via // a call to new, with one except, where we know it was allocated as // a DagNode and we treat it as a DagNode to call the DagNode virtual // destructor. // #ifndef _memoryBlock_hh_ #define _memoryBlock_hh_ class MemoryBlock { NO_COPYING(MemoryBlock); protected: // // A MemoryInfo object can only be created as part of MemoryCell. // MemoryBlock(){}; void callDtor(); private: enum Sizes { // // MemoryCells have this much extra memory allocated for // derived classes to use. Some uses require at least room // for 5 pointers so this is the minimum value. // NR_EXTRA_WORDS = 5 // minimum value seems best on average }; MachineWord filler[NR_EXTRA_WORDS]; }; inline void MemoryBlock::callDtor() { // // First we get the void* pointer that was returned during allocation. // void* p = this; // // Then because we know it was allocated as a DagNode, we convert // it to a DagNode* pointer. // DagNode* d = static_cast(p); // // Finally we call the DagNode* virtual destructor to clean up so // this memory block can be reused. // d->~DagNode(); } #endif Maude-Maude3.2/src/Core/memoryCell.cc000066400000000000000000000240121420036611000174530ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for base class MemoryCell // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "symbol.hh" #include "dagNode.hh" #include "rootContainer.hh" #include "memoryCell.hh" struct MemoryCell::Arena { union { Arena* nextArena; Int64 alignmentDummy; // force 8 byte alignment for MemoryCell objects }; MemoryCell storage[ARENA_SIZE]; MemoryCell* firstNode(); }; inline MemoryCell* MemoryCell::Arena::firstNode() { return storage; } bool MemoryCell::showGC = false; // // Arena management variables. // int MemoryCell::nrArenas = 0; int nrNodesInUse = 0; // FIX ME bool MemoryCell::currentArenaPastActiveArena = true; bool MemoryCell::needToCollectGarbage = false; MemoryCell::Arena* MemoryCell::firstArena = 0; MemoryCell::Arena* MemoryCell::lastArena = 0; MemoryCell::Arena* MemoryCell::currentArena = 0; MemoryCell* MemoryCell::nextNode = 0; MemoryCell* MemoryCell::endPointer = 0; MemoryCell::Arena* MemoryCell::lastActiveArena = 0; MemoryCell* MemoryCell::lastActiveNode = 0; // // Bucket management variables. // int MemoryCell::nrBuckets = 0; MemoryCell::Bucket* MemoryCell::bucketList = 0; MemoryCell::Bucket* MemoryCell::unusedList = 0; size_t MemoryCell::bucketStorage = 0; size_t MemoryCell::storageInUse = 0; size_t MemoryCell::target = INITIAL_TARGET; MemoryCell::Arena* MemoryCell::allocateNewArena() { #ifdef GC_DEBUG cerr << "allocateNewArena()\n"; dumpMemoryVariables(cerr); #endif Arena* a = new Arena; a->nextArena = 0; if (lastArena == 0) firstArena = a; else lastArena->nextArena = a; lastArena = a; MemoryCell* d = a->firstNode(); for (int i = 0; i < ARENA_SIZE; i++, d++) d->clearAllFlags(); ++nrArenas; return a; } MemoryCell* MemoryCell::slowNew() { #ifdef GC_DEBUG cerr << "slowNew()\n"; dumpMemoryVariables(cerr); #endif for(;;) { if (currentArena == 0) { // // Allocate first arena. // currentArena = allocateNewArena(); MemoryCell* d = currentArena->firstNode(); endPointer = d + ARENA_SIZE - RESERVE_SIZE; //Assert(d->h.flags == 0, "flags not cleared"); return d; } Arena* a = currentArena->nextArena; if (a == 0) { needToCollectGarbage = true; MemoryCell* e = currentArena->firstNode() + ARENA_SIZE; if (endPointer != e) { // // Use up reserve. // nextNode = endPointer; // nextNode is invalid where we are called endPointer = e; } else { // // Allocate a new arena. // if (currentArena == lastActiveArena) currentArenaPastActiveArena = true; currentArena = allocateNewArena(); MemoryCell* d = currentArena->firstNode(); endPointer = d + ARENA_SIZE; //Assert(d->h.flags == 0, "flags not cleared"); return d; } } else { // // Use next arena. // if (currentArena == lastActiveArena) currentArenaPastActiveArena = true; currentArena = a; nextNode = a->firstNode(); endPointer = nextNode + ((a->nextArena != 0) ? ARENA_SIZE : ARENA_SIZE - RESERVE_SIZE); } // // Now execute lazy sweep to actually find a free location // #ifdef GC_DEBUG checkInvariant(); #endif MemoryCell* e = endPointer; for (MemoryCell* d = nextNode; d != e; d++) { if (d->simpleReuse()) { return d; } if (!(d->isMarked())) { d->callDtor(); return d; } d->clearFlag(MARKED); } } } void* MemoryCell::slowAllocateStorage(size_t bytesNeeded) { Bucket* p = 0; for (Bucket* b = unusedList; b; p = b, b = b->nextBucket) { if (b->bytesFree >= bytesNeeded) { // // Move b from unused list to bucket list // if (p == 0) unusedList = b->nextBucket; else p->nextBucket = b->nextBucket; b->nextBucket = bucketList; bucketList = b; // // Allocate storage from b // b->bytesFree -= bytesNeeded; void* t = b->nextFree; b->nextFree = static_cast(t) + bytesNeeded; return t; } } // // Create new bucket // size_t size = BUCKET_MULTIPLIER * bytesNeeded; if (size < MIN_BUCKET_SIZE) size = MIN_BUCKET_SIZE; Bucket* b = static_cast(operator new[](size)); ++nrBuckets; void* t = b + 1; size_t nrBytes = size - sizeof(Bucket); bucketStorage += nrBytes; b->nrBytes = nrBytes; b->bytesFree = nrBytes - bytesNeeded; b->nextFree = static_cast(t) + bytesNeeded; b->nextBucket = bucketList; bucketList = b; return t; } void MemoryCell::tidyArenas() { #ifdef GC_DEBUG cerr << "tidyArenas()\n"; dumpMemoryVariables(cerr); #endif // // Tidy up lazy sweep phase - clear marked flags and call dtors // where necessary. // Arena* newLastActiveArena = currentArena; MemoryCell* newLastActiveNode = nextNode - 1; // nextNode never points to first node if (!currentArenaPastActiveArena) { // // First tidy arenas from current up to lastActive. // MemoryCell* d = nextNode; Arena* c = currentArena; for (; c != lastActiveArena; c = c->nextArena, d = c->firstNode()) { MemoryCell* e = c->firstNode() + ARENA_SIZE; for (; d != e; d++) { if (d->isMarked()) { newLastActiveArena = c; newLastActiveNode = d; d->clearFlag(MARKED); } else { if (d->needToCallDtor()) d->callDtor(); d->clearAllFlags(); } } } // // Now tidy lastActiveArena from d upto and including lastActiveNode. // MemoryCell* e = lastActiveNode; for(; d <= e; d++) { if (d->isMarked()) { newLastActiveArena = c; newLastActiveNode = d; d->clearFlag(MARKED); } else { if (d->needToCallDtor()) d->callDtor(); d->clearAllFlags(); } } } lastActiveArena = newLastActiveArena; lastActiveNode = newLastActiveNode; } void MemoryCell::collectGarbage() { if (firstArena == 0) return; tidyArenas(); #ifdef GC_DEBUG checkArenas(); #endif // // Mark phase // nrNodesInUse = 0; size_t oldStorageInUse = storageInUse; Bucket* b = bucketList; bucketList = unusedList; unusedList = 0; storageInUse = 0; RootContainer::markPhase(); unusedList = b; for (; b; b = b->nextBucket) { b->bytesFree = b->nrBytes; b->nextFree = b + 1; // reset } size_t newTarget = TARGET_MULTIPLIER * storageInUse; if (target < newTarget) target = newTarget; // // Calculate if we should allocate more arenas to avoid an early gc. // int nrNodes = nrArenas * ARENA_SIZE; if (showGC) { cout << "Arenas: " << nrArenas << "\tNodes: " << nrNodes << // "\tIn use: " << nrNodesInUse << // "\tCollected: " << reclaimed << "\tNow: " << nrNodesInUse << "\nBuckets: " << nrBuckets << "\tBytes: " << bucketStorage << "\tIn use: " << oldStorageInUse << "\tCollected: " << oldStorageInUse - storageInUse << "\tNow: " << storageInUse << '\n'; } // // Allocate new arenas so that we have at least 50% of nodes unused. // int neededArenas = ceilingDivision(2 * nrNodesInUse, ARENA_SIZE); while (nrArenas < neededArenas) (void) allocateNewArena(); // // Reset node stuff. // currentArenaPastActiveArena = false; currentArena = firstArena; nextNode = currentArena->firstNode(); endPointer = nextNode + ((firstArena->nextArena != 0) ? ARENA_SIZE : ARENA_SIZE - RESERVE_SIZE); needToCollectGarbage = false; #ifdef GC_DEBUG // stompArenas(); cerr << "end of GC\n"; dumpMemoryVariables(cerr); #endif } #ifdef GC_DEBUG void MemoryCell::stompArenas() { for (Arena* a = firstArena; a != 0; a = a->nextArena) { MemoryCell* d = a->firstNode(); for (int i = 0; i < ARENA_SIZE; i++, d++) { if (!(d->h.flags & MARKED) && !(d->h.flags & CALL_DTOR)) d->topSymbol = reinterpret_cast(0x33); } } } void MemoryCell::checkArenas() { int n = 0; for (Arena* a = firstArena; a != 0; a = a->nextArena, n++) { MemoryCell* d = a->firstNode(); for (int i = 0; i < ARENA_SIZE; i++, d++) { if (d->h.flags & MARKED) { cerr << "checkArenas(): MARKED DagNode! arena = " << n << " node = " << i << '\n'; } } } } void MemoryCell::checkInvariant() { int n = 0; for (Arena* a = firstArena;; a = a->nextArena, n++) { MemoryCell* d = a->firstNode(); int bound = (a == currentArena) ? nextNode - d : ARENA_SIZE; for (int i = 0; i < bound; i++, d++) { if (d->h.flags & MARKED) { cerr << "checkInvariant() : MARKED DagNode! arena = " << n << " node = " << i << '\n'; } } if (a == currentArena) break; } } void MemoryCell::dumpMemoryVariables(ostream& s) { s << "nrArenas = " << nrArenas << "\nnrNodesInUse = " << nrNodesInUse << "\ncurrentArenaPastActiveArena = " << currentArenaPastActiveArena << "\nneedToCollectGarbage = " << needToCollectGarbage << "\nfirstArena = " << firstArena << "\nlastArena = " << lastArena << "\ncurrentArena = " << currentArena << "\nnextNode = " << static_cast(nextNode) << "\nendPointer = " << static_cast(endPointer) << "\nlastActiveArena = " << lastActiveArena << "\nlastActiveNode = " << static_cast(lastActiveNode) << "\n\n"; } #endif Maude-Maude3.2/src/Core/memoryCell.hh000066400000000000000000000143301420036611000174670ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for small garbage collected chunks of memory. // #ifndef _memoryCell_hh_ #define _memoryCell_hh_ #include "memoryInfo.hh" #include "memoryBlock.hh" #include "sort.hh" class MemoryCell : private MemoryBlock, public MemoryInfo { NO_COPYING(MemoryCell); // // MemoryCell objects can only be created by members of this class. // MemoryCell(){}; public: // // This is the raison d'etre for MemoryCell - fast allocation // of small garbage collected chunks of memory. // static void* allocateMemoryCell(); static void* allocateStorage(size_t bytesNeeded); // // Normally we just inform the allocator at times when all the non-garbage // is accessible via root pointers. // static void okToCollectGarbage(); // // Sometime we want separate the check and the call to the garbage collector // so we can do some extra work just before a garbage collect to make // sure all non-garbage is accessible from root pointers. // static bool wantToCollectGarbage(); static void collectGarbage(); static void setShowGC(bool polarity); // // We provide functions for getting access to the MemoryInfo object // corresponding the a memory block we allocated. // static MemoryInfo* getMemoryInfo(void* p); static const MemoryInfo* getMemoryInfo(const void* p); private: enum MemoryManagementParameters { ARENA_SIZE = 5460, // arena size in nodes; // 5460 * 6 + 1 + new/malloc_overhead <= 32768 words RESERVE_SIZE = 256, // if fewer nodes left call GC when allowed BUCKET_MULTIPLIER = 8, // to determine bucket size for huge allocations MIN_BUCKET_SIZE = 256 * 1024 - 8, // bucket size for normal allocations INITIAL_TARGET = 220 * 1024, // just under 8/9 of MIN_BUCKET_SIZE TARGET_MULTIPLIER = 8 // to determine bucket usage target }; struct Arena; // arena of fixed size nodes struct Bucket; // bucket of variable length allocations static bool showGC; // do we report GC stats to user // // Arena management variables. // static int nrArenas; //static int nrNodesInUse; static bool currentArenaPastActiveArena; static bool needToCollectGarbage; static Arena* firstArena; static Arena* lastArena; static Arena* currentArena; static MemoryCell* nextNode; static MemoryCell* endPointer; static Arena* lastActiveArena; static MemoryCell* lastActiveNode; // // Bucket management variables. // static int nrBuckets; // total number of buckets static Bucket* bucketList; // linked list of "in use" buckets static Bucket* unusedList; // linked list of unused buckets static size_t bucketStorage; // total amount of bucket storage (bytes) static size_t storageInUse; // amount of bucket storage in use (bytes) static size_t target; // amount to use before GC (bytes) static Arena* allocateNewArena(); static void tidyArenas(); static MemoryCell* slowNew(); static void* slowAllocateStorage(size_t bytesNeeded); #ifdef GC_DEBUG static void stompArenas(); static void checkArenas(); static void checkInvariant(); static void dumpMemoryVariables(ostream& s); #endif }; struct MemoryCell::Bucket { size_t bytesFree; void* nextFree; size_t nrBytes; Bucket* nextBucket; }; inline void MemoryCell::okToCollectGarbage() { if (needToCollectGarbage) collectGarbage(); } inline bool MemoryCell::wantToCollectGarbage() { return needToCollectGarbage; } inline void* MemoryCell::allocateStorage(size_t bytesNeeded) { Assert(bytesNeeded % sizeof(MachineWord) == 0, "only whole machine words can be allocated"); storageInUse += bytesNeeded; if (storageInUse > target) needToCollectGarbage = true; for (Bucket* b = bucketList; b; b = b->nextBucket) { if (b->bytesFree >= bytesNeeded) { b->bytesFree -= bytesNeeded; void* t = b->nextFree; b->nextFree = static_cast(t) + bytesNeeded; return t; } } return slowAllocateStorage(bytesNeeded); } inline void MemoryCell::setShowGC(bool polarity) { showGC = polarity; } inline void* MemoryCell::allocateMemoryCell() { #ifdef GC_DEBUG checkInvariant(); #endif MemoryCell* e = endPointer; MemoryCell* c = nextNode; for (;; ++c) { if (c == e) { c = slowNew(); break; } if (c->simpleReuse()) break; if (!(c->isMarked())) { c->callDtor(); break; } c->clearFlag(MARKED); } // could clear flags here nextNode = c + 1; MemoryBlock* b = c; return b; } inline MemoryInfo* MemoryCell::getMemoryInfo(void* p) { // // First convert the void* pointer we returned back into // the MemoryBlock* pointer it came from. // MemoryBlock* b = static_cast(p); // // Then downcast to get a pointer to the full MemoryCell. // MemoryCell* c = static_cast(b); // // Then we can upcast in the return to get a pointer to the MemoryInfo // object associated with this allocation. // return c; } inline const MemoryInfo* MemoryCell::getMemoryInfo(const void* p) { // // First convert the void* pointer we returned back into // the MemoryBlock* pointer it came from. // const MemoryBlock* b = static_cast(p); // // Then downcast to get a pointer to the full MemoryCell. // const MemoryCell* c = static_cast(b); // // Then we can upcast in the return to get a pointer to the MemoryInfo // object associated with this allocation. // return c; } #endif Maude-Maude3.2/src/Core/memoryInfo.hh000066400000000000000000000102311420036611000174770ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2019 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for the info part of a MemoryCell. // The reason for this class is that we need two bits for each cell to hold // the marked and "need to call destructor" flags. In order not to // waste the rest of the word we allow access to the remaining bits. // #ifndef _memoryInfo_hh_ #define _memoryInfo_hh_ #include "sort.hh" class MemoryInfo { NO_COPYING(MemoryInfo); protected: enum Flags { MARKED = 64, // marked in most recent mark phase CALL_DTOR = 128 // call DagNode::~DagNode() before reusing }; // // A MemoryInfo object can only be created as part of MemoryCell. // MemoryInfo(){}; public: // // Flags 1, 2, 4, 8, 16 and 32 are available for derived classes. // Flags 64 and 128 are reserved for garbage collector. // bool getFlag(int flag) const; void setFlag(int flag); void clearFlag(int flag); void copySetFlags(int flags, const MemoryInfo* other); // // Access to garbage collector flags. We can't allow marked flag // to be cleared and it only makes sense to clear the call dtor // flag if we are clearing all flags other than marked. // bool isMarked() const; void setMarked(); bool needToCallDtor() const; void setCallDtor(); bool simpleReuse() const; // // This is needed when a fresh cell is allocated. The reason // for not doing this in the allocation code is to allow the compiler // to combine clearing all flags with immediately setting one or // more flags. // void clearAllFlags(); // // This is needed when we reallocate a node that is already in use // (for in-place replacement of a subterm); the marked flag must // be preserved. // void clearAllExceptMarked(); // // This is used when a fresh cell is allocated and we want to start // with the flags in a state other than all clear. // void initFlags(int flagSet); // // Access to the unused byte and half word. // int getHalfWord() const; void setHalfWord(int hw); int getByte() const; void setByte(int bt); private: Ubyte flags; Byte byte; short halfWord; }; inline bool MemoryInfo::getFlag(int flag) const { return flags & flag; } inline void MemoryInfo::setFlag(int flag) { flags |= flag; } inline void MemoryInfo::clearFlag(int flag) { flags &= ~flag; } inline void MemoryInfo::copySetFlags(int flagSet, const MemoryInfo* other) { flags |= flagSet & other->flags; } inline bool MemoryInfo::isMarked() const { return getFlag(MARKED); } inline void MemoryInfo::setMarked() { extern int nrNodesInUse; // FIXME ++nrNodesInUse; setFlag(MARKED); } inline bool MemoryInfo::needToCallDtor() const { return getFlag(CALL_DTOR); } inline void MemoryInfo::setCallDtor() { setFlag(CALL_DTOR); } inline bool MemoryInfo::simpleReuse() const { // // Neither marked as in-use nor requires the DagNode // destructor to be called before reusing. // return (flags & (MARKED | CALL_DTOR)) == 0; } inline void MemoryInfo::clearAllFlags() { flags = 0; } inline void MemoryInfo::clearAllExceptMarked() { flags &= MARKED; } inline void MemoryInfo::initFlags(int flagSet) { flags = flagSet; } inline int MemoryInfo::getHalfWord() const { return halfWord; } inline void MemoryInfo::setHalfWord(int hw) { halfWord = hw; } inline int MemoryInfo::getByte() const { return byte; } inline void MemoryInfo::setByte(int bt) { byte = bt; } #endif Maude-Maude3.2/src/Core/module.cc000066400000000000000000000311521420036611000166330ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2020 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class Module. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "variable.hh" // interface class definitions #include "term.hh" // core class definitions #include "sortConstraint.hh" #include "equation.hh" #include "rule.hh" #include "sortBdds.hh" #include "memoMap.hh" #include "module.hh" #include "strategyDefinition.hh" #include "rewriteStrategy.hh" // variable class definitions #include "variableTerm.hh" Module::Module(int id) : NamedEntity(id) { status = OPEN; sortBdds = 0; minimumSubstitutionSize = 1; memoMap = 0; } Module::~Module() { DebugAdvisory("destructing module " << this); delete sortBdds; // // This is delicate; first we lose any root pointers to // dag nodes that might contain pointers to our symbols. // clearMemo(); reset(); // // Then we delete everything except for the symbols. // for (Sort* s : sorts) delete s; for (ConnectedComponent* c : connectedComponents) delete c; for (SortConstraint* sc : sortConstraints) delete sc; for (Equation* eq : equations) delete eq; for (Rule* rl : rules) delete rl; for (StrategyDefinition* sd : strategyDefinitions) delete sd; for (RewriteStrategy* rs : strategies) delete rs; // // And finally it is safe to delete our symbols. // #if 1 for (Symbol* s : symbols) delete s; #else // // Trample over Symbols rather than deleting them, in order // to look for bugs. // int nrSymbols = symbols.length(); for (int i = 0; i < nrSymbols; ++i) { void* p = symbols[i]; cerr << "deleting " << symbols[i] << " at "<< p << endl; memset(p, -1, sizeof(Symbol)); } #endif } const SortBdds* Module::getSortBdds() { if (sortBdds == 0) sortBdds = new SortBdds(this); return sortBdds; } void Module::insertSortConstraint(SortConstraint* sortConstraint) { Assert(status < THEORY_CLOSED, "bad status"); sortConstraint->setModuleInfo(this, sortConstraints.length()); sortConstraints.append(sortConstraint); sortConstraint->check(); } void Module::insertEquation(Equation* equation) { Assert(status < THEORY_CLOSED, "bad status"); equation->setModuleInfo(this, equations.length()); equations.append(equation); equation->check(); } void Module::insertRule(Rule* rule) { Assert(status < THEORY_CLOSED, "bad status"); rule->setModuleInfo(this, rules.length()); rules.append(rule); rule->check(); } void Module::insertStrategy(RewriteStrategy* strategy) { Assert(status < THEORY_CLOSED, "bad status"); strategy->setModuleInfo(this, strategies.length()); strategies.append(strategy); } void Module::insertStrategyDefinition(StrategyDefinition* sdef) { Assert(status < THEORY_CLOSED, "bad status"); sdef->setModuleInfo(this, strategyDefinitions.length()); strategyDefinitions.append(sdef); sdef->check(); } void Module::closeSortSet() { Assert(status == OPEN, "bad status"); // // We can't use a range-based for loop here because the number // of sorts will grow as we add error sorts, invalidating iterators. // int nrSorts = sorts.length(); for (int i = 0; i < nrSorts; ++i) { Sort* s = sorts[i]; if (s->component() == 0) { ConnectedComponent* c = new ConnectedComponent(s); c->setModuleInfo(this, connectedComponents.length()); connectedComponents.append(c); } } status = SORT_SET_CLOSED; } void Module::closeSignature() { Assert(status == SORT_SET_CLOSED, "bad status"); status = SIGNATURE_CLOSED; } void Module::closeFixUps() { Assert(status == SIGNATURE_CLOSED, "bad status"); status = FIX_UPS_CLOSED; // // First deal with any inter-symbol dependences until // we hit stability. // This is currently used to normalize identities. // bool somethingChanged; do { somethingChanged = false; for (Symbol* s : symbols) { if (s->interSymbolPass()) somethingChanged = true; } } while (somethingChanged); // // Then deal with things want to be done just after // any inter-symbol dependences have stabilized. // This is currently used to normalize other terms // that get attached to symbols. // for (Symbol* s : symbols) s->postInterSymbolPass(); } void Module::closeTheory() { // // This is where most of the work for analyzing and (semi-)compiling // a module is done. // Assert(status == FIX_UPS_CLOSED, "bad status"); status = THEORY_CLOSED; // // First compile the sort declarations for each operator. // We could have done this much earlier but since it is often // the most time consuming part of compilation and produces // voluminous sort tables we postpone it we are actually going to // do some useful work in the module. // for (Symbol* s : symbols) s->compileOpDeclarations(); // // Then decide in which components the error sort can actually be // produced. This is needed for efficient compilation of sort tests // in pattern matching. // { bool changed; do { changed = false; for (Symbol* s : symbols) { ConnectedComponent* c = s->rangeComponent(); if (c->errorFree() && s->canProduceErrorSort()) { c->errorSortSeen(); changed = true; DebugAdvisory("sort " << c->sort(0) << " corrupted by " << s); } } } while (changed); // iterate until fix point } // // Then do another pass over the symbols to handle things // that depend on the sort tables. // This is currently used for identity sort computation. // for (Symbol* s : symbols) s->postOpDeclarationPass(); // // Deal with any sort constraints. // We need to have computed to sort of each identity at this point // so that we can analyseCollapses() on sort contraint patterns. // indexSortConstraints(); for (Symbol* s : symbols) s->orderSortConstraints(); // // Certain sort properties relative to a symbol can only be determined after // the existance of sort constraints applicable to that symbol are known. // for (Symbol* s : symbols) s->finalizeSortInfo(); // // Now index equations and rules and compile statements. // indexEquations(); indexRules(); for (Symbol* s : symbols) { s->compileSortConstraints(); s->compileEquations(); s->compileRules(); } // // Index and compile strategy definitions. // for (StrategyDefinition* sd : strategyDefinitions) { if (!(sd->isBad() || sd->isNonexec())) { sd->getStrategy()->addDefinition(sd); sd->preprocess(); sd->compile(); } } } void Module::stackMachineCompile() { Assert(status >= THEORY_CLOSED, "bad status"); if (status == STACK_MACHINE_COMPILED) return; status = STACK_MACHINE_COMPILED; for (Equation* e : equations) e->stackMachineCompile(); } void Module::indexSortConstraints() { for (SortConstraint* sc : sortConstraints) { if (!(sc->isBad())) { sc->preprocess(); // nonexec mbs need to be preprocessed if (!(sc->isNonexec())) { Term* lhs = sc->getLhs(); bool noCollapse = lhs->collapseSymbols().empty(); AdvisoryCheck(noCollapse, *lhs << ": collapse at top of " << QUOTE(lhs) << " may cause it to match more than you expect."); if (noCollapse && dynamic_cast(lhs) == 0) lhs->symbol()->offerSortConstraint(sc); else { for (Symbol* s : symbols) s->offerSortConstraint(sc); } } } } } void Module::indexEquation(Equation* eq) { eq->preprocess(); if (!(eq->isNonexec())) { Term* lhs = eq->getLhs(); lhs->computeMatchIndices(); bool noCollapse = lhs->collapseSymbols().empty(); AdvisoryCheck(noCollapse, *lhs << ": collapse at top of " << QUOTE(lhs) << " may cause it to match more than you expect."); if (noCollapse && dynamic_cast(lhs) == 0) lhs->symbol()->offerEquation(eq); else { for (Symbol* s : symbols) s->offerEquation(eq); } } } void Module::indexEquations() { // // First index non-owise equations. // for (Equation* eq : equations) { if (!(eq->isBad()) && !(eq->isOwise())) indexEquation(eq); } // // Then index owise equations. // for (Equation* eq : equations) { if (!(eq->isBad()) && eq->isOwise()) indexEquation(eq); } } void Module::indexRules() { for (Rule* rl : rules) { if (!(rl->isBad())) { rl->preprocess(); Term* lhs = rl->getLhs(); bool noCollapse = lhs->collapseSymbols().empty(); AdvisoryCheck(noCollapse, *lhs << ": collapse at top of " << QUOTE(lhs) << " may cause it to match more than you expect."); if (noCollapse && dynamic_cast(lhs) == 0) lhs->symbol()->offerRule(rl); else { for (Symbol* s : symbols) s->offerRule(rl); } } } } void Module::insertLateSymbol(Symbol*s) { Assert(status >= SIGNATURE_CLOSED, "bad status"); s->setModuleInfo(this, symbols.length()); symbols.append(s); if (status < FIX_UPS_CLOSED) return; // nothing extra to do // // closeFixUps() stuff: // Late symbols are not allowed to affect other symbols so we // don't iterate the interSymbolPass() pass. // s->interSymbolPass(); s->postInterSymbolPass(); if (status < THEORY_CLOSED) return; // // closeTheory() stuff: // Late symbols are not allowed to create new error sorts so we // don't do the canProduceErrorSort() pass. // s->compileOpDeclarations(); s->postOpDeclarationPass(); // // See if any existing sort constraint could apply to late symbol. // for (SortConstraint* sc : sortConstraints) { if (!(sc->isBad() || sc->isNonexec())) { Term* lhs = sc->getLhs(); if (dynamic_cast(lhs) != 0 || !(lhs->collapseSymbols().empty())) s->offerSortConstraint(sc); } } s->orderSortConstraints(); s->finalizeSortInfo(); // // See if any existing equations could apply to late symbol. // for (Equation* eq : equations) { if (!(eq->isBad() || eq->isNonexec()) && !(eq->isOwise())) { Term* lhs = eq->getLhs(); if (dynamic_cast(lhs) != 0 || !(lhs->collapseSymbols().empty())) s->offerEquation(eq); } } for (Equation* eq : equations) { if (!(eq->isBad() || eq->isNonexec()) && eq->isOwise()) { Term* lhs = eq->getLhs(); if (dynamic_cast(lhs) != 0 || !(lhs->collapseSymbols().empty())) s->offerEquation(eq); } } // // See if any existing rules could apply to late symbol. // for (Rule* rl : rules) { if (!(rl->isBad())) { Term* lhs = rl->getLhs(); if (dynamic_cast(lhs) != 0 || !(lhs->collapseSymbols().empty())) s->offerRule(rl); } } // // Now make sure anything we indexed under late symbol is compiled // s->compileSortConstraints(); s->compileEquations(); s->compileRules(); } void Module::clearMemo() { delete memoMap; memoMap = 0; } MemoMap* Module::getMemoMap() { if (memoMap == 0) memoMap = new MemoMap; return memoMap; } void Module::reset() { for (Symbol* s : symbols) s->reset(); } void Module::resetRules() { for (Symbol* s : symbols) s->resetRules(); } /* void Module::saveHiddenState() { FOR_EACH_CONST(i, Vector, symbols) (*i)->saveHiddenState(); } void Module::restoreHiddenState() { FOR_EACH_CONST(i, Vector, symbols) (*i)->restoreHiddenState(); } */ #ifdef DUMP void Module::dump(ostream& s) { s << "Module name: " << this << '\n'; int nrComp = connectedComponents.length(); for (int i = 0; i < nrComp; i++) { s << "Connected Component " << i << '\n'; connectedComponents[i]->dump(s); s << '\n'; } int nrSymbols = symbols.length(); for (int i = 0; i < nrSymbols; i++) { s << "Symbol " << i << "\n"; symbols[i]->dump(s); s << '\n'; } } #endif Maude-Maude3.2/src/Core/module.hh000066400000000000000000000123351420036611000166470ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for modules // #ifndef _module_hh_ #define _module_hh_ #include "namedEntity.hh" #include "lineNumber.hh" #include "badFlag.hh" #include "sort.hh" #include "connectedComponent.hh" #include "symbol.hh" class Module : public NamedEntity, public LineNumber, public BadFlag { NO_COPYING(Module); public: enum Status { OPEN, SORT_SET_CLOSED, SIGNATURE_CLOSED, FIX_UPS_CLOSED, THEORY_CLOSED, STACK_MACHINE_COMPILED }; Module(int id); virtual ~Module(); virtual void closeSortSet(); virtual void closeSignature(); virtual void closeFixUps(); virtual void closeTheory(); virtual void stackMachineCompile(); // // Abstract member function to create new internal symbols. // virtual Symbol* createInternalTupleSymbol(const Vector& domain, ConnectedComponent* range) = 0; Environment* getEnvironment(); Status getStatus() const; const Vector& getSorts() const; const Vector& getSymbols() const; const Vector& getConnectedComponents() const; const Vector& getSortConstraints() const; const Vector& getEquations() const; const Vector& getRules() const; const Vector& getStrategyDefinitions() const; const Vector& getStrategies() const; const SortBdds* getSortBdds(); void insertSort(Sort* sort); void insertSymbol(Symbol* symbol); void insertSortConstraint(SortConstraint* sortConstraint); void insertEquation(Equation* equation); void insertRule(Rule* rule); void insertStrategy(RewriteStrategy* strategy); void insertStrategyDefinition(StrategyDefinition* sdef); void insertLateSymbol(Symbol* s); int getMinimumSubstitutionSize() const; void notifySubstitutionSize(int minimumSize); // // Call the appropriate function on each symbol. // virtual void reset(); // clear misc caches for each symbol void resetRules(); // clear rule hidden state //void saveHiddenState(); // save rule hidden state //void restoreHiddenState(); // restore rule hidden state // // Memoization stuff. // MemoMap* getMemoMap(); void clearMemo(); #ifdef DUMP void dump(ostream& s); #endif private: void indexSortConstraints(); void indexEquation(Equation* eq); void indexEquations(); void indexRules(); Environment* environment; // pointer to some object in which module exists Status status; Vector sorts; Vector connectedComponents; Vector symbols; Vector sortConstraints; Vector equations; Vector rules; Vector strategies; Vector strategyDefinitions; SortBdds* sortBdds; int minimumSubstitutionSize; MemoMap* memoMap; // global memeo map for all symbols in module }; inline Environment* Module::getEnvironment() { return environment; } inline Module::Status Module::getStatus() const { return status; } inline const Vector& Module::getSorts() const { return sorts; } inline const Vector& Module::getConnectedComponents() const { return connectedComponents; } inline const Vector& Module::getSymbols() const { return symbols; } inline const Vector& Module::getSortConstraints() const { return sortConstraints; } inline const Vector& Module::getEquations() const { return equations; } inline const Vector& Module::getRules() const { return rules; } inline const Vector& Module::getStrategies() const { return strategies; } inline const Vector& Module::getStrategyDefinitions() const { return strategyDefinitions; } inline void Module::insertSort(Sort* sort) { Assert(status == OPEN, "bad status"); sort->setModuleInfo(this, sorts.length()); sorts.append(sort); } inline void Module::insertSymbol(Symbol* symbol) { Assert(status < SIGNATURE_CLOSED, "bad status"); symbol->setModuleInfo(this, symbols.length()); symbols.append(symbol); } inline int Module::getMinimumSubstitutionSize() const { return minimumSubstitutionSize; } inline void Module::notifySubstitutionSize(int minimumSize) { if (minimumSize > minimumSubstitutionSize) { DebugAdvisory("minimumSubstitutionSize for " << this << " increased from " << minimumSubstitutionSize << " to " << minimumSize); minimumSubstitutionSize = minimumSize; } } #endif Maude-Maude3.2/src/Core/moduleItem.hh000066400000000000000000000031431420036611000174630ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for objects that are numbered within a module. // This provides us with: // (1) a way of getting back to the module containing an object; and // (2) a number that is useful for indexing. // #ifndef _moduleItem_hh_ #define _moduleItem_hh_ class ModuleItem { public: void setModuleInfo(Module* module, int indexWithinModule); Module* getModule() const; int getIndexWithinModule() const; private: Module* parentModule; int indexWithinParent; }; inline void ModuleItem::setModuleInfo(Module* module, int indexWithinModule) { parentModule = module; indexWithinParent = indexWithinModule; } inline Module* ModuleItem::getModule() const { return parentModule; } inline int ModuleItem::getIndexWithinModule() const { return indexWithinParent; } #endif Maude-Maude3.2/src/Core/namedEntity.hh000066400000000000000000000024511420036611000176410ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Base class for things which have (user given) names. // #ifndef _namedEntity_hh_ #define _namedEntity_hh_ class NamedEntity { public: NamedEntity(int id); int id() const; private: const int name; }; inline NamedEntity::NamedEntity(int id) : name(id) { } inline int NamedEntity::id() const { return name; } // // Output function for NamedEntity must be defined by library user. // ostream& operator<<(ostream& s, const NamedEntity* e); #endif Maude-Maude3.2/src/Core/narrowingVariableInfo.cc000066400000000000000000000036451420036611000216440ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2007 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class NarrowingVariableInfo. // #include "macros.hh" #include "vector.hh" //#include "graph.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "variable.hh" // core class definitions #include "substitution.hh" #include "narrowingVariableInfo.hh" // variable class definitions #include "variableDagNode.hh" int NarrowingVariableInfo::variable2Index(VariableDagNode* variable) { Assert(variable != 0, "null dagnode"); int nrVariables = variables.length(); for (int i = 0; i < nrVariables; i++) { if (variable->equal(variables[i])) return i; } variables.append(variable); return nrVariables; } int NarrowingVariableInfo::variable2IndexNoAdd(VariableDagNode* variable) const { Assert(variable != 0, "null dagnode"); //cout << "looking at " << (DagNode*) variable << endl; int nrVariables = variables.length(); for (int i = 0; i < nrVariables; i++) { if (variable->equal(variables[i])) return i; //cout << "not equal to " << (DagNode*) variables[i] << endl; } return NONE; } Maude-Maude3.2/src/Core/narrowingVariableInfo.hh000066400000000000000000000041721420036611000216520ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2007 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class to hold variable information from a dag that is about to be narrowed. // #ifndef _narrowingVariableInfo_hh_ #define _narrowingVariableInfo_hh_ #include "variable.hh" class NarrowingVariableInfo { NO_COPYING(NarrowingVariableInfo); public: NarrowingVariableInfo() {} int getNrVariables() const; // // These two functions map between indexes and variables. // int variable2Index(VariableDagNode* variableTerm); int variable2IndexNoAdd(VariableDagNode* variableTerm) const; VariableDagNode* index2Variable(int index) const; // // Forgets all but the first variables seen. // This hack is needed to deal with variables in blocker terms. // void forgetAllBut(int nrFirstVariables); void copy(const NarrowingVariableInfo& other); private: // // Should probably use a hash table for scalability. // Vector variables; }; inline int NarrowingVariableInfo::getNrVariables() const { return variables.size(); } inline VariableDagNode* NarrowingVariableInfo::index2Variable(int index) const { return variables[index]; } inline void NarrowingVariableInfo::forgetAllBut(int nrFirstVariables) { variables.resize(nrFirstVariables); } inline void NarrowingVariableInfo::copy(const NarrowingVariableInfo& other) { variables = other.variables; } #endif Maude-Maude3.2/src/Core/nullInstruction.cc000066400000000000000000000033701420036611000205630ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 2013 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class NullInstruction. // // utility stuff #include "macros.hh" //#include "vector.hh" #include "indent.hh" // forward declarations #include "interface.hh" #include "core.hh" // interface class definitions #include "symbol.hh" // core class definitions //#include "frame.hh" //#include "stackMachine.hh" #include "nullInstruction.hh" NullInstruction::NullInstruction() { } const Instruction* NullInstruction::getNullInstruction() { static const NullInstruction nullInstruction; return &nullInstruction; } void NullInstruction::execute(StackMachine* /* machine */) const { } void NullInstruction::setActiveSlots(const NatSet& /* slots */) { CantHappen("shouldn't be called"); } void NullInstruction::markActiveSlots(const Frame* /* frame*/) const { } #ifdef DUMP void NullInstruction::dump(ostream& s, int indentLevel) { s << Indent(indentLevel) << "null instruction" << endl; } #endif Maude-Maude3.2/src/Core/nullInstruction.hh000066400000000000000000000025341420036611000205760ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 2013 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Stack machine null instruction. // #ifndef _nullInstruction_hh_ #define _nullInstruction_hh_ #include "instruction.hh" class NullInstruction : public Instruction { NO_COPYING(NullInstruction); public: static const Instruction* getNullInstruction(); void execute(StackMachine* machine) const; virtual void setActiveSlots(const NatSet& slots); virtual void markActiveSlots(const Frame* frame) const; #ifdef DUMP void dump(ostream& s, int indentLevel); #endif private: NullInstruction(); }; #endif Maude-Maude3.2/src/Core/opDeclaration.hh000066400000000000000000000030111420036611000201350ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for operator declarations. // #ifndef _opDeclaration_hh_ #define _opDeclaration_hh_ class OpDeclaration { public: void setInfo(const Vector& domainAndRange, bool constructorFlag); const Vector& getDomainAndRange() const; bool isConstructor() const; private: Vector sortInfo; bool ctorFlag; }; inline void OpDeclaration::setInfo(const Vector& domainAndRange, bool constructorFlag) { sortInfo = domainAndRange; // deep copy ctorFlag = constructorFlag; } inline const Vector& OpDeclaration::getDomainAndRange() const { return sortInfo; } inline bool OpDeclaration::isConstructor() const { return ctorFlag; } #endif Maude-Maude3.2/src/Core/pendingUnificationStack.cc000066400000000000000000000274501420036611000221570ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2020 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class PendingUnificationStack. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "variable.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" #include "unificationSubproblem.hh" // core class definitions #include "unificationContext.hh" #include "unificationSubproblemDisjunction.hh" #include "compoundCycleSubproblem.hh" #include "pendingUnificationStack.hh" // variable class definitions #include "variableDagNode.hh" PendingUnificationStack::PendingUnificationStack() : theoryTable(1) { // // The first theory is has a null controlling symbol and is used for // keeping track of theory clashes where both symbols claim to // be able to resolve theory clashes. // // We want to solve these problems early. // theoryTable[0].controllingSymbol = 0; theoryTable[0].firstProblemInTheory = NONE; } PendingUnificationStack::~PendingUnificationStack() { // // Necessary to avoid memory leaks, and more importantly stale root pointers. // for (const ActiveSubproblem& as : subproblemStack) delete as.subproblem; } void PendingUnificationStack::markReachableNodes() { for (const PendingUnification& pu : unificationStack) { pu.lhs->mark(); pu.rhs->mark(); } } void PendingUnificationStack::push(Symbol* controllingSymbol, DagNode* lhs, DagNode* rhs, bool marked) { DebugAdvisory("push " << controllingSymbol << ": " << lhs << " =? " << rhs << " marked = " << marked); int e = unificationStack.size(); unificationStack.resize(e + 1); PendingUnification& p = unificationStack[e]; p.lhs = lhs; p.rhs = rhs; p.marked = marked; // // We don't expect to handle too many distinct theories in a unification problem so // we use a simple linear search. // int nrTheories = theoryTable.size(); for (int i = 0; i < nrTheories; ++i) { if (theoryTable[i].controllingSymbol == controllingSymbol) { p.theoryIndex = i; p.nextProblemInTheory = theoryTable[i].firstProblemInTheory; theoryTable[i].firstProblemInTheory = e; return; } } // // Haven't seen this theory before so make a new entry in the table. // theoryTable.resize(nrTheories + 1); p.theoryIndex = nrTheories; p.nextProblemInTheory = NONE; theoryTable[nrTheories].controllingSymbol = controllingSymbol; theoryTable[nrTheories].firstProblemInTheory = e; } bool PendingUnificationStack::resolveTheoryClash(DagNode* lhs, DagNode* rhs) { DebugEnter(lhs << " =? " << rhs); Symbol* controllingSymbol = lhs->symbol(); if (controllingSymbol->canResolveTheoryClash()) { if (rhs->symbol()->canResolveTheoryClash()) { // // Both symbols can might be able to resolve the theory clash // so we will need to try both. // controllingSymbol = 0; } } else { controllingSymbol = rhs->symbol(); if (!(controllingSymbol->canResolveTheoryClash())) return false; // unresolvable - fail swap(lhs, rhs); } DebugAdvisory("push to resolve theory clash"); push(controllingSymbol, lhs, rhs, true); return true; } void PendingUnificationStack::restore(Marker mark) { // // We need to blow away all unifications up to and including unificationStack[mark]. // for (int i = unificationStack.size() - 1; i >= mark; --i) { PendingUnification& p = unificationStack[i]; Assert(theoryTable[p.theoryIndex].firstProblemInTheory == i, "trying to retract a unification which is not the first problem in its theory " << i << ' ' << p.lhs << " =? " << p.rhs << " first problem is " << theoryTable[p.theoryIndex].firstProblemInTheory); theoryTable[p.theoryIndex].firstProblemInTheory = p.nextProblemInTheory; } unificationStack.resize(mark); } bool PendingUnificationStack::solve(bool findFirst, UnificationContext& solution) { DebugAdvisory("PendingUnificationStack::solve() findFirst = " << findFirst); #ifndef NO_ASSERT // dump(cerr); #endif if (findFirst ? makeNewSubproblem(solution) : !(subproblemStack.empty())) { for (;;) { findFirst = subproblemStack[subproblemStack.size() - 1].subproblem->solve(findFirst, solution, *this); if (findFirst) { if (!makeNewSubproblem(solution)) break; // all done } else { killTopSubproblem(); if (subproblemStack.empty()) break; // out of alternatives } } } return findFirst; } int PendingUnificationStack::chooseTheoryToSolve() { // // Chose a theory with unsolved unifications and return its index in the theory table. // int priority = INT_MAX; int theoryIndex = NONE; int nrTheories = theoryTable.size(); for (int i = 0; i < nrTheories; ++i) { if (theoryTable[i].firstProblemInTheory != NONE) { Symbol* s = theoryTable[i].controllingSymbol; if (s == 0) return i; // prioritize disjunctions // // Otherwise we want the theory with the lowest unification priority number. // int p = s->unificationPriority(); if (p < priority) { theoryIndex = i; priority = p; } } } return theoryIndex; } bool PendingUnificationStack::makeNewSubproblem(UnificationContext& solution) { // // Try to make a new unification subproblem. // // Returns true if a new unification subproblem made and false // if there are no unresolved unification problems in the stack. // DebugAdvisory("makeNewSubproblem()"); #ifndef NO_ASSERT // dump(cerr); #endif // // Find a theory with unsolved unifications and put all of its unsolved unifications // into a new active subproblem. // int i = chooseTheoryToSolve(); if (i != NONE) { int j = theoryTable[i].firstProblemInTheory; Symbol* controllingSymbol = theoryTable[i].controllingSymbol; DebugAdvisory("makeNewSubproblem() making subproblem for controlling symbol " << controllingSymbol); UnificationSubproblem* sp = (controllingSymbol == 0) ? new UnificationSubproblemDisjunction() : controllingSymbol->makeUnificationSubproblem(); do { PendingUnification& p = unificationStack[j]; sp->addUnification(p.lhs, p.rhs, p.marked, solution); j = p.nextProblemInTheory; } while (j != NONE); int nrSubproblems = subproblemStack.size(); subproblemStack.resize(nrSubproblems + 1); ActiveSubproblem& a = subproblemStack[nrSubproblems]; a.theoryIndex = i; a.savedFirstProblem = theoryTable[i].firstProblemInTheory; a.subproblem = sp; theoryTable[i].firstProblemInTheory = NONE; return true; } // // All unification problems solved - now check for compound cycles. // int cycleStart = findCycle(solution); if (cycleStart == NONE) { // // We're done so instantatiate bound variables. // for (int index : variableOrder) { if (DagNode* d = solution.value(index)->instantiate(solution, true)) solution.bind(index, d); } return false; // no more subproblems to be solved } // // Create a new compound cycle subproblem. // DebugAdvisory("Cycle found"); CompoundCycleSubproblem* sp = new CompoundCycleSubproblem(); for (int i = cycleStart;;) { DagNode* value = solution.value(i); if (dynamic_cast(value) == 0) sp->addComponent(i); else DebugAdvisory("ignoring a variable->variable binding:"); DebugAdvisory(static_cast(solution.getVariableDagNode(i)) << " <- " << value); i = variableStatus[i]; if (i == cycleStart) break; } // // Push the compound cycle subproblem on the stack. // int nrSubproblems = subproblemStack.size(); subproblemStack.resize(nrSubproblems + 1); ActiveSubproblem& a = subproblemStack[nrSubproblems]; a.theoryIndex = COMPOUND_CYCLE; a.savedFirstProblem = NONE; a.subproblem = sp; return true; } void PendingUnificationStack::killTopSubproblem() { DebugAdvisory("killTopSubproblem()"); #ifndef NO_ASSERT // dump(cerr); #endif // // Kill the top element of the active subproblem stack, and link the unifications it was // solving back into the theory table as unsolved. // int i = subproblemStack.size() - 1; ActiveSubproblem& a = subproblemStack[i]; delete a.subproblem; if (a.theoryIndex != COMPOUND_CYCLE) { Assert(theoryTable[a.theoryIndex].firstProblemInTheory == NONE, "newer unification problems have not been retracted"); theoryTable[a.theoryIndex].firstProblemInTheory = a.savedFirstProblem; } subproblemStack.resize(i); } int PendingUnificationStack::findCycle(UnificationContext& solution) { // // This includes all the original variables together with // fresh variables we added during unification. // int nrVariables = solution.nrFragileBindings(); variableStatus.resize(nrVariables); for (int i = 0; i < nrVariables; ++i) variableStatus[i] = UNEXPLORED; // // We look for a dependency cycle reachable from original variables. // If we fail, to find a cycle we generate an instantiation ordering. // variableOrder.clear(); int nrOriginalVariables = solution.getNrOriginalVariables(); for (int i = 0; i < nrOriginalVariables; ++i) { int cycleStart = findCycleFrom(i, solution); if (cycleStart != NONE) return cycleStart; } return NONE; } int PendingUnificationStack::findCycleFrom(int index, UnificationContext& solution) { int status = variableStatus[index]; if (status == UNEXPLORED) { DagNode* d = solution.value(index); if (d == 0) { variableStatus[index] = EXPLORED; return NONE; } NatSet occurs; d->insertVariables(occurs); for (int vi : occurs) { variableStatus[index] = vi; int cycleStart = findCycleFrom(vi, solution); if (cycleStart != NONE) return cycleStart; } variableStatus[index] = EXPLORED; variableOrder.append(index); } else if (status != EXPLORED) { // // We hit index while we were exploring it - we must have a cycle. // return index; } return NONE; } void PendingUnificationStack::dump(ostream& s) { s << "\n---theoryTable: index, controllingSymbol, firstProblemInTheory---\n"; int nrTheories = theoryTable.size(); for (int i = 0; i < nrTheories; ++i) s << i << '\t' << theoryTable[i].controllingSymbol << '\t' << theoryTable[i].firstProblemInTheory << '\n'; s << "---unificationStack: index, theoryIndex, nextProblemInTheory, unification---\n"; int nrUnifications = unificationStack.size(); for (int i = 0; i < nrUnifications; ++i) { s << i << '\t' << unificationStack[i].theoryIndex << '\t' << unificationStack[i].nextProblemInTheory << '\t' << unificationStack[i].lhs << " =? " << unificationStack[i].rhs << '\n'; } s << "---subproblemStack: index, theoryIndex, savedFirstProblem, subproblem ptr---\n"; int nrSubproblems = subproblemStack.size(); for (int i = 0; i < nrSubproblems; ++i) { s << i << '\t' << subproblemStack[i].theoryIndex << '\t' << subproblemStack[i].savedFirstProblem << '\t' << ((void*) subproblemStack[i].subproblem) << '\n'; } s << endl; } Maude-Maude3.2/src/Core/pendingUnificationStack.hh000066400000000000000000000102221420036611000221560ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2008 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for a stack of pending unification problems. // // Problems get pushed on the stack because they potentially have multiple solutions. // Great pains are taken to ensure that when we solve such a problem we solve all existing // problems that are in the same theory simultaneously since this is crucial for termination // in some theories. // #ifndef _pendingUnificationStack_hh_ #define _pendingUnificationStack_hh_ #include "simpleRootContainer.hh" #include "substitution.hh" class PendingUnificationStack : private SimpleRootContainer { NO_COPYING(PendingUnificationStack); public: typedef int Marker; PendingUnificationStack(); ~PendingUnificationStack(); void push(Symbol* controllingSymbol, DagNode* lhs, DagNode* rhs, bool marked = false); bool resolveTheoryClash(DagNode* lhs, DagNode* rhs); Marker checkPoint() const; void restore(Marker mark); bool solve(bool findFirst, UnificationContext& solution); void flagAsIncomplete(Symbol* symbol); bool isIncomplete() const; void dump(ostream& s); private: struct Theory { Symbol* controllingSymbol; // controlling symbol for this theory int firstProblemInTheory; // index into stack of first problem in this theory that isn't active (or NONE) }; struct PendingUnification { int theoryIndex; // index into the theory table int nextProblemInTheory; // index into the stack for the next problem in our theory that isn't active (or NONE) DagNode* lhs; DagNode* rhs; bool marked; // set this to force the lhs to collapse; }; struct ActiveSubproblem { int theoryIndex; // index into the theory table int savedFirstProblem; // saved value of firstProblemInTheory UnificationSubproblem* subproblem; }; void markReachableNodes(); int chooseTheoryToSolve(); bool makeNewSubproblem(UnificationContext& solution); void killTopSubproblem(); Vector theoryTable; Vector unificationStack; Vector subproblemStack; NatSet incompleteSymbols; // // Cycle handling. // enum Status { UNEXPLORED = -1, EXPLORED = -2 }; enum SpecialTheory { COMPOUND_CYCLE = -2 }; int findCycle(UnificationContext& solution); int findCycleFrom(int index, UnificationContext& solution); // // variableStatus[i] holds the index of the variable occuring in variable i's binding that we are about to explore; // or one of the special values: // UNEXPLORED : haven't visited variable i on this cycle check // EXPLORED : fully explored variable i and didn't find cycle // Vector variableStatus; // // variableOrder stores the variable indices in an order which they can be safely instantiated. // Vector variableOrder; }; inline PendingUnificationStack::Marker PendingUnificationStack::checkPoint() const { return unificationStack.size(); } inline void PendingUnificationStack::flagAsIncomplete(Symbol* symbol) { int index = symbol->getIndexWithinModule(); if (!(incompleteSymbols.contains(index))) { incompleteSymbols.insert(index); IssueWarning("Unification modulo the theory of operator " << QUOTE(symbol) << " has encountered an instance for which it may not be complete."); } } inline bool PendingUnificationStack::isIncomplete() const { return !(incompleteSymbols.empty()); } #endif Maude-Maude3.2/src/Core/preEquation.cc000066400000000000000000000171471420036611000176520ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2020 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class PreEquation. // // utility stuff #include "macros.hh" #include "vector.hh" #include "indent.hh" // forward declarations #include "interface.hh" #include "core.hh" // interface class definitions #include "term.hh" #include "lhsAutomaton.hh" #include "rhsAutomaton.hh" #include "subproblem.hh" // core class definitions #include "rewritingContext.hh" #include "termBag.hh" #include "conditionFragment.hh" #include "preEquation.hh" const Vector PreEquation::noCondition; PreEquation::PreEquation(int label, Term* lhs, const Vector& cond) : label(label), lhs(lhs) { Assert(lhs != 0, "null lhs"); lhsAutomaton = 0; // // We want to ensure that isNull() is true for an empty condition - // i.e. the Vector of ConditionFragments has never be touched. So // we only do a copy for if cond is non-empty() // if (!(cond.empty())) condition = cond; // semi-deep copy } PreEquation::~PreEquation() { delete lhsAutomaton; lhs->deepSelfDestruct(); int nrFragments = condition.length(); for (int i = 0; i < nrFragments; i++) delete condition[i]; } void PreEquation::check(NatSet& boundVariables) { // // Normalize lhs and fill out variable info // lhs = lhs->normalize(true); lhs->indexVariables(*this); boundVariables = lhs->occursBelow(); // deep copy int nrFragments = condition.length(); for (int i = 0; i < nrFragments; i++) condition[i]->check(*this, boundVariables); } void PreEquation::preprocess() { lhs->symbol()->fillInSortInfo(lhs); lhs->analyseCollapses(); int nrFragments = condition.length(); for (int i = 0; i < nrFragments; i++) condition[i]->preprocess(); } void PreEquation::compileBuild(TermBag& availableTerms, bool eagerContext) { lhs->findAvailableTerms(availableTerms, eagerContext, true); lhs->determineContextVariables(); lhs->insertAbstractionVariables(*this); int nrFragments = condition.length(); for (int i = 0; i < nrFragments; i++) condition[i]->compileBuild(*this, availableTerms); } void PreEquation::compileMatch(bool compileLhs, bool withExtension) { // // We don't assume that our module was set so we look at the module of the lhs top symbol. // lhs->symbol()->getModule()->notifySubstitutionSize(computeIndexRemapping()); if (compileLhs) { NatSet boundUniquely; bool subproblemLikely; lhsAutomaton = lhs->compileLhs(withExtension, *this, boundUniquely, subproblemLikely); } NatSet boundUniquely(lhs->occursBelow()); int nrFragments = condition.length(); for (int i = 0; i < nrFragments; i++) condition[i]->compileMatch(*this, boundUniquely); } bool PreEquation::checkCondition(DagNode* subject, RewritingContext& context, Subproblem* subproblem) const { int trialRef = UNDEFINED; Stack state; bool result = checkCondition(true, subject, context, subproblem, trialRef, state); Assert(result || state.empty(), "non-empty condition state stack"); while (!state.empty()) { delete state.top(); state.pop(); } return result; } bool PreEquation::checkCondition(bool findFirst, DagNode* subject, RewritingContext& context, Subproblem* subproblem, int& trialRef, Stack& state) const { Assert(condition.length() != 0, "no condition"); Assert(!findFirst || state.empty(), "non-empty condition state stack"); if (findFirst) trialRef = UNDEFINED; do { if (RewritingContext::getTraceStatus()) { if (findFirst) trialRef = traceBeginTrial(subject, context); if (context.traceAbort()) { cleanStack(state); return false; // return false since condition variables may be unbound } } bool success = solveCondition(findFirst, trialRef, context, state); if (RewritingContext::getTraceStatus()) { if (context.traceAbort()) { cleanStack(state); return false; // return false since condition variables may be unbound } if (trialRef != UNDEFINED) context.traceEndTrial(trialRef, success); } if (success) return true; Assert(state.empty(), "non-empty condition state stack"); findFirst = true; trialRef = UNDEFINED; // // Condition evaluation may create nodes without doing rewrites so... // MemoryCell::okToCollectGarbage(); } while (subproblem != 0 && subproblem->solve(false, context)); if (RewritingContext::getTraceStatus() && trialRef != UNDEFINED) context.traceExhausted(trialRef); return false; } bool PreEquation::solveCondition(bool findFirst, int trialRef, RewritingContext& solution, Stack& state) const { int nrFragments = condition.length(); int i = findFirst ? 0 : nrFragments - 1; for(;;) { if (RewritingContext::getTraceStatus()) { if (solution.traceAbort()) return false; solution.traceBeginFragment(trialRef, this, i, findFirst); } findFirst = condition[i]->solve(findFirst, solution, state); if (RewritingContext::getTraceStatus()) { if (solution.traceAbort()) return false; solution.traceEndFragment(trialRef, this, i, findFirst); } if (findFirst) { if (++i == nrFragments) break; } else { if (--i < 0) break; } } return findFirst; } void PreEquation::cleanStack(Stack& conditionStack) { DebugAdvisoryCheck(conditionStack.empty(), "cleaning condition stack because of abort"); while (!conditionStack.empty()) { delete conditionStack.top(); conditionStack.pop(); } } DagNode* PreEquation::getLhsDag() { DagNode* d = lhsDag.getNode(); if (d == 0) { d = getLhs()->term2Dag(); if (d->computeBaseSortForGroundSubterms(true) == DagNode::UNIMPLEMENTED) { IssueWarning(*this << ": lefthand side of " << this << " contains function symbols with nonvariable arguments that are not supported by unification."); } lhsDag.setNode(d); } return d; } void PreEquation::reset() { lhsDag.setNode(0); } ostream& operator<<(ostream& s, const PreEquation* pe) { pe->print(s); return s; } #ifdef DUMP void PreEquation::dump(ostream& s, int indentLevel) { s << Indent(indentLevel) << "Begin{PreEquation}\n"; ++indentLevel; s << Indent(indentLevel) << "lhs = " << lhs << '\n'; s << Indent(indentLevel) << "lhsAutomaton ="; if (lhsAutomaton == 0) s << " 0\n"; else { s << '\n'; lhsAutomaton->dump(s, *this, indentLevel); } int nrFragments = condition.size(); if (nrFragments > 0) { s << Indent(indentLevel) << "Begin{Condition}\n"; for (int i = 0; i < nrFragments; ++i) condition[i]->dump(s, *this, indentLevel + 1); s << Indent(indentLevel) << "End{Condition}\n"; } s << Indent(indentLevel - 1) << "End{PreEquation}\n"; } #endif Maude-Maude3.2/src/Core/preEquation.hh000066400000000000000000000077641420036611000176700ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Common ancestor for equations, rules and sort constraints. // #ifndef _preEquation_hh_ #define _preEquation_hh_ #include "stack.hh" #include "lineNumber.hh" #include "variableInfo.hh" #include "badFlag.hh" #include "label.hh" #include "natSet.hh" #include "dagRoot.hh" class PreEquation : public LineNumber, public ModuleItem, public VariableInfo, public BadFlag { public: PreEquation(int label, Term* lhs, const Vector& cond); virtual ~PreEquation(); const Label& getLabel() const; Term* getLhs() const; const Vector& getCondition() const; bool hasCondition() const; LhsAutomaton* getLhsAutomaton() const; bool isNonexec() const; void setNonexec(); // // This is the most general condition checking function that allows // multiple distinct successes; caller must provide trialRef variable // and condition state stack in order to preserve this information // between calls. // bool checkCondition(bool findFirst, DagNode* subject, RewritingContext& context, Subproblem* subproblem, int& trialRef, Stack& state) const; // // Simplified interface to the above for the common case where we only care // if a condition succeeds at least once or fails. // bool checkCondition(DagNode* subject, RewritingContext& context, Subproblem* subproblem) const; DagNode* getLhsDag(); virtual void reset(); virtual void print(ostream& s) const = 0; #ifdef DUMP void dump(ostream& s, int indentLevel); #endif protected: void check(NatSet& boundVariables); void preprocess(); void compileBuild(TermBag& availableTerms, bool eagerContext); void compileMatch(bool compileLhs, bool withExtension); // // This function must be defined by all derived classes // virtual int traceBeginTrial(DagNode* subject, RewritingContext& context) const = 0; static const Vector noCondition; bool isCompiled() const; void setCompiled(); private: static void cleanStack(Stack& conditionStack); enum Flags { COMPILED = 2, NONEXEC = 4 }; bool solveCondition(bool findFirst, int trialRef, RewritingContext& solution, Stack& state) const; Label label; Term* lhs; LhsAutomaton* lhsAutomaton; DagRoot lhsDag; // for unification Vector condition; }; inline bool PreEquation::isCompiled() const { return getFlag(COMPILED); } inline void PreEquation::setCompiled() { setFlags(COMPILED); } inline bool PreEquation::isNonexec() const { return getFlag(NONEXEC); } inline void PreEquation::setNonexec() { setFlags(NONEXEC); } inline const Label& PreEquation::getLabel() const { return label; } inline Term* PreEquation::getLhs() const { return lhs; } inline const Vector& PreEquation::getCondition() const { return condition; } inline bool PreEquation::hasCondition() const { return !(condition.isNull()); } inline LhsAutomaton* PreEquation::getLhsAutomaton() const { return lhsAutomaton; } ostream& operator<<(ostream& s, const PreEquation* pe); // we define this to call a virtual function #endif Maude-Maude3.2/src/Core/protectedDagNodeSet.cc000066400000000000000000000024551420036611000212410ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2007 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class ProtectedDagNodeSet. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" // core class definitions #include "protectedDagNodeSet.hh" void ProtectedDagNodeSet::markReachableNodes() { int nrDagNodes = cardinality(); for (int i = 0; i < nrDagNodes; ++i) index2DagNode(i)->mark(); } Maude-Maude3.2/src/Core/protectedDagNodeSet.hh000066400000000000000000000022611420036611000212460ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2007 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for set of pointers to dag nodes which are protected from garbage collection. // #ifndef _protectedDagNodeSet_hh_ #define _protectedDagNodeSet_hh_ #include "dagNodeSet.hh" #include "simpleRootContainer.hh" class ProtectedDagNodeSet : public DagNodeSet, private SimpleRootContainer { private: void markReachableNodes(); }; #endif Maude-Maude3.2/src/Core/rawRootContainer.hh000066400000000000000000000031461420036611000206620ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Abstract base class for objects that contain dag root pointers. // #ifndef _rawRootContainer_hh_ #define _rawRootContainer_hh_ class RawRootContainer { public: static void markPhase(); protected: void link(); void unlink(); virtual void markReachableNodes() = 0; private: static RootContainer* listHead; RootContainer* next; RootContainer* prev; }; inline RootContainer::link() { prev = 0; next = listHead; if (listHead != 0) listHead->prev = this; listHead = this; } inline RootContainer::unlink() { if (next != 0) next->prev = prev; if (prev != 0) prev->next = next; else listHead = next; } inline void RootContainer::markPhase() { for (RootContainer* p = listHead; p; p = p->next) p->markReachableNodes(); } #endif Maude-Maude3.2/src/Core/redexPosition.hh000066400000000000000000000047121420036611000202160ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for holding position information of a potential redex // #ifndef _redexPosition_hh_ #define _redexPosition_hh_ class RedexPosition { public: RedexPosition() { CantHappen("called"); } // needed so that Vector template can be instantiated // RedexPosition(DagNode* node, int parentIndex, int argIndex); RedexPosition(DagNode* node, int parentIndex, int argIndex, bool eager); DagNode* node() const; int parentIndex() const; int argIndex() const; void replaceNode(DagNode* newNode); void setStale(); void clearStale(); bool isStale() const; bool isEager() const; private: enum Flags { STALE = 1, EAGER = 2 }; DagNode* dagNode; int pIndex; int aIndex; int flags; }; /* inline RedexPosition::RedexPosition(DagNode* node, int parentIndex, int argIndex) : dagNode(node), pIndex(parentIndex), aIndex(argIndex), flags(0) { } */ inline RedexPosition::RedexPosition(DagNode* node, int parentIndex, int argIndex, bool eager) : dagNode(node), pIndex(parentIndex), aIndex(argIndex), flags(eager ? EAGER : 0) { } inline DagNode* RedexPosition::node() const { return dagNode; } inline int RedexPosition::parentIndex() const { return pIndex; } inline int RedexPosition::argIndex() const { return aIndex; } inline void RedexPosition::replaceNode(DagNode* newNode) { dagNode = newNode; } inline void RedexPosition::setStale() { flags |= STALE; } inline void RedexPosition::clearStale() { flags &= ~STALE; } inline bool RedexPosition::isStale() const { return flags & STALE; } inline bool RedexPosition::isEager() const { return flags & EAGER; } #endif Maude-Maude3.2/src/Core/returnInstruction.cc000066400000000000000000000034641420036611000211340ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 2013 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class ReturnInstruction. // // utility stuff #include "macros.hh" #include "vector.hh" #include "indent.hh" // forward declarations #include "interface.hh" #include "core.hh" // interface class definitions #include "symbol.hh" // core class definitions #include "frame.hh" #include "stackMachine.hh" #include "returnInstruction.hh" ReturnInstruction::ReturnInstruction(int returnSlot) : returnSlot(returnSlot) { setOpCode(RETURN); } void ReturnInstruction::execute(StackMachine* machine) const { // // Get the stack frame containing the pointer to us. // Frame* frame = machine->getTopFrame(); // // Get value to return. // DagNode* v = frame->getSlot(returnSlot); // // Finish up using parent class code. // returnResultAndContinue(machine, frame, v); } #ifdef DUMP void ReturnInstruction::dump(ostream& s, int indentLevel) { s << Indent(indentLevel) << "return " << returnSlot << " (ReturnInstruction)" << endl; } #endif Maude-Maude3.2/src/Core/returnInstruction.hh000066400000000000000000000026471420036611000211500ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 2013 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Stack machine final instruction for returning the contents of a slot. // #ifndef _returnInstruction_hh_ #define _returnInstruction_hh_ #include "finalInstruction.hh" class ReturnInstruction : public FinalInstruction { NO_COPYING(ReturnInstruction); public: ReturnInstruction(int returnSlot); void execute(StackMachine* machine) const; SlotIndex getReturnSlot() const; #ifdef DUMP void dump(ostream& s, int indentLevel); #endif private: const SlotIndex returnSlot; }; inline Instruction::SlotIndex ReturnInstruction::getReturnSlot() const { return returnSlot; } #endif Maude-Maude3.2/src/Core/rewriteStrategy.cc000066400000000000000000000043601420036611000205530ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class RewriteStrategy // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" // interface class definitions #include "symbol.hh" #include "term.hh" #include "rawArgumentIterator.hh" // core class definitions #include "rewriteStrategy.hh" #include "strategyDefinition.hh" // full compiler definitions #include "compilationContext.hh" RewriteStrategy::RewriteStrategy(int id, const Vector& domain, Sort* subjectSort, Symbol* auxSymbol) : NamedEntity(id), domain(domain), subjectSort(subjectSort), symbol(auxSymbol), simple(domain.length() == 0) { Assert(auxSymbol != 0, "null auxiliary symbol"); // We do not assert anything about subjectSort because it has no use at the moment } Term* RewriteStrategy::copyAuxiliaryTerm(Term* term, SymbolMap* translation) const { Vector args(symbol->arity()); RawArgumentIterator* it = term->arguments(); for (size_t i = 0; i < args.size(); i++) { Assert(it->valid(), "non-valid iterator"); args[i] = it->argument()->deepCopy(translation); it->next(); } delete it; return symbol->makeTerm(args); } void RewriteStrategy::addDefinition(StrategyDefinition* sdef) { if (simple && (definitions.length() > 0 || sdef->getCondition().length() > 0)) simple = false; definitions.append(sdef); } Maude-Maude3.2/src/Core/rewriteStrategy.hh000066400000000000000000000061431420036611000205660ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for strategies which control the rewriting process. // (not to be confused with those about argument evaluation) // #ifndef _rewriteStrategy_hh_ #define _rewriteStrategy_hh_ #include "macros.hh" #include "sort.hh" class RewriteStrategy : public NamedEntity, public LineNumber, public ModuleItem { NO_COPYING(RewriteStrategy); public: RewriteStrategy(int id, const Vector& domain, Sort* subjectSort, Symbol* auxSymbol); // // Get the auxiliary tuple symbol which is used for matching strategy calls // in definitions. // // Explicit access to this symbol is not needed but it is used for eficency // when strategies are created or imported. // Symbol* getSymbol() const; // // The strategy is intented to rewrite terms of the this sort. // This information is not used and no checks are done. // Sort* getSubjectSort() const; const Vector& getDomain() const; int arity() const; // // Functions for the auxiliary term // Term* makeAuxiliaryTerm(const Vector& args) const; Term* copyAuxiliaryTerm(Term* term, SymbolMap* translation) const; // // Functions for a table of definitions // void addDefinition(StrategyDefinition* sdef); const Vector& getDefinitions() const; // // A strategy is simple if it has no arguments and is defined by a single // unconditional definition. // bool isSimple() const; private: Vector domain; Sort* subjectSort; Symbol* symbol; Vector definitions; bool simple; }; inline Symbol* RewriteStrategy::getSymbol() const { return symbol; } inline Sort* RewriteStrategy::getSubjectSort() const { return subjectSort; } inline Term* RewriteStrategy::makeAuxiliaryTerm(const Vector& args) const { return symbol->makeTerm(args); } inline int RewriteStrategy::arity() const { return domain.length(); } inline const Vector& RewriteStrategy::getDomain() const { return domain; } inline const Vector& RewriteStrategy::getDefinitions() const { return definitions; } inline bool RewriteStrategy::isSimple() const { return simple; } // // Output function for RewriteStrategy must be defined by library user. // ostream& operator<<(ostream& s, const RewriteStrategy* rs); #endif Maude-Maude3.2/src/Core/rewritingContext.cc000066400000000000000000000143711420036611000207310ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class RewritingContext. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" // core class definitions #include "rewritingContext.hh" #include "run.cc" bool RewritingContext::traceFlag = false; void RewritingContext::markReachableNodes() { if (!isLimited()) rootNode->mark(); int nrFragile = nrFragileBindings(); for (int i = 0; i < nrFragile; i++) { DagNode* d = value(i); if (d != 0) d->mark(); } for (RedexPosition& p : redexStack) p.node()->mark(); } RewritingContext* RewritingContext::makeSubcontext(DagNode* root, int /* purpose */) { return new RewritingContext(root); } bool RewritingContext::handleInterrupt() { // // By default we don't know how to handle an interrupt. // return false; } bool RewritingContext::blockAndHandleInterrupts(sigset_t *normalSet) { // // Hard to do anything sensible here. // CantHappen("base class version shouldn't be called"); return false; } bool RewritingContext::interruptSeen() { // // Hard to do anything sensible here. // CantHappen("base class version shouldn't be called"); return false; } int RewritingContext::traceBeginEqTrial(DagNode* /* subject */, const Equation* /* equation */) { return 0; } int RewritingContext::traceBeginRuleTrial(DagNode* /* subject */, const Rule* /* rule */) { return 0; } int RewritingContext::traceBeginScTrial(DagNode* /* subject */, const SortConstraint* /* sc */) { return 0; } int RewritingContext::traceBeginSdTrial(DagNode* /* subject */, const StrategyDefinition* /* sc */) { return 0; } void RewritingContext::traceEndTrial(int /* trailRef */, bool /* success */) { } void RewritingContext::traceExhausted(int /* trialRef */) { } void RewritingContext::tracePreEqRewrite(DagNode* /* redex */, const Equation* /* equation */, int /* type */) { } void RewritingContext::tracePostEqRewrite(DagNode* /* replacement */) { } void RewritingContext::tracePreRuleRewrite(DagNode* /* redex */, const Rule* /* rule */) { } void RewritingContext::tracePostRuleRewrite(DagNode* /* replacement */) { } void RewritingContext::tracePreScApplication(DagNode* /* subject */, const SortConstraint* /* sc */) { } bool RewritingContext::traceAbort() { return false; } void RewritingContext::traceBeginFragment(int /* trialRef */, const PreEquation* /* preEquation */, int /* fragmentIndex */, bool /* firstAttempt */) { } void RewritingContext::traceEndFragment(int /* trialRef */, const PreEquation* /* preEquation */, int /* fragmentIndex */, bool /* success */) { } void RewritingContext::traceNarrowingStep(Rule* /* rule */, DagNode* /* redex */, DagNode* /* replacement */, const NarrowingVariableInfo* /* variableInfo */, const Substitution* /* substitution */, DagNode* /* newState */) { } void RewritingContext::traceVariantNarrowingStep(Equation* /* equation */, const Vector& /* oldVariantSubstitution */, DagNode* /* redex */, DagNode* /* replacement */, const NarrowingVariableInfo& /* variableInfo */, const Substitution* /* substitution */, DagNode* /* newState */, const Vector& /* newVariantSubstitution */, const NarrowingVariableInfo& /* originalVariables */) { } void RewritingContext::traceStrategyCall(StrategyDefinition* /* sdef */, DagNode* /* callDag */, DagNode* /* subject */, const Substitution* /* substitution */) { } void RewritingContext::rebuildUptoRoot() { // cout << "\nroot was " << rootNode << endl; // cout << "rebuilding from " << currentIndex << endl; Assert(currentIndex >= 0, "bad currentIndex"); // // Locate deepest stack node with a stale parent. // int c = currentIndex; // all staleness guaranteed to be above currentIndex for (int i = redexStack[c].parentIndex(); i != staleMarker; i = redexStack[i].parentIndex()) c = i; // // We assume that we only have to rebuild the spine from // staleMarker to root. // for (int i = staleMarker; i != UNDEFINED; i = redexStack[i].parentIndex()) { remakeStaleDagNode(i, c); c = i; } rootNode = redexStack[0].node(); staleMarker = ROOT_OK; // cout << "root is " << rootNode << endl; } void RewritingContext::remakeStaleDagNode(int staleIndex, int childIndex) { // // Find first stacked argument of stale dag node. // int first = childIndex; while (redexStack[first - 1].parentIndex() == staleIndex) --first; // // Find last stacked argument of stale dag node. // int last = childIndex; int stackLength = redexStack.length(); while (last + 1 < stackLength && redexStack[last + 1].parentIndex() == staleIndex) ++last; // // Replace stale dag node with a copy in which stacked arguments // replace corresponding arguments in original. // DagNode* remade = redexStack[staleIndex].node()-> copyWithReplacement(redexStack, first, last); redexStack[staleIndex].replaceNode(remade); } #ifdef DUMP void RewritingContext::dumpStack(ostream& s, const Vector& stack) { int stackLen = stack.length(); for (int i = 0; i < stackLen; i++) { s << stack[i].parentIndex() << '\t' << stack[i].argIndex() << '\t' << stack[i].node() << '\n'; } } #endif Maude-Maude3.2/src/Core/rewritingContext.hh000066400000000000000000000260641420036611000207450ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for rewriting contexts. // // A rewriting context keeps track of miscellaneous information needed // while rewriting. An important perfomance trick is that we derive it // from Substitution so that we can use the rewriting context to construct // matching substitutions in. This avoids creating a new substitution at // the start of each match attempt. // #ifndef _rewritingContext_hh_ #define _rewritingContext_hh_ //#include #include "substitution.hh" #include "simpleRootContainer.hh" #include "dagNode.hh" #include "module.hh" class RewritingContext : public Substitution, private SimpleRootContainer { public: enum Purpose { CONDITION_EVAL, SORT_EVAL, OTHER }; enum RewriteType { NORMAL, BUILTIN, MEMOIZED }; RewritingContext(DagNode* root); // // Sometimes we need a rewriting context to do sort computations or matching // and don't have one to hand; for example in UnifierFilter, VariantFolder and // IrredundantUnificationProblem. For these use cases we have a special ctor // for limited use rewriting contexts that don't have a root dag. // // With a substitution size of 0, a RewritingContext is just a dummy that allows // functions that take a RewritingContext& argument to be called as long as they // don't need to use it. This hints that we might have been better passing // pointers rather than references so we could use a null pointer instead. // RewritingContext(int substitutionSize = 0); virtual ~RewritingContext(); static bool getTraceStatus(); static void setTraceStatus(bool state); DagNode* root(); bool isLimited() const; void incrementMbCount(Int64 i = 1); void incrementEqCount(Int64 i = 1); void incrementRlCount(Int64 i = 1); void incrementNarrowingCount(Int64 i = 1); void incrementVariantNarrowingCount(Int64 i = 1); void clearCount(); void addInCount(const RewritingContext& other); void transferCountFrom(RewritingContext& other); Int64 getTotalCount() const; Int64 getMbCount() const; Int64 getEqCount() const; Int64 getRlCount() const; Int64 getNarrowingCount() const; Int64 getVariantNarrowingCount() const; void reduce(); void ruleRewrite(Int64 limit = NONE); void fairRewrite(Int64 limit = NONE, Int64 gas = 1); void fairContinue(Int64 limit = NONE); void fairStart(Int64 limit, Int64 gas); void fairRestart(Int64 limit); bool fairTraversal(); bool getProgress(); bool builtInReplace(DagNode* old, DagNode* replacement); virtual RewritingContext* makeSubcontext(DagNode* root, int purpose = OTHER); virtual int traceBeginEqTrial(DagNode* subject, const Equation* equation); virtual int traceBeginRuleTrial(DagNode* subject, const Rule* rule); virtual int traceBeginScTrial(DagNode* subject, const SortConstraint* sc); virtual int traceBeginSdTrial(DagNode* subject, const StrategyDefinition* sc); virtual void traceEndTrial(int trialRef, bool success); virtual void traceExhausted(int trialRef); virtual void tracePreEqRewrite(DagNode* redex, const Equation* equation, int type); virtual void tracePostEqRewrite(DagNode* replacement); virtual void tracePreRuleRewrite(DagNode* redex, const Rule* rule); virtual void tracePostRuleRewrite(DagNode* replacement); virtual void tracePreScApplication(DagNode* subject, const SortConstraint* sc); virtual bool traceAbort(); virtual void traceBeginFragment(int trialRef, const PreEquation* preEquation, int fragmentIndex, bool firstAttempt); virtual void traceEndFragment(int trialRef, const PreEquation* preEquation, int fragmentIndex, bool success); virtual void traceNarrowingStep(Rule* rule, DagNode* redex, DagNode* replacement, const NarrowingVariableInfo* variableInfo, const Substitution* substitution, DagNode* newState); virtual void traceVariantNarrowingStep(Equation* equation, const Vector& oldVariantSubstitution, DagNode* redex, DagNode* replacement, const NarrowingVariableInfo& variableInfo, const Substitution* substitution, DagNode* newState, const Vector& newVariantSubstitution, const NarrowingVariableInfo& originalVariables); // // This exists so we can handle an interrupt that causes a blocking call to return early. // If it returns true, the caller assumes it can continue; otherwise the caller should return. // virtual bool handleInterrupt(); // // This exists so we block signals we are interested in, handle any that have already // been delivered and let the caller know what the normal signal set looks like. // The reason for blocking signals is if they are delivered after we last checked // for them but before the blocking call they could get lost since they won't cause // the blocking call to return early. If it returns true, the call assumes it can // continue with the blocking call, using the normalSet as signals that should abort // the blocking call. If it returns false, the caller returns without making the blocking // call. // virtual bool blockAndHandleInterrupts(sigset_t *normalSet); // // This exists so that we can find out if an interrupt has been recorded // but not yet processed (we haven't reached a suitable point in the code). // virtual bool interruptSeen(); virtual void traceStrategyCall(StrategyDefinition* sdef, DagNode* callDag, DagNode* subject, const Substitution* substitution); #ifdef DUMP static void dumpStack(ostream& s, const Vector& stack); #endif protected: // // We make this protected so that a derived class can override it and then call // our version. // void markReachableNodes(); private: enum Special { ROOT_OK = -2 }; void rebuildUptoRoot(); void remakeStaleDagNode(int staleIndex, int childIndex); bool ascend(); void descend(); bool doRewriting(bool argsUnstackable); static bool traceFlag; DagNode* rootNode; Int64 mbCount; Int64 eqCount; Int64 rlCount; Int64 narrowingCount; Int64 variantNarrowingCount; // // For rule rewriting // Vector redexStack; int currentIndex; int staleMarker; bool progress; Int64 rewriteLimit; Int64 gasPerNode; Int64 currentGas; int lazyMarker; }; inline RewritingContext::RewritingContext(DagNode* root) : Substitution(root->symbol()->getModule()->getMinimumSubstitutionSize(), 0), rootNode(root) { //cout << "sub size is " << root->symbol()->getModule()->getMinimumSubstitutionSize() << endl; Assert(root != 0, "null root"); mbCount = 0; eqCount = 0; rlCount = 0; narrowingCount = 0; variantNarrowingCount = 0; staleMarker = ROOT_OK; } inline RewritingContext::RewritingContext(int substitutionSize) : Substitution(substitutionSize), rootNode(0) { // // This constructor exists so we can build RewritingContexts for use sort computations // and in the solve() phase of matching where we don't otherwise have a RewritingContext // to hand. // } inline RewritingContext::~RewritingContext() { } inline void RewritingContext::reduce() { rootNode->reduce(*this); } inline DagNode* RewritingContext::root() { if (staleMarker != ROOT_OK) rebuildUptoRoot(); return rootNode; } inline bool RewritingContext::isLimited() const { // // A limited RewritingContext: // (1) Does not have a rootNode. // (2) Need not have a substitution large enough to apply sort constraints. // (3) Does not protect its substitution from garbage collection. // (4) Does not protect its redex stack from garbage collection. // It exists so that certain functions that expect a RewritingContext, // ultimately to compute true sorts by applying sort constraints can be // called by unification code when a general purpose RewritingContext // not available. Sort constraints are not supported by unification and // are thus ignored if the supplied RewritingContext is limited. // return rootNode == 0; } inline bool RewritingContext::getTraceStatus() { return traceFlag; } inline void RewritingContext::setTraceStatus(bool state) { traceFlag = state; } inline Int64 RewritingContext::getTotalCount() const { return mbCount + eqCount + rlCount + narrowingCount + variantNarrowingCount; } inline Int64 RewritingContext::getMbCount() const { return mbCount; } inline Int64 RewritingContext::getEqCount() const { return eqCount; } inline Int64 RewritingContext::getRlCount() const { return rlCount; } inline Int64 RewritingContext::getNarrowingCount() const { return narrowingCount; } inline Int64 RewritingContext::getVariantNarrowingCount() const { return variantNarrowingCount; } inline void RewritingContext::incrementMbCount(Int64 i) { mbCount += i; } inline void RewritingContext::incrementEqCount(Int64 i) { eqCount += i; } inline void RewritingContext::incrementRlCount(Int64 i) { rlCount += i; } inline void RewritingContext::incrementNarrowingCount(Int64 i) { narrowingCount += i; } inline void RewritingContext::incrementVariantNarrowingCount(Int64 i) { variantNarrowingCount += i; } inline void RewritingContext::clearCount() { mbCount = 0; eqCount = 0; rlCount = 0; narrowingCount = 0; variantNarrowingCount = 0; } inline void RewritingContext::addInCount(const RewritingContext& other) { mbCount += other.mbCount; eqCount += other.eqCount; rlCount += other.rlCount; narrowingCount += other.narrowingCount; variantNarrowingCount += other.variantNarrowingCount; } inline void RewritingContext::transferCountFrom(RewritingContext& other) { mbCount += other.mbCount; other.mbCount = 0; eqCount += other.eqCount; other.eqCount = 0; rlCount += other.rlCount; other.rlCount = 0; narrowingCount += other.narrowingCount; other.narrowingCount = 0; variantNarrowingCount += other.variantNarrowingCount; other.variantNarrowingCount = 0; } inline bool RewritingContext::builtInReplace(DagNode* old, DagNode* replacement) { bool trace = traceFlag; if (trace) { tracePreEqRewrite(old, 0, BUILTIN); if (traceAbort()) return false; } replacement->overwriteWithClone(old); ++eqCount; if (trace) tracePostEqRewrite(old); return true; } inline bool RewritingContext::getProgress() { return progress; } inline void RewritingContext::fairRestart(Int64 limit) { rewriteLimit = limit; } #endif Maude-Maude3.2/src/Core/rhsBuilder.cc000066400000000000000000000043631420036611000174550ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class RhsBuilder. // // utility stuff #include "macros.hh" #include "vector.hh" #include "indent.hh" // forward declarations #include "interface.hh" #include "core.hh" // core class definitions #include "rhsBuilder.hh" RhsBuilder::~RhsBuilder() { int nrAutomata = automata.length(); for (int i = 0; i < nrAutomata; i++) delete automata[i]; delete lastAutomaton; } void RhsBuilder::remapIndices(VariableInfo& variableInfo) { int nrAutomata = automata.length(); for (int i = 0; i < nrAutomata; i++) automata[i]->remapIndices(variableInfo); if (lastAutomaton != 0) lastAutomaton->remapIndices(variableInfo); } bool RhsBuilder::recordInfo(StackMachineRhsCompiler& compiler) { for (RhsAutomaton* ra : automata) { if (!(ra->recordInfo(compiler))) return false; } return (lastAutomaton == 0) ? true : lastAutomaton->recordInfo(compiler); } #ifdef DUMP void RhsBuilder::dump(ostream& s, const VariableInfo& variableInfo, int indentLevel) { s << Indent(indentLevel) << "Begin{FreeRhsAutomaton}\n"; s << Indent(indentLevel + 1) << "automata:\n"; int nrAutomata = automata.length(); for (int i = 0; i < nrAutomata; i++) automata[i]->dump(s, variableInfo, indentLevel + 2); s << Indent(indentLevel + 1) << "lastAutomata:\n"; lastAutomaton->dump(s, variableInfo, indentLevel + 2); s << Indent(indentLevel) << "End{FreeRhsAutomaton}\n"; } #endif Maude-Maude3.2/src/Core/rhsBuilder.hh000066400000000000000000000056141420036611000174670ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for building instances of right hand sides. // #ifndef _rhsBuilder_hh_ #define _rhsBuilder_hh_ #include "rhsAutomaton.hh" class RhsBuilder { public: RhsBuilder(); ~RhsBuilder(); void addRhsAutomaton(RhsAutomaton* automaton); bool empty(); void remapIndices(VariableInfo& variableInfo); DagNode* construct(Substitution& matcher) const; void safeConstruct(Substitution& matcher) const; void replace(DagNode* old, Substitution& matcher) const; bool recordInfo(StackMachineRhsCompiler& compiler); #ifdef DUMP void dump(ostream& s, const VariableInfo& variableInfo, int indentLevel = 0); #endif private: Vector automata; RhsAutomaton* lastAutomaton; }; inline RhsBuilder::RhsBuilder() { lastAutomaton = 0; } inline bool RhsBuilder::empty() { return lastAutomaton == 0; } inline void RhsBuilder::addRhsAutomaton(RhsAutomaton* automaton) { if (lastAutomaton != 0) automata.append(lastAutomaton); lastAutomaton = automaton; } inline DagNode* RhsBuilder::construct(Substitution& matcher) const { if (!automata.isNull()) { Vector::const_iterator i = automata.begin(); const Vector::const_iterator e = automata.end(); do (void) (*i)->construct(matcher); while (++i != e); } return lastAutomaton->construct(matcher); } inline void RhsBuilder::safeConstruct(Substitution& matcher) const { if (!automata.isNull()) { Vector::const_iterator i = automata.begin(); const Vector::const_iterator e = automata.end(); do (void) (*i)->construct(matcher); while (++i != e); } if (lastAutomaton != 0) (void) lastAutomaton->construct(matcher); } inline void RhsBuilder::replace(DagNode* old, Substitution& matcher) const { if (!automata.isNull()) { Vector::const_iterator i = automata.begin(); const Vector::const_iterator e = automata.end(); do (void) (*i)->construct(matcher); while (++i != e); } lastAutomaton->replace(old, matcher); } #endif Maude-Maude3.2/src/Core/rootContainer.cc000066400000000000000000000025201420036611000201710ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class RootContainer // // utility stuff #include "macros.hh" // forward declarations #include "core.hh" // core class definitions #include "rootContainer.hh" RootContainer* RootContainer::listHead = 0; #ifdef DUMP void RootContainer::dump(ostream& s) { for (RootContainer* p = listHead; p; p = p->next) { s << static_cast(p) << endl; Assert((p->prev == 0 && listHead == p) || p->prev->next == p, "bad linked list"); } } #endif Maude-Maude3.2/src/Core/rootContainer.hh000066400000000000000000000034051420036611000202060ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Abstract base class for objects that contain dag root pointers. // #ifndef _rootContainer_hh_ #define _rootContainer_hh_ class RootContainer { public: // // For safety since this class is intended to be derived from. // virtual ~RootContainer() {} static void markPhase(); #ifdef DUMP static void dump(ostream& s); #endif protected: void link(); void unlink(); virtual void markReachableNodes() = 0; private: static RootContainer* listHead; RootContainer* next; RootContainer* prev; }; inline void RootContainer::link() { prev = 0; next = listHead; if (listHead != 0) listHead->prev = this; listHead = this; } inline void RootContainer::unlink() { if (next != 0) next->prev = prev; if (prev != 0) prev->next = next; else listHead = next; } inline void RootContainer::markPhase() { for (RootContainer* p = listHead; p; p = p->next) p->markReachableNodes(); } #endif Maude-Maude3.2/src/Core/rule.cc000066400000000000000000000105521420036611000163160ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2020 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class Rule. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "variable.hh" // interface class definitions #include "term.hh" #include "extensionInfo.hh" #include "lhsAutomaton.hh" #include "rhsAutomaton.hh" #include "subproblem.hh" // core class definitions #include "rewritingContext.hh" #include "termBag.hh" #include "rule.hh" Rule::Rule(int label, Term* lhs, Term* rhs, const Vector& condition) : PreEquation(label, lhs, condition), rhs(rhs) { Assert(rhs != 0, "null rhs"); nonExtLhsAutomaton = 0; extLhsAutomaton = 0; } Rule::~Rule() { delete nonExtLhsAutomaton; delete extLhsAutomaton; rhs->deepSelfDestruct(); } void Rule::check() { NatSet boundVariables; PreEquation::check(boundVariables); rhs = rhs->normalize(false); rhs->indexVariables(*this); NatSet unboundVariables(rhs->occursBelow()); unboundVariables.subtract(boundVariables); addUnboundVariables(unboundVariables); if (!isNonexec() && !getUnboundVariables().empty()) { IssueWarning(*this << ": variable " << QUOTE(index2Variable(getUnboundVariables().min())) << " is used before it is bound in rule:\n" << this); // // Rules with variables used before they are bound have a legitimate // purpose - they can be used with metaApply() and a substitution. So // we just make the rule nonexec rather than marking it as bad. // setNonexec(); } } void Rule::preprocess() { PreEquation::preprocess(); rhs->symbol()->fillInSortInfo(rhs); Assert(getLhs()->getComponent() == rhs->getComponent(), "connected component clash"); } LhsAutomaton* Rule::getNonExtLhsAutomaton() { if (nonExtLhsAutomaton == 0) { NatSet boundUniquely; bool subproblemLikely; nonExtLhsAutomaton = getLhs()->compileLhs(false, *this, boundUniquely, subproblemLikely); } return nonExtLhsAutomaton; } LhsAutomaton* Rule::getExtLhsAutomaton() { if (extLhsAutomaton == 0) { NatSet boundUniquely; bool subproblemLikely; extLhsAutomaton = getLhs()->compileLhs(true, *this, boundUniquely, subproblemLikely); } return extLhsAutomaton; } void Rule::compile(bool compileLhs) { if (isCompiled()) return; setCompiled(); TermBag availableTerms; // terms available for reuse // // Since rules can be applied in non-eager subterms, if we have // a condition we must consider all variables to be non-eager // to avoid having a condition reduce a lazy subterm. // compileBuild(availableTerms, !hasCondition()); // // HACK: we pessimize the compilation of unconditional rules to avoid // left->right subterm sharing that would break narrowing. // if (!hasCondition()) { TermBag dummy; rhs->compileTopRhs(builder, *this, dummy); } else rhs->compileTopRhs(builder, *this, availableTerms); // original code // builder.dump(cout, *this); compileMatch(compileLhs, true); builder.remapIndices(*this); // // Make all variables in a rules lhs into condition variables so that // if we compile lhs again in getNonExtLhsAutomaton() or getExtLhsAutomaton() // it will be compiled to generate all matchers rather than just those // that differ on variables in the condition. // addConditionVariables(getLhs()->occursBelow()); } int Rule::traceBeginTrial(DagNode* subject, RewritingContext& context) const { return context.traceBeginRuleTrial(subject, this); } void Rule::print(ostream& s) const { s << this; } Maude-Maude3.2/src/Core/rule.hh000066400000000000000000000042351420036611000163310ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for rewrite rules // #ifndef _rule_hh_ #define _rule_hh_ #include "preEquation.hh" #include "rhsBuilder.hh" class Rule : public PreEquation { public: Rule(int label, Term* lhs, Term* rhs, const Vector& condition = noCondition); ~Rule(); Term* getRhs() const; void check(); void preprocess(); void compile(bool compileLhs); const RhsBuilder& getRhsBuilder() const; LhsAutomaton* getNonExtLhsAutomaton(); LhsAutomaton* getExtLhsAutomaton(); void print(ostream& s) const; bool isNarrowing() const; void setNarrowing(); void clearNarrowing(); private: enum Flags { NARROWING = 0x100 }; int traceBeginTrial(DagNode* subject, RewritingContext& context) const; Term* rhs; RhsBuilder builder; LhsAutomaton* nonExtLhsAutomaton; LhsAutomaton* extLhsAutomaton; DagRoot lhsDag; // for unification }; inline Term* Rule::getRhs() const { return rhs; } inline const RhsBuilder& Rule::getRhsBuilder() const { return builder; } inline bool Rule::isNarrowing() const { return getFlag(NARROWING); } inline void Rule::setNarrowing() { setFlags(NARROWING); } inline void Rule::clearNarrowing() { clearFlags(NARROWING); } // // Output function for Rule must be defined by library user // ostream& operator<<(ostream& s, const Rule* rule); #endif Maude-Maude3.2/src/Core/ruleTable.cc000066400000000000000000000064571420036611000172770ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for abstract class RuleTable. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" // interface class definitions //#include "symbol.hh" //#include "dagNode.hh" #include "term.hh" #include "subproblem.hh" #include "extensionInfo.hh" // core class definitions #include "rewritingContext.hh" #include "lhsAutomaton.hh" #include "rhsAutomaton.hh" #include "rule.hh" #include "ruleTable.hh" RuleTable::RuleTable() { nextRule = 0; } void RuleTable::compileRules() { int nrRules = rules.length(); for (int i = 0; i < nrRules; i++) rules[i]->compile(true); } void RuleTable::resetRules() { nextRule = 0; } /* void RuleTable::saveHiddenState() { nextRuleStack.push(nextRule); } void RuleTable::restoreHiddenState() { nextRule = nextRuleStack.top(); nextRuleStack.pop(); } */ DagNode* RuleTable::ruleRewrite(DagNode* subject, RewritingContext& context) { return applyRules(subject, context, 0); } DagNode* RuleTable::applyRules(DagNode* subject, RewritingContext& context, ExtensionInfo* extensionInfo) { Assert(subject->getSortIndex() != Sort::SORT_UNKNOWN, "sort unknown"); int nrRules = rules.length(); int n = nextRule; for (int i = 0; i < nrRules; i++, n++) { if (n >= nrRules) n = n - nrRules; Rule* rl = rules[n]; if (rl->isNonexec()) continue; int nrVariables = rl->getNrProtectedVariables(); context.clear(nrVariables); Subproblem* sp; if (rl->getLhsAutomaton()->match(subject, context, sp, extensionInfo)) { if (sp == 0 || sp->solve(true, context)) { if (!(rl->hasCondition()) || rl->checkCondition(subject, context, sp)) { DagNode* r; if (RewritingContext::getTraceStatus()) { context.tracePreRuleRewrite(subject, rl); if (context.traceAbort()) { delete sp; context.finished(); return subject; } } if (extensionInfo == 0 || extensionInfo->matchedWhole()) r = rl->getRhsBuilder().construct(context); else { r = subject->partialConstruct(rl->getRhsBuilder().construct(context), extensionInfo); } context.incrementRlCount(); delete sp; context.finished(); nextRule = n + 1; return r; } } delete sp; } context.finished(); } subject->setUnrewritable(); return 0; } void RuleTable::resetEachRule() { for (Rule* r : rules) r->reset(); } Maude-Maude3.2/src/Core/ruleTable.hh000066400000000000000000000036421420036611000173020ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Abstract class for table of rules indexed under some symbol. // #ifndef _ruleTable_hh_ #define _ruleTable_hh_ #include #include class RuleTable { public: RuleTable(); void offerRule(Rule* rule); const Vector& getRules() const; bool ruleFree() const; virtual void compileRules(); virtual DagNode* ruleRewrite(DagNode* subject, RewritingContext& context); virtual void resetRules(); //virtual void saveHiddenState(); //virtual void restoreHiddenState(); protected: virtual bool acceptRule(Rule* rule) = 0; DagNode* applyRules(DagNode* subject, RewritingContext& context, ExtensionInfo* extensionInfo); void resetEachRule(); private: //typedef stack > IntStack; // optimize for the empty case Vector rules; int nextRule; //IntStack nextRuleStack; }; inline const Vector& RuleTable::getRules() const { return rules; } inline void RuleTable::offerRule(Rule* rule) { if (acceptRule(rule)) rules.append(rule); } inline bool RuleTable::ruleFree() const { return rules.isNull(); } #endif Maude-Maude3.2/src/Core/run.cc000066400000000000000000000237661420036611000161660ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ void RewritingContext::ruleRewrite(Int64 limit) { Vector redexStack; for (Int64 nrRewrites = 0;; nrRewrites++) { reduce(); if (nrRewrites == limit) return; redexStack.contractTo(0); redexStack.append(RedexPosition(rootNode, UNDEFINED, UNDEFINED, true)); int nextToExplore = 0; int finish = redexStack.length(); for (int nextToRewrite = 0;; nextToRewrite++) { if (nextToRewrite == finish) { // // No dag nodes to rewrite so stack the arguments of a dag node. // for (;;) { if (nextToExplore == finish) return; DagNode* d = redexStack[nextToExplore].node(); /* DebugAdvisory("Exploring " << d << " unrewritable = " << d->isUnrewritable() << " unstackable = " << d->isUnstackable()); */ // // Only want to try rewriting one copy of repeated arguments // where possible. // d->symbol()->stackPhysicalArguments(d, redexStack, nextToExplore); ++nextToExplore; int len = redexStack.length(); if (len > finish) { finish = len; break; } // // Because redexStack didn't grow, all of d's arguments must // be unstackable. We might assume that d is unrewritable otherwise // we would have already rewritten it; but for safety in the future // (say if we use this routine in conjunction with objects that // couldn't rewrite at some point but might become rewritable in the // future) we do an explicit check. // if (d->isUnrewritable()) d->setUnstackable(); } } DagNode* d = redexStack[nextToRewrite].node(); if (d->isUnrewritable()) continue; DagNode* r = d->symbol()->ruleRewrite(d, *this); if (r != 0) { int argIndex = redexStack[nextToRewrite].argIndex(); DagNode* p = r; for (int i = redexStack[nextToRewrite].parentIndex(); i != UNDEFINED;) { RedexPosition& rp = redexStack[i]; p = rp.node()->copyWithReplacement(argIndex, p); argIndex = rp.argIndex(); i = rp.parentIndex(); } rootNode = p; if (traceFlag) { if (traceAbort()) return; tracePostRuleRewrite(r); } MemoryCell::okToCollectGarbage(); break; } } } } void RewritingContext::fairRewrite(Int64 limit, Int64 gas) { rewriteLimit = limit; gasPerNode = gas; currentIndex = 0; lazyMarker = NONE; reduce(); redexStack.clear(); redexStack.append(RedexPosition(rootNode, UNDEFINED, UNDEFINED, true)); do { progress = false; if (fairTraversal()) return ; // we hit our rewrite limit } while(progress); return; // no more redexes } void RewritingContext::fairContinue(Int64 limit) { if (progress) { rewriteLimit = limit; if (fairTraversal()) return; // we hit our rewrite limit do { progress = false; if (fairTraversal()) return; // we hit our rewrite limit } while (progress); } return; // no more redexes } void RewritingContext::fairStart(Int64 limit, Int64 gas) { rewriteLimit = limit; gasPerNode = gas; currentIndex = 0; lazyMarker = NONE; reduce(); redexStack.clear(); redexStack.append(RedexPosition(rootNode, UNDEFINED, UNDEFINED, true)); } bool RewritingContext::fairTraversal() { // // Return true if we stop mid-traversal because of rewrite limit // and false if traversal completed. // bool argsUnstackable; if (currentIndex == 0) { // // Either this is our first traversal or we just completed a traversal. // Either way we descend the leftmost path to start a new traveral. // descend(); argsUnstackable = true; currentGas = gasPerNode; progress = false; } else argsUnstackable = (redexStack[currentIndex].node()->symbol()->arity() == 0); while (!doRewriting(argsUnstackable)) // until we hit rewrite limit { if (currentIndex == 0) return false; // end of traversal // // Check if we are leaving the node pointed at by the // lazy marker. // if (currentIndex == lazyMarker) lazyMarker = NONE; // // Find next potentially rewritable node using depth-first // traversal by checking for a right sibling on the stack, // and failing that ascending. // if (currentIndex + 1 < redexStack.length()) { Assert(redexStack[currentIndex].parentIndex() == redexStack[currentIndex + 1].parentIndex(), "redexStack corrupt"); ++currentIndex; // across to sibling descend(); argsUnstackable = true; } else argsUnstackable = ascend(); currentGas = gasPerNode; } return true; } bool RewritingContext::ascend() { // // Go up one node. // Return true if new current node is guaranteed to have all args unstackable. // // Because we only ascend when we have no right sibling on the stack // we can assume current node is the last stacked argument of its parent. // int last = currentIndex; // // Parent becomes current. // currentIndex = redexStack[currentIndex].parentIndex(); // // Now we need to find first stacked argument of parent node. // int first = last; while (redexStack[first - 1].parentIndex() == currentIndex) --first; // // Rebuild parent node if it is stale. // RedexPosition& rp = redexStack[currentIndex]; if (staleMarker == currentIndex) { rp.replaceNode(rp.node()->copyWithReplacement(redexStack, first, last)); staleMarker = rp.parentIndex(); // our parent now becomes stale MemoryCell::okToCollectGarbage(); } // // Reduce node if needed and check for unstackable args. // DagNode* d = rp.node(); bool argsUnstackable; if (lazyMarker != NONE || d->isReduced()) { argsUnstackable = true; for (int i = first; i <= last; i++) { if (!(redexStack[i].node()->isUnstackable())) { argsUnstackable = false; break; } } } else { d->reduce(*this); argsUnstackable = (d->symbol()->arity() == 0); } // // Remove arguments of new current node from the stack. // redexStack.contractTo(first); return argsUnstackable; } void RewritingContext::descend() { // // Finds leftmost leaf (or quasi-leaf) below currentIndex. // Updates redexStack, currentIndex and lazyMarker. // for (;;) { DagNode* d = redexStack[currentIndex].node(); // // Whenever we arrive at a non-eager node, if the lazy // marker is not set, we point it at this node. Then // until we leave this node and its descendents we must not // do equational rewriting. // if (lazyMarker == NONE && !(redexStack[currentIndex].isEager())) lazyMarker = currentIndex; // // We ask the dag nodes symbol to stack those arguments // which are not either frozen or unstackable. // int first = redexStack.length(); d->symbol()->stackArguments(d, redexStack, currentIndex); // // If no new dag nodes were stacked we hit a quasi-leaf. // if (first == redexStack.length()) break; // // Otherwise set current node to the first (leftmost) // stacked argument and continue down the term. // currentIndex = first; } } bool RewritingContext::doRewriting(bool argsUnstackable) { // // Tries to rewrite node at currentIndex. // Returns true if we stop because of rewrite limit. // Return false we stop because we ran out of gas or because // no more rewrites are possible. // Updates redexStack, currentGas, nrRewritesAllowed, progress. // Only routine in fair rewriting that sets unstackable flag. // DagNode* d = redexStack[currentIndex].node(); if (d->isUnrewritable()) { // // *d's unrewritable flag could have been set in an // earlier traversal when it had a stackable argument. // If no rewrites occurred in this stackable argument it // would eventually become unstackable and *d would never // become stale and never be replaced. So we need to check // for this case. // if (argsUnstackable) d->setUnstackable(); } else { Symbol* s = d->symbol(); while (currentGas > 0) { DagNode* r = s->ruleRewrite(d, *this); if (r == 0) { // // Just because we couldn't do any rewrites it doesn't follow // that we will never be able to do rewrites here - some external // agency might force a rewrite; so we check to see if the // unrewritable flag was set by ruleRewrite(). This virtual function // will be aware of any external agency that might affect its symbol // and will act accordingly. // if (argsUnstackable && d->isUnrewritable()) d->setUnstackable(); break; } progress = true; d = r; redexStack[currentIndex].replaceNode(r); staleMarker = redexStack[currentIndex].parentIndex(); MemoryCell::okToCollectGarbage(); if (traceFlag) { if (traceAbort()) return true; // pretend we hit rewrite limit tracePostRuleRewrite(r); } if (lazyMarker == NONE) d->reduce(*this); --currentGas; if (rewriteLimit != NONE && --rewriteLimit == 0) return true; s = d->symbol(); argsUnstackable = (s->arity() == 0); } } return false; } Maude-Maude3.2/src/Core/simpleRootContainer.hh000066400000000000000000000025071420036611000213620ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Abstract base class for objects that contain dag root pointers and don't need // to manually link and unlink from the active list. // #ifndef _simpleRootContainer_hh_ #define _simpleRootContainer_hh_ #include "rootContainer.hh" class SimpleRootContainer : protected RootContainer { protected: SimpleRootContainer(); ~SimpleRootContainer(); }; inline SimpleRootContainer::SimpleRootContainer() { link(); } inline SimpleRootContainer::~SimpleRootContainer() { unlink(); } #endif Maude-Maude3.2/src/Core/sort.cc000066400000000000000000000066101420036611000163360ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class Sort // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" // core class definitions #include "namedEntity.hh" #include "sort.hh" #include "connectedComponent.hh" // full compiler definitions #include "compilationContext.hh" Sort::Sort(int id) : NamedEntity(id) { sortComponent = 0; } void Sort::insertSubsort(Sort* subsort) { subsorts.append(subsort); subsort->supersorts.append(this); } void Sort::registerConnectedSorts(ConnectedComponent* component) { sortComponent = component; component->registerSort(this); // // explore subsorts // int nrSorts = subsorts.length(); for (int i = 0; i < nrSorts; i++) { Sort* s = subsorts[i]; if (s->sortComponent == 0) s->registerConnectedSorts(component); } // // explore supersorts // nrSorts = supersorts.length(); if (nrSorts == 0) sortIndex = component->appendSort(this); else { nrUnresolvedSupersorts = nrSorts; for (int i = 0; i < nrSorts; i++) { Sort* s = supersorts[i]; if (s->sortComponent == 0) s->registerConnectedSorts(component); } } } void Sort::processSubsorts() { int nrSorts = subsorts.length(); for (int i = 0; i < nrSorts; i++) { Sort* s = subsorts[i]; --(s->nrUnresolvedSupersorts); if (s->nrUnresolvedSupersorts == 0) s->sortIndex = sortComponent->appendSort(s); } } void Sort::computeLeqSorts() { leqSorts.insert(sortIndex); int nrSubSorts = subsorts.length(); for (int i = 0; i < nrSubSorts; i++) leqSorts.insert(subsorts[i]->leqSorts); // // fastTest is the smallest integer such that all sorts with // index >= fastTest are less or equal us. // int nrSorts = sortComponent->nrSorts(); fastTest = sortIndex; for (int i = nrSorts - 1; i > sortIndex; i--) { if (!(leqSorts.contains(i))) { fastTest = i + 1; break; } } } #ifdef COMPILER void Sort::generateSortVector(CompilationContext& context) { context.head() << "char s" << getIndexWithinModule() << "[] = { "; int nrSorts = sortComponent->nrSorts(); for (int i = 0; i < nrSorts ; i++) { context.head() << (leqSorts.contains(i) ? '1' : '0'); if (i + 1 < nrSorts) context.head() << ", "; } context.head() << " };"; #ifdef ANNOTATE context.head() << " // " << this; #endif context.head() << '\n'; } #endif #ifdef DUMP void Sort::dump(ostream& s) { s << "Sort name:\t" << this << "\tsortIndex = " << sortIndex << "\tfastTest = " << fastTest << '\n'; } #endif Maude-Maude3.2/src/Core/sort.hh000066400000000000000000000073661420036611000163610ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for sorts // #ifndef _sort_hh_ #define _sort_hh_ #include "namedEntity.hh" #include "lineNumber.hh" #include "moduleItem.hh" #include "natSet.hh" #include "connectedComponent.hh" #include "fullCompiler.hh" class Sort : public NamedEntity, public LineNumber, public ModuleItem { NO_COPYING(Sort); public: enum SpecialSorts { KIND = 0, ERROR_SORT = 0, FIRST_USER_SORT = 1, SORT_UNKNOWN = -1 }; Sort(int id); void insertSubsort(Sort* subsort); int index() const; ConnectedComponent* component() const; const Vector& getSubsorts() const; const Vector& getSupersorts() const; const NatSet& getLeqSorts() const; bool errorFreeMaximal() const; bool fastGeq(int index) const; bool fastGeqSufficient() const; #ifdef COMPILER void generateSortVector(CompilationContext& context); #endif #ifdef DUMP void dump(ostream& s); #endif // // for use by ConnectedComponent only // void registerConnectedSorts(ConnectedComponent* component); void processSubsorts(); void computeLeqSorts(); friend bool leq(const Sort* sort1, const Sort* sort2); friend bool leq(int index1, const Sort* sort2); friend bool leq(const Sort* sort1, int index2); private: union { int sortIndex; int nrUnresolvedSupersorts; // only used in calculating sortIndex }; int fastTest; ConnectedComponent* sortComponent; Vector subsorts; Vector supersorts; NatSet leqSorts; }; inline int Sort::index() const { return sortIndex; } inline ConnectedComponent* Sort::component() const { return sortComponent; } inline const Vector& Sort::getSubsorts() const { return subsorts; } inline const Vector& Sort::getSupersorts() const { return supersorts; } inline const NatSet& Sort::getLeqSorts() const { return leqSorts; } inline bool Sort::errorFreeMaximal() const { return sortIndex == 1 && sortComponent->nrMaximalSorts() == 1 && sortComponent->errorFree(); } inline bool Sort::fastGeq(int index) const { // // This function avoids pulling in general NatSet code but only returns the correct // result if (fastTest - 1) <= NatSet::smallIntBound // Assert(index != Sort::SORT_UNKNOWN, "unknown sort"); return (index >= fastTest) ? true : leqSorts.containsSmall(index); } inline bool Sort::fastGeqSufficient() const { return (fastTest - 1) <= NatSet::smallIntBound; } inline bool leq(const Sort* sort1, const Sort* sort2) { return sort2->leqSorts.contains(sort1->sortIndex); } inline bool leq(int index1, const Sort* sort2) { Assert(index1 != Sort::SORT_UNKNOWN, "unknown sort"); if (index1 >= sort2->fastTest) return true; return sort2->leqSorts.contains(index1); } inline bool leq(const Sort* sort1, int index2) { return leq(sort1->sortIndex, sort1->sortComponent->sort(index2)); } // // Output function for Sort must be defined by library user. // ostream& operator<<(ostream& s, const Sort* sort); #endif Maude-Maude3.2/src/Core/sortBdds.cc000066400000000000000000000240321420036611000171310ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2010 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class Sort // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" // core class definitions #include "sort.hh" #include "connectedComponent.hh" #include "module.hh" #include "sortBdds.hh" SortBdds::SortBdds(Module* module) { // // For each connected component of sorts, we calculate how many BDD variables are // need to encode such a sort. // const Vector& components = module->getConnectedComponents(); int nrComponents = components.size(); componentInfo.resize(nrComponents); int maxNrSorts = 0; for (int i = 0; i < nrComponents; i++) { int nrSorts = components[i]->nrSorts(); if (nrSorts > maxNrSorts) maxNrSorts = nrSorts; componentInfo[i].nrVariables = calculateNrBits(nrSorts); } maxNrVariables = calculateNrBits(maxNrSorts); setNrVariables(2 * maxNrVariables); // // For each connected component c we build the BDD encoding the relation // valid(s1) /\ valid(s2) /\ s1 > s2 // for sorts s1 and s2 in c. // // Here s1 is encoded by BDD variables: // 0,...,maxNrVariables-1 // and s2 is encoded by BDD variables: // maxNrVariables,...,2*maxNrVariables-1 // for (int i = 0; i < nrComponents; ++i) { int nrVariables = componentInfo[i].nrVariables; ConnectedComponent* c = components[i]; int nrSorts = c->nrSorts(); Bdd disjunct; // initialized to false by default for (int s1 = 0; s1 < nrSorts; ++s1) { Bdd lesserSorts; // initialized to false by default const NatSet& leqSorts = c->sort(s1)->getLeqSorts(); for (int s2 = s1 + 1; s2 < nrSorts; ++s2) // starting at s1+1 rules out the equals case { if (leqSorts.contains(s2)) lesserSorts = bdd_or(lesserSorts, makeIndexBdd(maxNrVariables, nrVariables, s2)); } // // At this point lesserSorts holds the relation less_than_s1(s2) for current s1. // disjunct = bdd_or(disjunct, bdd_and(makeIndexBdd(0, nrVariables, s1), lesserSorts)); } componentInfo[i].gtRelation = disjunct; } DebugAdvisory("After gtRelation computation: BDD nodes in use: " << bdd_getnodenum()); // // For each sort s we compute the BDD encoding the relation // valid(s1) /\ s1 <= s // // Here s1 is encoded by BDD variables: // 0,...,maxNrVariables-1 // const Vector& sorts = module->getSorts(); int nrSorts = sorts.size(); leqRelations.resize(nrSorts); for (int i = 0; i < nrSorts; ++i) { Bdd disjunct; Sort* s = sorts[i]; int nrVariables = getNrVariables(s->component()->getIndexWithinModule()); const NatSet& leqSorts = s->getLeqSorts(); for (int j : leqSorts) disjunct = bdd_or(disjunct, makeIndexBdd(0, nrVariables, j)); leqRelations[i] = disjunct; DebugAdvisory("leq BDD for sort " << s << " is " << disjunct << " using " << nrVariables << " variables"); } DebugAdvisory("After leqRelation computation: BDD nodes in use: " << bdd_getnodenum()); } const Vector& SortBdds::getSortFunction(Symbol* symbol) const { // // We construct the sort function on demand. This is partly to save time and space // on symbols that don't occur in unification problems, but mostly to handle // late symbols. // int symbolIndex = symbol->getIndexWithinModule(); int currentSize = sortFunctions.size(); if (currentSize <= symbolIndex) { // // Resizing a vector of vectors of BDDs is very expensive so make it as large // as we currently expect. // sortFunctions.resize(symbol->getModule()->getSymbols().size()); } Vector& f = sortFunctions[symbolIndex]; if (f.isNull()) symbol->computeSortFunctionBdds(*this, f); return f; } void SortBdds::makeIndexVector(int nrBdds, int index, Vector& vec) const { // // Make a vector of nrBdds true/false BDDs that encodes index. // // This is useful for returning the vector of BDDs encoding of a constant sort. // vec.resize(nrBdds); for (int i = 0; index != 0; ++i, (index >>= 1)) { if (index & 1) vec[i] = bddtrue; } } void SortBdds::makeVariableVector(int firstVariable, int nrVariables, Vector& vec) const { // // Make a vector of nrVariables BDDs that encodes the BDD variables // firstVariable,..., firstVariable + nrVariables - 1. // // This is useful for returning the vector of BDDs encoding of the undetermined // sort of a variable. // vec.resize(nrVariables); for (int i = 0; i < nrVariables; ++i) vec[i] = bdd_ithvar(firstVariable + i); } void SortBdds::appendVariableVector(int firstBddVariable, int nrBddVariables, Vector& vec) const { // // Make a vector of nrBddVariables BDDs that encodes the BDD variables // firstBddVariable,..., firstBddVVariable + nrBddVVariables - 1 and append it to vec. // // sort of a Maude variable. // for (int i = 0; i < nrBddVariables; ++i) vec.append(bdd_ithvar(firstBddVariable + i)); } Bdd SortBdds::makeIndexBdd(int firstVariable, int nrVariables, int index) const { // // Return a BDD in (firstVariable,..., firstVariable + nrVariables - 1) which is true exactly if // for all k in 0,..., nrVariables - 1, BDD variable firstVariable + k corresponds to the kth // bit in the binary representation of index. // Bdd result = bdd_true(); int end = firstVariable + nrVariables; for (int i = firstVariable; i < end; ++i, index >>= 1) result = bdd_and(result, (index & 1) ? bdd_ithvar(i) : bdd_nithvar(i)); return result; } Bdd SortBdds::makeVariableBdd(int firstVariable, int nrVariables) const { // // Make a BDD that represents the set of BDD variables // {firstVariable, firstVariable + 1 firstVariable + nrVariables - 1} // as a conjunction. // // This is useful for quantification over a set of BDD variables. // Bdd result = bdd_true(); int end = firstVariable + nrVariables; for (int i = firstVariable; i < end; ++i) result = bdd_and(result, bdd_ithvar(i)); return result; } int SortBdds::calculateNrBits(int nrIndicies) { // // Calculate the number of bits needed to represent 0,..., nrIndicies-1. // int nrBits = 1; for (int representable = 2; representable < nrIndicies; ++nrBits, representable <<= 1) ; return nrBits; } Bdd SortBdds::getRemappedLeqRelation(Sort* sort, int firstVariable) const { // // We return a BDD for the sort relation valid(s) /\ s <= sort // with the BDD variables representing s remapped to start from // firstVariable. // int nrVariables = getNrVariables(sort->component()->getIndexWithinModule()); //bddPair* varMap = bdd_newpair(); bddPair* varMap = getCachedPairing(); for (int i = 0; i < nrVariables; ++i) bdd_setpair(varMap, i, firstVariable + i); Bdd leqRelation = bdd_replace(getLeqRelation(sort->getIndexWithinModule()), varMap); //bdd_freepair(varMap); for (int i = 0; i < nrVariables; ++i) bdd_setbddpair(varMap, i, bdd_false()); return leqRelation; } Bdd SortBdds::applyLeqRelation(Sort* sort, const Vector& argument) const { // // We return a Bdd for the sort relation valid(s) /\ s <= sort // applied to an s given by a vector of BDDs. // int nrBdds = argument.size(); Assert(nrBdds == getNrVariables(sort->component()->getIndexWithinModule()), "wrong number of BDD arguments: expecting " << getNrVariables(sort->component()->getIndexWithinModule()) << " passed " << nrBdds << " sort " << sort); //bddPair* argMap = bdd_newpair(); bddPair* argMap = getCachedPairing(); for (int i = 0; i < nrBdds; ++i) bdd_setbddpair(argMap, i, argument[i]); Bdd result = bdd_veccompose(getLeqRelation(sort->getIndexWithinModule()), argMap); //bdd_freepair(argMap); for (int i = 0; i < nrBdds; ++i) bdd_setbddpair(argMap, i, bdd_false()); return result; } // experimental code for faster sort computations void SortBdds::appendIndexVector(int nrBdds, int index, Vector& vec) const { // // Make a vector of nrBdds true/false BDDs that encodes index. // // This is useful for returning the vector of BDDs encoding of a constant sort. // int oldSize = vec.size(); vec.resize(nrBdds + oldSize); for (int i = oldSize; index != 0; ++i, (index >>= 1)) { if (index & 1) vec[i] = bddtrue; } } void SortBdds::operatorCompose(Symbol* op, const Vector& inputBdds, Vector& outputBdds) const { // // Calling this could increase the number of BDD variables so need to // get it out of the way before we get the caching pairing. // const Vector& sortFunction = getSortFunction(op); // // Now fill out the cached pairing with our input BDDs. // bddPair* cachedPairing = getCachedPairing(); int nrInputBdds = inputBdds.size(); for (int i = 0; i < nrInputBdds; ++i) bdd_setbddpair(cachedPairing, i, inputBdds[i]); // // Apply compose with each of BDDs representing the sort function // and append the result to the output BDDs. // for (Bdd b : sortFunction) outputBdds.append(bdd_veccompose(b, cachedPairing)); // // Clean up the cached pairing by setting all the used slots // to bdd_false(). This avoids the cached pairing containing pointers // to unused junk and messing with garbage collection. // for (int i = 0; i < nrInputBdds; ++i) bdd_setbddpair(cachedPairing, i, bdd_false()); } Maude-Maude3.2/src/Core/sortBdds.hh000066400000000000000000000066311420036611000171500ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2006 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class to storage bdds associated with each sort index and each component. // These are currently only used for order-sorted unification and can take up // a fair amount of computation and storage. Thus they are computed on demand // and cached in this structure. // #ifndef _sortBdds_hh_ #define _sortBdds_hh_ #include "bdd.hh" #include "bddUser.hh" class SortBdds : private BddUser { public: SortBdds(Module* module); int getFirstAvailableVariable() const; int getNrVariables(int componentIndex) const; Bdd getGtRelation(int componentIndex) const; Bdd getLeqRelation(int sortIndex) const; Bdd getRemappedLeqRelation(Sort* sort, int firstVariable) const; Bdd applyLeqRelation(Sort* sort, const Vector& argument) const; const Vector& getSortFunction(Symbol* symbol) const; void makeIndexVector(int nrBdds, int index, Vector& vec) const; Bdd makeIndexBdd(int firstVariable, int nrVariables, int index) const; void makeVariableVector(int firstVariable, int nrVariables, Vector& vec) const; // might delete this eventually void appendVariableVector(int firstBddVariable, int nrBddVariables, Vector& vec) const; Bdd makeVariableBdd(int firstVariable, int nrVariables) const; void appendIndexVector(int nrBdds, int index, Vector& vec) const; void operatorCompose(Symbol* op, const Vector& inputBdds, Vector& outputBdds) const; private: struct ComponentInfo { int nrVariables; // number of bits needed to represent a sort in this component Bdd gtRelation; // bdd for relation s1 valid /\ s2 valid /\ s1 > s2 }; int calculateNrBits(int nrIndicies); int maxNrVariables; // the max number of variables needed for any component // // For each component we keep the number of variables needed to encode a sort // in this component and the bdd for relation s1 valid /\ s2 valid /\ s1 > s2. // Vector componentInfo; // // For each sort s we keep the bdd for the relation x <= s. // Vector leqRelations; // // For each symbol, we keep a vector of BDDs to hold its sort function - which // may or may not be filled out. // mutable Vector > sortFunctions; }; inline int SortBdds::getFirstAvailableVariable() const { return maxNrVariables; } inline int SortBdds::getNrVariables(int componentIndex) const { return componentInfo[componentIndex].nrVariables; } inline Bdd SortBdds::getGtRelation(int componentIndex) const { return componentInfo[componentIndex].gtRelation; } inline Bdd SortBdds::getLeqRelation(int sortIndex) const { return leqRelations[sortIndex]; } #endif Maude-Maude3.2/src/Core/sortCheckSubproblem.cc000066400000000000000000000030701420036611000213240ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class SortCheckSubproblem // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" // core class definitions #include "sortCheckSubproblem.hh" SortCheckSubproblem::SortCheckSubproblem(DagNode* subject, const Sort* sort) : subject(subject), sort(sort) { result = UNDEFINED; } bool SortCheckSubproblem::solve(bool findFirst, RewritingContext& solution) { if (!findFirst) return false; // only ever one way to solve; otherwise infinite loop if (result == UNDEFINED) result = subject->checkSort(sort, solution); return result; } Maude-Maude3.2/src/Core/sortCheckSubproblem.hh000066400000000000000000000024001420036611000213320ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for subproblems which simply involve checking the sort of a dagNode // #ifndef _sortCheckSubproblem_hh_ #define _sortCheckSubproblem_hh_ #include "subproblem.hh" class SortCheckSubproblem : public Subproblem { public: SortCheckSubproblem(DagNode* subject, const Sort* sort); bool solve(bool findFirst, RewritingContext& solution); private: DagNode* subject; const Sort* sort; int result; }; #endif Maude-Maude3.2/src/Core/sortConstraint.cc000066400000000000000000000047571420036611000204150ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class SortConstraint. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" #include "term.hh" // core class definitions #include "rewritingContext.hh" #include "termBag.hh" #include "sortConstraint.hh" SortConstraint::SortConstraint(int label, Term* lhs, Sort* sort, const Vector& condition) : PreEquation(label, lhs, condition), sort(sort) { Assert(sort != 0, "null sort"); } void SortConstraint::check() { NatSet boundVariables; PreEquation::check(boundVariables); if (!isNonexec() && !getUnboundVariables().empty()) { IssueWarning(*this << ": variable " << QUOTE(index2Variable(getUnboundVariables().min())) << " is used before it is bound in membership axiom:\n" << this); // // No legitimate use for such sort constraints so mark it as bad. // markAsBad(); } } void SortConstraint::preprocess() { PreEquation::preprocess(); Assert(getLhs()->getComponent() == sort->component(), "component clash"); } void SortConstraint::compile(bool compileLhs) { if (isCompiled()) return; setCompiled(); TermBag availableTerms; // terms available for reuse compileBuild(availableTerms, false); compileMatch(compileLhs, false); } int SortConstraint::traceBeginTrial(DagNode* subject, RewritingContext& context) const { return context.traceBeginScTrial(subject, this); } void SortConstraint::print(ostream& s) const { s << this; } Maude-Maude3.2/src/Core/sortConstraint.hh000066400000000000000000000031041420036611000204100ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for sort constraints. // #ifndef _sortConstraint_hh_ #define _sortConstraint_hh_ #include "preEquation.hh" class SortConstraint : public PreEquation { public: SortConstraint(int label, Term* lhs, Sort* sort, const Vector& condition = noCondition); Sort* getSort() const; void check(); void preprocess(); void compile(bool compileLhs); void print(ostream& s) const; private: int traceBeginTrial(DagNode* subject, RewritingContext& context) const; Sort* sort; }; inline Sort* SortConstraint::getSort() const { return sort; } // // Output function for SortConstraint must be defined by library user // ostream& operator<<(ostream& s, const SortConstraint* sortConstraint); #endif Maude-Maude3.2/src/Core/sortConstraintTable.cc000066400000000000000000000126541420036611000213600ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for abstract class RuleTable. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" #include "variable.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" #include "term.hh" #include "subproblem.hh" #include "extensionInfo.hh" // core class definitions #include "substitution.hh" #include "rewritingContext.hh" #include "lhsAutomaton.hh" #include "rhsAutomaton.hh" #include "variableInfo.hh" #include "preEquation.hh" #include "sortConstraint.hh" #include "sortConstraintTable.hh" SortConstraintTable::SortConstraintTable() { tableComplete = false; } local_inline bool SortConstraintTable::sortConstraintLt(SortConstraint* const& sc1, SortConstraint* const& sc2) { // // Sort constraints are sorted in the order: largest index (smallest sort) first // return sc2->getSort()->index() < sc1->getSort()->index(); // reverse order // IDEA: might want to weaken comparison and do a stable_sort() // BUT: stable_sort() requires a strict weak ordering - much stronger that // the partial ordering we have on sorts. } void SortConstraintTable::orderSortConstraints() { // // sortConstraints may contain sort constraints with variable lhs which have // too low a sort to ever match our symbol. However the sort of our symbol // is itself affected by sort constraints. So we "comb" out usable sort // constraints in successive passes; this is inefficient but we expect the number // of sort constraints to be very small so it's not worth doing anything smarter. // tableComplete = true; // not really complete until we've finished, but pretend it is int nrSortConstraints = sortConstraints.length(); if (nrSortConstraints == 0) return; Vector all; all.swap(sortConstraints); bool addedSortConstraint; do { addedSortConstraint = false; for (int i = 0; i < nrSortConstraints; i++) { SortConstraint* sc = all[i]; // // Because we set tableComplete = true; acceptSortConstraint() may // inspect the table of sortConstraints accepted so far and make // a finer distinction than it could in offerSortConstraint(). // if (sc != 0 && acceptSortConstraint(sc)) { sortConstraints.append(sc); all[i] = 0; addedSortConstraint = true; } } } while (addedSortConstraint); sort(sortConstraints.begin(), sortConstraints.end(), sortConstraintLt); } void SortConstraintTable::compileSortConstraints() { int nrConstraints = sortConstraints.length(); for (int i = 0; i < nrConstraints; i++) sortConstraints[i]->compile(true); } void SortConstraintTable::constrainToSmallerSort2(DagNode* subject, RewritingContext& context) { if (context.isLimited()) { // // Limited rewriting contexts don't support sort constraint application and // are only used for functionality that doesn't support sort constraints. // DebugInfo("ignoring sort constraints for " << subject << " because context is limited"); return; } int currentSortIndex = subject->getSortIndex(); Subproblem* sp; // // We try sort constraints, smallest sort first until one applies or // all remaining sort constraints have sort >= than our current sort. // Whenever we succeed in applying a sort constraint we start again // with the new sort, because earlier sort constraints (via collapse // or variable lhs patterns) may be able to test this new sort. // int nrConstraints = sortConstraints.length(); retry: for (int i = 0; i < nrConstraints; i++) { SortConstraint* sc = sortConstraints[i]; Sort* s = sc->getSort(); if (leq(currentSortIndex, s)) break; if (leq(s, currentSortIndex)) // not equal because of previous test { int nrVariables = sc->getNrProtectedVariables(); context.clear(nrVariables); if (sc->getLhsAutomaton()->match(subject, context, sp, 0)) { if (sp == 0 || sp->solve(true, context)) { if (!(sc->hasCondition()) || sc->checkCondition(subject, context, sp)) { delete sp; if (RewritingContext::getTraceStatus()) { context.tracePreScApplication(subject, sc); if (context.traceAbort()) { context.finished(); return; } } context.incrementMbCount(); context.finished(); MemoryCell::okToCollectGarbage(); currentSortIndex = s->index(); subject->setSortIndex(currentSortIndex); goto retry; } } delete sp; } context.finished(); MemoryCell::okToCollectGarbage(); } } } Maude-Maude3.2/src/Core/sortConstraintTable.hh000066400000000000000000000051551420036611000213700ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Abstract class for table of sort constraints indexed under some symbol. // #ifndef _sortConstraintTable_hh_ #define _sortConstraintTable_hh_ class SortConstraintTable { public: SortConstraintTable(); void offerSortConstraint(SortConstraint* sortConstraint); const Vector& getSortConstraints() const; bool sortConstraintFree() const; void orderSortConstraints(); virtual void compileSortConstraints(); void constrainToSmallerSort(DagNode* subject, RewritingContext& context); void constrainToExactSort(DagNode* subject, RewritingContext& context); protected: bool safeToInspectSortConstraints(); virtual bool acceptSortConstraint(SortConstraint* sortConstraint) = 0; private: static bool sortConstraintLt(SortConstraint* const& sc1, SortConstraint* const& sc2); void constrainToSmallerSort2(DagNode* subject, RewritingContext& context); bool tableComplete; Vector sortConstraints; }; inline void SortConstraintTable::offerSortConstraint(SortConstraint* sortConstraint) { if (acceptSortConstraint(sortConstraint)) sortConstraints.append(sortConstraint); } inline const Vector& SortConstraintTable::getSortConstraints() const { return sortConstraints; } inline bool SortConstraintTable::sortConstraintFree() const { return sortConstraints.isNull(); } inline void SortConstraintTable::constrainToSmallerSort(DagNode* subject, RewritingContext& context) { if (!sortConstraintFree()) constrainToSmallerSort2(subject, context); } inline void SortConstraintTable::constrainToExactSort(DagNode* subject, RewritingContext& context) { if (!sortConstraintFree()) constrainToSmallerSort2(subject, context); } inline bool SortConstraintTable::safeToInspectSortConstraints() { return tableComplete; } #endif Maude-Maude3.2/src/Core/sortErrorAnalysis.cc000066400000000000000000000100621420036611000210500ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2020 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Detailed analysis of a preregularity or constuctor consistancy issue to impress the user. // #include #include //#include struct SortTable::Node { mpz_class pathCount; int parent; int sortIndex; }; void SortTable::sortErrorAnalysis(bool preregProblem, const set& badTerminals) { //copy(badTerminals.begin(), badTerminals.end(), ostream_iterator(cout, " ")); //cout << endl; // // First we build a spanning tree with a path count, parent node and sort index // (from parent) for each node. Nonterminal nodes are named by their start index // in the diagram vector while terminals are named by the absolute index of the // terminal in the diagram vector. // const Vector& diagram = preregProblem ? sortDiagram : ctorDiagram; typedef map SpanningTree; SpanningTree spanningTree; spanningTree[0].pathCount = 1; spanningTree[0].parent = NONE; spanningTree[0].sortIndex = NONE; mpz_class product = 1; mpz_class badCount = 0; Vector firstBad(nrArgs); set currentNodes; currentNodes.insert(0); for (int i = 0; i < nrArgs; ++i) { set nextNodes; const ConnectedComponent* component = componentVector[i]; int nrSorts = component->nrSorts(); product *= nrSorts; for (int parent : currentNodes) { mpz_class& pathCount = spanningTree[parent].pathCount; for (int k = 0; k < nrSorts; ++k) { int index = parent + k; if (i == nrArgs - 1) { // // Terminal node - see if it is bad. // if (badTerminals.find(index) != badTerminals.end()) { //cerr << " pathCount = " << pathCount << endl; if (badCount == 0) { badCount = pathCount; firstBad[nrArgs - 1] = k; int n = parent; for (int l = nrArgs - 2; l >= 0; --l) { SpanningTree::const_iterator t = spanningTree.find(n); Assert(t != spanningTree.end(), "missing node"); firstBad[l] = t->second.sortIndex; n = t->second.parent; } //copy(firstBad.begin(), firstBad.end(), ostream_iterator(cout, " ")); //cout << endl; } else badCount += pathCount; } } else { // // Nonterminal node - generate next nodes. // int target = diagram[index]; pair p = spanningTree.insert(SpanningTree::value_type(target, Node())); if (p.second) { p.first->second.pathCount = pathCount; p.first->second.parent = parent; p.first->second.sortIndex = k; nextNodes.insert(target); } else p.first->second.pathCount += pathCount; } } } currentNodes.swap(nextNodes); } ComplexWarning((preregProblem ? "sort" : "constructor") << " declarations for operator " << QUOTE(safeCastNonNull(this)) << " failed " << (preregProblem ? "preregularity" : "constructor consistency") << " check on " << badCount << " out of " << product << " sort tuples. First such tuple is ("); for (int i = 0; i < nrArgs; ++i) { cerr << QUOTE(componentVector[i]->sort(firstBad[i])); if (i != nrArgs - 1) cerr << ", "; } cerr << ")." << endl; } Maude-Maude3.2/src/Core/sortTable.cc000066400000000000000000000474461420036611000173220ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for abstract class SortTable. // #include // utility stuff #include "macros.hh" #include "vector.hh" #include "indent.hh" // forward declarations #include "interface.hh" #include "core.hh" // interface class definitions #include "term.hh" // core class definitions #include "sortBdds.hh" #include "sortTable.hh" #ifdef COMPILER #include "compilationContext.hh" #endif #include "ctorDiagram.cc" #include "sortErrorAnalysis.cc" /* void SortTable::panic() const // HACK { cerr << ((Symbol*)(this)) << endl; ((Symbol*)(this))->dump(cerr, 0); ((SortTable*)(this))->dumpSortDiagram(cerr, 0); } */ SortTable::SortTable(int arity) : nrArgs(arity) { singleNonErrorSort = 0; ctorStatus = 0; } bool SortTable::domainSubsumes(int subsumer, int victim) const { const Vector& s = opDeclarations[subsumer].getDomainAndRange(); const Vector& v = opDeclarations[victim].getDomainAndRange(); for (int i = 0; i < nrArgs; ++i) { if (!(leq(v[i], s[i]))) return false; } return true; } void SortTable::computeMaximalOpDeclSetTable() { // // Fill out maximalOpDeclSetTable, which for each range sort gives the set // of operator declaration whose range is less than that sort and whose // domain is not subsumed by some other declaration in the set. // const ConnectedComponent* range = rangeComponent(); int nrSorts = range->nrSorts(); maximalOpDeclSetTable.resize(nrSorts); int nrDeclarations = opDeclarations.length(); // // For each range sort. // for (int i = 0; i < nrSorts; ++i) { NatSet& opDeclSet = maximalOpDeclSetTable[i]; const Sort* target = range->sort(i); // // For each declaration. // for (int j = 0; j < nrDeclarations; ++j) { if (leq(opDeclarations[j].getDomainAndRange()[nrArgs], target)) { // // For each previous declaration. // for (int k = 0; k < j; ++k) { if (opDeclSet.contains(k)) { if(domainSubsumes(k, j)) goto nextDecl; else if (domainSubsumes(j, k)) opDeclSet.subtract(k); } } opDeclSet.insert(j); } nextDecl: ; } } } void SortTable::compileOpDeclarations() { #ifndef NO_ASSERT int nrDeclarations = opDeclarations.length(); Assert(nrDeclarations > 0, "no operator declarations"); #endif componentVector.expandTo(nrArgs + 1); for (int i = 0; i <= nrArgs; ++i) { ConnectedComponent* c = (opDeclarations[0].getDomainAndRange()[i])->component(); #ifndef NO_ASSERT // // Check that components really do agree for subsort overloaded // operator declarations. // for (int j = 1; j < nrDeclarations; j++) { Assert(c == (opDeclarations[j].getDomainAndRange()[i])->component(), "Sort declarations for operator " << static_cast(this) << // hack " disagree on the sort component for argument " << i + 1); } #endif componentVector[i] = c; } buildSortDiagram(); if (ctorStatus == IS_COMPLEX) buildCtorDiagram(); #ifdef DUMP // dumpSortDiagram(cout, 0); #endif } bool SortTable::kindLevelDeclarationsOnly() const { for (const OpDeclaration& i : opDeclarations) { if (i.getDomainAndRange()[nrArgs]->index() != Sort::KIND) return false; } return true; } bool SortTable::canProduceErrorSort() const { if (specialSortHandling()) return false; // optimistic - derived class must overide if it wants to be bad! if (nrArgs == 0) return sortDiagram[0] == 0; NatSet currentStates; currentStates.insert(0); for (int i = 0; i < nrArgs; i++) { ConnectedComponent* component = componentVector[i]; int index = component->errorFree() ? component->nrMaximalSorts() : 0; NatSet nextStates; const NatSet::const_iterator e = currentStates.end(); for (NatSet::const_iterator j = currentStates.begin(); j != e; ++j) { int state = *j; int k = index; do nextStates.insert(traverse(state, k)); while (--k > 0); } currentStates.swap(nextStates); } return currentStates.contains(Sort::ERROR_SORT); } void SortTable::finalizeSortInfo() { // For derived classes that don't do any sort constraint dependent // compile time sort calculations. } bool SortTable::partiallySubsumes(int subsumer, int victim, int argNr) { const Vector& s = opDeclarations[subsumer].getDomainAndRange(); const Vector& v = opDeclarations[victim].getDomainAndRange(); if (!(leq(s[nrArgs], v[nrArgs]))) return false; for (int i = argNr; i < nrArgs; i++) { if (!(leq(v[i], s[i]))) return false; } return true; } void SortTable::minimize(NatSet& alive, int argNr) { // // We don't use NatSet iterators because alive is being modified. // // If two declarations mutually subsume one another, the earlier one // removes the later one. // if (!(alive.empty())) { int min = alive.min(); int max = alive.max(); for (int i = min; i <= max; i++) { if (alive.contains(i)) { for (int j = min; j <= max; j++) { if (j != i && alive.contains(j) && partiallySubsumes(i, j, argNr)) alive.subtract(j); } } } } } void SortTable::buildSortDiagram() { Vector currentStates(1); NatSet& all = currentStates[0]; int nrDeclarations = opDeclarations.length(); for (int i = nrDeclarations - 1; i >= 0; i--) all.insert(i); // insert in reverse order for efficiency if (nrArgs == 0) { sortDiagram.expandTo(1); bool unique; int sortIndex = findMinSortIndex(all, unique); WarningCheck(unique, "sort declarations for constant " << QUOTE(safeCastNonNull(this)) << " do not have an unique least sort."); sortDiagram[0] = sortIndex; singleNonErrorSort = componentVector[0]->sort(sortIndex); return; } enum SpecialSortIndices { UNINITIALIZED = 0, IMPOSSIBLE = -1 }; int singleNonErrorSortIndex = UNINITIALIZED; Vector nextStates; int currentBase = 0; set badTerminals; // // For each argument. // for (int i = 0; i < nrArgs; i++) { const ConnectedComponent* component = componentVector[i]; int nrSorts = component->nrSorts(); int nrCurrentStates = currentStates.length(); int nextBase = currentBase + nrSorts * nrCurrentStates; sortDiagram.expandTo(nextBase); int nrNextSorts = (i == nrArgs - 1) ? 0 : componentVector[i + 1]->nrSorts(); // // For each sort that the argument might have. // for (int j = 0; j < nrSorts; j++) { Sort* s = component->sort(j); // // Compute the set of declarations that are viable with this argument having this sort. // NatSet viable; for (int k = 0; k < nrDeclarations; k++) { if (leq(s, opDeclarations[k].getDomainAndRange()[i])) viable.insert(k); } // // For each current state, compute a new state or a sort. // for (int k = 0; k < nrCurrentStates; k++) { NatSet nextState(viable); nextState.intersect(currentStates[k]); int index = currentBase + k * nrSorts + j; if (nrNextSorts == 0) { // // Final argument case - we compute a sort. // bool unique; int sortIndex = findMinSortIndex(nextState, unique); sortDiagram[index] = sortIndex; if (!unique) badTerminals.insert(index); if (sortIndex > 0) { if (singleNonErrorSortIndex == UNINITIALIZED) singleNonErrorSortIndex = sortIndex; else if (singleNonErrorSortIndex > 0 && singleNonErrorSortIndex != sortIndex) singleNonErrorSortIndex = IMPOSSIBLE; } } else { // // Nonfinal argument case - we compute a new state by discarding // redundant declarations and getting a state number for it. // minimize(nextState, i + 1); sortDiagram[index] = nextBase + nrNextSorts * findStateNumber(nextStates, nextState); } } } currentStates.swap(nextStates); nextStates.contractTo(0); currentBase = nextBase; } if (singleNonErrorSortIndex > 0) singleNonErrorSort = componentVector[nrArgs]->sort(singleNonErrorSortIndex); if (!(badTerminals.empty())) sortErrorAnalysis(true, badTerminals); DebugAdvisory("sort table for " << static_cast(this) << " has " << sortDiagram.size() << " entries"); } int SortTable::findStateNumber(Vector& stateSet, const NatSet& state) { int nrStates = stateSet.length(); for (int i = 0; i < nrStates; i++) { if (stateSet[i] == state) return i; } stateSet.append(state); return nrStates; } int SortTable::findMinSortIndex(const NatSet& state, bool& unique) { Sort* minSort = componentVector[nrArgs]->sort(Sort::ERROR_SORT); // start with error sort NatSet infSoFar(minSort->getLeqSorts()); for (int i : state) { Sort* rangeSort = opDeclarations[i].getDomainAndRange()[nrArgs]; const NatSet& rangeLeqSorts = rangeSort->getLeqSorts(); infSoFar.intersect(rangeLeqSorts); // // This test only succeeds if rangeSort is less than or equal to // to the range sorts of the previous declarations in the state. // Thus in the case of a non-preregular operator we break in favor // of the earlier declaration // if (infSoFar == rangeLeqSorts) minSort = rangeSort; } unique = (infSoFar == minSort->getLeqSorts()); return minSort->index(); } void SortTable::computeSortFunctionBdds(const SortBdds& sortBdds, Vector& sortFunctionBdds) const { if (sortDiagram.isNull()) return; // operator doesn't use our mechanism // // We take our sort decision diagram and produce a BDD version, encoding each sort index // by a bit vector. // if (nrArgs == 0) { // // Generate constant BDD vector for constant operator. // sortBdds.makeIndexVector(sortBdds.getNrVariables(componentVector[nrArgs]->getIndexWithinModule()), singleNonErrorSort->index(), sortFunctionBdds); return; } // // Calculate and allocate the number of BDD variables we will need to represent the domain sorts. // int nrBddVariablesForDomain = 0; for (int i = 0; i < nrArgs; ++i) nrBddVariablesForDomain += sortBdds.getNrVariables(componentVector[i]->getIndexWithinModule()); BddUser::setNrVariables(nrBddVariablesForDomain); // // We have two alternative ways of computing the vector of BDDs to that represent the sort function. // recursiveComputeSortFunctionBdds(sortBdds, sortFunctionBdds); Vector altSortFunctionBdds; linearComputeSortFunctionBdds(sortBdds, altSortFunctionBdds); // // Consistancy test code. // DebugAdvisory("computeSortFunctionBdds() - consistancy check"); int nrBdds = altSortFunctionBdds.size(); for (int i = 0; i < nrBdds; ++i) { if (altSortFunctionBdds[i] != sortFunctionBdds[i]) { DebugAdvisory("computeSortFunctionBdds() : *** computeSortFunctionBdds() recursive =\n" << sortFunctionBdds[i] << "linear =\n" << altSortFunctionBdds[i]); } } } void SortTable::recursiveComputeSortFunctionBdds(const SortBdds& sortBdds, Vector& sortFunctionBdds) const { // // Calculate and allocate the number of BDD variables we will need to represent the domain sorts. // int nrBddVariablesForDomain = 0; for (int i = 0; i < nrArgs; ++i) nrBddVariablesForDomain += sortBdds.getNrVariables(componentVector[i]->getIndexWithinModule()); BddUser::setNrVariables(nrBddVariablesForDomain); BddTable table(sortDiagram.size()); // only target entries actually used // for (int i = 0; i < sortDiagram.size(); ++i) // cerr << sortDiagram[i] << " "; // cerr << endl; computeBddVector(sortBdds, 0, 0, table, 0); sortFunctionBdds.swap(table[0]); } void SortTable::linearComputeSortFunctionBdds(const SortBdds& sortBdds, Vector& sortFunctionBdds) const { // // This is an alternative computation of the same BDDs, directly from the operator declarations. // const ConnectedComponent* rangeComponent = componentVector[nrArgs]; int nrBddVariables = sortBdds.getNrVariables(rangeComponent->getIndexWithinModule()); // // We start with the constant error sort everywhere function. // sortBdds.makeIndexVector(nrBddVariables, Sort::ERROR_SORT, sortFunctionBdds); // // Because this algorithm breaks in favor of later considered declarations we consider the declarations // in reverse order for consistancy with the standard sort calculation on non-pregular signatures. // for (int i = opDeclarations.length() - 1; i >= 0; --i) { const Vector& opDeclaration = opDeclarations[i].getDomainAndRange(); Bdd replaceWithOurRangeSort = bdd_true(); // // First require all arguments to have a sort <= than than that of the // corresponding sort in the declaration. // int bddVarNr = 0; for (int j = 0; j < nrArgs; ++j) { Sort* sort = opDeclaration[j]; Bdd leqRelation = sortBdds.getRemappedLeqRelation(sort, bddVarNr); replaceWithOurRangeSort = bdd_and(replaceWithOurRangeSort, leqRelation); bddVarNr += sortBdds.getNrVariables(componentVector[j]->getIndexWithinModule()); } // // We require that the currently computed sort is not <= our range sort. // This allows our sort to replace the current sort in the incomparable case // and in the > case. // Sort* rangeSort = opDeclaration[nrArgs]; Bdd currentLeqOurRange = sortBdds.applyLeqRelation(rangeSort, sortFunctionBdds); replaceWithOurRangeSort = bdd_and(replaceWithOurRangeSort, bdd_not(currentLeqOurRange)); // // We now have a BDD that tells us when to replace the currently computed sort // with our range sort. We update the currently computed sort BDD using ite. // Vector ourRangeSort; sortBdds.makeIndexVector(nrBddVariables, rangeSort->index(), ourRangeSort); for (int k = 0; k < nrBddVariables; ++k) sortFunctionBdds[k] = bdd_ite(replaceWithOurRangeSort, ourRangeSort[k], sortFunctionBdds[k]); } } void SortTable::computeBddVector(const SortBdds& sortBdds, int bddVarNr, int argNr, BddTable& table, int nodeNr) const { // DebugAdvisory("starting computeBddVector(bddVarNr=" << bddVarNr << ", argNr=" << argNr << ", nodeNr=" << nodeNr << ")"); Assert(argNr < nrArgs, "bad argNr"); BddVector& vec = table[nodeNr]; if (!vec.isNull()) return; // // We fill out the BDD vector vec to make it correspond to sortDiagram[nodeNr]. // const ConnectedComponent* component = componentVector[argNr]; int nrBddVariables = sortBdds.getNrVariables(component->getIndexWithinModule()); // // We first look at each value of our argument and OR together BDDs for those // that go to the same place. // // DebugAdvisory("starting OR phase"); int nrSorts = component->nrSorts(); typedef map BddMap; BddMap disjuncts; for (int i = 0; i < nrSorts; ++i) { Bdd& disjunct = disjuncts[sortDiagram[nodeNr + i]]; Bdd indexBdd = sortBdds.makeIndexBdd(bddVarNr, nrBddVariables, i); //DebugAdvisory("disjunct = " << disjunct.id() << " indexBdd = " << indexBdd.id()); disjunct = bdd_or(disjunct, indexBdd /*sortBdds.makeIndexBdd(bddVarNr, nrBddVariables, i)*/); //DebugAdvisory("done disjunct = " << disjunct.id()); } // // Now we go through the disjunctions we collected, ANDing them with the // vectors at their targets and OR the products together to form our final // vector. // // DebugAdvisory("starting OR of ANDs phase"); int nrBdds = sortBdds.getNrVariables(componentVector[nrArgs]->getIndexWithinModule()); vec.resize(nrBdds); // default construct sets all the elements to false for (const auto& i : disjuncts) { int target = i.first; if (argNr + 1 == nrArgs) { // // Target is actually the index of a sort. // BddVector t; sortBdds.makeIndexVector(nrBdds, target, t); for (int j = 0; j < nrBdds; ++j) { //DebugAdvisory("vec[j] " << vec[j].id()); //DebugAdvisory("t[j] " << t[j].id()); vec[j] = bdd_or(vec[j], bdd_and(i.second, t[j])); } } else { computeBddVector(sortBdds, bddVarNr + nrBddVariables, argNr + 1, table, target); BddVector& targetVec = table[target]; for (int j = 0; j < nrBdds; ++j) { //DebugAdvisory("vec[j] " << vec[j].id()); //DebugAdvisory("targetVec[j] " << targetVec[j].id()); vec[j] = bdd_or(vec[j], bdd_and(i.second, targetVec[j])); } } } //DebugAdvisory("done computeBddVector(bddVarNr=" << bddVarNr << ", argNr=" << argNr << ", nodeNr=" << nodeNr << ")"); } #ifdef COMPILER void SortTable::generateSortDiagram(CompilationContext& context) const { Vector minimum(0, nrArgs); Vector maximum(0, nrArgs); { int min = 0; int max = 0; minimum.append(0); maximum.append(0); for (int i = 0; i < nrArgs - 1; i++) { int nrSorts = componentVector[i]->nrSorts(); int newMin = UNBOUNDED; int newMax = 0; for (int j = min; j < max + nrSorts; j++) { int t = sortDiagram[j]; if (t < newMin) newMin = t; if (t > newMax) newMax = t; } min = newMin; max = newMax; minimum.append(min); maximum.append(max); } } int index = static_cast(this)->getIndexWithinModule(); for (int i = nrArgs - 1; i >= 0; i--) { int nrSorts = componentVector[i]->nrSorts(); int min = minimum[i]; int max = maximum[i]; for (int j = min; j <= max; j += nrSorts) { context.head() << "Flags"; for (int k = i; k < nrArgs - 1; k++) context.head() << '*'; context.head() << " f" << index << '_' << j << "[] = { "; for (int k = 0; k < nrSorts; k++) { if (i == nrArgs - 1) context.head() << '{' << sortDiagram[j + k] << '}'; else context.head() << 'f' << index << '_' << sortDiagram[j + k]; if (k + 1 < nrSorts) context.head() << ", "; } context.head() << " };\n"; } } } #endif #ifdef DUMP void SortTable::dumpSortDiagram(ostream& s, int indentLevel) { if (specialSortHandling()) return; // HACK s << Indent(indentLevel) << "Begin{SortDiagram}"; indentLevel += 2; set nodes; nodes.insert(0); ConnectedComponent* range = componentVector[nrArgs]; if (nrArgs == 0) { int target = sortDiagram[0]; s << '\n' << Indent(indentLevel - 1) << "node 0 -> sort " << target << " (" << range->sort(target) << ")\n"; } for (int i = 0; i < nrArgs; i++) { ConnectedComponent* component = componentVector[i]; int nrSorts = component->nrSorts(); set nextNodes; for (int n : nodes) { s << '\n' << Indent(indentLevel - 1) << "Node " << n << " (testing argument " << i << ")\n"; for (int k = 0; k < nrSorts; ++k) { int target = sortDiagram[n + k]; s << Indent(indentLevel) << "sort " << k << " (" << component->sort(k) << ") -> "; if (i == nrArgs - 1) { s << "sort " << target << " (" << range->sort(target) << ")\n"; } else { s << "node " << target << '\n'; nextNodes.insert(target); } } } nodes.swap(nextNodes); } s << Indent(indentLevel - 2) << "End{SortDiagram}\n"; } #endif Maude-Maude3.2/src/Core/sortTable.hh000066400000000000000000000145771420036611000173330ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2010 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Abstract class for table of operation sort declarations for a symbol. // #ifndef _sortTable_hh_ #define _sortTable_hh_ #include #include "bdd.hh" #include "opDeclaration.hh" #include "fullCompiler.hh" #include "connectedComponent.hh" class SortTable { NO_COPYING(SortTable); public: enum CtorStatus { IS_CTOR = 1, IS_NON_CTOR = 2, IS_COMPLEX = IS_CTOR | IS_NON_CTOR }; SortTable(int arity); int arity() const; void addOpDeclaration(const Vector& domainAndRange, bool constructorFlag); const Vector& getOpDeclarations() const; /* const */ ConnectedComponent* rangeComponent() const; const ConnectedComponent* domainComponent(int argNr) const; Sort* getRangeSort() const; Sort* getSingleNonErrorSort() const; int getCtorStatus() const; virtual void compileOpDeclarations(); virtual void fillInSortInfo(Term* subject) = 0; virtual void finalizeSortInfo(); virtual bool canProduceErrorSort() const; int traverse(int position, int sortIndex) const; bool kindLevelDeclarationsOnly() const; const NatSet& getMaximalOpDeclSet(Sort* target); // // Unification stuff. // virtual void computeSortFunctionBdds(const SortBdds& sortBdds, Vector& sortFunctionBdds) const; virtual void computeGeneralizedSort(const SortBdds& sortBdds, const Vector& realToBdd, // first BDD variable for each free real variable DagNode* subject, Vector& generalizedSort) { CantHappen("not implemented"); } virtual void computeGeneralizedSort2(const SortBdds& sortBdds, const Vector& realToBdd, // first BDD variable for each free real variable DagNode* subject, Vector& generalizedSort) { CantHappen("not implemented"); } #ifdef COMPILER void generateSortDiagram(CompilationContext& context) const; #endif protected: bool specialSortHandling() const; int ctorTraverse(int position, int sortIndex) const; #ifdef DUMP void dumpSortDiagram(ostream& s, int indentLevel); #endif private: typedef Vector BddVector; typedef Vector BddTable; struct Node; struct SpanningTree; void buildSortDiagram(); void buildCtorDiagram(); void sortErrorAnalysis(bool preregProblem, const set& badTerminals); void computeMaximalOpDeclSetTable(); bool domainSubsumes(int subsumer, int victim) const; int findStateNumber(Vector& stateSet, const NatSet& state); int findMinSortIndex(const NatSet& state, bool& unique); bool partiallySubsumes(int subsumer, int victim, int argNr); void minimize(NatSet& alive, int argNr); void computeBddVector(const SortBdds& sortBdds, int bddVarNr, int argNr, BddTable& table, int nodeNr) const; // void panic() const; // HACK bool containsConstructor(const NatSet& state, bool& unique); static bool partlyMoreGeneral(const OpDeclaration& subsumer, const OpDeclaration& victim, int argNr); static bool ctorSubsumes(const OpDeclaration& subsumer, const OpDeclaration& victim, int argNr); void minimizeWrtCtor(NatSet& alive, int argNr) const; void linearComputeSortFunctionBdds(const SortBdds& sortBdds, Vector& sortFunctionBdds) const; void recursiveComputeSortFunctionBdds(const SortBdds& sortBdds, Vector& sortFunctionBdds) const; const int nrArgs; Vector opDeclarations; Vector componentVector; Vector sortDiagram; Sort* singleNonErrorSort; // if we can only generate one non error sort Vector ctorDiagram; int ctorStatus; // place holder Vector maximalOpDeclSetTable; // indices of maximal op decls with range <= each sort }; inline int SortTable::arity() const { return nrArgs; } inline const NatSet& SortTable::getMaximalOpDeclSet(Sort* target) { if (maximalOpDeclSetTable.isNull()) computeMaximalOpDeclSetTable(); return maximalOpDeclSetTable[target->index()]; } inline bool SortTable::specialSortHandling() const { return sortDiagram.isNull(); } inline void SortTable::addOpDeclaration(const Vector& domainAndRange, bool constructorFlag) { Assert(domainAndRange.length() - 1 == nrArgs, "bad domain length of " << domainAndRange.length() - 1 << " instead of " << nrArgs); int nrOpDeclarations = opDeclarations.length(); opDeclarations.resize(nrOpDeclarations + 1); opDeclarations[nrOpDeclarations].setInfo(domainAndRange, constructorFlag); ctorStatus |= constructorFlag ? IS_CTOR : IS_NON_CTOR; } inline const Vector& SortTable::getOpDeclarations() const { return opDeclarations; } inline /* const */ ConnectedComponent* SortTable::rangeComponent() const { return opDeclarations[0].getDomainAndRange()[nrArgs]->component(); } inline Sort* SortTable::getRangeSort() const { // // If an operator has been declared with multiple range sort, this // function just returns the first, which is good enough for some // purposes. // return opDeclarations[0].getDomainAndRange()[nrArgs]; } inline const ConnectedComponent* SortTable::domainComponent(int argNr) const { return opDeclarations[0].getDomainAndRange()[argNr]->component(); } inline Sort* SortTable::getSingleNonErrorSort() const { return singleNonErrorSort; } inline int SortTable::getCtorStatus() const { return ctorStatus; } inline int SortTable::traverse(int position, int sortIndex) const { /* if (position + sortIndex >= sortDiagram.length()) // HACK panic(); */ return sortDiagram[position + sortIndex]; } inline int SortTable::ctorTraverse(int position, int sortIndex) const { return ctorDiagram[position + sortIndex]; } #endif Maude-Maude3.2/src/Core/stackMachine.cc000066400000000000000000000153131420036611000177410ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 2013 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class StackMachine. // // utility stuff #include "macros.hh" //#include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" // core declarations #include "stackMachine.hh" #include "instruction.hh" #include "nullInstruction.hh" StackMachine::StackMachine() { memoryBase = static_cast(operator new[](STACK_SIZE)); topFrame = reinterpret_cast(memoryBase); protectedScratchpad = new DAG_POINTER[10000]; // HACK //rawScratchpad = new DAGP_POINTER[1000]; // HACK rewriteCount = 0; //nrFramesMade = 0; //maxFrameUse = 0; } StackMachine::~StackMachine() { delete[] memoryBase; delete[] protectedScratchpad; } /* DagNode* StackMachine::execute(Instruction* instructionSequence) { // // Create initial frame to kick up computation. // Frame* initFrame = topFrame; initFrame->setNextInstruction(instructionSequence); initFrame->setReturnAddress(&realResult); initFrame->setAncestorWithValidNextInstruction(0); while (topFrame != 0) { topFrame->getNextInstruction()->execute(this); //MemoryCell::okToCollectGarbage(); } return realResult; } */ DagNode* StackMachine::execute(Instruction* instructionSequence) { // // Create a dummy frame to soak up extra execute() calls. // DagNode* dummyResult; Frame* dummyFrame = topFrame; dummyFrame->setNextInstruction(NullInstruction::getNullInstruction()); dummyFrame->setReturnAddress(&dummyResult); // needs to be a valid address for GC dummyFrame->setAncestorWithValidNextInstruction(0); // // Create initial frame to kick off computation. // Frame* initFrame = pushFrame(makeFrameLift(0)); initFrame->setNextInstruction(instructionSequence); initFrame->setReturnAddress(&realResult); initFrame->setAncestorWithValidNextInstruction(dummyFrame); // // Make safe for GC. // realResult = 0; // // Loop until we get back to dummy frame. // do { // // Pick 12 as the lcm(2, 3, 4, 6) // topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); /* topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); // topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); // topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); // topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); // topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); topFrame->getNextInstruction()->execute(this); //cout << (reinterpret_cast(topFrame) - memoryBase) << endl; */ MemoryCell::okToCollectGarbage(); } while (topFrame != dummyFrame); return realResult; } void StackMachine::execute() { // // Need to figure out termination condition for when last frame is pop'd // // for(;;) while (topFrame != 0) { topFrame->getNextInstruction()->execute(this); MemoryCell::okToCollectGarbage(); } } void StackMachine::markReachableNodes() { for (Frame* i = topFrame; i != 0; i = i->getAncestorWithValidNextInstruction()) { i->returnValue(0); // need to clear garbage pointer from slot i->markActiveSlots(); } if (realResult != 0) realResult->mark(); } Maude-Maude3.2/src/Core/stackMachine.hh000066400000000000000000000076061420036611000177610ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 2013 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for excution frames on the stack machine. // #ifndef _stackMachine_hh_ #define _stackMachine_hh_ #include "simpleRootContainer.hh" #include "frame.hh" class StackMachine : private SimpleRootContainer { NO_COPYING(StackMachine); public: typedef size_t FrameLift; StackMachine(); ~StackMachine(); Frame* getTopFrame() const; static FrameLift makeFrameLift(int nrSlotsToPreserve); Frame* pushFrame(FrameLift frameLift); void popDeadFrames(); void popFrame(Frame* frame); void setTopFrame(Frame* frame); // // To quit the top frame when it is not yet complete. // void popToFrame(Frame* frame); void execute(); DagNode* execute(Instruction* instructionSequence); void incrementEqCount(Int64 amount = 1); Int64 getEqCount(); static Frame* fastPushFrame(Frame* oldFrame, FrameLift frameLift); // // Scratchpad manipulation. // DagNode** getProtectedScratchpad() const; //DagNode*** getRawScratchpad() const; private: enum Private { STACK_SIZE = 1000000000 }; typedef DagNode** DAGP_POINTER; typedef DagNode* DAG_POINTER; void markReachableNodes(); Frame* topFrame; char* memoryBase; Int64 rewriteCount; DagNode* realResult; // so we can protect it from GC // // Scratchpads. // DAG_POINTER* protectedScratchpad; //DAGP_POINTER* rawScratchpad; // // stack statistics // //Int64 nrFramesMade; //size_t maxFrameUse; }; inline Frame* StackMachine::getTopFrame() const { return topFrame; } inline StackMachine::FrameLift StackMachine::makeFrameLift(int nrSlotsToPreserve) { return sizeof(Frame) + sizeof(DagNode*) * nrSlotsToPreserve; } inline Frame* StackMachine::pushFrame(FrameLift frameLift) { topFrame = reinterpret_cast(reinterpret_cast(topFrame) + frameLift); #if 0 for (int i = 0; i < 64; ++i) (reinterpret_cast(topFrame))[i] = 0x33; // fill new frame with garbage #endif return topFrame; } inline Frame* StackMachine::fastPushFrame(Frame* oldFrame, FrameLift frameLift) { // // Static function that creates a new frame from the old frame without updating underlying machine. // return reinterpret_cast(reinterpret_cast(oldFrame) + frameLift); } inline void StackMachine::popDeadFrames() { topFrame = topFrame->getAncestorWithValidNextInstruction(); } inline void StackMachine::popFrame(Frame* frame) { // // This function exists simply to avoid reloading topFrame, when the caller already has // it in a register. // Assert(frame == topFrame, "frame clash"); topFrame = frame->getAncestorWithValidNextInstruction(); } inline void StackMachine::popToFrame(Frame* frame) { topFrame = frame; } inline void StackMachine::setTopFrame(Frame* frame) { topFrame = frame; } inline void StackMachine::incrementEqCount(Int64 amount) { rewriteCount += amount; } inline Int64 StackMachine::getEqCount() { return rewriteCount; } inline DagNode** StackMachine::getProtectedScratchpad() const { return protectedScratchpad; } /* inline DagNode*** StackMachine::getRawScratchpad() const { return rawScratchpad; } */ #endif Maude-Maude3.2/src/Core/stackMachineRhsCompiler.cc000066400000000000000000000070541420036611000221140ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2013 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class StackMachineRhsCompiler // // utility stuff #include "macros.hh" #include "vector.hh" #include "indent.hh" // forward declarations #include "interface.hh" #include "core.hh" // interface class definitions #include "symbol.hh" // core class definitions #include "variableInfo.hh" #include "returnInstruction.hh" #include "stackMachineRhsCompiler.hh" void StackMachineRhsCompiler::recordFunctionEval(Symbol* symbol, int destination, const Vector& argumentSlots) { int nrFunctionEvaluations = functionEvaluations.size(); functionEvaluations.expandBy(1); FunctionEval& f = functionEvaluations[nrFunctionEvaluations]; f.symbol = symbol; f.destination = destination; f.argumentSlots = argumentSlots; // deep copy } Instruction* StackMachineRhsCompiler::compileInstructionSequence() { // // Deal with degenerate case of bare variable. // FunctionEval& first = functionEvaluations[0]; if (first.symbol == 0) { NatSet activeSlots; int source = first.argumentSlots[0]; activeSlots.insert(source); Instruction* nextInstruction = new ReturnInstruction(source); nextInstruction->setActiveSlots(activeSlots); return nextInstruction; } NatSet activeSlots; Instruction* nextInstruction = 0; int nrFunctionEvaluations = functionEvaluations.size(); for (int i = nrFunctionEvaluations - 1; i >= 0; --i) { FunctionEval& f = functionEvaluations[i]; Assert(f.symbol != 0, "null f.symbol when nrFunctionEvaluations = " << nrFunctionEvaluations); activeSlots.subtract(f.destination); for (int i : f.argumentSlots) activeSlots.insert(i); Instruction* newInstruction = (nextInstruction == 0) ? f.symbol->generateFinalInstruction(f.argumentSlots) : f.symbol->generateInstruction(f.destination, f.argumentSlots, nextInstruction); if (newInstruction == 0) { // // Didn't generate an instruction (maybe an unimplemented case). // Warn, clean up and bail. // IssueWarning("stack machine compilation not supported for " << f.symbol); delete nextInstruction; return 0; } newInstruction->setActiveSlots(activeSlots); nextInstruction = newInstruction; } return nextInstruction; } void StackMachineRhsCompiler::dump(ostream& s, const VariableInfo& variableInfo, int indentLevel) { s << Indent(indentLevel) << "Begin{StackMachineRhsCompiler}\n"; for (FunctionEval& i : functionEvaluations) { s << Indent(indentLevel + 1); if (i.symbol == 0) s << "(return)\t"; else s << i.symbol << "\t"; s << "destination = " << i.destination << "\targs = "; for (int k : i.argumentSlots) s << k << ' '; } s << Indent(indentLevel) << "End{StackMachineRhsCompiler}\n"; } Maude-Maude3.2/src/Core/stackMachineRhsCompiler.hh000066400000000000000000000027131420036611000221230ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2013 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ #include #include // // Class for compiling rhs side of an equation to a sequence of stack machine instructions. // #ifndef _stackMachineRhsCompiler_hh_ #define _stackMachineRhsCompiler_hh_ class StackMachineRhsCompiler { public: void recordFunctionEval(Symbol* symbol, int destination, const Vector& argumentSlots); Instruction* compileInstructionSequence(); void dump(ostream& s, const VariableInfo& variableInfo, int indentLevel = 0); private: struct FunctionEval { Symbol* symbol; int destination; Vector argumentSlots; }; Vector functionEvaluations; }; #endif Maude-Maude3.2/src/Core/strategy.cc000066400000000000000000000057011420036611000172110ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for abstract class Strategy. // // utility stuff #include "macros.hh" #include "vector.hh" //#include "indent.hh" // core class definitions #include "strategy.hh" const Vector Strategy::standard; // constant empty vector Strategy::Strategy() { } void Strategy::setStrategy(const Vector& userStrategy, int nrArgs, bool memoFlag) { int stratLen = userStrategy.length(); stdStrategy = true; unevalArgs = false; if (stratLen == 0) { if (memoFlag) { for (int i = 0; i < nrArgs; i++) { strategy.append(i + 1); eager.insert(i); evaluated.insert(i); } strategy.append(0); stdStrategy = false; } return; } // // Compute a normalized strategy. // NatSet eagerSet; NatSet evaluatedSet; bool lastWasZero = false; bool semiEager = false; for (int i = 0; i < stratLen; i++) { int a = userStrategy[i]; if (a < 0) a = -a; if (a > nrArgs) continue; if (a == 0) { if (!lastWasZero) { strategy.append(0); lastWasZero = true; semiEager = true; } } else { if (!(evaluatedSet.contains(a - 1))) { strategy.append(a); lastWasZero = false; evaluatedSet.insert(a - 1); if (!semiEager) eagerSet.insert(a - 1); } } } if (!lastWasZero) strategy.append(0); // // Check to see if normalized strategy is in fact standard strategy. // if (memoFlag || strategy.length() != nrArgs + 1) stdStrategy = false; else { for (int i = 0; i < nrArgs; i++) { if (strategy[i] != i + 1) { stdStrategy = false; break; } } } // // If we don't have the standard strategy we have to keep track of which // arguments are evaulated and which are eager. // if (!stdStrategy) { for (int i = 0; i < nrArgs; i++) { if (!(evaluatedSet.contains(i))) { unevalArgs = true; break; } } eager = eagerSet; // deep copy evaluated = evaluatedSet; // deep copy } } void Strategy::setFrozen(const NatSet& frozen) { Strategy::frozen = frozen; } Maude-Maude3.2/src/Core/strategy.hh000066400000000000000000000040721420036611000172230ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for operator level strategies. // #ifndef _strategy_hh_ #define _strategy_hh_ #include "natSet.hh" class Strategy { public: Strategy(); void setStrategy(const Vector& userStrategy, int nrArgs, bool memoFlag); virtual void setFrozen(const NatSet& frozen); const Vector& getStrategy() const; const NatSet& getFrozen() const; bool hasFrozenArguments() const; bool standardStrategy() const; bool unevaluatedArguments() const; bool eagerArgument(int argNr) const; bool evaluatedArgument(int argNr) const; protected: static const Vector standard; private: Bool stdStrategy; Bool unevalArgs; Vector strategy; NatSet eager; NatSet evaluated; NatSet frozen; }; inline const NatSet& Strategy::getFrozen() const { return frozen; } inline const Vector& Strategy::getStrategy() const { return strategy; } inline bool Strategy::standardStrategy() const { return stdStrategy; } inline bool Strategy::unevaluatedArguments() const { return unevalArgs; } inline bool Strategy::eagerArgument(int argNr) const { return stdStrategy || eager.contains(argNr); } inline bool Strategy::evaluatedArgument(int argNr) const { return stdStrategy || evaluated.contains(argNr); } #endif Maude-Maude3.2/src/Core/strategyDefinition.cc000066400000000000000000000073031420036611000212220ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class StrategyDefinition. // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" // interface class definitions #include "term.hh" // core class definitions #include "strategyDefinition.hh" #include "termBag.hh" #include "rewriteStrategy.hh" #include "rewritingContext.hh" // strategy language definitions #include "strategyLanguage.hh" #include "strategyExpression.hh" StrategyDefinition::StrategyDefinition(int label, RewriteStrategy* strategy, Term* lhs, StrategyExpression* rhs, const Vector& condition) : PreEquation(label, lhs, condition), strategy(strategy), rhs(rhs) { Assert(rhs, "null rhs"); } StrategyDefinition::~StrategyDefinition() { delete rhs; } void StrategyDefinition::check() { NatSet boundVariables; PreEquation::check(boundVariables); // Non-executable strategy definitions are not processed if (isNonexec()) return; // First, check unbound variables in the condition const NatSet& unboundVariables = getUnboundVariables(); if (!unboundVariables.empty()) { IssueWarning(*this << ": variable " << QUOTE(index2Variable(getUnboundVariables().min())) << " is used before it is bound in strategy definition:\n" << this); markAsBad(); return; } // The RHS expression is not indexed with a single VariableInfo because // it has different indices depending on the static context TermSet boundVars; VariableInfo vinfo; for (int index = 0; index < getNrRealVariables(); index++) if (boundVariables.contains(index)) boundVars.insert(index2Variable(index)); if (!rhs->check(vinfo, boundVars)) // Errors are printed inside the check methods markAsBad(); else { // Builds the context creation vector size_t rhsVars = vinfo.getNrRealVariables(); contextSpec.expandTo(rhsVars); for (size_t i = 0; i < rhsVars; i++) { Term* var = vinfo.index2Variable(i); int lhsIndex = variable2Index(static_cast(var)); contextSpec[i] = lhsIndex; } } } void StrategyDefinition::preprocess() { PreEquation::preprocess(); addConditionVariables(getLhs()->occursBelow()); rhs->process(); // Strategy expressions do not have type, so we do not check // if the strategy declaration type is consistent } void StrategyDefinition::compile(bool compileLhs) { if (isCompiled()) return; setCompiled(); TermBag availableTerms; compileBuild(availableTerms, false); compileMatch(compileLhs, false); // fast = hasCondition() ? DEFAULT : getNrProtectedVariables(); } int StrategyDefinition::traceBeginTrial(DagNode* subject, RewritingContext& context) const { return context.traceBeginSdTrial(subject, this); } void StrategyDefinition::print(ostream& s) const { s << this; } Maude-Maude3.2/src/Core/strategyDefinition.hh000066400000000000000000000047711420036611000212420ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2010 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for strategy definitions // #ifndef _strategyDefinition_hh_ #define _strategyDefinition_hh_ #include "strategyLanguage.hh" #include "preEquation.hh" class StrategyDefinition : public PreEquation { public: StrategyDefinition(int label, RewriteStrategy* strategy, Term* lhs, StrategyExpression* rhs, const Vector& condition = noCondition); ~StrategyDefinition(); using PreEquation::getLhs; StrategyExpression* getRhs() const; RewriteStrategy* getStrategy() const; // // Gets the strategy definition context specification. // // The vector includes as many entries as variables in the context, // each containing the index of the left-hand side variable to be // initialized with. // // This context specification is calculated by check(). // const Vector& getContextSpec() const; void check(); void preprocess(); void compile(bool compileLhs = true); long fastNrVariables() const; void print(ostream& s) const; // void stackMachineCompile(); // Instruction* getInstructionSequence() const; private: int traceBeginTrial(DagNode* subject, RewritingContext& context) const; RewriteStrategy* strategy; StrategyExpression* rhs; Vector contextSpec; }; inline StrategyExpression* StrategyDefinition::getRhs() const { return rhs; } inline RewriteStrategy* StrategyDefinition::getStrategy() const { return strategy; } inline const Vector& StrategyDefinition::getContextSpec() const { return contextSpec; } // // Output function for StrategyDefinition must be defined by library user. // ostream& operator<<(ostream& s, const StrategyDefinition* equation); #endif Maude-Maude3.2/src/Core/subproblemAccumulator.hh000066400000000000000000000036351420036611000217370ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for accumulating sequeces of subproblems // #ifndef _subproblemAccumulator_hh_ #define _subproblemAccumulator_hh_ #include "subproblemSequence.hh" class SubproblemAccumulator { public: SubproblemAccumulator(); ~SubproblemAccumulator(); void add(Subproblem* sp); Subproblem* extractSubproblem(); private: Subproblem* first; SubproblemSequence* sequence; }; inline SubproblemAccumulator::SubproblemAccumulator() { first = 0; sequence = 0; } inline SubproblemAccumulator::~SubproblemAccumulator() { if (sequence != 0) delete sequence; else delete first; } inline void SubproblemAccumulator::add(Subproblem* sp) { if (sp != 0) { if (first == 0) first = sp; else if (sequence == 0) sequence = new SubproblemSequence(first, sp); else sequence->append(sp); } } inline Subproblem* SubproblemAccumulator::extractSubproblem() { Subproblem* r = 0; if (sequence != 0) { r = sequence; sequence = 0; first = 0; } else if (first != 0) { r = first; first = 0; } return r; } #endif Maude-Maude3.2/src/Core/subproblemDisjunction.cc000066400000000000000000000056611420036611000217400ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Implementation for class SubproblemDisjunction // // utility stuff #include "macros.hh" #include "vector.hh" // forward declarations #include "interface.hh" #include "core.hh" // interface class definitions #include "symbol.hh" #include "dagNode.hh" #include "extensionInfo.hh" // core class definitions #include "rewritingContext.hh" #include "localBinding.hh" #include "subproblemDisjunction.hh" SubproblemDisjunction::SubproblemDisjunction() { realExtensionInfo = 0; } SubproblemDisjunction::~SubproblemDisjunction() { int nrOptions = options.length(); for (int i = 0; i < nrOptions; i++) { Option& op = options[i]; delete op.difference; delete op.subproblem; delete op.extensionInfo; } } void SubproblemDisjunction::addOption(LocalBinding* difference, Subproblem* subproblem, ExtensionInfo* extensionInfo) { int nrOptions = options.length(); options.expandBy(1); Option& op = options[nrOptions]; op.difference = difference; op.subproblem = subproblem; op.extensionInfo = extensionInfo; if (extensionInfo != 0) { Assert(realExtensionInfo == 0 || realExtensionInfo == extensionInfo, "extension info clash"); realExtensionInfo = extensionInfo; } } bool SubproblemDisjunction::solve(bool findFirst, RewritingContext& solution) { int nrOptions = options.length(); if (findFirst) selectedOption = 0; for (; selectedOption < nrOptions; selectedOption++) { Option& so = options[selectedOption]; if (findFirst) { if (so.difference != 0 && !(so.difference->assert(solution))) continue; ExtensionInfo* extensionInfo = so.extensionInfo; if (extensionInfo != 0) realExtensionInfo->copy(extensionInfo); } Subproblem* subproblem = so.subproblem; if (subproblem == 0) { if (findFirst) return true; } else { if (subproblem->solve(findFirst, solution)) return true; } if (so.difference != 0) so.difference->retract(solution); findFirst = true; } return false; } Maude-Maude3.2/src/Core/subproblemDisjunction.hh000066400000000000000000000027471420036611000217540ustar00rootroot00000000000000/* This file is part of the Maude 3 interpreter. Copyright 1997-2003 SRI International, Menlo Park, CA 94025, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ // // Class for disjunctions of subproblems. // #ifndef _subproblemDisjunction_hh_ #define _subproblemDisjunction_hh_ #include "subproblem.hh" class SubproblemDisjunction : public Subproblem { public: SubproblemDisjunction(); ~SubproblemDisjunction(); void addOption(LocalBinding* difference, Subproblem* subproblem, ExtensionInfo* extensionInfo); bool solve(bool findFirst, RewritingContext& solution); private: struct Option { LocalBinding* difference; Subproblem* subproblem; ExtensionInfo* extensionInfo; }; ExtensionInfo* realExtensionInfo; Vector